@commercelayer/sdk 6.38.0 → 6.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.mts CHANGED
@@ -1094,7 +1094,6 @@ interface PaymentMethod extends Resource {
1094
1094
  market?: Market | null;
1095
1095
  payment_gateway?: PaymentGateway | null;
1096
1096
  store?: Store | null;
1097
- orders?: Order[] | null;
1098
1097
  attachments?: Attachment[] | null;
1099
1098
  versions?: Version[] | null;
1100
1099
  }
@@ -1218,7 +1217,6 @@ declare class PaymentMethods extends ApiResource<PaymentMethod> {
1218
1217
  market(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market>;
1219
1218
  payment_gateway(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway>;
1220
1219
  store(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store>;
1221
- orders(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>>;
1222
1220
  attachments(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
1223
1221
  versions(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>>;
1224
1222
  _disable(id: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod>;
@@ -1548,20 +1546,20 @@ interface CheckoutComPayment extends Resource {
1548
1546
  */
1549
1547
  token: string;
1550
1548
  /**
1551
- * A payment session ID used to obtain the details.
1552
- * @example ```"sid_y3oqhf46pyzuxjbcn2giaqnb44"```
1549
+ * The session object which initializes payment.
1550
+ * @example ```{"id":"ps_xxxx_yyyy_zzzz","payment_session_secret":"pss_xxxx_yyy_zzzz","payment_session_token":"xxxxx_yyyyy_zzzzz","_links":{"self":{"href":"https://api.sandbox.checkout.com/payment-sessions/ps_xxxx_yyyy_zzzz"}}}```
1553
1551
  */
1554
- session_id?: string | null;
1552
+ payment_session: Record<string, any>;
1555
1553
  /**
1556
1554
  * The URL to redirect your customer upon 3DS succeeded authentication.
1557
1555
  * @example ```"http://commercelayer.dev/checkout_com/success"```
1558
1556
  */
1559
- success_url?: string | null;
1557
+ success_url: string;
1560
1558
  /**
1561
1559
  * The URL to redirect your customer upon 3DS failed authentication.
1562
1560
  * @example ```"http://commercelayer.dev/checkout_com/failure"```
1563
1561
  */
1564
- failure_url?: string | null;
1562
+ failure_url: string;
1565
1563
  /**
1566
1564
  * The payment source identifier that can be used for subsequent payments.
1567
1565
  * @example ```"src_nwd3m4in3hkuddfpjsaevunhdy"```
@@ -1606,21 +1604,16 @@ interface CheckoutComPaymentCreate extends ResourceCreate {
1606
1604
  * @example ```"tok_4gzeau5o2uqubbk6fufs3m7p54"```
1607
1605
  */
1608
1606
  token: string;
1609
- /**
1610
- * A payment session ID used to obtain the details.
1611
- * @example ```"sid_y3oqhf46pyzuxjbcn2giaqnb44"```
1612
- */
1613
- session_id?: string | null;
1614
1607
  /**
1615
1608
  * The URL to redirect your customer upon 3DS succeeded authentication.
1616
1609
  * @example ```"http://commercelayer.dev/checkout_com/success"```
1617
1610
  */
1618
- success_url?: string | null;
1611
+ success_url: string;
1619
1612
  /**
1620
1613
  * The URL to redirect your customer upon 3DS failed authentication.
1621
1614
  * @example ```"http://commercelayer.dev/checkout_com/failure"```
1622
1615
  */
1623
- failure_url?: string | null;
1616
+ failure_url: string;
1624
1617
  order: OrderRel$h;
1625
1618
  }
1626
1619
  interface CheckoutComPaymentUpdate extends ResourceUpdate {
@@ -1634,21 +1627,6 @@ interface CheckoutComPaymentUpdate extends ResourceUpdate {
1634
1627
  * @example ```"tok_4gzeau5o2uqubbk6fufs3m7p54"```
1635
1628
  */
1636
1629
  token?: string | null;
1637
- /**
1638
- * A payment session ID used to obtain the details.
1639
- * @example ```"sid_y3oqhf46pyzuxjbcn2giaqnb44"```
1640
- */
1641
- session_id?: string | null;
1642
- /**
1643
- * The URL to redirect your customer upon 3DS succeeded authentication.
1644
- * @example ```"http://commercelayer.dev/checkout_com/success"```
1645
- */
1646
- success_url?: string | null;
1647
- /**
1648
- * The URL to redirect your customer upon 3DS failed authentication.
1649
- * @example ```"http://commercelayer.dev/checkout_com/failure"```
1650
- */
1651
- failure_url?: string | null;
1652
1630
  /**
1653
1631
  * Send this attribute if you want to send additional details the payment request (i.e. upon 3DS check).
1654
1632
  * @example ```true```
@@ -9263,6 +9241,16 @@ interface Customer extends Resource {
9263
9241
  * @example ```"xxx-yyy-zzz"```
9264
9242
  */
9265
9243
  tax_exemption_code?: string | null;
9244
+ /**
9245
+ * The custom_claim attached to the current JWT (if any).
9246
+ * @example ```{}```
9247
+ */
9248
+ jwt_custom_claim?: Record<string, any> | null;
9249
+ /**
9250
+ * The anonymization info object.
9251
+ * @example ```{"status":"requested","requested_at":"2025-03-15 11:39:21 UTC","requester":{"id":"fdgt56hh","first_name":"Travis","last_name":"Muller","email":"test@labadie.test"}}```
9252
+ */
9253
+ anonymization_info?: Record<string, any> | null;
9266
9254
  customer_group?: CustomerGroup | null;
9267
9255
  customer_addresses?: CustomerAddress[] | null;
9268
9256
  customer_payment_sources?: CustomerPaymentSource[] | null;
@@ -9274,6 +9262,9 @@ interface Customer extends Resource {
9274
9262
  attachments?: Attachment[] | null;
9275
9263
  events?: Event[] | null;
9276
9264
  tags?: Tag[] | null;
9265
+ jwt_customer?: Customer | null;
9266
+ jwt_markets?: Market[] | null;
9267
+ jwt_stock_locations?: StockLocation[] | null;
9277
9268
  }
9278
9269
  interface CustomerCreate extends ResourceCreate {
9279
9270
  /**
@@ -9338,6 +9329,16 @@ interface CustomerUpdate extends ResourceUpdate {
9338
9329
  * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.
9339
9330
  */
9340
9331
  _remove_tags?: string | null;
9332
+ /**
9333
+ * Send this attribute if you want to trigger anonymization.
9334
+ * @example ```true```
9335
+ */
9336
+ _request_anonymization?: boolean | null;
9337
+ /**
9338
+ * Send this attribute if you want to trigger a cancellation of anonymization.
9339
+ * @example ```true```
9340
+ */
9341
+ _cancel_anonymization?: boolean | null;
9341
9342
  customer_group?: CustomerGroupRel$2 | null;
9342
9343
  tags?: TagRel$4[] | null;
9343
9344
  }
@@ -9357,8 +9358,13 @@ declare class Customers extends ApiResource<Customer> {
9357
9358
  attachments(customerId: string | Customer, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
9358
9359
  events(customerId: string | Customer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>>;
9359
9360
  tags(customerId: string | Customer, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
9361
+ jwt_customer(customerId: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer>;
9362
+ jwt_markets(customerId: string | Customer, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>>;
9363
+ jwt_stock_locations(customerId: string | Customer, params?: QueryParamsList<StockLocation>, options?: ResourcesConfig): Promise<ListResponse<StockLocation>>;
9360
9364
  _add_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer>;
9361
9365
  _remove_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer>;
9366
+ _request_anonymization(id: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer>;
9367
+ _cancel_anonymization(id: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer>;
9362
9368
  isCustomer(resource: any): resource is Customer;
9363
9369
  relationship(id: string | ResourceId | null): CustomerRel$3;
9364
9370
  relationshipToMany(...ids: string[]): CustomerRel$3[];
@@ -17155,7 +17161,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
17155
17161
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
17156
17162
  declare class CommerceLayerClient {
17157
17163
  #private;
17158
- readonly openApiSchemaVersion = "7.8.4";
17164
+ readonly openApiSchemaVersion = "7.8.6";
17159
17165
  constructor(config: CommerceLayerInitConfig);
17160
17166
  get addresses(): Addresses;
17161
17167
  get adjustments(): Adjustments;
package/lib/index.d.ts CHANGED
@@ -1094,7 +1094,6 @@ interface PaymentMethod extends Resource {
1094
1094
  market?: Market | null;
1095
1095
  payment_gateway?: PaymentGateway | null;
1096
1096
  store?: Store | null;
1097
- orders?: Order[] | null;
1098
1097
  attachments?: Attachment[] | null;
1099
1098
  versions?: Version[] | null;
1100
1099
  }
@@ -1218,7 +1217,6 @@ declare class PaymentMethods extends ApiResource<PaymentMethod> {
1218
1217
  market(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market>;
1219
1218
  payment_gateway(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway>;
1220
1219
  store(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store>;
1221
- orders(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>>;
1222
1220
  attachments(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
1223
1221
  versions(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>>;
1224
1222
  _disable(id: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod>;
@@ -1548,20 +1546,20 @@ interface CheckoutComPayment extends Resource {
1548
1546
  */
1549
1547
  token: string;
1550
1548
  /**
1551
- * A payment session ID used to obtain the details.
1552
- * @example ```"sid_y3oqhf46pyzuxjbcn2giaqnb44"```
1549
+ * The session object which initializes payment.
1550
+ * @example ```{"id":"ps_xxxx_yyyy_zzzz","payment_session_secret":"pss_xxxx_yyy_zzzz","payment_session_token":"xxxxx_yyyyy_zzzzz","_links":{"self":{"href":"https://api.sandbox.checkout.com/payment-sessions/ps_xxxx_yyyy_zzzz"}}}```
1553
1551
  */
1554
- session_id?: string | null;
1552
+ payment_session: Record<string, any>;
1555
1553
  /**
1556
1554
  * The URL to redirect your customer upon 3DS succeeded authentication.
1557
1555
  * @example ```"http://commercelayer.dev/checkout_com/success"```
1558
1556
  */
1559
- success_url?: string | null;
1557
+ success_url: string;
1560
1558
  /**
1561
1559
  * The URL to redirect your customer upon 3DS failed authentication.
1562
1560
  * @example ```"http://commercelayer.dev/checkout_com/failure"```
1563
1561
  */
1564
- failure_url?: string | null;
1562
+ failure_url: string;
1565
1563
  /**
1566
1564
  * The payment source identifier that can be used for subsequent payments.
1567
1565
  * @example ```"src_nwd3m4in3hkuddfpjsaevunhdy"```
@@ -1606,21 +1604,16 @@ interface CheckoutComPaymentCreate extends ResourceCreate {
1606
1604
  * @example ```"tok_4gzeau5o2uqubbk6fufs3m7p54"```
1607
1605
  */
1608
1606
  token: string;
1609
- /**
1610
- * A payment session ID used to obtain the details.
1611
- * @example ```"sid_y3oqhf46pyzuxjbcn2giaqnb44"```
1612
- */
1613
- session_id?: string | null;
1614
1607
  /**
1615
1608
  * The URL to redirect your customer upon 3DS succeeded authentication.
1616
1609
  * @example ```"http://commercelayer.dev/checkout_com/success"```
1617
1610
  */
1618
- success_url?: string | null;
1611
+ success_url: string;
1619
1612
  /**
1620
1613
  * The URL to redirect your customer upon 3DS failed authentication.
1621
1614
  * @example ```"http://commercelayer.dev/checkout_com/failure"```
1622
1615
  */
1623
- failure_url?: string | null;
1616
+ failure_url: string;
1624
1617
  order: OrderRel$h;
1625
1618
  }
1626
1619
  interface CheckoutComPaymentUpdate extends ResourceUpdate {
@@ -1634,21 +1627,6 @@ interface CheckoutComPaymentUpdate extends ResourceUpdate {
1634
1627
  * @example ```"tok_4gzeau5o2uqubbk6fufs3m7p54"```
1635
1628
  */
1636
1629
  token?: string | null;
1637
- /**
1638
- * A payment session ID used to obtain the details.
1639
- * @example ```"sid_y3oqhf46pyzuxjbcn2giaqnb44"```
1640
- */
1641
- session_id?: string | null;
1642
- /**
1643
- * The URL to redirect your customer upon 3DS succeeded authentication.
1644
- * @example ```"http://commercelayer.dev/checkout_com/success"```
1645
- */
1646
- success_url?: string | null;
1647
- /**
1648
- * The URL to redirect your customer upon 3DS failed authentication.
1649
- * @example ```"http://commercelayer.dev/checkout_com/failure"```
1650
- */
1651
- failure_url?: string | null;
1652
1630
  /**
1653
1631
  * Send this attribute if you want to send additional details the payment request (i.e. upon 3DS check).
1654
1632
  * @example ```true```
@@ -9263,6 +9241,16 @@ interface Customer extends Resource {
9263
9241
  * @example ```"xxx-yyy-zzz"```
9264
9242
  */
9265
9243
  tax_exemption_code?: string | null;
9244
+ /**
9245
+ * The custom_claim attached to the current JWT (if any).
9246
+ * @example ```{}```
9247
+ */
9248
+ jwt_custom_claim?: Record<string, any> | null;
9249
+ /**
9250
+ * The anonymization info object.
9251
+ * @example ```{"status":"requested","requested_at":"2025-03-15 11:39:21 UTC","requester":{"id":"fdgt56hh","first_name":"Travis","last_name":"Muller","email":"test@labadie.test"}}```
9252
+ */
9253
+ anonymization_info?: Record<string, any> | null;
9266
9254
  customer_group?: CustomerGroup | null;
9267
9255
  customer_addresses?: CustomerAddress[] | null;
9268
9256
  customer_payment_sources?: CustomerPaymentSource[] | null;
@@ -9274,6 +9262,9 @@ interface Customer extends Resource {
9274
9262
  attachments?: Attachment[] | null;
9275
9263
  events?: Event[] | null;
9276
9264
  tags?: Tag[] | null;
9265
+ jwt_customer?: Customer | null;
9266
+ jwt_markets?: Market[] | null;
9267
+ jwt_stock_locations?: StockLocation[] | null;
9277
9268
  }
9278
9269
  interface CustomerCreate extends ResourceCreate {
9279
9270
  /**
@@ -9338,6 +9329,16 @@ interface CustomerUpdate extends ResourceUpdate {
9338
9329
  * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.
9339
9330
  */
9340
9331
  _remove_tags?: string | null;
9332
+ /**
9333
+ * Send this attribute if you want to trigger anonymization.
9334
+ * @example ```true```
9335
+ */
9336
+ _request_anonymization?: boolean | null;
9337
+ /**
9338
+ * Send this attribute if you want to trigger a cancellation of anonymization.
9339
+ * @example ```true```
9340
+ */
9341
+ _cancel_anonymization?: boolean | null;
9341
9342
  customer_group?: CustomerGroupRel$2 | null;
9342
9343
  tags?: TagRel$4[] | null;
9343
9344
  }
@@ -9357,8 +9358,13 @@ declare class Customers extends ApiResource<Customer> {
9357
9358
  attachments(customerId: string | Customer, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
9358
9359
  events(customerId: string | Customer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>>;
9359
9360
  tags(customerId: string | Customer, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
9361
+ jwt_customer(customerId: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer>;
9362
+ jwt_markets(customerId: string | Customer, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>>;
9363
+ jwt_stock_locations(customerId: string | Customer, params?: QueryParamsList<StockLocation>, options?: ResourcesConfig): Promise<ListResponse<StockLocation>>;
9360
9364
  _add_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer>;
9361
9365
  _remove_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer>;
9366
+ _request_anonymization(id: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer>;
9367
+ _cancel_anonymization(id: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer>;
9362
9368
  isCustomer(resource: any): resource is Customer;
9363
9369
  relationship(id: string | ResourceId | null): CustomerRel$3;
9364
9370
  relationshipToMany(...ids: string[]): CustomerRel$3[];
@@ -17155,7 +17161,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
17155
17161
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
17156
17162
  declare class CommerceLayerClient {
17157
17163
  #private;
17158
- readonly openApiSchemaVersion = "7.8.4";
17164
+ readonly openApiSchemaVersion = "7.8.6";
17159
17165
  constructor(config: CommerceLayerInitConfig);
17160
17166
  get addresses(): Addresses;
17161
17167
  get adjustments(): Adjustments;