btrz-api-client 5.117.0 → 5.119.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/lib/client-standalone-min.js +1 -5
- package/lib/endpoints/accounts/shifts.js +18 -1
- package/lib/endpoints/operations/vouchers.js +2 -3
- package/package.json +1 -1
- package/src/endpoints/accounts/shifts.js +12 -2
- package/src/endpoints/operations/vouchers.js +2 -2
- package/test/endpoints/accounts/shifts.test.js +7 -0
- package/types/client.d.ts +10 -2
- package/types/constants.d.ts +1 -1
- package/types/endpoints/accounts/shifts.d.ts +9 -0
- package/types/endpoints/operations/vouchers.d.ts +1 -2
- package/types/initializedClient.d.ts +10 -2
- package/types/productionDefaults.d.ts +2 -2
|
@@ -330,6 +330,22 @@ function shiftsFactory(_ref) {
|
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
332
|
};
|
|
333
|
+
var purchaseLimitPayments = {
|
|
334
|
+
get: function get(_ref26) {
|
|
335
|
+
var token = _ref26.token,
|
|
336
|
+
jwtToken = _ref26.jwtToken,
|
|
337
|
+
locationId = _ref26.locationId,
|
|
338
|
+
query = _ref26.query,
|
|
339
|
+
headers = _ref26.headers;
|
|
340
|
+
|
|
341
|
+
return client.get("/shifts/" + locationId + "/purchase-limit-payments", {
|
|
342
|
+
headers: authorizationHeaders({
|
|
343
|
+
token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
|
|
344
|
+
}),
|
|
345
|
+
params: query
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
};
|
|
333
349
|
|
|
334
350
|
return {
|
|
335
351
|
all: all,
|
|
@@ -350,7 +366,8 @@ function shiftsFactory(_ref) {
|
|
|
350
366
|
deposits: deposits,
|
|
351
367
|
manualTickets: manualTickets,
|
|
352
368
|
locationClosures: locationClosures,
|
|
353
|
-
startingBalances: startingBalances
|
|
369
|
+
startingBalances: startingBalances,
|
|
370
|
+
purchaseLimitPayments: purchaseLimitPayments
|
|
354
371
|
};
|
|
355
372
|
}
|
|
356
373
|
|
|
@@ -14,14 +14,13 @@ function vouchersFactory(_ref) {
|
|
|
14
14
|
_ref2$query = _ref2.query,
|
|
15
15
|
query = _ref2$query === undefined ? {} : _ref2$query,
|
|
16
16
|
_ref2$voucher = _ref2.voucher,
|
|
17
|
-
voucher = _ref2$voucher === undefined ? {} : _ref2$voucher
|
|
18
|
-
user = _ref2.user;
|
|
17
|
+
voucher = _ref2$voucher === undefined ? {} : _ref2$voucher;
|
|
19
18
|
|
|
20
19
|
return client({
|
|
21
20
|
url: "/vouchers",
|
|
22
21
|
method: "POST",
|
|
23
22
|
params: query,
|
|
24
|
-
data:
|
|
23
|
+
data: voucher,
|
|
25
24
|
headers: authorizationHeaders({
|
|
26
25
|
jwtToken: jwtToken,
|
|
27
26
|
token: token,
|
package/package.json
CHANGED
|
@@ -198,7 +198,16 @@ function shiftsFactory({client, internalAuthTokenProvider}) {
|
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
|
|
201
|
+
const purchaseLimitPayments = {
|
|
202
|
+
get({token, jwtToken, locationId, query, headers}) {
|
|
203
|
+
return client.get(`/shifts/${locationId}/purchase-limit-payments`, {
|
|
204
|
+
headers: authorizationHeaders({
|
|
205
|
+
token, jwtToken, internalAuthTokenProvider, headers
|
|
206
|
+
}),
|
|
207
|
+
params: query
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
};
|
|
202
211
|
|
|
203
212
|
return {
|
|
204
213
|
all,
|
|
@@ -219,7 +228,8 @@ function shiftsFactory({client, internalAuthTokenProvider}) {
|
|
|
219
228
|
deposits,
|
|
220
229
|
manualTickets,
|
|
221
230
|
locationClosures,
|
|
222
|
-
startingBalances
|
|
231
|
+
startingBalances,
|
|
232
|
+
purchaseLimitPayments
|
|
223
233
|
};
|
|
224
234
|
}
|
|
225
235
|
|
|
@@ -6,13 +6,13 @@ function vouchersFactory({
|
|
|
6
6
|
client, internalAuthTokenProvider
|
|
7
7
|
}) {
|
|
8
8
|
function create({
|
|
9
|
-
jwtToken, token, headers, query = {}, voucher = {}
|
|
9
|
+
jwtToken, token, headers, query = {}, voucher = {}
|
|
10
10
|
}) {
|
|
11
11
|
return client({
|
|
12
12
|
url: "/vouchers",
|
|
13
13
|
method: "POST",
|
|
14
14
|
params: query,
|
|
15
|
-
data:
|
|
15
|
+
data: voucher,
|
|
16
16
|
headers: authorizationHeaders({
|
|
17
17
|
jwtToken,
|
|
18
18
|
token,
|
|
@@ -183,4 +183,11 @@ describe("accounts/shifts", () => {
|
|
|
183
183
|
axiosMock.onPost(`/shifts/${shiftId}/starting-balance`).reply(expectRequest({statusCode: 200, token, jwtToken, body: startingBalance}));
|
|
184
184
|
return api.accounts.shifts.startingBalances.create({token, jwtToken, shiftId, startingBalance});
|
|
185
185
|
});
|
|
186
|
+
|
|
187
|
+
it("should get the shift purchase limit payments", () => {
|
|
188
|
+
const locationId = "locationId1";
|
|
189
|
+
const query = {day: "2020-01-01"};
|
|
190
|
+
axiosMock.onGet(`/shifts/${locationId}/purchase-limit-payments`).reply(expectRequest({statusCode: 200, token, query}));
|
|
191
|
+
return api.accounts.shifts.purchaseLimitPayments.get({token, jwtToken, locationId, query});
|
|
192
|
+
});
|
|
186
193
|
});
|
package/types/client.d.ts
CHANGED
|
@@ -2078,6 +2078,15 @@ export function createApiClient(options: {
|
|
|
2078
2078
|
headers: any;
|
|
2079
2079
|
}): any;
|
|
2080
2080
|
};
|
|
2081
|
+
purchaseLimitPayments: {
|
|
2082
|
+
get({ token, jwtToken, locationId, query, headers }: {
|
|
2083
|
+
token: any;
|
|
2084
|
+
jwtToken: any;
|
|
2085
|
+
locationId: any;
|
|
2086
|
+
query: any;
|
|
2087
|
+
headers: any;
|
|
2088
|
+
}): any;
|
|
2089
|
+
};
|
|
2081
2090
|
};
|
|
2082
2091
|
shiftSettings: {
|
|
2083
2092
|
get: ({ token, jwtToken, query, headers }: {
|
|
@@ -2910,13 +2919,12 @@ export function createApiClient(options: {
|
|
|
2910
2919
|
}) => any;
|
|
2911
2920
|
};
|
|
2912
2921
|
vouchers: {
|
|
2913
|
-
create: ({ jwtToken, token, headers, query, voucher
|
|
2922
|
+
create: ({ jwtToken, token, headers, query, voucher }: {
|
|
2914
2923
|
jwtToken: any;
|
|
2915
2924
|
token: any;
|
|
2916
2925
|
headers: any;
|
|
2917
2926
|
query?: {};
|
|
2918
2927
|
voucher?: {};
|
|
2919
|
-
user: any;
|
|
2920
2928
|
}) => any;
|
|
2921
2929
|
};
|
|
2922
2930
|
parcelManifests: {
|
package/types/constants.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const INTERNAL_AUTH_TOKEN_SYMBOL: string;
|
|
@@ -184,4 +184,13 @@ declare function shiftsFactory({ client, internalAuthTokenProvider }: {
|
|
|
184
184
|
headers: any;
|
|
185
185
|
}): any;
|
|
186
186
|
};
|
|
187
|
+
purchaseLimitPayments: {
|
|
188
|
+
get({ token, jwtToken, locationId, query, headers }: {
|
|
189
|
+
token: any;
|
|
190
|
+
jwtToken: any;
|
|
191
|
+
locationId: any;
|
|
192
|
+
query: any;
|
|
193
|
+
headers: any;
|
|
194
|
+
}): any;
|
|
195
|
+
};
|
|
187
196
|
};
|
|
@@ -3,12 +3,11 @@ declare function vouchersFactory({ client, internalAuthTokenProvider }: {
|
|
|
3
3
|
client: any;
|
|
4
4
|
internalAuthTokenProvider: any;
|
|
5
5
|
}): {
|
|
6
|
-
create: ({ jwtToken, token, headers, query, voucher
|
|
6
|
+
create: ({ jwtToken, token, headers, query, voucher }: {
|
|
7
7
|
jwtToken: any;
|
|
8
8
|
token: any;
|
|
9
9
|
headers: any;
|
|
10
10
|
query?: {};
|
|
11
11
|
voucher?: {};
|
|
12
|
-
user: any;
|
|
13
12
|
}) => any;
|
|
14
13
|
};
|
|
@@ -2032,6 +2032,15 @@ declare const _exports: {
|
|
|
2032
2032
|
headers: any;
|
|
2033
2033
|
}): any;
|
|
2034
2034
|
};
|
|
2035
|
+
purchaseLimitPayments: {
|
|
2036
|
+
get({ token, jwtToken, locationId, query, headers }: {
|
|
2037
|
+
token: any;
|
|
2038
|
+
jwtToken: any;
|
|
2039
|
+
locationId: any;
|
|
2040
|
+
query: any;
|
|
2041
|
+
headers: any;
|
|
2042
|
+
}): any;
|
|
2043
|
+
};
|
|
2035
2044
|
};
|
|
2036
2045
|
shiftSettings: {
|
|
2037
2046
|
get: ({ token, jwtToken, query, headers }: {
|
|
@@ -2864,13 +2873,12 @@ declare const _exports: {
|
|
|
2864
2873
|
}) => any;
|
|
2865
2874
|
};
|
|
2866
2875
|
vouchers: {
|
|
2867
|
-
create: ({ jwtToken, token, headers, query, voucher
|
|
2876
|
+
create: ({ jwtToken, token, headers, query, voucher }: {
|
|
2868
2877
|
jwtToken: any;
|
|
2869
2878
|
token: any;
|
|
2870
2879
|
headers: any;
|
|
2871
2880
|
query?: {};
|
|
2872
2881
|
voucher?: {};
|
|
2873
|
-
user: any;
|
|
2874
2882
|
}) => any;
|
|
2875
2883
|
};
|
|
2876
2884
|
parcelManifests: {
|