@spscommerce/asst-api 0.0.1 → 0.2.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/msw.js CHANGED
@@ -4,6 +4,7 @@ import {
4
4
  BASE_URL11,
5
5
  BASE_URL12,
6
6
  BASE_URL13,
7
+ BASE_URL14,
7
8
  BASE_URL2,
8
9
  BASE_URL3,
9
10
  BASE_URL4,
@@ -12,8 +13,9 @@ import {
12
13
  BASE_URL7,
13
14
  BASE_URL8,
14
15
  BASE_URL9,
15
- BASE_URL_V2
16
- } from "./chunk-HG7MCO42.js";
16
+ BASE_URL_V2,
17
+ createCompaniesApi
18
+ } from "./chunk-HBDHFANT.js";
17
19
  import {
18
20
  attrProdTypeSchema,
19
21
  attributeDefinitionSchema,
@@ -26,6 +28,7 @@ import {
26
28
  itemCategoriesSearchSchema,
27
29
  itemDetailViewSchema,
28
30
  itemErrorDetailsResultSchema,
31
+ itemPartnerSchema,
29
32
  itemSearchViewSchema,
30
33
  itemStatusResponseSchema,
31
34
  localeSchema,
@@ -35,7 +38,7 @@ import {
35
38
  userAccountSchema,
36
39
  vendorPartnerAttGroupsSchema,
37
40
  z
38
- } from "./chunk-HEFVXX2V.js";
41
+ } from "./chunk-VICSFYTR.js";
39
42
 
40
43
  // lib/imports/mockHandlers.ts
41
44
  import { generateMock } from "@anatine/zod-mock";
@@ -47,7 +50,7 @@ function createImportsApiHandlers(client) {
47
50
  const data = generateMock(importErrorsSchema);
48
51
  res(ctx.status(200), ctx.json(data));
49
52
  }) {
50
- return rest.get(`${client.getBaseUrl()}/${BASE_URL}/:importId/errors`, resolver);
53
+ return rest.get(`${client.getBaseUrl()}${BASE_URL}/:importId/errors`, resolver);
51
54
  }
52
55
  getImportErrors.generateData = () => generateMock(importErrorsSchema);
53
56
  function getImports(resolver = (_req, res, ctx) => {
@@ -55,7 +58,7 @@ function createImportsApiHandlers(client) {
55
58
  return res(ctx.status(200), ctx.json(data));
56
59
  }) {
57
60
  return rest.get(
58
- `${client.getBaseUrl()}/${BASE_URL}`,
61
+ `${client.getBaseUrl()}${BASE_URL}`,
59
62
  resolver
60
63
  );
61
64
  }
@@ -64,7 +67,7 @@ function createImportsApiHandlers(client) {
64
67
  const data = generateMock(z.array(importsStatusSchema));
65
68
  return res(ctx.status(200), ctx.json(data));
66
69
  }) {
67
- return rest.get(`${client.getBaseUrl()}/${BASE_URL}/status`, resolver);
70
+ return rest.get(`${client.getBaseUrl()}${BASE_URL}/status`, resolver);
68
71
  }
69
72
  getImportsStatus.generateData = () => generateMock(z.array(importsStatusSchema));
70
73
  function getVendorPartnerGroups(resolver = (_req, res, ctx) => {
@@ -72,7 +75,7 @@ function createImportsApiHandlers(client) {
72
75
  return res(ctx.status(200), ctx.json(data));
73
76
  }) {
74
77
  return rest.get(
75
- `${client.getBaseUrl()}/${BASE_URL}/template/vendor-partner-groups`,
78
+ `${client.getBaseUrl()}${BASE_URL}/template/vendor-partner-groups`,
76
79
  resolver
77
80
  );
78
81
  }
@@ -80,13 +83,13 @@ function createImportsApiHandlers(client) {
80
83
  function uploadImport(resolver = (_req, res, ctx) => {
81
84
  return res(ctx.status(200));
82
85
  }) {
83
- return rest.post(`${client.getBaseUrl()}/${BASE_URL}`, resolver);
86
+ return rest.post(`${client.getBaseUrl()}${BASE_URL}`, resolver);
84
87
  }
85
88
  function generateImportTemplate(resolver = (_req, res, ctx) => {
86
89
  return res(ctx.status(400, "Not supported"));
87
90
  }) {
88
91
  return rest.get(
89
- `${client.getBaseUrl()}/${BASE_URL}/template/generate`,
92
+ `${client.getBaseUrl()}${BASE_URL}/template/generate`,
90
93
  resolver
91
94
  );
92
95
  }
@@ -129,7 +132,7 @@ function createCategoriesApiHandlers(client) {
129
132
  }
130
133
  return res(ctx.status(200), ctx.json(data));
131
134
  }) {
132
- return rest2.get(`${client.getBaseUrl()}/${BASE_URL5}/search-category`, resolver);
135
+ return rest2.get(`${client.getBaseUrl()}${BASE_URL5}/search-category`, resolver);
133
136
  }
134
137
  getCategory.generateData = () => generateMock2(itemCategoriesSearchSchema);
