@spscommerce/asst-api 0.1.0 → 1.0.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/{CompanyBriefByOrg-f1bfabb3.d.ts → CompanyBriefByOrg-HsKxilwl.d.ts} +158 -137
- package/dist/{chunk-PUQDOFRT.js → chunk-6FFDMMN5.js} +452 -198
- package/dist/{chunk-FDGLFR7X.js → chunk-C2N5RQWG.js} +104 -51
- package/dist/{index-d94fdfef.d.ts → index-wuCGfJSu.d.ts} +5 -2
- package/dist/index.cjs +623 -239
- package/dist/index.d.cts +617 -0
- package/dist/index.d.ts +327 -10
- package/dist/index.js +84 -4
- package/dist/msw.cjs +601 -297
- package/dist/msw.d.cts +833 -0
- package/dist/msw.d.ts +54 -28
- package/dist/msw.js +124 -88
- package/dist/{zod-ec1cdb27.d.ts → zod-9pZn6tpQ.d.ts} +232 -244
- package/dist/zod.cjs +454 -200
- package/dist/zod.d.cts +5 -0
- package/dist/zod.d.ts +2 -2
- package/dist/zod.js +5 -5
- package/package.json +2 -3
package/dist/msw.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as msw from 'msw';
|
|
2
2
|
import { ResponseResolver, RestRequest, RestContext, DefaultBodyType } from 'msw';
|
|
3
3
|
import * as msw_lib_glossary_de6278a9 from 'msw/lib/glossary-de6278a9';
|
|
4
|
-
import { A as AsstClient, I as ImportErrors, a as Import, b as ImportsStatus, V as VendorPartnerAttGroups, c as ItemCategoriesSearch, E as Export, d as attrProdTypeSchema, T as TradingPartnerAccessByCompanyId, U as UserAccount,
|
|
4
|
+
import { A as AsstClient, I as ImportErrors, a as Import, b as ImportsStatus, V as VendorPartnerAttGroups, c as ItemCategoriesSearch, E as Export, d as attrProdTypeSchema, T as TradingPartnerAccessByCompanyId, e as CompanyRelationshipUpsertBody, U as UserAccount, f as ItemErrorDetailsResult, L as Locale, g as ItemSearchView, h as ItemDetailView, i as AttributeMetaData, j as AttributesByCompany, k as AttributeDefinition, l as AttributeValidValues, S as SpreadsheetTemplate } from './CompanyBriefByOrg-HsKxilwl.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
import { I as ItemStatusResponse } from './index-
|
|
7
|
-
export { c as createCompaniesApi } from './index-
|
|
6
|
+
import { R as RetailerTradingPartnerStages, I as ItemStatusResponse } from './index-wuCGfJSu.js';
|
|
7
|
+
export { c as createCompaniesApi } from './index-wuCGfJSu.js';
|
|
8
8
|
import 'ky-universal';
|
|
9
9
|
import 'ky';
|
|
10
10
|
|
|
@@ -74,10 +74,10 @@ declare function createImportsApiHandlers(client: AsstClient): {
|
|
|
74
74
|
status: "QUEUED_FOR_IMPORT" | "IN_PROGRESS" | "DOC_FAILED" | "VALIDATION_FAILED" | "COMPLETED";
|
|
75
75
|
importId: number;
|
|
76
76
|
completedAt?: string | null | undefined;
|
|
77
|
-
docInEventId?: string | null | undefined;
|
|
78
77
|
errorCount?: number | null | undefined;
|
|
79
|
-
invalidItemCount?: number | null | undefined;
|
|
80
78
|
name?: string | null | undefined;
|
|
79
|
+
docInEventId?: string | null | undefined;
|
|
80
|
+
invalidItemCount?: number | null | undefined;
|
|
81
81
|
totalItemCount?: number | null | undefined;
|
|
82
82
|
validItemCount?: number | null | undefined;
|
|
83
83
|
}[];
|
|
@@ -105,6 +105,7 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
105
105
|
categoryName?: string;
|
|
106
106
|
}>, RestContext, ItemCategoriesSearch>): msw.RestHandler<msw_lib_glossary_de6278a9.M<DefaultBodyType>>;
|
|
107
107
|
generateData(): {
|
|
108
|
+
count: number;
|
|
108
109
|
data: {
|
|
109
110
|
type: string;
|
|
110
111
|
name: string;
|
|
@@ -113,13 +114,12 @@ declare function createCategoriesApiHandlers(client: AsstClient): {
|
|
|
113
114
|
companyId: number;
|
|
114
115
|
isActive: number;
|
|
115
116
|
typeId: number;
|
|
117
|
+
description?: string | null | undefined;
|
|
116
118
|
createdDate?: number | null | undefined;
|
|
117
119
|
categorytimestamp?: number | null | undefined;
|
|
118
120
|
categorykey?: string | null | undefined;
|
|
119
|
-
description?: string | null | undefined;
|
|
120
121
|
categoryCatalogName?: string | null | undefined;
|
|
121
122
|
}[];
|
|
122
|
-
count: number;
|
|
123
123
|
};
|
|
124
124
|
};
|
|
125
125
|
};
|
|
@@ -185,6 +185,32 @@ declare function createTradingPartnerAccessApiHandlers(client: AsstClient): {
|
|
|
185
185
|
}[];
|
|
186
186
|
};
|
|
187
187
|
};
|
|
188
|
+
upsertRelationship: {
|
|
189
|
+
(resolver?: ResponseResolver<RestRequest<CompanyRelationshipUpsertBody>, RestContext>): msw.RestHandler<msw_lib_glossary_de6278a9.M<msw_lib_glossary_de6278a9.h>>;
|
|
190
|
+
generateData(): {
|
|
191
|
+
isActive: number;
|
|
192
|
+
createdDate: string;
|
|
193
|
+
catalogId: number;
|
|
194
|
+
modifiedDate: string;
|
|
195
|
+
retailerId: number;
|
|
196
|
+
supplierId: number;
|
|
197
|
+
itemPartnerId: number;
|
|
198
|
+
applications: ("ASSORTMENT" | "ITEM-XREF")[];
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
upsertHierarchy: (resolver?: ResponseResolver<RestRequest<CompanyRelationshipUpsertBody>, RestContext>) => msw.RestHandler<msw_lib_glossary_de6278a9.M<msw_lib_glossary_de6278a9.h>>;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Generate collection of MSW request handlers for `TradingPartnerSettings Api`
|
|
206
|
+
* @param client Assortment Client instance
|
|
207
|
+
* @returns An object containing functions to generate MSW request handlers
|
|
208
|
+
*/
|
|
209
|
+
declare function createTradingPartnerSettingsApiHandlers(client: AsstClient): {
|
|
210
|
+
getRetailerStages: {
|
|
211
|
+
(resolver?: ResponseResolver<RestRequest<never>, RestContext, RetailerTradingPartnerStages>): msw.RestHandler<msw_lib_glossary_de6278a9.M<msw_lib_glossary_de6278a9.h>>;
|
|
212
|
+
generateData(): ("Core" | "Core Plus" | "Core Advanced" | "Enriched" | "Standard Requirements")[];
|
|
213
|
+
};
|
|
188
214
|
};
|
|
189
215
|
|
|
190
216
|
/**
|
|
@@ -205,9 +231,9 @@ declare function createWhoAmIApiHandlers(client: AsstClient): {
|
|
|
205
231
|
roles: string[];
|
|
206
232
|
organization: {
|
|
207
233
|
id: string;
|
|
234
|
+
namespace?: string | undefined;
|
|
208
235
|
organization_name?: string | undefined;
|
|
209
236
|
organization_site?: string | undefined;
|
|
210
|
-
namespace?: string | undefined;
|
|
211
237
|
permissions?: string[] | undefined;
|
|
212
238
|
metadata?: {
|
|
213
239
|
value: string;
|
|
@@ -217,6 +243,7 @@ declare function createWhoAmIApiHandlers(client: AsstClient): {
|
|
|
217
243
|
};
|
|
218
244
|
password: string;
|
|
219
245
|
verified: boolean;
|
|
246
|
+
description?: string | undefined;
|
|
220
247
|
email?: string | undefined;
|
|
221
248
|
first_name?: string | undefined;
|
|
222
249
|
last_name?: string | undefined;
|
|
@@ -234,7 +261,6 @@ declare function createWhoAmIApiHandlers(client: AsstClient): {
|
|
|
234
261
|
phone_number?: string | undefined;
|
|
235
262
|
twitter_handle?: string | undefined;
|
|
236
263
|
linkedin_url?: string | undefined;
|
|
237
|
-
description?: string | undefined;
|
|
238
264
|
preferences?: {
|
|
239
265
|
locale: string;
|
|
240
266
|
timezone: string;
|
|
@@ -298,11 +324,11 @@ declare function createErrorsApiHandlers(client: AsstClient): {
|
|
|
298
324
|
attributeDbNames: string[];
|
|
299
325
|
repeatableGroupId?: string | null | undefined;
|
|
300
326
|
}[];
|
|
327
|
+
gtin?: string | null | undefined;
|
|
301
328
|
upc?: string | null | undefined;
|
|
329
|
+
ean?: string | null | undefined;
|
|
302
330
|
isbn?: string | null | undefined;
|
|
303
|
-
gtin?: string | null | undefined;
|
|
304
331
|
partnumber?: string | null | undefined;
|
|
305
|
-
ean?: string | null | undefined;
|
|
306
332
|
};
|
|
307
333
|
};
|
|
308
334
|
};
|
|
@@ -405,31 +431,31 @@ declare function createItemsApiHandlers(client: AsstClient): {
|
|
|
405
431
|
identifiers: Record<string, any>;
|
|
406
432
|
hierarchyDetails: {
|
|
407
433
|
catalogs: {
|
|
408
|
-
type: "CATALOG" | "PRODUCT_CODE" | "SELECTION_CODE" | "
|
|
434
|
+
type: "CATALOG" | "PRODUCT_CODE" | "SELECTION_CODE" | "ALIAS" | "EXPORT" | "LEGACY_PRODUCT_TYPE" | "PRODUCT_CLASSIFICATION" | "TAG" | "TAXONOMY_ROOT";
|
|
409
435
|
name: string;
|
|
410
|
-
companyId: number;
|
|
411
436
|
id: number;
|
|
412
437
|
description?: string | null | undefined;
|
|
438
|
+
companyId?: number | null | undefined;
|
|
413
439
|
}[];
|
|
414
440
|
selectionCodes: {
|
|
415
|
-
type: "CATALOG" | "PRODUCT_CODE" | "SELECTION_CODE" | "
|
|
441
|
+
type: "CATALOG" | "PRODUCT_CODE" | "SELECTION_CODE" | "ALIAS" | "EXPORT" | "LEGACY_PRODUCT_TYPE" | "PRODUCT_CLASSIFICATION" | "TAG" | "TAXONOMY_ROOT";
|
|
416
442
|
name: string;
|
|
417
|
-
companyId: number;
|
|
418
443
|
id: number;
|
|
419
444
|
description?: string | null | undefined;
|
|
445
|
+
companyId?: number | null | undefined;
|
|
420
446
|
}[];
|
|
421
447
|
productCodes: {
|
|
422
|
-
type: "CATALOG" | "PRODUCT_CODE" | "SELECTION_CODE" | "
|
|
448
|
+
type: "CATALOG" | "PRODUCT_CODE" | "SELECTION_CODE" | "ALIAS" | "EXPORT" | "LEGACY_PRODUCT_TYPE" | "PRODUCT_CLASSIFICATION" | "TAG" | "TAXONOMY_ROOT";
|
|
423
449
|
name: string;
|
|
424
|
-
companyId: number;
|
|
425
450
|
id: number;
|
|
426
451
|
description?: string | null | undefined;
|
|
452
|
+
companyId?: number | null | undefined;
|
|
427
453
|
}[];
|
|
428
454
|
};
|
|
429
455
|
groupedAttributes: {
|
|
430
456
|
type: string;
|
|
431
457
|
attributes: {
|
|
432
|
-
value:
|
|
458
|
+
value: string | number | string[] | number[] | null;
|
|
433
459
|
type: "DATE" | "TEXT" | "SET" | "INTEGER" | "FLOAT" | "BOOLEAN" | "KEYVALUE" | "STRING" | "REAL";
|
|
434
460
|
name: string;
|
|
435
461
|
label: string;
|
|
@@ -439,7 +465,7 @@ declare function createItemsApiHandlers(client: AsstClient): {
|
|
|
439
465
|
attributeGroups: {
|
|
440
466
|
type: string;
|
|
441
467
|
rows: {
|
|
442
|
-
value:
|
|
468
|
+
value: string | number | string[] | number[] | null;
|
|
443
469
|
type: "DATE" | "TEXT" | "SET" | "INTEGER" | "FLOAT" | "BOOLEAN" | "KEYVALUE" | "STRING" | "REAL";
|
|
444
470
|
name: string;
|
|
445
471
|
label: string;
|
|
@@ -470,8 +496,9 @@ declare function createItemsApiHandlers(client: AsstClient): {
|
|
|
470
496
|
currency: string;
|
|
471
497
|
qualifier: string;
|
|
472
498
|
id?: number | null | undefined;
|
|
473
|
-
|
|
499
|
+
gtin?: string | null | undefined;
|
|
474
500
|
iteminfoid?: number | null | undefined;
|
|
501
|
+
priceDivision?: string | null | undefined;
|
|
475
502
|
startdate?: string | null | undefined;
|
|
476
503
|
enddate?: string | null | undefined;
|
|
477
504
|
region?: string | null | undefined;
|
|
@@ -482,7 +509,6 @@ declare function createItemsApiHandlers(client: AsstClient): {
|
|
|
482
509
|
range_type?: string | null | undefined;
|
|
483
510
|
date_range_type?: string | null | undefined;
|
|
484
511
|
min_range?: number | null | undefined;
|
|
485
|
-
gtin?: string | null | undefined;
|
|
486
512
|
priceConditionDescription?: string | null | undefined;
|
|
487
513
|
priceUnitQuantity?: number | null | undefined;
|
|
488
514
|
priceUnitQuantityUOM?: string | null | undefined;
|
|
@@ -490,23 +516,23 @@ declare function createItemsApiHandlers(client: AsstClient): {
|
|
|
490
516
|
}[];
|
|
491
517
|
childComponentDetails: {
|
|
492
518
|
valid: boolean;
|
|
493
|
-
description: string;
|
|
494
519
|
itemInfoId: number;
|
|
495
520
|
saleable: boolean;
|
|
496
521
|
uniqueCriteria: {
|
|
497
522
|
value: string;
|
|
498
523
|
name: string;
|
|
499
524
|
}[];
|
|
525
|
+
description?: string | null | undefined;
|
|
500
526
|
}[];
|
|
501
527
|
parentComponentDetails: {
|
|
502
528
|
valid: boolean;
|
|
503
|
-
description: string;
|
|
504
529
|
itemInfoId: number;
|
|
505
530
|
saleable: boolean;
|
|
506
531
|
uniqueCriteria: {
|
|
507
532
|
value: string;
|
|
508
533
|
name: string;
|
|
509
534
|
}[];
|
|
535
|
+
description?: string | null | undefined;
|
|
510
536
|
}[];
|
|
511
537
|
locales: string[];
|
|
512
538
|
};
|
|
@@ -650,6 +676,9 @@ declare function createAttributesApiHandlers(client: AsstClient): {
|
|
|
650
676
|
attrStorageId: number;
|
|
651
677
|
storageName: string;
|
|
652
678
|
};
|
|
679
|
+
description?: string | undefined;
|
|
680
|
+
orderWeight?: number | undefined;
|
|
681
|
+
parentAttributeId?: number | undefined;
|
|
653
682
|
attrRestrictions?: {
|
|
654
683
|
locale: string;
|
|
655
684
|
repeatable: boolean;
|
|
@@ -668,8 +697,6 @@ declare function createAttributesApiHandlers(client: AsstClient): {
|
|
|
668
697
|
attrKeyPair: string;
|
|
669
698
|
attrValueId?: number | undefined;
|
|
670
699
|
}[] | undefined;
|
|
671
|
-
description?: string | undefined;
|
|
672
|
-
orderWeight?: number | undefined;
|
|
673
700
|
parentAttribute?: {
|
|
674
701
|
createdDate: number;
|
|
675
702
|
createdBy: string;
|
|
@@ -718,7 +745,6 @@ declare function createAttributesApiHandlers(client: AsstClient): {
|
|
|
718
745
|
description?: string | undefined;
|
|
719
746
|
parentAttributeId?: number | undefined;
|
|
720
747
|
} | undefined;
|
|
721
|
-
parentAttributeId?: number | undefined;
|
|
722
748
|
}[];
|
|
723
749
|
};
|
|
724
750
|
getAttributeValidValues: {
|
|
@@ -764,8 +790,8 @@ declare function createSpreadsheetTemplateApiHandlers(client: AsstClient): {
|
|
|
764
790
|
createdAt: number;
|
|
765
791
|
}[];
|
|
766
792
|
createdBy?: string | null | undefined;
|
|
767
|
-
createdAt?: number | null | undefined;
|
|
768
793
|
modifiedBy?: string | null | undefined;
|
|
794
|
+
createdAt?: number | null | undefined;
|
|
769
795
|
modifiedAt?: number | null | undefined;
|
|
770
796
|
}[];
|
|
771
797
|
};
|
|
@@ -804,4 +830,4 @@ declare function createUniqueCriteriaApiHandlers(client: AsstClient): {
|
|
|
804
830
|
};
|
|
805
831
|
};
|
|
806
832
|
|
|
807
|
-
export { createAttributesApiHandlers, createCategoriesApiHandlers, createCompanyFeaturesApiHandlers, createErrorsApiHandlers, createExportsApiHandlers, createFeatureFlagsApiHandlers, createImportsApiHandlers, createItemsApiHandlers, createLocaleApiHandlers, createProductTypesApiHandlers, createSpreadsheetTemplateApiHandlers, createTradingPartnerAccessApiHandlers, createUniqueCriteriaApiHandlers, createWhoAmIApiHandlers };
|
|
833
|
+
export { createAttributesApiHandlers, createCategoriesApiHandlers, createCompanyFeaturesApiHandlers, createErrorsApiHandlers, createExportsApiHandlers, createFeatureFlagsApiHandlers, createImportsApiHandlers, createItemsApiHandlers, createLocaleApiHandlers, createProductTypesApiHandlers, createSpreadsheetTemplateApiHandlers, createTradingPartnerAccessApiHandlers, createTradingPartnerSettingsApiHandlers, createUniqueCriteriaApiHandlers, createWhoAmIApiHandlers };
|