@munchi_oy/core 2.0.3 → 2.0.5
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/generated/api.d.ts +920 -3
- package/dist/generated/api.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/generated/api.ts +1434 -3
- package/package.json +15 -13
- package/src/version.ts +1 -1
package/generated/api.ts
CHANGED
|
@@ -154,6 +154,68 @@ export const ActionsEnum = {
|
|
|
154
154
|
export type ActionsEnum = typeof ActionsEnum[keyof typeof ActionsEnum];
|
|
155
155
|
|
|
156
156
|
|
|
157
|
+
/**
|
|
158
|
+
*
|
|
159
|
+
* @export
|
|
160
|
+
* @interface AddEmployeeDto
|
|
161
|
+
*/
|
|
162
|
+
export interface AddEmployeeDto {
|
|
163
|
+
/**
|
|
164
|
+
* The employee\'s phone, in international format. Null clears it.
|
|
165
|
+
* @type {object}
|
|
166
|
+
* @memberof AddEmployeeDto
|
|
167
|
+
*/
|
|
168
|
+
'phone'?: object | null;
|
|
169
|
+
/**
|
|
170
|
+
* A photo of the employee, shown on the till\'s PIN screen. Null clears it.
|
|
171
|
+
* @type {object}
|
|
172
|
+
* @memberof AddEmployeeDto
|
|
173
|
+
*/
|
|
174
|
+
'photoUrl'?: object | null;
|
|
175
|
+
/**
|
|
176
|
+
* The employee\'s name, as the till shows it
|
|
177
|
+
* @type {string}
|
|
178
|
+
* @memberof AddEmployeeDto
|
|
179
|
+
*/
|
|
180
|
+
'name': string;
|
|
181
|
+
/**
|
|
182
|
+
* The employee\'s 4-digit PIN, unique among every employee (active or inactive) and passcode of the merchant, because the till looks a PIN up across it. Never answered back.
|
|
183
|
+
* @type {string}
|
|
184
|
+
* @memberof AddEmployeeDto
|
|
185
|
+
*/
|
|
186
|
+
'pin': string;
|
|
187
|
+
/**
|
|
188
|
+
* The employee\'s e-mail, unique among the merchant\'s employees: the same person\'s dashboard login is invited with it (D145). Saved in lower case.
|
|
189
|
+
* @type {string}
|
|
190
|
+
* @memberof AddEmployeeDto
|
|
191
|
+
*/
|
|
192
|
+
'email': string;
|
|
193
|
+
/**
|
|
194
|
+
* The venues the employee works at, each with the employee\'s role there; at least one, each venue once. Every venue must be on the signed-in account and of the venue\'s merchant.
|
|
195
|
+
* @type {Array<EmployeeAssignmentDto>}
|
|
196
|
+
* @memberof AddEmployeeDto
|
|
197
|
+
*/
|
|
198
|
+
'assignments': Array<EmployeeAssignmentDto>;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
* @export
|
|
203
|
+
* @interface AddEmployeeRoleDto
|
|
204
|
+
*/
|
|
205
|
+
export interface AddEmployeeRoleDto {
|
|
206
|
+
/**
|
|
207
|
+
* The role\'s name, as the staff see it on the till; unique at the venue
|
|
208
|
+
* @type {string}
|
|
209
|
+
* @memberof AddEmployeeRoleDto
|
|
210
|
+
*/
|
|
211
|
+
'name': string;
|
|
212
|
+
/**
|
|
213
|
+
* The POS keys the role holds, from GET /api/v1/pos-permissions. A group\'s `::*` key holds every key of the group, those added later included. Keys a role does not list are not held.
|
|
214
|
+
* @type {Array<PosPermission>}
|
|
215
|
+
* @memberof AddEmployeeRoleDto
|
|
216
|
+
*/
|
|
217
|
+
'permissionKeys': Array<PosPermission>;
|
|
218
|
+
}
|
|
157
219
|
/**
|
|
158
220
|
*
|
|
159
221
|
* @export
|
|
@@ -2315,6 +2377,70 @@ export const CdsSessionRole = {
|
|
|
2315
2377
|
export type CdsSessionRole = typeof CdsSessionRole[keyof typeof CdsSessionRole];
|
|
2316
2378
|
|
|
2317
2379
|
|
|
2380
|
+
/**
|
|
2381
|
+
*
|
|
2382
|
+
* @export
|
|
2383
|
+
* @interface ChangeEmployeeDto
|
|
2384
|
+
*/
|
|
2385
|
+
export interface ChangeEmployeeDto {
|
|
2386
|
+
/**
|
|
2387
|
+
* The employee\'s phone, in international format. Null clears it.
|
|
2388
|
+
* @type {object}
|
|
2389
|
+
* @memberof ChangeEmployeeDto
|
|
2390
|
+
*/
|
|
2391
|
+
'phone'?: object | null;
|
|
2392
|
+
/**
|
|
2393
|
+
* A photo of the employee, shown on the till\'s PIN screen. Null clears it.
|
|
2394
|
+
* @type {object}
|
|
2395
|
+
* @memberof ChangeEmployeeDto
|
|
2396
|
+
*/
|
|
2397
|
+
'photoUrl'?: object | null;
|
|
2398
|
+
/**
|
|
2399
|
+
* The employee\'s new name. Absent: the name stays.
|
|
2400
|
+
* @type {string}
|
|
2401
|
+
* @memberof ChangeEmployeeDto
|
|
2402
|
+
*/
|
|
2403
|
+
'name'?: string;
|
|
2404
|
+
/**
|
|
2405
|
+
* A new PIN. The employee\'s 4-digit PIN, unique among every employee (active or inactive) and passcode of the merchant, because the till looks a PIN up across it. Never answered back. Absent: the PIN stays.
|
|
2406
|
+
* @type {string}
|
|
2407
|
+
* @memberof ChangeEmployeeDto
|
|
2408
|
+
*/
|
|
2409
|
+
'pin'?: string;
|
|
2410
|
+
/**
|
|
2411
|
+
* A new e-mail. The employee\'s e-mail, unique among the merchant\'s employees: the same person\'s dashboard login is invited with it (D145). Saved in lower case. Absent: the e-mail stays; it is never cleared.
|
|
2412
|
+
* @type {string}
|
|
2413
|
+
* @memberof ChangeEmployeeDto
|
|
2414
|
+
*/
|
|
2415
|
+
'email'?: string;
|
|
2416
|
+
/**
|
|
2417
|
+
*
|
|
2418
|
+
* @type {Status}
|
|
2419
|
+
* @memberof ChangeEmployeeDto
|
|
2420
|
+
*/
|
|
2421
|
+
'status'?: Status;
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
|
|
2425
|
+
/**
|
|
2426
|
+
*
|
|
2427
|
+
* @export
|
|
2428
|
+
* @interface ChangeEmployeeRoleDto
|
|
2429
|
+
*/
|
|
2430
|
+
export interface ChangeEmployeeRoleDto {
|
|
2431
|
+
/**
|
|
2432
|
+
* The role\'s new name; unique at the venue. Absent: the name stays.
|
|
2433
|
+
* @type {string}
|
|
2434
|
+
* @memberof ChangeEmployeeRoleDto
|
|
2435
|
+
*/
|
|
2436
|
+
'name'?: string;
|
|
2437
|
+
/**
|
|
2438
|
+
* The POS keys the role holds, from GET /api/v1/pos-permissions. A group\'s `::*` key holds every key of the group, those added later included. Keys a role does not list are not held. Sent, they replace every key the role had. Absent: the keys stay.
|
|
2439
|
+
* @type {Array<PosPermission>}
|
|
2440
|
+
* @memberof ChangeEmployeeRoleDto
|
|
2441
|
+
*/
|
|
2442
|
+
'permissionKeys'?: Array<PosPermission>;
|
|
2443
|
+
}
|
|
2318
2444
|
/**
|
|
2319
2445
|
*
|
|
2320
2446
|
* @export
|
|
@@ -6050,6 +6176,25 @@ export interface DisplayInitResponseDto {
|
|
|
6050
6176
|
*/
|
|
6051
6177
|
'ablyTokenRequest': object;
|
|
6052
6178
|
}
|
|
6179
|
+
/**
|
|
6180
|
+
*
|
|
6181
|
+
* @export
|
|
6182
|
+
* @interface EmployeeAssignmentDto
|
|
6183
|
+
*/
|
|
6184
|
+
export interface EmployeeAssignmentDto {
|
|
6185
|
+
/**
|
|
6186
|
+
* A venue the employee works at: its orderingBusinessId
|
|
6187
|
+
* @type {number}
|
|
6188
|
+
* @memberof EmployeeAssignmentDto
|
|
6189
|
+
*/
|
|
6190
|
+
'businessId': number;
|
|
6191
|
+
/**
|
|
6192
|
+
* The employee\'s role at that venue: one of that venue\'s roles
|
|
6193
|
+
* @type {string}
|
|
6194
|
+
* @memberof EmployeeAssignmentDto
|
|
6195
|
+
*/
|
|
6196
|
+
'roleId': string;
|
|
6197
|
+
}
|
|
6053
6198
|
/**
|
|
6054
6199
|
*
|
|
6055
6200
|
* @export
|
|
@@ -6063,6 +6208,107 @@ export interface EmployeeEventProcessedDto {
|
|
|
6063
6208
|
*/
|
|
6064
6209
|
'message': string;
|
|
6065
6210
|
}
|
|
6211
|
+
/**
|
|
6212
|
+
*
|
|
6213
|
+
* @export
|
|
6214
|
+
* @interface EmployeePageResponseDto
|
|
6215
|
+
*/
|
|
6216
|
+
export interface EmployeePageResponseDto {
|
|
6217
|
+
/**
|
|
6218
|
+
* The page\'s employees, ordered by name
|
|
6219
|
+
* @type {Array<EmployeeResponseDto>}
|
|
6220
|
+
* @memberof EmployeePageResponseDto
|
|
6221
|
+
*/
|
|
6222
|
+
'employees': Array<EmployeeResponseDto>;
|
|
6223
|
+
/**
|
|
6224
|
+
* The cursor of the next page; null on the last page
|
|
6225
|
+
* @type {string}
|
|
6226
|
+
* @memberof EmployeePageResponseDto
|
|
6227
|
+
*/
|
|
6228
|
+
'nextCursor': string | null;
|
|
6229
|
+
}
|
|
6230
|
+
/**
|
|
6231
|
+
*
|
|
6232
|
+
* @export
|
|
6233
|
+
* @interface EmployeeResponseDto
|
|
6234
|
+
*/
|
|
6235
|
+
export interface EmployeeResponseDto {
|
|
6236
|
+
/**
|
|
6237
|
+
* The employee\'s id
|
|
6238
|
+
* @type {string}
|
|
6239
|
+
* @memberof EmployeeResponseDto
|
|
6240
|
+
*/
|
|
6241
|
+
'id': string;
|
|
6242
|
+
/**
|
|
6243
|
+
* The employee\'s name, as the till shows it
|
|
6244
|
+
* @type {string}
|
|
6245
|
+
* @memberof EmployeeResponseDto
|
|
6246
|
+
*/
|
|
6247
|
+
'name': string;
|
|
6248
|
+
/**
|
|
6249
|
+
*
|
|
6250
|
+
* @type {Status}
|
|
6251
|
+
* @memberof EmployeeResponseDto
|
|
6252
|
+
*/
|
|
6253
|
+
'status': Status;
|
|
6254
|
+
/**
|
|
6255
|
+
* The employee\'s e-mail, in lower case; null only for an employee added before e-mails were required (D145)
|
|
6256
|
+
* @type {string}
|
|
6257
|
+
* @memberof EmployeeResponseDto
|
|
6258
|
+
*/
|
|
6259
|
+
'email': string | null;
|
|
6260
|
+
/**
|
|
6261
|
+
* The employee\'s phone; null when none
|
|
6262
|
+
* @type {string}
|
|
6263
|
+
* @memberof EmployeeResponseDto
|
|
6264
|
+
*/
|
|
6265
|
+
'phone': string | null;
|
|
6266
|
+
/**
|
|
6267
|
+
* The employee\'s photo; null when none
|
|
6268
|
+
* @type {string}
|
|
6269
|
+
* @memberof EmployeeResponseDto
|
|
6270
|
+
*/
|
|
6271
|
+
'photoUrl': string | null;
|
|
6272
|
+
/**
|
|
6273
|
+
* Every venue of the merchant the employee works at, with their role there, ordered by venue. Empty for an employee added at this venue and not yet given a role.
|
|
6274
|
+
* @type {Array<EmployeeAssignmentDto>}
|
|
6275
|
+
* @memberof EmployeeResponseDto
|
|
6276
|
+
*/
|
|
6277
|
+
'assignments': Array<EmployeeAssignmentDto>;
|
|
6278
|
+
}
|
|
6279
|
+
|
|
6280
|
+
|
|
6281
|
+
/**
|
|
6282
|
+
*
|
|
6283
|
+
* @export
|
|
6284
|
+
* @interface EmployeeRoleResponseDto
|
|
6285
|
+
*/
|
|
6286
|
+
export interface EmployeeRoleResponseDto {
|
|
6287
|
+
/**
|
|
6288
|
+
* The role\'s id
|
|
6289
|
+
* @type {string}
|
|
6290
|
+
* @memberof EmployeeRoleResponseDto
|
|
6291
|
+
*/
|
|
6292
|
+
'id': string;
|
|
6293
|
+
/**
|
|
6294
|
+
* The role\'s name, as the staff see it on the till
|
|
6295
|
+
* @type {string}
|
|
6296
|
+
* @memberof EmployeeRoleResponseDto
|
|
6297
|
+
*/
|
|
6298
|
+
'name': string;
|
|
6299
|
+
/**
|
|
6300
|
+
* The POS keys the role holds. A key stored by an older back office that the POS no longer knows is left out.
|
|
6301
|
+
* @type {Array<PosPermission>}
|
|
6302
|
+
* @memberof EmployeeRoleResponseDto
|
|
6303
|
+
*/
|
|
6304
|
+
'permissionKeys': Array<PosPermission>;
|
|
6305
|
+
/**
|
|
6306
|
+
* How many employees hold the role at the venue; a role is removed only when none does
|
|
6307
|
+
* @type {number}
|
|
6308
|
+
* @memberof EmployeeRoleResponseDto
|
|
6309
|
+
*/
|
|
6310
|
+
'employeeCount': number;
|
|
6311
|
+
}
|
|
6066
6312
|
/**
|
|
6067
6313
|
*
|
|
6068
6314
|
* @export
|
|
@@ -6683,9 +6929,10 @@ export interface ExtendedProductDto {
|
|
|
6683
6929
|
*/
|
|
6684
6930
|
'images': string;
|
|
6685
6931
|
/**
|
|
6686
|
-
* SKU of the product
|
|
6932
|
+
* SKU of the product: its first one. Read skus instead
|
|
6687
6933
|
* @type {string}
|
|
6688
6934
|
* @memberof ExtendedProductDto
|
|
6935
|
+
* @deprecated
|
|
6689
6936
|
*/
|
|
6690
6937
|
'sku'?: string | null;
|
|
6691
6938
|
/**
|
|
@@ -6850,6 +7097,12 @@ export interface ExtendedProductDto {
|
|
|
6850
7097
|
* @memberof ExtendedProductDto
|
|
6851
7098
|
*/
|
|
6852
7099
|
'channel_configs': Array<ChannelConfig>;
|
|
7100
|
+
/**
|
|
7101
|
+
* Every SKU of the product, in order, the first being sku; absent where the product\'s SKUs are not read, such as on an order line
|
|
7102
|
+
* @type {Array<string>}
|
|
7103
|
+
* @memberof ExtendedProductDto
|
|
7104
|
+
*/
|
|
7105
|
+
'skus'?: Array<string>;
|
|
6853
7106
|
/**
|
|
6854
7107
|
* Default course ID assigned to this product
|
|
6855
7108
|
* @type {string}
|
|
@@ -18479,9 +18732,10 @@ export interface PosItemDto {
|
|
|
18479
18732
|
*/
|
|
18480
18733
|
'images': string;
|
|
18481
18734
|
/**
|
|
18482
|
-
* SKU of the product
|
|
18735
|
+
* SKU of the product: its first one. Read skus instead
|
|
18483
18736
|
* @type {string}
|
|
18484
18737
|
* @memberof PosItemDto
|
|
18738
|
+
* @deprecated
|
|
18485
18739
|
*/
|
|
18486
18740
|
'sku'?: string | null;
|
|
18487
18741
|
/**
|
|
@@ -18646,6 +18900,12 @@ export interface PosItemDto {
|
|
|
18646
18900
|
* @memberof PosItemDto
|
|
18647
18901
|
*/
|
|
18648
18902
|
'channel_configs': Array<ChannelConfig>;
|
|
18903
|
+
/**
|
|
18904
|
+
* Every SKU of the product, in order, the first being sku; absent where the product\'s SKUs are not read, such as on an order line
|
|
18905
|
+
* @type {Array<string>}
|
|
18906
|
+
* @memberof PosItemDto
|
|
18907
|
+
*/
|
|
18908
|
+
'skus'?: Array<string>;
|
|
18649
18909
|
/**
|
|
18650
18910
|
* Default course ID assigned to this product
|
|
18651
18911
|
* @type {string}
|
|
@@ -18993,11 +19253,18 @@ export interface PosMenuProductDto {
|
|
|
18993
19253
|
*/
|
|
18994
19254
|
'images': string;
|
|
18995
19255
|
/**
|
|
18996
|
-
* The product\'s stock-keeping code, or null when it has none
|
|
19256
|
+
* The product\'s first stock-keeping code, or null when it has none. Read skus instead
|
|
18997
19257
|
* @type {string}
|
|
18998
19258
|
* @memberof PosMenuProductDto
|
|
19259
|
+
* @deprecated
|
|
18999
19260
|
*/
|
|
19000
19261
|
'sku': string | null;
|
|
19262
|
+
/**
|
|
19263
|
+
* Every stock-keeping code of the product, in order, the first being sku; empty when it has none. Absent from an answer cached before the field existed: read sku then
|
|
19264
|
+
* @type {Array<string>}
|
|
19265
|
+
* @memberof PosMenuProductDto
|
|
19266
|
+
*/
|
|
19267
|
+
'skus'?: Array<string>;
|
|
19001
19268
|
/**
|
|
19002
19269
|
* The product\'s barcode, or null when it has none
|
|
19003
19270
|
* @type {string}
|
|
@@ -21623,6 +21890,26 @@ export interface ProductSkuResponseDto {
|
|
|
21623
21890
|
*/
|
|
21624
21891
|
'sku': string;
|
|
21625
21892
|
}
|
|
21893
|
+
/**
|
|
21894
|
+
*
|
|
21895
|
+
* @export
|
|
21896
|
+
* @interface ProductSkusResponseDto
|
|
21897
|
+
*/
|
|
21898
|
+
export interface ProductSkusResponseDto {
|
|
21899
|
+
/**
|
|
21900
|
+
* The first SKU Vendure saved, or null when the product has none. Read skus instead
|
|
21901
|
+
* @type {string}
|
|
21902
|
+
* @memberof ProductSkusResponseDto
|
|
21903
|
+
* @deprecated
|
|
21904
|
+
*/
|
|
21905
|
+
'sku': string | null;
|
|
21906
|
+
/**
|
|
21907
|
+
* Every SKU Vendure saved, trimmed, in order; empty when the product has none
|
|
21908
|
+
* @type {Array<string>}
|
|
21909
|
+
* @memberof ProductSkusResponseDto
|
|
21910
|
+
*/
|
|
21911
|
+
'skus': Array<string>;
|
|
21912
|
+
}
|
|
21626
21913
|
/**
|
|
21627
21914
|
*
|
|
21628
21915
|
* @export
|
|
@@ -25619,6 +25906,19 @@ export interface SendReportEmailDto {
|
|
|
25619
25906
|
}
|
|
25620
25907
|
|
|
25621
25908
|
|
|
25909
|
+
/**
|
|
25910
|
+
*
|
|
25911
|
+
* @export
|
|
25912
|
+
* @interface SetEmployeeRoleDto
|
|
25913
|
+
*/
|
|
25914
|
+
export interface SetEmployeeRoleDto {
|
|
25915
|
+
/**
|
|
25916
|
+
* The employee\'s role at the venue: one of the venue\'s roles. Replaces the role they had there.
|
|
25917
|
+
* @type {string}
|
|
25918
|
+
* @memberof SetEmployeeRoleDto
|
|
25919
|
+
*/
|
|
25920
|
+
'roleId': string;
|
|
25921
|
+
}
|
|
25622
25922
|
/**
|
|
25623
25923
|
*
|
|
25624
25924
|
* @export
|
|
@@ -30645,6 +30945,19 @@ export interface UpdateProductSkuDto {
|
|
|
30645
30945
|
*/
|
|
30646
30946
|
'sku': string;
|
|
30647
30947
|
}
|
|
30948
|
+
/**
|
|
30949
|
+
*
|
|
30950
|
+
* @export
|
|
30951
|
+
* @interface UpdateProductSkusDto
|
|
30952
|
+
*/
|
|
30953
|
+
export interface UpdateProductSkusDto {
|
|
30954
|
+
/**
|
|
30955
|
+
* Every SKU (label code) of the product, in order; they replace the ones it has. Each is trimmed, must keep one character and holds at most 255 characters. An empty list removes every SKU. A SKU is unique within the venue, compared without case
|
|
30956
|
+
* @type {Array<string>}
|
|
30957
|
+
* @memberof UpdateProductSkusDto
|
|
30958
|
+
*/
|
|
30959
|
+
'skus': Array<string>;
|
|
30960
|
+
}
|
|
30648
30961
|
/**
|
|
30649
30962
|
*
|
|
30650
30963
|
* @export
|
|
@@ -40563,6 +40876,1016 @@ export class DisplayApi extends BaseAPI implements DisplayApiInterface {
|
|
|
40563
40876
|
}
|
|
40564
40877
|
|
|
40565
40878
|
|
|
40879
|
+
/**
|
|
40880
|
+
* EmployeeRolesApi - axios parameter creator
|
|
40881
|
+
* @export
|
|
40882
|
+
*/
|
|
40883
|
+
export const EmployeeRolesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
40884
|
+
return {
|
|
40885
|
+
/**
|
|
40886
|
+
* A new role with the POS keys sent. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
40887
|
+
* @summary Add an employee role at the venue
|
|
40888
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
40889
|
+
* @param {AddEmployeeRoleDto} addEmployeeRoleDto
|
|
40890
|
+
* @param {*} [options] Override http request option.
|
|
40891
|
+
* @throws {RequiredError}
|
|
40892
|
+
*/
|
|
40893
|
+
addEmployeeRole: async (businessId: number, addEmployeeRoleDto: AddEmployeeRoleDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
40894
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
40895
|
+
assertParamExists('addEmployeeRole', 'businessId', businessId)
|
|
40896
|
+
// verify required parameter 'addEmployeeRoleDto' is not null or undefined
|
|
40897
|
+
assertParamExists('addEmployeeRole', 'addEmployeeRoleDto', addEmployeeRoleDto)
|
|
40898
|
+
const localVarPath = `/api/v2/businesses/{businessId}/employee-roles`
|
|
40899
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)));
|
|
40900
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
40901
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
40902
|
+
let baseOptions;
|
|
40903
|
+
if (configuration) {
|
|
40904
|
+
baseOptions = configuration.baseOptions;
|
|
40905
|
+
}
|
|
40906
|
+
|
|
40907
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
40908
|
+
const localVarHeaderParameter = {} as any;
|
|
40909
|
+
const localVarQueryParameter = {} as any;
|
|
40910
|
+
|
|
40911
|
+
// authentication JWT-auth required
|
|
40912
|
+
// http bearer authentication required
|
|
40913
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
40914
|
+
|
|
40915
|
+
|
|
40916
|
+
|
|
40917
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
40918
|
+
|
|
40919
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
40920
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
40921
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
40922
|
+
localVarRequestOptions.data = serializeDataIfNeeded(addEmployeeRoleDto, localVarRequestOptions, configuration)
|
|
40923
|
+
|
|
40924
|
+
return {
|
|
40925
|
+
url: toPathString(localVarUrlObj),
|
|
40926
|
+
options: localVarRequestOptions,
|
|
40927
|
+
};
|
|
40928
|
+
},
|
|
40929
|
+
/**
|
|
40930
|
+
* Adds each starter role (Cashier, Waiter, Manager) whose name no role of the venue has, all together, so a venue never starts from an empty list. The restaurant changes them like any other role. Calling it again adds nothing new. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
40931
|
+
* @summary Add the starter employee roles at the venue
|
|
40932
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
40933
|
+
* @param {*} [options] Override http request option.
|
|
40934
|
+
* @throws {RequiredError}
|
|
40935
|
+
*/
|
|
40936
|
+
addStarterEmployeeRoles: async (businessId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
40937
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
40938
|
+
assertParamExists('addStarterEmployeeRoles', 'businessId', businessId)
|
|
40939
|
+
const localVarPath = `/api/v2/businesses/{businessId}/employee-roles/starter`
|
|
40940
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)));
|
|
40941
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
40942
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
40943
|
+
let baseOptions;
|
|
40944
|
+
if (configuration) {
|
|
40945
|
+
baseOptions = configuration.baseOptions;
|
|
40946
|
+
}
|
|
40947
|
+
|
|
40948
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
40949
|
+
const localVarHeaderParameter = {} as any;
|
|
40950
|
+
const localVarQueryParameter = {} as any;
|
|
40951
|
+
|
|
40952
|
+
// authentication JWT-auth required
|
|
40953
|
+
// http bearer authentication required
|
|
40954
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
40955
|
+
|
|
40956
|
+
|
|
40957
|
+
|
|
40958
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
40959
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
40960
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
40961
|
+
|
|
40962
|
+
return {
|
|
40963
|
+
url: toPathString(localVarUrlObj),
|
|
40964
|
+
options: localVarRequestOptions,
|
|
40965
|
+
};
|
|
40966
|
+
},
|
|
40967
|
+
/**
|
|
40968
|
+
* Renames the role, replaces its POS keys, or both; a field not sent stays. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
40969
|
+
* @summary Change an employee role of the venue
|
|
40970
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
40971
|
+
* @param {string} roleId The role\'s id, one of the venue\'s
|
|
40972
|
+
* @param {ChangeEmployeeRoleDto} changeEmployeeRoleDto
|
|
40973
|
+
* @param {*} [options] Override http request option.
|
|
40974
|
+
* @throws {RequiredError}
|
|
40975
|
+
*/
|
|
40976
|
+
changeEmployeeRole: async (businessId: number, roleId: string, changeEmployeeRoleDto: ChangeEmployeeRoleDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
40977
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
40978
|
+
assertParamExists('changeEmployeeRole', 'businessId', businessId)
|
|
40979
|
+
// verify required parameter 'roleId' is not null or undefined
|
|
40980
|
+
assertParamExists('changeEmployeeRole', 'roleId', roleId)
|
|
40981
|
+
// verify required parameter 'changeEmployeeRoleDto' is not null or undefined
|
|
40982
|
+
assertParamExists('changeEmployeeRole', 'changeEmployeeRoleDto', changeEmployeeRoleDto)
|
|
40983
|
+
const localVarPath = `/api/v2/businesses/{businessId}/employee-roles/{roleId}`
|
|
40984
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)))
|
|
40985
|
+
.replace(`{${"roleId"}}`, encodeURIComponent(String(roleId)));
|
|
40986
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
40987
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
40988
|
+
let baseOptions;
|
|
40989
|
+
if (configuration) {
|
|
40990
|
+
baseOptions = configuration.baseOptions;
|
|
40991
|
+
}
|
|
40992
|
+
|
|
40993
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
40994
|
+
const localVarHeaderParameter = {} as any;
|
|
40995
|
+
const localVarQueryParameter = {} as any;
|
|
40996
|
+
|
|
40997
|
+
// authentication JWT-auth required
|
|
40998
|
+
// http bearer authentication required
|
|
40999
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
41000
|
+
|
|
41001
|
+
|
|
41002
|
+
|
|
41003
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
41004
|
+
|
|
41005
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41006
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41007
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41008
|
+
localVarRequestOptions.data = serializeDataIfNeeded(changeEmployeeRoleDto, localVarRequestOptions, configuration)
|
|
41009
|
+
|
|
41010
|
+
return {
|
|
41011
|
+
url: toPathString(localVarUrlObj),
|
|
41012
|
+
options: localVarRequestOptions,
|
|
41013
|
+
};
|
|
41014
|
+
},
|
|
41015
|
+
/**
|
|
41016
|
+
* What each role lets the person at the till do, for the back office (D144). Read from the database every time, ordered by name; a venue keeps at most 100 roles.
|
|
41017
|
+
* @summary List the venue\'s employee roles
|
|
41018
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41019
|
+
* @param {*} [options] Override http request option.
|
|
41020
|
+
* @throws {RequiredError}
|
|
41021
|
+
*/
|
|
41022
|
+
listEmployeeRoles: async (businessId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41023
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
41024
|
+
assertParamExists('listEmployeeRoles', 'businessId', businessId)
|
|
41025
|
+
const localVarPath = `/api/v2/businesses/{businessId}/employee-roles`
|
|
41026
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)));
|
|
41027
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41028
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41029
|
+
let baseOptions;
|
|
41030
|
+
if (configuration) {
|
|
41031
|
+
baseOptions = configuration.baseOptions;
|
|
41032
|
+
}
|
|
41033
|
+
|
|
41034
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
41035
|
+
const localVarHeaderParameter = {} as any;
|
|
41036
|
+
const localVarQueryParameter = {} as any;
|
|
41037
|
+
|
|
41038
|
+
// authentication JWT-auth required
|
|
41039
|
+
// http bearer authentication required
|
|
41040
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
41041
|
+
|
|
41042
|
+
|
|
41043
|
+
|
|
41044
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41045
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41046
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41047
|
+
|
|
41048
|
+
return {
|
|
41049
|
+
url: toPathString(localVarUrlObj),
|
|
41050
|
+
options: localVarRequestOptions,
|
|
41051
|
+
};
|
|
41052
|
+
},
|
|
41053
|
+
/**
|
|
41054
|
+
* Only a role no employee holds is removed (D144); give its employees another role first. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41055
|
+
* @summary Remove an employee role of the venue
|
|
41056
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41057
|
+
* @param {string} roleId The role\'s id, one of the venue\'s
|
|
41058
|
+
* @param {*} [options] Override http request option.
|
|
41059
|
+
* @throws {RequiredError}
|
|
41060
|
+
*/
|
|
41061
|
+
removeEmployeeRole: async (businessId: number, roleId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41062
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
41063
|
+
assertParamExists('removeEmployeeRole', 'businessId', businessId)
|
|
41064
|
+
// verify required parameter 'roleId' is not null or undefined
|
|
41065
|
+
assertParamExists('removeEmployeeRole', 'roleId', roleId)
|
|
41066
|
+
const localVarPath = `/api/v2/businesses/{businessId}/employee-roles/{roleId}`
|
|
41067
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)))
|
|
41068
|
+
.replace(`{${"roleId"}}`, encodeURIComponent(String(roleId)));
|
|
41069
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41070
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41071
|
+
let baseOptions;
|
|
41072
|
+
if (configuration) {
|
|
41073
|
+
baseOptions = configuration.baseOptions;
|
|
41074
|
+
}
|
|
41075
|
+
|
|
41076
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
41077
|
+
const localVarHeaderParameter = {} as any;
|
|
41078
|
+
const localVarQueryParameter = {} as any;
|
|
41079
|
+
|
|
41080
|
+
// authentication JWT-auth required
|
|
41081
|
+
// http bearer authentication required
|
|
41082
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
41083
|
+
|
|
41084
|
+
|
|
41085
|
+
|
|
41086
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41087
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41088
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41089
|
+
|
|
41090
|
+
return {
|
|
41091
|
+
url: toPathString(localVarUrlObj),
|
|
41092
|
+
options: localVarRequestOptions,
|
|
41093
|
+
};
|
|
41094
|
+
},
|
|
41095
|
+
}
|
|
41096
|
+
};
|
|
41097
|
+
|
|
41098
|
+
/**
|
|
41099
|
+
* EmployeeRolesApi - functional programming interface
|
|
41100
|
+
* @export
|
|
41101
|
+
*/
|
|
41102
|
+
export const EmployeeRolesApiFp = function(configuration?: Configuration) {
|
|
41103
|
+
const localVarAxiosParamCreator = EmployeeRolesApiAxiosParamCreator(configuration)
|
|
41104
|
+
return {
|
|
41105
|
+
/**
|
|
41106
|
+
* A new role with the POS keys sent. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41107
|
+
* @summary Add an employee role at the venue
|
|
41108
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41109
|
+
* @param {AddEmployeeRoleDto} addEmployeeRoleDto
|
|
41110
|
+
* @param {*} [options] Override http request option.
|
|
41111
|
+
* @throws {RequiredError}
|
|
41112
|
+
*/
|
|
41113
|
+
async addEmployeeRole(businessId: number, addEmployeeRoleDto: AddEmployeeRoleDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmployeeRoleResponseDto>> {
|
|
41114
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.addEmployeeRole(businessId, addEmployeeRoleDto, options);
|
|
41115
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41116
|
+
},
|
|
41117
|
+
/**
|
|
41118
|
+
* Adds each starter role (Cashier, Waiter, Manager) whose name no role of the venue has, all together, so a venue never starts from an empty list. The restaurant changes them like any other role. Calling it again adds nothing new. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41119
|
+
* @summary Add the starter employee roles at the venue
|
|
41120
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41121
|
+
* @param {*} [options] Override http request option.
|
|
41122
|
+
* @throws {RequiredError}
|
|
41123
|
+
*/
|
|
41124
|
+
async addStarterEmployeeRoles(businessId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<EmployeeRoleResponseDto>>> {
|
|
41125
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.addStarterEmployeeRoles(businessId, options);
|
|
41126
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41127
|
+
},
|
|
41128
|
+
/**
|
|
41129
|
+
* Renames the role, replaces its POS keys, or both; a field not sent stays. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41130
|
+
* @summary Change an employee role of the venue
|
|
41131
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41132
|
+
* @param {string} roleId The role\'s id, one of the venue\'s
|
|
41133
|
+
* @param {ChangeEmployeeRoleDto} changeEmployeeRoleDto
|
|
41134
|
+
* @param {*} [options] Override http request option.
|
|
41135
|
+
* @throws {RequiredError}
|
|
41136
|
+
*/
|
|
41137
|
+
async changeEmployeeRole(businessId: number, roleId: string, changeEmployeeRoleDto: ChangeEmployeeRoleDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmployeeRoleResponseDto>> {
|
|
41138
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.changeEmployeeRole(businessId, roleId, changeEmployeeRoleDto, options);
|
|
41139
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41140
|
+
},
|
|
41141
|
+
/**
|
|
41142
|
+
* What each role lets the person at the till do, for the back office (D144). Read from the database every time, ordered by name; a venue keeps at most 100 roles.
|
|
41143
|
+
* @summary List the venue\'s employee roles
|
|
41144
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41145
|
+
* @param {*} [options] Override http request option.
|
|
41146
|
+
* @throws {RequiredError}
|
|
41147
|
+
*/
|
|
41148
|
+
async listEmployeeRoles(businessId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<EmployeeRoleResponseDto>>> {
|
|
41149
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listEmployeeRoles(businessId, options);
|
|
41150
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41151
|
+
},
|
|
41152
|
+
/**
|
|
41153
|
+
* Only a role no employee holds is removed (D144); give its employees another role first. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41154
|
+
* @summary Remove an employee role of the venue
|
|
41155
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41156
|
+
* @param {string} roleId The role\'s id, one of the venue\'s
|
|
41157
|
+
* @param {*} [options] Override http request option.
|
|
41158
|
+
* @throws {RequiredError}
|
|
41159
|
+
*/
|
|
41160
|
+
async removeEmployeeRole(businessId: number, roleId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
41161
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeEmployeeRole(businessId, roleId, options);
|
|
41162
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41163
|
+
},
|
|
41164
|
+
}
|
|
41165
|
+
};
|
|
41166
|
+
|
|
41167
|
+
/**
|
|
41168
|
+
* EmployeeRolesApi - factory interface
|
|
41169
|
+
* @export
|
|
41170
|
+
*/
|
|
41171
|
+
export const EmployeeRolesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
41172
|
+
const localVarFp = EmployeeRolesApiFp(configuration)
|
|
41173
|
+
return {
|
|
41174
|
+
/**
|
|
41175
|
+
* A new role with the POS keys sent. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41176
|
+
* @summary Add an employee role at the venue
|
|
41177
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41178
|
+
* @param {AddEmployeeRoleDto} addEmployeeRoleDto
|
|
41179
|
+
* @param {*} [options] Override http request option.
|
|
41180
|
+
* @throws {RequiredError}
|
|
41181
|
+
*/
|
|
41182
|
+
addEmployeeRole(businessId: number, addEmployeeRoleDto: AddEmployeeRoleDto, options?: any): AxiosPromise<EmployeeRoleResponseDto> {
|
|
41183
|
+
return localVarFp.addEmployeeRole(businessId, addEmployeeRoleDto, options).then((request) => request(axios, basePath));
|
|
41184
|
+
},
|
|
41185
|
+
/**
|
|
41186
|
+
* Adds each starter role (Cashier, Waiter, Manager) whose name no role of the venue has, all together, so a venue never starts from an empty list. The restaurant changes them like any other role. Calling it again adds nothing new. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41187
|
+
* @summary Add the starter employee roles at the venue
|
|
41188
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41189
|
+
* @param {*} [options] Override http request option.
|
|
41190
|
+
* @throws {RequiredError}
|
|
41191
|
+
*/
|
|
41192
|
+
addStarterEmployeeRoles(businessId: number, options?: any): AxiosPromise<Array<EmployeeRoleResponseDto>> {
|
|
41193
|
+
return localVarFp.addStarterEmployeeRoles(businessId, options).then((request) => request(axios, basePath));
|
|
41194
|
+
},
|
|
41195
|
+
/**
|
|
41196
|
+
* Renames the role, replaces its POS keys, or both; a field not sent stays. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41197
|
+
* @summary Change an employee role of the venue
|
|
41198
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41199
|
+
* @param {string} roleId The role\'s id, one of the venue\'s
|
|
41200
|
+
* @param {ChangeEmployeeRoleDto} changeEmployeeRoleDto
|
|
41201
|
+
* @param {*} [options] Override http request option.
|
|
41202
|
+
* @throws {RequiredError}
|
|
41203
|
+
*/
|
|
41204
|
+
changeEmployeeRole(businessId: number, roleId: string, changeEmployeeRoleDto: ChangeEmployeeRoleDto, options?: any): AxiosPromise<EmployeeRoleResponseDto> {
|
|
41205
|
+
return localVarFp.changeEmployeeRole(businessId, roleId, changeEmployeeRoleDto, options).then((request) => request(axios, basePath));
|
|
41206
|
+
},
|
|
41207
|
+
/**
|
|
41208
|
+
* What each role lets the person at the till do, for the back office (D144). Read from the database every time, ordered by name; a venue keeps at most 100 roles.
|
|
41209
|
+
* @summary List the venue\'s employee roles
|
|
41210
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41211
|
+
* @param {*} [options] Override http request option.
|
|
41212
|
+
* @throws {RequiredError}
|
|
41213
|
+
*/
|
|
41214
|
+
listEmployeeRoles(businessId: number, options?: any): AxiosPromise<Array<EmployeeRoleResponseDto>> {
|
|
41215
|
+
return localVarFp.listEmployeeRoles(businessId, options).then((request) => request(axios, basePath));
|
|
41216
|
+
},
|
|
41217
|
+
/**
|
|
41218
|
+
* Only a role no employee holds is removed (D144); give its employees another role first. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41219
|
+
* @summary Remove an employee role of the venue
|
|
41220
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41221
|
+
* @param {string} roleId The role\'s id, one of the venue\'s
|
|
41222
|
+
* @param {*} [options] Override http request option.
|
|
41223
|
+
* @throws {RequiredError}
|
|
41224
|
+
*/
|
|
41225
|
+
removeEmployeeRole(businessId: number, roleId: string, options?: any): AxiosPromise<void> {
|
|
41226
|
+
return localVarFp.removeEmployeeRole(businessId, roleId, options).then((request) => request(axios, basePath));
|
|
41227
|
+
},
|
|
41228
|
+
};
|
|
41229
|
+
};
|
|
41230
|
+
|
|
41231
|
+
/**
|
|
41232
|
+
* EmployeeRolesApi - interface
|
|
41233
|
+
* @export
|
|
41234
|
+
* @interface EmployeeRolesApi
|
|
41235
|
+
*/
|
|
41236
|
+
export interface EmployeeRolesApiInterface {
|
|
41237
|
+
/**
|
|
41238
|
+
* A new role with the POS keys sent. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41239
|
+
* @summary Add an employee role at the venue
|
|
41240
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41241
|
+
* @param {AddEmployeeRoleDto} addEmployeeRoleDto
|
|
41242
|
+
* @param {*} [options] Override http request option.
|
|
41243
|
+
* @throws {RequiredError}
|
|
41244
|
+
* @memberof EmployeeRolesApiInterface
|
|
41245
|
+
*/
|
|
41246
|
+
addEmployeeRole(businessId: number, addEmployeeRoleDto: AddEmployeeRoleDto, options?: AxiosRequestConfig): AxiosPromise<EmployeeRoleResponseDto>;
|
|
41247
|
+
|
|
41248
|
+
/**
|
|
41249
|
+
* Adds each starter role (Cashier, Waiter, Manager) whose name no role of the venue has, all together, so a venue never starts from an empty list. The restaurant changes them like any other role. Calling it again adds nothing new. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41250
|
+
* @summary Add the starter employee roles at the venue
|
|
41251
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41252
|
+
* @param {*} [options] Override http request option.
|
|
41253
|
+
* @throws {RequiredError}
|
|
41254
|
+
* @memberof EmployeeRolesApiInterface
|
|
41255
|
+
*/
|
|
41256
|
+
addStarterEmployeeRoles(businessId: number, options?: AxiosRequestConfig): AxiosPromise<Array<EmployeeRoleResponseDto>>;
|
|
41257
|
+
|
|
41258
|
+
/**
|
|
41259
|
+
* Renames the role, replaces its POS keys, or both; a field not sent stays. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41260
|
+
* @summary Change an employee role of the venue
|
|
41261
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41262
|
+
* @param {string} roleId The role\'s id, one of the venue\'s
|
|
41263
|
+
* @param {ChangeEmployeeRoleDto} changeEmployeeRoleDto
|
|
41264
|
+
* @param {*} [options] Override http request option.
|
|
41265
|
+
* @throws {RequiredError}
|
|
41266
|
+
* @memberof EmployeeRolesApiInterface
|
|
41267
|
+
*/
|
|
41268
|
+
changeEmployeeRole(businessId: number, roleId: string, changeEmployeeRoleDto: ChangeEmployeeRoleDto, options?: AxiosRequestConfig): AxiosPromise<EmployeeRoleResponseDto>;
|
|
41269
|
+
|
|
41270
|
+
/**
|
|
41271
|
+
* What each role lets the person at the till do, for the back office (D144). Read from the database every time, ordered by name; a venue keeps at most 100 roles.
|
|
41272
|
+
* @summary List the venue\'s employee roles
|
|
41273
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41274
|
+
* @param {*} [options] Override http request option.
|
|
41275
|
+
* @throws {RequiredError}
|
|
41276
|
+
* @memberof EmployeeRolesApiInterface
|
|
41277
|
+
*/
|
|
41278
|
+
listEmployeeRoles(businessId: number, options?: AxiosRequestConfig): AxiosPromise<Array<EmployeeRoleResponseDto>>;
|
|
41279
|
+
|
|
41280
|
+
/**
|
|
41281
|
+
* Only a role no employee holds is removed (D144); give its employees another role first. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41282
|
+
* @summary Remove an employee role of the venue
|
|
41283
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41284
|
+
* @param {string} roleId The role\'s id, one of the venue\'s
|
|
41285
|
+
* @param {*} [options] Override http request option.
|
|
41286
|
+
* @throws {RequiredError}
|
|
41287
|
+
* @memberof EmployeeRolesApiInterface
|
|
41288
|
+
*/
|
|
41289
|
+
removeEmployeeRole(businessId: number, roleId: string, options?: AxiosRequestConfig): AxiosPromise<void>;
|
|
41290
|
+
|
|
41291
|
+
}
|
|
41292
|
+
|
|
41293
|
+
/**
|
|
41294
|
+
* EmployeeRolesApi - object-oriented interface
|
|
41295
|
+
* @export
|
|
41296
|
+
* @class EmployeeRolesApi
|
|
41297
|
+
* @extends {BaseAPI}
|
|
41298
|
+
*/
|
|
41299
|
+
export class EmployeeRolesApi extends BaseAPI implements EmployeeRolesApiInterface {
|
|
41300
|
+
/**
|
|
41301
|
+
* A new role with the POS keys sent. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41302
|
+
* @summary Add an employee role at the venue
|
|
41303
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41304
|
+
* @param {AddEmployeeRoleDto} addEmployeeRoleDto
|
|
41305
|
+
* @param {*} [options] Override http request option.
|
|
41306
|
+
* @throws {RequiredError}
|
|
41307
|
+
* @memberof EmployeeRolesApi
|
|
41308
|
+
*/
|
|
41309
|
+
public addEmployeeRole(businessId: number, addEmployeeRoleDto: AddEmployeeRoleDto, options?: AxiosRequestConfig) {
|
|
41310
|
+
return EmployeeRolesApiFp(this.configuration).addEmployeeRole(businessId, addEmployeeRoleDto, options).then((request) => request(this.axios, this.basePath));
|
|
41311
|
+
}
|
|
41312
|
+
|
|
41313
|
+
/**
|
|
41314
|
+
* Adds each starter role (Cashier, Waiter, Manager) whose name no role of the venue has, all together, so a venue never starts from an empty list. The restaurant changes them like any other role. Calling it again adds nothing new. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41315
|
+
* @summary Add the starter employee roles at the venue
|
|
41316
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41317
|
+
* @param {*} [options] Override http request option.
|
|
41318
|
+
* @throws {RequiredError}
|
|
41319
|
+
* @memberof EmployeeRolesApi
|
|
41320
|
+
*/
|
|
41321
|
+
public addStarterEmployeeRoles(businessId: number, options?: AxiosRequestConfig) {
|
|
41322
|
+
return EmployeeRolesApiFp(this.configuration).addStarterEmployeeRoles(businessId, options).then((request) => request(this.axios, this.basePath));
|
|
41323
|
+
}
|
|
41324
|
+
|
|
41325
|
+
/**
|
|
41326
|
+
* Renames the role, replaces its POS keys, or both; a field not sent stays. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41327
|
+
* @summary Change an employee role of the venue
|
|
41328
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41329
|
+
* @param {string} roleId The role\'s id, one of the venue\'s
|
|
41330
|
+
* @param {ChangeEmployeeRoleDto} changeEmployeeRoleDto
|
|
41331
|
+
* @param {*} [options] Override http request option.
|
|
41332
|
+
* @throws {RequiredError}
|
|
41333
|
+
* @memberof EmployeeRolesApi
|
|
41334
|
+
*/
|
|
41335
|
+
public changeEmployeeRole(businessId: number, roleId: string, changeEmployeeRoleDto: ChangeEmployeeRoleDto, options?: AxiosRequestConfig) {
|
|
41336
|
+
return EmployeeRolesApiFp(this.configuration).changeEmployeeRole(businessId, roleId, changeEmployeeRoleDto, options).then((request) => request(this.axios, this.basePath));
|
|
41337
|
+
}
|
|
41338
|
+
|
|
41339
|
+
/**
|
|
41340
|
+
* What each role lets the person at the till do, for the back office (D144). Read from the database every time, ordered by name; a venue keeps at most 100 roles.
|
|
41341
|
+
* @summary List the venue\'s employee roles
|
|
41342
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41343
|
+
* @param {*} [options] Override http request option.
|
|
41344
|
+
* @throws {RequiredError}
|
|
41345
|
+
* @memberof EmployeeRolesApi
|
|
41346
|
+
*/
|
|
41347
|
+
public listEmployeeRoles(businessId: number, options?: AxiosRequestConfig) {
|
|
41348
|
+
return EmployeeRolesApiFp(this.configuration).listEmployeeRoles(businessId, options).then((request) => request(this.axios, this.basePath));
|
|
41349
|
+
}
|
|
41350
|
+
|
|
41351
|
+
/**
|
|
41352
|
+
* Only a role no employee holds is removed (D144); give its employees another role first. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41353
|
+
* @summary Remove an employee role of the venue
|
|
41354
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41355
|
+
* @param {string} roleId The role\'s id, one of the venue\'s
|
|
41356
|
+
* @param {*} [options] Override http request option.
|
|
41357
|
+
* @throws {RequiredError}
|
|
41358
|
+
* @memberof EmployeeRolesApi
|
|
41359
|
+
*/
|
|
41360
|
+
public removeEmployeeRole(businessId: number, roleId: string, options?: AxiosRequestConfig) {
|
|
41361
|
+
return EmployeeRolesApiFp(this.configuration).removeEmployeeRole(businessId, roleId, options).then((request) => request(this.axios, this.basePath));
|
|
41362
|
+
}
|
|
41363
|
+
}
|
|
41364
|
+
|
|
41365
|
+
|
|
41366
|
+
/**
|
|
41367
|
+
* EmployeesApi - axios parameter creator
|
|
41368
|
+
* @export
|
|
41369
|
+
*/
|
|
41370
|
+
export const EmployeesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
41371
|
+
return {
|
|
41372
|
+
/**
|
|
41373
|
+
* An employee of the venue\'s merchant, with their PIN and a role at each venue they work at; every venue must be on the signed-in account (D144 c). The PIN is stored as both servers store it and never answered back. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41374
|
+
* @summary Add an employee at the venue
|
|
41375
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41376
|
+
* @param {AddEmployeeDto} addEmployeeDto
|
|
41377
|
+
* @param {*} [options] Override http request option.
|
|
41378
|
+
* @throws {RequiredError}
|
|
41379
|
+
*/
|
|
41380
|
+
addEmployee: async (businessId: number, addEmployeeDto: AddEmployeeDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41381
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
41382
|
+
assertParamExists('addEmployee', 'businessId', businessId)
|
|
41383
|
+
// verify required parameter 'addEmployeeDto' is not null or undefined
|
|
41384
|
+
assertParamExists('addEmployee', 'addEmployeeDto', addEmployeeDto)
|
|
41385
|
+
const localVarPath = `/api/v2/businesses/{businessId}/employees`
|
|
41386
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)));
|
|
41387
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41388
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41389
|
+
let baseOptions;
|
|
41390
|
+
if (configuration) {
|
|
41391
|
+
baseOptions = configuration.baseOptions;
|
|
41392
|
+
}
|
|
41393
|
+
|
|
41394
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
41395
|
+
const localVarHeaderParameter = {} as any;
|
|
41396
|
+
const localVarQueryParameter = {} as any;
|
|
41397
|
+
|
|
41398
|
+
// authentication JWT-auth required
|
|
41399
|
+
// http bearer authentication required
|
|
41400
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
41401
|
+
|
|
41402
|
+
|
|
41403
|
+
|
|
41404
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
41405
|
+
|
|
41406
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41407
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41408
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41409
|
+
localVarRequestOptions.data = serializeDataIfNeeded(addEmployeeDto, localVarRequestOptions, configuration)
|
|
41410
|
+
|
|
41411
|
+
return {
|
|
41412
|
+
url: toPathString(localVarUrlObj),
|
|
41413
|
+
options: localVarRequestOptions,
|
|
41414
|
+
};
|
|
41415
|
+
},
|
|
41416
|
+
/**
|
|
41417
|
+
* Changes the fields sent: name, PIN, status, contact. These reach every venue the employee is listed at, so each must be on the signed-in account (D144 c). INACTIVE takes them off every till and keeps their shifts and PIN. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41418
|
+
* @summary Change an employee
|
|
41419
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41420
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41421
|
+
* @param {ChangeEmployeeDto} changeEmployeeDto
|
|
41422
|
+
* @param {*} [options] Override http request option.
|
|
41423
|
+
* @throws {RequiredError}
|
|
41424
|
+
*/
|
|
41425
|
+
changeEmployee: async (businessId: number, employeeId: string, changeEmployeeDto: ChangeEmployeeDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41426
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
41427
|
+
assertParamExists('changeEmployee', 'businessId', businessId)
|
|
41428
|
+
// verify required parameter 'employeeId' is not null or undefined
|
|
41429
|
+
assertParamExists('changeEmployee', 'employeeId', employeeId)
|
|
41430
|
+
// verify required parameter 'changeEmployeeDto' is not null or undefined
|
|
41431
|
+
assertParamExists('changeEmployee', 'changeEmployeeDto', changeEmployeeDto)
|
|
41432
|
+
const localVarPath = `/api/v2/businesses/{businessId}/employees/{employeeId}`
|
|
41433
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)))
|
|
41434
|
+
.replace(`{${"employeeId"}}`, encodeURIComponent(String(employeeId)));
|
|
41435
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41436
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41437
|
+
let baseOptions;
|
|
41438
|
+
if (configuration) {
|
|
41439
|
+
baseOptions = configuration.baseOptions;
|
|
41440
|
+
}
|
|
41441
|
+
|
|
41442
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
41443
|
+
const localVarHeaderParameter = {} as any;
|
|
41444
|
+
const localVarQueryParameter = {} as any;
|
|
41445
|
+
|
|
41446
|
+
// authentication JWT-auth required
|
|
41447
|
+
// http bearer authentication required
|
|
41448
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
41449
|
+
|
|
41450
|
+
|
|
41451
|
+
|
|
41452
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
41453
|
+
|
|
41454
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41455
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41456
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41457
|
+
localVarRequestOptions.data = serializeDataIfNeeded(changeEmployeeDto, localVarRequestOptions, configuration)
|
|
41458
|
+
|
|
41459
|
+
return {
|
|
41460
|
+
url: toPathString(localVarUrlObj),
|
|
41461
|
+
options: localVarRequestOptions,
|
|
41462
|
+
};
|
|
41463
|
+
},
|
|
41464
|
+
/**
|
|
41465
|
+
* The employees who work at the venue, and those added there with no role yet, ordered by name, a page at a time (D144). No PIN is answered, in any form. Read from the database every time.
|
|
41466
|
+
* @summary List the venue\'s employees
|
|
41467
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41468
|
+
* @param {string} [cursor] The nextCursor of the page before; absent for the first page
|
|
41469
|
+
* @param {number} [limit] How many employees a page holds, 100 at most
|
|
41470
|
+
* @param {*} [options] Override http request option.
|
|
41471
|
+
* @throws {RequiredError}
|
|
41472
|
+
*/
|
|
41473
|
+
listEmployees: async (businessId: number, cursor?: string, limit?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41474
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
41475
|
+
assertParamExists('listEmployees', 'businessId', businessId)
|
|
41476
|
+
const localVarPath = `/api/v2/businesses/{businessId}/employees`
|
|
41477
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)));
|
|
41478
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41479
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41480
|
+
let baseOptions;
|
|
41481
|
+
if (configuration) {
|
|
41482
|
+
baseOptions = configuration.baseOptions;
|
|
41483
|
+
}
|
|
41484
|
+
|
|
41485
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
41486
|
+
const localVarHeaderParameter = {} as any;
|
|
41487
|
+
const localVarQueryParameter = {} as any;
|
|
41488
|
+
|
|
41489
|
+
// authentication JWT-auth required
|
|
41490
|
+
// http bearer authentication required
|
|
41491
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
41492
|
+
|
|
41493
|
+
if (cursor !== undefined) {
|
|
41494
|
+
localVarQueryParameter['cursor'] = cursor;
|
|
41495
|
+
}
|
|
41496
|
+
|
|
41497
|
+
if (limit !== undefined) {
|
|
41498
|
+
localVarQueryParameter['limit'] = limit;
|
|
41499
|
+
}
|
|
41500
|
+
|
|
41501
|
+
|
|
41502
|
+
|
|
41503
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41504
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41505
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41506
|
+
|
|
41507
|
+
return {
|
|
41508
|
+
url: toPathString(localVarUrlObj),
|
|
41509
|
+
options: localVarRequestOptions,
|
|
41510
|
+
};
|
|
41511
|
+
},
|
|
41512
|
+
/**
|
|
41513
|
+
* The employee stops working at this venue only; they, their shifts and their other venues are kept. To take them off every till, make them INACTIVE. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41514
|
+
* @summary Remove an employee from the venue
|
|
41515
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41516
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41517
|
+
* @param {*} [options] Override http request option.
|
|
41518
|
+
* @throws {RequiredError}
|
|
41519
|
+
*/
|
|
41520
|
+
removeEmployeeFromVenue: async (businessId: number, employeeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41521
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
41522
|
+
assertParamExists('removeEmployeeFromVenue', 'businessId', businessId)
|
|
41523
|
+
// verify required parameter 'employeeId' is not null or undefined
|
|
41524
|
+
assertParamExists('removeEmployeeFromVenue', 'employeeId', employeeId)
|
|
41525
|
+
const localVarPath = `/api/v2/businesses/{businessId}/employees/{employeeId}/role`
|
|
41526
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)))
|
|
41527
|
+
.replace(`{${"employeeId"}}`, encodeURIComponent(String(employeeId)));
|
|
41528
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41529
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41530
|
+
let baseOptions;
|
|
41531
|
+
if (configuration) {
|
|
41532
|
+
baseOptions = configuration.baseOptions;
|
|
41533
|
+
}
|
|
41534
|
+
|
|
41535
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
41536
|
+
const localVarHeaderParameter = {} as any;
|
|
41537
|
+
const localVarQueryParameter = {} as any;
|
|
41538
|
+
|
|
41539
|
+
// authentication JWT-auth required
|
|
41540
|
+
// http bearer authentication required
|
|
41541
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
41542
|
+
|
|
41543
|
+
|
|
41544
|
+
|
|
41545
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41546
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41547
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41548
|
+
|
|
41549
|
+
return {
|
|
41550
|
+
url: toPathString(localVarUrlObj),
|
|
41551
|
+
options: localVarRequestOptions,
|
|
41552
|
+
};
|
|
41553
|
+
},
|
|
41554
|
+
/**
|
|
41555
|
+
* The employee works at the venue with this role, replacing the role they had there. An employee of the merchant who does not work at the venue yet starts working there. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41556
|
+
* @summary Set an employee\'s role at the venue
|
|
41557
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41558
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41559
|
+
* @param {SetEmployeeRoleDto} setEmployeeRoleDto
|
|
41560
|
+
* @param {*} [options] Override http request option.
|
|
41561
|
+
* @throws {RequiredError}
|
|
41562
|
+
*/
|
|
41563
|
+
setEmployeeRole: async (businessId: number, employeeId: string, setEmployeeRoleDto: SetEmployeeRoleDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41564
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
41565
|
+
assertParamExists('setEmployeeRole', 'businessId', businessId)
|
|
41566
|
+
// verify required parameter 'employeeId' is not null or undefined
|
|
41567
|
+
assertParamExists('setEmployeeRole', 'employeeId', employeeId)
|
|
41568
|
+
// verify required parameter 'setEmployeeRoleDto' is not null or undefined
|
|
41569
|
+
assertParamExists('setEmployeeRole', 'setEmployeeRoleDto', setEmployeeRoleDto)
|
|
41570
|
+
const localVarPath = `/api/v2/businesses/{businessId}/employees/{employeeId}/role`
|
|
41571
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)))
|
|
41572
|
+
.replace(`{${"employeeId"}}`, encodeURIComponent(String(employeeId)));
|
|
41573
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
41574
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41575
|
+
let baseOptions;
|
|
41576
|
+
if (configuration) {
|
|
41577
|
+
baseOptions = configuration.baseOptions;
|
|
41578
|
+
}
|
|
41579
|
+
|
|
41580
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
41581
|
+
const localVarHeaderParameter = {} as any;
|
|
41582
|
+
const localVarQueryParameter = {} as any;
|
|
41583
|
+
|
|
41584
|
+
// authentication JWT-auth required
|
|
41585
|
+
// http bearer authentication required
|
|
41586
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
41587
|
+
|
|
41588
|
+
|
|
41589
|
+
|
|
41590
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
41591
|
+
|
|
41592
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
41593
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
41594
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
41595
|
+
localVarRequestOptions.data = serializeDataIfNeeded(setEmployeeRoleDto, localVarRequestOptions, configuration)
|
|
41596
|
+
|
|
41597
|
+
return {
|
|
41598
|
+
url: toPathString(localVarUrlObj),
|
|
41599
|
+
options: localVarRequestOptions,
|
|
41600
|
+
};
|
|
41601
|
+
},
|
|
41602
|
+
}
|
|
41603
|
+
};
|
|
41604
|
+
|
|
41605
|
+
/**
|
|
41606
|
+
* EmployeesApi - functional programming interface
|
|
41607
|
+
* @export
|
|
41608
|
+
*/
|
|
41609
|
+
export const EmployeesApiFp = function(configuration?: Configuration) {
|
|
41610
|
+
const localVarAxiosParamCreator = EmployeesApiAxiosParamCreator(configuration)
|
|
41611
|
+
return {
|
|
41612
|
+
/**
|
|
41613
|
+
* An employee of the venue\'s merchant, with their PIN and a role at each venue they work at; every venue must be on the signed-in account (D144 c). The PIN is stored as both servers store it and never answered back. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41614
|
+
* @summary Add an employee at the venue
|
|
41615
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41616
|
+
* @param {AddEmployeeDto} addEmployeeDto
|
|
41617
|
+
* @param {*} [options] Override http request option.
|
|
41618
|
+
* @throws {RequiredError}
|
|
41619
|
+
*/
|
|
41620
|
+
async addEmployee(businessId: number, addEmployeeDto: AddEmployeeDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmployeeResponseDto>> {
|
|
41621
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.addEmployee(businessId, addEmployeeDto, options);
|
|
41622
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41623
|
+
},
|
|
41624
|
+
/**
|
|
41625
|
+
* Changes the fields sent: name, PIN, status, contact. These reach every venue the employee is listed at, so each must be on the signed-in account (D144 c). INACTIVE takes them off every till and keeps their shifts and PIN. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41626
|
+
* @summary Change an employee
|
|
41627
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41628
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41629
|
+
* @param {ChangeEmployeeDto} changeEmployeeDto
|
|
41630
|
+
* @param {*} [options] Override http request option.
|
|
41631
|
+
* @throws {RequiredError}
|
|
41632
|
+
*/
|
|
41633
|
+
async changeEmployee(businessId: number, employeeId: string, changeEmployeeDto: ChangeEmployeeDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmployeeResponseDto>> {
|
|
41634
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.changeEmployee(businessId, employeeId, changeEmployeeDto, options);
|
|
41635
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41636
|
+
},
|
|
41637
|
+
/**
|
|
41638
|
+
* The employees who work at the venue, and those added there with no role yet, ordered by name, a page at a time (D144). No PIN is answered, in any form. Read from the database every time.
|
|
41639
|
+
* @summary List the venue\'s employees
|
|
41640
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41641
|
+
* @param {string} [cursor] The nextCursor of the page before; absent for the first page
|
|
41642
|
+
* @param {number} [limit] How many employees a page holds, 100 at most
|
|
41643
|
+
* @param {*} [options] Override http request option.
|
|
41644
|
+
* @throws {RequiredError}
|
|
41645
|
+
*/
|
|
41646
|
+
async listEmployees(businessId: number, cursor?: string, limit?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmployeePageResponseDto>> {
|
|
41647
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listEmployees(businessId, cursor, limit, options);
|
|
41648
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41649
|
+
},
|
|
41650
|
+
/**
|
|
41651
|
+
* The employee stops working at this venue only; they, their shifts and their other venues are kept. To take them off every till, make them INACTIVE. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41652
|
+
* @summary Remove an employee from the venue
|
|
41653
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41654
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41655
|
+
* @param {*} [options] Override http request option.
|
|
41656
|
+
* @throws {RequiredError}
|
|
41657
|
+
*/
|
|
41658
|
+
async removeEmployeeFromVenue(businessId: number, employeeId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
41659
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeEmployeeFromVenue(businessId, employeeId, options);
|
|
41660
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41661
|
+
},
|
|
41662
|
+
/**
|
|
41663
|
+
* The employee works at the venue with this role, replacing the role they had there. An employee of the merchant who does not work at the venue yet starts working there. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41664
|
+
* @summary Set an employee\'s role at the venue
|
|
41665
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41666
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41667
|
+
* @param {SetEmployeeRoleDto} setEmployeeRoleDto
|
|
41668
|
+
* @param {*} [options] Override http request option.
|
|
41669
|
+
* @throws {RequiredError}
|
|
41670
|
+
*/
|
|
41671
|
+
async setEmployeeRole(businessId: number, employeeId: string, setEmployeeRoleDto: SetEmployeeRoleDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmployeeResponseDto>> {
|
|
41672
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.setEmployeeRole(businessId, employeeId, setEmployeeRoleDto, options);
|
|
41673
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
41674
|
+
},
|
|
41675
|
+
}
|
|
41676
|
+
};
|
|
41677
|
+
|
|
41678
|
+
/**
|
|
41679
|
+
* EmployeesApi - factory interface
|
|
41680
|
+
* @export
|
|
41681
|
+
*/
|
|
41682
|
+
export const EmployeesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
41683
|
+
const localVarFp = EmployeesApiFp(configuration)
|
|
41684
|
+
return {
|
|
41685
|
+
/**
|
|
41686
|
+
* An employee of the venue\'s merchant, with their PIN and a role at each venue they work at; every venue must be on the signed-in account (D144 c). The PIN is stored as both servers store it and never answered back. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41687
|
+
* @summary Add an employee at the venue
|
|
41688
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41689
|
+
* @param {AddEmployeeDto} addEmployeeDto
|
|
41690
|
+
* @param {*} [options] Override http request option.
|
|
41691
|
+
* @throws {RequiredError}
|
|
41692
|
+
*/
|
|
41693
|
+
addEmployee(businessId: number, addEmployeeDto: AddEmployeeDto, options?: any): AxiosPromise<EmployeeResponseDto> {
|
|
41694
|
+
return localVarFp.addEmployee(businessId, addEmployeeDto, options).then((request) => request(axios, basePath));
|
|
41695
|
+
},
|
|
41696
|
+
/**
|
|
41697
|
+
* Changes the fields sent: name, PIN, status, contact. These reach every venue the employee is listed at, so each must be on the signed-in account (D144 c). INACTIVE takes them off every till and keeps their shifts and PIN. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41698
|
+
* @summary Change an employee
|
|
41699
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41700
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41701
|
+
* @param {ChangeEmployeeDto} changeEmployeeDto
|
|
41702
|
+
* @param {*} [options] Override http request option.
|
|
41703
|
+
* @throws {RequiredError}
|
|
41704
|
+
*/
|
|
41705
|
+
changeEmployee(businessId: number, employeeId: string, changeEmployeeDto: ChangeEmployeeDto, options?: any): AxiosPromise<EmployeeResponseDto> {
|
|
41706
|
+
return localVarFp.changeEmployee(businessId, employeeId, changeEmployeeDto, options).then((request) => request(axios, basePath));
|
|
41707
|
+
},
|
|
41708
|
+
/**
|
|
41709
|
+
* The employees who work at the venue, and those added there with no role yet, ordered by name, a page at a time (D144). No PIN is answered, in any form. Read from the database every time.
|
|
41710
|
+
* @summary List the venue\'s employees
|
|
41711
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41712
|
+
* @param {string} [cursor] The nextCursor of the page before; absent for the first page
|
|
41713
|
+
* @param {number} [limit] How many employees a page holds, 100 at most
|
|
41714
|
+
* @param {*} [options] Override http request option.
|
|
41715
|
+
* @throws {RequiredError}
|
|
41716
|
+
*/
|
|
41717
|
+
listEmployees(businessId: number, cursor?: string, limit?: number, options?: any): AxiosPromise<EmployeePageResponseDto> {
|
|
41718
|
+
return localVarFp.listEmployees(businessId, cursor, limit, options).then((request) => request(axios, basePath));
|
|
41719
|
+
},
|
|
41720
|
+
/**
|
|
41721
|
+
* The employee stops working at this venue only; they, their shifts and their other venues are kept. To take them off every till, make them INACTIVE. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41722
|
+
* @summary Remove an employee from the venue
|
|
41723
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41724
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41725
|
+
* @param {*} [options] Override http request option.
|
|
41726
|
+
* @throws {RequiredError}
|
|
41727
|
+
*/
|
|
41728
|
+
removeEmployeeFromVenue(businessId: number, employeeId: string, options?: any): AxiosPromise<void> {
|
|
41729
|
+
return localVarFp.removeEmployeeFromVenue(businessId, employeeId, options).then((request) => request(axios, basePath));
|
|
41730
|
+
},
|
|
41731
|
+
/**
|
|
41732
|
+
* The employee works at the venue with this role, replacing the role they had there. An employee of the merchant who does not work at the venue yet starts working there. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41733
|
+
* @summary Set an employee\'s role at the venue
|
|
41734
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41735
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41736
|
+
* @param {SetEmployeeRoleDto} setEmployeeRoleDto
|
|
41737
|
+
* @param {*} [options] Override http request option.
|
|
41738
|
+
* @throws {RequiredError}
|
|
41739
|
+
*/
|
|
41740
|
+
setEmployeeRole(businessId: number, employeeId: string, setEmployeeRoleDto: SetEmployeeRoleDto, options?: any): AxiosPromise<EmployeeResponseDto> {
|
|
41741
|
+
return localVarFp.setEmployeeRole(businessId, employeeId, setEmployeeRoleDto, options).then((request) => request(axios, basePath));
|
|
41742
|
+
},
|
|
41743
|
+
};
|
|
41744
|
+
};
|
|
41745
|
+
|
|
41746
|
+
/**
|
|
41747
|
+
* EmployeesApi - interface
|
|
41748
|
+
* @export
|
|
41749
|
+
* @interface EmployeesApi
|
|
41750
|
+
*/
|
|
41751
|
+
export interface EmployeesApiInterface {
|
|
41752
|
+
/**
|
|
41753
|
+
* An employee of the venue\'s merchant, with their PIN and a role at each venue they work at; every venue must be on the signed-in account (D144 c). The PIN is stored as both servers store it and never answered back. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41754
|
+
* @summary Add an employee at the venue
|
|
41755
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41756
|
+
* @param {AddEmployeeDto} addEmployeeDto
|
|
41757
|
+
* @param {*} [options] Override http request option.
|
|
41758
|
+
* @throws {RequiredError}
|
|
41759
|
+
* @memberof EmployeesApiInterface
|
|
41760
|
+
*/
|
|
41761
|
+
addEmployee(businessId: number, addEmployeeDto: AddEmployeeDto, options?: AxiosRequestConfig): AxiosPromise<EmployeeResponseDto>;
|
|
41762
|
+
|
|
41763
|
+
/**
|
|
41764
|
+
* Changes the fields sent: name, PIN, status, contact. These reach every venue the employee is listed at, so each must be on the signed-in account (D144 c). INACTIVE takes them off every till and keeps their shifts and PIN. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41765
|
+
* @summary Change an employee
|
|
41766
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41767
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41768
|
+
* @param {ChangeEmployeeDto} changeEmployeeDto
|
|
41769
|
+
* @param {*} [options] Override http request option.
|
|
41770
|
+
* @throws {RequiredError}
|
|
41771
|
+
* @memberof EmployeesApiInterface
|
|
41772
|
+
*/
|
|
41773
|
+
changeEmployee(businessId: number, employeeId: string, changeEmployeeDto: ChangeEmployeeDto, options?: AxiosRequestConfig): AxiosPromise<EmployeeResponseDto>;
|
|
41774
|
+
|
|
41775
|
+
/**
|
|
41776
|
+
* The employees who work at the venue, and those added there with no role yet, ordered by name, a page at a time (D144). No PIN is answered, in any form. Read from the database every time.
|
|
41777
|
+
* @summary List the venue\'s employees
|
|
41778
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41779
|
+
* @param {string} [cursor] The nextCursor of the page before; absent for the first page
|
|
41780
|
+
* @param {number} [limit] How many employees a page holds, 100 at most
|
|
41781
|
+
* @param {*} [options] Override http request option.
|
|
41782
|
+
* @throws {RequiredError}
|
|
41783
|
+
* @memberof EmployeesApiInterface
|
|
41784
|
+
*/
|
|
41785
|
+
listEmployees(businessId: number, cursor?: string, limit?: number, options?: AxiosRequestConfig): AxiosPromise<EmployeePageResponseDto>;
|
|
41786
|
+
|
|
41787
|
+
/**
|
|
41788
|
+
* The employee stops working at this venue only; they, their shifts and their other venues are kept. To take them off every till, make them INACTIVE. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41789
|
+
* @summary Remove an employee from the venue
|
|
41790
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41791
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41792
|
+
* @param {*} [options] Override http request option.
|
|
41793
|
+
* @throws {RequiredError}
|
|
41794
|
+
* @memberof EmployeesApiInterface
|
|
41795
|
+
*/
|
|
41796
|
+
removeEmployeeFromVenue(businessId: number, employeeId: string, options?: AxiosRequestConfig): AxiosPromise<void>;
|
|
41797
|
+
|
|
41798
|
+
/**
|
|
41799
|
+
* The employee works at the venue with this role, replacing the role they had there. An employee of the merchant who does not work at the venue yet starts working there. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41800
|
+
* @summary Set an employee\'s role at the venue
|
|
41801
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41802
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41803
|
+
* @param {SetEmployeeRoleDto} setEmployeeRoleDto
|
|
41804
|
+
* @param {*} [options] Override http request option.
|
|
41805
|
+
* @throws {RequiredError}
|
|
41806
|
+
* @memberof EmployeesApiInterface
|
|
41807
|
+
*/
|
|
41808
|
+
setEmployeeRole(businessId: number, employeeId: string, setEmployeeRoleDto: SetEmployeeRoleDto, options?: AxiosRequestConfig): AxiosPromise<EmployeeResponseDto>;
|
|
41809
|
+
|
|
41810
|
+
}
|
|
41811
|
+
|
|
41812
|
+
/**
|
|
41813
|
+
* EmployeesApi - object-oriented interface
|
|
41814
|
+
* @export
|
|
41815
|
+
* @class EmployeesApi
|
|
41816
|
+
* @extends {BaseAPI}
|
|
41817
|
+
*/
|
|
41818
|
+
export class EmployeesApi extends BaseAPI implements EmployeesApiInterface {
|
|
41819
|
+
/**
|
|
41820
|
+
* An employee of the venue\'s merchant, with their PIN and a role at each venue they work at; every venue must be on the signed-in account (D144 c). The PIN is stored as both servers store it and never answered back. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41821
|
+
* @summary Add an employee at the venue
|
|
41822
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41823
|
+
* @param {AddEmployeeDto} addEmployeeDto
|
|
41824
|
+
* @param {*} [options] Override http request option.
|
|
41825
|
+
* @throws {RequiredError}
|
|
41826
|
+
* @memberof EmployeesApi
|
|
41827
|
+
*/
|
|
41828
|
+
public addEmployee(businessId: number, addEmployeeDto: AddEmployeeDto, options?: AxiosRequestConfig) {
|
|
41829
|
+
return EmployeesApiFp(this.configuration).addEmployee(businessId, addEmployeeDto, options).then((request) => request(this.axios, this.basePath));
|
|
41830
|
+
}
|
|
41831
|
+
|
|
41832
|
+
/**
|
|
41833
|
+
* Changes the fields sent: name, PIN, status, contact. These reach every venue the employee is listed at, so each must be on the signed-in account (D144 c). INACTIVE takes them off every till and keeps their shifts and PIN. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41834
|
+
* @summary Change an employee
|
|
41835
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41836
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41837
|
+
* @param {ChangeEmployeeDto} changeEmployeeDto
|
|
41838
|
+
* @param {*} [options] Override http request option.
|
|
41839
|
+
* @throws {RequiredError}
|
|
41840
|
+
* @memberof EmployeesApi
|
|
41841
|
+
*/
|
|
41842
|
+
public changeEmployee(businessId: number, employeeId: string, changeEmployeeDto: ChangeEmployeeDto, options?: AxiosRequestConfig) {
|
|
41843
|
+
return EmployeesApiFp(this.configuration).changeEmployee(businessId, employeeId, changeEmployeeDto, options).then((request) => request(this.axios, this.basePath));
|
|
41844
|
+
}
|
|
41845
|
+
|
|
41846
|
+
/**
|
|
41847
|
+
* The employees who work at the venue, and those added there with no role yet, ordered by name, a page at a time (D144). No PIN is answered, in any form. Read from the database every time.
|
|
41848
|
+
* @summary List the venue\'s employees
|
|
41849
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41850
|
+
* @param {string} [cursor] The nextCursor of the page before; absent for the first page
|
|
41851
|
+
* @param {number} [limit] How many employees a page holds, 100 at most
|
|
41852
|
+
* @param {*} [options] Override http request option.
|
|
41853
|
+
* @throws {RequiredError}
|
|
41854
|
+
* @memberof EmployeesApi
|
|
41855
|
+
*/
|
|
41856
|
+
public listEmployees(businessId: number, cursor?: string, limit?: number, options?: AxiosRequestConfig) {
|
|
41857
|
+
return EmployeesApiFp(this.configuration).listEmployees(businessId, cursor, limit, options).then((request) => request(this.axios, this.basePath));
|
|
41858
|
+
}
|
|
41859
|
+
|
|
41860
|
+
/**
|
|
41861
|
+
* The employee stops working at this venue only; they, their shifts and their other venues are kept. To take them off every till, make them INACTIVE. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41862
|
+
* @summary Remove an employee from the venue
|
|
41863
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41864
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41865
|
+
* @param {*} [options] Override http request option.
|
|
41866
|
+
* @throws {RequiredError}
|
|
41867
|
+
* @memberof EmployeesApi
|
|
41868
|
+
*/
|
|
41869
|
+
public removeEmployeeFromVenue(businessId: number, employeeId: string, options?: AxiosRequestConfig) {
|
|
41870
|
+
return EmployeesApiFp(this.configuration).removeEmployeeFromVenue(businessId, employeeId, options).then((request) => request(this.axios, this.basePath));
|
|
41871
|
+
}
|
|
41872
|
+
|
|
41873
|
+
/**
|
|
41874
|
+
* The employee works at the venue with this role, replacing the role they had there. An employee of the merchant who does not work at the venue yet starts working there. Once saved, the POS session of every venue the change reaches is cleared and its tills are told over Ably to sync POS_SESSION.
|
|
41875
|
+
* @summary Set an employee\'s role at the venue
|
|
41876
|
+
* @param {number} businessId The venue\'s orderingBusinessId
|
|
41877
|
+
* @param {string} employeeId The employee\'s id, one of the venue\'s merchant
|
|
41878
|
+
* @param {SetEmployeeRoleDto} setEmployeeRoleDto
|
|
41879
|
+
* @param {*} [options] Override http request option.
|
|
41880
|
+
* @throws {RequiredError}
|
|
41881
|
+
* @memberof EmployeesApi
|
|
41882
|
+
*/
|
|
41883
|
+
public setEmployeeRole(businessId: number, employeeId: string, setEmployeeRoleDto: SetEmployeeRoleDto, options?: AxiosRequestConfig) {
|
|
41884
|
+
return EmployeesApiFp(this.configuration).setEmployeeRole(businessId, employeeId, setEmployeeRoleDto, options).then((request) => request(this.axios, this.basePath));
|
|
41885
|
+
}
|
|
41886
|
+
}
|
|
41887
|
+
|
|
41888
|
+
|
|
40566
41889
|
/**
|
|
40567
41890
|
* FloorPlanApi - axios parameter creator
|
|
40568
41891
|
* @export
|
|
@@ -53572,6 +54895,7 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
53572
54895
|
* @param {string} productId The product\'s id in Vendure: a whole number from 1, with no leading zero; anything else is refused with 400 before Vendure is asked
|
|
53573
54896
|
* @param {UpdateProductSkuDto} updateProductSkuDto The SKU to save
|
|
53574
54897
|
* @param {*} [options] Override http request option.
|
|
54898
|
+
* @deprecated
|
|
53575
54899
|
* @throws {RequiredError}
|
|
53576
54900
|
*/
|
|
53577
54901
|
updateProductSkuV2: async (businessId: string, categoryId: string, productId: string, updateProductSkuDto: UpdateProductSkuDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
@@ -53607,6 +54931,54 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
53607
54931
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
53608
54932
|
localVarRequestOptions.data = serializeDataIfNeeded(updateProductSkuDto, localVarRequestOptions, configuration)
|
|
53609
54933
|
|
|
54934
|
+
return {
|
|
54935
|
+
url: toPathString(localVarUrlObj),
|
|
54936
|
+
options: localVarRequestOptions,
|
|
54937
|
+
};
|
|
54938
|
+
},
|
|
54939
|
+
/**
|
|
54940
|
+
* Saved in Vendure, each trimmed, in the order sent; the first is the product\'s sku. A SKU is unique within the venue; Vendure compares it without case.
|
|
54941
|
+
* @summary Replace every SKU (label code) of a product
|
|
54942
|
+
* @param {string} businessId The venue\'s id; the ticket must cover it
|
|
54943
|
+
* @param {string} categoryId The product\'s category id. Not checked against the product: it is copied into each answered row as category_id
|
|
54944
|
+
* @param {string} productId The product\'s id in Vendure: a whole number from 1, with no leading zero; anything else is refused with 400 before Vendure is asked
|
|
54945
|
+
* @param {UpdateProductSkusDto} updateProductSkusDto Every SKU the product keeps, in order
|
|
54946
|
+
* @param {*} [options] Override http request option.
|
|
54947
|
+
* @throws {RequiredError}
|
|
54948
|
+
*/
|
|
54949
|
+
updateProductSkusV2: async (businessId: string, categoryId: string, productId: string, updateProductSkusDto: UpdateProductSkusDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
54950
|
+
// verify required parameter 'businessId' is not null or undefined
|
|
54951
|
+
assertParamExists('updateProductSkusV2', 'businessId', businessId)
|
|
54952
|
+
// verify required parameter 'categoryId' is not null or undefined
|
|
54953
|
+
assertParamExists('updateProductSkusV2', 'categoryId', categoryId)
|
|
54954
|
+
// verify required parameter 'productId' is not null or undefined
|
|
54955
|
+
assertParamExists('updateProductSkusV2', 'productId', productId)
|
|
54956
|
+
// verify required parameter 'updateProductSkusDto' is not null or undefined
|
|
54957
|
+
assertParamExists('updateProductSkusV2', 'updateProductSkusDto', updateProductSkusDto)
|
|
54958
|
+
const localVarPath = `/api/v2/business/{businessId}/categories/{categoryId}/products/{productId}/skus`
|
|
54959
|
+
.replace(`{${"businessId"}}`, encodeURIComponent(String(businessId)))
|
|
54960
|
+
.replace(`{${"categoryId"}}`, encodeURIComponent(String(categoryId)))
|
|
54961
|
+
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
54962
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
54963
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
54964
|
+
let baseOptions;
|
|
54965
|
+
if (configuration) {
|
|
54966
|
+
baseOptions = configuration.baseOptions;
|
|
54967
|
+
}
|
|
54968
|
+
|
|
54969
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
54970
|
+
const localVarHeaderParameter = {} as any;
|
|
54971
|
+
const localVarQueryParameter = {} as any;
|
|
54972
|
+
|
|
54973
|
+
|
|
54974
|
+
|
|
54975
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
54976
|
+
|
|
54977
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
54978
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
54979
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
54980
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateProductSkusDto, localVarRequestOptions, configuration)
|
|
54981
|
+
|
|
53610
54982
|
return {
|
|
53611
54983
|
url: toPathString(localVarUrlObj),
|
|
53612
54984
|
options: localVarRequestOptions,
|
|
@@ -53657,12 +55029,27 @@ export const ProductApiFp = function(configuration?: Configuration) {
|
|
|
53657
55029
|
* @param {string} productId The product\'s id in Vendure: a whole number from 1, with no leading zero; anything else is refused with 400 before Vendure is asked
|
|
53658
55030
|
* @param {UpdateProductSkuDto} updateProductSkuDto The SKU to save
|
|
53659
55031
|
* @param {*} [options] Override http request option.
|
|
55032
|
+
* @deprecated
|
|
53660
55033
|
* @throws {RequiredError}
|
|
53661
55034
|
*/
|
|
53662
55035
|
async updateProductSkuV2(businessId: string, categoryId: string, productId: string, updateProductSkuDto: UpdateProductSkuDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductSkuResponseDto>> {
|
|
53663
55036
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductSkuV2(businessId, categoryId, productId, updateProductSkuDto, options);
|
|
53664
55037
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
53665
55038
|
},
|
|
55039
|
+
/**
|
|
55040
|
+
* Saved in Vendure, each trimmed, in the order sent; the first is the product\'s sku. A SKU is unique within the venue; Vendure compares it without case.
|
|
55041
|
+
* @summary Replace every SKU (label code) of a product
|
|
55042
|
+
* @param {string} businessId The venue\'s id; the ticket must cover it
|
|
55043
|
+
* @param {string} categoryId The product\'s category id. Not checked against the product: it is copied into each answered row as category_id
|
|
55044
|
+
* @param {string} productId The product\'s id in Vendure: a whole number from 1, with no leading zero; anything else is refused with 400 before Vendure is asked
|
|
55045
|
+
* @param {UpdateProductSkusDto} updateProductSkusDto Every SKU the product keeps, in order
|
|
55046
|
+
* @param {*} [options] Override http request option.
|
|
55047
|
+
* @throws {RequiredError}
|
|
55048
|
+
*/
|
|
55049
|
+
async updateProductSkusV2(businessId: string, categoryId: string, productId: string, updateProductSkusDto: UpdateProductSkusDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductSkusResponseDto>> {
|
|
55050
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductSkusV2(businessId, categoryId, productId, updateProductSkusDto, options);
|
|
55051
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
55052
|
+
},
|
|
53666
55053
|
}
|
|
53667
55054
|
};
|
|
53668
55055
|
|
|
@@ -53706,11 +55093,25 @@ export const ProductApiFactory = function (configuration?: Configuration, basePa
|
|
|
53706
55093
|
* @param {string} productId The product\'s id in Vendure: a whole number from 1, with no leading zero; anything else is refused with 400 before Vendure is asked
|
|
53707
55094
|
* @param {UpdateProductSkuDto} updateProductSkuDto The SKU to save
|
|
53708
55095
|
* @param {*} [options] Override http request option.
|
|
55096
|
+
* @deprecated
|
|
53709
55097
|
* @throws {RequiredError}
|
|
53710
55098
|
*/
|
|
53711
55099
|
updateProductSkuV2(businessId: string, categoryId: string, productId: string, updateProductSkuDto: UpdateProductSkuDto, options?: any): AxiosPromise<ProductSkuResponseDto> {
|
|
53712
55100
|
return localVarFp.updateProductSkuV2(businessId, categoryId, productId, updateProductSkuDto, options).then((request) => request(axios, basePath));
|
|
53713
55101
|
},
|
|
55102
|
+
/**
|
|
55103
|
+
* Saved in Vendure, each trimmed, in the order sent; the first is the product\'s sku. A SKU is unique within the venue; Vendure compares it without case.
|
|
55104
|
+
* @summary Replace every SKU (label code) of a product
|
|
55105
|
+
* @param {string} businessId The venue\'s id; the ticket must cover it
|
|
55106
|
+
* @param {string} categoryId The product\'s category id. Not checked against the product: it is copied into each answered row as category_id
|
|
55107
|
+
* @param {string} productId The product\'s id in Vendure: a whole number from 1, with no leading zero; anything else is refused with 400 before Vendure is asked
|
|
55108
|
+
* @param {UpdateProductSkusDto} updateProductSkusDto Every SKU the product keeps, in order
|
|
55109
|
+
* @param {*} [options] Override http request option.
|
|
55110
|
+
* @throws {RequiredError}
|
|
55111
|
+
*/
|
|
55112
|
+
updateProductSkusV2(businessId: string, categoryId: string, productId: string, updateProductSkusDto: UpdateProductSkusDto, options?: any): AxiosPromise<ProductSkusResponseDto> {
|
|
55113
|
+
return localVarFp.updateProductSkusV2(businessId, categoryId, productId, updateProductSkusDto, options).then((request) => request(axios, basePath));
|
|
55114
|
+
},
|
|
53714
55115
|
};
|
|
53715
55116
|
};
|
|
53716
55117
|
|
|
@@ -53753,11 +55154,25 @@ export interface ProductApiInterface {
|
|
|
53753
55154
|
* @param {string} productId The product\'s id in Vendure: a whole number from 1, with no leading zero; anything else is refused with 400 before Vendure is asked
|
|
53754
55155
|
* @param {UpdateProductSkuDto} updateProductSkuDto The SKU to save
|
|
53755
55156
|
* @param {*} [options] Override http request option.
|
|
55157
|
+
* @deprecated
|
|
53756
55158
|
* @throws {RequiredError}
|
|
53757
55159
|
* @memberof ProductApiInterface
|
|
53758
55160
|
*/
|
|
53759
55161
|
updateProductSkuV2(businessId: string, categoryId: string, productId: string, updateProductSkuDto: UpdateProductSkuDto, options?: AxiosRequestConfig): AxiosPromise<ProductSkuResponseDto>;
|
|
53760
55162
|
|
|
55163
|
+
/**
|
|
55164
|
+
* Saved in Vendure, each trimmed, in the order sent; the first is the product\'s sku. A SKU is unique within the venue; Vendure compares it without case.
|
|
55165
|
+
* @summary Replace every SKU (label code) of a product
|
|
55166
|
+
* @param {string} businessId The venue\'s id; the ticket must cover it
|
|
55167
|
+
* @param {string} categoryId The product\'s category id. Not checked against the product: it is copied into each answered row as category_id
|
|
55168
|
+
* @param {string} productId The product\'s id in Vendure: a whole number from 1, with no leading zero; anything else is refused with 400 before Vendure is asked
|
|
55169
|
+
* @param {UpdateProductSkusDto} updateProductSkusDto Every SKU the product keeps, in order
|
|
55170
|
+
* @param {*} [options] Override http request option.
|
|
55171
|
+
* @throws {RequiredError}
|
|
55172
|
+
* @memberof ProductApiInterface
|
|
55173
|
+
*/
|
|
55174
|
+
updateProductSkusV2(businessId: string, categoryId: string, productId: string, updateProductSkusDto: UpdateProductSkusDto, options?: AxiosRequestConfig): AxiosPromise<ProductSkusResponseDto>;
|
|
55175
|
+
|
|
53761
55176
|
}
|
|
53762
55177
|
|
|
53763
55178
|
/**
|
|
@@ -53804,12 +55219,28 @@ export class ProductApi extends BaseAPI implements ProductApiInterface {
|
|
|
53804
55219
|
* @param {string} productId The product\'s id in Vendure: a whole number from 1, with no leading zero; anything else is refused with 400 before Vendure is asked
|
|
53805
55220
|
* @param {UpdateProductSkuDto} updateProductSkuDto The SKU to save
|
|
53806
55221
|
* @param {*} [options] Override http request option.
|
|
55222
|
+
* @deprecated
|
|
53807
55223
|
* @throws {RequiredError}
|
|
53808
55224
|
* @memberof ProductApi
|
|
53809
55225
|
*/
|
|
53810
55226
|
public updateProductSkuV2(businessId: string, categoryId: string, productId: string, updateProductSkuDto: UpdateProductSkuDto, options?: AxiosRequestConfig) {
|
|
53811
55227
|
return ProductApiFp(this.configuration).updateProductSkuV2(businessId, categoryId, productId, updateProductSkuDto, options).then((request) => request(this.axios, this.basePath));
|
|
53812
55228
|
}
|
|
55229
|
+
|
|
55230
|
+
/**
|
|
55231
|
+
* Saved in Vendure, each trimmed, in the order sent; the first is the product\'s sku. A SKU is unique within the venue; Vendure compares it without case.
|
|
55232
|
+
* @summary Replace every SKU (label code) of a product
|
|
55233
|
+
* @param {string} businessId The venue\'s id; the ticket must cover it
|
|
55234
|
+
* @param {string} categoryId The product\'s category id. Not checked against the product: it is copied into each answered row as category_id
|
|
55235
|
+
* @param {string} productId The product\'s id in Vendure: a whole number from 1, with no leading zero; anything else is refused with 400 before Vendure is asked
|
|
55236
|
+
* @param {UpdateProductSkusDto} updateProductSkusDto Every SKU the product keeps, in order
|
|
55237
|
+
* @param {*} [options] Override http request option.
|
|
55238
|
+
* @throws {RequiredError}
|
|
55239
|
+
* @memberof ProductApi
|
|
55240
|
+
*/
|
|
55241
|
+
public updateProductSkusV2(businessId: string, categoryId: string, productId: string, updateProductSkusDto: UpdateProductSkusDto, options?: AxiosRequestConfig) {
|
|
55242
|
+
return ProductApiFp(this.configuration).updateProductSkusV2(businessId, categoryId, productId, updateProductSkusDto, options).then((request) => request(this.axios, this.basePath));
|
|
55243
|
+
}
|
|
53813
55244
|
}
|
|
53814
55245
|
|
|
53815
55246
|
|