@epcc-sdk/sdks-shopper 0.0.3 → 0.0.5

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.
@@ -2831,3 +2831,138 @@ export var cancelATransaction = function (options) {
2831
2831
  },
2832
2832
  ], url: "/v2/orders/{orderID}/transactions/{transactionID}/cancel" }));
2833
2833
  };
2834
+ /**
2835
+ * Get product
2836
+ */
2837
+ export var getSubscriptionProduct = function (options) {
2838
+ var _a;
2839
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
2840
+ {
2841
+ scheme: "bearer",
2842
+ type: "http",
2843
+ },
2844
+ ], url: "/v2/subscriptions/products/{product_uuid}" }));
2845
+ };
2846
+ /**
2847
+ * Get plan
2848
+ */
2849
+ export var getPlan = function (options) {
2850
+ var _a;
2851
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
2852
+ {
2853
+ scheme: "bearer",
2854
+ type: "http",
2855
+ },
2856
+ ], url: "/v2/subscriptions/plans/{plan_uuid}" }));
2857
+ };
2858
+ /**
2859
+ * List offerings
2860
+ * Retrieves a list of all subscription offerings.
2861
+ *
2862
+ * ### Filtering
2863
+ *
2864
+ * This endpoint supports filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering).
2865
+ *
2866
+ * The following attributes and operators are supported.
2867
+ *
2868
+ * | Operator | Attribute | Description |
2869
+ * | --- | --- | --- |
2870
+ * | `eq` | `external_ref`, `products.external_ref`, `proration_policy_id` | Equals. Checks if the values of two operands are equal. If they are, the condition is true. |
2871
+ * | `in` | `products.external_ref` | In. Checks if the values are included in the specified string. If they are, the condition is true. |
2872
+ *
2873
+ */
2874
+ export var listOfferings = function (options) {
2875
+ var _a;
2876
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
2877
+ {
2878
+ scheme: "bearer",
2879
+ type: "http",
2880
+ },
2881
+ ], url: "/v2/subscriptions/offerings" }));
2882
+ };
2883
+ /**
2884
+ * Get offering
2885
+ */
2886
+ export var getOffering = function (options) {
2887
+ var _a;
2888
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
2889
+ {
2890
+ scheme: "bearer",
2891
+ type: "http",
2892
+ },
2893
+ ], url: "/v2/subscriptions/offerings/{offering_uuid}" }));
2894
+ };
2895
+ /**
2896
+ * List an offering's plans
2897
+ */
2898
+ export var listOfferingPlans = function (options) {
2899
+ var _a;
2900
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
2901
+ {
2902
+ scheme: "bearer",
2903
+ type: "http",
2904
+ },
2905
+ ], url: "/v2/subscriptions/offerings/{offering_uuid}/plans" }));
2906
+ };
2907
+ /**
2908
+ * List an offering's features
2909
+ */
2910
+ export var listOfferingFeatures = function (options) {
2911
+ var _a;
2912
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
2913
+ {
2914
+ scheme: "bearer",
2915
+ type: "http",
2916
+ },
2917
+ ], url: "/v2/subscriptions/offerings/{offering_uuid}/features" }));
2918
+ };
2919
+ /**
2920
+ * List an offering's products
2921
+ */
2922
+ export var listOfferingProducts = function (options) {
2923
+ var _a;
2924
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
2925
+ {
2926
+ scheme: "bearer",
2927
+ type: "http",
2928
+ },
2929
+ ], url: "/v2/subscriptions/offerings/{offering_uuid}/products" }));
2930
+ };
2931
+ /**
2932
+ * Get feature
2933
+ */
2934
+ export var getFeature = function (options) {
2935
+ var _a;
2936
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
2937
+ {
2938
+ scheme: "bearer",
2939
+ type: "http",
2940
+ },
2941
+ ], url: "/v2/subscriptions/features/{feature_uuid}" }));
2942
+ };
2943
+ /**
2944
+ * Get Stock for Product
2945
+ * Gets the stock for the product matching the specified unique identifier.
2946
+ */
2947
+ export var getStock = function (options) {
2948
+ var _a;
2949
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
2950
+ {
2951
+ scheme: "bearer",
2952
+ type: "http",
2953
+ },
2954
+ ], url: "/v2/inventories/{product_uuid}" }));
2955
+ };
2956
+ /**
2957
+ * List Locations
2958
+ * Lists all Inventory Locations
2959
+ */
2960
+ export var listLocations = function (options) {
2961
+ var _a;
2962
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(__assign(__assign({}, options), { security: [
2963
+ {
2964
+ scheme: "bearer",
2965
+ type: "http",
2966
+ },
2967
+ ], url: "/v2/inventories/locations" }));
2968
+ };
@@ -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 } 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 } 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>;
@@ -38,3 +38,8 @@ export declare const getComponentProductIdsResponseTransformer: (data: any) => P
38
38
  export declare const getChildProductsResponseTransformer: (data: any) => Promise<GetChildProductsResponse>;
