washday-sdk 1.5.2 → 1.5.3
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/dist/api/index.js +1 -0
- package/dist/api/integrations/post.js +13 -0
- package/package.json +1 -1
- package/src/api/index.ts +1 -0
- package/src/api/integrations/post.ts +16 -0
- package/src/interfaces/Api.ts +1 -0
package/dist/api/index.js
CHANGED
|
@@ -338,6 +338,7 @@ const WashdayClient = function WashdayClient(apiToken, env = 'PROD') {
|
|
|
338
338
|
createMPAttempt: integrationsEndpoints.postModule.createMPAttempt,
|
|
339
339
|
cancelMPAttempt: integrationsEndpoints.postModule.cancelMPAttempt,
|
|
340
340
|
getMPAttemptStatus: integrationsEndpoints.getModule.getMPAttemptStatus,
|
|
341
|
+
updateMPTerminalOperationMode: integrationsEndpoints.postModule.updateMPTerminalOperationMode,
|
|
341
342
|
});
|
|
342
343
|
};
|
|
343
344
|
export default WashdayClient;
|
|
@@ -68,6 +68,19 @@ export const importAllMPTerminals = function (data) {
|
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
};
|
|
71
|
+
export const updateMPTerminalOperationMode = function (data) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
try {
|
|
74
|
+
const config = {
|
|
75
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
76
|
+
};
|
|
77
|
+
return yield this.axiosInstance.post(`${BASE_ROUTER}/mp/terminals/updateOperationMode`, data, config);
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
};
|
|
71
84
|
export const createMPAttempt = function (data) {
|
|
72
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
86
|
try {
|
package/package.json
CHANGED
package/src/api/index.ts
CHANGED
|
@@ -345,6 +345,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
345
345
|
createMPAttempt: integrationsEndpoints.postModule.createMPAttempt,
|
|
346
346
|
cancelMPAttempt: integrationsEndpoints.postModule.cancelMPAttempt,
|
|
347
347
|
getMPAttemptStatus: integrationsEndpoints.getModule.getMPAttemptStatus,
|
|
348
|
+
updateMPTerminalOperationMode: integrationsEndpoints.postModule.updateMPTerminalOperationMode,
|
|
348
349
|
});
|
|
349
350
|
} as any;
|
|
350
351
|
|
|
@@ -67,6 +67,22 @@ export const importAllMPTerminals = async function (this: WashdayClientInstance,
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
+
export const updateMPTerminalOperationMode = async function (this: WashdayClientInstance, data: {
|
|
71
|
+
storeId: string;
|
|
72
|
+
mp_terminal_id: string;
|
|
73
|
+
operatingMode: string;
|
|
74
|
+
}): Promise<any> {
|
|
75
|
+
try {
|
|
76
|
+
const config = {
|
|
77
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
78
|
+
};
|
|
79
|
+
return await this.axiosInstance.post(`${BASE_ROUTER}/mp/terminals/updateOperationMode`, data, config);
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
throw error;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
70
86
|
export const createMPAttempt = async function (this: WashdayClientInstance, data: {
|
|
71
87
|
orderId: string;
|
|
72
88
|
amount: number;
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -327,6 +327,7 @@ export interface WashdayClientInstance {
|
|
|
327
327
|
createMPAttempt: typeof integrationsEndpoints.postModule.createMPAttempt;
|
|
328
328
|
cancelMPAttempt: typeof integrationsEndpoints.postModule.cancelMPAttempt;
|
|
329
329
|
getMPAttemptStatus: typeof integrationsEndpoints.getModule.getMPAttemptStatus;
|
|
330
|
+
updateMPTerminalOperationMode: typeof integrationsEndpoints.postModule.updateMPTerminalOperationMode;
|
|
330
331
|
}
|
|
331
332
|
};
|
|
332
333
|
}
|