@propeller-commerce/propeller-sdk-v2 0.12.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/dist/cjs/generated/operationVariables.d.ts +9 -1
- package/dist/cjs/generated/operations/machine.js +31 -51
- package/dist/cjs/generated/operations/machineCreate.js +31 -51
- package/dist/cjs/generated/operations/machineUpsert.js +31 -51
- package/dist/cjs/generated/operations/machines.js +31 -51
- package/dist/cjs/service/MachineService.d.ts +22 -7
- package/dist/cjs/service/MachineService.js +25 -8
- package/dist/cjs/service/SparePartsMachineService.d.ts +13 -7
- package/dist/cjs/service/SparePartsMachineService.js +16 -8
- package/dist/esm/generated/operations/machine.js +31 -51
- package/dist/esm/generated/operations/machineCreate.js +31 -51
- package/dist/esm/generated/operations/machineUpsert.js +31 -51
- package/dist/esm/generated/operations/machines.js +31 -51
- package/dist/esm/service/MachineService.js +25 -8
- package/dist/esm/service/SparePartsMachineService.js +16 -8
- package/package.json +1 -1
|
@@ -10,20 +10,26 @@ export function sparePartsMachineService(client) {
|
|
|
10
10
|
return {
|
|
11
11
|
/**
|
|
12
12
|
Retrieves a specific spare parts machine
|
|
13
|
-
* @param variables
|
|
13
|
+
* @param variables Variables for the machine query — see `machineService.getMachine`
|
|
14
|
+
* @param fetchOptions Transport-level hints (e.g. cache tags). Never serialised
|
|
15
|
+
* into the request body.
|
|
14
16
|
* @returns Promise<SparePartsMachine> Spare parts machine data
|
|
15
17
|
*/
|
|
16
|
-
async getSparePartsMachine(variables) {
|
|
17
|
-
const
|
|
18
|
+
async getSparePartsMachine(variables, fetchOptions) {
|
|
19
|
+
const language = variables.language ?? client.getDefaultLanguage();
|
|
20
|
+
const result = await runOperation(client, machineDoc, 'machine', { ...variables, language }, fetchOptions);
|
|
18
21
|
return result.data.machine;
|
|
19
22
|
},
|
|
20
23
|
/**
|
|
21
24
|
Retrieves spare parts machines with search criteria
|
|
22
25
|
* @param variables Search input parameters
|
|
26
|
+
* @param fetchOptions Transport-level hints (e.g. cache tags). Never serialised
|
|
27
|
+
* into the request body.
|
|
23
28
|
* @returns Promise<SparePartsMachineResponse> Spare parts machines response
|
|
24
29
|
*/
|
|
25
|
-
async getSparePartsMachines(variables) {
|
|
26
|
-
const
|
|
30
|
+
async getSparePartsMachines(variables, fetchOptions) {
|
|
31
|
+
const language = variables.language ?? client.getDefaultLanguage();
|
|
32
|
+
const result = await runOperation(client, machinesDoc, 'machines', { ...variables, language }, fetchOptions);
|
|
27
33
|
return result.data.machines;
|
|
28
34
|
},
|
|
29
35
|
/**
|
|
@@ -53,14 +59,16 @@ export class SparePartsMachineService {
|
|
|
53
59
|
constructor(client) { this._svc = sparePartsMachineService(client); }
|
|
54
60
|
/**
|
|
55
61
|
* Retrieves a specific spare parts machine
|
|
56
|
-
* @param variables
|
|
62
|
+
* @param variables Variables for the machine query
|
|
63
|
+
* @param fetchOptions Transport-level hints (e.g. cache tags)
|
|
57
64
|
*/
|
|
58
|
-
getSparePartsMachine(variables) { return this._svc.getSparePartsMachine(variables); }
|
|
65
|
+
getSparePartsMachine(variables, fetchOptions) { return this._svc.getSparePartsMachine(variables, fetchOptions); }
|
|
59
66
|
/**
|
|
60
67
|
* Retrieves spare parts machines with search criteria
|
|
61
68
|
* @param variables Search input parameters
|
|
69
|
+
* @param fetchOptions Transport-level hints (e.g. cache tags)
|
|
62
70
|
*/
|
|
63
|
-
getSparePartsMachines(variables) { return this._svc.getSparePartsMachines(variables); }
|
|
71
|
+
getSparePartsMachines(variables, fetchOptions) { return this._svc.getSparePartsMachines(variables, fetchOptions); }
|
|
64
72
|
/**
|
|
65
73
|
* Creates a new spare parts machine
|
|
66
74
|
* @param variables Spare parts machine creation input
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@propeller-commerce/propeller-sdk-v2",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "TypeScript GraphQL client for Propeller eCommerce V2 Platform - works with React, Vue, Angular and all JavaScript frameworks",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|