@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
package/dist/commerce/queries.js
CHANGED
|
@@ -49,6 +49,7 @@ export const GET_PRODUCT = `
|
|
|
49
49
|
variants {
|
|
50
50
|
id name sku
|
|
51
51
|
price priceWithTax currencyCode stockLevel
|
|
52
|
+
stockOnHand stockAllocated saleable
|
|
52
53
|
priceListName retailPrice retailPriceWithTax
|
|
53
54
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
54
55
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -105,6 +106,7 @@ export const GET_PRODUCT_BY_ID = `
|
|
|
105
106
|
variants {
|
|
106
107
|
id name sku
|
|
107
108
|
price priceWithTax currencyCode stockLevel
|
|
109
|
+
stockOnHand stockAllocated saleable
|
|
108
110
|
priceListName retailPrice retailPriceWithTax
|
|
109
111
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
110
112
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -150,6 +152,7 @@ export const LIST_PRODUCTS = `
|
|
|
150
152
|
variants {
|
|
151
153
|
id name sku
|
|
152
154
|
price priceWithTax currencyCode stockLevel
|
|
155
|
+
stockOnHand stockAllocated saleable
|
|
153
156
|
priceListName retailPrice retailPriceWithTax
|
|
154
157
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
155
158
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -214,6 +217,7 @@ export const GET_COLLECTION = `
|
|
|
214
217
|
featuredAsset { source presets { m { url webpUrl } } }
|
|
215
218
|
}
|
|
216
219
|
price priceWithTax currencyCode stockLevel
|
|
220
|
+
stockOnHand stockAllocated saleable
|
|
217
221
|
priceListName retailPrice retailPriceWithTax
|
|
218
222
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
219
223
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -268,6 +272,12 @@ const ORDER_FIELDS = `
|
|
|
268
272
|
customer { id firstName lastName emailAddress }
|
|
269
273
|
couponCodes
|
|
270
274
|
`;
|
|
275
|
+
const ORDER_FULFILLMENTS_FRAGMENT = `
|
|
276
|
+
fulfillments {
|
|
277
|
+
id state method trackingCode createdAt updatedAt
|
|
278
|
+
lines { orderLineId quantity }
|
|
279
|
+
}
|
|
280
|
+
`;
|
|
271
281
|
export const ACTIVE_ORDER = `
|
|
272
282
|
query ActiveOrder {
|
|
273
283
|
activeOrder { ${ORDER_FIELDS} }
|
|
@@ -460,6 +470,18 @@ export const MOLLIE_PAYMENT_METHODS = `
|
|
|
460
470
|
minimumAmount { value currency }
|
|
461
471
|
maximumAmount { value currency }
|
|
462
472
|
image { size1x size2x svg }
|
|
473
|
+
status
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
`;
|
|
477
|
+
export const ORDERED_MOLLIE_PAYMENT_METHODS = `
|
|
478
|
+
query OrderedMolliePaymentMethods($paymentMethodCode: String!) {
|
|
479
|
+
orderedMolliePaymentMethods(paymentMethodCode: $paymentMethodCode) {
|
|
480
|
+
id
|
|
481
|
+
code
|
|
482
|
+
description
|
|
483
|
+
imageUrl
|
|
484
|
+
status
|
|
463
485
|
}
|
|
464
486
|
}
|
|
465
487
|
`;
|
|
@@ -471,6 +493,15 @@ export const CREATE_MOLLIE_PAYMENT_INTENT = `
|
|
|
471
493
|
}
|
|
472
494
|
}
|
|
473
495
|
`;
|
|
496
|
+
export const SYNC_MOLLIE_PAYMENT_STATUS = `
|
|
497
|
+
mutation SyncMolliePaymentStatus($orderCode: String!) {
|
|
498
|
+
syncMolliePaymentStatus(orderCode: $orderCode) {
|
|
499
|
+
id
|
|
500
|
+
code
|
|
501
|
+
state
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
`;
|
|
474
505
|
export const LOGIN = `
|
|
475
506
|
mutation Login($email: String!, $password: String!) {
|
|
476
507
|
login(username: $email, password: $password) {
|
|
@@ -504,6 +535,7 @@ export const GET_CURRENT_CUSTOMER = `
|
|
|
504
535
|
items {
|
|
505
536
|
id code state totalWithTax createdAt
|
|
506
537
|
lines { id quantity productVariant { name } }
|
|
538
|
+
${ORDER_FULFILLMENTS_FRAGMENT}
|
|
507
539
|
}
|
|
508
540
|
totalItems
|
|
509
541
|
}
|
|
@@ -517,6 +549,7 @@ export const GET_CUSTOMER_ORDERS = `
|
|
|
517
549
|
items {
|
|
518
550
|
id code state totalWithTax createdAt
|
|
519
551
|
lines { id quantity productVariant { name } }
|
|
552
|
+
${ORDER_FULFILLMENTS_FRAGMENT}
|
|
520
553
|
}
|
|
521
554
|
totalItems
|
|
522
555
|
}
|
|
@@ -640,7 +673,10 @@ export const AVAILABLE_COUNTRIES = `
|
|
|
640
673
|
`;
|
|
641
674
|
export const ORDER_BY_CODE = `
|
|
642
675
|
query OrderByCode($code: String!) {
|
|
643
|
-
orderByCode(code: $code) {
|
|
676
|
+
orderByCode(code: $code) {
|
|
677
|
+
${ORDER_FIELDS}
|
|
678
|
+
${ORDER_FULFILLMENTS_FRAGMENT}
|
|
679
|
+
}
|
|
644
680
|
}
|
|
645
681
|
`;
|
|
646
682
|
export const FAVORITE_VARIANT_IDS = `
|
|
@@ -658,6 +694,7 @@ export const MY_FAVORITES = `
|
|
|
658
694
|
productVariant {
|
|
659
695
|
id name sku
|
|
660
696
|
price priceWithTax currencyCode stockLevel
|
|
697
|
+
stockOnHand stockAllocated saleable
|
|
661
698
|
priceListName retailPrice retailPriceWithTax
|
|
662
699
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
663
700
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -700,6 +737,8 @@ const CHANNEL_CUSTOM_FIELDS_FRAGMENT = `
|
|
|
700
737
|
cdnDomain maintenanceMode
|
|
701
738
|
urlLocaleStrategy urlLocalePrefixDefault
|
|
702
739
|
twitterHandle defaultOgImageId llmsTxtEnabled
|
|
740
|
+
storefrontUrl quotesEnabled
|
|
741
|
+
returnsEnabled returnWindowDays
|
|
703
742
|
}
|
|
704
743
|
`;
|
|
705
744
|
export const GET_ACTIVE_CHANNEL = `
|
|
@@ -762,6 +801,7 @@ export const GET_PRODUCT_RECOMMENDATIONS = `
|
|
|
762
801
|
variants {
|
|
763
802
|
id name sku
|
|
764
803
|
price priceWithTax currencyCode stockLevel
|
|
804
|
+
stockOnHand stockAllocated saleable
|
|
765
805
|
priceListName retailPrice retailPriceWithTax
|
|
766
806
|
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
767
807
|
availabilityByLocation { locationId locationName inStock }
|
|
@@ -778,10 +818,41 @@ export const GET_EXCHANGE_RATES = `
|
|
|
778
818
|
}
|
|
779
819
|
}
|
|
780
820
|
`;
|
|
821
|
+
const CONVERTED_AMOUNT_FIELDS = `
|
|
822
|
+
originalAmount originalCurrency convertedAmount targetCurrency rate rateDate
|
|
823
|
+
`;
|
|
781
824
|
export const CONVERT_CURRENCY = `
|
|
782
825
|
query ConvertCurrency($amount: String!, $from: String!, $to: String!) {
|
|
783
826
|
convertCurrency(amount: $amount, fromCurrency: $from, toCurrency: $to) {
|
|
784
|
-
|
|
827
|
+
${CONVERTED_AMOUNT_FIELDS}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
`;
|
|
831
|
+
export const GET_EXCHANGE_RATE = `
|
|
832
|
+
query ExchangeRate($targetCurrency: String!) {
|
|
833
|
+
exchangeRate(targetCurrency: $targetCurrency) {
|
|
834
|
+
baseCurrency targetCurrency rate inverseRate rateDate
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
`;
|
|
838
|
+
export const CONVERT_FROM_BASE = `
|
|
839
|
+
query ConvertFromBase($amount: String!, $targetCurrency: String!) {
|
|
840
|
+
convertFromBase(amount: $amount, targetCurrency: $targetCurrency) {
|
|
841
|
+
${CONVERTED_AMOUNT_FIELDS}
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
`;
|
|
845
|
+
export const CONVERT_TO_BASE = `
|
|
846
|
+
query ConvertToBase($amount: String!, $sourceCurrency: String!) {
|
|
847
|
+
convertToBase(amount: $amount, sourceCurrency: $sourceCurrency) {
|
|
848
|
+
${CONVERTED_AMOUNT_FIELDS}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
`;
|
|
852
|
+
export const CONVERT_TO_MULTIPLE = `
|
|
853
|
+
query ConvertToMultiple($amount: String!, $from: String!, $to: [String!]!) {
|
|
854
|
+
convertToMultiple(amount: $amount, fromCurrency: $from, toCurrencies: $to) {
|
|
855
|
+
currency amount rate
|
|
785
856
|
}
|
|
786
857
|
}
|
|
787
858
|
`;
|
|
@@ -851,4 +922,89 @@ export const GET_BRANDING = `
|
|
|
851
922
|
}
|
|
852
923
|
}
|
|
853
924
|
`;
|
|
925
|
+
export const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = `
|
|
926
|
+
query ActiveChannelOrderConstraints {
|
|
927
|
+
activeChannelOrderConstraints {
|
|
928
|
+
minOrderAmountGross
|
|
929
|
+
fulfillmentMinOrderNet
|
|
930
|
+
currencyCode
|
|
931
|
+
customerIsExempt
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
`;
|
|
935
|
+
export const MY_ORDER_INVOICES = `
|
|
936
|
+
query MyOrderInvoices($orderCode: String!) {
|
|
937
|
+
myOrderInvoices(orderCode: $orderCode) {
|
|
938
|
+
id invoiceNumber invoicedOn totalWithTax currencyCode languageCode createdAt
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
`;
|
|
942
|
+
export const MY_INVOICE_PDF = `
|
|
943
|
+
query MyInvoicePdf($invoiceId: ID!) {
|
|
944
|
+
myInvoicePdf(invoiceId: $invoiceId) {
|
|
945
|
+
base64 filename invoiceNumber
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
`;
|
|
949
|
+
const RETURN_FIELDS = `
|
|
950
|
+
id code state
|
|
951
|
+
orderId orderCode currencyCode
|
|
952
|
+
preferredSettlementMethod settlementMethod
|
|
953
|
+
shippingRefundAmount settledAmount
|
|
954
|
+
customerNote requestedAt resolvedAt createdAt
|
|
955
|
+
lines {
|
|
956
|
+
id orderLineId
|
|
957
|
+
productVariantId productVariantName productVariantSku
|
|
958
|
+
requestedQty approvedQty receivedQty restockQty writeOffQty
|
|
959
|
+
reasonCode reasonNote
|
|
960
|
+
unitPriceWithTax refundAmount
|
|
961
|
+
}
|
|
962
|
+
`;
|
|
963
|
+
export const MY_RETURNS = `
|
|
964
|
+
query MyReturns($take: Int, $skip: Int) {
|
|
965
|
+
myReturns(options: { take: $take, skip: $skip }) {
|
|
966
|
+
items { ${RETURN_FIELDS} }
|
|
967
|
+
totalItems
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
`;
|
|
971
|
+
export const MY_RETURN = `
|
|
972
|
+
query MyReturn($id: ID!) {
|
|
973
|
+
myReturn(id: $id) { ${RETURN_FIELDS} }
|
|
974
|
+
}
|
|
975
|
+
`;
|
|
976
|
+
export const REQUEST_RETURN = `
|
|
977
|
+
mutation RequestReturn(
|
|
978
|
+
$orderId: ID!
|
|
979
|
+
$lines: [ReturnRequestLineInput!]!
|
|
980
|
+
$customerNote: String
|
|
981
|
+
$preferredSettlementMethod: OrderReturnSettlementMethod
|
|
982
|
+
) {
|
|
983
|
+
requestReturn(
|
|
984
|
+
input: {
|
|
985
|
+
orderId: $orderId
|
|
986
|
+
lines: $lines
|
|
987
|
+
customerNote: $customerNote
|
|
988
|
+
preferredSettlementMethod: $preferredSettlementMethod
|
|
989
|
+
}
|
|
990
|
+
) { ${RETURN_FIELDS} }
|
|
991
|
+
}
|
|
992
|
+
`;
|
|
993
|
+
export const CANCEL_MY_RETURN = `
|
|
994
|
+
mutation CancelMyReturn($id: ID!) {
|
|
995
|
+
cancelMyReturn(id: $id) { ${RETURN_FIELDS} }
|
|
996
|
+
}
|
|
997
|
+
`;
|
|
998
|
+
export const RETURNABLE_LINES_FOR_ORDER = `
|
|
999
|
+
query ReturnableLinesForOrder($orderId: ID!) {
|
|
1000
|
+
returnableLinesForOrder(orderId: $orderId) {
|
|
1001
|
+
orderId eligible reason returnWindowEndsAt
|
|
1002
|
+
lines {
|
|
1003
|
+
orderLineId
|
|
1004
|
+
productVariantId productVariantName productVariantSku
|
|
1005
|
+
fulfilledQty returnableQty unitPriceWithTax
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
`;
|
|
854
1010
|
//# sourceMappingURL=queries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAQA,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAQA,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqDnB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqDzB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B5B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;CAU1B,CAAC;AAIF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;CAgB/B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B7B,CAAC;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;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RequestReturnInput } from '../types.js';
|
|
3
|
+
export declare function createReturnsMethods(http: HttpClient): {
|
|
4
|
+
getMyReturns(options?: CustomerReturnListOptions): Promise<CustomerReturnList>;
|
|
5
|
+
getMyReturn(id: string): Promise<CustomerReturn | null>;
|
|
6
|
+
requestReturn(input: RequestReturnInput): Promise<CustomerReturn>;
|
|
7
|
+
cancelMyReturn(id: string): Promise<CustomerReturn>;
|
|
8
|
+
getReturnableLinesForOrder(orderId: string): Promise<CustomerReturnEligibility>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=returns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returns.d.ts","sourceRoot":"","sources":["../../src/commerce/returns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,cAAc,EACd,yBAAyB,EACzB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AASrB,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU;2BAEpB,yBAAyB,GAAG,OAAO,CAAC,kBAAkB,CAAC;oBAQ9D,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;yBAKlC,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC;uBAU9C,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;wCAOf,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;EAQxF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CANCEL_MY_RETURN, MY_RETURN, MY_RETURNS, REQUEST_RETURN, RETURNABLE_LINES_FOR_ORDER, } from './queries.js';
|
|
2
|
+
export function createReturnsMethods(http) {
|
|
3
|
+
return {
|
|
4
|
+
async getMyReturns(options) {
|
|
5
|
+
const data = await http.graphql(MY_RETURNS, {
|
|
6
|
+
take: options?.take,
|
|
7
|
+
skip: options?.skip,
|
|
8
|
+
});
|
|
9
|
+
return data.myReturns;
|
|
10
|
+
},
|
|
11
|
+
async getMyReturn(id) {
|
|
12
|
+
const data = await http.graphql(MY_RETURN, { id });
|
|
13
|
+
return data.myReturn;
|
|
14
|
+
},
|
|
15
|
+
async requestReturn(input) {
|
|
16
|
+
const data = await http.graphql(REQUEST_RETURN, {
|
|
17
|
+
orderId: input.orderId,
|
|
18
|
+
lines: input.lines,
|
|
19
|
+
customerNote: input.customerNote,
|
|
20
|
+
preferredSettlementMethod: input.preferredSettlementMethod,
|
|
21
|
+
});
|
|
22
|
+
return data.requestReturn;
|
|
23
|
+
},
|
|
24
|
+
async cancelMyReturn(id) {
|
|
25
|
+
const data = await http.graphql(CANCEL_MY_RETURN, {
|
|
26
|
+
id,
|
|
27
|
+
});
|
|
28
|
+
return data.cancelMyReturn;
|
|
29
|
+
},
|
|
30
|
+
async getReturnableLinesForOrder(orderId) {
|
|
31
|
+
const data = await http.graphql(RETURNABLE_LINES_FOR_ORDER, { orderId });
|
|
32
|
+
return data.returnableLinesForOrder;
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=returns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returns.js","sourceRoot":"","sources":["../../src/commerce/returns.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,cAAc,EACd,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AAEtB,MAAM,UAAU,oBAAoB,CAAC,IAAgB;IACnD,OAAO;QACL,KAAK,CAAC,YAAY,CAAC,OAAmC;YACpD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAoC,UAAU,EAAE;gBAC7E,IAAI,EAAE,OAAO,EAAE,IAAI;gBACnB,IAAI,EAAE,OAAO,EAAE,IAAI;aACpB,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;QAED,KAAK,CAAC,WAAW,CAAC,EAAU;YAC1B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAsC,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YACxF,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;QAED,KAAK,CAAC,aAAa,CAAC,KAAyB;YAC3C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAoC,cAAc,EAAE;gBACjF,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,YAAY,EAAE,KAAK,CAAC,YAAY;gBAChC,yBAAyB,EAAE,KAAK,CAAC,yBAAyB;aAC3D,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;QAED,KAAK,CAAC,cAAc,CAAC,EAAU;YAC7B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAqC,gBAAgB,EAAE;gBACpF,EAAE;aACH,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,cAAc,CAAC;QAC7B,CAAC;QAED,KAAK,CAAC,0BAA0B,CAAC,OAAe;YAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,0BAA0B,EAC1B,EAAE,OAAO,EAAE,CACZ,CAAC;YACF,OAAO,IAAI,CAAC,uBAAuB,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { HttpClient } from '../core/http.js';
|
|
2
2
|
import type { DeliveryOption, DeliveryOptionsInput, DropOffPoint, DropOffPointInput, ShipmentTrackingInfo } from '../types.js';
|
|
3
|
+
export declare const DROP_OFF_POINTS = "\n query MyparcelDropOffPoints($input: MyparcelDropOffPointInput!) {\n myparcelDropOffPoints(input: $input) {\n location_code\n location_name\n street\n number\n number_suffix\n postal_code\n city\n cc\n phone\n reference\n longitude\n latitude\n available_days\n cut_off_time\n carrier_id\n distance\n }\n }\n";
|
|
4
|
+
export declare const DELIVERY_OPTIONS = "\n query MyparcelDeliveryOptions($input: MyparcelDeliveryOptionsInput!) {\n myparcelDeliveryOptions(input: $input) {\n date\n time {\n start\n end\n price_comment\n price { amount currency }\n type\n }\n }\n }\n";
|
|
5
|
+
export declare const TRACK_SHIPMENT = "\n query MyparcelTrackShipment($barcode: String!, $postalCode: String!) {\n myparcelTrackShipment(barcode: $barcode, postalCode: $postalCode) {\n shipment_id\n status {\n current\n final\n }\n history {\n status\n time\n }\n barcode\n link_consumer_portal\n }\n }\n";
|
|
3
6
|
export declare function createShippingMethods(http: HttpClient): {
|
|
4
7
|
getDropOffPoints(input: DropOffPointInput): Promise<DropOffPoint[]>;
|
|
5
8
|
getDeliveryOptions(input: DeliveryOptionsInput): Promise<DeliveryOption[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipping.d.ts","sourceRoot":"","sources":["../../src/commerce/shipping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"shipping.d.ts","sourceRoot":"","sources":["../../src/commerce/shipping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,eAAe,mZAqB3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,kRAa5B,CAAC;AAEF,eAAO,MAAM,cAAc,qVAgB1B,CAAC;AAqFF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU;4BAEpB,iBAAiB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;8BAQzC,oBAAoB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;2BAQnD,MAAM,cAAc,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;EAQjG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const DROP_OFF_POINTS = `
|
|
1
|
+
export const DROP_OFF_POINTS = `
|
|
2
2
|
query MyparcelDropOffPoints($input: MyparcelDropOffPointInput!) {
|
|
3
3
|
myparcelDropOffPoints(input: $input) {
|
|
4
4
|
location_code
|
|
@@ -20,7 +20,7 @@ const DROP_OFF_POINTS = `
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
`;
|
|
23
|
-
const DELIVERY_OPTIONS = `
|
|
23
|
+
export const DELIVERY_OPTIONS = `
|
|
24
24
|
query MyparcelDeliveryOptions($input: MyparcelDeliveryOptionsInput!) {
|
|
25
25
|
myparcelDeliveryOptions(input: $input) {
|
|
26
26
|
date
|
|
@@ -28,11 +28,13 @@ const DELIVERY_OPTIONS = `
|
|
|
28
28
|
start
|
|
29
29
|
end
|
|
30
30
|
price_comment
|
|
31
|
+
price { amount currency }
|
|
32
|
+
type
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
`;
|
|
35
|
-
const TRACK_SHIPMENT = `
|
|
37
|
+
export const TRACK_SHIPMENT = `
|
|
36
38
|
query MyparcelTrackShipment($barcode: String!, $postalCode: String!) {
|
|
37
39
|
myparcelTrackShipment(barcode: $barcode, postalCode: $postalCode) {
|
|
38
40
|
shipment_id
|
|
@@ -76,6 +78,8 @@ function mapDeliveryOption(raw) {
|
|
|
76
78
|
start: t.start,
|
|
77
79
|
end: t.end,
|
|
78
80
|
priceComment: t.price_comment,
|
|
81
|
+
price: t.price,
|
|
82
|
+
deliveryType: t.type,
|
|
79
83
|
})),
|
|
80
84
|
};
|
|
81
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipping.js","sourceRoot":"","sources":["../../src/commerce/shipping.ts"],"names":[],"mappings":"AASA,MAAM,eAAe,GAAiB;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"shipping.js","sourceRoot":"","sources":["../../src/commerce/shipping.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,eAAe,GAAiB;;;;;;;;;;;;;;;;;;;;;CAqB5C,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAiB;;;;;;;;;;;;;CAa7C,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAiB;;;;;;;;;;;;;;;;CAgB3C,CAAC;AAwCF,SAAS,eAAe,CAAC,GAAoB;IAC3C,OAAO;QACL,YAAY,EAAE,GAAG,CAAC,aAAa;QAC/B,YAAY,EAAE,GAAG,CAAC,aAAa;QAC/B,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,YAAY,EAAE,GAAG,CAAC,aAAa;QAC/B,UAAU,EAAE,GAAG,CAAC,WAAW;QAC3B,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,WAAW,EAAE,GAAG,CAAC,EAAE;QACnB,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,aAAa,EAAE,GAAG,CAAC,cAAc;QACjC,UAAU,EAAE,GAAG,CAAC,YAAY;QAC5B,SAAS,EAAE,GAAG,CAAC,UAAU;QACzB,QAAQ,EAAE,GAAG,CAAC,QAAQ;KACvB,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,GAAsB;IAC/C,OAAO;QACL,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACzB,KAAK,EAAE,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C"}
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import type { HttpClient } from '../core/http.js';
|
|
2
|
-
import type { CustomerSubscription } from '../types.js';
|
|
2
|
+
import type { CustomerSubscription, MyPaymentMandate, SetupPaymentMandateResult, SubscriptionPlanPublic } from '../types.js';
|
|
3
|
+
export declare const SUBSCRIPTION_PLANS = "\n query SubscriptionPlans {\n subscriptionPlans { \n id\n name\n description\n currencyCode\n price\n billingInterval\n billingIntervalCount\n trialDays\n minCycles\n maxCycles\n }\n }\n";
|
|
4
|
+
export declare const MY_PAYMENT_MANDATES = "\n query MyPaymentMandates {\n myPaymentMandates { \n id\n provider\n mandateMethod\n mandateStatus\n isDefault\n createdAt\n }\n }\n";
|
|
5
|
+
export declare const SETUP_PAYMENT_MANDATE = "\n mutation SetupPaymentMandate($input: SetupPaymentMandateInput!) {\n setupPaymentMandate(input: $input) {\n mandate { \n id\n provider\n mandateMethod\n mandateStatus\n isDefault\n createdAt\n }\n checkoutUrl\n clientSecret\n }\n }\n";
|
|
6
|
+
export declare const CREATE_MY_SUBSCRIPTION = "\n mutation CreateMySubscription($input: CreateMySubscriptionInput!) {\n createMySubscription(input: $input) { \n id\n planName\n currencyCode\n recurringPrice\n billingInterval\n currentStatus\n currentPeriodStart\n currentPeriodEnd\n nextRenewalAt\n cancelAtPeriodEnd\n createdAt\n }\n }\n";
|
|
7
|
+
export declare const MY_SUBSCRIPTIONS = "\n query MySubscriptions {\n mySubscriptions { \n id\n planName\n currencyCode\n recurringPrice\n billingInterval\n currentStatus\n currentPeriodStart\n currentPeriodEnd\n nextRenewalAt\n cancelAtPeriodEnd\n createdAt\n }\n }\n";
|
|
8
|
+
export declare const PAUSE_MY_SUBSCRIPTION = "\n mutation PauseMySubscription($id: ID!, $reason: String) {\n pauseMySubscription(id: $id, reason: $reason) { \n id\n planName\n currencyCode\n recurringPrice\n billingInterval\n currentStatus\n currentPeriodStart\n currentPeriodEnd\n nextRenewalAt\n cancelAtPeriodEnd\n createdAt\n }\n }\n";
|
|
9
|
+
export declare const RESUME_MY_SUBSCRIPTION = "\n mutation ResumeMySubscription($id: ID!) {\n resumeMySubscription(id: $id) { \n id\n planName\n currencyCode\n recurringPrice\n billingInterval\n currentStatus\n currentPeriodStart\n currentPeriodEnd\n nextRenewalAt\n cancelAtPeriodEnd\n createdAt\n }\n }\n";
|
|
10
|
+
export declare const CANCEL_MY_SUBSCRIPTION = "\n mutation CancelMySubscription($id: ID!, $reason: String, $immediate: Boolean) {\n cancelMySubscription(id: $id, reason: $reason, immediate: $immediate) { \n id\n planName\n currencyCode\n recurringPrice\n billingInterval\n currentStatus\n currentPeriodStart\n currentPeriodEnd\n nextRenewalAt\n cancelAtPeriodEnd\n createdAt\n }\n }\n";
|
|
3
11
|
export declare function createSubscriptionsMethods(http: HttpClient): {
|
|
4
12
|
getMySubscriptions(): Promise<CustomerSubscription[]>;
|
|
13
|
+
getSubscriptionPlans(): Promise<SubscriptionPlanPublic[]>;
|
|
14
|
+
getMyPaymentMandates(): Promise<MyPaymentMandate[]>;
|
|
15
|
+
setupPaymentMandate(input: {
|
|
16
|
+
provider: string;
|
|
17
|
+
redirectUrl: string;
|
|
18
|
+
}): Promise<SetupPaymentMandateResult>;
|
|
19
|
+
createSubscription(planId: string, mandateId: string): Promise<CustomerSubscription>;
|
|
5
20
|
pauseMySubscription(id: string, reason?: string): Promise<CustomerSubscription>;
|
|
6
21
|
resumeMySubscription(id: string): Promise<CustomerSubscription>;
|
|
7
22
|
cancelMySubscription(id: string, options?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../src/commerce/subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../src/commerce/subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,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15
|
+
id
|
|
16
|
+
name
|
|
17
|
+
description
|
|
18
|
+
currencyCode
|
|
19
|
+
price
|
|
20
|
+
billingInterval
|
|
21
|
+
billingIntervalCount
|
|
22
|
+
trialDays
|
|
23
|
+
minCycles
|
|
24
|
+
maxCycles
|
|
25
|
+
`;
|
|
26
|
+
const PAYMENT_MANDATE_FIELDS = `
|
|
27
|
+
id
|
|
28
|
+
provider
|
|
29
|
+
mandateMethod
|
|
30
|
+
mandateStatus
|
|
31
|
+
isDefault
|
|
32
|
+
createdAt
|
|
33
|
+
`;
|
|
34
|
+
export const SUBSCRIPTION_PLANS = `
|
|
35
|
+
query SubscriptionPlans {
|
|
36
|
+
subscriptionPlans { ${SUBSCRIPTION_PLAN_PUBLIC_FIELDS} }
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
export const MY_PAYMENT_MANDATES = `
|
|
40
|
+
query MyPaymentMandates {
|
|
41
|
+
myPaymentMandates { ${PAYMENT_MANDATE_FIELDS} }
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
export const SETUP_PAYMENT_MANDATE = `
|
|
45
|
+
mutation SetupPaymentMandate($input: SetupPaymentMandateInput!) {
|
|
46
|
+
setupPaymentMandate(input: $input) {
|
|
47
|
+
mandate { ${PAYMENT_MANDATE_FIELDS} }
|
|
48
|
+
checkoutUrl
|
|
49
|
+
clientSecret
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
export const CREATE_MY_SUBSCRIPTION = `
|
|
54
|
+
mutation CreateMySubscription($input: CreateMySubscriptionInput!) {
|
|
55
|
+
createMySubscription(input: $input) { ${SUBSCRIPTION_FIELDS} }
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
export const MY_SUBSCRIPTIONS = `
|
|
15
59
|
query MySubscriptions {
|
|
16
60
|
mySubscriptions { ${SUBSCRIPTION_FIELDS} }
|
|
17
61
|
}
|
|
18
62
|
`;
|
|
19
|
-
const PAUSE_MY_SUBSCRIPTION = `
|
|
63
|
+
export const PAUSE_MY_SUBSCRIPTION = `
|
|
20
64
|
mutation PauseMySubscription($id: ID!, $reason: String) {
|
|
21
65
|
pauseMySubscription(id: $id, reason: $reason) { ${SUBSCRIPTION_FIELDS} }
|
|
22
66
|
}
|
|
23
67
|
`;
|
|
24
|
-
const RESUME_MY_SUBSCRIPTION = `
|
|
68
|
+
export const RESUME_MY_SUBSCRIPTION = `
|
|
25
69
|
mutation ResumeMySubscription($id: ID!) {
|
|
26
70
|
resumeMySubscription(id: $id) { ${SUBSCRIPTION_FIELDS} }
|
|
27
71
|
}
|
|
28
72
|
`;
|
|
29
|
-
const CANCEL_MY_SUBSCRIPTION = `
|
|
73
|
+
export const CANCEL_MY_SUBSCRIPTION = `
|
|
30
74
|
mutation CancelMySubscription($id: ID!, $reason: String, $immediate: Boolean) {
|
|
31
75
|
cancelMySubscription(id: $id, reason: $reason, immediate: $immediate) { ${SUBSCRIPTION_FIELDS} }
|
|
32
76
|
}
|
|
@@ -37,6 +81,22 @@ export function createSubscriptionsMethods(http) {
|
|
|
37
81
|
const data = await http.graphql(MY_SUBSCRIPTIONS);
|
|
38
82
|
return data.mySubscriptions;
|
|
39
83
|
},
|
|
84
|
+
async getSubscriptionPlans() {
|
|
85
|
+
const data = await http.graphql(SUBSCRIPTION_PLANS);
|
|
86
|
+
return data.subscriptionPlans;
|
|
87
|
+
},
|
|
88
|
+
async getMyPaymentMandates() {
|
|
89
|
+
const data = await http.graphql(MY_PAYMENT_MANDATES);
|
|
90
|
+
return data.myPaymentMandates;
|
|
91
|
+
},
|
|
92
|
+
async setupPaymentMandate(input) {
|
|
93
|
+
const data = await http.graphql(SETUP_PAYMENT_MANDATE, { input });
|
|
94
|
+
return data.setupPaymentMandate;
|
|
95
|
+
},
|
|
96
|
+
async createSubscription(planId, mandateId) {
|
|
97
|
+
const data = await http.graphql(CREATE_MY_SUBSCRIPTION, { input: { planId, mandateId } });
|
|
98
|
+
return data.createMySubscription;
|
|
99
|
+
},
|
|
40
100
|
async pauseMySubscription(id, reason) {
|
|
41
101
|
const data = await http.graphql(PAUSE_MY_SUBSCRIPTION, { id, reason });
|
|
42
102
|
return data.pauseMySubscription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../src/commerce/subscriptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../src/commerce/subscriptions.ts"],"names":[],"mappings":"AAQA,MAAM,mBAAmB,GAAG;;;;;;;;;;;;CAY3B,CAAC;AAEF,MAAM,+BAA+B,GAAG;;;;;;;;;;;CAWvC,CAAC;AAEF,MAAM,sBAAsB,GAAG;;;;;;;CAO9B,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;;0BAER,+BAA+B;;CAExD,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;0BAET,sBAAsB;;CAE/C,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;kBAGnB,sBAAsB;;;;;CAKvC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG;;4CAEM,mBAAmB;;CAE9D,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;wBAER,mBAAmB;;CAE1C,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;sDAEiB,mBAAmB;;CAExE,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG;;sCAEA,mBAAmB;;CAExD,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG;;8EAEwC,mBAAmB;;CAEhG,CAAC;AAEF,MAAM,UAAU,0BAA0B,CAAC,IAAgB;IACzD,OAAO;QACL,KAAK,CAAC,kBAAkB;YACtB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,gBAAgB,CACjB,CAAC;YACF,OAAO,IAAI,CAAC,eAAe,CAAC;QAC9B,CAAC;QAED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EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,KAAK,EAAE,CACxE,CAAC;YACF,OAAO,IAAI,CAAC,oBAAoB,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HttpClient } from '../core/http.js';
|
|
2
|
+
import type { CmsCollection, CmsCollectionDetail, CmsCollectionItem, CmsCollectionItemList, CollectionItemsQuery, RequestOptions } from '../types.js';
|
|
3
|
+
export declare function createCmsCollectionMethods(http: HttpClient): {
|
|
4
|
+
getCollections(options?: RequestOptions): Promise<CmsCollection[]>;
|
|
5
|
+
getCollection(collectionId: string, options?: RequestOptions): Promise<CmsCollectionDetail>;
|
|
6
|
+
getCollectionItems(collectionId: string, query?: CollectionItemsQuery, options?: RequestOptions): Promise<CmsCollectionItemList>;
|
|
7
|
+
getCollectionItem(collectionId: string, itemId: string, languageCode?: string, options?: RequestOptions): Promise<CmsCollectionItem>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/content/collections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACf,MAAM,aAAa,CAAC;AA0BrB,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,UAAU;6BAGxB,cAAc,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;gCAOxD,MAAM,YACV,cAAc,GACvB,OAAO,CAAC,mBAAmB,CAAC;qCAcf,MAAM,UACZ,oBAAoB,YAClB,cAAc,GACvB,OAAO,CAAC,qBAAqB,CAAC;oCAoBjB,MAAM,UACZ,MAAM,iBACC,MAAM,YACX,cAAc,GACvB,OAAO,CAAC,iBAAiB,CAAC;EAWhC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export function createCmsCollectionMethods(http) {
|
|
2
|
+
return {
|
|
3
|
+
async getCollections(options) {
|
|
4
|
+
const envelope = await http.cmsGet('/collections', {}, options);
|
|
5
|
+
return envelope.data;
|
|
6
|
+
},
|
|
7
|
+
async getCollection(collectionId, options) {
|
|
8
|
+
const envelope = await http.cmsGet(`/collections/${collectionId}`, {}, options);
|
|
9
|
+
return envelope.data;
|
|
10
|
+
},
|
|
11
|
+
async getCollectionItems(collectionId, query, options) {
|
|
12
|
+
const params = {};
|
|
13
|
+
if (query?.parentId)
|
|
14
|
+
params.parent_id = query.parentId;
|
|
15
|
+
if (query?.slug)
|
|
16
|
+
params.slug = query.slug;
|
|
17
|
+
if (query?.search)
|
|
18
|
+
params.search = query.search;
|
|
19
|
+
if (query?.sort)
|
|
20
|
+
params.sort = query.sort;
|
|
21
|
+
if (query?.languageCode)
|
|
22
|
+
params.language_code = query.languageCode;
|
|
23
|
+
if (query?.limit != null)
|
|
24
|
+
params.limit = String(query.limit);
|
|
25
|
+
if (query?.offset != null)
|
|
26
|
+
params.offset = String(query.offset);
|
|
27
|
+
const envelope = await http.cmsGet(`/collections/${collectionId}/items`, params, options);
|
|
28
|
+
return { items: envelope.data, total: envelope.pagination.total };
|
|
29
|
+
},
|
|
30
|
+
async getCollectionItem(collectionId, itemId, languageCode, options) {
|
|
31
|
+
const params = {};
|
|
32
|
+
if (languageCode)
|
|
33
|
+
params.language_code = languageCode;
|
|
34
|
+
const envelope = await http.cmsGet(`/collections/${collectionId}/items/${itemId}`, params, options);
|
|
35
|
+
return envelope.data;
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=collections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/content/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C,CAAC;YAEhE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAChC,gBAAgB,YAAY,QAAQ,EACpC,MAAM,EACN,OAAO,CACR,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACpE,CAAC;QAGD,KAAK,CAAC,iBAAiB,CACrB,YAAoB,EACpB,MAAc,EACd,YAAqB,EACrB,OAAwB;YAExB,MAAM,MAAM,GAA2B,EAAE,CAAC;YAC1C,IAAI,YAAY;gBAAE,MAAM,CAAC,aAAa,GAAG,YAAY,CAAC;YACtD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAChC,gBAAgB,YAAY,UAAU,MAAM,EAAE,EAC9C,MAAM,EACN,OAAO,CACR,CAAC;YACF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAW/D,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,GAAG,aAAa,CAYtF"}
|
package/dist/content/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createAssetMethods } from './assets.js';
|
|
2
2
|
import { createCollectionPageMethods } from './collection-pages.js';
|
|
3
|
+
import { createCmsCollectionMethods } from './collections.js';
|
|
3
4
|
import { createFormMethods } from './forms.js';
|
|
4
5
|
import { createContentItemMethods } from './items.js';
|
|
5
6
|
import { createMenuMethods } from './menus.js';
|
|
@@ -16,6 +17,7 @@ export function createContentModule(http, ctx) {
|
|
|
16
17
|
...createMenuMethods(http),
|
|
17
18
|
...createSitemapMethods(http),
|
|
18
19
|
...createCollectionPageMethods(http),
|
|
20
|
+
...createCmsCollectionMethods(http),
|
|
19
21
|
};
|
|
20
22
|
}
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,UAAU,mBAAmB,CAAC,IAAgB,EAAE,GAAiB;IACrE,OAAO;QACL,GAAG,oBAAoB,CAAC,IAAI,CAAC;QAC7B,GAAG,wBAAwB,CAAC,IAAI,CAAC;QACjC,GAAG,kBAAkB,CAAC,IAAI,CAAC;QAC3B,GAAG,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC;QAC/B,GAAG,mBAAmB,CAAC,IAAI,CAAC;QAC5B,GAAG,iBAAiB,CAAC,IAAI,CAAC;QAC1B,GAAG,oBAAoB,CAAC,IAAI,CAAC;QAC7B,GAAG,2BAA2B,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,UAAU,mBAAmB,CAAC,IAAgB,EAAE,GAAiB;IACrE,OAAO;QACL,GAAG,oBAAoB,CAAC,IAAI,CAAC;QAC7B,GAAG,wBAAwB,CAAC,IAAI,CAAC;QACjC,GAAG,kBAAkB,CAAC,IAAI,CAAC;QAC3B,GAAG,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC;QAC/B,GAAG,mBAAmB,CAAC,IAAI,CAAC;QAC5B,GAAG,iBAAiB,CAAC,IAAI,CAAC;QAC1B,GAAG,oBAAoB,CAAC,IAAI,CAAC;QAC7B,GAAG,2BAA2B,CAAC,IAAI,CAAC;QACpC,GAAG,0BAA0B,CAAC,IAAI,CAAC;KACpC,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { HttpClient } from '../core/http.js';
|
|
2
|
-
import type { ConvertedAmount, ExchangeRate } from '../types.js';
|
|
2
|
+
import type { BulkConversionResult, ConvertedAmount, ExchangeRate } from '../types.js';
|
|
3
3
|
export declare function createExchangeMethods(http: HttpClient): {
|
|
4
4
|
getExchangeRates(): Promise<ExchangeRate[]>;
|
|
5
|
+
getExchangeRate(targetCurrency: string): Promise<ExchangeRate | null>;
|
|
5
6
|
convertCurrency(amount: string, fromCurrency: string, toCurrency: string): Promise<ConvertedAmount>;
|
|
7
|
+
convertFromBase(amount: string, targetCurrency: string): Promise<ConvertedAmount>;
|
|
8
|
+
convertToBase(amount: string, sourceCurrency: string): Promise<ConvertedAmount>;
|
|
9
|
+
convertToMultiple(amount: string, fromCurrency: string, toCurrencies: string[]): Promise<BulkConversionResult[]>;
|
|
6
10
|
};
|
|
7
11
|
//# sourceMappingURL=exchange.d.ts.map
|