135
138
  return {
@@ -143,13 +146,13 @@ function createExportsApiHandlers(client) {
143
146
  function createExport(resolver = (_req, res, ctx) => {
144
147
  return res(ctx.status(200));
145
148
  }) {
146
- return rest3.post(`${client.getBaseUrl()}/${BASE_URL_V2}/add`, resolver);
149
+ return rest3.post(`${client.getBaseUrl()}${BASE_URL_V2}/add`, resolver);
147
150
  }
148
151
  function downloadItems(resolver = (_req, res, ctx) => {
149
152
  return res(ctx.status(400, "Not supported"));
150
153
  }) {
151
154
  return rest3.get(
152
- `${client.getBaseUrl()}/${BASE_URL2}/spreadsheet/by-item`,
155
+ `${client.getBaseUrl()}${BASE_URL2}/spreadsheet/by-item`,
153
156
  resolver
154
157
  );
155
158
  }
@@ -169,7 +172,7 @@ function createProductTypesApiHandlers(client) {
169
172
  const data = generateMock3(pagedResultsSchema(attrProdTypeSchema));
170
173
  return res(ctx.status(200), ctx.json(data));
171
174
  }) {
172
- return rest4.get(`${client.getBaseUrl()}/${BASE_URL3}/all`, resolver);
175
+ return rest4.get(`${client.getBaseUrl()}${BASE_URL3}/all`, resolver);
173
176
  }
174
177
  getProductTypes.generateData = () => generateMock3(pagedResultsSchema(attrProdTypeSchema));
175
178
  return {
@@ -185,11 +188,24 @@ function createTradingPartnerAccessApiHandlers(client) {
185
188
  const data = generateMock4(tradingPartnerAccessByCompanyIdSchema);
186
189
  return res(ctx.status(200), ctx.json(data));
187
190
  }) {
188
- return rest5.get(`${client.getBaseUrl()}/${BASE_URL4}/connections`, resolver);
191
+ return rest5.get(`${client.getBaseUrl()}${BASE_URL4}/connections`, resolver);
189
192
  }
190
193
  getAllTradingPartners.generateData = () => generateMock4(tradingPartnerAccessByCompanyIdSchema);
194
+ function upsertRelationship(resolver = (_req, res, ctx) => {
195
+ return res(ctx.status(200));
196
+ }) {
197
+ return rest5.post(`${BASE_URL4}/upsert-relationship`, resolver);
198
+ }
199
+ upsertRelationship.generateData = () => generateMock4(itemPartnerSchema);
200
+ function upsertHierarchy(resolver = (_req, res, ctx) => {
201
+ return res(ctx.status(200));
202
+ }) {
203
+ return rest5.post(`${BASE_URL4}/upsert-hierarchy`, resolver);
204
+ }
191
205
  return {
192
- getAllTradingPartners
206
+ getAllTradingPartners,
207
+ upsertRelationship,
208
+ upsertHierarchy
193
209
  };
194
210
  }
195
211
 
@@ -201,7 +217,7 @@ function createWhoAmIApiHandlers(client) {
201
217
  const data = generateMock5(userAccountSchema);
202
218
  return res(ctx.status(200), ctx.json(data));
203
219
  }) {
204
- return rest6.get(`${client.getBaseUrl()}/${BASE_URL9}`, resolver);
220
+ return rest6.get(`${client.getBaseUrl()}${BASE_URL9}`, resolver);
205
221
  }
206
222
  whoAmI.generateData = () => generateMock5(userAccountSchema);
207
223
  return {
@@ -219,7 +235,7 @@ function createErrorsApiHandlers(client) {
219
235
  const data = generateMock6(itemErrorDetailsResultSchema);
220
236
  return res(ctx.status(200), ctx.json(data));
221
237
  }) {
222
- return rest7.get(`${client.getBaseUrl()}/${BASE_URL13}/items/:itemInfoId`, resolver);
238
+ return rest7.get(`${client.getBaseUrl()}${BASE_URL13}/items/:itemInfoId`, resolver);
223
239
  }
224
240
  getInvalidItemErrorDetails.generateData = () => generateMock6(itemErrorDetailsResultSchema);
225
241
  return {
@@ -235,7 +251,7 @@ function createLocaleApiHandlers(client) {
235
251
  const data = generateMock7(z.array(localeSchema));
236
252
  return res(ctx.status(200), ctx.json(data));
237
253
  }) {
238
- return rest8.get(`${client.getBaseUrl()}/${BASE_URL7}`, resolver);
254
+ return rest8.get(`${client.getBaseUrl()}${BASE_URL7}`, resolver);
239
255
  }
240
256
  getLocale.generateData = () => generateMock7(z.array(localeSchema));
241
257
  return {
@@ -253,7 +269,7 @@ function createItemsApiHandlers(client) {
253
269
  const data = generateMock8(itemSearchViewSchema);
254
270
  return res(ctx.status(200), ctx.json(data));
255
271
  }) {
256
- return rest9.get(`${client.getBaseUrl()}/${BASE_URL12}`, resolver);
272
+ return rest9.get(`${client.getBaseUrl()}${BASE_URL12}`, resolver);
257
273
  }
