@spscommerce/asst-api 4.3.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,16 +1,19 @@
1
1
  import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse } from './SpsItemIdResponse-s0vCXepG.js';
2
2
  export { a as AsstClientOptions, b as AsstUrl, B as BASE_URLS, E as Env, e as envSchema } from './SpsItemIdResponse-s0vCXepG.js';
3
- import { I as Import, a as ImportsStatus, V as VendorPartnerAttGroups, G as GenerateImportTemplateParams, E as Export, D as DownLoadItemsParams, A as AttrProdType, T as TradingPartnerAccessByCompanyId, C as CompanyRelationshipUpsertBody, b as ItemPartner, c as ItemCategoriesSearch, L as Locale, S as SpreadsheetTemplate, U as UserAccount, d as ItemSearchView, e as ItemDetailView, f as ItemDetail, g as ItemErrorDetailsResult, h as ItemErrorSummaryResultV2, i as ItemErrorDetailsResultV2, j as CompanyBriefByOrg } from './zod-COyz02Lh.js';
4
- export { M as AttributeDetail, a1 as Bulb, N as CategoryEnum, O as ComponentDetails, r as Connection, o as ExportDayOfWeek, p as ExportFrequency, q as ExportType, Q as GroupedAttributeList, W as GroupedAttributes, X as GroupedItem, Y as HierarchyCategory, Z as HierarchyDetails, w as IdentityServiceDatetimePreferences, x as IdentityServiceOrganization, v as IdentityServiceOrganizationMetadata, y as IdentityServicePreferences, z as IdentityServiceUser, k as ImportDetails, l as ImportError, m as ImportErrors, n as ImportStatusEnum, t as ItemCategory, a5 as ItemErrorDetails, a7 as ItemErrorDetailsV2, a6 as ItemErrorSummaryV2, B as ItemHeader, F as ItemMap, _ as ItemPrice, H as ItemTable, a0 as MediaItem, P as PRODUCT_CODE_DEFAULT_VALUE, a2 as PackComponent, $ as PackComponentDetails, a4 as PackComponentItemInfo, J as PhaseEnum, R as RegisteredService, a3 as RepeatableGroup, s as SELECTION_CODE_DEFAULT_VALUE, u as SpreadsheetTemplateCompany, K as TradingPartnerStage, a8 as TradingPartnerStageV2 } from './zod-COyz02Lh.js';
3
+ import { I as Import, a as ImportsStatus, V as VendorPartnerAttGroups, G as GenerateImportTemplateParams, E as Export, D as DownLoadItemsParams, A as AttrProdType, T as TradingPartnerAccessByCompanyId, C as CompanyRelationshipUpsertBody, b as ItemPartner, c as ItemCategoriesSearch, L as Locale, S as SpreadsheetTemplate, U as UserAccount, d as ItemSearchView, e as ItemDetailView, f as ItemDetail, g as ItemErrorDetailsResult, h as ItemErrorSummaryResultV2, i as ItemErrorDetailsResultV2, j as CompanyBriefByOrg } from './zod-j6CrX5vY.js';
4
+ export { M as AttributeDetail, a1 as Bulb, N as CategoryEnum, O as ComponentDetails, r as Connection, o as ExportDayOfWeek, p as ExportFrequency, q as ExportType, Q as GroupedAttributeList, W as GroupedAttributes, X as GroupedItem, Y as HierarchyCategory, Z as HierarchyDetails, w as IdentityServiceDatetimePreferences, x as IdentityServiceOrganization, v as IdentityServiceOrganizationMetadata, y as IdentityServicePreferences, z as IdentityServiceUser, k as ImportDetails, l as ImportError, m as ImportErrors, n as ImportStatusEnum, t as ItemCategory, a5 as ItemErrorDetails, a7 as ItemErrorDetailsV2, a6 as ItemErrorSummaryV2, B as ItemHeader, F as ItemMap, _ as ItemPrice, H as ItemTable, a0 as MediaItem, P as PRODUCT_CODE_DEFAULT_VALUE, a2 as PackComponent, $ as PackComponentDetails, a4 as PackComponentItemInfo, J as PhaseEnum, R as RegisteredService, a3 as RepeatableGroup, s as SELECTION_CODE_DEFAULT_VALUE, u as SpreadsheetTemplateCompany, K as TradingPartnerStage, a8 as TradingPartnerStageV2 } from './zod-j6CrX5vY.js';
5
5
  import { z } from 'zod';
6
6
  import 'ky';
7
7
 
8
+ declare const companyTypeSchema: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
9
+ type CompanyType = z.infer<typeof companyTypeSchema>;
10
+
8
11
  /**
9
12
  * Initialize Imports Api functions
10
13
  * @param client Assortment Client instance
11
14
  * @returns An object containing Imports API functions
12
15
  */
