@spscommerce/asst-api 4.7.0 → 4.8.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.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as msw from 'msw';
2
2
  import { ResponseResolver, HttpResponseResolver, HttpHandler } from 'msw';
3
- import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse, C as CompanyBriefByOrg } from './SpsItemIdResponse-gAHfCzwP.js';
3
+ import { A as AsstClient, I as ItemHierarchyResponse, S as SpsItemIdResponse, C as CompanyBriefByOrg } from './SpsItemIdResponse-BEq6yqtR.js';
4
4
  import { z } from 'zod';
5
+ import { C as CompanySearch, a as Company } from './CompanySearch-T6HJx4a6.js';
5
6
  import 'ky';
6
7
 
7
8
  /**
@@ -31,9 +32,9 @@ declare function createImportsApiHandlers(client: AsstClient): {
31
32
  count: number;
32
33
  imports: {
33
34
  status: string;
35
+ name: string;
34
36
  errorCount: number;
35
37
  importId: number;
36
- name: string;
37
38
  uploadedAt: string;
38
39
  completedAt?: number | null | undefined;
39
40
  startedAt?: string | null | undefined;
@@ -45,9 +46,9 @@ declare function createImportsApiHandlers(client: AsstClient): {
45
46
  generateData(): {
46
47
  status: "QUEUED_FOR_IMPORT" | "IN_PROGRESS" | "DOC_FAILED" | "VALIDATION_FAILED" | "COMPLETED";
47
48
  importId: number;
49
+ name?: string | null | undefined;
48
50
  completedAt?: string | null | undefined;
49
51
  errorCount?: number | null | undefined;
50
- name?: string | null | undefined;
51
52
  docInEventId?: string | null | undefined;
52
53
  invalidItemCount?: number | null | undefined;
53
54
  totalItemCount?: number | null | undefined;
@@ -78,14 +79,14 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
78
79
  count: number;
79
80
  data: {
80
81
  type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT";
81
- name: string;
82
82
  companyId: number;
83
+ name: string;
83
84
  categoryid: number;
84
85
  encodedCategoryId: string;
85
86
  isActive: number;
86
87
  typeId: number;
87
- description?: string | null | undefined;
88
88
  createdDate?: number | null | undefined;
89
+ description?: string | null | undefined;
89
90
  categorytimestamp?: number | null | undefined;
90
91
  categorykey?: string | null | undefined;
91
92
  categoryCatalogName?: string | null | undefined;
@@ -105,16 +106,16 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
105
106
  searchCatalogsByCompany: {
106
107
  (resolver?: ResponseResolver): msw.HttpHandler;
107
108
  generateData(): {
109
+ createdAt: string;
110
+ modifiedAt: string;
111
+ createdBy: string;
112
+ modifiedBy: string;
108
113
  categoryId: number;
109
114
  categoryName: string;
110
115
  categoryDescription: string;
111
116
  categoryDescriptionExt: string;
112
117
  ownerCompanyId: string;
113
118
  categoryTypeId: number;
114
- createdAt: string;
115
- modifiedAt: string;
116
- createdBy: string;
117
- modifiedBy: string;
118
119
  }[];
119
120
  };
120
121
  };
@@ -142,9 +143,9 @@ declare function createProductTypesApiHandlers(client: AsstClient): {
142
143
  next: string;
143
144
  previous: string;
144
145
  results: {
145
- description: string;
146
- createdDate: number;
147
146
  createdBy: string;
147
+ createdDate: number;
148
+ description: string;
148
149
  attrProdTypeId: number;
149
150
  productType: string;
150
151
  modifiedBy?: string | undefined;
@@ -164,11 +165,7 @@ declare function createTradingPartnerAccessApiHandlers(client: AsstClient): {
164
165
  getAllTradingPartners: {
165
166
  (resolver?: ResponseResolver): msw.HttpHandler;
166
167
  generateData(): {
167
- count: number;
168
168
  companyId: number;
169
- companyType: string;
170
- identityOrgId: string;
171
- companyName: string;
172
169
  connections: {
173
170
  catalog_id: number;
174
171
  catalog_name: string | null;
@@ -176,18 +173,22 @@ declare function createTradingPartnerAccessApiHandlers(client: AsstClient): {
176
173
  partner_company_id: number;
177
174
  partner_org_id: string;
178
175
  }[];
176
+ count: number;
177
+ companyType: string;
178
+ identityOrgId: string;
179
+ companyName: string;
179
180
  };
180
181
  };
181
182
  upsertRelationship: {
182
183
  (resolver?: ResponseResolver): msw.HttpHandler;
183
184
  generateData(): {
184
- isActive: number;
185
- createdDate: string;
186
185
  catalogId: number;
186
+ itemPartnerId: number;
187
+ createdDate: string;
187
188
  modifiedDate: string;
189
+ isActive: number;
188
190
  retailerId: number;
189
191
  supplierId: number;
190
- itemPartnerId: number;
191
192
  applications: ("ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR")[];
192
193
  };
193
194
  };
@@ -215,8 +216,9 @@ declare function createWhoAmIApiHandlers(client: AsstClient): {
215
216
  whoAmI: {
216
217
  (resolver?: ResponseResolver): msw.HttpHandler;
217
218
  generateData(): {
218
- name: string;
219
219
  companyId: number;
220
+ name: string;
221
+ uniqueAttributes: string[];
220
222
  companyName: string;
221
223
  identityUser: {
222
224
  name: string;
@@ -277,7 +279,6 @@ declare function createWhoAmIApiHandlers(client: AsstClient): {
277
279
  serviceId: number;
278
280
  identityServiceId: number;
279
281
  };
280
- uniqueAttributes: string[];
281
282
  admin: boolean;
282
283
  adminToolUser: boolean;
283
284
  attributeRegistryAdmin: boolean;
@@ -460,22 +461,22 @@ declare function createItemsApiHandlers(client: AsstClient): {
460
461
  type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT" | "ALIAS" | "LEGACY_PRODUCT_TYPE" | "PRODUCT_CLASSIFICATION" | "TAG" | "TAXONOMY_ROOT";
461
462
  name: string;
462
463
  id: number;
463
- description?: string | null | undefined;
464
464
  companyId?: number | null | undefined;
465
+ description?: string | null | undefined;
465
466
  }[];
466
467
  selectionCodes: {
467
468
  type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT" | "ALIAS" | "LEGACY_PRODUCT_TYPE" | "PRODUCT_CLASSIFICATION" | "TAG" | "TAXONOMY_ROOT";
468
469
  name: string;
469
470
  id: number;
470
- description?: string | null | undefined;
471
471
  companyId?: number | null | undefined;
472
+ description?: string | null | undefined;
472
473
  }[];
473
474
  productCodes: {
474
475
  type: "CATALOG" | "SELECTION_CODE" | "PRODUCT_CODE" | "EXPORT" | "ALIAS" | "LEGACY_PRODUCT_TYPE" | "PRODUCT_CLASSIFICATION" | "TAG" | "TAXONOMY_ROOT";
475
476
  name: string;
476
477
  id: number;
477
- description?: string | null | undefined;
478
478
  companyId?: number | null | undefined;
479
+ description?: string | null | undefined;
479
480
  }[];
480
481
  };
481
482
  groupedAttributes: {
@@ -542,22 +543,22 @@ declare function createItemsApiHandlers(client: AsstClient): {
542
543
  }[];
543
544
  childComponentDetails: {
544
545
  valid: boolean;
545
- itemInfoId: number;
546
- saleable: boolean;
547
546
  uniqueCriteria: {
548
547
  value: string;
549
548
  name: string;
550
549
  }[];
550
+ itemInfoId: number;
551
+ saleable: boolean;
551
552
  description?: string | null | undefined;
552
553
  }[];
553
554
  parentComponentDetails: {
554
555
  valid: boolean;
555
- itemInfoId: number;
556
- saleable: boolean;
557
556
  uniqueCriteria: {
558
557
  value: string;
559
558
  name: string;
560
559
  }[];
560
+ itemInfoId: number;
561
+ saleable: boolean;
561
562
  description?: string | null | undefined;
562
563
  }[];
563
564
  locales: string[];
@@ -684,13 +685,82 @@ declare function createCompaniesApiHandlers(client: AsstClient): {
684
685
  getCompanyBriefInfoByOrg: {
685
686
  (resolver?: HttpResponseResolver<never, never, CompanyBriefByOrg>): msw.HttpHandler;
686
687
  generateData(): {
687
- name: string;
688
688
  companyId: number;
689
+ name: string;
689
690
  orgId: string;
690
691
  companyTypes: ("SUPPLIER" | "RETAILER")[];
691
692
  dc4Id: number;
692
693
  };
693
694
  };
695
+ companySearch: {
696
+ (resolver?: HttpResponseResolver<never, never, CompanySearch[]>): msw.HttpHandler;
697
+ generateData(): {
698
+ id: string;
699
+ organizationName: string;
700
+ description: string;
701
+ roles: ("SUPPLIER" | "RETAILER")[];
702
+ connections: number;
703
+ serviceName: string;
704
+ catalogs: {
705
+ categoryId: number;
706
+ categoryName: string;
707
+ }[];
708
+ orgId?: string | undefined;
709
+ application?: ("ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR")[] | undefined;
710
+ uniqueCriteria?: string[] | undefined;
711
+ }[];
712
+ };
713
+ getCompanyById: {
714
+ (resolver?: HttpResponseResolver<{
715
+ companyId: string;
716
+ }, never, Company>): msw.HttpHandler;
717
+ generateData(): {
718
+ companyId: number;
719
+ name: string;
720
+ companyTypes: ("SUPPLIER" | "RETAILER")[];
721
+ active: boolean;
722
+ createdAt: number | null;
723
+ modifiedAt: number | null;
724
+ features: {
725
+ type: string;
726
+ active: boolean;
727
+ createdBy: string | null;
728
+ createdDate: number | null;
729
+ display: string;
730
+ modifiedBy: string | null;
731
+ modifiedDate: number | null;
732
+ }[];
733
+ identity: {
734
+ orgId: string | null;
735
+ service: {
736
+ name: string;
737
+ } | null;
738
+ };
739
+ relationships: {
740
+ application: {
741
+ application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
742
+ relationshipApplicationId: number;
743
+ }[];
744
+ active: boolean;
745
+ catalog: {
746
+ active: boolean;
747
+ catalogId: number;
748
+ itemPartnerId: number;
749
+ }[];
750
+ company: {
751
+ companyId: number;
752
+ name: string;
753
+ orgId: string;
754
+ companyTypes: ("SUPPLIER" | "RETAILER")[];
755
+ dc4Id: number | null;
756
+ };
757
+ createdAt: number;
758
+ modifiedAt: number | null;
759
+ relationshipId: number;
760
+ }[];
761
+ uniqueAttributes: string[];
762
+ };
763
+ };
694
764
  };
695
765
 
696
766
  /**
package/dist/msw.js CHANGED
@@ -20,12 +20,14 @@ import {
20
20
  BASE_URL_V2,
21
21
  FlattenedItemIdentifierKeysSchema,
22
22
  retailerTradingPartnerStages
23
- } from "./chunk-IZLZKWK7.js";
23
+ } from "./chunk-ZAW3TKZQ.js";
24
24
  import {
25
25
  attrProdTypeSchema,
26
26
  catalogBriefResponseSchema,
27
27
  catalogCreateResponseSchema,
28
28
  companyBriefByOrgSchema,
29
+ companySchema,
30
+ companySearchSchema,
29
31
  external_exports,
30
32
  importErrorsSchema,
31
33
  importSchema,
@@ -47,7 +49,7 @@ import {
47
49
  tradingPartnerAccessByCompanyIdSchema,
48
50
  userAccountSchema,
49
51
  vendorPartnerAttGroupsSchema
50
- } from "./chunk-BMTYM2N6.js";
52
+ } from "./chunk-52RZCPMT.js";
51
53
 
52
54
  // lib/imports/mockHandlers.ts
53
55
  import { generateMock } from "@anatine/zod-mock";
@@ -558,8 +560,27 @@ function createCompaniesApiHandlers(client) {
558
560
  return http16.get(`${client.getBaseUrl()}${BASE_URL17}/brief`, resolver);
559
561
  }
560
562
  getCompanyBriefInfoByOrg.generateData = () => generateMock15(companyBriefByOrgSchema);
563
+ function companySearch(resolver = (_info) => {
564
+ const data = Array.from(
565
+ { length: 3 },
566
+ () => generateMock15(companySearchSchema)
567
+ );
568
+ return HttpResponse16.json(data);
569
+ }) {
570
+ return http16.get(`${client.getBaseUrl()}${BASE_URL17}/search`, resolver);
571
+ }
572
+ companySearch.generateData = () => Array.from({ length: 3 }, () => generateMock15(companySearchSchema));
573
+ function getCompanyById(resolver = (_info) => {
574
+ const data = generateMock15(companySchema);
575
+ return HttpResponse16.json(data);
576
+ }) {
577
+ return http16.get(`${client.getBaseUrl()}${BASE_URL17}/:companyId`, resolver);
578
+ }
579
+ getCompanyById.generateData = () => generateMock15(companySchema);
561
580
  return {
562
- getCompanyBriefInfoByOrg
581
+ getCompanyBriefInfoByOrg,
582
+ companySearch,
583
+ getCompanyById
563
584
  };
564
585
  }
565
586