258
274
  searchItems.generateData = () => generateMock8(itemSearchViewSchema);
259
275
  function getItem(resolver = (_req, res, ctx) => {
@@ -261,7 +277,7 @@ function createItemsApiHandlers(client) {
261
277
  return res(ctx.status(200), ctx.json(data));
262
278
  }) {
263
279
  return rest9.get(
264
- `${client.getBaseUrl()}/${BASE_URL12}/:itemId`,
280
+ `${client.getBaseUrl()}${BASE_URL12}/:itemId`,
265
281
  resolver
266
282
  );
267
283
  }
@@ -270,26 +286,26 @@ function createItemsApiHandlers(client) {
270
286
  return res(ctx.status(200));
271
287
  }) {
272
288
  return rest9.put(
273
- `${client.getBaseUrl()}/${BASE_URL12}/details/:itemId`,
289
+ `${client.getBaseUrl()}${BASE_URL12}/details/:itemId`,
274
290
  resolver
275
291
  );
276
292
  }
277
293
  function deleteItem(resolver = (_req, res, ctx) => {
278
294
  return res(ctx.status(200));
279
295
  }) {
280
- return rest9.post(`${client.getBaseUrl()}/${BASE_URL12}/:itemId`, resolver);
296
+ return rest9.post(`${client.getBaseUrl()}${BASE_URL12}/:itemId`, resolver);
281
297
  }
282
298
  function deleteItems(resolver = (_req, res, ctx) => {
283
299
  return res(ctx.status(200));
284
300
  }) {
285
- return rest9.post(`${client.getBaseUrl()}/${BASE_URL12}/items`, resolver);
301
+ return rest9.post(`${client.getBaseUrl()}${BASE_URL12}/items`, resolver);
286
302
  }
287
303
  function getItemInfoId(resolver = (_req, res, ctx) => {
288
304
  const data = generateMock8(z.number());
289
305
  return res(ctx.status(200), ctx.json(data));
290
306
  }) {
291
307
  return rest9.get(
292
- `${client.getBaseUrl()}/${BASE_URL12}/:spsItemId/itemInfoId`,
308
+ `${client.getBaseUrl()}${BASE_URL12}/:spsItemId/itemInfoId`,
293
309
  resolver
294
310
  );
295
311
  }
@@ -299,7 +315,7 @@ function createItemsApiHandlers(client) {
299
315
  return res(ctx.status(200), ctx.json(data));
300
316
  }) {
301
317
  return rest9.get(
302
- `${client.getBaseUrl()}/${BASE_URL12}/:itemInfoId/spsItemId`,
318
+ `${client.getBaseUrl()}${BASE_URL12}/:itemInfoId/spsItemId`,
303
319
  resolver
304
320
  );
305
321
  }
@@ -309,7 +325,7 @@ function createItemsApiHandlers(client) {
309
325
  return res(ctx.status(200), ctx.json(data));
310
326
  }) {
311
327
  return rest9.get(
312
- `${client.getBaseUrl()}/${BASE_URL12}/status`,
328
+ `${client.getBaseUrl()}${BASE_URL12}/status`,
313
329
  resolver
314
330
  );
315
331
  }
@@ -336,14 +352,14 @@ function createAttributesApiHandlers(client) {
336
352
  const data = generateMock9(z.array(attributeMetaDataSchema));
337
353
  return res(ctx.status(200), ctx.json(data));
338
354
  }) {
339
- return rest10.get(`${client.getBaseUrl()}/${BASE_URL6}`, resolver);
355
+ return rest10.get(`${client.getBaseUrl()}${BASE_URL6}`, resolver);
340
356
  }
341
357
  getAllAttributes.generateData = () => generateMock9(attributeMetaDataSchema);
342
358
  function getAllAttributesByCompany(resolver = (_req, res, ctx) => {
343
359
  const data = generateMock9(attributesByCompanySchema);
344
360
  return res(ctx.status(200), ctx.json(data));
345
361
  }) {
346
- return rest10.get(`${client.getBaseUrl()}/${BASE_URL6}/company`, resolver);
362
+ return rest10.get(`${client.getBaseUrl()}${BASE_URL6}/company`, resolver);
347
363
  }
348
364
  getAllAttributesByCompany.generateData = () => generateMock9(attributesByCompanySchema);
349
365
  function getAttributesExtensiveInfo(resolver = (_req, res, ctx) => {
@@ -351,7 +367,7 @@ function createAttributesApiHandlers(client) {
351
367
  return res(ctx.status(200), ctx.json(data));
352
368
  }) {
353
369
  return rest10.get(
354
- `${client.getBaseUrl()}/${BASE_URL6}/registry/editui`,
370
+ `${client.getBaseUrl()}${BASE_URL6}/registry/editui`,
355
371
  resolver
356
372
  );
357
373
  }
@@ -361,7 +377,7 @@ function createAttributesApiHandlers(client) {
361
377
  return res(ctx.status(200), ctx.json(data));
362
378
  }) {
363
379
  return rest10.get(
364
- `${client.getBaseUrl()}/${BASE_URL6}/registry/attribute/:attributeDbName/values`,
380
+ `${client.getBaseUrl()}${BASE_URL6}/registry/attribute/:attributeDbName/values`,
365
381
  resolver
366
382
  );
367
383
  }
