@edgebound/bigcommerce 0.5.63 → 0.5.65

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.
Files changed (28) hide show
  1. package/dist/bigcommerce-entities/currencies/currencies.service.d.ts +33 -0
  2. package/dist/bigcommerce-entities/currencies/currencies.service.d.ts.map +1 -0
  3. package/dist/bigcommerce-entities/currencies/currencies.service.js +64 -0
  4. package/dist/bigcommerce-entities/currencies/currencies.service.js.map +1 -0
  5. package/dist/bigcommerce-entities/currencies/index.d.ts +2 -1
  6. package/dist/bigcommerce-entities/currencies/index.d.ts.map +1 -1
  7. package/dist/bigcommerce-entities/currencies/index.js +16 -0
  8. package/dist/bigcommerce-entities/currencies/index.js.map +1 -1
  9. package/dist/bigcommerce-entities/currencies/schemas/find-currencies.schema.d.ts +49 -0
  10. package/dist/bigcommerce-entities/currencies/schemas/find-currencies.schema.d.ts.map +1 -0
  11. package/dist/bigcommerce-entities/currencies/schemas/find-currencies.schema.js +57 -0
  12. package/dist/bigcommerce-entities/currencies/schemas/find-currencies.schema.js.map +1 -0
  13. package/dist/bigcommerce-entities/currencies/schemas/index.d.ts +3 -0
  14. package/dist/bigcommerce-entities/currencies/schemas/index.d.ts.map +1 -0
  15. package/dist/bigcommerce-entities/currencies/schemas/index.js +19 -0
  16. package/dist/bigcommerce-entities/currencies/schemas/index.js.map +1 -0
  17. package/dist/bigcommerce-entities/currencies/schemas/update-currency.schema.d.ts +17 -0
  18. package/dist/bigcommerce-entities/currencies/schemas/update-currency.schema.d.ts.map +1 -0
  19. package/dist/bigcommerce-entities/currencies/schemas/update-currency.schema.js +53 -0
  20. package/dist/bigcommerce-entities/currencies/schemas/update-currency.schema.js.map +1 -0
  21. package/dist/bigcommerce.module.d.ts.map +1 -1
  22. package/dist/bigcommerce.module.js +1 -0
  23. package/dist/bigcommerce.module.js.map +1 -1
  24. package/dist/constants.d.ts +3 -0
  25. package/dist/constants.d.ts.map +1 -1
  26. package/dist/constants.js +3 -0
  27. package/dist/constants.js.map +1 -1
  28. package/package.json +3 -3
