@spscommerce/asst-api 0.0.1-beta.5 → 0.0.1-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/msw.cjs CHANGED
@@ -30,11 +30,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // lib/msw.ts
31
31
  var msw_exports = {};
32
32
  __export(msw_exports, {
33
+ createAttributesApiHandlers: () => createAttributesApiHandlers,
33
34
  createCategoriesApiHandlers: () => createCategoriesApiHandlers,
35
+ createCompanyFeaturesApiHandlers: () => createCompanyFeaturesApiHandlers,
36
+ createErrorsApiHandlers: () => createErrorsApiHandlers,
34
37
  createExportsApiHandlers: () => createExportsApiHandlers,
35
38
  createImportsApiHandlers: () => createImportsApiHandlers,
39
+ createItemsApiHandlers: () => createItemsApiHandlers,
40
+ createLocaleApiHandlers: () => createLocaleApiHandlers,
36
41
  createProductTypesApiHandlers: () => createProductTypesApiHandlers,
37
- createTradingPartnerAccessApiHandlers: () => createTradingPartnerAccessApiHandlers
42
+ createSpreadsheetTemplateApiHandlers: () => createSpreadsheetTemplateApiHandlers,
43
+ createTradingPartnerAccessApiHandlers: () => createTradingPartnerAccessApiHandlers,
44
+ createWhoAmIApiHandlers: () => createWhoAmIApiHandlers
38
45
  });
39
46
  module.exports = __toCommonJS(msw_exports);
40
47
 
@@ -2654,8 +2661,8 @@ var ZodTuple = class extends ZodType {
2654
2661
  });
2655
2662
  return INVALID;
2656
2663
  }