@@ -371,7 +387,7 @@ function createAttributesApiHandlers(client) {
371
387
  return res(ctx.status(200), ctx.json(data));
372
388
  }) {
373
389
  return rest10.get(
374
- `${client.getBaseUrl()}/${BASE_URL6}/company/interested-attributes`,
390
+ `${client.getBaseUrl()}${BASE_URL6}/company/interested-attributes`,
375
391
  resolver
376
392
  );
377
393
  }
@@ -393,7 +409,7 @@ function createSpreadsheetTemplateApiHandlers(client) {
393
409
  const data = generateMock10(z.array(spreadsheetTemplateSchema));
394
410
  return res(ctx.status(200), ctx.json(data));
395
411
  }) {
396
- return rest11.get(`${client.getBaseUrl()}/${BASE_URL8}`, resolver);
412
+ return rest11.get(`${client.getBaseUrl()}${BASE_URL8}`, resolver);
397
413
  }
398
414
  getTemplates.generateData = () => generateMock10(z.array(spreadsheetTemplateSchema));
399
415
  return {
@@ -410,7 +426,7 @@ function createCompanyFeaturesApiHandlers(client) {
410
426
  return res(ctx.status(200), ctx.json(data));
411
427
  }) {
412
428
  return rest12.get(
413
- `${client.getBaseUrl()}/${BASE_URL10}/isphaseditemsetupenabled`,
429
+ `${client.getBaseUrl()}${BASE_URL10}/isphaseditemsetupenabled`,
414
430
  resolver
415
431
  );
416
432
  }
@@ -428,17 +444,44 @@ function createFeatureFlagsApiHandlers(client) {
428
444
  return res(ctx.status(200), ctx.json(data));
429
445
  }) {
430
446
  return rest13.get(
431
- `${client.getBaseUrl()}/${BASE_URL11}/enable-items-api-endpoints-for-imports/`,
447
+ `${client.getBaseUrl()}${BASE_URL11}/enable-items-api-endpoints-for-imports/`,
448
+ resolver
449
+ );
450
+ }
451
+ function checkEnableItemsLevelMSIS(resolver = (_req, res, ctx) => {
452
+ const data = generateMock12(z.boolean());
453
+ return res(ctx.status(200), ctx.json(data));
454
+ }) {
455
+ return rest13.get(
456
+ `${client.getBaseUrl()}/${BASE_URL11}/enable-item-level-msis/`,
432
457
  resolver
433
458
  );
434
459
  }
435
460
  return {
436
- checkEnableItemsApiEndpointsForImports
461
+ checkEnableItemsApiEndpointsForImports,
462
+ checkEnableItemsLevelMSIS
463
+ };
464
+ }
465
+
466
+ // lib/uniqueCriteria/mockHandlers.ts
467
+ import { generateMock as generateMock13 } from "@anatine/zod-mock";
468
+ import { rest as rest14 } from "msw";
469
+ function createUniqueCriteriaApiHandlers(client) {
470
+ function getUniqueCriteriaByOrg(resolver = (_req, res, ctx) => {
471
+ const data = generateMock13(z.array(z.string()));
472
+ return res(ctx.status(200), ctx.json(data));
473
+ }) {
474
+ return rest14.get(`${client.getBaseUrl()}/${BASE_URL14}/org`, resolver);
475
+ }
476
+ getUniqueCriteriaByOrg.generateData = () => generateMock13(z.array(z.string()));
477
+ return {
478
+ getUniqueCriteriaByOrg
437
479
  };
438
480
  }