13
- declare function createImportsApi(client: AsstClient): {
16
+ declare function createImportsApi(client: AsstClient, companyType?: CompanyType): {
14
17
  getImportErrors: (importId: string, params?: {
15
18
  offset?: number;
16
19
  limit?: number;
@@ -38,9 +41,10 @@ declare function createImportsApi(client: AsstClient): {
38
41
  /**
39
42
  * Initialize Exports Api functions
40
43
  * @param client Assortment Client instance
44
+ * @param companyType Company type for perspective
41
45
  * @returns An object containing Exports API functions
42
46
  */
43
- declare function createExportsApi(client: AsstClient): {
47
+ declare function createExportsApi(client: AsstClient, companyType?: CompanyType): {
44
48
  createExport: (data: Export, params?: {
45
49
  orgId?: string;
46
50
  }) => Promise<void>;
@@ -77,12 +81,100 @@ type RetailerTradingPartnerStages = z.infer<typeof retailerTradingPartnerStages>
77
81
  /**
78
82
  * Initialize Trading Partner Settings Api functions
79
83
  * @param client Assortment Client instance
84
+ * @param companyType Company type for perspective
80
85
  * @returns An object containing Trading Partner Settings API functions
81
86
  */
82
- declare function createTradingPartnerSettingsApi(client: AsstClient): {
87
+ declare function createTradingPartnerSettingsApi(client: AsstClient, companyType?: CompanyType): {
83
88
  getRetailerStages: (signal?: AbortSignal) => Promise<RetailerTradingPartnerStages>;
84
89
  };
85
90
 
91
+ /**
92
+ * Request payload for creating a new catalog
93
+ */
94
+ declare const catalogCreateRequestSchema: z.ZodObject<{
95
+ categoryName: z.ZodString;
96
+ categoryCompanyId: z.ZodNumber;
97
+ categoryTypeId: z.ZodNumber;
98
+ categoryDescription: z.ZodOptional<z.ZodString>;
99
+ }, "strip", z.ZodTypeAny, {
100
+ categoryName: string;
101
+ categoryCompanyId: number;
102
+ categoryTypeId: number;
103
+ categoryDescription?: string | undefined;
104
+ }, {
105
+ categoryName: string;
106
+ categoryCompanyId: number;
107
+ categoryTypeId: number;
108
+ categoryDescription?: string | undefined;
109
+ }>;
110
+ type CatalogCreateRequest = z.infer<typeof catalogCreateRequestSchema>;
111
+ /**
112
+ * Response from creating a new catalog
113
+ */
114
+ declare const catalogCreateResponseSchema: z.ZodObject<{
115
+ categoryId: z.ZodNumber;
116
+ }, "strip", z.ZodTypeAny, {
117
+ categoryId: number;
118
+ }, {
119
+ categoryId: number;
120
+ }>;
121
+ type CatalogCreateResponse = z.infer<typeof catalogCreateResponseSchema>;
122
+ /**
123
+ * Parameters for searching catalogs by company
124
+ */
125
+ declare const catalogSearchParamsSchema: z.ZodObject<{
126
+ ownerCompanyIds: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
127
+ searchTerms: z.ZodOptional<z.ZodString>;
128
+ categoryType: z.ZodLiteral<"CATALOG">;
129
+ }, "strip", z.ZodTypeAny, {
130
+ categoryType: "CATALOG";
131
+ ownerCompanyIds?: number[] | undefined;
132
+ searchTerms?: string | undefined;
133
+ }, {
134
+ categoryType: "CATALOG";
135
+ ownerCompanyIds?: number[] | undefined;
136
+ searchTerms?: string | undefined;
137
+ }>;
138
+ type CatalogSearchParams = z.infer<typeof catalogSearchParamsSchema>;
139
+ /**
140
+ * Brief catalog information returned from search
141
+ */
142
+ declare const catalogBriefResponseSchema: z.ZodObject<{
143
+ categoryId: z.ZodNumber;
144
+ categoryName: z.ZodString;
145
+ categoryDescription: z.ZodString;
146
+ categoryDescriptionExt: z.ZodString;
147
+ ownerCompanyId: z.ZodString;
148
+ categoryTypeId: z.ZodNumber;
149
+ createdAt: z.ZodString;
150
+ modifiedAt: z.ZodString;
151
+ createdBy: z.ZodString;
152
+ modifiedBy: z.ZodString;
153
+ }, "strip", z.ZodTypeAny, {
154
+ createdBy: string;
155
+ modifiedBy: string;
156
+ categoryName: string;
157
+ categoryTypeId: number;
158
+ categoryDescription: string;
159
+ categoryId: number;
160
+ categoryDescriptionExt: string;
161
+ ownerCompanyId: string;
162
+ createdAt: string;
163
+ modifiedAt: string;
164
+ }, {
165
+ createdBy: string;
166
+ modifiedBy: string;
167
+ categoryName: string;
168
+ categoryTypeId: number;
169
+ categoryDescription: string;
170
+ categoryId: number;
171
+ categoryDescriptionExt: string;
172
+ ownerCompanyId: string;
173
+ createdAt: string;
174
+ modifiedAt: string;
175
+ }>;
176
+ type CatalogBriefResponse = z.infer<typeof catalogBriefResponseSchema>;
177
+
86
178
  type CategoriesApi = {
87
179
  getCatalogs: (params?: {
88
180
  categoryName?: string;
@@ -100,6 +192,11 @@ type CategoriesApi = {
100
192
  orgId?: string;
101
193
  }, signal?: AbortSignal) => Promise<ItemCategoriesSearch>;
102
194
  getItemHierarchy: (itemIds: string[]) => Promise<ItemHierarchyResponse>;
195
+ createCatalog: (params: CatalogCreateRequest, signal?: AbortSignal) => Promise<CatalogCreateResponse>;
196
+ searchCatalogsByCompany: (params: CatalogSearchParams, signal?: AbortSignal) => Promise<CatalogBriefResponse[]>;
197
+ createCategoryHierarchy: (params?: {
198
+ orgId?: string;
199
+ }) => Promise<string[]>;
103
200
  };
104
201
  /**
105
202
  * Initialize Categories Api functions
@@ -143,9 +240,10 @@ type ApplicationType = z.infer<typeof applicationTypeSchema>;
143
240
  /**
144
241
  * Initialize Company Features Api functions
145
242
  * @param client Assortment Client instance
243
+ * @param companyType Company type for perspective on hybrid organisations
146
244
  * @returns An object containing Company Features API functions
147
245
  */
148
- declare function createCompanyFeaturesApi(client: AsstClient): {
246
+ declare function createCompanyFeaturesApi(client: AsstClient, companyType?: CompanyType): {
149
247
  checkIfStageItemSetupIsEnabled: (signal?: AbortSignal) => Promise<boolean>;
150
248
  };
151
249
 
@@ -162,6 +260,7 @@ declare function createFeatureFlagsApi(client: AsstClient): {
162
260
  checkEnableItemsLevelMSIS: (signal?: AbortSignal) => Promise<boolean>;
163
261
  checkIfEnabledForPackagingHierarchies: (signal?: AbortSignal) => Promise<boolean>;
164
262
  checkIfEnabledForItemUomConversionRules: (flagOptions?: FlagOptions) => Promise<boolean>;
263
+ checkIfItemMatchEnabled: (flagOptions?: FlagOptions) => Promise<boolean>;
165
264
  };
166
265
 
167
266
  declare const itemStatusResponseSchema: z.ZodObject<{
@@ -365,9 +464,10 @@ type ItemsApi = {
365
464
  /**
366
465
  * Initialize Items Api functions
367
466
  * @param client Assortment Client instance
467
+ * @param companyType Optional company type eg "RETAILER" | "SUPPLIER"
368
468
  * @returns An object containing Items API functions
369
469
  */
370
- declare function createItemsApi(client: AsstClient): ItemsApi;
470
+ declare function createItemsApi(client: AsstClient, companyType?: CompanyType): ItemsApi;
371
471
 
372
472
  declare const itemOrgStageDetailsSchema: z.ZodObject<{
373
473
  /**
@@ -665,18 +765,20 @@ type Stage = z.infer<typeof stageSchema>;
665
765
  /**
666
766
  * Initialize Items Api functions
667
767
  * @param client Assortment Client instance
768
+ * @param companyType Company type for perspective
668
769
  * @returns An object containing Items API functions
669
770
  */
670
- declare function createItemsApiV2(client: AsstClient): {
771
+ declare function createItemsApiV2(client: AsstClient, companyType?: CompanyType): {
671
772
  getItemStatus: (itemIds: string[]) => Promise<ItemStatusV2Response>;
672
773
  };
673
774
 
674
775
  /**
675
776
  * Initialize Errors Api functions
676
777
  * @param client Assortment Client instance
778
+ * @param companyType Company type for perspective
677
779
  * @returns An object containing Errors API functions
678
780
  */
679
- declare function createErrorsApi(client: AsstClient): {
781
+ declare function createErrorsApi(client: AsstClient, companyType?: CompanyType): {
680
782
  getInvalidItemErrorDetails: (itemInfoId: string, signal?: AbortSignal) => Promise<ItemErrorDetailsResult>;
681
783
  };
682
784
 
@@ -692,9 +794,10 @@ type GetItemErrorSummaryParams = {
692
794
  /**
693
795
  * Initialize Errors Api functions
694
796
  * @param client Assortment Client instance
797
+ * @param companyType Company type for perspective
695
798
  * @returns An object containing Errors API functions
696
799
  */
697
- declare function createErrorsApiV2(client: AsstClient): {
800
+ declare function createErrorsApiV2(client: AsstClient, companyType?: CompanyType): {
698
801
  getItemErrorSummary: (params: GetItemErrorSummaryParams, signal?: AbortSignal) => Promise<ItemErrorSummaryResultV2>;
699
802
  getItemErrorDetails: (itemInfoId: number, signal?: AbortSignal) => Promise<ItemErrorDetailsResultV2>;
700
803
  };
@@ -702,12 +805,25 @@ declare function createErrorsApiV2(client: AsstClient): {
702
805
  declare const FlattenedItemIdentifierKeys: readonly ["eaneight", "upc", "ean", "gtin", "upcCaseCode", "buyerPartNumber", "partnumber", "isbn", "sku", "nationalDrugCode", "drugIdentificationNumber", "nationalHealthRelatedItemCode", "manufacturersPartNumber", "internationalStandardSerialNumber", "nabcaNumber", "erpId", "componentId"];
703
806
  type FlattenedItemIdentifiers = (typeof FlattenedItemIdentifierKeys)[number];
704
807
 
808
+ declare const uniqueCriteriaOptionsSchema: z.ZodArray<z.ZodObject<{
809
+ name: z.ZodString;
810
+ value: z.ZodString;
811
+ }, "strip", z.ZodTypeAny, {
812
+ value: string;
813
+ name: string;
814
+ }, {
815
+ value: string;
816
+ name: string;
817
+ }>, "many">;
818
+ type UniqueCriteriaOptions = z.infer<typeof uniqueCriteriaOptionsSchema>;
819
+
705
820
  /**
706
821
  * Initialize UniqueCriteria Api functions
707
822
  * @param client Assortment Client instance
708
823
  * @returns An object containing UniqueCriteria API functions
709
824
  */
710
825
  declare function createUniqueCriteriaApi(client: AsstClient): {
826
+ getUniqueCriteriaOptions: () => Promise<UniqueCriteriaOptions>;
711
827
  getUniqueCriteriaByOrg: (params?: {
712
828
  orgId?: string;
713
829
  }, signal?: AbortSignal) => Promise<string[]>;
@@ -727,4 +843,4 @@ declare function createCompaniesApi(client: AsstClient): {
727
843
  }, signal?: AbortSignal) => Promise<CompanyBriefByOrg>;
728
844
  };
729
845
 
730
- export { type ApplicationType, AsstClient, AttrProdType, type CategoriesApi, CompanyBriefByOrg, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, type FlagOptions, type FlattenedItemIdentifiers, GenerateImportTemplateParams, type GetItemErrorSummaryParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemErrorDetailsResultV2, ItemErrorSummaryResultV2, ItemHierarchyResponse, type ItemOrgStageDetails, type ItemOrgStatus, ItemPartner, ItemSearchView, type ItemStatus, type ItemStatusResponse, type ItemStatusV2, type ItemStatusV2Response, type ItemsApi, Locale, type OrgSummary, type RetailerTradingPartnerStages, SpreadsheetTemplate, SpsItemIdResponse, type Stage, TradingPartnerAccessByCompanyId, UserAccount, VendorPartnerAttGroups, createCategoriesApi, createCompaniesApi, createCompanyFeaturesApi, createErrorsApi, createErrorsApiV2, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
846
+ export { type ApplicationType, AsstClient, AttrProdType, type CategoriesApi, CompanyBriefByOrg, CompanyRelationshipUpsertBody, DownLoadItemsParams, Export, type FlagOptions, type FlattenedItemIdentifiers, GenerateImportTemplateParams, type GetItemErrorSummaryParams, Import, ImportsStatus, ItemCategoriesSearch, ItemDetail, ItemDetailView, ItemErrorDetailsResult, ItemErrorDetailsResultV2, ItemErrorSummaryResultV2, ItemHierarchyResponse, type ItemOrgStageDetails, type ItemOrgStatus, ItemPartner, ItemSearchView, type ItemStatus, type ItemStatusResponse, type ItemStatusV2, type ItemStatusV2Response, type ItemsApi, Locale, type OrgSummary, type RetailerTradingPartnerStages, SpreadsheetTemplate, SpsItemIdResponse, type Stage, TradingPartnerAccessByCompanyId, type UniqueCriteriaOptions, UserAccount, VendorPartnerAttGroups, createCategoriesApi, createCompaniesApi, createCompanyFeaturesApi, createErrorsApi, createErrorsApiV2, createExportsApi, createFeatureFlagsApi, createImportsApi, createItemsApi, createItemsApiV2, createLocaleApi, createProductTypesApi, createSpreadsheetTemplateApi, createTradingPartnerAccessApi, createTradingPartnerSettingsApi, createUniqueCriteriaApi, createWhoAmIApi };
package/dist/index.js CHANGED
@@ -16,16 +16,16 @@ import {
16
16
  createTradingPartnerSettingsApi,
17
17
  createUniqueCriteriaApi,
18
18
  createWhoAmIApi
19
- } from "./chunk-NFZI7D22.js";
19
+ } from "./chunk-V2XRXJIJ.js";
20
20
  import {
21
21
  AsstClient,
22
22
  BASE_URLS,
23
23
  envSchema
24
- } from "./chunk-55ECRTUX.js";
24
+ } from "./chunk-WODMKML4.js";
25
25
  import {
26
26
  PRODUCT_CODE_DEFAULT_VALUE,
27
27
  SELECTION_CODE_DEFAULT_VALUE
28
- } from "./chunk-LKUGPDIT.js";
28
+ } from "./chunk-YT2B4UAK.js";
29
29
  export {
30
30
  AsstClient,
31
31
  BASE_URLS,
package/dist/msw.cjs CHANGED
@@ -4269,6 +4269,34 @@ var itemHierarchyResponseSchema = external_exports.object({
4269
4269
  )
4270
4270
  });
4271
4271
 
4272
+ // lib/categories/models/CatalogManagement.ts
4273
+ var catalogCreateRequestSchema = external_exports.object({
4274
+ categoryName: external_exports.string(),
4275
+ categoryCompanyId: external_exports.number(),
4276
+ categoryTypeId: external_exports.number(),
4277
+ categoryDescription: external_exports.string().optional()
4278
+ });
4279
+ var catalogCreateResponseSchema = external_exports.object({
4280
+ categoryId: external_exports.number()
4281
+ });
4282
+ var catalogSearchParamsSchema = external_exports.object({
4283
+ ownerCompanyIds: external_exports.array(external_exports.number()).optional(),
4284
+ searchTerms: external_exports.string().optional(),
4285
+ categoryType: external_exports.literal("CATALOG")
4286
+ });
4287
+ var catalogBriefResponseSchema = external_exports.object({
4288
+ categoryId: external_exports.number(),
4289
+ categoryName: external_exports.string(),
4290
+ categoryDescription: external_exports.string(),
4291
+ categoryDescriptionExt: external_exports.string(),
4292
+ ownerCompanyId: external_exports.string(),
4293
+ categoryTypeId: external_exports.number(),
4294
+ createdAt: external_exports.string(),
4295
+ modifiedAt: external_exports.string(),
4296
+ createdBy: external_exports.string(),
4297
+ modifiedBy: external_exports.string()
4298
+ });
4299
+
4272
4300
  // lib/categories/index.ts
4273
4301
  var BASE_URL2 = "categories";
4274
4302
 
@@ -4314,9 +4342,31 @@ function createCategoriesApiHandlers(client) {
4314
4342
  );
4315
4343
  }
4316
4344
  getItemHierarchy.generateData = () => (0, import_zod_mock2.generateMock)(itemHierarchyResponseSchema);
4345
+ function createCatalog(resolver = (_info) => {
4346
+ const data = (0, import_zod_mock2.generateMock)(catalogCreateResponseSchema);
4347
+ return import_msw2.HttpResponse.json(data);
4348
+ }) {
4349
+ return import_msw2.http.post(`${client.getBaseUrl()}category`, resolver);
4350
+ }
4351
+ createCatalog.generateData = () => (0, import_zod_mock2.generateMock)(catalogCreateResponseSchema);
4352
+ function searchCatalogsByCompany(resolver = (_info) => {
4353
+ const data = Array.from(
4354
+ { length: 3 },
4355
+ () => (0, import_zod_mock2.generateMock)(catalogBriefResponseSchema)
4356
+ );
4357
+ return import_msw2.HttpResponse.json(data);
4358
+ }) {
4359
+ return import_msw2.http.get(
4360
+ `${client.getBaseUrl()}category/brief/CATALOG/search`,
4361
+ resolver
4362
+ );
4363
+ }
4364
+ searchCatalogsByCompany.generateData = () => Array.from({ length: 3 }, () => (0, import_zod_mock2.generateMock)(catalogBriefResponseSchema));
4317
4365
  return {
4318
4366
  getCategory,
4319
- getItemHierarchy
4367
+ getItemHierarchy,
4368
+ createCatalog,
4369
+ searchCatalogsByCompany
4320
4370
  };
4321
4371
  }
4322
4372
 
@@ -5392,11 +5442,27 @@ var FlattenedItemIdentifierKeysSchema = external_exports.enum(
5392
5442
  FlattenedItemIdentifierKeys
5393
5443
  );
5394
5444
 
5445
+ // lib/uniqueCriteria/models/UniqueCriteriaOptionsSchema.ts
5446
+ var uniqueCriteriaOptions = external_exports.object({
5447
+ name: external_exports.string(),
5448
+ value: external_exports.string()
5449
+ });
5450
+ var uniqueCriteriaOptionsSchema = external_exports.array(uniqueCriteriaOptions);
5451
+
5395
5452
  // lib/uniqueCriteria/index.ts
5396
5453
  var BASE_URL15 = "uniquecriteria";
5397
5454
 
5398
5455
  // lib/uniqueCriteria/mockHandlers.ts
5399
5456
  function createUniqueCriteriaApiHandlers(client) {
5457
+ function getUniqueCriteriaOptions(resolver = (_info) => {
5458
+ const data = (0, import_zod_mock14.generateMock)(
5459
+ external_exports.array(external_exports.object({ name: external_exports.string(), value: external_exports.string() }))
5460
+ );
5461
+ return import_msw15.HttpResponse.json(data);
5462
+ }) {
5463
+ return import_msw15.http.get(`${client.getBaseUrl()}${BASE_URL15}`, resolver);
5464
+ }
5465
+ getUniqueCriteriaOptions.generateData = () => (0, import_zod_mock14.generateMock)(external_exports.array(external_exports.object({ name: external_exports.string(), value: external_exports.string() })));
5400
5466
  function getUniqueCriteriaByOrg(resolver = (_info) => {
5401
5467
  const data = (0, import_zod_mock14.generateMock)(external_exports.array(external_exports.string()));
5402
5468
  return import_msw15.HttpResponse.json(data);
@@ -5433,6 +5499,9 @@ var companyBriefByOrgSchema = external_exports.object({
5433
5499
  dc4Id: external_exports.number()
5434
5500
  });
5435
5501
 
5502
+ // lib/companies/models/CompanyType.ts
5503
+ var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
5504
+
5436
5505
  // lib/companies/index.ts
5437
5506
  var BASE_URL16 = "companys";
5438
5507
 
package/dist/msw.d.cts CHANGED
@@ -79,9 +79,9 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
79
79
  data: {
80
80
  type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
81
81
  name: string;
82
+ companyId: number;
82
83
  categoryid: number;
83
84
  encodedCategoryId: string;
84
- companyId: number;
85
85
  isActive: number;
86
86
  typeId: number;
87
87
  description?: string | null | undefined;
@@ -96,6 +96,27 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
96
96
  (resolver?: ResponseResolver): msw.HttpHandler;
97
97
  generateData(): ItemHierarchyResponse;
98
98
  };
99
+ createCatalog: {
100
+ (resolver?: ResponseResolver): msw.HttpHandler;
101
+ generateData(): {
102
+ categoryId: number;
103
+ };
104
+ };
105
+ searchCatalogsByCompany: {
106
+ (resolver?: ResponseResolver): msw.HttpHandler;
107
+ generateData(): {
108
+ categoryName: string;
109
+ categoryTypeId: number;
110
+ categoryDescription: string;
111
+ categoryId: number;
112
+ categoryDescriptionExt: string;
113
+ ownerCompanyId: string;
114
+ createdAt: string;
115
+ modifiedAt: string;
116
+ createdBy: string;
117
+ modifiedBy: string;
118
+ }[];
119
+ };
99
120
  };
100
121
 
101
122
  /**
@@ -123,11 +144,11 @@ declare function createProductTypesApiHandlers(client: AsstClient): {
123
144
  results: {
124
145
  description: string;
125
146
  createdDate: number;
147
+ createdBy: string;
126
148
  attrProdTypeId: number;
127
149
  productType: string;
128
- createdBy: string;
129
- modifiedDate?: number | undefined;
130
150
  modifiedBy?: string | undefined;
151
+ modifiedDate?: number | undefined;
131
152
  retailerId?: number | undefined;
132
153
  }[];
133
154
  };
@@ -594,13 +615,13 @@ declare function createSpreadsheetTemplateApiHandlers(client: AsstClient): {
594
615
  maxItemsPerDoc: number;
595
616
  companies: {
596
617
  companyId: number;
597
- companyName: string;
598
618
  createdAt: number;
619
+ companyName: string;
599
620
  }[];
600
- createdBy?: string | null | undefined;
601
- modifiedBy?: string | null | undefined;
602
621
  createdAt?: number | null | undefined;
603
622
  modifiedAt?: number | null | undefined;
623
+ createdBy?: string | null | undefined;
624
+ modifiedBy?: string | null | undefined;
604
625
  }[];
605
626
  };
606
627
  };
package/dist/msw.d.ts CHANGED
@@ -79,9 +79,9 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
79
79
  data: {
80
80
  type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
81
81
  name: string;
82
+ companyId: number;
82
83
  categoryid: number;
83
84
  encodedCategoryId: string;
84
- companyId: number;
85
85
  isActive: number;
86
86
  typeId: number;
87
87
  description?: string | null | undefined;
@@ -96,6 +96,27 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
96
96
  (resolver?: ResponseResolver): msw.HttpHandler;
97
97
  generateData(): ItemHierarchyResponse;
98
98
  };
99
+ createCatalog: {
100
+ (resolver?: ResponseResolver): msw.HttpHandler;
101
+ generateData(): {
102
+ categoryId: number;
103
+ };
104
+ };
105
+ searchCatalogsByCompany: {
106
+ (resolver?: ResponseResolver): msw.HttpHandler;
107
+ generateData(): {
108
+ categoryName: string;
109
+ categoryTypeId: number;
110
+ categoryDescription: string;
111
+ categoryId: number;
112
+ categoryDescriptionExt: string;
113
+ ownerCompanyId: string;
114
+ createdAt: string;
115
+ modifiedAt: string;
116
+ createdBy: string;
117
+ modifiedBy: string;
118
+ }[];
119
+ };
99
120
  };
100
121
 
101
122
  /**
@@ -123,11 +144,11 @@ declare function createProductTypesApiHandlers(client: AsstClient): {
123
144
  results: {
124
145
  description: string;
125
146
  createdDate: number;
147
+ createdBy: string;
126
148
  attrProdTypeId: number;
127
149
  productType: string;
128
- createdBy: string;
129
- modifiedDate?: number | undefined;
130
150
  modifiedBy?: string | undefined;
151
+ modifiedDate?: number | undefined;
131
152
  retailerId?: number | undefined;
132
153
  }[];
133
154
  };
@@ -594,13 +615,13 @@ declare function createSpreadsheetTemplateApiHandlers(client: AsstClient): {
594
615
  maxItemsPerDoc: number;
595
616
  companies: {
596
617
  companyId: number;
597
- companyName: string;
598
618
  createdAt: number;
619
+ companyName: string;
599
620
  }[];
600
- createdBy?: string | null | undefined;
601
- modifiedBy?: string | null | undefined;
602
621
  createdAt?: number | null | undefined;
603
622
  modifiedAt?: number | null | undefined;
623
+ createdBy?: string | null | undefined;
624
+ modifiedBy?: string | null | undefined;
604
625
  }[];
605
626
  };
606
627
  };
package/dist/msw.js CHANGED
@@ -19,9 +19,11 @@ import {
19
19
  BASE_URL_V2,
20
20
  FlattenedItemIdentifierKeysSchema,
21
21
  retailerTradingPartnerStages
22
- } from "./chunk-NFZI7D22.js";
22
+ } from "./chunk-V2XRXJIJ.js";
23
23
  import {
24
24
  attrProdTypeSchema,
25
+ catalogBriefResponseSchema,
26
+ catalogCreateResponseSchema,
25
27
  companyBriefByOrgSchema,
26
28
  external_exports,
27
29
  importErrorsSchema,
@@ -44,7 +46,7 @@ import {
44
46
  tradingPartnerAccessByCompanyIdSchema,
45
47
  userAccountSchema,
46
48
  vendorPartnerAttGroupsSchema
47
- } from "./chunk-LKUGPDIT.js";
49
+ } from "./chunk-YT2B4UAK.js";
48
50
 
49
51
  // lib/imports/mockHandlers.ts
50
52
  import { generateMock } from "@anatine/zod-mock";
@@ -151,9 +153,31 @@ function createCategoriesApiHandlers(client) {
151
153
  );
152
154
  }
153
155
  getItemHierarchy.generateData = () => generateMock2(itemHierarchyResponseSchema);
156
+ function createCatalog(resolver = (_info) => {
157
+ const data = generateMock2(catalogCreateResponseSchema);
158
+ return HttpResponse2.json(data);
159
+ }) {
160
+ return http2.post(`${client.getBaseUrl()}category`, resolver);
161
+ }
162
+ createCatalog.generateData = () => generateMock2(catalogCreateResponseSchema);
163
+ function searchCatalogsByCompany(resolver = (_info) => {
164
+ const data = Array.from(
165
+ { length: 3 },
166
+ () => generateMock2(catalogBriefResponseSchema)
167
+ );
168
+ return HttpResponse2.json(data);
169
+ }) {
170
+ return http2.get(
171
+ `${client.getBaseUrl()}category/brief/CATALOG/search`,
172
+ resolver
173
+ );
174
+ }
175
+ searchCatalogsByCompany.generateData = () => Array.from({ length: 3 }, () => generateMock2(catalogBriefResponseSchema));
154
176
  return {
155
177
  getCategory,
156
- getItemHierarchy
178
+ getItemHierarchy,
179
+ createCatalog,
180
+ searchCatalogsByCompany
157
181
  };
158
182
  }
159
183
 
@@ -480,6 +504,15 @@ function createFeatureFlagsApiHandlers(client) {
480
504
  import { generateMock as generateMock14 } from "@anatine/zod-mock";
481
505
  import { http as http15, HttpResponse as HttpResponse15 } from "msw";
482
506
  function createUniqueCriteriaApiHandlers(client) {
507
+ function getUniqueCriteriaOptions(resolver = (_info) => {
508
+ const data = generateMock14(
509
+ external_exports.array(external_exports.object({ name: external_exports.string(), value: external_exports.string() }))
510
+ );
511
+ return HttpResponse15.json(data);
512
+ }) {
513
+ return http15.get(`${client.getBaseUrl()}${BASE_URL16}`, resolver);
514
+ }
515
+ getUniqueCriteriaOptions.generateData = () => generateMock14(external_exports.array(external_exports.object({ name: external_exports.string(), value: external_exports.string() })));
483
516
  function getUniqueCriteriaByOrg(resolver = (_info) => {
484
517
  const data = generateMock14(external_exports.array(external_exports.string()));
485
518
  return HttpResponse15.json(data);
package/dist/zod.cjs CHANGED
@@ -4336,6 +4336,34 @@ var itemHierarchyResponseSchema = external_exports.object({
4336
4336
  )
4337
4337
  });
4338
4338
 
4339
+ // lib/categories/models/CatalogManagement.ts
4340
+ var catalogCreateRequestSchema = external_exports.object({
4341
+ categoryName: external_exports.string(),
4342
+ categoryCompanyId: external_exports.number(),
4343
+ categoryTypeId: external_exports.number(),
4344
+ categoryDescription: external_exports.string().optional()
4345
+ });
4346
+ var catalogCreateResponseSchema = external_exports.object({
4347
+ categoryId: external_exports.number()
4348
+ });
4349
+ var catalogSearchParamsSchema = external_exports.object({
4350
+ ownerCompanyIds: external_exports.array(external_exports.number()).optional(),
4351
+ searchTerms: external_exports.string().optional(),
4352
+ categoryType: external_exports.literal("CATALOG")
4353
+ });
4354
+ var catalogBriefResponseSchema = external_exports.object({
4355
+ categoryId: external_exports.number(),
4356
+ categoryName: external_exports.string(),
4357
+ categoryDescription: external_exports.string(),
4358
+ categoryDescriptionExt: external_exports.string(),
4359
+ ownerCompanyId: external_exports.string(),
4360
+ categoryTypeId: external_exports.number(),
4361
+ createdAt: external_exports.string(),
4362
+ modifiedAt: external_exports.string(),
4363
+ createdBy: external_exports.string(),
4364
+ modifiedBy: external_exports.string()
4365
+ });
4366
+
4339
4367
  // lib/items/v1/models/ItemHeader.ts
4340
4368
  var itemHeaderSchema = external_exports.object({
4341
4369
  status: external_exports.string().optional(),
@@ -4987,6 +5015,9 @@ var companyBriefByOrgSchema = external_exports.object({
4987
5015
  }),
4988
5016
  dc4Id: external_exports.number()
4989
5017
  });
5018
+
5019
+ // lib/companies/models/CompanyType.ts
5020
+ var companyTypeSchema = external_exports.enum(["SUPPLIER", "RETAILER"]);
4990
5021
  // Annotate the CommonJS export names for ESM import in node:
4991
5022
  0 && (module.exports = {
4992
5023
  attrProdTypeSchema,
package/dist/zod.d.cts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { e as envSchema, i as itemHierarchyResponseSchema, s as spsItemIdResponseSchema } from './SpsItemIdResponse-s0vCXepG.cjs';
2
- export { aN as attrProdTypeSchema, aD as attributeDetailSchema, av as bulbSchema, aA as categoryEnumSchema, ao as categoryTypeSchema, b6 as companyBriefByOrgSchema, aT as companyRelationshipUpsertBodySchema, aF as componentDetailsSchema, aQ as connectionSchema, al as downLoadItemsParamsSchema, ah as exportDayOfWeekEnum, ai as exportFrequencyEnum, ak as exportSchema, aj as exportTypeEnum, af as generateImportTemplateParamsSchema, aJ as groupedAttributeListSchema, aH as groupedAttributesSchema, az as groupedItemSchema, aI as hierarchyCategorySchema, aG as hierarchyDetailsSchema, aU as identityServiceDatetimePreferencesSchema, aV as identityServiceOrganizationMetadataSchema, aW as identityServiceOrganizationSchema, aX as identityServicePreferencesSchema, aY as identityServiceUserSchema, a9 as importDetailSchema, aa as importErrorSchema, ab as importErrorsSchema, ac as importSchema, ae as importStatusEnumSchema, ad as importsStatusSchema, am as itemCategoriesSearchSchema, an as itemCategorySchema, ay as itemDetailSchema, aC as itemDetailViewSchema, a$ as itemErrorDetailsResultSchema, b1 as itemErrorDetailsResultV2Schema, b0 as itemErrorDetailsSchema, b3 as itemErrorDetailsV2Schema, b5 as itemErrorSummaryResultV2Schema, b2 as itemErrorSummaryV2Schema, ap as itemHeaderSchema, aq as itemMapSchema, aS as itemPartnerSchema, aw as itemPriceSchema, ar as itemSearchViewSchema, as as itemTableSchema, aM as localeSchema, ax as mediaItemSchema, aK as packComponentDetailsSchema, aL as packComponentItemInfoSchema, aB as packComponentSchema, at as phaseEnumSchema, aZ as registeredServiceSchema, aE as repeatableGroupSchema, aO as spreadsheetTemplateCompanySchema, aP as spreadsheetTemplateSchema, aR as tradingPartnerAccessByCompanyIdSchema, au as tradingPartnerStageSchema, b4 as tradingPartnerStageV2Schema, a_ as userAccountSchema, ag as vendorPartnerAttGroupsSchema } from './zod-C41Rts8D.cjs';
2
+ export { aN as attrProdTypeSchema, aD as attributeDetailSchema, av as bulbSchema, aA as categoryEnumSchema, ao as categoryTypeSchema, b6 as companyBriefByOrgSchema, aT as companyRelationshipUpsertBodySchema, aF as componentDetailsSchema, aQ as connectionSchema, al as downLoadItemsParamsSchema, ah as exportDayOfWeekEnum, ai as exportFrequencyEnum, ak as exportSchema, aj as exportTypeEnum, af as generateImportTemplateParamsSchema, aJ as groupedAttributeListSchema, aH as groupedAttributesSchema, az as groupedItemSchema, aI as hierarchyCategorySchema, aG as hierarchyDetailsSchema, aU as identityServiceDatetimePreferencesSchema, aV as identityServiceOrganizationMetadataSchema, aW as identityServiceOrganizationSchema, aX as identityServicePreferencesSchema, aY as identityServiceUserSchema, a9 as importDetailSchema, aa as importErrorSchema, ab as importErrorsSchema, ac as importSchema, ae as importStatusEnumSchema, ad as importsStatusSchema, am as itemCategoriesSearchSchema, an as itemCategorySchema, ay as itemDetailSchema, aC as itemDetailViewSchema, a$ as itemErrorDetailsResultSchema, b1 as itemErrorDetailsResultV2Schema, b0 as itemErrorDetailsSchema, b3 as itemErrorDetailsV2Schema, b5 as itemErrorSummaryResultV2Schema, b2 as itemErrorSummaryV2Schema, ap as itemHeaderSchema, aq as itemMapSchema, aS as itemPartnerSchema, aw as itemPriceSchema, ar as itemSearchViewSchema, as as itemTableSchema, aM as localeSchema, ax as mediaItemSchema, aK as packComponentDetailsSchema, aL as packComponentItemInfoSchema, aB as packComponentSchema, at as phaseEnumSchema, aZ as registeredServiceSchema, aE as repeatableGroupSchema, aO as spreadsheetTemplateCompanySchema, aP as spreadsheetTemplateSchema, aR as tradingPartnerAccessByCompanyIdSchema, au as tradingPartnerStageSchema, b4 as tradingPartnerStageV2Schema, a_ as userAccountSchema, ag as vendorPartnerAttGroupsSchema } from './zod-CJ7lvFQH.cjs';
3
3
  import 'ky';
4
4
  import 'zod';
package/dist/zod.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { e as envSchema, i as itemHierarchyResponseSchema, s as spsItemIdResponseSchema } from './SpsItemIdResponse-s0vCXepG.js';
2
- export { aN as attrProdTypeSchema, aD as attributeDetailSchema, av as bulbSchema, aA as categoryEnumSchema, ao as categoryTypeSchema, b6 as companyBriefByOrgSchema, aT as companyRelationshipUpsertBodySchema, aF as componentDetailsSchema, aQ as connectionSchema, al as downLoadItemsParamsSchema, ah as exportDayOfWeekEnum, ai as exportFrequencyEnum, ak as exportSchema, aj as exportTypeEnum, af as generateImportTemplateParamsSchema, aJ as groupedAttributeListSchema, aH as groupedAttributesSchema, az as groupedItemSchema, aI as hierarchyCategorySchema, aG as hierarchyDetailsSchema, aU as identityServiceDatetimePreferencesSchema, aV as identityServiceOrganizationMetadataSchema, aW as identityServiceOrganizationSchema, aX as identityServicePreferencesSchema, aY as identityServiceUserSchema, a9 as importDetailSchema, aa as importErrorSchema, ab as importErrorsSchema, ac as importSchema, ae as importStatusEnumSchema, ad as importsStatusSchema, am as itemCategoriesSearchSchema, an as itemCategorySchema, ay as itemDetailSchema, aC as itemDetailViewSchema, a$ as itemErrorDetailsResultSchema, b1 as itemErrorDetailsResultV2Schema, b0 as itemErrorDetailsSchema, b3 as itemErrorDetailsV2Schema, b5 as itemErrorSummaryResultV2Schema, b2 as itemErrorSummaryV2Schema, ap as itemHeaderSchema, aq as itemMapSchema, aS as itemPartnerSchema, aw as itemPriceSchema, ar as itemSearchViewSchema, as as itemTableSchema, aM as localeSchema, ax as mediaItemSchema, aK as packComponentDetailsSchema, aL as packComponentItemInfoSchema, aB as packComponentSchema, at as phaseEnumSchema, aZ as registeredServiceSchema, aE as repeatableGroupSchema, aO as spreadsheetTemplateCompanySchema, aP as spreadsheetTemplateSchema, aR as tradingPartnerAccessByCompanyIdSchema, au as tradingPartnerStageSchema, b4 as tradingPartnerStageV2Schema, a_ as userAccountSchema, ag as vendorPartnerAttGroupsSchema } from './zod-COyz02Lh.js';
2
+ export { aN as attrProdTypeSchema, aD as attributeDetailSchema, av as bulbSchema, aA as categoryEnumSchema, ao as categoryTypeSchema, b6 as companyBriefByOrgSchema, aT as companyRelationshipUpsertBodySchema, aF as componentDetailsSchema, aQ as connectionSchema, al as downLoadItemsParamsSchema, ah as exportDayOfWeekEnum, ai as exportFrequencyEnum, ak as exportSchema, aj as exportTypeEnum, af as generateImportTemplateParamsSchema, aJ as groupedAttributeListSchema, aH as groupedAttributesSchema, az as groupedItemSchema, aI as hierarchyCategorySchema, aG as hierarchyDetailsSchema, aU as identityServiceDatetimePreferencesSchema, aV as identityServiceOrganizationMetadataSchema, aW as identityServiceOrganizationSchema, aX as identityServicePreferencesSchema, aY as identityServiceUserSchema, a9 as importDetailSchema, aa as importErrorSchema, ab as importErrorsSchema, ac as importSchema, ae as importStatusEnumSchema, ad as importsStatusSchema, am as itemCategoriesSearchSchema, an as itemCategorySchema, ay as itemDetailSchema, aC as itemDetailViewSchema, a$ as itemErrorDetailsResultSchema, b1 as itemErrorDetailsResultV2Schema, b0 as itemErrorDetailsSchema, b3 as itemErrorDetailsV2Schema, b5 as itemErrorSummaryResultV2Schema, b2 as itemErrorSummaryV2Schema, ap as itemHeaderSchema, aq as itemMapSchema, aS as itemPartnerSchema, aw as itemPriceSchema, ar as itemSearchViewSchema, as as itemTableSchema, aM as localeSchema, ax as mediaItemSchema, aK as packComponentDetailsSchema, aL as packComponentItemInfoSchema, aB as packComponentSchema, at as phaseEnumSchema, aZ as registeredServiceSchema, aE as repeatableGroupSchema, aO as spreadsheetTemplateCompanySchema, aP as spreadsheetTemplateSchema, aR as tradingPartnerAccessByCompanyIdSchema, au as tradingPartnerStageSchema, b4 as tradingPartnerStageV2Schema, a_ as userAccountSchema, ag as vendorPartnerAttGroupsSchema } from './zod-j6CrX5vY.js';
3
3
  import 'ky';
4
4
  import 'zod';