@figuredev/orders-sdk
Advanced tools
Comparing version 0.16.0 to 0.16.1
@@ -75,2 +75,46 @@ "use strict"; | ||
})); | ||
it(".getOrdersPreviews with serviceId as array", () => __awaiter(void 0, void 0, void 0, function* () { | ||
; | ||
http_1.createHttpRequest.mockResolvedValueOnce({ | ||
data: { | ||
data: [], | ||
pagination: { | ||
next: null, | ||
previous: null, | ||
}, | ||
}, | ||
}); | ||
const data = yield client.getOrdersPreviews({ | ||
accountId: "account-1", | ||
locationId: "location-1", | ||
}, { | ||
limit: 10, | ||
serviceId: ["terminal-1"], | ||
customerId: "customer-1", | ||
externalUserId: "external-user-1", | ||
}); | ||
expect(http_1.createHttpRequest).toHaveBeenCalledWith({ | ||
baseURL: "https://some-url.com", | ||
headers: { | ||
"twbrds-account-id": "account-1", | ||
"twbrds-location-id": "location-1", | ||
"fgr-service-token": "some-secret-key", | ||
}, | ||
method: "GET", | ||
url: "/order/preview", | ||
params: { | ||
limit: 10, | ||
serviceId: ["terminal-1"], | ||
customerId: "customer-1", | ||
externalUserId: "external-user-1", | ||
}, | ||
}); | ||
expect(data).toEqual({ | ||
data: [], | ||
pagination: { | ||
next: null, | ||
previous: null, | ||
}, | ||
}); | ||
})); | ||
it(".getOrders", () => __awaiter(void 0, void 0, void 0, function* () { | ||
@@ -77,0 +121,0 @@ ; |
import { OrderDTO, OrderPreviewDTO } from "../order"; | ||
export declare type GetOrdersParams = { | ||
serviceId?: string; | ||
serviceId?: string | string[]; | ||
externalUserId?: string; | ||
@@ -5,0 +5,0 @@ customerId?: string; |
{ | ||
"name": "@figuredev/orders-sdk", | ||
"version": "0.16.0", | ||
"version": "0.16.1", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102644
1960