@sixtyninecommerce/client 0.4.1 → 0.6.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/dist/commerce/checkout.d.ts +2 -1
- package/dist/commerce/checkout.d.ts.map +1 -1
- package/dist/commerce/checkout.js +5 -1
- package/dist/commerce/checkout.js.map +1 -1
- package/dist/commerce/customer.d.ts +3 -1
- package/dist/commerce/customer.d.ts.map +1 -1
- package/dist/commerce/customer.js +13 -1
- package/dist/commerce/customer.js.map +1 -1
- package/dist/commerce/index.d.ts.map +1 -1
- package/dist/commerce/index.js +3 -0
- package/dist/commerce/index.js.map +1 -1
- package/dist/commerce/payments.d.ts +3 -1
- package/dist/commerce/payments.d.ts.map +1 -1
- package/dist/commerce/payments.js +9 -1
- package/dist/commerce/payments.js.map +1 -1
- package/dist/commerce/queries.d.ts +26 -12
- package/dist/commerce/queries.d.ts.map +1 -1
- package/dist/commerce/queries.js +158 -2
- package/dist/commerce/queries.js.map +1 -1
- package/dist/commerce/returns.d.ts +10 -0
- package/dist/commerce/returns.d.ts.map +1 -0
- package/dist/commerce/returns.js +36 -0
- package/dist/commerce/returns.js.map +1 -0
- package/dist/commerce/shipping.d.ts +3 -0
- package/dist/commerce/shipping.d.ts.map +1 -1
- package/dist/commerce/shipping.js +7 -3
- package/dist/commerce/shipping.js.map +1 -1
- package/dist/commerce/subscriptions.d.ts +16 -1
- package/dist/commerce/subscriptions.d.ts.map +1 -1
- package/dist/commerce/subscriptions.js +64 -4
- package/dist/commerce/subscriptions.js.map +1 -1
- package/dist/content/collections.d.ts +9 -0
- package/dist/content/collections.d.ts.map +1 -0
- package/dist/content/collections.js +39 -0
- package/dist/content/collections.js.map +1 -0
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +2 -0
- package/dist/content/index.js.map +1 -1
- package/dist/currency/exchange.d.ts +5 -1
- package/dist/currency/exchange.d.ts.map +1 -1
- package/dist/currency/exchange.js +25 -1
- package/dist/currency/exchange.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +238 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exchange.d.ts","sourceRoot":"","sources":["../../src/currency/exchange.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exchange.d.ts","sourceRoot":"","sources":["../../src/currency/exchange.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU;wBAExB,OAAO,CAAC,YAAY,EAAE,CAAC;oCASX,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;4BAQjE,MAAM,gBACA,MAAM,cACR,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC;4BAUG,MAAM,kBAAkB,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;0BAS3D,MAAM,kBAAkB,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;8BAc3E,MAAM,gBACA,MAAM,gBACN,MAAM,EAAE,GACrB,OAAO,CAAC,oBAAoB,EAAE,CAAC;EAQrC"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { CONVERT_CURRENCY, GET_EXCHANGE_RATES } from '../commerce/queries.js';
|
|
1
|
+
import { CONVERT_CURRENCY, CONVERT_FROM_BASE, CONVERT_TO_BASE, CONVERT_TO_MULTIPLE, GET_EXCHANGE_RATE, GET_EXCHANGE_RATES, } from '../commerce/queries.js';
|
|
2
2
|
export function createExchangeMethods(http) {
|
|
3
3
|
return {
|
|
4
4
|
async getExchangeRates() {
|
|
5
5
|
const data = await http.graphql(GET_EXCHANGE_RATES);
|
|
6
6
|
return data.exchangeRates;
|
|
7
7
|
},
|
|
8
|
+
async getExchangeRate(targetCurrency) {
|
|
9
|
+
const data = await http.graphql(GET_EXCHANGE_RATE, {
|
|
10
|
+
targetCurrency,
|
|
11
|
+
});
|
|
12
|
+
return data.exchangeRate;
|
|
13
|
+
},
|
|
8
14
|
async convertCurrency(amount, fromCurrency, toCurrency) {
|
|
9
15
|
const data = await http.graphql(CONVERT_CURRENCY, {
|
|
10
16
|
amount,
|
|
@@ -13,6 +19,24 @@ export function createExchangeMethods(http) {
|
|
|
13
19
|
});
|
|
14
20
|
return data.convertCurrency;
|
|
15
21
|
},
|
|
22
|
+
async convertFromBase(amount, targetCurrency) {
|
|
23
|
+
const data = await http.graphql(CONVERT_FROM_BASE, {
|
|
24
|
+
amount,
|
|
25
|
+
targetCurrency,
|
|
26
|
+
});
|
|
27
|
+
return data.convertFromBase;
|
|
28
|
+
},
|
|
29
|
+
async convertToBase(amount, sourceCurrency) {
|
|
30
|
+
const data = await http.graphql(CONVERT_TO_BASE, {
|
|
31
|
+
amount,
|
|
32
|
+
sourceCurrency,
|
|
33
|
+
});
|
|
34
|
+
return data.convertToBase;
|
|
35
|
+
},
|
|
36
|
+
async convertToMultiple(amount, fromCurrency, toCurrencies) {
|
|
37
|
+
const data = await http.graphql(CONVERT_TO_MULTIPLE, { amount, from: fromCurrency, to: toCurrencies });
|
|
38
|
+
return data.convertToMultiple;
|
|
39
|
+
},
|
|
16
40
|
};
|
|
17
41
|
}
|
|
18
42
|
//# sourceMappingURL=exchange.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exchange.js","sourceRoot":"","sources":["../../src/currency/exchange.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"exchange.js","sourceRoot":"","sources":["../../src/currency/exchange.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,wBA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I,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,CACjD,CAAC;YACF,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAChC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export { DEFAULT_CMS_URL, DEFAULT_PLUGINS_URL, DEFAULT_VENDURE_URL, RESERVED_STO
|
|
|
3
3
|
export { buildFilteredProductsSearch, type FilteredProductsConfig, type FilteredProductsValue, } from './content/filtered-products.js';
|
|
4
4
|
export { MutationError, StorefrontError } from './errors.js';
|
|
5
5
|
export type { AiSummaryInput, BotDirective, BreadcrumbOverrideEntry, CollectionForSeo, HreflangLink, HreflangLinkTag, HreflangOverrideEntry, LlmsTxtEntryInput, MetaRobots, MetaRobotsFollowDirective, MetaRobotsIndexDirective, MetaRobotsMaxImagePreview, MetaTagsEntityInput, MetaTagsResult, OpenGraphTag, PerBotDirectives, ProductForSeo, ProductMetadata, ProductMetadataAi, ProductMetadataSocial, ProductMetadataTwitter, ProductMetaTagsInput, ProductSeoExtras, QAPair, RobotsMetaTag, RobotsXRobotsHeader, SeoEntityInput, SeoMeta, SeoModule, SocialOgType, TwitterCardType, TwitterTag, UrlLocaleStrategy, } from './seo/index.js';
|
|
6
|
-
export type { ActiveChannel, AddressInput, AgeVerificationStatus, Asset, AssetPresetSize, AssetPresets, B2bCreditStatus, BrandingAssetRef, BrandingContact, BrandingFontResource, BrandingIdentity, BrandingInfo, BrandingLegal, BrandingLegalAddress, BrandingSocialLinks, BrandingStorefrontConfig, BrandingTheme, Breadcrumb, ChannelInfo, CmsAsset, CmsAssetTranslation, Collection, CollectionDetail, CollectionFieldDefinition, CollectionListOptions, CollectionPageValues, CommerceModule, ContentItemSummary, ContentItemWithFields, ContentModule, ContentQueryOptions, ContentSearchHit, ContentSearchQuery, ContentSearchResult, ContentStrings, ConvertedAmount, Country, CreateMolliePaymentIntentInput, CreateQuoteRequestInput, CreateReviewInput, CreateReviewResult, CreditModule, CurrencyModule, Customer, CustomerAddress, CustomerInput, CustomerSubscription, CustomerSubscriptionStatus, DeliveryOption, DeliveryOptionsInput, DeliveryTimeFrame, DropOffPoint, DropOffPointInput, ExchangeRate, Facet, FacetValue, FacetValueFilterInput, FavoriteItem, FavoriteVariant, FormDefinition, FormField, FormSubmissionResult, MediaModule, Menu, MenuItem, MolliePaymentIntentResult, MolliePaymentMethod, MolliePaymentMethodAmount, MolliePaymentMethodsInput, NavigationModule, OptionGroup, Order, OrderAddress, OrderLine, OrderListOptions, OrderSummary, OrderValidationError, OrderValidationResult, PaginatedList, PaymentInput, PaymentMethod, PresetName, PriceDisplay, PriceTier, PricingModule, Product, ProductListOptions, ProductOption, ProductPropertyGroupValues, ProductReview, ProductSummary, ProductVariant, Property, PropertyConfig, PropertyFieldFacet, PropertyGroup, PropertyGroupTranslation, PropertyTranslation, PropertyValue, PublicProductDocument, Quote, QuoteLine, QuoteList, QuoteListOptions, QuoteStatus, RecommendedProductGroup, RegisterInput, RequestOptions, ResolvedContent, ResponsiveImageData, RetryConfig, ReviewAttribute, ReviewAttributeAggregation, ReviewChannelConfig, ReviewListOptions, ReviewMediaUploadResult, ReviewRatingDistribution, ReviewRatingSummary, RouteEntry, RoutesResponse, SearchFacetValue, SearchInput, SearchResult, SearchResultItem, ShipmentTrackingHistoryEntry, ShipmentTrackingInfo, ShippingMethod, SitemapEntry, StoreContext, StorefrontClient, StorefrontClientConfig, StripePaymentIntentResult, TierTableEntry, UpdateAddressInput, UpdateCustomerInput, UpdateReviewInput, VariantPriceData, VatValidationResult, VendureAssetDescriptionTranslation, } from './types.js';
|
|
6
|
+
export type { ActiveChannel, AddressInput, AgeVerificationStatus, Asset, AssetPresetSize, AssetPresets, B2bCreditStatus, BrandingAssetRef, BrandingContact, BrandingFontResource, BrandingIdentity, BrandingInfo, BrandingLegal, BrandingLegalAddress, BrandingSocialLinks, BrandingStorefrontConfig, BrandingTheme, Breadcrumb, ChannelInfo, CmsAsset, CmsAssetTranslation, Collection, CollectionDetail, CollectionFieldDefinition, CollectionListOptions, CollectionPageValues, CommerceModule, ContentItemSummary, ContentItemWithFields, ContentModule, ContentQueryOptions, ContentSearchHit, ContentSearchQuery, ContentSearchResult, ContentStrings, ConvertedAmount, Country, CreateMolliePaymentIntentInput, CreateQuoteRequestInput, CreateReviewInput, CreateReviewResult, CreditModule, CurrencyModule, Customer, CustomerAddress, CustomerInput, CustomerReturn, CustomerReturnEligibility, CustomerReturnLine, CustomerReturnList, CustomerReturnListOptions, CustomerReturnReasonCode, CustomerReturnSettlementMethod, CustomerReturnState, CustomerSubscription, CustomerSubscriptionStatus, DeliveryOption, DeliveryOptionsInput, DeliveryTimeFrame, DropOffPoint, DropOffPointInput, ExchangeRate, Facet, FacetValue, FacetValueFilterInput, FavoriteItem, FavoriteVariant, FormDefinition, FormField, FormSubmissionResult, MediaModule, Menu, MenuItem, MollieOrderStatusResult, MolliePaymentIntentResult, MolliePaymentMethod, MolliePaymentMethodAmount, MolliePaymentMethodsInput, MyPaymentMandate, NavigationModule, OptionGroup, Order, OrderAddress, OrderedMollieMethod, OrderLine, OrderListOptions, OrderSummary, OrderValidationError, OrderValidationResult, PaginatedList, PaymentInput, PaymentMethod, PresetName, PriceDisplay, PriceTier, PricingModule, Product, ProductListOptions, ProductOption, ProductPropertyGroupValues, ProductReview, ProductSummary, ProductVariant, Property, PropertyConfig, PropertyFieldFacet, PropertyGroup, PropertyGroupTranslation, PropertyTranslation, PropertyValue, PublicProductDocument, Quote, QuoteLine, QuoteList, QuoteListOptions, QuoteStatus, RecommendedProductGroup, RegisterInput, RequestOptions, RequestReturnInput, RequestReturnLineInput, ResolvedContent, ResponsiveImageData, RetryConfig, ReturnableOrderLine, ReviewAttribute, ReviewAttributeAggregation, ReviewChannelConfig, ReviewListOptions, ReviewMediaUploadResult, ReviewRatingDistribution, ReviewRatingSummary, RouteEntry, RoutesResponse, SearchFacetValue, SearchInput, SearchResult, SearchResultItem, SetupPaymentMandateResult, ShipmentTrackingHistoryEntry, ShipmentTrackingInfo, ShippingMethod, SitemapEntry, StoreContext, StorefrontClient, StorefrontClientConfig, StripePaymentIntentResult, SubscriptionPlanPublic, TierTableEntry, UpdateAddressInput, UpdateCustomerInput, UpdateReviewInput, VariantPriceData, VatValidationResult, VendureAssetDescriptionTranslation, } from './types.js';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7D,YAAY,EACV,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,UAAU,EACV,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,MAAM,EACN,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,OAAO,EACP,SAAS,EACT,YAAY,EACZ,eAAe,EACf,UAAU,EACV,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,aAAa,EACb,YAAY,EAEZ,qBAAqB,EACrB,KAAK,EACL,eAAe,EACf,YAAY,EAEZ,eAAe,EAEf,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,EACb,UAAU,EACV,WAAW,EAEX,QAAQ,EACR,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EAEpB,cAAc,EAEd,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,OAAO,EACP,8BAA8B,EAE9B,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAElB,YAAY,EAEZ,cAAc,EACd,QAAQ,EACR,eAAe,EAEf,aAAa,EAEb,oBAAoB,EACpB,0BAA0B,EAE1B,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,KAAK,EACL,UAAU,EACV,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,SAAS,EACT,oBAAoB,EAEpB,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,yBAAyB,EACzB,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC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BAAmB,EACnB,kCAAkC,GACnC,MAAM,YAAY,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -48,6 +48,9 @@ export interface ChannelCustomFields {
|
|
|
48
48
|
twitterHandle?: string | null;
|
|
49
49
|
defaultOgImageId?: string | null;
|
|
50
50
|
llmsTxtEnabled?: boolean;
|
|
51
|
+
quotesEnabled?: boolean;
|
|
52
|
+
returnsEnabled?: boolean;
|
|
53
|
+
returnWindowDays?: number;
|
|
51
54
|
[key: string]: unknown;
|
|
52
55
|
}
|
|
53
56
|
export interface BrandingAssetRef {
|
|
@@ -238,6 +241,9 @@ export interface ProductVariant {
|
|
|
238
241
|
priceWithTax: number;
|
|
239
242
|
currencyCode: string;
|
|
240
243
|
stockLevel: string;
|
|
244
|
+
stockOnHand: number | null;
|
|
245
|
+
stockAllocated: number | null;
|
|
246
|
+
saleable: number | null;
|
|
241
247
|
priceListName: string | null;
|
|
242
248
|
retailPrice: number | null;
|
|
243
249
|
retailPriceWithTax: number | null;
|
|
@@ -341,6 +347,9 @@ export interface ProductSummary {
|
|
|
341
347
|
priceWithTax: number;
|
|
342
348
|
currencyCode: string;
|
|
343
349
|
stockLevel: string;
|
|
350
|
+
stockOnHand?: number | null;
|
|
351
|
+
stockAllocated?: number | null;
|
|
352
|
+
saleable?: number | null;
|
|
344
353
|
availabilityByLocation?: VariantLocationAvailability[];
|
|
345
354
|
}>;
|
|
346
355
|
facetValues?: FacetValue[];
|
|
@@ -452,6 +461,19 @@ export interface OrderAddress {
|
|
|
452
461
|
postalCode: string;
|
|
453
462
|
countryCode: string;
|
|
454
463
|
}
|
|
464
|
+
export interface FulfillmentLine {
|
|
465
|
+
orderLineId: string;
|
|
466
|
+
quantity: number;
|
|
467
|
+
}
|
|
468
|
+
export interface Fulfillment {
|
|
469
|
+
id: string;
|
|
470
|
+
state: string;
|
|
471
|
+
method: string;
|
|
472
|
+
trackingCode: string | null;
|
|
473
|
+
createdAt: string;
|
|
474
|
+
updatedAt: string;
|
|
475
|
+
lines: FulfillmentLine[];
|
|
476
|
+
}
|
|
455
477
|
export interface Order {
|
|
456
478
|
id: string;
|
|
457
479
|
code: string;
|
|
@@ -477,6 +499,13 @@ export interface Order {
|
|
|
477
499
|
emailAddress: string;
|
|
478
500
|
};
|
|
479
501
|
couponCodes: string[];
|
|
502
|
+
fulfillments?: Fulfillment[] | null;
|
|
503
|
+
}
|
|
504
|
+
export interface ActiveChannelOrderConstraints {
|
|
505
|
+
minOrderAmountGross: number | null;
|
|
506
|
+
fulfillmentMinOrderNet: number | null;
|
|
507
|
+
currencyCode: string;
|
|
508
|
+
customerIsExempt: boolean;
|
|
480
509
|
}
|
|
481
510
|
export interface ShippingMethod {
|
|
482
511
|
id: string;
|
|
@@ -534,6 +563,21 @@ export interface OrderSummary {
|
|
|
534
563
|
name: string;
|
|
535
564
|
};
|
|
536
565
|
}>;
|
|
566
|
+
fulfillments?: Fulfillment[] | null;
|
|
567
|
+
}
|
|
568
|
+
export interface CustomerInvoice {
|
|
569
|
+
id: string;
|
|
570
|
+
invoiceNumber: string;
|
|
571
|
+
invoicedOn: string;
|
|
572
|
+
totalWithTax: number;
|
|
573
|
+
currencyCode: string;
|
|
574
|
+
languageCode: string;
|
|
575
|
+
createdAt: string;
|
|
576
|
+
}
|
|
577
|
+
export interface CustomerInvoicePdf {
|
|
578
|
+
base64: string;
|
|
579
|
+
filename: string;
|
|
580
|
+
invoiceNumber: string;
|
|
537
581
|
}
|
|
538
582
|
export interface ReorderSkipped {
|
|
539
583
|
variantId: string;
|
|
@@ -588,6 +632,14 @@ export interface MolliePaymentMethod {
|
|
|
588
632
|
size2x: string;
|
|
589
633
|
svg: string;
|
|
590
634
|
};
|
|
635
|
+
status: string | null;
|
|
636
|
+
}
|
|
637
|
+
export interface OrderedMollieMethod {
|
|
638
|
+
id: string;
|
|
639
|
+
code: string;
|
|
640
|
+
description: string | null;
|
|
641
|
+
imageUrl: string | null;
|
|
642
|
+
status: string | null;
|
|
591
643
|
}
|
|
592
644
|
export interface CreateMolliePaymentIntentInput {
|
|
593
645
|
paymentMethodCode: string;
|
|
@@ -595,10 +647,16 @@ export interface CreateMolliePaymentIntentInput {
|
|
|
595
647
|
molliePaymentMethodCode?: string;
|
|
596
648
|
locale?: string;
|
|
597
649
|
immediateCapture?: boolean;
|
|
650
|
+
orderId?: string;
|
|
598
651
|
}
|
|
599
652
|
export interface MolliePaymentIntentResult {
|
|
600
653
|
url: string;
|
|
601
654
|
}
|
|
655
|
+
export interface MollieOrderStatusResult {
|
|
656
|
+
id: string;
|
|
657
|
+
code: string;
|
|
658
|
+
state: string;
|
|
659
|
+
}
|
|
602
660
|
export interface RegisterInput {
|
|
603
661
|
firstName: string;
|
|
604
662
|
lastName: string;
|
|
@@ -727,6 +785,9 @@ export interface FavoriteVariant {
|
|
|
727
785
|
priceWithTax: number;
|
|
728
786
|
currencyCode: string;
|
|
729
787
|
stockLevel: string;
|
|
788
|
+
stockOnHand: number | null;
|
|
789
|
+
stockAllocated: number | null;
|
|
790
|
+
saleable: number | null;
|
|
730
791
|
priceListName: string | null;
|
|
731
792
|
retailPrice: number | null;
|
|
732
793
|
retailPriceWithTax: number | null;
|
|
@@ -844,6 +905,47 @@ export interface CollectionPageValues {
|
|
|
844
905
|
fields: CollectionFieldDefinition[];
|
|
845
906
|
values: Record<string, unknown>;
|
|
846
907
|
}
|
|
908
|
+
export interface CmsCollection {
|
|
909
|
+
id: string;
|
|
910
|
+
name: string;
|
|
911
|
+
slug: string;
|
|
912
|
+
description: string | null;
|
|
913
|
+
isSingleton: boolean;
|
|
914
|
+
basePath: string | null;
|
|
915
|
+
isHierarchical: boolean;
|
|
916
|
+
titleFieldSlug: string | null;
|
|
917
|
+
createdAt: string;
|
|
918
|
+
updatedAt: string;
|
|
919
|
+
}
|
|
920
|
+
export interface CmsCollectionDetail extends CmsCollection {
|
|
921
|
+
fields: CollectionFieldDefinition[];
|
|
922
|
+
}
|
|
923
|
+
export interface CmsCollectionItem {
|
|
924
|
+
id: string;
|
|
925
|
+
collectionId: string;
|
|
926
|
+
slug: string | null;
|
|
927
|
+
status: 'draft' | 'published' | 'archived';
|
|
928
|
+
parentId: string | null;
|
|
929
|
+
publishedAt: string | null;
|
|
930
|
+
createdAt: string;
|
|
931
|
+
updatedAt: string;
|
|
932
|
+
values: Record<string, unknown>;
|
|
933
|
+
slug_translations?: Record<string, string>;
|
|
934
|
+
[key: string]: unknown;
|
|
935
|
+
}
|
|
936
|
+
export interface CmsCollectionItemList {
|
|
937
|
+
items: CmsCollectionItem[];
|
|
938
|
+
total: number;
|
|
939
|
+
}
|
|
940
|
+
export interface CollectionItemsQuery {
|
|
941
|
+
parentId?: string;
|
|
942
|
+
slug?: string;
|
|
943
|
+
search?: string;
|
|
944
|
+
sort?: string;
|
|
945
|
+
languageCode?: string;
|
|
946
|
+
limit?: number;
|
|
947
|
+
offset?: number;
|
|
948
|
+
}
|
|
847
949
|
export interface ContentQueryOptions {
|
|
848
950
|
collectionId?: string;
|
|
849
951
|
collectionSlug?: string;
|
|
@@ -929,11 +1031,17 @@ export interface ExchangeRate {
|
|
|
929
1031
|
rateDate: string;
|
|
930
1032
|
}
|
|
931
1033
|
export interface ConvertedAmount {
|
|
1034
|
+
originalAmount: string;
|
|
1035
|
+
originalCurrency: string;
|
|
1036
|
+
convertedAmount: string;
|
|
1037
|
+
targetCurrency: string;
|
|
1038
|
+
rate: string;
|
|
1039
|
+
rateDate: string;
|
|
1040
|
+
}
|
|
1041
|
+
export interface BulkConversionResult {
|
|
1042
|
+
currency: string;
|
|
932
1043
|
amount: string;
|
|
933
|
-
fromCurrency: string;
|
|
934
|
-
toCurrency: string;
|
|
935
1044
|
rate: string;
|
|
936
|
-
result: string;
|
|
937
1045
|
}
|
|
938
1046
|
export interface PriceDisplay {
|
|
939
1047
|
price: number;
|
|
@@ -1155,6 +1263,31 @@ export interface CustomerSubscription {
|
|
|
1155
1263
|
cancelAtPeriodEnd: boolean;
|
|
1156
1264
|
createdAt: string;
|
|
1157
1265
|
}
|
|
1266
|
+
export interface SubscriptionPlanPublic {
|
|
1267
|
+
id: string;
|
|
1268
|
+
name: string;
|
|
1269
|
+
description: string | null;
|
|
1270
|
+
currencyCode: string;
|
|
1271
|
+
price: number;
|
|
1272
|
+
billingInterval: string;
|
|
1273
|
+
billingIntervalCount: number;
|
|
1274
|
+
trialDays: number;
|
|
1275
|
+
minCycles: number | null;
|
|
1276
|
+
maxCycles: number | null;
|
|
1277
|
+
}
|
|
1278
|
+
export interface MyPaymentMandate {
|
|
1279
|
+
id: string;
|
|
1280
|
+
provider: string;
|
|
1281
|
+
mandateMethod: string | null;
|
|
1282
|
+
mandateStatus: string;
|
|
1283
|
+
isDefault: boolean;
|
|
1284
|
+
createdAt: string;
|
|
1285
|
+
}
|
|
1286
|
+
export interface SetupPaymentMandateResult {
|
|
1287
|
+
mandate: MyPaymentMandate;
|
|
1288
|
+
checkoutUrl: string | null;
|
|
1289
|
+
clientSecret: string | null;
|
|
1290
|
+
}
|
|
1158
1291
|
export type QuoteStatus = 'draft' | 'requested' | 'in_review' | 'approved' | 'declined' | 'expired' | 'converted_to_order' | 'cancelled';
|
|
1159
1292
|
export interface QuoteLine {
|
|
1160
1293
|
id: string;
|
|
@@ -1197,6 +1330,78 @@ export interface CreateQuoteRequestInput {
|
|
|
1197
1330
|
}>;
|
|
1198
1331
|
customerNotes?: string;
|
|
1199
1332
|
}
|
|
1333
|
+
export type CustomerReturnState = 'requested' | 'approved' | 'rejected' | 'cancelled' | 'items_received' | 'settlement_pending' | 'settlement_failed' | 'settled';
|
|
1334
|
+
export type CustomerReturnSettlementMethod = 'refund' | 'store_credit';
|
|
1335
|
+
export type CustomerReturnReasonCode = 'damaged' | 'defective' | 'wrong_item' | 'not_as_described' | 'arrived_late' | 'no_longer_needed' | 'order_error' | 'other';
|
|
1336
|
+
export interface CustomerReturnLine {
|
|
1337
|
+
id: string;
|
|
1338
|
+
orderLineId: string;
|
|
1339
|
+
productVariantId: string;
|
|
1340
|
+
productVariantName: string;
|
|
1341
|
+
productVariantSku: string;
|
|
1342
|
+
requestedQty: number;
|
|
1343
|
+
approvedQty: number | null;
|
|
1344
|
+
receivedQty: number;
|
|
1345
|
+
restockQty: number;
|
|
1346
|
+
writeOffQty: number;
|
|
1347
|
+
reasonCode: CustomerReturnReasonCode;
|
|
1348
|
+
reasonNote: string | null;
|
|
1349
|
+
unitPriceWithTax: number;
|
|
1350
|
+
refundAmount: number | null;
|
|
1351
|
+
}
|
|
1352
|
+
export interface CustomerReturn {
|
|
1353
|
+
id: string;
|
|
1354
|
+
code: string;
|
|
1355
|
+
state: CustomerReturnState;
|
|
1356
|
+
orderId: string;
|
|
1357
|
+
orderCode: string;
|
|
1358
|
+
currencyCode: string;
|
|
1359
|
+
preferredSettlementMethod: CustomerReturnSettlementMethod | null;
|
|
1360
|
+
settlementMethod: CustomerReturnSettlementMethod | null;
|
|
1361
|
+
shippingRefundAmount: number;
|
|
1362
|
+
settledAmount: number | null;
|
|
1363
|
+
customerNote: string | null;
|
|
1364
|
+
requestedAt: string;
|
|
1365
|
+
resolvedAt: string | null;
|
|
1366
|
+
lines: CustomerReturnLine[];
|
|
1367
|
+
createdAt: string;
|
|
1368
|
+
}
|
|
1369
|
+
export interface CustomerReturnList {
|
|
1370
|
+
items: CustomerReturn[];
|
|
1371
|
+
totalItems: number;
|
|
1372
|
+
}
|
|
1373
|
+
export interface CustomerReturnListOptions {
|
|
1374
|
+
take?: number;
|
|
1375
|
+
skip?: number;
|
|
1376
|
+
}
|
|
1377
|
+
export interface RequestReturnLineInput {
|
|
1378
|
+
orderLineId: string;
|
|
1379
|
+
quantity: number;
|
|
1380
|
+
reasonCode: CustomerReturnReasonCode;
|
|
1381
|
+
reasonNote?: string;
|
|
1382
|
+
}
|
|
1383
|
+
export interface RequestReturnInput {
|
|
1384
|
+
orderId: string;
|
|
1385
|
+
lines: RequestReturnLineInput[];
|
|
1386
|
+
customerNote?: string;
|
|
1387
|
+
preferredSettlementMethod?: CustomerReturnSettlementMethod;
|
|
1388
|
+
}
|
|
1389
|
+
export interface ReturnableOrderLine {
|
|
1390
|
+
orderLineId: string;
|
|
1391
|
+
productVariantId: string;
|
|
1392
|
+
productVariantName: string;
|
|
1393
|
+
productVariantSku: string;
|
|
1394
|
+
fulfilledQty: number;
|
|
1395
|
+
returnableQty: number;
|
|
1396
|
+
unitPriceWithTax: number;
|
|
1397
|
+
}
|
|
1398
|
+
export interface CustomerReturnEligibility {
|
|
1399
|
+
orderId: string;
|
|
1400
|
+
eligible: boolean;
|
|
1401
|
+
reason: string | null;
|
|
1402
|
+
returnWindowEndsAt: string | null;
|
|
1403
|
+
lines: ReturnableOrderLine[];
|
|
1404
|
+
}
|
|
1200
1405
|
export interface B2bCreditStatus {
|
|
1201
1406
|
customerId: string;
|
|
1202
1407
|
currencyCode: string;
|
|
@@ -1255,6 +1460,11 @@ export interface DeliveryTimeFrame {
|
|
|
1255
1460
|
start: string;
|
|
1256
1461
|
end: string;
|
|
1257
1462
|
priceComment: string | null;
|
|
1463
|
+
price: {
|
|
1464
|
+
amount: number;
|
|
1465
|
+
currency: string;
|
|
1466
|
+
} | null;
|
|
1467
|
+
deliveryType: number | null;
|
|
1258
1468
|
}
|
|
1259
1469
|
export interface DeliveryOption {
|
|
1260
1470
|
date: string;
|
|
@@ -1325,11 +1535,14 @@ export interface CommerceModule {
|
|
|
1325
1535
|
getEligibleShippingMethods(): Promise<ShippingMethod[]>;
|
|
1326
1536
|
setShippingMethod(ids: string[]): Promise<Order>;
|
|
1327
1537
|
getEligiblePaymentMethods(): Promise<PaymentMethod[]>;
|
|
1538
|
+
getOrderConstraints(): Promise<ActiveChannelOrderConstraints>;
|
|
1328
1539
|
transitionToArrangingPayment(): Promise<Order>;
|
|
1329
1540
|
addPayment(input: PaymentInput): Promise<Order>;
|
|
1330
1541
|
createStripePaymentIntent(options?: RequestOptions): Promise<StripePaymentIntentResult>;
|
|
1331
1542
|
getMolliePaymentMethods(input: MolliePaymentMethodsInput, options?: RequestOptions): Promise<MolliePaymentMethod[]>;
|
|
1543
|
+
getOrderedMolliePaymentMethods(paymentMethodCode: string, options?: RequestOptions): Promise<OrderedMollieMethod[]>;
|
|
1332
1544
|
createMolliePaymentIntent(input: CreateMolliePaymentIntentInput, options?: RequestOptions): Promise<MolliePaymentIntentResult>;
|
|
1545
|
+
syncMolliePaymentStatus(orderCode: string, options?: RequestOptions): Promise<MollieOrderStatusResult | null>;
|
|
1333
1546
|
login(email: string, password: string): Promise<{
|
|
1334
1547
|
id: string;
|
|
1335
1548
|
identifier: string;
|
|
@@ -1362,6 +1575,8 @@ export interface CommerceModule {
|
|
|
1362
1575
|
deleteAddress(id: string): Promise<void>;
|
|
1363
1576
|
getAvailableCountries(): Promise<Country[]>;
|
|
1364
1577
|
getOrderByCode(code: string): Promise<Order>;
|
|
1578
|
+
getMyOrderInvoices(orderCode: string): Promise<CustomerInvoice[]>;
|
|
1579
|
+
getMyInvoicePdf(invoiceId: string): Promise<CustomerInvoicePdf>;
|
|
1365
1580
|
getActiveChannel(): Promise<ActiveChannel>;
|
|
1366
1581
|
getPropertyGroups(options?: RequestOptions): Promise<PropertyGroup[]>;
|
|
1367
1582
|
getProductProperties(productId: string, options?: RequestOptions): Promise<ProductPropertyGroupValues[]>;
|
|
@@ -1396,6 +1611,13 @@ export interface CommerceModule {
|
|
|
1396
1611
|
reportReview(reviewId: string, reason: string): Promise<boolean>;
|
|
1397
1612
|
uploadReviewMedia(files: File[]): Promise<ReviewMediaUploadResult[]>;
|
|
1398
1613
|
getMySubscriptions(): Promise<CustomerSubscription[]>;
|
|
1614
|
+
getSubscriptionPlans(): Promise<SubscriptionPlanPublic[]>;
|
|
1615
|
+
getMyPaymentMandates(): Promise<MyPaymentMandate[]>;
|
|
1616
|
+
setupPaymentMandate(input: {
|
|
1617
|
+
provider: string;
|
|
1618
|
+
redirectUrl: string;
|
|
1619
|
+
}): Promise<SetupPaymentMandateResult>;
|
|
1620
|
+
createSubscription(planId: string, mandateId: string): Promise<CustomerSubscription>;
|
|
1399
1621
|
pauseMySubscription(id: string, reason?: string): Promise<CustomerSubscription>;
|
|
1400
1622
|
resumeMySubscription(id: string): Promise<CustomerSubscription>;
|
|
1401
1623
|
cancelMySubscription(id: string, options?: {
|
|
@@ -1407,6 +1629,11 @@ export interface CommerceModule {
|
|
|
1407
1629
|
createQuoteRequest(input: CreateQuoteRequestInput): Promise<Quote>;
|
|
1408
1630
|
acceptQuote(id: string): Promise<Order>;
|
|
1409
1631
|
cancelMyQuote(id: string, reason?: string): Promise<Quote>;
|
|
1632
|
+
getMyReturns(options?: CustomerReturnListOptions): Promise<CustomerReturnList>;
|
|
1633
|
+
getMyReturn(id: string): Promise<CustomerReturn | null>;
|
|
1634
|
+
requestReturn(input: RequestReturnInput): Promise<CustomerReturn>;
|
|
1635
|
+
cancelMyReturn(id: string): Promise<CustomerReturn>;
|
|
1636
|
+
getReturnableLinesForOrder(orderId: string): Promise<CustomerReturnEligibility>;
|
|
1410
1637
|
getMyVatValidationStatus(): Promise<VatValidationResult | null>;
|
|
1411
1638
|
setMyVatNumber(vatNumber: string): Promise<VatValidationResult>;
|
|
1412
1639
|
clearMyVatNumber(): Promise<boolean>;
|
|
@@ -1434,6 +1661,10 @@ export interface ContentModule {
|
|
|
1434
1661
|
lookupContentItems(ids: string[], options?: RequestOptions): Promise<ContentItemSummary[]>;
|
|
1435
1662
|
lookupContentItemsWithFields(ids: string[], fieldSlugs: string[], options?: RequestOptions): Promise<ContentItemWithFields[]>;
|
|
1436
1663
|
getCollectionPageValues(collectionId: string, languageCode?: string, options?: RequestOptions): Promise<CollectionPageValues>;
|
|
1664
|
+
getCollections(options?: RequestOptions): Promise<CmsCollection[]>;
|
|
1665
|
+
getCollection(collectionId: string, options?: RequestOptions): Promise<CmsCollectionDetail>;
|
|
1666
|
+
getCollectionItems(collectionId: string, query?: CollectionItemsQuery, options?: RequestOptions): Promise<CmsCollectionItemList>;
|
|
1667
|
+
getCollectionItem(collectionId: string, itemId: string, languageCode?: string, options?: RequestOptions): Promise<CmsCollectionItem>;
|
|
1437
1668
|
}
|
|
1438
1669
|
export interface NavigationModule {
|
|
1439
1670
|
getRoutes(languageCode?: string, options?: RequestOptions): Promise<RoutesResponse>;
|
|
@@ -1460,7 +1691,11 @@ export interface MediaModule {
|
|
|
1460
1691
|
}
|
|
1461
1692
|
export interface CurrencyModule {
|
|
1462
1693
|
getExchangeRates(): Promise<ExchangeRate[]>;
|
|
1694
|
+
getExchangeRate(targetCurrency: string): Promise<ExchangeRate | null>;
|
|
1463
1695
|
convertCurrency(amount: string, fromCurrency: string, toCurrency: string): Promise<ConvertedAmount>;
|
|
1696
|
+
convertFromBase(amount: string, targetCurrency: string): Promise<ConvertedAmount>;
|
|
1697
|
+
convertToBase(amount: string, sourceCurrency: string): Promise<ConvertedAmount>;
|
|
1698
|
+
convertToMultiple(amount: string, fromCurrency: string, toCurrencies: string[]): Promise<BulkConversionResult[]>;
|
|
1464
1699
|
}
|
|
1465
1700
|
export interface CreditModule {
|
|
1466
1701
|
getCreditStatus(options?: RequestOptions): Promise<B2bCreditStatus | null>;
|