@viu/emporix-sdk 2.21.0 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +146 -0
- package/dist/availability.cjs +118 -0
- package/dist/availability.cjs.map +1 -1
- package/dist/availability.d.cts +178 -2
- package/dist/availability.d.ts +178 -2
- package/dist/availability.js +1 -1
- package/dist/cart.cjs +215 -9
- package/dist/cart.cjs.map +1 -1
- package/dist/cart.d.cts +281 -3
- package/dist/cart.d.ts +281 -3
- package/dist/cart.js +1 -1
- package/dist/category.cjs +220 -2
- package/dist/category.cjs.map +1 -1
- package/dist/category.d.cts +408 -1
- package/dist/category.d.ts +408 -1
- package/dist/category.js +1 -1
- package/dist/{chunk-HD5RBCM6.js → chunk-27NLS646.js} +10 -2
- package/dist/chunk-27NLS646.js.map +1 -0
- package/dist/{chunk-PYLWZZC4.js → chunk-6PJFOX3A.js} +126 -2
- package/dist/chunk-6PJFOX3A.js.map +1 -0
- package/dist/chunk-HWVFF6B2.js +378 -0
- package/dist/chunk-HWVFF6B2.js.map +1 -0
- package/dist/chunk-LQFRJSVT.js +224 -0
- package/dist/chunk-LQFRJSVT.js.map +1 -0
- package/dist/chunk-P7G4LOOV.js +264 -0
- package/dist/chunk-P7G4LOOV.js.map +1 -0
- package/dist/{chunk-HBEQEIT6.js → chunk-PRN3T6TY.js} +63 -3
- package/dist/chunk-PRN3T6TY.js.map +1 -0
- package/dist/{chunk-44F52KRE.js → chunk-QQMLN76U.js} +27 -2
- package/dist/chunk-QQMLN76U.js.map +1 -0
- package/dist/chunk-UNW6SFSB.js +363 -0
- package/dist/chunk-UNW6SFSB.js.map +1 -0
- package/dist/chunk-V3275BA7.js +181 -0
- package/dist/chunk-V3275BA7.js.map +1 -0
- package/dist/chunk-W2KBVWJ2.js +323 -0
- package/dist/chunk-W2KBVWJ2.js.map +1 -0
- package/dist/chunk-YVZ6GOLE.js +399 -0
- package/dist/chunk-YVZ6GOLE.js.map +1 -0
- package/dist/chunk-ZOFGDNSX.js +305 -0
- package/dist/chunk-ZOFGDNSX.js.map +1 -0
- package/dist/companies.cjs +25 -0
- package/dist/companies.cjs.map +1 -1
- package/dist/companies.d.cts +14 -0
- package/dist/companies.d.ts +14 -0
- package/dist/companies.js +1 -1
- package/dist/contacts.cjs +8 -0
- package/dist/contacts.cjs.map +1 -1
- package/dist/contacts.d.cts +2 -0
- package/dist/contacts.d.ts +2 -0
- package/dist/contacts.js +1 -1
- package/dist/customer-groups-BxSNFHq1.d.cts +706 -0
- package/dist/customer-groups-GlzWhDsi.d.ts +706 -0
- package/dist/customer-groups.cjs +200 -17
- package/dist/customer-groups.cjs.map +1 -1
- package/dist/customer-groups.d.cts +2 -110
- package/dist/customer-groups.d.ts +2 -110
- package/dist/customer-groups.js +1 -1
- package/dist/customer.cjs +61 -1
- package/dist/customer.cjs.map +1 -1
- package/dist/customer.d.cts +48 -1
- package/dist/customer.d.ts +48 -1
- package/dist/customer.js +1 -1
- package/dist/index.cjs +2566 -554
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +455 -12
- package/dist/index.d.ts +455 -12
- package/dist/index.js +687 -342
- package/dist/index.js.map +1 -1
- package/dist/orders.cjs +160 -2
- package/dist/orders.cjs.map +1 -1
- package/dist/orders.d.cts +221 -1
- package/dist/orders.d.ts +221 -1
- package/dist/orders.js +1 -1
- package/dist/payment.cjs +124 -0
- package/dist/payment.cjs.map +1 -1
- package/dist/payment.d.cts +335 -1
- package/dist/payment.d.ts +335 -1
- package/dist/payment.js +1 -1
- package/dist/price.cjs +197 -0
- package/dist/price.cjs.map +1 -1
- package/dist/price.d.cts +577 -1
- package/dist/price.d.ts +577 -1
- package/dist/price.js +1 -1
- package/dist/product.cjs +190 -0
- package/dist/product.cjs.map +1 -1
- package/dist/product.d.cts +503 -1
- package/dist/product.d.ts +503 -1
- package/dist/product.js +1 -1
- package/dist/segment.cjs +179 -0
- package/dist/segment.cjs.map +1 -1
- package/dist/segment.d.cts +181 -1
- package/dist/segment.d.ts +181 -1
- package/dist/segment.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-36T4YPQJ.js +0 -106
- package/dist/chunk-36T4YPQJ.js.map +0 -1
- package/dist/chunk-3BTPX7IJ.js +0 -41
- package/dist/chunk-3BTPX7IJ.js.map +0 -1
- package/dist/chunk-44F52KRE.js.map +0 -1
- package/dist/chunk-A3LYJUD4.js +0 -108
- package/dist/chunk-A3LYJUD4.js.map +0 -1
- package/dist/chunk-FZMP5NQZ.js +0 -173
- package/dist/chunk-FZMP5NQZ.js.map +0 -1
- package/dist/chunk-HBEQEIT6.js.map +0 -1
- package/dist/chunk-HD5RBCM6.js.map +0 -1
- package/dist/chunk-HUEMYP2L.js +0 -193
- package/dist/chunk-HUEMYP2L.js.map +0 -1
- package/dist/chunk-IVCCGJN5.js +0 -63
- package/dist/chunk-IVCCGJN5.js.map +0 -1
- package/dist/chunk-NE7MIZPR.js +0 -144
- package/dist/chunk-NE7MIZPR.js.map +0 -1
- package/dist/chunk-PYLWZZC4.js.map +0 -1
- package/dist/chunk-ZNLHLFQM.js +0 -160
- package/dist/chunk-ZNLHLFQM.js.map +0 -1
|
@@ -0,0 +1,706 @@
|
|
|
1
|
+
import { C as ClientContext, b as AuthContext } from './context-CfXJcYKP.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Access control metadata.
|
|
5
|
+
*/
|
|
6
|
+
type AccessControlMetadataQueryDocument = {
|
|
7
|
+
/**
|
|
8
|
+
* Access control document version.
|
|
9
|
+
*/
|
|
10
|
+
version: number;
|
|
11
|
+
/**
|
|
12
|
+
* Timestamp indicating when the access control was created.
|
|
13
|
+
*/
|
|
14
|
+
createdAt: string;
|
|
15
|
+
/**
|
|
16
|
+
* Timestamp indicating when the access control was last modified.
|
|
17
|
+
*/
|
|
18
|
+
modifiedAt?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Definition of access control
|
|
22
|
+
*/
|
|
23
|
+
type AccessControlQueryDocument = {
|
|
24
|
+
/**
|
|
25
|
+
* Assignment unique identifier generated when the assignment is created.
|
|
26
|
+
*/
|
|
27
|
+
id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Role unique identifier associated with this access control.
|
|
30
|
+
* @deprecated
|
|
31
|
+
*/
|
|
32
|
+
roleId?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Resource unique identifier associated with this access control.
|
|
35
|
+
* @deprecated
|
|
36
|
+
*/
|
|
37
|
+
resourceId?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Domain identifiers associated with this access control.
|
|
40
|
+
*/
|
|
41
|
+
domains?: Array<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Localized resource name in the form of a map of translations.
|
|
44
|
+
*/
|
|
45
|
+
name?: {
|
|
46
|
+
[key: string]: string;
|
|
47
|
+
};
|
|
48
|
+
role?: RoleQueryDocument;
|
|
49
|
+
resource?: ResourceQueryDocument;
|
|
50
|
+
metadata?: AccessControlMetadataQueryDocument;
|
|
51
|
+
/**
|
|
52
|
+
* A list of resolved scopes for a particular access control.
|
|
53
|
+
*/
|
|
54
|
+
scopes?: Array<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Determines whether this access control generates scopes with restriction suffixes when assigned to a group that has restrictions defined. When `true`, the generated scopes will include restrictions (e.g. order.`order_manage--DE`) based on the group's restrictions list. When `false`, scopes are generated without restriction suffixes regardless of the group's restrictions.
|
|
57
|
+
*/
|
|
58
|
+
restrictionAware?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Restricts the type of group this access control can be assigned to.
|
|
61
|
+
* * `CUSTOMER` - the access control can be assigned only to groups of `CUSTOMER` user type.
|
|
62
|
+
* * `EMPLOYEE` - the access control can be assigned only to groups of `EMPLOYEE` user type.
|
|
63
|
+
*
|
|
64
|
+
* If this property is not present, the access control can be assigned to any group regardless of its user type.
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
restrictedTo?: 'CUSTOMER' | 'EMPLOYEE';
|
|
68
|
+
/**
|
|
69
|
+
* Indicated whether this access control is predefined in the system or was created by a user.
|
|
70
|
+
*/
|
|
71
|
+
readonly predefined?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Indicated whether this access control is associated with vendor scopes.
|
|
74
|
+
*/
|
|
75
|
+
readonly vendorAware?: boolean;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Payload for creating or updating an access control.
|
|
79
|
+
*/
|
|
80
|
+
type AccessControlUpsertRequest = {
|
|
81
|
+
/**
|
|
82
|
+
* Localized name as a map of language codes to text.
|
|
83
|
+
*/
|
|
84
|
+
name?: {
|
|
85
|
+
[key: string]: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Localized description as a map of language codes to text.
|
|
89
|
+
*/
|
|
90
|
+
description?: {
|
|
91
|
+
[key: string]: string;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Scope codes for this access control. Must not be empty.
|
|
95
|
+
*/
|
|
96
|
+
scopes: Array<string>;
|
|
97
|
+
/**
|
|
98
|
+
* Domain identifiers for the access control.
|
|
99
|
+
*/
|
|
100
|
+
domains?: Array<string>;
|
|
101
|
+
/**
|
|
102
|
+
* Restricts the type of group this access control can be assigned to.
|
|
103
|
+
* * `CUSTOMER` - the access control can be assigned only to groups of `CUSTOMER` user type.
|
|
104
|
+
* * `EMPLOYEE` - the access control can be assigned only to groups of `EMPLOYEE` user type.
|
|
105
|
+
*
|
|
106
|
+
* If this property is not present, the access control can be assigned to any group regardless of its user type.
|
|
107
|
+
*
|
|
108
|
+
* **Note**: This property is immutable. It can only be set when the access control is created and cannot be changed afterwards.
|
|
109
|
+
*
|
|
110
|
+
*/
|
|
111
|
+
restrictedTo?: 'CUSTOMER' | 'EMPLOYEE';
|
|
112
|
+
/**
|
|
113
|
+
* Metadata for optimistic locking on updates. Only `version` is supported.
|
|
114
|
+
*/
|
|
115
|
+
metadata?: {
|
|
116
|
+
/**
|
|
117
|
+
* Document version. When provided on update, must match the stored version.
|
|
118
|
+
*/
|
|
119
|
+
version?: number;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
type AccessControlIdResponse = {
|
|
123
|
+
/**
|
|
124
|
+
* ID of the created access control. Matches the `accessControlId` path parameter.
|
|
125
|
+
*/
|
|
126
|
+
id?: string;
|
|
127
|
+
};
|
|
128
|
+
type AssignmentCreateRequest = {
|
|
129
|
+
/**
|
|
130
|
+
* User unique identifier generated when the user is created. Might be customer ID or Management Dashboard user ID.
|
|
131
|
+
*/
|
|
132
|
+
userId: string;
|
|
133
|
+
/**
|
|
134
|
+
* Assignment type, possible values: CUSTOMER, EMPLOYEE
|
|
135
|
+
*/
|
|
136
|
+
userType?: 'CUSTOMER' | 'EMPLOYEE';
|
|
137
|
+
};
|
|
138
|
+
type AssignmentIdResponse = {
|
|
139
|
+
/**
|
|
140
|
+
* ID of generated document.
|
|
141
|
+
*/
|
|
142
|
+
id?: string;
|
|
143
|
+
};
|
|
144
|
+
type GroupCreateRequest = {
|
|
145
|
+
/**
|
|
146
|
+
* Custom group's identifier. If not provided, it is automatically generated
|
|
147
|
+
*/
|
|
148
|
+
id?: string;
|
|
149
|
+
/**
|
|
150
|
+
* An identifier of a vendor to whom the group belongs. Can only be set during creation and is immutable thereafter. A group with vendorId can only be assigned to users of type `EMPLOYEE`
|
|
151
|
+
*/
|
|
152
|
+
readonly vendorId?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Localized group name in the form of a map of translations.
|
|
155
|
+
*/
|
|
156
|
+
name: {
|
|
157
|
+
[key: string]: string;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Localized group description in the form of a map of translations.
|
|
161
|
+
*/
|
|
162
|
+
description?: {
|
|
163
|
+
[key: string]: string;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Custom group attributes that need to be included directly in the `mixins` object.
|
|
167
|
+
*/
|
|
168
|
+
mixins?: {
|
|
169
|
+
[key: string]: unknown;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Access control unique identifiers associated with this group. Required to perform the request.
|
|
173
|
+
*/
|
|
174
|
+
accessControls?: Array<string> | null;
|
|
175
|
+
/**
|
|
176
|
+
* The type of the group. Possible values: 'CUSTOMER', 'EMPLOYEE'. Default value 'EMPLOYEE' if not provided.
|
|
177
|
+
*/
|
|
178
|
+
userType?: 'CUSTOMER' | 'EMPLOYEE';
|
|
179
|
+
/**
|
|
180
|
+
* Template unique identifier associated with this group. Required to perform the request.
|
|
181
|
+
*/
|
|
182
|
+
templates?: Array<string> | null;
|
|
183
|
+
/**
|
|
184
|
+
* Additional properties for B2B.
|
|
185
|
+
*/
|
|
186
|
+
b2b?: {
|
|
187
|
+
/**
|
|
188
|
+
* Identifier of the assigned legal entity.
|
|
189
|
+
*/
|
|
190
|
+
legalEntityId?: string;
|
|
191
|
+
};
|
|
192
|
+
restrictions?: Restrictions;
|
|
193
|
+
};
|
|
194
|
+
type GroupUpdateRequest = {
|
|
195
|
+
/**
|
|
196
|
+
* Localized group name in the form of a map of translations.
|
|
197
|
+
*/
|
|
198
|
+
name: {
|
|
199
|
+
[key: string]: string;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Localized group description in the form of a map of translations.
|
|
203
|
+
*/
|
|
204
|
+
description?: {
|
|
205
|
+
[key: string]: string;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Custom group attributes that need to be included directly in the `mixins` object.
|
|
209
|
+
*/
|
|
210
|
+
mixins?: {
|
|
211
|
+
[key: string]: unknown;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Access control unique identifiers associated with this group. Required to perform the request.
|
|
215
|
+
*/
|
|
216
|
+
accessControls?: Array<string> | null;
|
|
217
|
+
/**
|
|
218
|
+
* The type of the group. Possible values: 'CUSTOMER', 'EMPLOYEE'. Default value 'EMPLOYEE' if not provided
|
|
219
|
+
*/
|
|
220
|
+
userType?: 'CUSTOMER' | 'EMPLOYEE';
|
|
221
|
+
/**
|
|
222
|
+
* Template unique identifier associated with this group. Required to perform the request.
|
|
223
|
+
*/
|
|
224
|
+
templates?: Array<string> | null;
|
|
225
|
+
/**
|
|
226
|
+
* additional properties for B2B
|
|
227
|
+
*/
|
|
228
|
+
b2b?: {
|
|
229
|
+
/**
|
|
230
|
+
* identifier of the assigned legal entity
|
|
231
|
+
*/
|
|
232
|
+
legalEntityId?: string;
|
|
233
|
+
};
|
|
234
|
+
restrictions?: Restrictions;
|
|
235
|
+
/**
|
|
236
|
+
* Metadata of the updated group.
|
|
237
|
+
*/
|
|
238
|
+
metadata?: {
|
|
239
|
+
/**
|
|
240
|
+
* Version of the entity, If provided optimistic locking is enabled and its version must match the version of the document in the database.
|
|
241
|
+
*/
|
|
242
|
+
version?: number;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
type GroupIdResponse = {
|
|
246
|
+
/**
|
|
247
|
+
* ID of the generated document.
|
|
248
|
+
*/
|
|
249
|
+
id?: string;
|
|
250
|
+
};
|
|
251
|
+
type UserIdResponse = {
|
|
252
|
+
/**
|
|
253
|
+
* ID of the generated/updated user.
|
|
254
|
+
*/
|
|
255
|
+
id?: string;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Group metadata.
|
|
259
|
+
*/
|
|
260
|
+
type GroupsMetadataQueryDocument = {
|
|
261
|
+
/**
|
|
262
|
+
* Group document version.
|
|
263
|
+
*/
|
|
264
|
+
version: number;
|
|
265
|
+
/**
|
|
266
|
+
* Timestamp indicating when the group was created.
|
|
267
|
+
*/
|
|
268
|
+
createdAt: string;
|
|
269
|
+
/**
|
|
270
|
+
* Timestamp indicating when the group was last modified.
|
|
271
|
+
*/
|
|
272
|
+
modifiedAt?: string;
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* Definition of groups
|
|
276
|
+
*/
|
|
277
|
+
type GroupsQueryDocument = {
|
|
278
|
+
/**
|
|
279
|
+
* Group unique identifier generated when the group is created.
|
|
280
|
+
*/
|
|
281
|
+
id?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Localized group name in the form of a map of translations.
|
|
284
|
+
*/
|
|
285
|
+
name?: {
|
|
286
|
+
[key: string]: string;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Localized group description in the form of a map of translations.
|
|
290
|
+
*/
|
|
291
|
+
description?: {
|
|
292
|
+
[key: string]: string;
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* An identifier of a vendor to whom the group belongs. Can only be set during creation and is immutable thereafter. A group with vendorId can only be assigned to users of type `EMPLOYEE`
|
|
296
|
+
*/
|
|
297
|
+
readonly vendorId?: string;
|
|
298
|
+
/**
|
|
299
|
+
* Access control unique identifiers associated with this group.
|
|
300
|
+
*/
|
|
301
|
+
accessControls?: Array<string>;
|
|
302
|
+
/**
|
|
303
|
+
* Template unique identifiers associated with this group.
|
|
304
|
+
*/
|
|
305
|
+
templates?: Array<string>;
|
|
306
|
+
code?: string;
|
|
307
|
+
/**
|
|
308
|
+
* The group type determines if the group can consist of users of the `CUSTOMER` or the `EMPLOYEE` type.
|
|
309
|
+
*/
|
|
310
|
+
userType?: string;
|
|
311
|
+
/**
|
|
312
|
+
* additional properties for B2B
|
|
313
|
+
*/
|
|
314
|
+
b2b?: {
|
|
315
|
+
/**
|
|
316
|
+
* identifier of the assigned legal entity
|
|
317
|
+
*/
|
|
318
|
+
legalEntityId?: string;
|
|
319
|
+
};
|
|
320
|
+
restrictions?: Restrictions;
|
|
321
|
+
/**
|
|
322
|
+
* Custom group attributes that need to be included directly in the `mixins` object.
|
|
323
|
+
*/
|
|
324
|
+
mixins?: {
|
|
325
|
+
[key: string]: string;
|
|
326
|
+
};
|
|
327
|
+
metadata?: GroupsMetadataQueryDocument;
|
|
328
|
+
};
|
|
329
|
+
type Restrictions = Array<string>;
|
|
330
|
+
/**
|
|
331
|
+
* Resource definition associated with this access control.
|
|
332
|
+
*/
|
|
333
|
+
type ResourceQueryDocument = {
|
|
334
|
+
/**
|
|
335
|
+
* Resource unique identifier generated when the resource is created.
|
|
336
|
+
*/
|
|
337
|
+
id?: string;
|
|
338
|
+
/**
|
|
339
|
+
* Localized resource name in the form of a map of translations.
|
|
340
|
+
*/
|
|
341
|
+
name?: {
|
|
342
|
+
[key: string]: string;
|
|
343
|
+
};
|
|
344
|
+
/**
|
|
345
|
+
* Localized resource description in the form of a map of translations.
|
|
346
|
+
*/
|
|
347
|
+
description?: {
|
|
348
|
+
[key: string]: string;
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Resource unique code identifier.
|
|
352
|
+
*/
|
|
353
|
+
code?: string;
|
|
354
|
+
metadata?: ResourcesMetadataQueryDocument;
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* Resource metadata.
|
|
358
|
+
*/
|
|
359
|
+
type ResourcesMetadataQueryDocument = {
|
|
360
|
+
/**
|
|
361
|
+
* Resource document version.
|
|
362
|
+
*/
|
|
363
|
+
version: number;
|
|
364
|
+
/**
|
|
365
|
+
* Timestamp indicating when the resource was created.
|
|
366
|
+
*/
|
|
367
|
+
createdAt: string;
|
|
368
|
+
/**
|
|
369
|
+
* Timestamp indicating when the resource was last modified.
|
|
370
|
+
*/
|
|
371
|
+
modifiedAt?: string;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* Role permissions list.
|
|
375
|
+
*/
|
|
376
|
+
type RolePermissionsDocument = {
|
|
377
|
+
/**
|
|
378
|
+
* Allows you to allowlist resources that the permission is applicable to. Can only contain resources specified in the permission document under `applicableResources`.
|
|
379
|
+
*
|
|
380
|
+
*/
|
|
381
|
+
applicablePermissionResources?: Array<string>;
|
|
382
|
+
/**
|
|
383
|
+
* Reference to the permission document with specific resources defined.
|
|
384
|
+
*/
|
|
385
|
+
id: string;
|
|
386
|
+
};
|
|
387
|
+
/**
|
|
388
|
+
* Role definition associated with this access control.
|
|
389
|
+
*/
|
|
390
|
+
type RoleQueryDocument = {
|
|
391
|
+
/**
|
|
392
|
+
* Role unique identifier generated when the role is created.
|
|
393
|
+
*/
|
|
394
|
+
id?: string;
|
|
395
|
+
/**
|
|
396
|
+
* Localized role name in the form of a map of translations.
|
|
397
|
+
*/
|
|
398
|
+
name?: {
|
|
399
|
+
[key: string]: string;
|
|
400
|
+
};
|
|
401
|
+
/**
|
|
402
|
+
* Localized role description in the form of a map of translations.
|
|
403
|
+
*/
|
|
404
|
+
description?: {
|
|
405
|
+
[key: string]: string;
|
|
406
|
+
};
|
|
407
|
+
/**
|
|
408
|
+
* Permissions unique identifier list declared for this role.
|
|
409
|
+
*/
|
|
410
|
+
permissions?: Array<RolePermissionsDocument>;
|
|
411
|
+
metadata?: RolesMetadata;
|
|
412
|
+
};
|
|
413
|
+
type RolesMetadata = {
|
|
414
|
+
/**
|
|
415
|
+
* Role document version.
|
|
416
|
+
*/
|
|
417
|
+
version: number;
|
|
418
|
+
/**
|
|
419
|
+
* Timestamp indicating when the role was created.
|
|
420
|
+
*/
|
|
421
|
+
createdAt: string;
|
|
422
|
+
/**
|
|
423
|
+
* Timestamp indicating when the role was last modified.
|
|
424
|
+
*/
|
|
425
|
+
modifiedAt?: string;
|
|
426
|
+
};
|
|
427
|
+
/**
|
|
428
|
+
* Definition of user scopes
|
|
429
|
+
*/
|
|
430
|
+
type UserScopesResponse = {
|
|
431
|
+
/**
|
|
432
|
+
* User unique identifier.
|
|
433
|
+
*/
|
|
434
|
+
userId?: string;
|
|
435
|
+
/**
|
|
436
|
+
* User scopes.
|
|
437
|
+
*/
|
|
438
|
+
scopes?: string;
|
|
439
|
+
/**
|
|
440
|
+
* An identifier of a vendor to whom the user belongs. Calculated based on groups assignment
|
|
441
|
+
*/
|
|
442
|
+
readonly vendorId?: string;
|
|
443
|
+
};
|
|
444
|
+
/**
|
|
445
|
+
* User response schema
|
|
446
|
+
*/
|
|
447
|
+
type UserResponse = {
|
|
448
|
+
/**
|
|
449
|
+
* User unique identifier generated when the group is created.
|
|
450
|
+
*/
|
|
451
|
+
id: string;
|
|
452
|
+
/**
|
|
453
|
+
* User first name.
|
|
454
|
+
*/
|
|
455
|
+
firstName: string;
|
|
456
|
+
/**
|
|
457
|
+
* User last name.
|
|
458
|
+
*/
|
|
459
|
+
lastName: string;
|
|
460
|
+
/**
|
|
461
|
+
* For a new user, the value is the same as Id. For an existing user, the value is an internal number. This field should be used when retrieving user details and for user update and deletion.
|
|
462
|
+
*/
|
|
463
|
+
backofficeUserNumber: string;
|
|
464
|
+
/**
|
|
465
|
+
* User preferred site
|
|
466
|
+
*/
|
|
467
|
+
preferredSite: string;
|
|
468
|
+
/**
|
|
469
|
+
* User preferred currency
|
|
470
|
+
*/
|
|
471
|
+
preferredCurrency: string;
|
|
472
|
+
/**
|
|
473
|
+
* User preferred language
|
|
474
|
+
*/
|
|
475
|
+
preferredLanguage: string;
|
|
476
|
+
/**
|
|
477
|
+
* User department
|
|
478
|
+
*/
|
|
479
|
+
department: string;
|
|
480
|
+
/**
|
|
481
|
+
* Account creation date
|
|
482
|
+
*/
|
|
483
|
+
validFrom: string;
|
|
484
|
+
/**
|
|
485
|
+
* Indicates whether user is able to log in to Management Dashboard.
|
|
486
|
+
*/
|
|
487
|
+
isAccountLocked: boolean;
|
|
488
|
+
/**
|
|
489
|
+
* User contact email
|
|
490
|
+
*/
|
|
491
|
+
contactEmail: string;
|
|
492
|
+
/**
|
|
493
|
+
* Indicates user status. May be 'Active' or 'Provisioned' in case user does not confirm their email.
|
|
494
|
+
*/
|
|
495
|
+
status: string;
|
|
496
|
+
/**
|
|
497
|
+
* Group ids where user is assigned to.
|
|
498
|
+
*/
|
|
499
|
+
groupIds: Array<string>;
|
|
500
|
+
/**
|
|
501
|
+
* Group extended definition, may be fetched when `extend` param is used
|
|
502
|
+
*/
|
|
503
|
+
groups?: Array<{
|
|
504
|
+
/**
|
|
505
|
+
* Group unique identifier generated when the group is created.
|
|
506
|
+
*/
|
|
507
|
+
id?: string;
|
|
508
|
+
/**
|
|
509
|
+
* Localized group name in the form of a map of translations.
|
|
510
|
+
*/
|
|
511
|
+
name?: unknown;
|
|
512
|
+
/**
|
|
513
|
+
* Localized group description in the form of a map of translations.
|
|
514
|
+
*/
|
|
515
|
+
description?: {
|
|
516
|
+
[key: string]: string;
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* Internal code of a group.
|
|
520
|
+
*/
|
|
521
|
+
code?: string;
|
|
522
|
+
/**
|
|
523
|
+
* The group type determines if the group can consist of users of the `CUSTOMER` or the `EMPLOYEE` type.
|
|
524
|
+
*/
|
|
525
|
+
userType?: string;
|
|
526
|
+
}>;
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* User response schema extended with additional information
|
|
530
|
+
*/
|
|
531
|
+
type UserExtendedResponse = UserResponse & {
|
|
532
|
+
/**
|
|
533
|
+
* Timestamp of account's last login
|
|
534
|
+
*/
|
|
535
|
+
lastLogin?: string;
|
|
536
|
+
};
|
|
537
|
+
/**
|
|
538
|
+
* User update schema
|
|
539
|
+
*/
|
|
540
|
+
type UserUpdateRequest = {
|
|
541
|
+
/**
|
|
542
|
+
* User first name.
|
|
543
|
+
*/
|
|
544
|
+
firstName: string;
|
|
545
|
+
/**
|
|
546
|
+
* User last name.
|
|
547
|
+
*/
|
|
548
|
+
lastName: string;
|
|
549
|
+
/**
|
|
550
|
+
* User preferred site
|
|
551
|
+
*/
|
|
552
|
+
preferredSite: string;
|
|
553
|
+
/**
|
|
554
|
+
* User preferred currency
|
|
555
|
+
*/
|
|
556
|
+
preferredCurrency: string;
|
|
557
|
+
/**
|
|
558
|
+
* User preferred language
|
|
559
|
+
*/
|
|
560
|
+
preferredLanguage: string;
|
|
561
|
+
/**
|
|
562
|
+
* User department
|
|
563
|
+
*/
|
|
564
|
+
department: string;
|
|
565
|
+
/**
|
|
566
|
+
* User backoffice user number. For new users, it is the same as ID. For existing users, it may be different.
|
|
567
|
+
*/
|
|
568
|
+
backofficeUserNumber: string;
|
|
569
|
+
/**
|
|
570
|
+
* Groups unique identifier attached to this user. Required to perform the request.
|
|
571
|
+
*/
|
|
572
|
+
groupIds: Array<string>;
|
|
573
|
+
};
|
|
574
|
+
type UserCreateRequest = {
|
|
575
|
+
/**
|
|
576
|
+
* User first name.
|
|
577
|
+
*/
|
|
578
|
+
firstName: string;
|
|
579
|
+
/**
|
|
580
|
+
* User last name.
|
|
581
|
+
*/
|
|
582
|
+
lastName: string;
|
|
583
|
+
/**
|
|
584
|
+
* User preferred site
|
|
585
|
+
*/
|
|
586
|
+
preferredSite: string;
|
|
587
|
+
/**
|
|
588
|
+
* User preferred currency
|
|
589
|
+
*/
|
|
590
|
+
preferredCurrency: string;
|
|
591
|
+
/**
|
|
592
|
+
* User preferred language
|
|
593
|
+
*/
|
|
594
|
+
preferredLanguage: string;
|
|
595
|
+
/**
|
|
596
|
+
* User department
|
|
597
|
+
*/
|
|
598
|
+
department: string;
|
|
599
|
+
/**
|
|
600
|
+
* User contact email
|
|
601
|
+
*/
|
|
602
|
+
contactEmail: string;
|
|
603
|
+
/**
|
|
604
|
+
* Unique identifier of a group associated with to this user. Required to perform the request.
|
|
605
|
+
*/
|
|
606
|
+
groupIds: Array<string>;
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
* Scope metadata.
|
|
610
|
+
*/
|
|
611
|
+
type CustomScopeMetadataQueryDocument = {
|
|
612
|
+
/**
|
|
613
|
+
* Scope document version.
|
|
614
|
+
*/
|
|
615
|
+
version: number;
|
|
616
|
+
/**
|
|
617
|
+
* Timestamp indicating when the scope was created.
|
|
618
|
+
*/
|
|
619
|
+
createdAt: string;
|
|
620
|
+
/**
|
|
621
|
+
* Timestamp indicating when the scope was last modified.
|
|
622
|
+
*/
|
|
623
|
+
modifiedAt?: string;
|
|
624
|
+
};
|
|
625
|
+
/**
|
|
626
|
+
* Definition of a scope.
|
|
627
|
+
*/
|
|
628
|
+
type CustomScopeQueryDocument = {
|
|
629
|
+
/**
|
|
630
|
+
* Scope identifier.
|
|
631
|
+
*/
|
|
632
|
+
id?: string;
|
|
633
|
+
/**
|
|
634
|
+
* Localized description as a map of language codes to text.
|
|
635
|
+
*/
|
|
636
|
+
description?: {
|
|
637
|
+
[key: string]: string;
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* Domain identifier for the scope.
|
|
641
|
+
*/
|
|
642
|
+
domain?: string;
|
|
643
|
+
/**
|
|
644
|
+
* Indicates whether this scope is predefined in the system or was created by a user.
|
|
645
|
+
*/
|
|
646
|
+
readonly predefined?: boolean;
|
|
647
|
+
metadata?: CustomScopeMetadataQueryDocument;
|
|
648
|
+
};
|
|
649
|
+
/**
|
|
650
|
+
* Payload for creating or updating a scope.
|
|
651
|
+
*/
|
|
652
|
+
type CustomScopeUpsertRequest = {
|
|
653
|
+
/**
|
|
654
|
+
* Localized description as a map of language codes to text.
|
|
655
|
+
*/
|
|
656
|
+
description?: {
|
|
657
|
+
[key: string]: string;
|
|
658
|
+
};
|
|
659
|
+
/**
|
|
660
|
+
* Domain identifier for the scope.
|
|
661
|
+
*/
|
|
662
|
+
domain?: string;
|
|
663
|
+
/**
|
|
664
|
+
* Metadata for the scope. Only `version` is supported, for optimistic locking on updates.
|
|
665
|
+
*/
|
|
666
|
+
metadata?: {
|
|
667
|
+
/**
|
|
668
|
+
* Document version. When provided on update, must match the stored version.
|
|
669
|
+
*/
|
|
670
|
+
version?: number;
|
|
671
|
+
};
|
|
672
|
+
};
|
|
673
|
+
type CustomScopeIdResponse = {
|
|
674
|
+
id?: string;
|
|
675
|
+
};
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Access to IAM customer groups for a legal entity. Thin B2B-friendly wrapper
|
|
679
|
+
* over {@link IamService.groups}; kept for backward compatibility.
|
|
680
|
+
*
|
|
681
|
+
* `listForCompany` requires `iam.group_read`; the member mutations
|
|
682
|
+
* (`addMember`/`removeMember`) require `iam.group_manage` — typically only
|
|
683
|
+
* granted to Admin-group customers; a 403 surfaces as
|
|
684
|
+
* `EmporixInsufficientScopeError`.
|
|
685
|
+
*/
|
|
686
|
+
declare class CustomerGroupsService {
|
|
687
|
+
private readonly ctx;
|
|
688
|
+
static readonly channel: "iam";
|
|
689
|
+
private readonly iam;
|
|
690
|
+
constructor(ctx: ClientContext);
|
|
691
|
+
/** Lists customer groups belonging to one legal entity. */
|
|
692
|
+
listForCompany(legalEntityId: string, auth: AuthContext): Promise<GroupsQueryDocument[]>;
|
|
693
|
+
/** Adds a user (customer or employee) to a group. */
|
|
694
|
+
addMember(groupId: string, member: AssignmentCreateRequest, auth: AuthContext): Promise<{
|
|
695
|
+
id: string;
|
|
696
|
+
}>;
|
|
697
|
+
/**
|
|
698
|
+
* Removes a user from a group. Uses `DELETE …/groups/{groupId}/users/{userId}`
|
|
699
|
+
* directly — this endpoint is deprecated upstream and intentionally not
|
|
700
|
+
* exposed on {@link IamService}, so it is not delegated. No non-deprecated
|
|
701
|
+
* single-user removal exists.
|
|
702
|
+
*/
|
|
703
|
+
removeMember(groupId: string, userId: string, auth: AuthContext): Promise<void>;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export { type AccessControlIdResponse as A, type CustomScopeIdResponse as C, type GroupCreateRequest as G, type UserCreateRequest as U, type AccessControlQueryDocument as a, type AccessControlUpsertRequest as b, type AssignmentCreateRequest as c, type AssignmentIdResponse as d, type CustomScopeQueryDocument as e, type CustomScopeUpsertRequest as f, CustomerGroupsService as g, type GroupIdResponse as h, type GroupUpdateRequest as i, type GroupsQueryDocument as j, type UserExtendedResponse as k, type UserIdResponse as l, type UserResponse as m, type UserScopesResponse as n, type UserUpdateRequest as o };
|