Skip to content

Commit 08fdd8a

Browse files
committed
feat:(js-api-client): add Core next to the MassCall Client
1 parent f95d218 commit 08fdd8a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@crystallize/js-api-client",
33
"license": "MIT",
4-
"version": "3.1.1",
4+
"version": "3.2.0",
55
"type": "module",
66
"author": "Crystallize <hello@crystallize.com> (https://crystallize.com)",
77
"contributors": [

src/core/massCallClient.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ export type MassClientInterface = ClientInterface & {
2424
orderApi: ApiCaller<any>;
2525
subscriptionApi: ApiCaller<any>;
2626
pimApi: ApiCaller<any>;
27+
nextPimApi: ApiCaller<any>;
2728
enqueue: {
2829
catalogueApi: QueuedApiCaller;
2930
searchApi: QueuedApiCaller;
3031
orderApi: QueuedApiCaller;
3132
subscriptionApi: QueuedApiCaller;
3233
pimApi: QueuedApiCaller;
34+
nextPimApi: QueuedApiCaller;
3335
};
3436
};
3537

@@ -219,6 +221,11 @@ export function createMassCallClient(
219221
promises.push({ key, caller: client.pimApi, query, variables });
220222
return key;
221223
},
224+
nextPimApi: (query: string, variables?: VariablesType): string => {
225+
const key = `nextPimApi-${counter++}`;
226+
promises.push({ key, caller: client.nextPimApi, query, variables });
227+
return key;
228+
},
222229
},
223230
};
224231
}

0 commit comments

Comments
 (0)