From 9acdd99a6aff0dec7275d821530122c214e439cf Mon Sep 17 00:00:00 2001 From: Joel Uong Date: Mon, 6 May 2024 10:45:01 -0400 Subject: [PATCH] move custom api param type from core to commerce-sdk --- src/static/helpers/customApi.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/static/helpers/customApi.ts b/src/static/helpers/customApi.ts index b6f0a5ea..d733f26f 100644 --- a/src/static/helpers/customApi.ts +++ b/src/static/helpers/customApi.ts @@ -24,6 +24,16 @@ const contentTypeHeaderExists = ( return foundHeader; }; +export type CustomApiParameters = { + clientId?: string; + organizationId?: string; + shortCode?: string; + siteId?: string; + endpointName?: string; + apiName?: string; + apiVersion?: string; +}; + /** * A helper function designed to make calls to a custom API endpoint * For more information about custom APIs, please refer to the [API documentation](https://developer.salesforce.com/docs/commerce/commerce-api/guide/custom-apis.html) @@ -64,7 +74,7 @@ export const callCustomEndpoint = async (args: { retrySettings?: OperationOptions; fetchOptions?: RequestInit; }; - clientConfig: ClientConfig; + clientConfig: ClientConfig; rawResponse?: boolean; }): Promise => { const { options, clientConfig, rawResponse } = args;