39
39
  export declare const getProductsForHierarchyResponseTransformer: (data: any) => Promise<GetProductsForHierarchyResponse>;
40
40
  export declare const getProductsForNodeResponseTransformer: (data: any) => Promise<GetProductsForNodeResponse>;
41
+ export declare const getSubscriptionProductResponseTransformer: (data: any) => Promise<GetSubscriptionProductResponse>;
42
+ export declare const listOfferingsResponseTransformer: (data: any) => Promise<ListOfferingsResponse>;
43
+ export declare const getOfferingResponseTransformer: (data: any) => Promise<GetOfferingResponse>;
44
+ export declare const listOfferingProductsResponseTransformer: (data: any) => Promise<ListOfferingProductsResponse>;
45
+ export declare const getStockResponseTransformer: (data: any) => Promise<GetStockResponse>;
@@ -543,3 +543,74 @@ export var getProductsForNodeResponseTransformer = function (data) { return __aw
543
543
  return [2 /*return*/, data];
544
544
  });
545
545
  }); };
546
+ export var getSubscriptionProductResponseTransformer = function (data) { return __awaiter(void 0, void 0, void 0, function () {
547
+ return __generator(this, function (_a) {
548
+ if (data.data) {
549
+ data.data = productSchemaResponseTransformer(data.data);
550
+ }
551
+ return [2 /*return*/, data];
552
+ });
553
+ }); };
554
+ var productResponseAttributesSchemaResponseTransformer = function (data) {
555
+ data = productAttributesSchemaResponseTransformer(data);
556
+ return data;
557
+ };
558
+ var offeringProductResponseAttributesSchemaResponseTransformer = function (data) {
559
+ data = productResponseAttributesSchemaResponseTransformer(data);
560
+ return data;
561
+ };
562
+ var offeringProductSchemaResponseTransformer = function (data) {
563
+ data.attributes = offeringProductResponseAttributesSchemaResponseTransformer(data.attributes);
564
+ data.meta = productMetaSchemaResponseTransformer(data.meta);
565
+ return data;
566
+ };
567
+ var offeringIncludesSchemaResponseTransformer = function (data) {
568
+ if (data.products) {
569
+ data.products = data.products.map(function (item) {
570
+ return offeringProductSchemaResponseTransformer(item);
571
+ });
572
+ }
573
+ return data;
574
+ };
575
+ export var listOfferingsResponseTransformer = function (data) { return __awaiter(void 0, void 0, void 0, function () {
576
+ return __generator(this, function (_a) {
577
+ if (data.included) {
578
+ data.included = offeringIncludesSchemaResponseTransformer(data.included);
579
+ }
580
+ return [2 /*return*/, data];
581
+ });
582
+ }); };
583
+ export var getOfferingResponseTransformer = function (data) { return __awaiter(void 0, void 0, void 0, function () {
584
+ return __generator(this, function (_a) {
585
+ if (data.included) {
586
+ data.included = offeringIncludesSchemaResponseTransformer(data.included);
587
+ }
588
+ return [2 /*return*/, data];
589
+ });
590
+ }); };
591
+ export var listOfferingProductsResponseTransformer = function (data) { return __awaiter(void 0, void 0, void 0, function () {
592
+ return __generator(this, function (_a) {
593
+ if (data.data) {
594
+ data.data = data.data.map(function (item) {
595
+ return offeringProductSchemaResponseTransformer(item);
596
+ });
597
+ }
598
+ return [2 /*return*/, data];
599
+ });
600
+ }); };
601
+ var stockResponseAttributesSchemaResponseTransformer = function (data) {
602
+ data.available = BigInt(data.available.toString());
603
+ data.allocated = BigInt(data.allocated.toString());
604
+ data.total = BigInt(data.total.toString());
605
+ return data;
606
+ };
607
+ var stockResponseSchemaResponseTransformer = function (data) {
608
+ data.attributes = stockResponseAttributesSchemaResponseTransformer(data.attributes);
609
+ return data;
610
+ };
611
+ export var getStockResponseTransformer = function (data) { return __awaiter(void 0, void 0, void 0, function () {
612
+ return __generator(this, function (_a) {
613
+ data.data = stockResponseSchemaResponseTransformer(data.data);
614
+ return [2 /*return*/, data];
615
+ });
616
+ }); };