439
481
  export {
440
482
  createAttributesApiHandlers,
441
483
  createCategoriesApiHandlers,
484
+ createCompaniesApi,
442
485
  createCompanyFeaturesApiHandlers,
443
486
  createErrorsApiHandlers,
444
487
  createExportsApiHandlers,
@@ -449,5 +492,6 @@ export {
449
492
  createProductTypesApiHandlers,
450
493
  createSpreadsheetTemplateApiHandlers,
451
494
  createTradingPartnerAccessApiHandlers,
495
+ createUniqueCriteriaApiHandlers,
452
496
  createWhoAmIApiHandlers
453
497
  };
@@ -1,4 +1,4 @@
1
- import './ItemErrorDetailsResult-317fbe3e.js';
1
+ import './CompanyBriefByOrg-eea5479d.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  declare const importDetailSchema: z.ZodObject<{
@@ -112,6 +112,36 @@ declare const connectionSchema: z.ZodObject<{
112
112
  }>;
113
113
  type Connection = z.infer<typeof connectionSchema>;
114
114
 
115
+ declare const itemPartnerSchema: z.ZodObject<{
116
+ itemPartnerId: z.ZodNumber;
117
+ retailerId: z.ZodNumber;
118
+ supplierId: z.ZodNumber;
119
+ catalogId: z.ZodNumber;
120
+ isActive: z.ZodNumber;
121
+ createdDate: z.ZodString;
122
+ modifiedDate: z.ZodString;
123
+ applications: z.ZodArray<z.ZodEnum<["ASSORTMENT", "ITEM-XREF"]>, "many">;
124
+ }, "strip", z.ZodTypeAny, {
125
+ isActive: number;
126
+ createdDate: string;
127
+ modifiedDate: string;
128
+ retailerId: number;
129
+ supplierId: number;
130
+ catalogId: number;
131
+ itemPartnerId: number;
132
+ applications: ("ASSORTMENT" | "ITEM-XREF")[];
133
+ }, {
134
+ isActive: number;
135
+ createdDate: string;
136
+ modifiedDate: string;
137
+ retailerId: number;
138
+ supplierId: number;
139
+ catalogId: number;
140
+ itemPartnerId: number;
141
+ applications: ("ASSORTMENT" | "ITEM-XREF")[];
142
+ }>;
143
+ type ItemPartner = z.infer<typeof itemPartnerSchema>;
144
+
115
145
  declare const baseHierarchySchema: z.ZodObject<{
116
146
  id: z.ZodString;
117
147
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -3270,4 +3300,4 @@ declare const itemErrorDetailsSchema: z.ZodObject<{
3270
3300
  }>;
3271
3301
  type ItemErrorDetails = z.infer<typeof itemErrorDetailsSchema>;
3272
3302
 
3273
- export { downLoadItemsParamsSchema as $, AttributeSummary as A, HierarchyDetails as B, Connection as C, DownLoadItemsParams as D, ExportDayOfWeek as E, ItemPrice as F, GenerateImportTemplateParams as G, Hierarchy as H, ItemHierarchyResponse as I, PackComponentDetails as J, Bulb as K, PackComponent as L, MediaItem as M, RepeatableGroup as N, PackComponentItemInfo as O, PhaseEnum as P, ItemErrorDetails as Q, RegisteredService as R, SpsItemIdResponse as S, TradingPartnerStage as T, importDetailSchema as U, importErrorSchema as V, importStatusEnumSchema as W, generateImportTemplateParamsSchema as X, exportDayOfWeekEnum as Y, exportFrequencyEnum as Z, exportTypeEnum as _, ItemDetail as a, itemCategorySchema as a0, hierarchySchema as a1, itemHierarchyResponseSchema as a2, itemHierarchySchema as a3, attrDatatypeNameEnumSchema as a4, attributeGroupSchema as a5, attributeSummarySchema as a6, itemHeaderSchema as a7, itemMapSchema as a8, itemTableSchema as a9, registeredServiceSchema as aA, itemErrorDetailsSchema as aB, phaseEnumSchema as aa, tradingPartnerStageSchema as ab, bulbSchema as ac, itemPriceSchema as ad, mediaItemSchema as ae, itemDetailSchema as af, groupedItemSchema as ag, categoryEnumSchema as ah, packComponentSchema as ai, attributeDetailSchema as aj, repeatableGroupSchema as ak, componentDetailsSchema as al, hierarchyDetailsSchema as am, groupedAttributesSchema as an, hierarchyCategorySchema as ao, groupedAttributeListSchema as ap, packComponentDetailsSchema as aq, packComponentItemInfoSchema as ar, spsItemIdResponseSchema as as, spreadsheetTemplateCompanySchema as at, connectionSchema as au, identityServiceDatetimePreferencesSchema as av, identityServiceOrganizationMetadataSchema as aw, identityServiceOrganizationSchema as ax, identityServicePreferencesSchema as ay, identityServiceUserSchema as az, ImportDetails as b, ImportError as c, ImportStatusEnum as d, ExportFrequency as e, ExportType as f, ItemCategory as g, ItemHierarchy as h, AttrDatatypeNameEnum as i, AttributeGroup as j, SpreadsheetTemplateCompany as k, IdentityServiceOrganizationMetadata as l, IdentityServiceDatetimePreferences as m, IdentityServiceOrganization as n, IdentityServicePreferences as o, IdentityServiceUser as p, ItemHeader as q, ItemMap as r, ItemTable as s, AttributeDetail as t, CategoryEnum as u, ComponentDetails as v, GroupedAttributeList as w, GroupedAttributes as x, GroupedItem as y, HierarchyCategory as z };
3303
+ export { exportTypeEnum as $, AttributeSummary as A, HierarchyCategory as B, Connection as C, DownLoadItemsParams as D, ExportDayOfWeek as E, HierarchyDetails as F, GenerateImportTemplateParams as G, Hierarchy as H, ItemPartner as I, ItemPrice as J, PackComponentDetails as K, Bulb as L, MediaItem as M, PackComponent as N, RepeatableGroup as O, PhaseEnum as P, PackComponentItemInfo as Q, RegisteredService as R, SpsItemIdResponse as S, TradingPartnerStage as T, ItemErrorDetails as U, importDetailSchema as V, importErrorSchema as W, importStatusEnumSchema as X, generateImportTemplateParamsSchema as Y, exportDayOfWeekEnum as Z, exportFrequencyEnum as _, ItemHierarchyResponse as a, downLoadItemsParamsSchema as a0, itemCategorySchema as a1, hierarchySchema as a2, itemHierarchyResponseSchema as a3, itemHierarchySchema as a4, attrDatatypeNameEnumSchema as a5, attributeGroupSchema as a6, attributeSummarySchema as a7, itemHeaderSchema as a8, itemMapSchema as a9, identityServicePreferencesSchema as aA, identityServiceUserSchema as aB, registeredServiceSchema as aC, itemErrorDetailsSchema as aD, itemTableSchema as aa, phaseEnumSchema as ab, tradingPartnerStageSchema as ac, bulbSchema as ad, itemPriceSchema as ae, mediaItemSchema as af, itemDetailSchema as ag, groupedItemSchema as ah, categoryEnumSchema as ai, packComponentSchema as aj, attributeDetailSchema as ak, repeatableGroupSchema as al, componentDetailsSchema as am, hierarchyDetailsSchema as an, groupedAttributesSchema as ao, hierarchyCategorySchema as ap, groupedAttributeListSchema as aq, packComponentDetailsSchema as ar, packComponentItemInfoSchema as as, spsItemIdResponseSchema as at, spreadsheetTemplateCompanySchema as au, connectionSchema as av, itemPartnerSchema as aw, identityServiceDatetimePreferencesSchema as ax, identityServiceOrganizationMetadataSchema as ay, identityServiceOrganizationSchema as az, ItemDetail as b, ImportDetails as c, ImportError as d, ImportStatusEnum as e, ExportFrequency as f, ExportType as g, ItemCategory as h, ItemHierarchy as i, AttrDatatypeNameEnum as j, AttributeGroup as k, SpreadsheetTemplateCompany as l, IdentityServiceOrganizationMetadata as m, IdentityServiceDatetimePreferences as n, IdentityServiceOrganization as o, IdentityServicePreferences as p, IdentityServiceUser as q, ItemHeader as r, ItemMap as s, ItemTable as t, AttributeDetail as u, CategoryEnum as v, ComponentDetails as w, GroupedAttributeList as x, GroupedAttributes as y, GroupedItem as z };
package/dist/zod.cjs CHANGED
@@ -41,6 +41,8 @@ __export(zod_exports, {
41
41
  attributesByCompanySchema: () => attributesByCompanySchema,
42
42
  bulbSchema: () => bulbSchema,
43
43
  categoryEnumSchema: () => categoryEnumSchema,
44
+ companyBriefByOrgSchema: () => companyBriefByOrgSchema,
45
+ companyRelationshipUpsertBodySchema: () => companyRelationshipUpsertBodySchema,
44
46
  componentDetailsSchema: () => componentDetailsSchema,
45
47
  connectionSchema: () => connectionSchema,
46
48
  downLoadItemsParamsSchema: () => downLoadItemsParamsSchema,
@@ -77,6 +79,7 @@ __export(zod_exports, {
77
79
  itemHierarchyResponseSchema: () => itemHierarchyResponseSchema,
78
80
  itemHierarchySchema: () => itemHierarchySchema,
79
81
  itemMapSchema: () => itemMapSchema,
82
+ itemPartnerSchema: () => itemPartnerSchema,
80
83
  itemPriceSchema: () => itemPriceSchema,
81
84
  itemSearchViewSchema: () => itemSearchViewSchema,
82
85
  itemTableSchema: () => itemTableSchema,
@@ -3785,14 +3788,16 @@ var z = /* @__PURE__ */ Object.freeze({
3785
3788
 
3786
3789
  // lib/asstClient.ts
3787
3790
  var baseUrlsSchema = z.object({
3788
- local: z.literal("https://localhost:8443"),
3789
- test: z.literal("https://integration.api.spscommerce.com/assortment/gateway"),
3790
- prod: z.literal("https://api.spscommerce.com/assortment/gateway")
3791
+ local: z.literal("https://localhost:8443/"),
3792
+ test: z.literal(
3793
+ "https://integration.api.spscommerce.com/assortment/gateway/"
3794
+ ),
3795
+ prod: z.literal("https://api.spscommerce.com/assortment/gateway/")
3791
3796
  });
3792
3797
  var BASE_URLS = {
3793
- local: "https://localhost:8443",
3794
- test: "https://integration.api.spscommerce.com/assortment/gateway",
3795
- prod: "https://api.spscommerce.com/assortment/gateway"
3798
+ local: "https://localhost:8443/",
3799
+ test: "https://integration.api.spscommerce.com/assortment/gateway/",
3800
+ prod: "https://api.spscommerce.com/assortment/gateway/"
3796
3801
  };
3797
3802
  var envSchema = baseUrlsSchema.keyof();
3798
3803
  var initialConfig = {
@@ -4475,6 +4480,27 @@ var connectionSchema = z.object({
4475
4480
  partner_org_id: z.string()
4476
4481
  });
4477
4482
 
4483
+ // lib/tradingPartners/models/CompanyRelationshipUpsertBody.ts
4484
+ var companyRelationshipUpsertBodySchema = z.object({
4485
+ supplierId: z.number(),
4486
+ retailerId: z.number(),
4487
+ catalogId: z.number(),
4488
+ isActive: z.boolean(),
4489
+ applicationType: z.array(z.enum(["ASSORTMENT", "ITEM-XREF"])).default([])
4490
+ });
4491
+
4492
+ // lib/tradingPartners/models/ItemPartner.ts
4493
+ var itemPartnerSchema = z.object({
4494
+ itemPartnerId: z.number(),
4495
+ retailerId: z.number(),
4496
+ supplierId: z.number(),
4497
+ catalogId: z.number(),
4498
+ isActive: z.number(),
4499
+ createdDate: z.string(),
4500
+ modifiedDate: z.string(),
4501
+ applications: z.array(z.enum(["ASSORTMENT", "ITEM-XREF"]))
4502
+ });
4503
+
4478
4504
  // lib/tradingPartners/models/TradingPartnerAccessByCompanyId.ts
4479
4505
  var tradingPartnerAccessByCompanyIdSchema = z.object({
4480
4506
  companyId: z.number(),
@@ -4600,6 +4626,18 @@ var itemErrorDetailsResultSchema = z.object({
4600
4626
  itemName: z.string().nullable(),
4601
4627
  itemErrorDetails: z.array(itemErrorDetailsSchema)
4602
4628
  });
4629
+
4630
+ // lib/companies/models/CompanyBriefByOrg.ts
4631
+ var companyBriefByOrgSchema = z.object({
4632
+ companyId: z.number(),
4633
+ name: z.string(),
4634
+ orgId: z.string(),
4635
+ companyType: z.object({
4636
+ type: z.enum(["SUPPLIER", "RETAILER"]),
4637
+ display: z.enum(["SUPPLIER", "RETAILER"])
4638
+ }),
4639
+ dc4Id: z.number()
4640
+ });
4603
4641
  // Annotate the CommonJS export names for ESM import in node:
4604
4642
  0 && (module.exports = {
4605
4643
  attrDatatypeNameEnumSchema,
@@ -4613,6 +4651,8 @@ var itemErrorDetailsResultSchema = z.object({
4613
4651
  attributesByCompanySchema,
4614
4652
  bulbSchema,
4615
4653
  categoryEnumSchema,
4654
+ companyBriefByOrgSchema,
4655
+ companyRelationshipUpsertBodySchema,
4616
4656
  componentDetailsSchema,
4617
4657
  connectionSchema,
4618
4658
  downLoadItemsParamsSchema,
@@ -4649,6 +4689,7 @@ var itemErrorDetailsResultSchema = z.object({
4649
4689
  itemHierarchyResponseSchema,
4650
4690
  itemHierarchySchema,
4651
4691
  itemMapSchema,
4692
+ itemPartnerSchema,
4652
4693
  itemPriceSchema,
4653
4694
  itemSearchViewSchema,
4654
4695
  itemTableSchema,
package/dist/zod.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { d as attrProdTypeSchema, w as attributeDefinitionSchema, x as attributeMetaDataSchema, z as attributeValidValuesSchema, y as attributesByCompanySchema, p as envSchema, t as exportSchema, q as importErrorsSchema, r as importSchema, s as importsStatusSchema, u as itemCategoriesSearchSchema, D as itemDetailViewSchema, K as itemErrorDetailsResultSchema, C as itemSearchViewSchema, F as localeSchema, G as spreadsheetTemplateSchema, H as tradingPartnerAccessByCompanyIdSchema, J as userAccountSchema, v as vendorPartnerAttGroupsSchema } from './ItemErrorDetailsResult-317fbe3e.js';
2
- export { a4 as attrDatatypeNameEnumSchema, aj as attributeDetailSchema, a5 as attributeGroupSchema, a6 as attributeSummarySchema, ac as bulbSchema, ah as categoryEnumSchema, al as componentDetailsSchema, au as connectionSchema, $ as downLoadItemsParamsSchema, Y as exportDayOfWeekEnum, Z as exportFrequencyEnum, _ as exportTypeEnum, X as generateImportTemplateParamsSchema, ap as groupedAttributeListSchema, an as groupedAttributesSchema, ag as groupedItemSchema, ao as hierarchyCategorySchema, am as hierarchyDetailsSchema, a1 as hierarchySchema, av as identityServiceDatetimePreferencesSchema, aw as identityServiceOrganizationMetadataSchema, ax as identityServiceOrganizationSchema, ay as identityServicePreferencesSchema, az as identityServiceUserSchema, U as importDetailSchema, V as importErrorSchema, W as importStatusEnumSchema, a0 as itemCategorySchema, af as itemDetailSchema, aB as itemErrorDetailsSchema, a7 as itemHeaderSchema, a2 as itemHierarchyResponseSchema, a3 as itemHierarchySchema, a8 as itemMapSchema, ad as itemPriceSchema, a9 as itemTableSchema, ae as mediaItemSchema, aq as packComponentDetailsSchema, ar as packComponentItemInfoSchema, ai as packComponentSchema, aa as phaseEnumSchema, aA as registeredServiceSchema, ak as repeatableGroupSchema, at as spreadsheetTemplateCompanySchema, as as spsItemIdResponseSchema, ab as tradingPartnerStageSchema } from './zod-1c4396f8.js';
1
+ export { d as attrProdTypeSchema, x as attributeDefinitionSchema, y as attributeMetaDataSchema, D as attributeValidValuesSchema, z as attributesByCompanySchema, P as companyBriefByOrgSchema, M as companyRelationshipUpsertBodySchema, n as envSchema, u as exportSchema, r as importErrorsSchema, s as importSchema, t as importsStatusSchema, w as itemCategoriesSearchSchema, G as itemDetailViewSchema, O as itemErrorDetailsResultSchema, F as itemSearchViewSchema, H as localeSchema, J as spreadsheetTemplateSchema, K as tradingPartnerAccessByCompanyIdSchema, N as userAccountSchema, v as vendorPartnerAttGroupsSchema } from './CompanyBriefByOrg-eea5479d.js';
2
+ export { a5 as attrDatatypeNameEnumSchema, ak as attributeDetailSchema, a6 as attributeGroupSchema, a7 as attributeSummarySchema, ad as bulbSchema, ai as categoryEnumSchema, am as componentDetailsSchema, av as connectionSchema, a0 as downLoadItemsParamsSchema, Z as exportDayOfWeekEnum, _ as exportFrequencyEnum, $ as exportTypeEnum, Y as generateImportTemplateParamsSchema, aq as groupedAttributeListSchema, ao as groupedAttributesSchema, ah as groupedItemSchema, ap as hierarchyCategorySchema, an as hierarchyDetailsSchema, a2 as hierarchySchema, ax as identityServiceDatetimePreferencesSchema, ay as identityServiceOrganizationMetadataSchema, az as identityServiceOrganizationSchema, aA as identityServicePreferencesSchema, aB as identityServiceUserSchema, V as importDetailSchema, W as importErrorSchema, X as importStatusEnumSchema, a1 as itemCategorySchema, ag as itemDetailSchema, aD as itemErrorDetailsSchema, a8 as itemHeaderSchema, a3 as itemHierarchyResponseSchema, a4 as itemHierarchySchema, a9 as itemMapSchema, aw as itemPartnerSchema, ae as itemPriceSchema, aa as itemTableSchema, af as mediaItemSchema, ar as packComponentDetailsSchema, as as packComponentItemInfoSchema, aj as packComponentSchema, ab as phaseEnumSchema, aC as registeredServiceSchema, al as repeatableGroupSchema, au as spreadsheetTemplateCompanySchema, at as spsItemIdResponseSchema, ac as tradingPartnerStageSchema } from './zod-5a9153f1.js';
3
3
  import 'ky-universal';
4
4
  import 'ky';
5
5
  import 'zod';
package/dist/zod.js CHANGED
@@ -10,6 +10,8 @@ import {
10
10
  attributesByCompanySchema,
11
11
  bulbSchema,
12
12
  categoryEnumSchema,
13
+ companyBriefByOrgSchema,
14
+ companyRelationshipUpsertBodySchema,
13
15
  componentDetailsSchema,
14
16
  connectionSchema,
15
17
  downLoadItemsParamsSchema,
@@ -46,6 +48,7 @@ import {
46
48
  itemHierarchyResponseSchema,
47
49
  itemHierarchySchema,
48
50
  itemMapSchema,
51
+ itemPartnerSchema,
49
52
  itemPriceSchema,
50
53
  itemSearchViewSchema,
51
54
  itemTableSchema,
@@ -64,7 +67,7 @@ import {
64
67
  tradingPartnerStageSchema,
65
68
  userAccountSchema,
66
69
  vendorPartnerAttGroupsSchema
67
- } from "./chunk-HEFVXX2V.js";
70
+ } from "./chunk-VICSFYTR.js";
68
71
  export {
69
72
  attrDatatypeNameEnumSchema,
70
73
  attrProdTypeSchema,
@@ -77,6 +80,8 @@ export {
77
80
  attributesByCompanySchema,
78
81
  bulbSchema,
79
82
  categoryEnumSchema,
83
+ companyBriefByOrgSchema,
84
+ companyRelationshipUpsertBodySchema,
80
85
  componentDetailsSchema,
81
86
  connectionSchema,
82
87
  downLoadItemsParamsSchema,
@@ -113,6 +118,7 @@ export {
113
118
  itemHierarchyResponseSchema,
114
119
  itemHierarchySchema,
115
120
  itemMapSchema,
121
+ itemPartnerSchema,
116
122
  itemPriceSchema,
117
123
  itemSearchViewSchema,
118
124
  itemTableSchema,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Assortment Api is a collection of HTTP functions to use Assortment endpoints",
4
4
  "author": "Assortment",
5
5
  "repository": "https://github.com/SPSCommerce/assortment-main/tree/main/ui/packages/asst-api",
6
- "version": "0.0.1",
6
+ "version": "0.2.0",
7
7
  "files": [
8
8
  "dist"
9
9
  ],