Skip to content

Commit

Permalink
feat:(js-api-client): add Core next to the MassCall Client
Browse files Browse the repository at this point in the history
  • Loading branch information
Plopix committed Jul 31, 2024
1 parent 5346b7e commit a6416b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/js-api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@crystallize/js-api-client",
"license": "MIT",
"version": "3.1.1",
"version": "3.2.0",
"type": "module",
"author": "Crystallize <[email protected]> (https://crystallize.com)",
"contributors": [
Expand Down
7 changes: 7 additions & 0 deletions components/js-api-client/src/core/massCallClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ export type MassClientInterface = ClientInterface & {
orderApi: ApiCaller<any>;
subscriptionApi: ApiCaller<any>;
pimApi: ApiCaller<any>;
nextPimApi: ApiCaller<any>;
enqueue: {
catalogueApi: QueuedApiCaller;
searchApi: QueuedApiCaller;
orderApi: QueuedApiCaller;
subscriptionApi: QueuedApiCaller;
pimApi: QueuedApiCaller;
nextPimApi: QueuedApiCaller;
};
};

Expand Down Expand Up @@ -219,6 +221,11 @@ export function createMassCallClient(
promises.push({ key, caller: client.pimApi, query, variables });
return key;
},
nextPimApi: (query: string, variables?: VariablesType): string => {
const key = `nextPimApi-${counter++}`;
promises.push({ key, caller: client.nextPimApi, query, variables });
return key;
},
},
};
}

0 comments on commit a6416b0

Please sign in to comment.