2657
- const rest6 = this._def.rest;
2658
- if (!rest6 && ctx.data.length > this._def.items.length) {
2664
+ const rest13 = this._def.rest;
2665
+ if (!rest13 && ctx.data.length > this._def.items.length) {
2659
2666
  addIssueToContext(ctx, {
2660
2667
  code: ZodIssueCode.too_big,
2661
2668
  maximum: this._def.items.length,
@@ -2682,10 +2689,10 @@ var ZodTuple = class extends ZodType {
2682
2689
  get items() {
2683
2690
  return this._def.items;
2684
2691
  }
2685
- rest(rest6) {
2692
+ rest(rest13) {
2686
2693
  return new ZodTuple({
2687
2694
  ...this._def,
2688
- rest: rest6
2695
+ rest: rest13
2689
2696
  });
2690
2697
  }
2691
2698
  };
@@ -3726,11 +3733,11 @@ var z = /* @__PURE__ */ Object.freeze({
3726
3733
 
3727
3734
  // lib/imports/models/ImportDetail.ts
3728
3735
  var importDetailSchema = z.object({
3729
- completedAt: z.nullable(z.number()),
3736
+ completedAt: z.number().nullish(),
3730
3737
  errorCount: z.number(),
3731
3738
  importId: z.number(),
3732
3739
  name: z.string(),
3733
- startedAt: z.nullable(z.string()),
3740
+ startedAt: z.string().nullish(),
3734
3741
  status: z.string(),
3735
3742
  uploadedAt: z.string()
3736
3743
  });
@@ -3743,7 +3750,7 @@ var importSchema = z.object({
3743
3750
 
3744
3751
  // lib/imports/models/ImportError.ts
3745
3752
  var importErrorSchema = z.object({
3746
- attribute: z.string(),
3753
+ attribute: z.string().nullish(),
3747
3754
  description: z.string(),
3748
3755
  importErrorId: z.number(),
3749
3756
  row: z.number()
@@ -3769,15 +3776,15 @@ var importStatusEnumSchema = z.enum([
3769
3776
 
3770
3777
  // lib/imports/models/ImportsStatus.ts
3771
3778
  var importsStatusSchema = z.object({
3772
- completedAt: z.nullable(z.string()).optional(),
3773
- docInEventId: z.nullable(z.string()).optional(),
3774
- errorCount: z.nullable(z.number()).optional(),
3779
+ completedAt: z.string().nullish(),
3780
+ docInEventId: z.string().nullish(),
3781
+ errorCount: z.number().nullish(),
3775
3782
  importId: z.number(),
3776
- invalidItemCount: z.nullable(z.number()).optional(),
3783
+ invalidItemCount: z.number().nullish(),
3777
3784
  name: z.string(),
3778
3785
  status: importStatusEnumSchema,
3779
- totalItemCount: z.nullable(z.number()).optional(),
3780
- validItemCount: z.nullable(z.number()).optional()
3786
+ totalItemCount: z.number().nullish(),
3787
+ validItemCount: z.number().nullish()
3781
3788
  });
3782
3789
 
3783
3790
  // lib/imports/models/VendorPartnerAttGroups.ts
@@ -3797,7 +3804,6 @@ var generateImportTemplateParamsSchema = z.object({
3797
3804
  });
3798
3805
 
3799
3806
  // lib/imports/index.ts
3800
- var import_query_string = __toESM(require("query-string"), 1);
3801
3807
  var BASE_URL = "imports";
3802
3808
 
3803
3809
  // lib/imports/mockHandlers.ts
@@ -3825,7 +3831,7 @@ function createImportsApiHandlers(client) {
3825
3831
  }) {
3826
3832
  return import_msw.rest.get(`${client.getBaseUrl()}/${BASE_URL}/status`, resolver);
3827
3833
  }
3828
- getImportsStatus.generateData = () => (0, import_zod_mock.generateMock)(importsStatusSchema);
3834
+ getImportsStatus.generateData = () => (0, import_zod_mock.generateMock)(z.array(importsStatusSchema));
3829
3835
  function getVendorPartnerGroups(resolver = (_req, res, ctx) => {
3830
3836
  const data = (0, import_zod_mock.generateMock)(z.array(vendorPartnerAttGroupsSchema));
3831
3837
  return res(ctx.status(200), ctx.json(data));
@@ -3835,7 +3841,7 @@ function createImportsApiHandlers(client) {
3835
3841
  resolver
3836
3842
  );
3837
3843
  }
3838
- getVendorPartnerGroups.generateData = () => (0, import_zod_mock.generateMock)(vendorPartnerAttGroupsSchema);
3844
+ getVendorPartnerGroups.generateData = () => (0, import_zod_mock.generateMock)(z.array(vendorPartnerAttGroupsSchema));
3839
3845
  function uploadImport(resolver = (_req, res, ctx) => {
3840
3846
  return res(ctx.status(200));
3841
3847
  }) {
@@ -3869,13 +3875,13 @@ var itemCategorySchema = z.object({
3869
3875
  companyId: z.number(),
3870
3876
  name: z.string(),
3871
3877
  isActive: z.number(),
3872
- createdDate: z.nullable(z.number()),
3873
- categorytimestamp: z.nullable(z.number()),
3878
+ createdDate: z.number().nullish(),
3879
+ categorytimestamp: z.number().nullish(),
3874
3880
  typeId: z.number(),
3875
3881
  type: z.string(),
3876
- categorykey: z.optional(z.string()),
3877
- description: z.nullable(z.string()).optional(),
3878
- categoryCatalogName: z.nullable(z.string()).optional()
3882
+ categorykey: z.string().nullish(),
3883
+ description: z.string().nullish(),
3884
+ categoryCatalogName: z.string().nullish()
3879
3885
  });
3880
3886
 
3881
3887
  // lib/categories/models/ItemCategoriesSearch.ts
@@ -3889,40 +3895,34 @@ var BASE_URL2 = "categories";
3889
3895
 
3890
3896
  // lib/categories/mockHandlers.ts
3891
3897
  function createCategoriesApiHandlers(client) {
3892
- function getCatalogs(resolver = (_req, res, ctx) => {
3893
- const data = (0, import_zod_mock2.generateMock)(itemCategoriesSearchSchema);
3894
- res(ctx.status(200), ctx.json(data));
3895
- }) {
3896
- return import_msw2.rest.get(
3897
- `${client.getBaseUrl()}/${BASE_URL2}/search-category?type=CATALOG`,
3898
- resolver
3899
- );
3900
- }
3901
- getCatalogs.generateData = () => (0, import_zod_mock2.generateMock)(itemCategoriesSearchSchema);
3902
- function getProductCodes(resolver = (_req, res, ctx) => {
3903
- const data = (0, import_zod_mock2.generateMock)(itemCategoriesSearchSchema);
3904
- res(ctx.status(200), ctx.json(data));
3905
- }) {
3906
- return import_msw2.rest.get(
3907
- `${client.getBaseUrl()}/${BASE_URL2}/search-category?type=PRODUCT_CODE`,
3908
- resolver
3909
- );
3910
- }
3911
- getProductCodes.generateData = () => (0, import_zod_mock2.generateMock)(itemCategoriesSearchSchema);
3912
- function getSelectionCodes(resolver = (_req, res, ctx) => {
3913
- const data = (0, import_zod_mock2.generateMock)(itemCategoriesSearchSchema);
3914
- res(ctx.status(200), ctx.json(data));
3898
+ function getCategory(resolver = (req, res, ctx) => {
3899
+ let data;
3900
+ if (req.url.searchParams.get("type") === "CATALOG") {
3901
+ data = (0, import_zod_mock2.generateMock)(itemCategoriesSearchSchema, {
3902
+ stringMap: {
3903
+ type: () => "CATALOG"
3904
+ }
3905
+ });
3906
+ } else if (req.url.searchParams.get("type") === "PRODUCT_CODE") {
3907
+ data = (0, import_zod_mock2.generateMock)(itemCategoriesSearchSchema, {
3908
+ stringMap: {
3909
+ type: () => "PRODUCT_CODE"
3910
+ }
3911
+ });
3912
+ } else {
3913
+ data = (0, import_zod_mock2.generateMock)(itemCategoriesSearchSchema, {
3914
+ stringMap: {
3915
+ type: () => "SELECTION_CODE"
3916
+ }
3917
+ });
3918
+ }
3919
+ return res(ctx.status(200), ctx.json(data));
3915
3920
  }) {
3916
- return import_msw2.rest.get(
3917
- `${client.getBaseUrl()}/${BASE_URL2}/search-category?type=SELECTION_CODE`,
3918
- resolver
3919
- );
3921
+ return import_msw2.rest.get(`${client.getBaseUrl()}/${BASE_URL2}/search-category`, resolver);
3920
3922
  }
3921
- getSelectionCodes.generateData = () => (0, import_zod_mock2.generateMock)(itemCategoriesSearchSchema);
3923
+ getCategory.generateData = () => (0, import_zod_mock2.generateMock)(itemCategoriesSearchSchema);
3922
3924
  return {
3923
- getCatalogs,
3924
- getProductCodes,
3925
- getSelectionCodes
3925
+ getCategory
3926
3926
  };
3927
3927
  }
3928
3928
 
@@ -3930,17 +3930,27 @@ function createCategoriesApiHandlers(client) {
3930
3930
  var import_msw3 = require("msw");
3931
3931
 
3932
3932
  // lib/exports/index.ts
3933
- var BASE_URL3 = "v2/exports";
3933
+ var BASE_URL3 = "exports";
3934
+ var BASE_URL_V2 = "v2/exports";
3934
3935
 
3935
3936
  // lib/exports/mockHandlers.ts
3936
3937
  function createExportsApiHandlers(client) {
3937
- function add(resolver = (_req, res, ctx) => {
3938
+ function createExport(resolver = (_req, res, ctx) => {
3938
3939
  return res(ctx.status(200));
3939
3940
  }) {
3940
- return import_msw3.rest.post(`${client.getBaseUrl()}/${BASE_URL3}/add`, resolver);
3941
+ return import_msw3.rest.post(`${client.getBaseUrl()}/${BASE_URL_V2}/add`, resolver);
3942
+ }
3943
+ function downloadItems(resolver = (_req, res, ctx) => {
3944
+ return res(ctx.status(400, "Not supported"));
3945
+ }) {
3946
+ return import_msw3.rest.get(
3947
+ `${client.getBaseUrl()}/${BASE_URL3}/spreadsheet/by-item`,
3948
+ resolver
3949
+ );
3941
3950
  }
3942
3951
  return {
3943
- add
3952
+ createExport,
3953
+ downloadItems
3944
3954
  };
3945
3955
  }
3946
3956
 
@@ -3960,10 +3970,6 @@ var attrProdTypeSchema = z.object({
3960
3970
  retailerId: z.number().optional()
3961
3971
  });
3962
3972
 
3963
- // lib/productTypes/index.ts
3964
- var import_query_string2 = __toESM(require("query-string"), 1);
3965
- var BASE_URL4 = "product-types";
3966
-
3967
3973
  // lib/productTypes/models/PagedResults.ts
3968
3974
  function pagedResultsSchema(resultsType) {
3969
3975
  return z.object({
@@ -3974,6 +3980,9 @@ function pagedResultsSchema(resultsType) {
3974
3980
  });
3975
3981
  }
3976
3982
 
3983
+ // lib/productTypes/index.ts
3984
+ var BASE_URL4 = "product-types";
3985
+
3977
3986
  // lib/productTypes/mockHandlers.ts
3978
3987
  function createProductTypesApiHandlers(client) {
3979
3988
  function getProductTypes(resolver = (_req, res, ctx) => {
@@ -4026,11 +4035,865 @@ function createTradingPartnerAccessApiHandlers(client) {
4026
4035
  getAllTradingPartners
4027
4036
  };
4028
4037
  }
4038
+
4039
+ // lib/whoami/mockHandlers.ts
4040
+ var import_zod_mock5 = require("@anatine/zod-mock");
4041
+ var import_msw6 = require("msw");
4042
+
4043
+ // lib/whoami/models/IdentityServiceDatetimePreferences.ts
4044
+ var identityServiceDatetimePreferencesSchema = z.object({
4045
+ DATE_TIME: z.string(),
4046
+ TIME: z.string(),
4047
+ SHORT_DATE: z.string(),
4048
+ LONG_DATETIME: z.string(),
4049
+ LONG_TIME: z.string(),
4050
+ DATE: z.string()
4051
+ });
4052
+
4053
+ // lib/whoami/models/IdentityServiceOrganizationMetadata.ts
4054
+ var identityServiceOrganizationMetadataSchema = z.object({
4055
+ namespace: z.string(),
4056
+ key: z.string(),
4057
+ value: z.string()
4058
+ });
4059
+
4060
+ // lib/whoami/models/IdentityServiceOrganization.ts
4061
+ var identityServiceOrganizationSchema = z.object({
4062
+ organization_name: z.string(),
4063
+ organization_site: z.string(),
4064
+ namespace: z.string(),
4065
+ id: z.string(),
4066
+ permissions: z.array(z.string()).optional(),
4067
+ metadata: identityServiceOrganizationMetadataSchema.optional()
4068
+ });
4069
+
4070
+ // lib/whoami/models/IdentityServicePreferences.ts
4071
+ var identityServicePreferencesSchema = z.object({
4072
+ locale: z.string(),
4073
+ timezone: z.string(),
4074
+ cpUpgrade: z.string().optional(),
4075
+ language: z.array(z.string()),
4076
+ datetime: identityServiceDatetimePreferencesSchema
4077
+ });
4078
+
4079
+ // lib/whoami/models/IdentityServiceUser.ts
4080
+ var identityServiceUserSchema = z.object({
4081
+ id: z.string(),
4082
+ email: z.string(),
4083
+ first_name: z.string(),
4084
+ last_name: z.string(),
4085
+ job_title: z.string(),
4086
+ externally_managed: z.boolean(),
4087
+ city: z.string(),
4088
+ name: z.string(),
4089
+ state: z.string(),
4090
+ country: z.string(),
4091
+ user_type: z.string(),
4092
+ token_type: z.string(),
4093
+ avatar_image_id: z.string(),
4094
+ avatar_image_url: z.string(),
4095
+ origin_avatar_image_id: z.string(),
4096
+ bio: z.string(),
4097
+ phone_number: z.string(),
4098
+ twitter_handle: z.string(),
4099
+ linkedin_url: z.string(),
4100
+ description: z.string().optional(),
4101
+ preferences: identityServicePreferencesSchema,
4102
+ roles: z.array(z.string()),
4103
+ organization: identityServiceOrganizationSchema,
4104
+ password: z.string(),
4105
+ verified: z.boolean()
4106
+ });
4107
+
4108
+ // lib/whoami/models/RegisteredService.ts
4109
+ var registeredServiceSchema = z.object({
4110
+ serviceId: z.number(),
4111
+ identityServiceId: z.number(),
4112
+ name: z.string(),
4113
+ isActive: z.boolean()
4114
+ });
4115
+
4116
+ // lib/whoami/models/UserAccount.ts
4117
+ var userAccountSchema = z.object({
4118
+ identityUser: identityServiceUserSchema,
4119
+ companyId: z.number(),
4120
+ companyName: z.string(),
4121
+ name: z.string(),
4122
+ assortmentPartnerCompanyId: z.number().nullish(),
4123
+ retailer: z.boolean(),
4124
+ supplier: z.boolean(),
4125
+ registeredService: registeredServiceSchema,
4126
+ uniqueAttributes: z.array(z.string()),
4127
+ admin: z.boolean(),
4128
+ adminToolUser: z.boolean(),
4129
+ attributeRegistryAdmin: z.boolean(),
4130
+ attributeRegistryDev: z.boolean(),
4131
+ attributeRegistryRsx: z.boolean(),
4132
+ attributeRegistryUser: z.boolean(),
4133
+ attributeRegistryViewer: z.boolean()
4134
+ });
4135
+
4136
+ // lib/whoami/index.ts
4137
+ var BASE_URL6 = "whoami";
4138
+
4139
+ // lib/whoami/mockHandlers.ts
4140
+ function createWhoAmIApiHandlers(client) {
4141
+ function whoAmI(resolver = (_req, res, ctx) => {
4142
+ const data = (0, import_zod_mock5.generateMock)(userAccountSchema);
4143
+ return res(ctx.status(200), ctx.json(data));
4144
+ }) {
4145
+ return import_msw6.rest.get(`${client.getBaseUrl()}/${BASE_URL6}`, resolver);
4146
+ }
4147
+ whoAmI.generateData = () => (0, import_zod_mock5.generateMock)(userAccountSchema);
4148
+ return {
4149
+ whoAmI
4150
+ };
4151
+ }
4152
+
4153
+ // lib/errors/mockHandlers.ts
4154
+ var import_zod_mock6 = require("@anatine/zod-mock");
4155
+ var import_msw7 = require("msw");
4156
+
4157
+ // lib/items/models/ItemHeader.ts
4158
+ var itemHeaderSchema = z.object({
4159
+ status: z.string().optional(),
4160
+ catalogName: z.string(),
4161
+ productCodeName: z.string(),
4162
+ selectionCodeName: z.string(),
4163
+ gtin: z.string(),
4164
+ upc: z.string(),
4165
+ ean: z.string(),
4166
+ isbn: z.string(),
4167
+ partNumber: z.string(),
4168
+ lastUpdatedDateString: z.string(),
4169
+ companyId: z.string(),
4170
+ itemInfoId: z.string()
4171
+ });
4172
+
4173
+ // lib/items/models/PhaseEnum.ts
4174
+ var phaseEnumSchema = z.enum([
4175
+ "CORE",
4176
+ "CORE_PLUS",
4177
+ "CORE_ADVANCED",
4178
+ "ENRICHED",
4179
+ "STANDARD_REQUIREMENTS"
4180
+ ]);
4181
+
4182
+ // lib/items/models/TradingPartnerStage.ts
4183
+ var tradingPartnerStageSchema = z.object({
4184
+ companyId: z.number(),
4185
+ companyName: z.string(),
4186
+ stage: z.nullable(phaseEnumSchema),
4187
+ isValid: z.boolean()
4188
+ });
4189
+
4190
+ // lib/items/models/ItemMap.ts
4191
+ var itemMapSchema = z.object({
4192
+ rn: z.number().optional(),
4193
+ iteminfoid: z.string(),
4194
+ tradingPartnerStages: z.array(tradingPartnerStageSchema).optional(),
4195
+ gtin: z.string().nullish(),
4196
+ catalogname: z.string().nullish(),
4197
+ isbn: z.string().nullish(),
4198
+ lastupdateddatestring: z.string().nullish(),
4199
+ upc: z.string().nullish(),
4200
+ productcodename: z.string().nullish(),
4201
+ ean: z.string().nullish(),
4202
+ selectioncodename: z.string().nullish(),
4203
+ createddatestring: z.string().nullish(),
4204
+ partnumber: z.string().nullish(),
4205
+ consumeravailabledatestring: z.string().nullish(),
4206
+ status: z.string().nullish(),
4207
+ nrfcolorcode: z.array(z.string()).nullish(),
4208
+ nrfsizecode: z.string().nullish(),
4209
+ productcolordescription: z.array(z.string()).nullish(),
4210
+ productsizedescription: z.array(z.string()).nullish()
4211
+ });
4212
+
4213
+ // lib/items/models/ItemTable.ts
4214
+ var itemTableSchema = z.object({
4215
+ headers: itemHeaderSchema,
4216
+ itemMaps: z.array(itemMapSchema)
4217
+ });
4218
+
4219
+ // lib/items/models/ItemSearchView.ts
4220
+ var itemSearchViewSchema = z.object({
4221
+ itemTable: itemTableSchema,
4222
+ hasNext: z.boolean(),
4223
+ count: z.number()
4224
+ });
4225
+
4226
+ // lib/asstClient.ts
4227
+ var import_ky_universal = __toESM(require("ky-universal"), 1);
4228
+ var baseUrlsSchema = z.object({
4229
+ local: z.literal("https://localhost:8443"),
4230
+ test: z.literal("https://integration.api.spscommerce.com/assortment/gateway"),
4231
+ prod: z.literal("https://api.spscommerce.com/assortment/gateway")
4232
+ });
4233
+ var BASE_URLS = {
4234
+ local: "https://localhost:8443",
4235
+ test: "https://integration.api.spscommerce.com/assortment/gateway",
4236
+ prod: "https://api.spscommerce.com/assortment/gateway"
4237
+ };
4238
+ var envSchema = baseUrlsSchema.keyof();
4239
+ var initialConfig = {
4240
+ prefixUrl: BASE_URLS["test"],
4241
+ retry: 0
4242
+ };
4243
+
4244
+ // lib/exports/models/ExportType.ts
4245
+ var exportTypeEnum = z.enum(["ALL", "UPDATES", "DELTAS_UPDATE", "NO_BUYER_PART_NUMBER"]);
4246
+
4247
+ // lib/exports/models/ExportFrequency.ts
4248
+ var exportFrequencyEnum = z.enum([
4249
+ "IMMEDIATE",
4250
+ "ONETIME",
4251
+ "DAILY",
4252
+ "WEEKLY",
4253
+ "MONTHLY"
4254
+ ]);
4255
+
4256
+ // lib/exports/models/ExportDayOfWeek.ts
4257
+ var exportDayOfWeekEnum = z.enum([
4258
+ "MON",
4259
+ "TUE",
4260
+ "WED",
4261
+ "THU",
4262
+ "FRI",
4263
+ "SAT",
4264
+ "SUN"
4265
+ ]);
4266
+
4267
+ // lib/exports/models/Export.ts
4268
+ var exportSchema = z.object({
4269
+ exportName: z.string(),
4270
+ exportDescription: z.string(),
4271
+ isActive: z.boolean(),
4272
+ exportType: exportTypeEnum,
4273
+ exportFrequency: exportFrequencyEnum,
4274
+ includeValidAttributes: z.optional(z.boolean()),
4275
+ dayOfMonth: z.optional(z.number()),
4276
+ dayOfWeek: z.optional(exportDayOfWeekEnum),
4277
+ hourOfDay: z.optional(z.number()),
4278
+ date: z.optional(z.string()),
4279
+ catalogIds: z.optional(z.array(z.number())),
4280
+ itemInfoIds: z.optional(z.array(z.number())),
4281
+ excludeItemInfoIds: z.optional(z.array(z.number())),
4282
+ selectionCodeIds: z.optional(z.array(z.number())),
4283
+ productCodeIds: z.optional(z.array(z.number())),
4284
+ productTypes: z.optional(z.array(z.string())),
4285
+ deliveryType: z.optional(z.string()),
4286
+ spreadsheetTemplateId: z.optional(z.number()),
4287
+ emailAddresses: z.optional(z.array(z.string())),
4288
+ subjectLine: z.optional(z.string()),
4289
+ additionalLocales: z.optional(z.array(z.string()))
4290
+ });
4291
+
4292
+ // lib/exports/models/DownloadItemsParams.ts
4293
+ var downLoadItemsParamsSchema = z.object({
4294
+ "multi-sheet": z.boolean(),
4295
+ ids: z.array(z.string())
4296
+ });
4297
+
4298
+ // lib/attributes/models/AttributeMetaData.ts
4299
+ var attributeMetaDataSchema = z.object({
4300
+ dbName: z.string(),
4301
+ label: z.string(),
4302
+ group: z.string(),
4303
+ aliases: z.array(z.string()),
4304
+ orderBy: z.string().or(z.number()),
4305
+ type: z.string(),
4306
+ storageType: z.string(),
4307
+ rsxPath: z.string(),
4308
+ indexed: z.boolean(),
4309
+ repeatable: z.boolean(),
4310
+ extended: z.boolean(),
4311
+ hybrid: z.boolean(),
4312
+ userVisible: z.boolean(),
4313
+ retailerOwnedId: z.number().nullish()
4314
+ });
4315
+
4316
+ // lib/attributes/models/AttributeSummary.ts
4317
+ var attributeSummarySchema = z.object({
4318
+ attributeId: z.number(),
4319
+ attributeName: z.string(),
4320
+ displayName: z.string(),
4321
+ modifiedBy: z.string(),
4322
+ modifiedDate: z.number(),
4323
+ retailerOwnedId: z.number().nullish(),
4324
+ clusterAttrGroupId: z.number().nullish(),
4325
+ attributeType: z.string()
4326
+ });
4327
+
4328
+ // lib/attributes/models/AttributesByCompany.ts
4329
+ var attributesByCompanySchema = z.object({
4330
+ next: z.string().nullish(),
4331
+ previous: z.string().nullish(),
4332
+ count: z.number(),
4333
+ results: z.array(attributeSummarySchema)
4334
+ });
4335
+
4336
+ // lib/attributes/models/AttrDatatypeNameEnum.ts
4337
+ var attrDatatypeNameEnumSchema = z.enum([
4338
+ "TEXT",
4339
+ "SET",
4340
+ "INTEGER",
4341
+ "FLOAT",
4342
+ "BOOLEAN",
4343
+ "DATE",
4344
+ "KEYVALUE",
4345
+ "STRING",
4346
+ "REAL"
4347
+ ]);
4348
+
4349
+ // lib/attributes/models/AttributeGroup.ts
4350
+ var attributeGroupSchema = z.object({
4351
+ attrGroupId: z.number(),
4352
+ attrGroupType: z.object({
4353
+ attrGroupTypeId: z.number(),
4354
+ groupTypeName: z.string(),
4355
+ primary: z.boolean(),
4356
+ restricted: z.boolean()
4357
+ }),
4358
+ attrGroupTypeId: z.number(),
4359
+ groupName: z.string(),
4360
+ isDefault: z.boolean(),
4361
+ orderWeight: z.number(),
4362
+ primary: z.boolean()
4363
+ });
4364
+
4365
+ // lib/attributes/models/AttributeDefinition.ts
4366
+ var parentAttributeSchema = z.object({
4367
+ attrDataTypeId: z.number(),
4368
+ attrDatatype: z.object({
4369
+ attrDatatypeId: z.number(),
4370
+ datatypeName: attrDatatypeNameEnumSchema,
4371
+ displayOnly: z.boolean()
4372
+ }),
4373
+ attrGroupId: z.number(),
4374
+ attrGroups: z.array(attributeGroupSchema),
4375
+ attrRoundId: z.number(),
4376
+ attrStorageId: z.number(),
4377
+ attributeId: z.number(),
4378
+ attributeName: z.string(),
4379
+ createdBy: z.string(),
4380
+ createdDate: z.number(),
4381
+ description: z.string().optional(),
4382
+ displayName: z.string(),
4383
+ modifiedDate: z.number(),
4384
+ orderWeight: z.number(),
4385
+ parentAttributeId: z.number().optional(),
4386
+ primaryAttrGroup: attributeGroupSchema
4387
+ });
4388
+ var attributeDefinitionSchema = z.object({
4389
+ attrDataTypeId: z.number(),
4390
+ attrDatatype: z.object({
4391
+ attrDatatypeId: z.number(),
4392
+ datatypeName: attrDatatypeNameEnumSchema,
4393
+ displayOnly: z.boolean()
4394
+ }),
4395
+ attrGroupId: z.number(),
4396
+ attrGroups: z.array(attributeGroupSchema),
4397
+ attrRestrictions: z.array(
4398
+ z.object({
4399
+ attrRestrictId: z.number(),
4400
+ ignoreGlobal: z.boolean().optional(),
4401
+ isDefault: z.boolean(),
4402
+ isEssential: z.boolean(),
4403
+ locale: z.string(),
4404
+ mandatory: z.boolean(),
4405
+ repeatable: z.boolean(),
4406
+ minLength: z.number().optional(),
4407
+ maxLength: z.number().optional()
4408
+ })
4409
+ ),
4410
+ attrRoundId: z.number(),
4411
+ attrStorage: z.object({
4412
+ attrStorageId: z.number(),
4413
+ storageName: z.string()
4414
+ }),
4415
+ attrStorageId: z.number(),
4416
+ attrValues: z.array(
4417
+ z.object({
4418
+ attrKeyPair: z.string(),
4419
+ attrValueId: z.number().optional(),
4420
+ isDefault: z.boolean(),
4421
+ locale: z.string(),
4422
+ value: z.string()
4423
+ })
4424
+ ).optional(),
4425
+ attributeId: z.number(),
4426
+ attributeName: z.string(),
4427
+ createdBy: z.string(),
4428
+ createdDate: z.number(),
4429
+ description: z.string().optional(),
4430
+ displayName: z.string(),
4431
+ modifiedDate: z.number(),
4432
+ orderWeight: z.number().optional(),
4433
+ parentAttribute: parentAttributeSchema.optional(),
4434
+ parentAttributeId: z.number().optional(),
4435
+ primaryAttrGroup: attributeGroupSchema
4436
+ });
4437
+
4438
+ // lib/attributes/models/AttributeValidValues.ts
4439
+ var attributeValidValuesSchema = z.object({
4440
+ value: z.string(),
4441
+ isDefault: z.boolean(),
4442
+ locale: z.string(),
4443
+ createdBy: z.string(),
4444
+ createdDate: z.number(),
4445
+ modifiedDate: z.number(),
4446
+ modifiedBy: z.string(),
4447
+ attributeId: z.number(),
4448
+ attrValueId: z.number(),
4449
+ attrKeyPair: z.string()
4450
+ });
4451
+
4452
+ // lib/locale/models/Locale.ts
4453
+ var localeSchema = z.object({
4454
+ localeCode: z.string(),
4455
+ localeDescription: z.string()
4456
+ });
4457
+
4458
+ // lib/spreadsheetTemplate/models/SpreadsheetTemplateCompany.ts
4459
+ var spreadsheetTemplateCompanySchema = z.object({
4460
+ companyName: z.string(),
4461
+ companyId: z.number(),
4462
+ createdAt: z.number()
4463
+ });
4464
+
4465
+ // lib/spreadsheetTemplate/models/SpreadsheetTemplate.ts
4466
+ var spreadsheetTemplateSchema = z.object({
4467
+ id: z.number(),
4468
+ fileLocation: z.string(),
4469
+ name: z.string(),
4470
+ templateType: z.string(),
4471
+ maxItemsPerDoc: z.number(),
4472
+ companies: z.array(spreadsheetTemplateCompanySchema),
4473
+ createdBy: z.string().nullish(),
4474
+ createdAt: z.number().nullish(),
4475
+ modifiedBy: z.string().nullish(),
4476
+ modifiedAt: z.number().nullish()
4477
+ });
4478
+
4479
+ // lib/items/models/AttributeDetail.ts
4480
+ var attributeDetailSchema = z.object({
4481
+ type: attrDatatypeNameEnumSchema,
4482
+ name: z.string(),
4483
+ value: z.string().or(z.number()).or(z.array(z.string())).or(z.array(z.number())).nullable(),
4484
+ label: z.string(),
4485
+ group: z.string(),
4486
+ orderBy: z.number().or(z.string()).nullish()
4487
+ });
4488
+
4489
+ // lib/items/models/CategoryEnum.ts
4490
+ var categoryEnumSchema = z.enum([
4491
+ "AKA",
4492
+ "CATALOG",
4493
+ "EXPORT",
4494
+ "LABEL",
4495
+ "LEGACY_PRODUCT_TYPE",
4496
+ "PRODUCT_CLASSIFICATION",
4497
+ "PRODUCT_CODE",
4498
+ "SELECTION_CODE",
4499
+ "TAXONOMY_ROOT"
4500
+ ]);
4501
+
4502
+ // lib/items/models/ComponentDetails.ts
4503
+ var componentDetailsSchema = z.object({
4504
+ itemInfoId: z.number(),
4505
+ description: z.string(),
4506
+ saleable: z.boolean(),
4507
+ valid: z.boolean(),
4508
+ uniqueCriteria: z.array(
4509
+ z.object({
4510
+ name: z.string(),
4511
+ value: z.string()
4512
+ })
4513
+ )
4514
+ });
4515
+
4516
+ // lib/items/models/RepeatableGroup.ts
4517
+ var repeatableGroupSchema = z.object({
4518
+ repeatableGroupId: z.string(),
4519
+ repeatableNumber: z.number()
4520
+ });
4521
+
4522
+ // lib/items/models/GroupedAttributeList.ts
4523
+ var groupedAttributeListSchema = z.object({
4524
+ type: z.string(),
4525
+ rows: z.array(z.array(attributeDetailSchema)),
4526
+ repeatableGroups: z.array(repeatableGroupSchema)
4527
+ });
4528
+
4529
+ // lib/items/models/GroupedAttributes.ts
4530
+ var groupedAttributesSchema = z.object({
4531
+ type: z.string(),
4532
+ attributes: z.array(attributeDetailSchema),
4533
+ attributeGroups: z.array(groupedAttributeListSchema)
4534
+ });
4535
+
4536
+ // lib/items/models/HierarchyCategory.ts
4537
+ var hierarchyCategorySchema = z.object({
4538
+ name: z.string(),
4539
+ description: z.string().nullish(),
4540
+ id: z.number(),
4541
+ companyId: z.number(),
4542
+ type: categoryEnumSchema
4543
+ });
4544
+
4545
+ // lib/items/models/HierarchyDetails.ts
4546
+ var hierarchyDetailsSchema = z.object({
4547
+ catalogs: z.array(hierarchyCategorySchema),
4548
+ selectionCodes: z.array(hierarchyCategorySchema),
4549
+ productCodes: z.array(hierarchyCategorySchema)
4550
+ });
4551
+
4552
+ // lib/items/models/PackComponentItemInfo.ts
4553
+ var packComponentItemInfoSchema = z.object({
4554
+ companyid: z.number(),
4555
+ createddate: z.number(),
4556
+ isServiceApi: z.boolean(),
4557
+ isactive: z.number(),
4558
+ isvalid: z.number(),
4559
+ itemType: z.string(),
4560
+ iteminfoid: z.number(),
4561
+ itemtimestamp: z.number(),
4562
+ serviceId: z.number(),
4563
+ attributes: z.record(z.string(), z.string().or(z.array(z.string())))
4564
+ });
4565
+
4566
+ // lib/items/models/ItemPrice.ts
4567
+ var itemPriceSchema = z.object({
4568
+ amount: z.number(),
4569
+ currency: z.string(),
4570
+ id: z.number().nullish(),
4571
+ priceDivision: z.string().nullish(),
4572
+ iteminfoid: z.number().nullish(),
4573
+ startdate: z.string().nullish(),
4574
+ enddate: z.string().nullish(),
4575
+ qualifier: z.string(),
4576
+ region: z.string().nullish(),
4577
+ regionqualifier: z.string().nullish(),
4578
+ regiondescription: z.string().nullish(),
4579
+ partnercompanyid: z.string().nullish(),
4580
+ itempricetimestamp: z.number().nullish(),
4581
+ range_type: z.string().nullish(),
4582
+ date_range_type: z.string().nullish(),
4583
+ min_range: z.number().nullish(),
4584
+ gtin: z.string().nullish(),
4585
+ priceConditionDescription: z.string().nullish(),
4586
+ priceUnitQuantity: z.number().nullish(),
4587
+ priceUnitQuantityUOM: z.string().nullish()
4588
+ });
4589
+
4590
+ // lib/items/models/PackComponentDetails.ts
4591
+ var packComponentDetailsSchema = z.object({
4592
+ itemInfo: packComponentItemInfoSchema,
4593
+ itemPrices: z.array(itemPriceSchema)
4594
+ });
4595
+
4596
+ // lib/items/models/GroupedItem.ts
4597
+ var groupedItemSchema = z.object({
4598
+ iteminfoid: z.number(),
4599
+ companyid: z.number(),
4600
+ status: z.string(),
4601
+ createdDate: z.string(),
4602
+ lastUpdatedDate: z.string(),
4603
+ identifiers: z.record(z.string(), z.any()),
4604
+ hierarchyDetails: hierarchyDetailsSchema,
4605
+ groupedAttributes: z.array(groupedAttributesSchema),
4606
+ packComponentDetails: z.array(packComponentDetailsSchema),
4607
+ childComponentDetails: z.array(componentDetailsSchema),
4608
+ parentComponentDetails: z.array(componentDetailsSchema),
4609
+ locales: z.array(z.string())
4610
+ });
4611
+
4612
+ // lib/items/models/ItemDetailView.ts
4613
+ var itemDetailViewSchema = z.object({
4614
+ item: groupedItemSchema
4615
+ });
4616
+
4617
+ // lib/items/models/Bulb.ts
4618
+ var bulbSchema = z.object({
4619
+ iteminfoid: z.number(),
4620
+ id: z.number(),
4621
+ shape: z.string(),
4622
+ position: z.number(),
4623
+ quantity: z.number(),
4624
+ basetype: z.string(),
4625
+ maxwatt: z.number(),
4626
+ createdat: z.string(),
4627
+ modifiedat: z.string(),
4628
+ bulbtype: z.string(),
4629
+ bulbincluded: z.string(),
4630
+ bulbsize: z.string(),
4631
+ replacementbulb: z.string(),
4632
+ threewaybulb: z.string()
4633
+ });
4634
+
4635
+ // lib/items/models/PackComponent.ts
4636
+ var packComponentSchema = z.object({
4637
+ itemInfoId: z.number().nullish(),
4638
+ attributes: z.record(z.string(), z.string().or(z.array(z.string()))),
4639
+ prices: z.array(itemPriceSchema)
4640
+ });
4641
+
4642
+ // lib/items/models/MediaItem.ts
4643
+ var mediaItemSchema = z.object({
4644
+ id: z.number(),
4645
+ iteminfoid: z.number(),
4646
+ medianame: z.string(),
4647
+ height: z.number().nullish(),
4648
+ filename: z.string(),
4649
+ mediafilename: z.string().nullish(),
4650
+ description: z.string().nullish(),
4651
+ filesize: z.number().nullish(),
4652
+ format: z.string().nullish(),
4653
+ orientation: z.string().nullish(),
4654
+ pixeldensity: z.string().nullish(),
4655
+ purpose: z.string().nullish(),
4656
+ width: z.number().nullish(),
4657
+ mediatype: z.string(),
4658
+ mediaviewtype: z.string().nullish(),
4659
+ compressionquality: z.string().nullish(),
4660
+ thumbnailflag: z.string().nullish()
4661
+ });
4662
+
4663
+ // lib/items/models/ItemDetail.ts
4664
+ var itemDetailSchema = z.object({
4665
+ attributes: z.record(z.string(), z.any()),
4666
+ clusters: z.record(
4667
+ z.string(),
4668
+ z.array(
4669
+ z.object({
4670
+ itemInfoAttributes: z.record(
4671
+ z.string(),
4672
+ z.string().or(z.number()).or(z.boolean())
4673
+ )
4674
+ })
4675
+ )
4676
+ ),
4677
+ prices: z.array(itemPriceSchema),
4678
+ bulbs: z.array(bulbSchema),
4679
+ media: z.array(mediaItemSchema),
4680
+ packs: z.array(packComponentSchema)
4681
+ });
4682
+
4683
+ // lib/errors/models/ItemErrorDetails.ts
4684
+ var itemErrorDetailsSchema = z.object({
4685
+ errorMessage: z.string(),
4686
+ attributeName: z.string(),
4687
+ tradingPartnerNames: z.array(z.string()),
4688
+ phases: z.array(phaseEnumSchema),
4689
+ attributeDbNames: z.array(z.string()),
4690
+ tradingPartnerStages: z.array(tradingPartnerStageSchema),
4691
+ repeatableGroupId: z.string().nullish()
4692
+ });
4693
+
4694
+ // lib/errors/models/ItemErrorDetailsResult.ts
4695
+ var itemErrorDetailsResultSchema = z.object({
4696
+ itemInfoId: z.number(),
4697
+ upc: z.string().nullish(),
4698
+ isbn: z.string().nullish(),
4699
+ gtin: z.string().nullish(),
4700
+ partnumber: z.string().nullish(),
4701
+ ean: z.string().nullish(),
4702
+ itemName: z.string().nullable(),
4703
+ itemErrorDetails: z.array(itemErrorDetailsSchema)
4704
+ });
4705
+
4706
+ // lib/errors/index.ts
4707
+ var BASE_URL7 = "errors";
4708
+
4709
+ // lib/errors/mockHandlers.ts
4710
+ function createErrorsApiHandlers(client) {
4711
+ function getInvalidItemErrorDetails(resolver = (_req, res, ctx) => {
4712
+ const data = (0, import_zod_mock6.generateMock)(itemErrorDetailsResultSchema);
4713
+ return res(ctx.status(200), ctx.json(data));
4714
+ }) {
4715
+ return import_msw7.rest.get(`${client.getBaseUrl()}/${BASE_URL7}/items/:itemInfoId`, resolver);
4716
+ }
4717
+ getInvalidItemErrorDetails.generateData = () => (0, import_zod_mock6.generateMock)(itemErrorDetailsResultSchema);
4718
+ return {
4719
+ getInvalidItemErrorDetails
4720
+ };
4721
+ }
4722
+
4723
+ // lib/locale/mockHandlers.ts
4724
+ var import_msw8 = require("msw");
4725
+
4726
+ // lib/locale/index.ts
4727
+ var BASE_URL8 = "locale";
4728
+
4729
+ // lib/locale/mockHandlers.ts
4730
+ var import_zod_mock7 = require("@anatine/zod-mock");
4731
+ function createLocaleApiHandlers(client) {
4732
+ function getLocale(resolver = (_req, res, ctx) => {
4733
+ const data = (0, import_zod_mock7.generateMock)(z.array(localeSchema));
4734
+ return res(ctx.status(200), ctx.json(data));
4735
+ }) {
4736
+ return import_msw8.rest.get(`${client.getBaseUrl()}/${BASE_URL8}`, resolver);
4737
+ }
4738
+ getLocale.generateData = () => (0, import_zod_mock7.generateMock)(z.array(localeSchema));
4739
+ return {
4740
+ getLocale
4741
+ };
4742
+ }
4743
+
4744
+ // lib/items/mockHandlers.ts
4745
+ var import_zod_mock8 = require("@anatine/zod-mock");
4746
+ var import_msw9 = require("msw");
4747
+
4748
+ // lib/items/index.ts
4749
+ var BASE_URL9 = "items";
4750
+
4751
+ // lib/items/mockHandlers.ts
4752
+ function createItemsApiHandlers(client) {
4753
+ function searchItems(resolver = (_req, res, ctx) => {
4754
+ const data = (0, import_zod_mock8.generateMock)(itemSearchViewSchema);
4755
+ return res(ctx.status(200), ctx.json(data));
4756
+ }) {
4757
+ return import_msw9.rest.get(`${client.getBaseUrl()}/${BASE_URL9}`, resolver);
4758
+ }
4759
+ searchItems.generateData = () => (0, import_zod_mock8.generateMock)(itemSearchViewSchema);
4760
+ function getItem(resolver = (_req, res, ctx) => {
4761
+ const data = (0, import_zod_mock8.generateMock)(itemDetailViewSchema);
4762
+ return res(ctx.status(200), ctx.json(data));
4763
+ }) {
4764
+ return import_msw9.rest.get(
4765
+ `${client.getBaseUrl()}/${BASE_URL9}/:itemId`,
4766
+ resolver
4767
+ );
4768
+ }
4769
+ getItem.generateData = () => (0, import_zod_mock8.generateMock)(itemDetailViewSchema);
4770
+ function updateItem(resolver = (_req, res, ctx) => {
4771
+ return res(ctx.status(200));
4772
+ }) {
4773
+ return import_msw9.rest.put(
4774
+ `${client.getBaseUrl()}/${BASE_URL9}/details/:itemId`,
4775
+ resolver
4776
+ );
4777
+ }
4778
+ function deleteItem(resolver = (_req, res, ctx) => {
4779
+ return res(ctx.status(200));
4780
+ }) {
4781
+ return import_msw9.rest.post(`${client.getBaseUrl()}/${BASE_URL9}/:itemId`, resolver);
4782
+ }
4783
+ function deleteItems(resolver = (_req, res, ctx) => {
4784
+ return res(ctx.status(200));
4785
+ }) {
4786
+ return import_msw9.rest.post(`${client.getBaseUrl()}/${BASE_URL9}/items`, resolver);
4787
+ }
4788
+ return { searchItems, getItem, updateItem, deleteItem, deleteItems };
4789
+ }
4790
+
4791
+ // lib/attributes/mockHandlers.ts
4792
+ var import_msw10 = require("msw");
4793
+
4794
+ // lib/attributes/index.ts
4795
+ var BASE_URL10 = "attributes";
4796
+
4797
+ // lib/attributes/mockHandlers.ts
4798
+ var import_zod_mock9 = require("@anatine/zod-mock");
4799
+ function createAttributesApiHandlers(client) {
4800
+ function getAllAttributes(resolver = (_req, res, ctx) => {
4801
+ const data = (0, import_zod_mock9.generateMock)(z.array(attributeMetaDataSchema));
4802
+ return res(ctx.status(200), ctx.json(data));
4803
+ }) {
4804
+ return import_msw10.rest.get(`${client.getBaseUrl()}/${BASE_URL10}`, resolver);
4805
+ }
4806
+ getAllAttributes.generateData = () => (0, import_zod_mock9.generateMock)(attributeMetaDataSchema);
4807
+ function getAllAttributesByCompany(resolver = (_req, res, ctx) => {
4808
+ const data = (0, import_zod_mock9.generateMock)(attributesByCompanySchema);
4809
+ return res(ctx.status(200), ctx.json(data));
4810
+ }) {
4811
+ return import_msw10.rest.get(`${client.getBaseUrl()}/${BASE_URL10}/company`, resolver);
4812
+ }
4813
+ getAllAttributesByCompany.generateData = () => (0, import_zod_mock9.generateMock)(attributesByCompanySchema);
4814
+ function getAttributesExtensiveInfo(resolver = (_req, res, ctx) => {
4815
+ const data = (0, import_zod_mock9.generateMock)(z.array(attributeDefinitionSchema));
4816
+ return res(ctx.status(200), ctx.json(data));
4817
+ }) {
4818
+ return import_msw10.rest.get(
4819
+ `${client.getBaseUrl()}/${BASE_URL10}/registry/editui`,
4820
+ resolver
4821
+ );
4822
+ }
4823
+ getAttributesExtensiveInfo.generateData = () => (0, import_zod_mock9.generateMock)(z.array(attributeDefinitionSchema));
4824
+ function getAttributeValidValues(resolver = (_req, res, ctx) => {
4825
+ const data = (0, import_zod_mock9.generateMock)(z.array(attributeValidValuesSchema));
4826
+ return res(ctx.status(200), ctx.json(data));
4827
+ }) {
4828
+ return import_msw10.rest.get(
4829
+ `${client.getBaseUrl()}/${BASE_URL10}/registry/attribute/:attributeDbName/values`,
4830
+ resolver
4831
+ );
4832
+ }
4833
+ getAttributeValidValues.generateData = () => (0, import_zod_mock9.generateMock)(z.array(attributeValidValuesSchema));
4834
+ return {
4835
+ getAllAttributes,
4836
+ getAllAttributesByCompany,
4837
+ getAttributesExtensiveInfo,
4838
+ getAttributeValidValues
4839
+ };
4840
+ }
4841
+
4842
+ // lib/spreadsheetTemplate/mockHandlers.ts
4843
+ var import_msw11 = require("msw");
4844
+
4845
+ // lib/spreadsheetTemplate/index.ts
4846
+ var BASE_URL11 = "templates";
4847
+
4848
+ // lib/spreadsheetTemplate/mockHandlers.ts
4849
+ var import_zod_mock10 = require("@anatine/zod-mock");
4850
+ function createSpreadsheetTemplateApiHandlers(client) {
4851
+ function getTemplates(resolver = (_req, res, ctx) => {
4852
+ const data = (0, import_zod_mock10.generateMock)(z.array(spreadsheetTemplateSchema));
4853
+ return res(ctx.status(200), ctx.json(data));
4854
+ }) {
4855
+ return import_msw11.rest.get(`${client.getBaseUrl()}/${BASE_URL11}`, resolver);
4856
+ }
4857
+ getTemplates.generateData = () => (0, import_zod_mock10.generateMock)(z.array(spreadsheetTemplateSchema));
4858
+ return {
4859
+ getTemplates
4860
+ };
4861
+ }
4862
+
4863
+ // lib/companyFeatures/mockHandlers.ts
4864
+ var import_zod_mock11 = require("@anatine/zod-mock");
4865
+ var import_msw12 = require("msw");
4866
+
4867
+ // lib/companyFeatures/index.ts
4868
+ var BASE_URL12 = "feature";
4869
+
4870
+ // lib/companyFeatures/mockHandlers.ts
4871
+ function createCompanyFeaturesApiHandlers(client) {
4872
+ function checkIfStageItemSetupIsEnabled(resolver = (_req, res, ctx) => {
4873
+ const data = (0, import_zod_mock11.generateMock)(z.boolean());
4874
+ return res(ctx.status(200), ctx.json(data));
4875
+ }) {
4876
+ return import_msw12.rest.get(
4877
+ `${client.getBaseUrl()}/${BASE_URL12}/isphaseditemsetupenabled`,
4878
+ resolver
4879
+ );
4880
+ }
4881
+ return {
4882
+ checkIfStageItemSetupIsEnabled
4883
+ };
4884
+ }
4029
4885
  // Annotate the CommonJS export names for ESM import in node:
4030
4886
  0 && (module.exports = {
4887
+ createAttributesApiHandlers,
4031
4888
  createCategoriesApiHandlers,
4889
+ createCompanyFeaturesApiHandlers,
4890
+ createErrorsApiHandlers,
4032
4891
  createExportsApiHandlers,
4033
4892
  createImportsApiHandlers,
4893
+ createItemsApiHandlers,
4894
+ createLocaleApiHandlers,
4034
4895
  createProductTypesApiHandlers,
4035
- createTradingPartnerAccessApiHandlers
4896
+ createSpreadsheetTemplateApiHandlers,
4897
+ createTradingPartnerAccessApiHandlers,
4898
+ createWhoAmIApiHandlers
4036
4899
  });