@commercelayer/provisioning-sdk 2.1.2 → 2.2.1
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/README.md +3 -5
- package/lib/index.d.mts +201 -151
- package/lib/index.d.ts +201 -151
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/package.json +5 -5
package/lib/index.d.mts
CHANGED
|
@@ -170,10 +170,10 @@ declare class ResourceAdapter {
|
|
|
170
170
|
private localConfig;
|
|
171
171
|
config(config: ResourcesConfig): this;
|
|
172
172
|
get client(): Readonly<ApiClient>;
|
|
173
|
-
retrieve<R extends Resource>(resource: ResourceId | ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
|
173
|
+
retrieve<R extends Resource>(resource: ResourceId | ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig, path?: string): Promise<R>;
|
|
174
174
|
list<R extends Resource>(resource: ResourceType, params?: QueryParamsList<R>, options?: ResourcesConfig): Promise<ListResponse<R>>;
|
|
175
175
|
create<C extends ResourceCreate, R extends Resource>(resource: C & ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
|
176
|
-
update<U extends ResourceUpdate, R extends Resource>(resource: U & ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
|
176
|
+
update<U extends ResourceUpdate, R extends Resource>(resource: U & ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig, path?: string): Promise<R>;
|
|
177
177
|
delete(resource: ResourceId, options?: ResourcesConfig): Promise<void>;
|
|
178
178
|
fetch<R extends Resource>(resource: string | ResourceType, path: string, params?: QueryParams<R>, options?: ResourcesConfig): Promise<R | ListResponse<R>>;
|
|
179
179
|
action(cmd: Extract<Method, 'POST' | 'PATCH'>, path: string, payload?: any, options?: ResourcesConfig): Promise<void>;
|
|
@@ -186,6 +186,7 @@ declare abstract class ApiResourceBase<R extends Resource> {
|
|
|
186
186
|
protected relationshipOneToOne<RR extends ResourceRel>(id: string | ResourceId | null): RR;
|
|
187
187
|
protected relationshipOneToMany<RR extends ResourceRel>(...ids: string[]): RR[];
|
|
188
188
|
abstract type(): ResourceTypeLock;
|
|
189
|
+
protected path(): string;
|
|
189
190
|
parse(resource: string): R | R[];
|
|
190
191
|
update(resource: ResourceUpdate, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
|
191
192
|
}
|
|
@@ -206,27 +207,27 @@ type VersionSort = Pick<Version, 'id'> & ResourceSort;
|
|
|
206
207
|
interface Version extends Resource {
|
|
207
208
|
readonly type: VersionType;
|
|
208
209
|
/**
|
|
209
|
-
* The type of the versioned resource
|
|
210
|
+
* The type of the versioned resource.
|
|
210
211
|
* @example ```"roles"```
|
|
211
212
|
*/
|
|
212
213
|
resource_type: string;
|
|
213
214
|
/**
|
|
214
|
-
* The versioned resource ID
|
|
215
|
+
* The versioned resource ID.
|
|
215
216
|
* @example ```"PzdJhdLdYV"```
|
|
216
217
|
*/
|
|
217
218
|
resource_id: string;
|
|
218
219
|
/**
|
|
219
|
-
* The event which generates the version
|
|
220
|
+
* The event which generates the version.
|
|
220
221
|
* @example ```"update"```
|
|
221
222
|
*/
|
|
222
223
|
event: string;
|
|
223
224
|
/**
|
|
224
|
-
* The object changes payload
|
|
225
|
+
* The object changes payload.
|
|
225
226
|
* @example ```"{"name":["previous","new"]}"```
|
|
226
227
|
*/
|
|
227
228
|
changes: Record<string, any>;
|
|
228
229
|
/**
|
|
229
|
-
* Information about who triggered the change, only showed when it's from a JWT token
|
|
230
|
+
* Information about who triggered the change, only showed when it's from a JWT token.
|
|
230
231
|
* @example ```"{"application":{"id":"DNOPYiZYpn","kind":"integration","public":true}}"```
|
|
231
232
|
*/
|
|
232
233
|
who: Record<string, any>;
|
|
@@ -250,27 +251,27 @@ type PermissionSort = Pick<Permission, 'id'> & ResourceSort;
|
|
|
250
251
|
interface Permission extends Resource {
|
|
251
252
|
readonly type: PermissionType;
|
|
252
253
|
/**
|
|
253
|
-
* Determines if the permission have access to create rights
|
|
254
|
+
* Determines if the permission have access to create rights.
|
|
254
255
|
*/
|
|
255
256
|
can_create: boolean;
|
|
256
257
|
/**
|
|
257
|
-
* Determines if the permission have access to read rights
|
|
258
|
+
* Determines if the permission have access to read rights.
|
|
258
259
|
*/
|
|
259
260
|
can_read: boolean;
|
|
260
261
|
/**
|
|
261
|
-
* Determines if the permission have access to update rights
|
|
262
|
+
* Determines if the permission have access to update rights.
|
|
262
263
|
*/
|
|
263
264
|
can_update: boolean;
|
|
264
265
|
/**
|
|
265
|
-
* Determines if the permission have access to destroy rights
|
|
266
|
+
* Determines if the permission have access to destroy rights.
|
|
266
267
|
*/
|
|
267
268
|
can_destroy: boolean;
|
|
268
269
|
/**
|
|
269
|
-
* The resource where this permission is applied
|
|
270
|
+
* The resource where this permission is applied.
|
|
270
271
|
*/
|
|
271
272
|
subject: string;
|
|
272
273
|
/**
|
|
273
|
-
* An object that contains additional restrictions
|
|
274
|
+
* An object that contains additional restrictions.
|
|
274
275
|
* @example ```"{"foo":"bar"}"```
|
|
275
276
|
*/
|
|
276
277
|
restrictions: Record<string, any>;
|
|
@@ -280,42 +281,42 @@ interface Permission extends Resource {
|
|
|
280
281
|
}
|
|
281
282
|
interface PermissionCreate extends ResourceCreate {
|
|
282
283
|
/**
|
|
283
|
-
* Determines if the permission have access to create rights
|
|
284
|
+
* Determines if the permission have access to create rights.
|
|
284
285
|
*/
|
|
285
286
|
can_create: boolean;
|
|
286
287
|
/**
|
|
287
|
-
* Determines if the permission have access to read rights
|
|
288
|
+
* Determines if the permission have access to read rights.
|
|
288
289
|
*/
|
|
289
290
|
can_read: boolean;
|
|
290
291
|
/**
|
|
291
|
-
* Determines if the permission have access to update rights
|
|
292
|
+
* Determines if the permission have access to update rights.
|
|
292
293
|
*/
|
|
293
294
|
can_update: boolean;
|
|
294
295
|
/**
|
|
295
|
-
* Determines if the permission have access to destroy rights
|
|
296
|
+
* Determines if the permission have access to destroy rights.
|
|
296
297
|
*/
|
|
297
298
|
can_destroy: boolean;
|
|
298
299
|
/**
|
|
299
|
-
* The resource where this permission is applied
|
|
300
|
+
* The resource where this permission is applied.
|
|
300
301
|
*/
|
|
301
302
|
subject: string;
|
|
302
303
|
role: RoleRel$4;
|
|
303
304
|
}
|
|
304
305
|
interface PermissionUpdate extends ResourceUpdate {
|
|
305
306
|
/**
|
|
306
|
-
* Determines if the permission have access to create rights
|
|
307
|
+
* Determines if the permission have access to create rights.
|
|
307
308
|
*/
|
|
308
309
|
can_create?: Nullable<boolean>;
|
|
309
310
|
/**
|
|
310
|
-
* Determines if the permission have access to read rights
|
|
311
|
+
* Determines if the permission have access to read rights.
|
|
311
312
|
*/
|
|
312
313
|
can_read?: Nullable<boolean>;
|
|
313
314
|
/**
|
|
314
|
-
* Determines if the permission have access to update rights
|
|
315
|
+
* Determines if the permission have access to update rights.
|
|
315
316
|
*/
|
|
316
317
|
can_update?: Nullable<boolean>;
|
|
317
318
|
/**
|
|
318
|
-
* Determines if the permission have access to destroy rights
|
|
319
|
+
* Determines if the permission have access to destroy rights.
|
|
319
320
|
*/
|
|
320
321
|
can_destroy?: Nullable<boolean>;
|
|
321
322
|
}
|
|
@@ -343,7 +344,7 @@ type RoleSort = Pick<Role, 'id'> & ResourceSort;
|
|
|
343
344
|
interface Role extends Resource {
|
|
344
345
|
readonly type: RoleType;
|
|
345
346
|
/**
|
|
346
|
-
* The role name
|
|
347
|
+
* The role name.
|
|
347
348
|
* @example ```"Custom role"```
|
|
348
349
|
*/
|
|
349
350
|
name: string;
|
|
@@ -360,7 +361,7 @@ interface Role extends Resource {
|
|
|
360
361
|
}
|
|
361
362
|
interface RoleCreate extends ResourceCreate {
|
|
362
363
|
/**
|
|
363
|
-
* The role name
|
|
364
|
+
* The role name.
|
|
364
365
|
* @example ```"Custom role"```
|
|
365
366
|
*/
|
|
366
367
|
name: string;
|
|
@@ -368,7 +369,7 @@ interface RoleCreate extends ResourceCreate {
|
|
|
368
369
|
}
|
|
369
370
|
interface RoleUpdate extends ResourceUpdate {
|
|
370
371
|
/**
|
|
371
|
-
* The role name
|
|
372
|
+
* The role name.
|
|
372
373
|
* @example ```"Custom role"```
|
|
373
374
|
*/
|
|
374
375
|
name?: Nullable<string>;
|
|
@@ -408,7 +409,7 @@ type ApplicationMembershipSort = Pick<ApplicationMembership, 'id'> & ResourceSor
|
|
|
408
409
|
interface ApplicationMembership extends Resource {
|
|
409
410
|
readonly type: ApplicationMembershipType;
|
|
410
411
|
/**
|
|
411
|
-
* Set of key-value pairs that contains restrictions and scopes of the application membership
|
|
412
|
+
* Set of key-value pairs that contains restrictions and scopes of the application membership.
|
|
412
413
|
* @example ```"{"market_id_in":[202,203]}"```
|
|
413
414
|
*/
|
|
414
415
|
filters?: Nullable<Record<string, any>>;
|
|
@@ -419,7 +420,7 @@ interface ApplicationMembership extends Resource {
|
|
|
419
420
|
}
|
|
420
421
|
interface ApplicationMembershipCreate extends ResourceCreate {
|
|
421
422
|
/**
|
|
422
|
-
* Set of key-value pairs that contains restrictions and scopes of the application membership
|
|
423
|
+
* Set of key-value pairs that contains restrictions and scopes of the application membership.
|
|
423
424
|
* @example ```"{"market_id_in":[202,203]}"```
|
|
424
425
|
*/
|
|
425
426
|
filters?: Nullable<Record<string, any>>;
|
|
@@ -430,7 +431,7 @@ interface ApplicationMembershipCreate extends ResourceCreate {
|
|
|
430
431
|
}
|
|
431
432
|
interface ApplicationMembershipUpdate extends ResourceUpdate {
|
|
432
433
|
/**
|
|
433
|
-
* Set of key-value pairs that contains restrictions and scopes of the application membership
|
|
434
|
+
* Set of key-value pairs that contains restrictions and scopes of the application membership.
|
|
434
435
|
* @example ```"{"market_id_in":[202,203]}"```
|
|
435
436
|
*/
|
|
436
437
|
filters?: Nullable<Record<string, any>>;
|
|
@@ -468,27 +469,27 @@ type MembershipSort = Pick<Membership, 'id' | 'status'> & ResourceSort;
|
|
|
468
469
|
interface Membership extends Resource {
|
|
469
470
|
readonly type: MembershipType;
|
|
470
471
|
/**
|
|
471
|
-
* The user email
|
|
472
|
+
* The user email.
|
|
472
473
|
* @example ```"commercelayer@commercelayer.io"```
|
|
473
474
|
*/
|
|
474
475
|
user_email: string;
|
|
475
476
|
/**
|
|
476
|
-
* The user first name
|
|
477
|
+
* The user first name.
|
|
477
478
|
* @example ```"John"```
|
|
478
479
|
*/
|
|
479
480
|
user_first_name: string;
|
|
480
481
|
/**
|
|
481
|
-
* The user last name
|
|
482
|
+
* The user last name.
|
|
482
483
|
* @example ```"Doe"```
|
|
483
484
|
*/
|
|
484
485
|
user_last_name: string;
|
|
485
486
|
/**
|
|
486
|
-
* The memberships status. One of `pending` (default), `active
|
|
487
|
+
* The memberships status. One of `pending` (default), `active`.
|
|
487
488
|
* @example ```"pending"```
|
|
488
489
|
*/
|
|
489
490
|
status: 'pending' | 'active';
|
|
490
491
|
/**
|
|
491
|
-
* Indicates if the user it's the owner of the organization
|
|
492
|
+
* Indicates if the user it's the owner of the organization.
|
|
492
493
|
* @example ```"true"```
|
|
493
494
|
*/
|
|
494
495
|
owner: boolean;
|
|
@@ -499,7 +500,7 @@ interface Membership extends Resource {
|
|
|
499
500
|
}
|
|
500
501
|
interface MembershipCreate extends ResourceCreate {
|
|
501
502
|
/**
|
|
502
|
-
* The user email
|
|
503
|
+
* The user email.
|
|
503
504
|
* @example ```"commercelayer@commercelayer.io"```
|
|
504
505
|
*/
|
|
505
506
|
user_email: string;
|
|
@@ -531,105 +532,177 @@ type OrganizationType = 'organizations';
|
|
|
531
532
|
type OrganizationRel$1 = ResourceRel & {
|
|
532
533
|
type: OrganizationType;
|
|
533
534
|
};
|
|
534
|
-
type OrganizationSort = Pick<Organization, 'id'> & ResourceSort;
|
|
535
|
+
type OrganizationSort = Pick<Organization, 'id' | 'name' | 'slug' | 'domain'> & ResourceSort;
|
|
535
536
|
interface Organization extends Resource {
|
|
536
537
|
readonly type: OrganizationType;
|
|
537
538
|
/**
|
|
538
|
-
* The organization's internal name
|
|
539
|
+
* The organization's internal name.
|
|
539
540
|
* @example ```"The Blue Brand"```
|
|
540
541
|
*/
|
|
541
542
|
name: string;
|
|
542
543
|
/**
|
|
543
|
-
* The organization's slug name
|
|
544
|
+
* The organization's slug name.
|
|
544
545
|
* @example ```"the-blue-brand"```
|
|
545
546
|
*/
|
|
546
547
|
slug: string;
|
|
547
548
|
/**
|
|
548
|
-
* The organization's domain
|
|
549
|
+
* The organization's domain.
|
|
549
550
|
* @example ```"the-blue-brand.commercelayer.io"```
|
|
550
551
|
*/
|
|
551
552
|
domain: string;
|
|
552
553
|
/**
|
|
553
|
-
* The organization's
|
|
554
|
-
* @example ```"{"mfe":{"default":{"links":{"cart":"https://cart.example.com/:order_id?accessToken=:access_token","checkout":"https://checkout.example.com/:order_id?accessToken=:accessToken","identity":"https://example.com/login","microstore":"https://example.com/microstore/?accessToken=:access_token","my_account":"https://example.com/my-custom-account?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:lang/:orderId","billing_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"shipping_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"billing_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"shipping_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"default_country":"US"},"urls":{"privacy":"https://example.com/privacy/:lang","terms":"https://example.com/terms/:lang"}},"market:id:ZKcv13rT":{"links":{"cart":"https://example.com/custom-cart/:order_id?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:order_id"}}}}"```
|
|
555
|
-
*/
|
|
556
|
-
config?: Nullable<Record<string, any>>;
|
|
557
|
-
/**
|
|
558
|
-
* The organization's support phone..
|
|
554
|
+
* The organization's support phone.
|
|
559
555
|
* @example ```"+01 30800857"```
|
|
560
556
|
*/
|
|
561
557
|
support_phone?: Nullable<string>;
|
|
562
558
|
/**
|
|
563
|
-
* The organization's support email
|
|
559
|
+
* The organization's support email.
|
|
564
560
|
* @example ```"support@bluebrand.com"```
|
|
565
561
|
*/
|
|
566
562
|
support_email?: Nullable<string>;
|
|
567
563
|
/**
|
|
568
|
-
* The URL to the organization's logo
|
|
564
|
+
* The URL to the organization's logo.
|
|
569
565
|
* @example ```"https://bluebrand.com/img/logo.svg"```
|
|
570
566
|
*/
|
|
571
567
|
logo_url?: Nullable<string>;
|
|
572
568
|
/**
|
|
573
|
-
* The URL to the organization's favicon
|
|
569
|
+
* The URL to the organization's favicon.
|
|
574
570
|
* @example ```"https://bluebrand.com/img/favicon.ico"```
|
|
575
571
|
*/
|
|
576
572
|
favicon_url?: Nullable<string>;
|
|
577
573
|
/**
|
|
578
|
-
* The organization's primary color.
|
|
574
|
+
* The organization's primary color.
|
|
579
575
|
* @example ```"#C8984E"```
|
|
580
576
|
*/
|
|
581
577
|
primary_color?: Nullable<string>;
|
|
582
578
|
/**
|
|
583
|
-
* The organization's contrast color. Format is HEX (starts with `#` and
|
|
579
|
+
* The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).
|
|
584
580
|
* @example ```"#FFFFCC"```
|
|
585
581
|
*/
|
|
586
582
|
contrast_color?: Nullable<string>;
|
|
587
583
|
/**
|
|
588
|
-
* The organization's Google Tag Manager ID
|
|
584
|
+
* The organization's Google Tag Manager ID.
|
|
589
585
|
* @example ```"GTM-5FJXX6"```
|
|
590
586
|
*/
|
|
591
587
|
gtm_id?: Nullable<string>;
|
|
592
588
|
/**
|
|
593
|
-
* The organization's Google Tag Manager ID for test
|
|
589
|
+
* The organization's Google Tag Manager ID for test.
|
|
594
590
|
* @example ```"GTM-5FJXX7"```
|
|
595
591
|
*/
|
|
596
592
|
gtm_id_test?: Nullable<string>;
|
|
597
593
|
/**
|
|
598
|
-
*
|
|
594
|
+
* The region where the organization is located. The default value is `eu-west-1`.
|
|
595
|
+
* @example ```"eu-west-1"```
|
|
596
|
+
*/
|
|
597
|
+
region?: Nullable<string>;
|
|
598
|
+
/**
|
|
599
|
+
* Indicates if the organization can switch to live mode.
|
|
599
600
|
*/
|
|
600
|
-
|
|
601
|
+
can_switch_live: boolean;
|
|
601
602
|
/**
|
|
602
|
-
*
|
|
603
|
+
* Information about the current subscription such as the plan type, limits, and subscription totals counter.
|
|
604
|
+
* @example ```"{"plan_type":"growth","limits":{"markets":5,"skus":10000,"organizations":2,"memberships":5},"totals":{"organizations":1,"markets":0,"memberships":2,"skus":0}}"```
|
|
603
605
|
*/
|
|
604
|
-
|
|
606
|
+
subscription_info: Record<string, any>;
|
|
605
607
|
/**
|
|
606
|
-
*
|
|
608
|
+
* The organization's configuration.
|
|
609
|
+
* @example ```"{"mfe":{"default":{"links":{"cart":"https://cart.example.com/:order_id?accessToken=:access_token","checkout":"https://checkout.example.com/:order_id?accessToken=:access_token","identity":"https://example.com/login","microstore":"https://example.com/microstore/?accessToken=:access_token","my_account":"https://example.com/my-custom-account?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:lang/:order_id","billing_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"shipping_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"billing_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"shipping_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"default_country":"US"},"urls":{"privacy":"https://example.com/privacy/:lang","terms":"https://example.com/terms/:lang"}},"market:id:ZKcv13rT":{"links":{"cart":"https://example.com/custom-cart/:order_id?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:order_id"}}}}"```
|
|
610
|
+
*/
|
|
611
|
+
config?: Nullable<Record<string, any>>;
|
|
612
|
+
/**
|
|
613
|
+
* Enables the redirect on the new Auth API.
|
|
614
|
+
* @example ```"true"```
|
|
615
|
+
*/
|
|
616
|
+
api_auth_redirect: boolean;
|
|
617
|
+
/**
|
|
618
|
+
* Enables the rules engine for flex promotions and price list rules.
|
|
619
|
+
*/
|
|
620
|
+
api_rules_engine: boolean;
|
|
621
|
+
/**
|
|
622
|
+
* Indicates if the phone attribute is required for addresses, default is true.
|
|
623
|
+
* @example ```"true"```
|
|
607
624
|
*/
|
|
608
|
-
|
|
625
|
+
addresses_phone_required: boolean;
|
|
609
626
|
/**
|
|
610
|
-
* The maximum number
|
|
627
|
+
* The maximum number line items allowed for a test order before disabling the autorefresh option.
|
|
628
|
+
* @example ```"50"```
|
|
629
|
+
*/
|
|
630
|
+
orders_autorefresh_cutoff_test: number;
|
|
631
|
+
/**
|
|
632
|
+
* The maximum number line items allowed for a live order before disabling the autorefresh option.
|
|
633
|
+
* @example ```"500"```
|
|
634
|
+
*/
|
|
635
|
+
orders_autorefresh_cutoff_live: number;
|
|
636
|
+
/**
|
|
637
|
+
* Enables orders number editing as a string in test (for enterprise plans only).
|
|
638
|
+
*/
|
|
639
|
+
orders_number_editable_test: boolean;
|
|
640
|
+
/**
|
|
641
|
+
* Enables orders number editing as a string in live (for enterprise plans only).
|
|
642
|
+
*/
|
|
643
|
+
orders_number_editable_live: boolean;
|
|
644
|
+
/**
|
|
645
|
+
* Enables to use the order number as payment reference on supported gateways.
|
|
646
|
+
* @example ```"true"```
|
|
647
|
+
*/
|
|
648
|
+
orders_number_as_reference: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* The maximum number of SKUs allowed for bundles, default is 10.
|
|
611
651
|
* @example ```"10"```
|
|
612
652
|
*/
|
|
613
|
-
|
|
653
|
+
bundles_max_items_count: number;
|
|
614
654
|
/**
|
|
615
|
-
* The
|
|
616
|
-
* @example ```"
|
|
655
|
+
* The minimum length for coupon code, default is 8.
|
|
656
|
+
* @example ```"8"```
|
|
617
657
|
*/
|
|
618
|
-
|
|
658
|
+
coupons_min_code_length: number;
|
|
619
659
|
/**
|
|
620
|
-
* The
|
|
621
|
-
* @example ```"
|
|
660
|
+
* The maximum length for coupon code, default is 40.
|
|
661
|
+
* @example ```"40"```
|
|
622
662
|
*/
|
|
623
|
-
|
|
663
|
+
coupons_max_code_length: number;
|
|
624
664
|
/**
|
|
625
|
-
*
|
|
665
|
+
* The minimum length for gift card code, default is 8.
|
|
666
|
+
* @example ```"8"```
|
|
626
667
|
*/
|
|
627
|
-
|
|
668
|
+
gift_cards_min_code_length: number;
|
|
628
669
|
/**
|
|
629
|
-
*
|
|
630
|
-
* @example ```"
|
|
670
|
+
* The maximum length for gift card code, default is 40.
|
|
671
|
+
* @example ```"40"```
|
|
631
672
|
*/
|
|
632
|
-
|
|
673
|
+
gift_cards_max_code_length: number;
|
|
674
|
+
/**
|
|
675
|
+
* The maximum number of concurrent cleanups allowed for your organization, default is 10.
|
|
676
|
+
* @example ```"10"```
|
|
677
|
+
*/
|
|
678
|
+
cleanups_max_concurrent_count: number;
|
|
679
|
+
/**
|
|
680
|
+
* The maximum number of concurrent exports allowed for your organization, default is 10.
|
|
681
|
+
* @example ```"10"```
|
|
682
|
+
*/
|
|
683
|
+
exports_max_concurrent_count: number;
|
|
684
|
+
/**
|
|
685
|
+
* The maximum number of concurrent imports allowed for your organization, default is 10.
|
|
686
|
+
* @example ```"10"```
|
|
687
|
+
*/
|
|
688
|
+
imports_max_concurrent_count: number;
|
|
689
|
+
/**
|
|
690
|
+
* The maximum number of active concurrent promotions allowed for your organization, default is 10.
|
|
691
|
+
* @example ```"10"```
|
|
692
|
+
*/
|
|
693
|
+
promotions_max_concurrent_count: number;
|
|
694
|
+
/**
|
|
695
|
+
* Enables triggering of webhooks during imports, default is false.
|
|
696
|
+
*/
|
|
697
|
+
imports_trigger_webhooks: number;
|
|
698
|
+
/**
|
|
699
|
+
* Enables raising of API errors in case of tax calculation failure, default is false.
|
|
700
|
+
*/
|
|
701
|
+
tax_calculators_errors: boolean;
|
|
702
|
+
/**
|
|
703
|
+
* Enables raising of API errors in case of external promotion failure, default is false.
|
|
704
|
+
*/
|
|
705
|
+
external_promotions_errors: boolean;
|
|
633
706
|
memberships?: Nullable<Membership[]>;
|
|
634
707
|
roles?: Nullable<Role[]>;
|
|
635
708
|
permissions?: Nullable<Permission[]>;
|
|
@@ -637,136 +710,112 @@ interface Organization extends Resource {
|
|
|
637
710
|
}
|
|
638
711
|
interface OrganizationCreate extends ResourceCreate {
|
|
639
712
|
/**
|
|
640
|
-
* The organization's internal name
|
|
713
|
+
* The organization's internal name.
|
|
641
714
|
* @example ```"The Blue Brand"```
|
|
642
715
|
*/
|
|
643
716
|
name: string;
|
|
644
717
|
/**
|
|
645
|
-
* The organization's
|
|
646
|
-
* @example ```"{"mfe":{"default":{"links":{"cart":"https://cart.example.com/:order_id?accessToken=:access_token","checkout":"https://checkout.example.com/:order_id?accessToken=:accessToken","identity":"https://example.com/login","microstore":"https://example.com/microstore/?accessToken=:access_token","my_account":"https://example.com/my-custom-account?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:lang/:orderId","billing_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"shipping_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"billing_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"shipping_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"default_country":"US"},"urls":{"privacy":"https://example.com/privacy/:lang","terms":"https://example.com/terms/:lang"}},"market:id:ZKcv13rT":{"links":{"cart":"https://example.com/custom-cart/:order_id?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:order_id"}}}}"```
|
|
647
|
-
*/
|
|
648
|
-
config?: Nullable<Record<string, any>>;
|
|
649
|
-
/**
|
|
650
|
-
* The organization's support phone..
|
|
718
|
+
* The organization's support phone.
|
|
651
719
|
* @example ```"+01 30800857"```
|
|
652
720
|
*/
|
|
653
721
|
support_phone?: Nullable<string>;
|
|
654
722
|
/**
|
|
655
|
-
* The organization's support email
|
|
723
|
+
* The organization's support email.
|
|
656
724
|
* @example ```"support@bluebrand.com"```
|
|
657
725
|
*/
|
|
658
726
|
support_email?: Nullable<string>;
|
|
659
727
|
/**
|
|
660
|
-
* The URL to the organization's logo
|
|
728
|
+
* The URL to the organization's logo.
|
|
661
729
|
* @example ```"https://bluebrand.com/img/logo.svg"```
|
|
662
730
|
*/
|
|
663
731
|
logo_url?: Nullable<string>;
|
|
664
732
|
/**
|
|
665
|
-
* The URL to the organization's favicon
|
|
733
|
+
* The URL to the organization's favicon.
|
|
666
734
|
* @example ```"https://bluebrand.com/img/favicon.ico"```
|
|
667
735
|
*/
|
|
668
736
|
favicon_url?: Nullable<string>;
|
|
669
737
|
/**
|
|
670
|
-
* The organization's primary color.
|
|
738
|
+
* The organization's primary color.
|
|
671
739
|
* @example ```"#C8984E"```
|
|
672
740
|
*/
|
|
673
741
|
primary_color?: Nullable<string>;
|
|
674
742
|
/**
|
|
675
|
-
* The organization's contrast color. Format is HEX (starts with `#` and
|
|
743
|
+
* The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).
|
|
676
744
|
* @example ```"#FFFFCC"```
|
|
677
745
|
*/
|
|
678
746
|
contrast_color?: Nullable<string>;
|
|
679
747
|
/**
|
|
680
|
-
* The organization's Google Tag Manager ID
|
|
748
|
+
* The organization's Google Tag Manager ID.
|
|
681
749
|
* @example ```"GTM-5FJXX6"```
|
|
682
750
|
*/
|
|
683
751
|
gtm_id?: Nullable<string>;
|
|
684
752
|
/**
|
|
685
|
-
* The organization's Google Tag Manager ID for test
|
|
753
|
+
* The organization's Google Tag Manager ID for test.
|
|
686
754
|
* @example ```"GTM-5FJXX7"```
|
|
687
755
|
*/
|
|
688
756
|
gtm_id_test?: Nullable<string>;
|
|
689
757
|
/**
|
|
690
|
-
*
|
|
691
|
-
*/
|
|
692
|
-
discount_disabled?: Nullable<boolean>;
|
|
693
|
-
/**
|
|
694
|
-
* Indicates if organization has account disabled..
|
|
695
|
-
*/
|
|
696
|
-
account_disabled?: Nullable<boolean>;
|
|
697
|
-
/**
|
|
698
|
-
* Indicates if organization has acceptance disabled..
|
|
699
|
-
*/
|
|
700
|
-
acceptance_disabled?: Nullable<boolean>;
|
|
701
|
-
/**
|
|
702
|
-
* The region where the organization it's located, default value it's `eu-west-1`..
|
|
758
|
+
* The region where the organization is located. The default value is `eu-west-1`.
|
|
703
759
|
* @example ```"eu-west-1"```
|
|
704
760
|
*/
|
|
705
761
|
region?: Nullable<string>;
|
|
762
|
+
/**
|
|
763
|
+
* The organization's configuration.
|
|
764
|
+
* @example ```"{"mfe":{"default":{"links":{"cart":"https://cart.example.com/:order_id?accessToken=:access_token","checkout":"https://checkout.example.com/:order_id?accessToken=:access_token","identity":"https://example.com/login","microstore":"https://example.com/microstore/?accessToken=:access_token","my_account":"https://example.com/my-custom-account?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:lang/:order_id","billing_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"shipping_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"billing_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"shipping_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"default_country":"US"},"urls":{"privacy":"https://example.com/privacy/:lang","terms":"https://example.com/terms/:lang"}},"market:id:ZKcv13rT":{"links":{"cart":"https://example.com/custom-cart/:order_id?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:order_id"}}}}"```
|
|
765
|
+
*/
|
|
766
|
+
config?: Nullable<Record<string, any>>;
|
|
706
767
|
}
|
|
707
768
|
interface OrganizationUpdate extends ResourceUpdate {
|
|
708
769
|
/**
|
|
709
|
-
* The organization's internal name
|
|
770
|
+
* The organization's internal name.
|
|
710
771
|
* @example ```"The Blue Brand"```
|
|
711
772
|
*/
|
|
712
773
|
name?: Nullable<string>;
|
|
713
774
|
/**
|
|
714
|
-
* The organization's
|
|
715
|
-
* @example ```"{"mfe":{"default":{"links":{"cart":"https://cart.example.com/:order_id?accessToken=:access_token","checkout":"https://checkout.example.com/:order_id?accessToken=:accessToken","identity":"https://example.com/login","microstore":"https://example.com/microstore/?accessToken=:access_token","my_account":"https://example.com/my-custom-account?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:lang/:orderId","billing_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"shipping_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"billing_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"shipping_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"default_country":"US"},"urls":{"privacy":"https://example.com/privacy/:lang","terms":"https://example.com/terms/:lang"}},"market:id:ZKcv13rT":{"links":{"cart":"https://example.com/custom-cart/:order_id?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:order_id"}}}}"```
|
|
716
|
-
*/
|
|
717
|
-
config?: Nullable<Record<string, any>>;
|
|
718
|
-
/**
|
|
719
|
-
* The organization's support phone..
|
|
775
|
+
* The organization's support phone.
|
|
720
776
|
* @example ```"+01 30800857"```
|
|
721
777
|
*/
|
|
722
778
|
support_phone?: Nullable<string>;
|
|
723
779
|
/**
|
|
724
|
-
* The organization's support email
|
|
780
|
+
* The organization's support email.
|
|
725
781
|
* @example ```"support@bluebrand.com"```
|
|
726
782
|
*/
|
|
727
783
|
support_email?: Nullable<string>;
|
|
728
784
|
/**
|
|
729
|
-
* The URL to the organization's logo
|
|
785
|
+
* The URL to the organization's logo.
|
|
730
786
|
* @example ```"https://bluebrand.com/img/logo.svg"```
|
|
731
787
|
*/
|
|
732
788
|
logo_url?: Nullable<string>;
|
|
733
789
|
/**
|
|
734
|
-
* The URL to the organization's favicon
|
|
790
|
+
* The URL to the organization's favicon.
|
|
735
791
|
* @example ```"https://bluebrand.com/img/favicon.ico"```
|
|
736
792
|
*/
|
|
737
793
|
favicon_url?: Nullable<string>;
|
|
738
794
|
/**
|
|
739
|
-
* The organization's primary color.
|
|
795
|
+
* The organization's primary color.
|
|
740
796
|
* @example ```"#C8984E"```
|
|
741
797
|
*/
|
|
742
798
|
primary_color?: Nullable<string>;
|
|
743
799
|
/**
|
|
744
|
-
* The organization's contrast color. Format is HEX (starts with `#` and
|
|
800
|
+
* The organization's contrast color. Format is HEX (starts with `#` and is followed by six letters and/or numbers).
|
|
745
801
|
* @example ```"#FFFFCC"```
|
|
746
802
|
*/
|
|
747
803
|
contrast_color?: Nullable<string>;
|
|
748
804
|
/**
|
|
749
|
-
* The organization's Google Tag Manager ID
|
|
805
|
+
* The organization's Google Tag Manager ID.
|
|
750
806
|
* @example ```"GTM-5FJXX6"```
|
|
751
807
|
*/
|
|
752
808
|
gtm_id?: Nullable<string>;
|
|
753
809
|
/**
|
|
754
|
-
* The organization's Google Tag Manager ID for test
|
|
810
|
+
* The organization's Google Tag Manager ID for test.
|
|
755
811
|
* @example ```"GTM-5FJXX7"```
|
|
756
812
|
*/
|
|
757
813
|
gtm_id_test?: Nullable<string>;
|
|
758
814
|
/**
|
|
759
|
-
*
|
|
815
|
+
* The organization's configuration.
|
|
816
|
+
* @example ```"{"mfe":{"default":{"links":{"cart":"https://cart.example.com/:order_id?accessToken=:access_token","checkout":"https://checkout.example.com/:order_id?accessToken=:access_token","identity":"https://example.com/login","microstore":"https://example.com/microstore/?accessToken=:access_token","my_account":"https://example.com/my-custom-account?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:lang/:order_id","billing_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"shipping_countries":[{"value":"ES","label":"Espana"},{"value":"IT","label":"Italia"},{"value":"US","label":"Unites States of America"}],"billing_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"shipping_states":{"FR":[{"value":"PA","label":"Paris"},{"value":"LY","label":"Lyon"},{"value":"NI","label":"Nice"},{"value":"MA","label":"Marseille"},{"value":"BO","label":"Bordeaux"}]},"default_country":"US"},"urls":{"privacy":"https://example.com/privacy/:lang","terms":"https://example.com/terms/:lang"}},"market:id:ZKcv13rT":{"links":{"cart":"https://example.com/custom-cart/:order_id?accessToken=:access_token"},"checkout":{"thankyou_page":"https://example.com/thanks/:order_id"}}}}"```
|
|
760
817
|
*/
|
|
761
|
-
|
|
762
|
-
/**
|
|
763
|
-
* Indicates if organization has account disabled..
|
|
764
|
-
*/
|
|
765
|
-
account_disabled?: Nullable<boolean>;
|
|
766
|
-
/**
|
|
767
|
-
* Indicates if organization has acceptance disabled..
|
|
768
|
-
*/
|
|
769
|
-
acceptance_disabled?: Nullable<boolean>;
|
|
818
|
+
config?: Nullable<Record<string, any>>;
|
|
770
819
|
}
|
|
771
820
|
declare class Organizations extends ApiResource<Organization> {
|
|
772
821
|
static readonly TYPE: OrganizationType;
|
|
@@ -803,52 +852,52 @@ type ApiCredentialSort = Pick<ApiCredential, 'id' | 'mode'> & ResourceSort;
|
|
|
803
852
|
interface ApiCredential extends Resource {
|
|
804
853
|
readonly type: ApiCredentialType;
|
|
805
854
|
/**
|
|
806
|
-
* The API credential internal name
|
|
855
|
+
* The API credential internal name.
|
|
807
856
|
* @example ```"My app"```
|
|
808
857
|
*/
|
|
809
858
|
name: string;
|
|
810
859
|
/**
|
|
811
|
-
* The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.)
|
|
860
|
+
* The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.).
|
|
812
861
|
* @example ```"sales_channel"```
|
|
813
862
|
*/
|
|
814
863
|
kind: string;
|
|
815
864
|
/**
|
|
816
|
-
* Indicates if the API credential it's confidential
|
|
865
|
+
* Indicates if the API credential it's confidential.
|
|
817
866
|
* @example ```"true"```
|
|
818
867
|
*/
|
|
819
868
|
confidential: boolean;
|
|
820
869
|
/**
|
|
821
|
-
* The API credential redirect URI
|
|
870
|
+
* The API credential redirect URI.
|
|
822
871
|
* @example ```"https://bluebrand.com/img/logo.svg"```
|
|
823
872
|
*/
|
|
824
873
|
redirect_uri?: Nullable<string>;
|
|
825
874
|
/**
|
|
826
|
-
* The API credential unique ID
|
|
875
|
+
* The API credential unique ID.
|
|
827
876
|
* @example ```"xxxx-yyyy-zzzz"```
|
|
828
877
|
*/
|
|
829
878
|
client_id: string;
|
|
830
879
|
/**
|
|
831
|
-
* The API credential unique secret
|
|
880
|
+
* The API credential unique secret.
|
|
832
881
|
* @example ```"xxxx-yyyy-zzzz"```
|
|
833
882
|
*/
|
|
834
883
|
client_secret: string;
|
|
835
884
|
/**
|
|
836
|
-
* The API credential scopes
|
|
885
|
+
* The API credential scopes.
|
|
837
886
|
* @example ```"market:all market:9 market:122 market:6 stock_location:6 stock_location:33"```
|
|
838
887
|
*/
|
|
839
888
|
scopes: string;
|
|
840
889
|
/**
|
|
841
|
-
* The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types)
|
|
890
|
+
* The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).
|
|
842
891
|
* @example ```"7200"```
|
|
843
892
|
*/
|
|
844
893
|
expires_in?: Nullable<number>;
|
|
845
894
|
/**
|
|
846
|
-
* Indicates the environment the resource belongs to (one of `test` or `live`)
|
|
895
|
+
* Indicates the environment the resource belongs to (one of `test` or `live`).
|
|
847
896
|
* @example ```"test"```
|
|
848
897
|
*/
|
|
849
898
|
mode?: Nullable<string>;
|
|
850
899
|
/**
|
|
851
|
-
* Indicates if the API credential is used to create a custom app (e.g. fork a hosted app)
|
|
900
|
+
* Indicates if the API credential is used to create a custom app (e.g. fork a hosted app).
|
|
852
901
|
*/
|
|
853
902
|
custom?: Nullable<boolean>;
|
|
854
903
|
organization?: Nullable<Organization>;
|
|
@@ -856,32 +905,32 @@ interface ApiCredential extends Resource {
|
|
|
856
905
|
}
|
|
857
906
|
interface ApiCredentialCreate extends ResourceCreate {
|
|
858
907
|
/**
|
|
859
|
-
* The API credential internal name
|
|
908
|
+
* The API credential internal name.
|
|
860
909
|
* @example ```"My app"```
|
|
861
910
|
*/
|
|
862
911
|
name: string;
|
|
863
912
|
/**
|
|
864
|
-
* The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.)
|
|
913
|
+
* The API credential kind, can be one of: `webapp`, `sales_channel`, `integration` or the kind of app you want to fork (e.g. `orders`, `imports`, etc.).
|
|
865
914
|
* @example ```"sales_channel"```
|
|
866
915
|
*/
|
|
867
916
|
kind: string;
|
|
868
917
|
/**
|
|
869
|
-
* The API credential redirect URI
|
|
918
|
+
* The API credential redirect URI.
|
|
870
919
|
* @example ```"https://bluebrand.com/img/logo.svg"```
|
|
871
920
|
*/
|
|
872
921
|
redirect_uri?: Nullable<string>;
|
|
873
922
|
/**
|
|
874
|
-
* The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types)
|
|
923
|
+
* The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).
|
|
875
924
|
* @example ```"7200"```
|
|
876
925
|
*/
|
|
877
926
|
expires_in?: Nullable<number>;
|
|
878
927
|
/**
|
|
879
|
-
* Indicates the environment the resource belongs to (one of `test` or `live`)
|
|
928
|
+
* Indicates the environment the resource belongs to (one of `test` or `live`).
|
|
880
929
|
* @example ```"test"```
|
|
881
930
|
*/
|
|
882
931
|
mode?: Nullable<string>;
|
|
883
932
|
/**
|
|
884
|
-
* Indicates if the API credential is used to create a custom app (e.g. fork a hosted app)
|
|
933
|
+
* Indicates if the API credential is used to create a custom app (e.g. fork a hosted app).
|
|
885
934
|
*/
|
|
886
935
|
custom?: Nullable<boolean>;
|
|
887
936
|
organization: OrganizationRel;
|
|
@@ -889,17 +938,17 @@ interface ApiCredentialCreate extends ResourceCreate {
|
|
|
889
938
|
}
|
|
890
939
|
interface ApiCredentialUpdate extends ResourceUpdate {
|
|
891
940
|
/**
|
|
892
|
-
* The API credential internal name
|
|
941
|
+
* The API credential internal name.
|
|
893
942
|
* @example ```"My app"```
|
|
894
943
|
*/
|
|
895
944
|
name?: Nullable<string>;
|
|
896
945
|
/**
|
|
897
|
-
* The API credential redirect URI
|
|
946
|
+
* The API credential redirect URI.
|
|
898
947
|
* @example ```"https://bluebrand.com/img/logo.svg"```
|
|
899
948
|
*/
|
|
900
949
|
redirect_uri?: Nullable<string>;
|
|
901
950
|
/**
|
|
902
|
-
* The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types)
|
|
951
|
+
* The lifetime of the access token in seconds (min. `7200`, max. `31536000`. Default is `14400` for Sales channels and `7200` for other client types).
|
|
903
952
|
* @example ```"7200"```
|
|
904
953
|
*/
|
|
905
954
|
expires_in?: Nullable<number>;
|
|
@@ -926,48 +975,48 @@ type UserSort = Pick<User, 'id' | 'email' | 'first_name' | 'last_name'> & Resour
|
|
|
926
975
|
interface User extends Resource {
|
|
927
976
|
readonly type: UserType;
|
|
928
977
|
/**
|
|
929
|
-
* The user email
|
|
978
|
+
* The user email.
|
|
930
979
|
* @example ```"user@commercelayer.io"```
|
|
931
980
|
*/
|
|
932
981
|
email: string;
|
|
933
982
|
/**
|
|
934
|
-
* The user first name
|
|
983
|
+
* The user first name.
|
|
935
984
|
* @example ```"John"```
|
|
936
985
|
*/
|
|
937
986
|
first_name: string;
|
|
938
987
|
/**
|
|
939
|
-
* The user last name
|
|
988
|
+
* The user last name.
|
|
940
989
|
* @example ```"Doe"```
|
|
941
990
|
*/
|
|
942
991
|
last_name: string;
|
|
943
992
|
/**
|
|
944
|
-
* The user preferred timezone
|
|
993
|
+
* The user preferred timezone.
|
|
945
994
|
* @example ```"UTC"```
|
|
946
995
|
*/
|
|
947
996
|
time_zone?: Nullable<string>;
|
|
948
997
|
/**
|
|
949
|
-
* The user 2FA setting
|
|
998
|
+
* The user 2FA setting.
|
|
950
999
|
*/
|
|
951
1000
|
otp_required_for_login: boolean;
|
|
952
1001
|
}
|
|
953
1002
|
interface UserUpdate extends ResourceUpdate {
|
|
954
1003
|
/**
|
|
955
|
-
* The user email
|
|
1004
|
+
* The user email.
|
|
956
1005
|
* @example ```"user@commercelayer.io"```
|
|
957
1006
|
*/
|
|
958
1007
|
email?: Nullable<string>;
|
|
959
1008
|
/**
|
|
960
|
-
* The user first name
|
|
1009
|
+
* The user first name.
|
|
961
1010
|
* @example ```"John"```
|
|
962
1011
|
*/
|
|
963
1012
|
first_name?: Nullable<string>;
|
|
964
1013
|
/**
|
|
965
|
-
* The user last name
|
|
1014
|
+
* The user last name.
|
|
966
1015
|
* @example ```"Doe"```
|
|
967
1016
|
*/
|
|
968
1017
|
last_name?: Nullable<string>;
|
|
969
1018
|
/**
|
|
970
|
-
* The user preferred timezone
|
|
1019
|
+
* The user preferred timezone.
|
|
971
1020
|
* @example ```"UTC"```
|
|
972
1021
|
*/
|
|
973
1022
|
time_zone?: Nullable<string>;
|
|
@@ -979,11 +1028,12 @@ declare class Users extends ApiSingleton<User> {
|
|
|
979
1028
|
relationship(id: string | ResourceId | null): UserRel;
|
|
980
1029
|
relationshipToMany(...ids: string[]): UserRel[];
|
|
981
1030
|
type(): UserType;
|
|
1031
|
+
path(): string;
|
|
982
1032
|
}
|
|
983
1033
|
|
|
984
1034
|
type ResourceTypeLock = 'api_credentials' | 'application_memberships' | 'memberships' | 'organizations' | 'permissions' | 'roles' | 'user' | 'versions';
|
|
985
|
-
declare const resourceList:
|
|
986
|
-
declare const singletonList:
|
|
1035
|
+
declare const resourceList: ResourceTypeLock[];
|
|
1036
|
+
declare const singletonList: ResourceTypeLock[];
|
|
987
1037
|
type RetrievableResourceType = ResourceTypeLock;
|
|
988
1038
|
type RetrievableResource = Resource & {
|
|
989
1039
|
type: RetrievableResourceType;
|