@@ -0,0 +1,33 @@
1
+ import * as z from 'zod';
2
+ import { BigCommerceFetcherService } from '../../core';
3
+ import { FindCurrenciesCriteriaSchema, UpdateCurrencyInputSchema } from './schemas';
4
+ export declare class BigCommerceCurrenciesService {
5
+ private readonly fetcher;
6
+ constructor(fetcher: BigCommerceFetcherService);
7
+ findCurrencies(criteria?: z.input<typeof FindCurrenciesCriteriaSchema>): import("neverthrow").ResultAsync<{
8
+ id: number;
9
+ is_default: boolean;
10
+ last_updated: string;
11
+ country_iso2: string | null;
12
+ currency_code: string;
13
+ currency_exchange_rate: number;
14
+ auto_update: boolean;
15
+ name: string;
16
+ enabled: boolean;
17
+ }[], import("../../core").BigCommerceError>;
18
+ getAllCurrencies(): import("neverthrow").ResultAsync<{
19
+ id: number;
20
+ is_default: boolean;
21
+ last_updated: string;
22
+ country_iso2: string | null;
23
+ currency_code: string;
24
+ currency_exchange_rate: number;
25
+ auto_update: boolean;
26
+ name: string;
27
+ enabled: boolean;
28
+ }[], import("../../core").BigCommerceError>;
29
+ updateCurrency(input: z.input<typeof UpdateCurrencyInputSchema>): import("neverthrow").ResultAsync<{
30
+ id: number;
31
+ }, import("../../core").BigCommerceError>;
32
+ }
33
+ //# sourceMappingURL=currencies.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currencies.service.d.ts","sourceRoot":"","sources":["../../../src/bigcommerce-entities/currencies/currencies.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAGvD,OAAO,EACL,4BAA4B,EAE5B,yBAAyB,EAE1B,MAAM,WAAW,CAAC;AACnB,qBACa,4BAA4B;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,yBAAyB;IAE/D,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC;;;;;;;;;;;IAgBtE,gBAAgB;;;;;;;;;;;IAehB,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC;;;CAYhE"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.BigCommerceCurrenciesService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const constants_1 = require("../../constants");
15
+ const core_1 = require("../../core");
16
+ const utils_1 = require("../../utils");
17
+ const validate_1 = require("../../utils/validate");
18
+ const schemas_1 = require("./schemas");
19
+ let BigCommerceCurrenciesService = class BigCommerceCurrenciesService {
20
+ fetcher;
21
+ constructor(fetcher) {
22
+ this.fetcher = fetcher;
23
+ }
24
+ findCurrencies(criteria) {
25
+ return (0, validate_1.validateInputData)(schemas_1.FindCurrenciesCriteriaSchema, criteria ?? {}).asyncAndThen((query) => this.fetcher.fetch({
26
+ query,
27
+ isB2B: false,
28
+ method: 'GET',
29
+ path: 'currencies',
30
+ version: 'v2',
31
+ resultSchema: schemas_1.FindCurrenciesResponseSchema,
32
+ }, { shouldRetry: true }));
33
+ }
34
+ getAllCurrencies() {
35
+ return (0, utils_1.whileLoop)({
36
+ initialParams: {
37
+ limit: constants_1.DEFAULTS.currencies.getAllBatchSize,
38
+ page: 1,
39
+ },
40
+ step: (params) => this.findCurrencies(params),
41
+ condition: (data) => data.length > 0,
42
+ onStep: (_, params) => ({
43
+ ...params,
44
+ page: params.page + 1,
45
+ }),
46
+ }).map((responses) => responses.flat());
47
+ }
48
+ updateCurrency(input) {
49
+ return (0, validate_1.validateInputData)(schemas_1.UpdateCurrencyInputSchema, input).asyncAndThen(({ data, id }) => this.fetcher.fetch({
50
+ isB2B: false,
51
+ method: 'PUT',
52
+ path: `currencies/${id}`,
53
+ version: 'v2',
54
+ body: data,
55
+ resultSchema: schemas_1.UpdateCurrencyResponseSchema,
56
+ }));
57
+ }
58
+ };
59
+ exports.BigCommerceCurrenciesService = BigCommerceCurrenciesService;
60
+ exports.BigCommerceCurrenciesService = BigCommerceCurrenciesService = __decorate([
61
+ (0, common_1.Injectable)(),
62
+ __metadata("design:paramtypes", [core_1.BigCommerceFetcherService])
63
+ ], BigCommerceCurrenciesService);
64
+ //# sourceMappingURL=currencies.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currencies.service.js","sourceRoot":"","sources":["../../../src/bigcommerce-entities/currencies/currencies.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,+CAA2C;AAC3C,qCAAuD;AACvD,uCAAwC;AACxC,mDAAyD;AACzD,uCAKmB;AAEZ,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACV;IAA7B,YAA6B,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;IAAG,CAAC;IAEnE,cAAc,CAAC,QAAuD;QACpE,OAAO,IAAA,4BAAiB,EAAC,sCAA4B,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,CAC5F,IAAI,CAAC,OAAO,CAAC,KAAK,CAChB;YACE,KAAK;YACL,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,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from './schemas';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bigcommerce-entities/currencies/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bigcommerce-entities/currencies/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC"}
@@ -1,3 +1,19 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./currencies.service"), exports);
18
+ __exportStar(require("./schemas"), exports);
3
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bigcommerce-entities/currencies/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bigcommerce-entities/currencies/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,4CAA0B"}
@@ -0,0 +1,49 @@
1
+ import * as z from 'zod';
2
+ export declare const FindCurrenciesCriteriaSchema: z.ZodObject<{
3
+ page: z.ZodOptional<z.ZodPipe<z.ZodInt, z.ZodTransform<string, number>>>;
4
+ limit: z.ZodOptional<z.ZodPipe<z.ZodInt, z.ZodTransform<string, number>>>;
5
+ }, z.core.$strip>;
6
+ export declare const BigCommerceCurrencySchema: z.ZodObject<{
7
+ id: z.ZodInt;
8
+ is_default: z.ZodBoolean;
9
+ last_updated: z.ZodString;
10
+ country_iso2: z.ZodNullable<z.ZodString>;
11
+ currency_code: z.ZodString;
12
+ currency_exchange_rate: z.ZodCoercedNumber<unknown>;
13
+ auto_update: z.ZodBoolean;
14
+ name: z.ZodString;
15
+ enabled: z.ZodBoolean;
16
+ }, z.core.$strip>;
17
+ export declare const FindCurrenciesResponseSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
18
+ id: z.ZodInt;
19
+ is_default: z.ZodBoolean;
20
+ last_updated: z.ZodString;
21
+ country_iso2: z.ZodNullable<z.ZodString>;
22
+ currency_code: z.ZodString;
23
+ currency_exchange_rate: z.ZodCoercedNumber<unknown>;
24
+ auto_update: z.ZodBoolean;
25
+ name: z.ZodString;
26
+ enabled: z.ZodBoolean;
27
+ }, z.core.$strip>>, z.ZodNull, z.ZodLiteral<"">]>, z.ZodTransform<{
28
+ id: number;
29
+ is_default: boolean;
30
+ last_updated: string;
31
+ country_iso2: string | null;
32
+ currency_code: string;
33
+ currency_exchange_rate: number;
34
+ auto_update: boolean;
35
+ name: string;
36
+ enabled: boolean;
37
+ }[], "" | {
38
+ id: number;
39
+ is_default: boolean;
40
+ last_updated: string;
41
+ country_iso2: string | null;
42
+ currency_code: string;
43
+ currency_exchange_rate: number;
44
+ auto_update: boolean;
45
+ name: string;
46
+ enabled: boolean;
47
+ }[] | null>>;
48
+ export type BigCommerceCurrency = z.output<typeof BigCommerceCurrencySchema>;
49
+ //# sourceMappingURL=find-currencies.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-currencies.schema.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/currencies/schemas/find-currencies.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;iBAUpC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAEL,CAAC;AAErC,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.FindCurrenciesResponseSchema = exports.BigCommerceCurrencySchema = exports.FindCurrenciesCriteriaSchema = void 0;
37
+ const z = __importStar(require("zod"));
38
+ const constants_1 = require("../../../constants");
39
+ exports.FindCurrenciesCriteriaSchema = z.object({
40
+ page: z.int().transform(String).optional(),
41
+ limit: z.int().positive().max(constants_1.DEFAULTS.currencies.getAllBatchSize).transform(String).optional(),
42
+ });
43
+ exports.BigCommerceCurrencySchema = z.object({
44
+ id: z.int(),
45
+ is_default: z.boolean(),
46
+ last_updated: z.string(),
47
+ country_iso2: z.string().nullable(),
48
+ currency_code: z.string(),
49
+ currency_exchange_rate: z.coerce.number(),
50
+ auto_update: z.boolean(),
51
+ name: z.string(),
52
+ enabled: z.boolean(),
53
+ });
54
+ exports.FindCurrenciesResponseSchema = z
55
+ .union([exports.BigCommerceCurrencySchema.array(), z.null(), z.literal('')])
56
+ .transform((value) => value || []);
57
+ //# sourceMappingURL=find-currencies.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-currencies.schema.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/currencies/schemas/find-currencies.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,kDAA8C;AACjC,QAAA,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IAC1C,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,oBAAQ,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;CAChG,CAAC,CAAC;AAEU,QAAA,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE;IACX,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;IACvB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,sBAAsB,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IACzC,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,CAAC;KAC1C,KAAK,CAAC,CAAC,iCAAyB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;KACnE,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './find-currencies.schema';
2
+ export * from './update-currency.schema';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/currencies/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./find-currencies.schema"), exports);
18
+ __exportStar(require("./update-currency.schema"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/currencies/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,2DAAyC"}
@@ -0,0 +1,17 @@
1
+ import * as z from 'zod';
2
+ export declare const UpdateCurrencyInputSchema: z.ZodObject<{
3
+ id: z.ZodInt;
4
+ data: z.ZodObject<{
5
+ is_default: z.ZodOptional<z.ZodBoolean>;
6
+ country_iso2: z.ZodOptional<z.ZodString>;
7
+ currency_exchange_rate: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>>;
8
+ auto_update: z.ZodOptional<z.ZodBoolean>;
9
+ name: z.ZodOptional<z.ZodString>;
10
+ enabled: z.ZodOptional<z.ZodBoolean>;
11
+ is_transactional: z.ZodOptional<z.ZodBoolean>;
12
+ }, z.core.$strip>;
13
+ }, z.core.$strip>;
14
+ export declare const UpdateCurrencyResponseSchema: z.ZodObject<{
15
+ id: z.ZodInt;
16
+ }, z.core.$strip>;
17
+ //# sourceMappingURL=update-currency.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-currency.schema.d.ts","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/currencies/schemas/update-currency.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,eAAO,MAAM,yBAAyB;;;;;;;;;;;iBAWpC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.UpdateCurrencyResponseSchema = exports.UpdateCurrencyInputSchema = void 0;
37
+ const z = __importStar(require("zod"));
38
+ exports.UpdateCurrencyInputSchema = z.object({
39
+ id: z.int(),
40
+ data: z.object({
41
+ is_default: z.boolean().optional(),
42
+ country_iso2: z.string().optional(),
43
+ currency_exchange_rate: z.number().transform(String).optional(),
44
+ auto_update: z.boolean().optional(),
45
+ name: z.string().optional(),
46
+ enabled: z.boolean().optional(),
47
+ is_transactional: z.boolean().optional(),
48
+ }),
49
+ });
50
+ exports.UpdateCurrencyResponseSchema = z.object({
51
+ id: z.int(),
52
+ });
53
+ //# sourceMappingURL=update-currency.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-currency.schema.js","sourceRoot":"","sources":["../../../../src/bigcommerce-entities/currencies/schemas/update-currency.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACZ,QAAA,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAClC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACnC,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;QAC/D,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QACnC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC/B,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACzC,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE;CACZ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bigcommerce.module.d.ts","sourceRoot":"","sources":["../src/bigcommerce.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAU,KAAK,aAAa,EAAiB,MAAM,gBAAgB,CAAC;AAC3F,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAoBzB,OAAO,EAAE,uBAAuB,EAA4B,MAAM,sBAAsB,CAAC;AAoBzF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAqBa,iBAAiB;IAC5B,MAAM,CAAC,YAAY,CACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,EAC/C,MAAM,CAAC,EAAE,MAAM,GACd,aAAa;CAkBjB"}
1
+ {"version":3,"file":"bigcommerce.module.d.ts","sourceRoot":"","sources":["../src/bigcommerce.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAU,KAAK,aAAa,EAAiB,MAAM,gBAAgB,CAAC;AAC3F,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAqBzB,OAAO,EAAE,uBAAuB,EAA4B,MAAM,sBAAsB,CAAC;AAqBzF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAqBa,iBAAiB;IAC5B,MAAM,CAAC,YAAY,CACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,EAC/C,MAAM,CAAC,EAAE,MAAM,GACd,aAAa;CAkBjB"}
@@ -38,6 +38,7 @@ const services = [
38
38
  bigcommerce_entities_1.BigCommercePriceListsRecordsService,
39
39
  bigcommerce_entities_1.BigCommerceCatalogService,
40
40
  quotes_1.BigCommerceQuotesService,
41
+ bigcommerce_entities_1.BigCommerceCurrenciesService,
41
42
  ];
42
43
  /**
43
44
  * Punto de entrada para consumir las APIs de BigCommerce dentro de la aplicación NestJS.
@@ -1 +1 @@
1
- {"version":3,"file":"bigcommerce.module.js","sourceRoot":"","sources":["../src/bigcommerce.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA2F;AAE3F,iEAKgC;AAChC,sGAA4G;AAC5G,0FAAiG;AACjG,iFAAwF;AACxF,uFAA8F;AAC9F,gGAAsG;AACtG,uFAA8F;AAC9F,0DAAyE;AACzE,gGAAsG;AACtG,oFAG4C;AAC5C,wDAAuD;AACvD,wDAAyF;AACzF,MAAM,QAAQ,GAAe;IAC3B;QACE,OAAO,EAAE,uDAAyB;QAClC,QAAQ,EAAE,2DAA6B;KACxC;IACD,sDAA8B;IAC9B,kDAA2B;IAC3B,+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gBACT,EAAE,OAAO,EAAE,eAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,EAAE;gBAC3E,GAAG,QAAQ;aACZ;YACD,OAAO,EAAE,QAAQ;YACjB,MAAM,EAAE,IAAI;SACb,CAAC;IACJ,CAAC;CACF,CAAA;AAtBY,8CAAiB;4BAAjB,iBAAiB;IArB7B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,eAAM,EAAE,QAAQ,EAAE,IAAI,eAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC;QAC3F,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE;YACP,+BAAe,CAAC,OAAO,CAAC;gBACtB,MAAM,EAAE,uCAAuB;gBAC/B,SAAS,EAAE,CAAC,wCAAwB,CAAC;gBACrC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;oBACb,KAAK,EAAE;wBACL,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;qBAC5C;oBACD,WAAW,EAAE;wBACX,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;wBAC9C,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC;wBACtD,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC;qBACrD;iBACF,CAAC;aACH,CAAC;SACH;KACF,CAAC;GACW,iBAAiB,CAsB7B"}
@@ -68,5 +68,8 @@ export declare const DEFAULTS: {
68
68
  readonly getAllBatchSize: 250;
69
69
  };
70
70
  };
71
+ readonly currencies: {
72
+ readonly getAllBatchSize: 250;
73
+ };
71
74
  };
72
75
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEX,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyEX,CAAC"}
package/dist/constants.js CHANGED
@@ -71,5 +71,8 @@ exports.DEFAULTS = {
71
71
  getAllBatchSize: 250,
72
72
  },
73
73
  },
74
+ currencies: {
75
+ getAllBatchSize: 250,
76
+ },
74
77
  };
75
78
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACtB,KAAK,EAAE;QACL,UAAU,EAAE,CAAC;QACb,gBAAgB,EAAE,CAAC;KACpB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,KAAK;KACV;IACD,eAAe,EAAE;QACf,GAAG,EAAE,qCAAqC;QAC1C,OAAO,EAAE,oCAAoC;KAC9C;IACD,SAAS,EAAE;QACT,YAAY,EAAE,GAAG;KAClB;IACD,UAAU,EAAE;QACV,YAAY,EAAE,GAAG;KAClB;IACD,SAAS,EAAE;QACT,qBAAqB,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,WAAW,EAAE,CAAC;SACf;QACD,WAAW,EAAE;YACX,YAAY,EAAE,GAAG;SAClB;QACD,KAAK,EAAE;YACL,YAAY,EAAE,GAAG;SAClB;QACD,IAAI,EAAE;YACJ,QAAQ,EAAE,GAAG;SACd;KACF;IACD,QAAQ,EAAE;QACR,eAAe,EAAE,GAAG;QACpB,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,CAAC;QACpB,SAAS,EAAE;YACT,eAAe,EAAE,IAAI;YACrB,iBAAiB,EAAE,CAAC;SACrB;QACD,6BAA6B,EAAE,CAAC;KACjC;IACD,MAAM,EAAE;QACN,eAAe,EAAE,GAAG;QACpB,iBAAiB,EAAE;YACjB,eAAe,EAAE,GAAG;SACrB;QACD,QAAQ,EAAE;YACR,eAAe,EAAE,GAAG;SACrB;KACF;IACD,UAAU,EAAE;QACV,eAAe,EAAE,GAAG;QACpB,OAAO,EAAE;YACP,eAAe,EAAE,IAAI;SACtB;KACF;IACD,SAAS,EAAE;QACT,YAAY,EAAE,GAAG;KAClB;IACD,KAAK,EAAE,IAAI;IACX,OAAO,EAAE;QACP,MAAM,EAAE;YACN,eAAe,EAAE,GAAG;SACrB;QACD,UAAU,EAAE;YACV,eAAe,EAAE,GAAG;SACrB;KACF;CACO,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACtB,KAAK,EAAE;QACL,UAAU,EAAE,CAAC;QACb,gBAAgB,EAAE,CAAC;KACpB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,KAAK;KACV;IACD,eAAe,EAAE;QACf,GAAG,EAAE,qCAAqC;QAC1C,OAAO,EAAE,oCAAoC;KAC9C;IACD,SAAS,EAAE;QACT,YAAY,EAAE,GAAG;KAClB;IACD,UAAU,EAAE;QACV,YAAY,EAAE,GAAG;KAClB;IACD,SAAS,EAAE;QACT,qBAAqB,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,WAAW,EAAE,CAAC;SACf;QACD,WAAW,EAAE;YACX,YAAY,EAAE,GAAG;SAClB;QACD,KAAK,EAAE;YACL,YAAY,EAAE,GAAG;SAClB;QACD,IAAI,EAAE;YACJ,QAAQ,EAAE,GAAG;SACd;KACF;IACD,QAAQ,EAAE;QACR,eAAe,EAAE,GAAG;QACpB,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,CAAC;QACpB,SAAS,EAAE;YACT,eAAe,EAAE,IAAI;YACrB,iBAAiB,EAAE,CAAC;SACrB;QACD,6BAA6B,EAAE,CAAC;KACjC;IACD,MAAM,EAAE;QACN,eAAe,EAAE,GAAG;QACpB,iBAAiB,EAAE;YACjB,eAAe,EAAE,GAAG;SACrB;QACD,QAAQ,EAAE;YACR,eAAe,EAAE,GAAG;SACrB;KACF;IACD,UAAU,EAAE;QACV,eAAe,EAAE,GAAG;QACpB,OAAO,EAAE;YACP,eAAe,EAAE,IAAI;SACtB;KACF;IACD,SAAS,EAAE;QACT,YAAY,EAAE,GAAG;KAClB;IACD,KAAK,EAAE,IAAI;IACX,OAAO,EAAE;QACP,MAAM,EAAE;YACN,eAAe,EAAE,GAAG;SACrB;QACD,UAAU,EAAE;YACV,eAAe,EAAE,GAAG;SACrB;KACF;IACD,UAAU,EAAE;QACV,eAAe,EAAE,GAAG;KACrB;CACO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgebound/bigcommerce",
3
- "version": "0.5.63",
3
+ "version": "0.5.65",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -22,8 +22,8 @@
22
22
  "reflect-metadata": "^0.2.2",
23
23
  "rxjs": "^7.8.2",
24
24
  "zod": "^4.3.3",
25
- "@edgebound/eslint-config": "0.0.4",
26
- "@edgebound/typescript-config": "0.0.1"
25
+ "@edgebound/typescript-config": "0.0.1",
26
+ "@edgebound/eslint-config": "0.0.4"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@nestjs/common": "^11.1.12",