Skip to content

Commit

Permalink
move custom api param type from core to commerce-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
joeluong-sfcc committed May 6, 2024
1 parent f265883 commit 9acdd99
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/static/helpers/customApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -64,7 +74,7 @@ export const callCustomEndpoint = async (args: {
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
};
clientConfig: ClientConfig;
clientConfig: ClientConfig<CustomApiParameters>;
rawResponse?: boolean;
}): Promise<Response | unknown> => {
const { options, clientConfig, rawResponse } = args;
Expand Down

0 comments on commit 9acdd99

Please sign in to comment.