@commercelayer/sdk 6.25.0 → 6.25.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/index.d.mts +14 -11
- package/lib/index.d.ts +14 -11
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/package.json +2 -2
package/lib/index.d.mts
CHANGED
@@ -173,7 +173,7 @@ declare class ResourceAdapter {
|
|
173
173
|
private localConfig;
|
174
174
|
config(config: ResourcesConfig): this;
|
175
175
|
get client(): Readonly<ApiClient>;
|
176
|
-
singleton<R extends Resource>(resource: ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
176
|
+
singleton<R extends Resource>(resource: ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig, path?: string): Promise<R>;
|
177
177
|
retrieve<R extends Resource>(resource: ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
178
178
|
list<R extends Resource>(resource: ResourceType, params?: QueryParamsList<R>, options?: ResourcesConfig): Promise<ListResponse<R>>;
|
179
179
|
create<C extends ResourceCreate, R extends Resource>(resource: C & ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
@@ -189,6 +189,7 @@ declare abstract class ApiResourceBase<R extends Resource> {
|
|
189
189
|
protected relationshipOneToOne<RR extends ResourceRel>(id: string | ResourceId | null): RR;
|
190
190
|
protected relationshipOneToMany<RR extends ResourceRel>(...ids: string[]): RR[];
|
191
191
|
abstract type(): ResourceTypeLock;
|
192
|
+
protected path(): string;
|
192
193
|
update(resource: ResourceUpdate, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
193
194
|
}
|
194
195
|
declare abstract class ApiResource<R extends Resource> extends ApiResourceBase<R> {
|
@@ -14140,7 +14141,7 @@ declare class AdyenGateways extends ApiResource<AdyenGateway> {
|
|
14140
14141
|
type(): AdyenGatewayType;
|
14141
14142
|
}
|
14142
14143
|
|
14143
|
-
type ApplicationType = '
|
14144
|
+
type ApplicationType = 'applications';
|
14144
14145
|
type ApplicationRel = ResourceRel & {
|
14145
14146
|
type: ApplicationType;
|
14146
14147
|
};
|
@@ -14179,6 +14180,7 @@ declare class Applications extends ApiSingleton<Application> {
|
|
14179
14180
|
relationship(id: string | ResourceId | null): ApplicationRel;
|
14180
14181
|
relationshipToMany(...ids: string[]): ApplicationRel[];
|
14181
14182
|
type(): ApplicationType;
|
14183
|
+
path(): string;
|
14182
14184
|
}
|
14183
14185
|
|
14184
14186
|
type AxerveGatewayType = 'axerve_gateways';
|
@@ -15356,7 +15358,7 @@ declare class ManualGateways extends ApiResource<ManualGateway> {
|
|
15356
15358
|
type(): ManualGatewayType;
|
15357
15359
|
}
|
15358
15360
|
|
15359
|
-
type OrganizationType = '
|
15361
|
+
type OrganizationType = 'organizations';
|
15360
15362
|
type OrganizationRel = ResourceRel & {
|
15361
15363
|
type: OrganizationType;
|
15362
15364
|
};
|
@@ -15528,6 +15530,7 @@ declare class Organizations extends ApiSingleton<Organization> {
|
|
15528
15530
|
relationship(id: string | ResourceId | null): OrganizationRel;
|
15529
15531
|
relationshipToMany(...ids: string[]): OrganizationRel[];
|
15530
15532
|
type(): OrganizationType;
|
15533
|
+
path(): string;
|
15531
15534
|
}
|
15532
15535
|
|
15533
15536
|
type PaypalGatewayType = 'paypal_gateways';
|
@@ -15762,14 +15765,14 @@ declare class StripeGateways extends ApiResource<StripeGateway> {
|
|
15762
15765
|
type(): StripeGatewayType;
|
15763
15766
|
}
|
15764
15767
|
|
15765
|
-
type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | '
|
15766
|
-
declare const resourceList:
|
15767
|
-
declare const singletonList:
|
15768
|
+
type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'applications' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'buy_x_pay_y_promotions' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'events' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'flex_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'links' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_factories' | 'order_subscription_items' | 'order_subscriptions' | 'orders' | 'organizations' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'payment_options' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_list_schedulers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'recurring_order_copies' | 'refunds' | 'reserved_stocks' | 'resource_errors' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_reservations' | 'stock_transfers' | 'stores' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'versions' | 'voids' | 'webhooks' | 'wire_transfers';
|
15769
|
+
declare const resourceList: ResourceTypeLock[];
|
15770
|
+
declare const singletonList: ResourceTypeLock[];
|
15768
15771
|
type RetrievableResourceType = ResourceTypeLock;
|
15769
15772
|
type RetrievableResource = Resource & {
|
15770
15773
|
type: RetrievableResourceType;
|
15771
15774
|
};
|
15772
|
-
type ListableResourceType = Exclude<ResourceTypeLock, '
|
15775
|
+
type ListableResourceType = Exclude<ResourceTypeLock, 'applications' | 'organizations'>;
|
15773
15776
|
type ListableResource = Resource & {
|
15774
15777
|
type: ListableResourceType;
|
15775
15778
|
};
|
@@ -15804,7 +15807,7 @@ type ResourceFields = {
|
|
15804
15807
|
adjustments: Adjustment;
|
15805
15808
|
adyen_gateways: AdyenGateway;
|
15806
15809
|
adyen_payments: AdyenPayment;
|
15807
|
-
|
15810
|
+
applications: Application;
|
15808
15811
|
attachments: Attachment;
|
15809
15812
|
authorizations: Authorization;
|
15810
15813
|
avalara_accounts: AvalaraAccount;
|
@@ -15868,7 +15871,7 @@ type ResourceFields = {
|
|
15868
15871
|
order_subscription_items: OrderSubscriptionItem;
|
15869
15872
|
order_subscriptions: OrderSubscription;
|
15870
15873
|
orders: Order;
|
15871
|
-
|
15874
|
+
organizations: Organization;
|
15872
15875
|
packages: Package;
|
15873
15876
|
parcel_line_items: ParcelLineItem;
|
15874
15877
|
parcels: Parcel;
|
@@ -15930,7 +15933,7 @@ type ResourceSortFields = {
|
|
15930
15933
|
adjustments: AdjustmentSort;
|
15931
15934
|
adyen_gateways: AdyenGatewaySort;
|
15932
15935
|
adyen_payments: AdyenPaymentSort;
|
15933
|
-
|
15936
|
+
applications: ApplicationSort;
|
15934
15937
|
attachments: AttachmentSort;
|
15935
15938
|
authorizations: AuthorizationSort;
|
15936
15939
|
avalara_accounts: AvalaraAccountSort;
|
@@ -15994,7 +15997,7 @@ type ResourceSortFields = {
|
|
15994
15997
|
order_subscription_items: OrderSubscriptionItemSort;
|
15995
15998
|
order_subscriptions: OrderSubscriptionSort;
|
15996
15999
|
orders: OrderSort;
|
15997
|
-
|
16000
|
+
organizations: OrganizationSort;
|
15998
16001
|
packages: PackageSort;
|
15999
16002
|
parcel_line_items: ParcelLineItemSort;
|
16000
16003
|
parcels: ParcelSort;
|
package/lib/index.d.ts
CHANGED
@@ -173,7 +173,7 @@ declare class ResourceAdapter {
|
|
173
173
|
private localConfig;
|
174
174
|
config(config: ResourcesConfig): this;
|
175
175
|
get client(): Readonly<ApiClient>;
|
176
|
-
singleton<R extends Resource>(resource: ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
176
|
+
singleton<R extends Resource>(resource: ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig, path?: string): Promise<R>;
|
177
177
|
retrieve<R extends Resource>(resource: ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
178
178
|
list<R extends Resource>(resource: ResourceType, params?: QueryParamsList<R>, options?: ResourcesConfig): Promise<ListResponse<R>>;
|
179
179
|
create<C extends ResourceCreate, R extends Resource>(resource: C & ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
@@ -189,6 +189,7 @@ declare abstract class ApiResourceBase<R extends Resource> {
|
|
189
189
|
protected relationshipOneToOne<RR extends ResourceRel>(id: string | ResourceId | null): RR;
|
190
190
|
protected relationshipOneToMany<RR extends ResourceRel>(...ids: string[]): RR[];
|
191
191
|
abstract type(): ResourceTypeLock;
|
192
|
+
protected path(): string;
|
192
193
|
update(resource: ResourceUpdate, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R>;
|
193
194
|
}
|
194
195
|
declare abstract class ApiResource<R extends Resource> extends ApiResourceBase<R> {
|
@@ -14140,7 +14141,7 @@ declare class AdyenGateways extends ApiResource<AdyenGateway> {
|
|
14140
14141
|
type(): AdyenGatewayType;
|
14141
14142
|
}
|
14142
14143
|
|
14143
|
-
type ApplicationType = '
|
14144
|
+
type ApplicationType = 'applications';
|
14144
14145
|
type ApplicationRel = ResourceRel & {
|
14145
14146
|
type: ApplicationType;
|
14146
14147
|
};
|
@@ -14179,6 +14180,7 @@ declare class Applications extends ApiSingleton<Application> {
|
|
14179
14180
|
relationship(id: string | ResourceId | null): ApplicationRel;
|
14180
14181
|
relationshipToMany(...ids: string[]): ApplicationRel[];
|
14181
14182
|
type(): ApplicationType;
|
14183
|
+
path(): string;
|
14182
14184
|
}
|
14183
14185
|
|
14184
14186
|
type AxerveGatewayType = 'axerve_gateways';
|
@@ -15356,7 +15358,7 @@ declare class ManualGateways extends ApiResource<ManualGateway> {
|
|
15356
15358
|
type(): ManualGatewayType;
|
15357
15359
|
}
|
15358
15360
|
|
15359
|
-
type OrganizationType = '
|
15361
|
+
type OrganizationType = 'organizations';
|
15360
15362
|
type OrganizationRel = ResourceRel & {
|
15361
15363
|
type: OrganizationType;
|
15362
15364
|
};
|
@@ -15528,6 +15530,7 @@ declare class Organizations extends ApiSingleton<Organization> {
|
|
15528
15530
|
relationship(id: string | ResourceId | null): OrganizationRel;
|
15529
15531
|
relationshipToMany(...ids: string[]): OrganizationRel[];
|
15530
15532
|
type(): OrganizationType;
|
15533
|
+
path(): string;
|
15531
15534
|
}
|
15532
15535
|
|
15533
15536
|
type PaypalGatewayType = 'paypal_gateways';
|
@@ -15762,14 +15765,14 @@ declare class StripeGateways extends ApiResource<StripeGateway> {
|
|
15762
15765
|
type(): StripeGatewayType;
|
15763
15766
|
}
|
15764
15767
|
|
15765
|
-
type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | '
|
15766
|
-
declare const resourceList:
|
15767
|
-
declare const singletonList:
|
15768
|
+
type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'applications' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'buy_x_pay_y_promotions' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'events' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'flex_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'links' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_factories' | 'order_subscription_items' | 'order_subscriptions' | 'orders' | 'organizations' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'payment_options' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_list_schedulers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'recurring_order_copies' | 'refunds' | 'reserved_stocks' | 'resource_errors' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_reservations' | 'stock_transfers' | 'stores' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'versions' | 'voids' | 'webhooks' | 'wire_transfers';
|
15769
|
+
declare const resourceList: ResourceTypeLock[];
|
15770
|
+
declare const singletonList: ResourceTypeLock[];
|
15768
15771
|
type RetrievableResourceType = ResourceTypeLock;
|
15769
15772
|
type RetrievableResource = Resource & {
|
15770
15773
|
type: RetrievableResourceType;
|
15771
15774
|
};
|
15772
|
-
type ListableResourceType = Exclude<ResourceTypeLock, '
|
15775
|
+
type ListableResourceType = Exclude<ResourceTypeLock, 'applications' | 'organizations'>;
|
15773
15776
|
type ListableResource = Resource & {
|
15774
15777
|
type: ListableResourceType;
|
15775
15778
|
};
|
@@ -15804,7 +15807,7 @@ type ResourceFields = {
|
|
15804
15807
|
adjustments: Adjustment;
|
15805
15808
|
adyen_gateways: AdyenGateway;
|
15806
15809
|
adyen_payments: AdyenPayment;
|
15807
|
-
|
15810
|
+
applications: Application;
|
15808
15811
|
attachments: Attachment;
|
15809
15812
|
authorizations: Authorization;
|
15810
15813
|
avalara_accounts: AvalaraAccount;
|
@@ -15868,7 +15871,7 @@ type ResourceFields = {
|
|
15868
15871
|
order_subscription_items: OrderSubscriptionItem;
|
15869
15872
|
order_subscriptions: OrderSubscription;
|
15870
15873
|
orders: Order;
|
15871
|
-
|
15874
|
+
organizations: Organization;
|
15872
15875
|
packages: Package;
|
15873
15876
|
parcel_line_items: ParcelLineItem;
|
15874
15877
|
parcels: Parcel;
|
@@ -15930,7 +15933,7 @@ type ResourceSortFields = {
|
|
15930
15933
|
adjustments: AdjustmentSort;
|
15931
15934
|
adyen_gateways: AdyenGatewaySort;
|
15932
15935
|
adyen_payments: AdyenPaymentSort;
|
15933
|
-
|
15936
|
+
applications: ApplicationSort;
|
15934
15937
|
attachments: AttachmentSort;
|
15935
15938
|
authorizations: AuthorizationSort;
|
15936
15939
|
avalara_accounts: AvalaraAccountSort;
|
@@ -15994,7 +15997,7 @@ type ResourceSortFields = {
|
|
15994
15997
|
order_subscription_items: OrderSubscriptionItemSort;
|
15995
15998
|
order_subscriptions: OrderSubscriptionSort;
|
15996
15999
|
orders: OrderSort;
|
15997
|
-
|
16000
|
+
organizations: OrganizationSort;
|
15998
16001
|
packages: PackageSort;
|
15999
16002
|
parcel_line_items: ParcelLineItemSort;
|
16000
16003
|
parcels: ParcelSort;
|