@epcc-sdk/sdks-shopper 0.0.17 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/client/@tanstack/react-query.gen.d.ts +110 -1
- package/dist/client/@tanstack/react-query.gen.js +89 -1
- package/dist/client/sdk.gen.d.ts +55 -1
- package/dist/client/sdk.gen.js +62 -0
- package/dist/client/transformers.gen.d.ts +2 -1
- package/dist/client/transformers.gen.js +20 -0
- package/dist/client/types.gen.d.ts +295 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -411,8 +411,12 @@ const product = await getByContextProduct({
|
|
|
411
411
|
|
|
412
412
|
- **`getV2Accounts`** (`GET /v2/accounts`)
|
|
413
413
|
|
|
414
|
+
- **`postV2Accounts`** (`POST /v2/accounts`)
|
|
415
|
+
|
|
414
416
|
- **`getV2AccountsAccountId`** (`GET /v2/accounts/{accountID}`)
|
|
415
417
|
|
|
418
|
+
- **`putV2AccountsAccountId`** (`PUT /v2/accounts/{accountID}`)
|
|
419
|
+
|
|
416
420
|
- **`getV2AccountMembers`** (`GET /v2/account-members`)
|
|
417
421
|
|
|
418
422
|
- **`getV2AccountMembersAccountMemberId`** (`GET /v2/account-members/{accountMemberID}`)
|
|
@@ -421,6 +425,10 @@ const product = await getByContextProduct({
|
|
|
421
425
|
|
|
422
426
|
- **`postV2AccountMembersTokens`** (`POST /v2/account-members/tokens`)
|
|
423
427
|
|
|
428
|
+
- **`getAllCurrencies`** (`GET /v2/currencies`)
|
|
429
|
+
|
|
430
|
+
- **`getACurrency`** (`GET /v2/currencies/{currencyID}`)
|
|
431
|
+
|
|
424
432
|
|
|
425
433
|
|
|
426
434
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Options } from "@hey-api/client-fetch";
|
|
2
2
|
import { type UseMutationOptions } from "@tanstack/react-query";
|
|
3
|
-
import type { GetByContextReleaseData, GetByContextAllHierarchiesData, GetByContextHierarchyData, GetByContextHierarchyNodesData, GetByContextHierarchyChildNodesData, GetByContextAllNodesData, GetByContextNodeData, GetByContextChildNodesData, GetByContextAllProductsData, GetByContextProductData, GetByContextComponentProductIdsData, GetByContextChildProductsData, GetByContextProductsForHierarchyData, GetByContextProductsForNodeData, ConfigureByContextProductData, GetCatalogsData, CreateCatalogData, DeleteCatalogByIdData, GetCatalogByIdData, UpdateCatalogData, DeleteReleasesData, GetReleasesData, PublishReleaseData, DeleteReleaseByIdData, GetReleaseByIdData, GetRulesData, CreateRuleData, DeleteRuleByIdData, GetRuleByIdData, UpdateRuleData, GetAllHierarchiesData, GetHierarchyData, GetHierarchyNodesData, GetHierarchyChildNodesData, GetAllNodesData, GetNodeData, GetChildNodesData, GetAllProductsData, GetProductData, GetComponentProductIdsData, GetChildProductsData, GetProductsForHierarchyData, GetProductsForNodeData, GetCartsData, CreateACartData, DeleteACartData, GetCartData, UpdateACartData, DeleteAllCartItemsData, GetCartItemsData, ManageCartsData, BulkUpdateItemsInCartData, DeleteACartItemData, UpdateACartItemData, DeleteAccountCartAssociationData, CreateAccountCartAssociationData, CreateAccountCartAssociationResponse, DeleteCustomerCartAssociationData, CreateCustomerCartAssociationData, DeleteAPromotionViaPromotionCodeData, AddTaxItemToCartData, BulkDeleteTaxItemsFromCartData, BulkAddTaxItemsToCartData, DeleteATaxItemData, UpdateATaxItemData, BulkDeleteCustomDiscountsFromCartData, BulkAddCustomDiscountsToCartData, DeleteCustomDiscountFromCartData, UpdateCustomDiscountForCartData, AddCustomDiscountToCartItemData, DeleteCustomDiscountFromCartItemData, UpdateCustomDiscountForCartItemData, CreateCartPaymentIntentData, CheckoutApiData, GetCustomerOrdersData, GetAnOrderData, UpdateAnOrderData, GetOrderItemsData, AnonymizeOrdersData, PaymentSetupData, ConfirmPaymentData, CaptureATransactionData, RefundATransactionData, GetOrderTransactionsData, GetATransactionData, CancelATransactionData, GetSubscriptionProductData, GetPlanData, ListOfferingsData, GetOfferingData, ListOfferingPlansData, ListOfferingFeaturesData, ListOfferingProductsData, GetFeatureData, GetStockData, ListLocationsData, CreateAnAccessTokenData, GetV2AccountAddressesData, PostV2AccountAddressData, DeleteV2AccountAddressData, GetV2AccountAddressData, PutV2AccountAddressData, GetV2AccountsData, GetV2AccountsAccountIdData, GetV2AccountMembersData, GetV2AccountMembersAccountMemberIdData, GetV2AccountsAccountIdAccountMembershipsData, PostV2AccountMembersTokensData } from "../types.gen";
|
|
3
|
+
import type { GetByContextReleaseData, GetByContextAllHierarchiesData, GetByContextHierarchyData, GetByContextHierarchyNodesData, GetByContextHierarchyChildNodesData, GetByContextAllNodesData, GetByContextNodeData, GetByContextChildNodesData, GetByContextAllProductsData, GetByContextProductData, GetByContextComponentProductIdsData, GetByContextChildProductsData, GetByContextProductsForHierarchyData, GetByContextProductsForNodeData, ConfigureByContextProductData, GetCatalogsData, CreateCatalogData, DeleteCatalogByIdData, GetCatalogByIdData, UpdateCatalogData, DeleteReleasesData, GetReleasesData, PublishReleaseData, DeleteReleaseByIdData, GetReleaseByIdData, GetRulesData, CreateRuleData, DeleteRuleByIdData, GetRuleByIdData, UpdateRuleData, GetAllHierarchiesData, GetHierarchyData, GetHierarchyNodesData, GetHierarchyChildNodesData, GetAllNodesData, GetNodeData, GetChildNodesData, GetAllProductsData, GetProductData, GetComponentProductIdsData, GetChildProductsData, GetProductsForHierarchyData, GetProductsForNodeData, GetCartsData, CreateACartData, DeleteACartData, GetCartData, UpdateACartData, DeleteAllCartItemsData, GetCartItemsData, ManageCartsData, BulkUpdateItemsInCartData, DeleteACartItemData, UpdateACartItemData, DeleteAccountCartAssociationData, CreateAccountCartAssociationData, CreateAccountCartAssociationResponse, DeleteCustomerCartAssociationData, CreateCustomerCartAssociationData, DeleteAPromotionViaPromotionCodeData, AddTaxItemToCartData, BulkDeleteTaxItemsFromCartData, BulkAddTaxItemsToCartData, DeleteATaxItemData, UpdateATaxItemData, BulkDeleteCustomDiscountsFromCartData, BulkAddCustomDiscountsToCartData, DeleteCustomDiscountFromCartData, UpdateCustomDiscountForCartData, AddCustomDiscountToCartItemData, DeleteCustomDiscountFromCartItemData, UpdateCustomDiscountForCartItemData, CreateCartPaymentIntentData, CheckoutApiData, GetCustomerOrdersData, GetAnOrderData, UpdateAnOrderData, GetOrderItemsData, AnonymizeOrdersData, PaymentSetupData, ConfirmPaymentData, CaptureATransactionData, RefundATransactionData, GetOrderTransactionsData, GetATransactionData, CancelATransactionData, GetSubscriptionProductData, GetPlanData, ListOfferingsData, GetOfferingData, ListOfferingPlansData, ListOfferingFeaturesData, ListOfferingProductsData, GetFeatureData, GetStockData, ListLocationsData, CreateAnAccessTokenData, GetV2AccountAddressesData, PostV2AccountAddressData, DeleteV2AccountAddressData, GetV2AccountAddressData, PutV2AccountAddressData, GetV2AccountsData, PostV2AccountsData, GetV2AccountsAccountIdData, PutV2AccountsAccountIdData, PutV2AccountsAccountIdError, GetV2AccountMembersData, GetV2AccountMembersAccountMemberIdData, GetV2AccountsAccountIdAccountMembershipsData, PostV2AccountMembersTokensData, GetAllCurrenciesData, GetACurrencyData } from "../types.gen";
|
|
4
4
|
export declare const getByContextReleaseQueryKey: (options?: Options<GetByContextReleaseData>) => (Pick<Options<GetByContextReleaseData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
5
5
|
_id: string;
|
|
6
6
|
_infinite?: boolean;
|
|
@@ -2015,6 +2015,38 @@ export declare const getV2AccountsOptions: (options?: Options<GetV2AccountsData>
|
|
|
2015
2015
|
[dataTagErrorSymbol]: Error;
|
|
2016
2016
|
};
|
|
2017
2017
|
};
|
|
2018
|
+
export declare const postV2AccountsQueryKey: (options?: Options<PostV2AccountsData>) => (Pick<Options<PostV2AccountsData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2019
|
+
_id: string;
|
|
2020
|
+
_infinite?: boolean;
|
|
2021
|
+
})[];
|
|
2022
|
+
export declare const postV2AccountsOptions: (options?: Options<PostV2AccountsData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
2023
|
+
data?: import("../types.gen").AccountResponse;
|
|
2024
|
+
}, Error, {
|
|
2025
|
+
data?: import("../types.gen").AccountResponse;
|
|
2026
|
+
}, (Pick<Options<PostV2AccountsData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2027
|
+
_id: string;
|
|
2028
|
+
_infinite?: boolean;
|
|
2029
|
+
})[]>, "queryFn"> & {
|
|
2030
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
2031
|
+
data?: import("../types.gen").AccountResponse;
|
|
2032
|
+
}, (Pick<Options<PostV2AccountsData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2033
|
+
_id: string;
|
|
2034
|
+
_infinite?: boolean;
|
|
2035
|
+
})[], never> | undefined;
|
|
2036
|
+
} & {
|
|
2037
|
+
queryKey: (Pick<Options<PostV2AccountsData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2038
|
+
_id: string;
|
|
2039
|
+
_infinite?: boolean;
|
|
2040
|
+
})[] & {
|
|
2041
|
+
[dataTagSymbol]: {
|
|
2042
|
+
data?: import("../types.gen").AccountResponse;
|
|
2043
|
+
};
|
|
2044
|
+
[dataTagErrorSymbol]: Error;
|
|
2045
|
+
};
|
|
2046
|
+
};
|
|
2047
|
+
export declare const postV2AccountsMutation: (options?: Partial<Options<PostV2AccountsData>>) => UseMutationOptions<{
|
|
2048
|
+
data?: import("../types.gen").AccountResponse;
|
|
2049
|
+
}, import("../types.gen").AccountManagementErrorResponse, Options<PostV2AccountsData>, unknown>;
|
|
2018
2050
|
export declare const getV2AccountsAccountIdQueryKey: (options: Options<GetV2AccountsAccountIdData>) => (Pick<Options<GetV2AccountsAccountIdData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2019
2051
|
_id: string;
|
|
2020
2052
|
_infinite?: boolean;
|
|
@@ -2044,6 +2076,25 @@ export declare const getV2AccountsAccountIdOptions: (options: Options<GetV2Accou
|
|
|
2044
2076
|
[dataTagErrorSymbol]: Error;
|
|
2045
2077
|
};
|
|
2046
2078
|
};
|
|
2079
|
+
export declare const putV2AccountsAccountIdMutation: (options?: Partial<Options<PutV2AccountsAccountIdData>>) => UseMutationOptions<{
|
|
2080
|
+
data?: {
|
|
2081
|
+
id?: string;
|
|
2082
|
+
type?: string;
|
|
2083
|
+
name?: string;
|
|
2084
|
+
legal_name?: string;
|
|
2085
|
+
registration_id?: string;
|
|
2086
|
+
external_ref?: string;
|
|
2087
|
+
meta?: {
|
|
2088
|
+
timestamps?: {
|
|
2089
|
+
created_at?: Date;
|
|
2090
|
+
updated_at?: Date;
|
|
2091
|
+
};
|
|
2092
|
+
};
|
|
2093
|
+
links?: {
|
|
2094
|
+
self?: string;
|
|
2095
|
+
};
|
|
2096
|
+
};
|
|
2097
|
+
}, PutV2AccountsAccountIdError, Options<PutV2AccountsAccountIdData>, unknown>;
|
|
2047
2098
|
export declare const getV2AccountMembersQueryKey: (options?: Options<GetV2AccountMembersData>) => (Pick<Options<GetV2AccountMembersData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2048
2099
|
_id: string;
|
|
2049
2100
|
_infinite?: boolean;
|
|
@@ -2267,3 +2318,61 @@ export declare const postV2AccountMembersTokensMutation: (options?: Partial<Opti
|
|
|
2267
2318
|
prev?: string;
|
|
2268
2319
|
};
|
|
2269
2320
|
}, import("../types.gen").AccountManagementErrorResponse, Options<PostV2AccountMembersTokensData>, unknown>;
|
|
2321
|
+
export declare const getAllCurrenciesQueryKey: (options?: Options<GetAllCurrenciesData>) => (Pick<Options<GetAllCurrenciesData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2322
|
+
_id: string;
|
|
2323
|
+
_infinite?: boolean;
|
|
2324
|
+
})[];
|
|
2325
|
+
export declare const getAllCurrenciesOptions: (options?: Options<GetAllCurrenciesData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").ResponseData & {
|
|
2326
|
+
data?: Array<import("../types.gen").ResponseCurrency>;
|
|
2327
|
+
}, Error, import("../types.gen").ResponseData & {
|
|
2328
|
+
data?: Array<import("../types.gen").ResponseCurrency>;
|
|
2329
|
+
}, (Pick<Options<GetAllCurrenciesData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2330
|
+
_id: string;
|
|
2331
|
+
_infinite?: boolean;
|
|
2332
|
+
})[]>, "queryFn"> & {
|
|
2333
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").ResponseData & {
|
|
2334
|
+
data?: Array<import("../types.gen").ResponseCurrency>;
|
|
2335
|
+
}, (Pick<Options<GetAllCurrenciesData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2336
|
+
_id: string;
|
|
2337
|
+
_infinite?: boolean;
|
|
2338
|
+
})[], never> | undefined;
|
|
2339
|
+
} & {
|
|
2340
|
+
queryKey: (Pick<Options<GetAllCurrenciesData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2341
|
+
_id: string;
|
|
2342
|
+
_infinite?: boolean;
|
|
2343
|
+
})[] & {
|
|
2344
|
+
[dataTagSymbol]: import("../types.gen").ResponseData & {
|
|
2345
|
+
data?: Array<import("../types.gen").ResponseCurrency>;
|
|
2346
|
+
};
|
|
2347
|
+
[dataTagErrorSymbol]: Error;
|
|
2348
|
+
};
|
|
2349
|
+
};
|
|
2350
|
+
export declare const getACurrencyQueryKey: (options: Options<GetACurrencyData>) => (Pick<Options<GetACurrencyData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2351
|
+
_id: string;
|
|
2352
|
+
_infinite?: boolean;
|
|
2353
|
+
})[];
|
|
2354
|
+
export declare const getACurrencyOptions: (options: Options<GetACurrencyData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").ResponseData & {
|
|
2355
|
+
data?: Array<import("../types.gen").ResponseCurrency>;
|
|
2356
|
+
}, Error, import("../types.gen").ResponseData & {
|
|
2357
|
+
data?: Array<import("../types.gen").ResponseCurrency>;
|
|
2358
|
+
}, (Pick<Options<GetACurrencyData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2359
|
+
_id: string;
|
|
2360
|
+
_infinite?: boolean;
|
|
2361
|
+
})[]>, "queryFn"> & {
|
|
2362
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").ResponseData & {
|
|
2363
|
+
data?: Array<import("../types.gen").ResponseCurrency>;
|
|
2364
|
+
}, (Pick<Options<GetACurrencyData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2365
|
+
_id: string;
|
|
2366
|
+
_infinite?: boolean;
|
|
2367
|
+
})[], never> | undefined;
|
|
2368
|
+
} & {
|
|
2369
|
+
queryKey: (Pick<Options<GetACurrencyData>, "body" | "headers" | "path" | "query" | "baseUrl"> & {
|
|
2370
|
+
_id: string;
|
|
2371
|
+
_infinite?: boolean;
|
|
2372
|
+
})[] & {
|
|
2373
|
+
[dataTagSymbol]: import("../types.gen").ResponseData & {
|
|
2374
|
+
data?: Array<import("../types.gen").ResponseCurrency>;
|
|
2375
|
+
};
|
|
2376
|
+
[dataTagErrorSymbol]: Error;
|
|
2377
|
+
};
|
|
2378
|
+
};
|
|
@@ -47,7 +47,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
import { queryOptions } from "@tanstack/react-query";
|
|
50
|
-
import { getByContextRelease, getByContextAllHierarchies, getByContextHierarchy, getByContextHierarchyNodes, getByContextHierarchyChildNodes, getByContextAllNodes, getByContextNode, getByContextChildNodes, getByContextAllProducts, getByContextProduct, getByContextComponentProductIds, getByContextChildProducts, getByContextProductsForHierarchy, getByContextProductsForNode, configureByContextProduct, getCatalogs, createCatalog, deleteCatalogById, getCatalogById, updateCatalog, deleteReleases, getReleases, publishRelease, deleteReleaseById, getReleaseById, getRules, createRule, deleteRuleById, getRuleById, updateRule, getAllHierarchies, getHierarchy, getHierarchyNodes, getHierarchyChildNodes, getAllNodes, getNode, getChildNodes, getAllProducts, getProduct, getComponentProductIds, getChildProducts, getProductsForHierarchy, getProductsForNode, getCarts, createACart, deleteACart, getCart, updateACart, deleteAllCartItems, getCartItems, manageCarts, bulkUpdateItemsInCart, deleteACartItem, updateACartItem, deleteAccountCartAssociation, createAccountCartAssociation, deleteCustomerCartAssociation, createCustomerCartAssociation, deleteAPromotionViaPromotionCode, addTaxItemToCart, bulkDeleteTaxItemsFromCart, bulkAddTaxItemsToCart, deleteATaxItem, updateATaxItem, bulkDeleteCustomDiscountsFromCart, bulkAddCustomDiscountsToCart, deleteCustomDiscountFromCart, updateCustomDiscountForCart, addCustomDiscountToCartItem, deleteCustomDiscountFromCartItem, updateCustomDiscountForCartItem, createCartPaymentIntent, checkoutApi, getCustomerOrders, getAnOrder, updateAnOrder, getOrderItems, anonymizeOrders, paymentSetup, confirmPayment, captureATransaction, refundATransaction, getOrderTransactions, getATransaction, cancelATransaction, getSubscriptionProduct, getPlan, listOfferings, getOffering, listOfferingPlans, listOfferingFeatures, listOfferingProducts, getFeature, getStock, listLocations, createAnAccessToken, getV2AccountAddresses, postV2AccountAddress, deleteV2AccountAddress, getV2AccountAddress, putV2AccountAddress, getV2Accounts, getV2AccountsAccountId, getV2AccountMembers, getV2AccountMembersAccountMemberId, getV2AccountsAccountIdAccountMemberships, postV2AccountMembersTokens, client, } from "../sdk.gen";
|
|
50
|
+
import { getByContextRelease, getByContextAllHierarchies, getByContextHierarchy, getByContextHierarchyNodes, getByContextHierarchyChildNodes, getByContextAllNodes, getByContextNode, getByContextChildNodes, getByContextAllProducts, getByContextProduct, getByContextComponentProductIds, getByContextChildProducts, getByContextProductsForHierarchy, getByContextProductsForNode, configureByContextProduct, getCatalogs, createCatalog, deleteCatalogById, getCatalogById, updateCatalog, deleteReleases, getReleases, publishRelease, deleteReleaseById, getReleaseById, getRules, createRule, deleteRuleById, getRuleById, updateRule, getAllHierarchies, getHierarchy, getHierarchyNodes, getHierarchyChildNodes, getAllNodes, getNode, getChildNodes, getAllProducts, getProduct, getComponentProductIds, getChildProducts, getProductsForHierarchy, getProductsForNode, getCarts, createACart, deleteACart, getCart, updateACart, deleteAllCartItems, getCartItems, manageCarts, bulkUpdateItemsInCart, deleteACartItem, updateACartItem, deleteAccountCartAssociation, createAccountCartAssociation, deleteCustomerCartAssociation, createCustomerCartAssociation, deleteAPromotionViaPromotionCode, addTaxItemToCart, bulkDeleteTaxItemsFromCart, bulkAddTaxItemsToCart, deleteATaxItem, updateATaxItem, bulkDeleteCustomDiscountsFromCart, bulkAddCustomDiscountsToCart, deleteCustomDiscountFromCart, updateCustomDiscountForCart, addCustomDiscountToCartItem, deleteCustomDiscountFromCartItem, updateCustomDiscountForCartItem, createCartPaymentIntent, checkoutApi, getCustomerOrders, getAnOrder, updateAnOrder, getOrderItems, anonymizeOrders, paymentSetup, confirmPayment, captureATransaction, refundATransaction, getOrderTransactions, getATransaction, cancelATransaction, getSubscriptionProduct, getPlan, listOfferings, getOffering, listOfferingPlans, listOfferingFeatures, listOfferingProducts, getFeature, getStock, listLocations, createAnAccessToken, getV2AccountAddresses, postV2AccountAddress, deleteV2AccountAddress, getV2AccountAddress, putV2AccountAddress, getV2Accounts, postV2Accounts, getV2AccountsAccountId, putV2AccountsAccountId, getV2AccountMembers, getV2AccountMembersAccountMemberId, getV2AccountsAccountIdAccountMemberships, postV2AccountMembersTokens, getAllCurrencies, getACurrency, client, } from "../sdk.gen";
|
|
51
51
|
var createQueryKey = function (id, options, infinite) {
|
|
52
52
|
var _a;
|
|
53
53
|
var params = {
|
|
@@ -2261,6 +2261,40 @@ export var getV2AccountsOptions = function (options) {
|
|
|
2261
2261
|
queryKey: getV2AccountsQueryKey(options),
|
|
2262
2262
|
});
|
|
2263
2263
|
};
|
|
2264
|
+
export var postV2AccountsQueryKey = function (options) { return [createQueryKey("postV2Accounts", options)]; };
|
|
2265
|
+
export var postV2AccountsOptions = function (options) {
|
|
2266
|
+
return queryOptions({
|
|
2267
|
+
queryFn: function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
2268
|
+
var data;
|
|
2269
|
+
var queryKey = _b.queryKey, signal = _b.signal;
|
|
2270
|
+
return __generator(this, function (_c) {
|
|
2271
|
+
switch (_c.label) {
|
|
2272
|
+
case 0: return [4 /*yield*/, postV2Accounts(__assign(__assign(__assign({}, options), queryKey[0]), { signal: signal, throwOnError: true }))];
|
|
2273
|
+
case 1:
|
|
2274
|
+
data = (_c.sent()).data;
|
|
2275
|
+
return [2 /*return*/, data];
|
|
2276
|
+
}
|
|
2277
|
+
});
|
|
2278
|
+
}); },
|
|
2279
|
+
queryKey: postV2AccountsQueryKey(options),
|
|
2280
|
+
});
|
|
2281
|
+
};
|
|
2282
|
+
export var postV2AccountsMutation = function (options) {
|
|
2283
|
+
var mutationOptions = {
|
|
2284
|
+
mutationFn: function (localOptions) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2285
|
+
var data;
|
|
2286
|
+
return __generator(this, function (_a) {
|
|
2287
|
+
switch (_a.label) {
|
|
2288
|
+
case 0: return [4 /*yield*/, postV2Accounts(__assign(__assign(__assign({}, options), localOptions), { throwOnError: true }))];
|
|
2289
|
+
case 1:
|
|
2290
|
+
data = (_a.sent()).data;
|
|
2291
|
+
return [2 /*return*/, data];
|
|
2292
|
+
}
|
|
2293
|
+
});
|
|
2294
|
+
}); },
|
|
2295
|
+
};
|
|
2296
|
+
return mutationOptions;
|
|
2297
|
+
};
|
|
2264
2298
|
export var getV2AccountsAccountIdQueryKey = function (options) { return [createQueryKey("getV2AccountsAccountId", options)]; };
|
|
2265
2299
|
export var getV2AccountsAccountIdOptions = function (options) {
|
|
2266
2300
|
return queryOptions({
|
|
@@ -2279,6 +2313,22 @@ export var getV2AccountsAccountIdOptions = function (options) {
|
|
|
2279
2313
|
queryKey: getV2AccountsAccountIdQueryKey(options),
|
|
2280
2314
|
});
|
|
2281
2315
|
};
|
|
2316
|
+
export var putV2AccountsAccountIdMutation = function (options) {
|
|
2317
|
+
var mutationOptions = {
|
|
2318
|
+
mutationFn: function (localOptions) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2319
|
+
var data;
|
|
2320
|
+
return __generator(this, function (_a) {
|
|
2321
|
+
switch (_a.label) {
|
|
2322
|
+
case 0: return [4 /*yield*/, putV2AccountsAccountId(__assign(__assign(__assign({}, options), localOptions), { throwOnError: true }))];
|
|
2323
|
+
case 1:
|
|
2324
|
+
data = (_a.sent()).data;
|
|
2325
|
+
return [2 /*return*/, data];
|
|
2326
|
+
}
|
|
2327
|
+
});
|
|
2328
|
+
}); },
|
|
2329
|
+
};
|
|
2330
|
+
return mutationOptions;
|
|
2331
|
+
};
|
|
2282
2332
|
export var getV2AccountMembersQueryKey = function (options) { return [createQueryKey("getV2AccountMembers", options)]; };
|
|
2283
2333
|
export var getV2AccountMembersOptions = function (options) {
|
|
2284
2334
|
return queryOptions({
|
|
@@ -2367,3 +2417,41 @@ export var postV2AccountMembersTokensMutation = function (options) {
|
|
|
2367
2417
|
};
|
|
2368
2418
|
return mutationOptions;
|
|
2369
2419
|
};
|
|
2420
|
+
export var getAllCurrenciesQueryKey = function (options) { return [createQueryKey("getAllCurrencies", options)]; };
|
|
2421
|
+
export var getAllCurrenciesOptions = function (options) {
|
|
2422
|
+
return queryOptions({
|
|
2423
|
+
queryFn: function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
2424
|
+
var data;
|
|
2425
|
+
var queryKey = _b.queryKey, signal = _b.signal;
|
|
2426
|
+
return __generator(this, function (_c) {
|
|
2427
|
+
switch (_c.label) {
|
|
2428
|
+
case 0: return [4 /*yield*/, getAllCurrencies(__assign(__assign(__assign({}, options), queryKey[0]), { signal: signal, throwOnError: true }))];
|
|
2429
|
+
case 1:
|
|
2430
|
+
data = (_c.sent()).data;
|
|
2431
|
+
return [2 /*return*/, data];
|
|
2432
|
+
}
|
|
2433
|
+
});
|
|
2434
|
+
}); },
|
|
2435
|
+
queryKey: getAllCurrenciesQueryKey(options),
|
|
2436
|
+
});
|
|
2437
|
+
};
|
|
2438
|
+
export var getACurrencyQueryKey = function (options) { return [
|
|
2439
|
+
createQueryKey("getACurrency", options),
|
|
2440
|
+
]; };
|
|
2441
|
+
export var getACurrencyOptions = function (options) {
|
|
2442
|
+
return queryOptions({
|
|
2443
|
+
queryFn: function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
2444
|
+
var data;
|
|
2445
|
+
var queryKey = _b.queryKey, signal = _b.signal;
|
|
2446
|
+
return __generator(this, function (_c) {
|
|
2447
|
+
switch (_c.label) {
|
|
2448
|
+
case 0: return [4 /*yield*/, getACurrency(__assign(__assign(__assign({}, options), queryKey[0]), { signal: signal, throwOnError: true }))];
|
|
2449
|
+
case 1:
|
|
2450
|
+
data = (_c.sent()).data;
|
|
2451
|
+
return [2 /*return*/, data];
|
|
2452
|
+
}
|
|
2453
|
+
});
|
|
2454
|
+
}); },
|
|
2455
|
+
queryKey: getACurrencyQueryKey(options),
|
|
2456
|
+
});
|
|
2457
|
+
};
|
package/dist/client/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Options } from "@hey-api/client-fetch";
|
|
2
|
-
import type { GetByContextReleaseData, GetByContextAllHierarchiesData, GetByContextHierarchyData, GetByContextHierarchyNodesData, GetByContextHierarchyChildNodesData, GetByContextAllNodesData, GetByContextNodeData, GetByContextChildNodesData, GetByContextAllProductsData, GetByContextProductData, GetByContextComponentProductIdsData, GetByContextChildProductsData, GetByContextProductsForHierarchyData, GetByContextProductsForNodeData, ConfigureByContextProductData, GetCatalogsData, CreateCatalogData, DeleteCatalogByIdData, GetCatalogByIdData, UpdateCatalogData, DeleteReleasesData, GetReleasesData, PublishReleaseData, DeleteReleaseByIdData, GetReleaseByIdData, GetRulesData, CreateRuleData, DeleteRuleByIdData, GetRuleByIdData, UpdateRuleData, GetAllHierarchiesData, GetHierarchyData, GetHierarchyNodesData, GetHierarchyChildNodesData, GetAllNodesData, GetNodeData, GetChildNodesData, GetAllProductsData, GetProductData, GetComponentProductIdsData, GetChildProductsData, GetProductsForHierarchyData, GetProductsForNodeData, GetCartsData, CreateACartData, DeleteACartData, GetCartData, UpdateACartData, DeleteAllCartItemsData, GetCartItemsData, ManageCartsData, BulkUpdateItemsInCartData, DeleteACartItemData, UpdateACartItemData, DeleteAccountCartAssociationData, CreateAccountCartAssociationData, CreateAccountCartAssociationResponse, DeleteCustomerCartAssociationData, CreateCustomerCartAssociationData, DeleteAPromotionViaPromotionCodeData, AddTaxItemToCartData, BulkDeleteTaxItemsFromCartData, BulkAddTaxItemsToCartData, DeleteATaxItemData, UpdateATaxItemData, BulkDeleteCustomDiscountsFromCartData, BulkAddCustomDiscountsToCartData, DeleteCustomDiscountFromCartData, UpdateCustomDiscountForCartData, AddCustomDiscountToCartItemData, DeleteCustomDiscountFromCartItemData, UpdateCustomDiscountForCartItemData, CreateCartPaymentIntentData, CheckoutApiData, GetCustomerOrdersData, GetAnOrderData, UpdateAnOrderData, GetOrderItemsData, AnonymizeOrdersData, PaymentSetupData, ConfirmPaymentData, CaptureATransactionData, RefundATransactionData, GetOrderTransactionsData, GetATransactionData, CancelATransactionData, GetSubscriptionProductData, GetPlanData, ListOfferingsData, GetOfferingData, ListOfferingPlansData, ListOfferingFeaturesData, ListOfferingProductsData, GetFeatureData, GetStockData, ListLocationsData, CreateAnAccessTokenData, GetV2AccountAddressesData, PostV2AccountAddressData, DeleteV2AccountAddressData, GetV2AccountAddressData, PutV2AccountAddressData, GetV2AccountsData, GetV2AccountsAccountIdData, GetV2AccountMembersData, GetV2AccountMembersAccountMemberIdData, GetV2AccountsAccountIdAccountMembershipsData, PostV2AccountMembersTokensData } from "./types.gen";
|
|
2
|
+
import type { GetByContextReleaseData, GetByContextAllHierarchiesData, GetByContextHierarchyData, GetByContextHierarchyNodesData, GetByContextHierarchyChildNodesData, GetByContextAllNodesData, GetByContextNodeData, GetByContextChildNodesData, GetByContextAllProductsData, GetByContextProductData, GetByContextComponentProductIdsData, GetByContextChildProductsData, GetByContextProductsForHierarchyData, GetByContextProductsForNodeData, ConfigureByContextProductData, GetCatalogsData, CreateCatalogData, DeleteCatalogByIdData, GetCatalogByIdData, UpdateCatalogData, DeleteReleasesData, GetReleasesData, PublishReleaseData, DeleteReleaseByIdData, GetReleaseByIdData, GetRulesData, CreateRuleData, DeleteRuleByIdData, GetRuleByIdData, UpdateRuleData, GetAllHierarchiesData, GetHierarchyData, GetHierarchyNodesData, GetHierarchyChildNodesData, GetAllNodesData, GetNodeData, GetChildNodesData, GetAllProductsData, GetProductData, GetComponentProductIdsData, GetChildProductsData, GetProductsForHierarchyData, GetProductsForNodeData, GetCartsData, CreateACartData, DeleteACartData, GetCartData, UpdateACartData, DeleteAllCartItemsData, GetCartItemsData, ManageCartsData, BulkUpdateItemsInCartData, DeleteACartItemData, UpdateACartItemData, DeleteAccountCartAssociationData, CreateAccountCartAssociationData, CreateAccountCartAssociationResponse, DeleteCustomerCartAssociationData, CreateCustomerCartAssociationData, DeleteAPromotionViaPromotionCodeData, AddTaxItemToCartData, BulkDeleteTaxItemsFromCartData, BulkAddTaxItemsToCartData, DeleteATaxItemData, UpdateATaxItemData, BulkDeleteCustomDiscountsFromCartData, BulkAddCustomDiscountsToCartData, DeleteCustomDiscountFromCartData, UpdateCustomDiscountForCartData, AddCustomDiscountToCartItemData, DeleteCustomDiscountFromCartItemData, UpdateCustomDiscountForCartItemData, CreateCartPaymentIntentData, CheckoutApiData, GetCustomerOrdersData, GetAnOrderData, UpdateAnOrderData, GetOrderItemsData, AnonymizeOrdersData, PaymentSetupData, ConfirmPaymentData, CaptureATransactionData, RefundATransactionData, GetOrderTransactionsData, GetATransactionData, CancelATransactionData, GetSubscriptionProductData, GetPlanData, ListOfferingsData, GetOfferingData, ListOfferingPlansData, ListOfferingFeaturesData, ListOfferingProductsData, GetFeatureData, GetStockData, ListLocationsData, CreateAnAccessTokenData, GetV2AccountAddressesData, PostV2AccountAddressData, DeleteV2AccountAddressData, GetV2AccountAddressData, PutV2AccountAddressData, GetV2AccountsData, PostV2AccountsData, GetV2AccountsAccountIdData, PutV2AccountsAccountIdData, PutV2AccountsAccountIdError, GetV2AccountMembersData, GetV2AccountMembersAccountMemberIdData, GetV2AccountsAccountIdAccountMembershipsData, PostV2AccountMembersTokensData, GetAllCurrenciesData, GetACurrencyData } from "./types.gen";
|
|
3
3
|
export declare const client: import("@hey-api/client-fetch").Client<Request, Response, unknown, import("@hey-api/client-fetch").RequestOptions<boolean, string>>;
|
|
4
4
|
/**
|
|
5
5
|
* Get the catalog release as shoppers
|
|
@@ -2361,6 +2361,13 @@ export declare const getV2Accounts: <ThrowOnError extends boolean = false>(optio
|
|
|
2361
2361
|
prev?: string;
|
|
2362
2362
|
};
|
|
2363
2363
|
}, import("./types.gen").AccountManagementErrorResponse, ThrowOnError>;
|
|
2364
|
+
/**
|
|
2365
|
+
* Create an Account
|
|
2366
|
+
* With the account creation endpoint, you have the ability to create accounts which can optionally have another account as a parent.
|
|
2367
|
+
*/
|
|
2368
|
+
export declare const postV2Accounts: <ThrowOnError extends boolean = false>(options?: Options<PostV2AccountsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
2369
|
+
data?: import("./types.gen").AccountResponse;
|
|
2370
|
+
}, import("./types.gen").AccountManagementErrorResponse, ThrowOnError>;
|
|
2364
2371
|
/**
|
|
2365
2372
|
* Get an Account
|
|
2366
2373
|
* View a specific account contained within your store
|
|
@@ -2368,6 +2375,29 @@ export declare const getV2Accounts: <ThrowOnError extends boolean = false>(optio
|
|
|
2368
2375
|
export declare const getV2AccountsAccountId: <ThrowOnError extends boolean = false>(options: Options<GetV2AccountsAccountIdData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
2369
2376
|
data?: import("./types.gen").AccountResponse;
|
|
2370
2377
|
}, import("./types.gen").AccountManagementErrorResponse, ThrowOnError>;
|
|
2378
|
+
/**
|
|
2379
|
+
* Update an Account
|
|
2380
|
+
* Update the information contained on an account.
|
|
2381
|
+
*/
|
|
2382
|
+
export declare const putV2AccountsAccountId: <ThrowOnError extends boolean = false>(options: Options<PutV2AccountsAccountIdData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
2383
|
+
data?: {
|
|
2384
|
+
id?: string;
|
|
2385
|
+
type?: string;
|
|
2386
|
+
name?: string;
|
|
2387
|
+
legal_name?: string;
|
|
2388
|
+
registration_id?: string;
|
|
2389
|
+
external_ref?: string;
|
|
2390
|
+
meta?: {
|
|
2391
|
+
timestamps?: {
|
|
2392
|
+
created_at?: Date;
|
|
2393
|
+
updated_at?: Date;
|
|
2394
|
+
};
|
|
2395
|
+
};
|
|
2396
|
+
links?: {
|
|
2397
|
+
self?: string;
|
|
2398
|
+
};
|
|
2399
|
+
};
|
|
2400
|
+
}, PutV2AccountsAccountIdError, ThrowOnError>;
|
|
2371
2401
|
/**
|
|
2372
2402
|
* Get all Account Members
|
|
2373
2403
|
* Get all account members contained within your store.
|
|
@@ -2456,3 +2486,27 @@ export declare const postV2AccountMembersTokens: <ThrowOnError extends boolean =
|
|
|
2456
2486
|
prev?: string;
|
|
2457
2487
|
};
|
|
2458
2488
|
}, import("./types.gen").AccountManagementErrorResponse, ThrowOnError>;
|
|
2489
|
+
/**
|
|
2490
|
+
* Get all Currencies
|
|
2491
|
+
* :::caution
|
|
2492
|
+
*
|
|
2493
|
+
* This endpoint is for Administrator use only. Do not use this endpoint on your customer-facing frontends.
|
|
2494
|
+
*
|
|
2495
|
+
* :::
|
|
2496
|
+
*
|
|
2497
|
+
*/
|
|
2498
|
+
export declare const getAllCurrencies: <ThrowOnError extends boolean = false>(options?: Options<GetAllCurrenciesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ResponseData & {
|
|
2499
|
+
data?: Array<import("./types.gen").ResponseCurrency>;
|
|
2500
|
+
}, import("./types.gen").ResponseError, ThrowOnError>;
|
|
2501
|
+
/**
|
|
2502
|
+
* Get a Currency
|
|
2503
|
+
* :::caution
|
|
2504
|
+
*
|
|
2505
|
+
* This endpoint is for Administrator use only. Do not use this endpoint on your customer-facing frontends.
|
|
2506
|
+
*
|
|
2507
|
+
* :::
|
|
2508
|
+
*
|
|
2509
|
+
*/
|
|
2510
|
+
export declare const getACurrency: <ThrowOnError extends boolean = false>(options: Options<GetACurrencyData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ResponseData & {
|
|
2511
|
+
data?: Array<import("./types.gen").ResponseCurrency>;
|
|
2512
|
+
}, import("./types.gen").ResponseError, ThrowOnError>;
|
package/dist/client/sdk.gen.js
CHANGED
|
@@ -3087,6 +3087,19 @@ export var getV2Accounts = function (options) {
|
|
|
3087
3087
|
},
|
|
3088
3088
|
], url: "/v2/accounts" }));
|
|
3089
3089
|
};
|
|
3090
|
+
/**
|
|
3091
|
+
* Create an Account
|
|
3092
|
+
* With the account creation endpoint, you have the ability to create accounts which can optionally have another account as a parent.
|
|
3093
|
+
*/
|
|
3094
|
+
export var postV2Accounts = function (options) {
|
|
3095
|
+
var _a;
|
|
3096
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post(__assign(__assign({}, options), { headers: __assign({ "Content-Type": "application/json" }, options === null || options === void 0 ? void 0 : options.headers), security: [
|
|
3097
|
+
{
|
|
3098
|
+
scheme: "bearer",
|
|
3099
|
+
type: "http",
|
|
3100
|
+
},
|
|
3101
|
+
], url: "/v2/accounts" }));
|
|
3102
|
+
};
|
|
3090
3103
|
/**
|
|
3091
3104
|
* Get an Account
|
|
3092
3105
|
* View a specific account contained within your store
|
|
@@ -3100,6 +3113,19 @@ export var getV2AccountsAccountId = function (options) {
|
|
|
3100
3113
|
},
|
|
3101
3114
|
], url: "/v2/accounts/{accountID}" }));
|
|
3102
3115
|
};
|
|
3116
|
+
/**
|
|
3117
|
+
* Update an Account
|
|
3118
|
+
* Update the information contained on an account.
|
|
3119
|
+
*/
|
|
3120
|
+
export var putV2AccountsAccountId = function (options) {
|
|
3121
|
+
var _a;
|
|
3122
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).put(__assign(__assign({}, options), { headers: __assign({ "Content-Type": "application/json" }, options === null || options === void 0 ? void 0 : options.headers), security: [
|
|
3123
|
+
{
|
|
3124
|
+
scheme: "bearer",
|
|
3125
|
+
type: "http",
|
|
3126
|
+
},
|
|
3127
|
+
], url: "/v2/accounts/{accountID}" }));
|
|
3128
|
+
};
|
|
3103
3129
|
/**
|
|
3104
3130
|
* Get all Account Members
|
|
3105
3131
|
* Get all account members contained within your store.
|
|
@@ -3188,3 +3214,39 @@ export var postV2AccountMembersTokens = function (options) {
|
|
|
3188
3214
|
},
|
|
3189
3215
|
], url: "/v2/account-members/tokens" }));
|
|
3190
3216
|
};
|
|
3217
|
+
/**
|
|
3218
|
+
* Get all Currencies
|
|
3219
|
+
* :::caution
|
|
3220
|
+
*
|
|
3221
|
+
* This endpoint is for Administrator use only. Do not use this endpoint on your customer-facing frontends.
|
|
3222
|
+
*
|
|
3223
|
+
* :::
|
|
3224
|
+
*
|
|
3225
|
+
*/
|
|
3226
|
+
export var getAllCurrencies = function (options) {
|
|
3227
|
+
var _a;
|
|
3228
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
|
|
3229
|
+
{
|
|
3230
|
+
scheme: "bearer",
|
|
3231
|
+
type: "http",
|
|
3232
|
+
},
|
|
3233
|
+
], url: "/v2/currencies" }));
|
|
3234
|
+
};
|
|
3235
|
+
/**
|
|
3236
|
+
* Get a Currency
|
|
3237
|
+
* :::caution
|
|
3238
|
+
*
|
|
3239
|
+
* This endpoint is for Administrator use only. Do not use this endpoint on your customer-facing frontends.
|
|
3240
|
+
*
|
|
3241
|
+
* :::
|
|
3242
|
+
*
|
|
3243
|
+
*/
|
|
3244
|
+
export var getACurrency = function (options) {
|
|
3245
|
+
var _a;
|
|
3246
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
|
|
3247
|
+
{
|
|
3248
|
+
scheme: "bearer",
|
|
3249
|
+
type: "http",
|
|
3250
|
+
},
|
|
3251
|
+
], url: "/v2/currencies/{currencyID}" }));
|
|
3252
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GetByContextReleaseResponse, GetByContextAllHierarchiesResponse, GetByContextHierarchyResponse, GetByContextHierarchyNodesResponse, GetByContextHierarchyChildNodesResponse, GetByContextAllNodesResponse, GetByContextNodeResponse, GetByContextChildNodesResponse, GetByContextAllProductsResponse, GetByContextProductResponse, GetByContextComponentProductIdsResponse, GetByContextChildProductsResponse, GetByContextProductsForHierarchyResponse, GetByContextProductsForNodeResponse, ConfigureByContextProductResponse, GetCatalogsResponse, CreateCatalogResponse, GetCatalogByIdResponse, UpdateCatalogResponse, GetReleasesResponse, PublishReleaseResponse, GetReleaseByIdResponse, GetRulesResponse, CreateRuleResponse, GetRuleByIdResponse, UpdateRuleResponse, GetAllHierarchiesResponse, GetHierarchyResponse, GetHierarchyNodesResponse, GetHierarchyChildNodesResponse, GetAllNodesResponse, GetNodeResponse, GetChildNodesResponse, GetAllProductsResponse, GetProductResponse, GetComponentProductIdsResponse, GetChildProductsResponse, GetProductsForHierarchyResponse, GetProductsForNodeResponse, GetSubscriptionProductResponse, ListOfferingsResponse, GetOfferingResponse, ListOfferingProductsResponse, GetStockResponse, PostV2AccountMembersTokensResponse } from "./types.gen";
|
|
1
|
+
import type { GetByContextReleaseResponse, GetByContextAllHierarchiesResponse, GetByContextHierarchyResponse, GetByContextHierarchyNodesResponse, GetByContextHierarchyChildNodesResponse, GetByContextAllNodesResponse, GetByContextNodeResponse, GetByContextChildNodesResponse, GetByContextAllProductsResponse, GetByContextProductResponse, GetByContextComponentProductIdsResponse, GetByContextChildProductsResponse, GetByContextProductsForHierarchyResponse, GetByContextProductsForNodeResponse, ConfigureByContextProductResponse, GetCatalogsResponse, CreateCatalogResponse, GetCatalogByIdResponse, UpdateCatalogResponse, GetReleasesResponse, PublishReleaseResponse, GetReleaseByIdResponse, GetRulesResponse, CreateRuleResponse, GetRuleByIdResponse, UpdateRuleResponse, GetAllHierarchiesResponse, GetHierarchyResponse, GetHierarchyNodesResponse, GetHierarchyChildNodesResponse, GetAllNodesResponse, GetNodeResponse, GetChildNodesResponse, GetAllProductsResponse, GetProductResponse, GetComponentProductIdsResponse, GetChildProductsResponse, GetProductsForHierarchyResponse, GetProductsForNodeResponse, GetSubscriptionProductResponse, ListOfferingsResponse, GetOfferingResponse, ListOfferingProductsResponse, GetStockResponse, PutV2AccountsAccountIdResponse, PostV2AccountMembersTokensResponse } from "./types.gen";
|
|
2
2
|
export declare const getByContextReleaseResponseTransformer: (data: any) => Promise<GetByContextReleaseResponse>;
|
|
3
3
|
export declare const getByContextAllHierarchiesResponseTransformer: (data: any) => Promise<GetByContextAllHierarchiesResponse>;
|
|
4
4
|
export declare const getByContextHierarchyResponseTransformer: (data: any) => Promise<GetByContextHierarchyResponse>;
|
|
@@ -43,4 +43,5 @@ export declare const listOfferingsResponseTransformer: (data: any) => Promise<Li
|
|
|
43
43
|
export declare const getOfferingResponseTransformer: (data: any) => Promise<GetOfferingResponse>;
|
|
44
44
|
export declare const listOfferingProductsResponseTransformer: (data: any) => Promise<ListOfferingProductsResponse>;
|
|
45
45
|
export declare const getStockResponseTransformer: (data: any) => Promise<GetStockResponse>;
|
|
46
|
+
export declare const putV2AccountsAccountIdResponseTransformer: (data: any) => Promise<PutV2AccountsAccountIdResponse>;
|
|
46
47
|
export declare const postV2AccountMembersTokensResponseTransformer: (data: any) => Promise<PostV2AccountMembersTokensResponse>;
|
|
@@ -614,6 +614,26 @@ export var getStockResponseTransformer = function (data) { return __awaiter(void
|
|
|
614
614
|
return [2 /*return*/, data];
|
|
615
615
|
});
|
|
616
616
|
}); };
|
|
617
|
+
export var putV2AccountsAccountIdResponseTransformer = function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
618
|
+
return __generator(this, function (_a) {
|
|
619
|
+
if (data.data) {
|
|
620
|
+
if (data.data.meta) {
|
|
621
|
+
if (data.data.meta.timestamps) {
|
|
622
|
+
if (data.data.meta.timestamps.created_at) {
|
|
623
|
+
data.data.meta.timestamps.created_at = new Date(data.data.meta.timestamps.created_at);
|
|
624
|
+
}
|
|
625
|
+
if (data.data.meta.timestamps.updated_at) {
|
|
626
|
+
data.data.meta.timestamps.updated_at = new Date(data.data.meta.timestamps.updated_at);
|
|
627
|
+
}
|
|
628
|
+
return [2 /*return*/, data.data.meta.timestamps];
|
|
629
|
+
}
|
|
630
|
+
return [2 /*return*/, data.data.meta];
|
|
631
|
+
}
|
|
632
|
+
return [2 /*return*/, data.data];
|
|
633
|
+
}
|
|
634
|
+
return [2 /*return*/, data];
|
|
635
|
+
});
|
|
636
|
+
}); };
|
|
617
637
|
var accountManagementAuthenticationTokenResponseSchemaResponseTransformer = function (data) {
|
|
618
638
|
if (data.expires) {
|
|
619
639
|
data.expires = new Date(data.expires);
|
|
@@ -5551,6 +5551,123 @@ export type AccountManagementError = {
|
|
|
5551
5551
|
export type AccountManagementErrorResponse = {
|
|
5552
5552
|
errors: Array<AccountManagementError>;
|
|
5553
5553
|
};
|
|
5554
|
+
export type DataCreateCurrencies = {
|
|
5555
|
+
/**
|
|
5556
|
+
* Specifies the currency code. Example YEN.
|
|
5557
|
+
*/
|
|
5558
|
+
code: string;
|
|
5559
|
+
/**
|
|
5560
|
+
* Indicates how many decimal places the currency is formatted to.
|
|
5561
|
+
*/
|
|
5562
|
+
decimal_places: number;
|
|
5563
|
+
/**
|
|
5564
|
+
* Indicates the decimal point character.
|
|
5565
|
+
*/
|
|
5566
|
+
decimal_point: string;
|
|
5567
|
+
/**
|
|
5568
|
+
* Specifies whether this is the default currency or not. Either `true` or `false`.
|
|
5569
|
+
*/
|
|
5570
|
+
default: boolean;
|
|
5571
|
+
/**
|
|
5572
|
+
* Specifies if this currency is available for products. Either `true` or `false`.
|
|
5573
|
+
*/
|
|
5574
|
+
enabled: boolean;
|
|
5575
|
+
/**
|
|
5576
|
+
* Specifies the exchange rate from the default currency.
|
|
5577
|
+
*/
|
|
5578
|
+
exchange_rate: number;
|
|
5579
|
+
/**
|
|
5580
|
+
* Specifies how the price currency is displayed. For example, "¥{price}".
|
|
5581
|
+
*/
|
|
5582
|
+
format: string;
|
|
5583
|
+
/**
|
|
5584
|
+
* Indicates the thousand separator character.
|
|
5585
|
+
*/
|
|
5586
|
+
thousand_separator: string;
|
|
5587
|
+
/**
|
|
5588
|
+
* Represents the type represents the object being returned.
|
|
5589
|
+
*/
|
|
5590
|
+
type: string;
|
|
5591
|
+
};
|
|
5592
|
+
export type RequestCreateCurrencies = {
|
|
5593
|
+
data?: DataCreateCurrencies;
|
|
5594
|
+
};
|
|
5595
|
+
export type DataUpdateCurrencies = {
|
|
5596
|
+
/**
|
|
5597
|
+
* Specifies whether this is the default currency or not. Either `true` or `false`.
|
|
5598
|
+
*/
|
|
5599
|
+
default?: boolean;
|
|
5600
|
+
};
|
|
5601
|
+
export type RequestUpdateCurrencies = {
|
|
5602
|
+
data?: DataUpdateCurrencies;
|
|
5603
|
+
};
|
|
5604
|
+
export type ResponseCurrency = {
|
|
5605
|
+
/**
|
|
5606
|
+
* The unique identifier for this currency.
|
|
5607
|
+
*/
|
|
5608
|
+
id?: string;
|
|
5609
|
+
/**
|
|
5610
|
+
* Represents the type represents the object being returned.
|
|
5611
|
+
*/
|
|
5612
|
+
type?: string;
|
|
5613
|
+
/**
|
|
5614
|
+
* Specifies the currency code. For example, YEN.
|
|
5615
|
+
*/
|
|
5616
|
+
code?: string;
|
|
5617
|
+
/**
|
|
5618
|
+
* Specifies the exchange rate from the default currency.
|
|
5619
|
+
*/
|
|
5620
|
+
exchange_rate?: number;
|
|
5621
|
+
/**
|
|
5622
|
+
* Specifies how the price currency is displayed. For example, "£{price}".
|
|
5623
|
+
*/
|
|
5624
|
+
format?: string;
|
|
5625
|
+
/**
|
|
5626
|
+
* Indicates the decimal point character.
|
|
5627
|
+
*/
|
|
5628
|
+
decimal_point?: string;
|
|
5629
|
+
/**
|
|
5630
|
+
* Indicates the thousand separator character.
|
|
5631
|
+
*/
|
|
5632
|
+
thousand_separator?: string;
|
|
5633
|
+
/**
|
|
5634
|
+
* Indicates how many decimal places the currency is formatted to.
|
|
5635
|
+
*/
|
|
5636
|
+
decimal_places?: number;
|
|
5637
|
+
/**
|
|
5638
|
+
* Specifies whether this is the default currency or not. Either `true` or `false`.
|
|
5639
|
+
*/
|
|
5640
|
+
default?: boolean;
|
|
5641
|
+
/**
|
|
5642
|
+
* Specifies if this currency is available for products. Either `true` or `false`.
|
|
5643
|
+
*/
|
|
5644
|
+
enabled?: boolean;
|
|
5645
|
+
links?: SelfLink2;
|
|
5646
|
+
meta?: ResponseMetaCurrency;
|
|
5647
|
+
};
|
|
5648
|
+
export type ResponseMetaCurrency = {
|
|
5649
|
+
timestamps?: Timestamps;
|
|
5650
|
+
/**
|
|
5651
|
+
* Indicates whether the owner is store or org.
|
|
5652
|
+
*/
|
|
5653
|
+
owner?: string;
|
|
5654
|
+
};
|
|
5655
|
+
export type Timestamps = {
|
|
5656
|
+
/**
|
|
5657
|
+
* Indicates the creation date of this currency.
|
|
5658
|
+
*/
|
|
5659
|
+
created_at?: string;
|
|
5660
|
+
/**
|
|
5661
|
+
* Indicates the updated date of this currency.
|
|
5662
|
+
*/
|
|
5663
|
+
updated_at?: unknown;
|
|
5664
|
+
};
|
|
5665
|
+
export type SelfLink2 = {
|
|
5666
|
+
/**
|
|
5667
|
+
* Specifies the URL of this currency.
|
|
5668
|
+
*/
|
|
5669
|
+
self?: string;
|
|
5670
|
+
};
|
|
5554
5671
|
/**
|
|
5555
5672
|
* The language and locale your storefront prefers. See [Accept-Language](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language).
|
|
5556
5673
|
*/
|
|
@@ -9211,6 +9328,34 @@ export type GetV2AccountsResponses = {
|
|
|
9211
9328
|
};
|
|
9212
9329
|
};
|
|
9213
9330
|
export type GetV2AccountsResponse = GetV2AccountsResponses[keyof GetV2AccountsResponses];
|
|
9331
|
+
export type PostV2AccountsData = {
|
|
9332
|
+
body?: {
|
|
9333
|
+
data: Account & WritableParentId;
|
|
9334
|
+
};
|
|
9335
|
+
path?: never;
|
|
9336
|
+
query?: never;
|
|
9337
|
+
url: "/v2/accounts";
|
|
9338
|
+
};
|
|
9339
|
+
export type PostV2AccountsErrors = {
|
|
9340
|
+
/**
|
|
9341
|
+
* Bad Request
|
|
9342
|
+
*/
|
|
9343
|
+
400: AccountManagementErrorResponse;
|
|
9344
|
+
/**
|
|
9345
|
+
* Internal server error.
|
|
9346
|
+
*/
|
|
9347
|
+
default: AccountManagementErrorResponse;
|
|
9348
|
+
};
|
|
9349
|
+
export type PostV2AccountsError = PostV2AccountsErrors[keyof PostV2AccountsErrors];
|
|
9350
|
+
export type PostV2AccountsResponses = {
|
|
9351
|
+
/**
|
|
9352
|
+
* Created
|
|
9353
|
+
*/
|
|
9354
|
+
201: {
|
|
9355
|
+
data?: AccountResponse;
|
|
9356
|
+
};
|
|
9357
|
+
};
|
|
9358
|
+
export type PostV2AccountsResponse = PostV2AccountsResponses[keyof PostV2AccountsResponses];
|
|
9214
9359
|
export type GetV2AccountsAccountIdData = {
|
|
9215
9360
|
body?: never;
|
|
9216
9361
|
path: {
|
|
@@ -9242,6 +9387,98 @@ export type GetV2AccountsAccountIdResponses = {
|
|
|
9242
9387
|
};
|
|
9243
9388
|
};
|
|
9244
9389
|
export type GetV2AccountsAccountIdResponse = GetV2AccountsAccountIdResponses[keyof GetV2AccountsAccountIdResponses];
|
|
9390
|
+
export type PutV2AccountsAccountIdData = {
|
|
9391
|
+
body?: {
|
|
9392
|
+
data: Account & ReadOnlyParentId;
|
|
9393
|
+
};
|
|
9394
|
+
path: {
|
|
9395
|
+
/**
|
|
9396
|
+
* The ID of the account you want to retrieve.
|
|
9397
|
+
*/
|
|
9398
|
+
accountID: string;
|
|
9399
|
+
};
|
|
9400
|
+
query?: never;
|
|
9401
|
+
url: "/v2/accounts/{accountID}";
|
|
9402
|
+
};
|
|
9403
|
+
export type PutV2AccountsAccountIdErrors = {
|
|
9404
|
+
/**
|
|
9405
|
+
* Bad Request
|
|
9406
|
+
*/
|
|
9407
|
+
400: {
|
|
9408
|
+
errors?: Array<{
|
|
9409
|
+
detail?: string;
|
|
9410
|
+
status?: string;
|
|
9411
|
+
title?: string;
|
|
9412
|
+
}>;
|
|
9413
|
+
};
|
|
9414
|
+
/**
|
|
9415
|
+
* Not Found
|
|
9416
|
+
*/
|
|
9417
|
+
404: {
|
|
9418
|
+
errors?: Array<{
|
|
9419
|
+
detail?: string;
|
|
9420
|
+
status?: string;
|
|
9421
|
+
title?: string;
|
|
9422
|
+
}>;
|
|
9423
|
+
};
|
|
9424
|
+
/**
|
|
9425
|
+
* Internal server error.
|
|
9426
|
+
*/
|
|
9427
|
+
default: AccountManagementErrorResponse;
|
|
9428
|
+
};
|
|
9429
|
+
export type PutV2AccountsAccountIdError = PutV2AccountsAccountIdErrors[keyof PutV2AccountsAccountIdErrors];
|
|
9430
|
+
export type PutV2AccountsAccountIdResponses = {
|
|
9431
|
+
/**
|
|
9432
|
+
* OK
|
|
9433
|
+
*/
|
|
9434
|
+
200: {
|
|
9435
|
+
data?: {
|
|
9436
|
+
/**
|
|
9437
|
+
* The unique identifier for an Account.
|
|
9438
|
+
*/
|
|
9439
|
+
id?: string;
|
|
9440
|
+
/**
|
|
9441
|
+
* The type of the object returned. Always use account.
|
|
9442
|
+
*/
|
|
9443
|
+
type?: string;
|
|
9444
|
+
/**
|
|
9445
|
+
* The name of the account.
|
|
9446
|
+
*/
|
|
9447
|
+
name?: string;
|
|
9448
|
+
/**
|
|
9449
|
+
* The legal name of the account.
|
|
9450
|
+
*/
|
|
9451
|
+
legal_name?: string;
|
|
9452
|
+
/**
|
|
9453
|
+
* The registration ID of the account. The maximum character limit for this field is 63.
|
|
9454
|
+
*/
|
|
9455
|
+
registration_id?: string;
|
|
9456
|
+
/**
|
|
9457
|
+
* The optional external ID reference. For example, this could be an external reference from a separate company system. The maximum length is 2048 characters. Default is null.
|
|
9458
|
+
*/
|
|
9459
|
+
external_ref?: string;
|
|
9460
|
+
meta?: {
|
|
9461
|
+
timestamps?: {
|
|
9462
|
+
/**
|
|
9463
|
+
* The date the account is created.
|
|
9464
|
+
*/
|
|
9465
|
+
created_at?: Date;
|
|
9466
|
+
/**
|
|
9467
|
+
* The date the account is last updated.
|
|
9468
|
+
*/
|
|
9469
|
+
updated_at?: Date;
|
|
9470
|
+
};
|
|
9471
|
+
};
|
|
9472
|
+
links?: {
|
|
9473
|
+
/**
|
|
9474
|
+
* A URL to the specific resource.
|
|
9475
|
+
*/
|
|
9476
|
+
self?: string;
|
|
9477
|
+
};
|
|
9478
|
+
};
|
|
9479
|
+
};
|
|
9480
|
+
};
|
|
9481
|
+
export type PutV2AccountsAccountIdResponse = PutV2AccountsAccountIdResponses[keyof PutV2AccountsAccountIdResponses];
|
|
9245
9482
|
export type GetV2AccountMembersData = {
|
|
9246
9483
|
body?: never;
|
|
9247
9484
|
path?: never;
|
|
@@ -9475,3 +9712,61 @@ export type PostV2AccountMembersTokensResponses = {
|
|
|
9475
9712
|
};
|
|
9476
9713
|
};
|
|
9477
9714
|
export type PostV2AccountMembersTokensResponse = PostV2AccountMembersTokensResponses[keyof PostV2AccountMembersTokensResponses];
|
|
9715
|
+
export type GetAllCurrenciesData = {
|
|
9716
|
+
body?: never;
|
|
9717
|
+
path?: never;
|
|
9718
|
+
query?: {
|
|
9719
|
+
/**
|
|
9720
|
+
* The number of records to offset the results by.
|
|
9721
|
+
*/
|
|
9722
|
+
"page[offset]"?: string;
|
|
9723
|
+
/**
|
|
9724
|
+
* The number of records per page.
|
|
9725
|
+
*/
|
|
9726
|
+
"page[limit]"?: string;
|
|
9727
|
+
};
|
|
9728
|
+
url: "/v2/currencies";
|
|
9729
|
+
};
|
|
9730
|
+
export type GetAllCurrenciesErrors = {
|
|
9731
|
+
/**
|
|
9732
|
+
* Unauthorized
|
|
9733
|
+
*/
|
|
9734
|
+
401: ResponseError;
|
|
9735
|
+
};
|
|
9736
|
+
export type GetAllCurrenciesError = GetAllCurrenciesErrors[keyof GetAllCurrenciesErrors];
|
|
9737
|
+
export type GetAllCurrenciesResponses = {
|
|
9738
|
+
/**
|
|
9739
|
+
* OK
|
|
9740
|
+
*/
|
|
9741
|
+
200: ResponseData & {
|
|
9742
|
+
data?: Array<ResponseCurrency>;
|
|
9743
|
+
};
|
|
9744
|
+
};
|
|
9745
|
+
export type GetAllCurrenciesResponse = GetAllCurrenciesResponses[keyof GetAllCurrenciesResponses];
|
|
9746
|
+
export type GetACurrencyData = {
|
|
9747
|
+
body?: never;
|
|
9748
|
+
path: {
|
|
9749
|
+
/**
|
|
9750
|
+
* The ID for the requested currency.
|
|
9751
|
+
*/
|
|
9752
|
+
currencyID: string;
|
|
9753
|
+
};
|
|
9754
|
+
query?: never;
|
|
9755
|
+
url: "/v2/currencies/{currencyID}";
|
|
9756
|
+
};
|
|
9757
|
+
export type GetACurrencyErrors = {
|
|
9758
|
+
/**
|
|
9759
|
+
* Unauthorized
|
|
9760
|
+
*/
|
|
9761
|
+
401: ResponseError;
|
|
9762
|
+
};
|
|
9763
|
+
export type GetACurrencyError = GetACurrencyErrors[keyof GetACurrencyErrors];
|
|
9764
|
+
export type GetACurrencyResponses = {
|
|
9765
|
+
/**
|
|
9766
|
+
* OK
|
|
9767
|
+
*/
|
|
9768
|
+
200: ResponseData & {
|
|
9769
|
+
data?: Array<ResponseCurrency>;
|
|
9770
|
+
};
|
|
9771
|
+
};
|
|
9772
|
+
export type GetACurrencyResponse = GetACurrencyResponses[keyof GetACurrencyResponses];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epcc-sdk/sdks-shopper",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"oas:openapi-ts": "openapi-ts",
|
|
50
50
|
"oas:redocly": "redocly --config ./redocly.json",
|
|
51
51
|
"oas:redocly:lint": "redocly lint --config ../specs/config/redocly.yaml",
|
|
52
|
-
"oas:redocly:join:shopper": "redocly join --config ../specs/config/redocly.yaml --output ../specs/shopper.yaml ../specs/bundled/catalog_view_3.1.yaml ../specs/bundled/cart_checkout.yaml ../specs/bundled/subscriptions_3.1.yaml ../specs/bundled/inventories_3.1.yaml ../specs/bundled/authentication.yaml ../specs/bundled/account-addresses.yaml ../specs/bundled/account_management.yaml",
|
|
52
|
+
"oas:redocly:join:shopper": "redocly join --config ../specs/config/redocly.yaml --output ../specs/shopper.yaml ../specs/bundled/catalog_view_3.1.yaml ../specs/bundled/cart_checkout.yaml ../specs/bundled/subscriptions_3.1.yaml ../specs/bundled/inventories_3.1.yaml ../specs/bundled/authentication.yaml ../specs/bundled/account-addresses.yaml ../specs/bundled/account_management.yaml ../specs/bundled/currencies.yaml",
|
|
53
53
|
"oas:redocly:bundle": "redocly bundle --config ../specs/config/redocly.yaml",
|
|
54
54
|
"oas:openapi-format:convert": "pnpm dlx openapi-format ../specs/bundled/catalog_view.yaml -o ../specs/bundled/catalog_view_3.1.yaml --convertTo \"3.1\" && pnpm dlx openapi-format ../specs/bundled/subscriptions.yaml -o ../specs/bundled/subscriptions_3.1.yaml --convertTo \"3.1\" && pnpm dlx openapi-format ../specs/bundled/inventories.yaml -o ../specs/bundled/inventories_3.1.yaml --convertTo \"3.1\""
|
|
55
55
|
}
|