@spscommerce/asst-api 5.3.0 → 5.3.3
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/{CompanySearch-7_L0_02Y.d.cts → CompanySearch-BbVFcsAx.d.ts} +1 -1
- package/dist/{SpsItemIdResponse-CSZKx_Tz.d.cts → SpsItemIdResponse-CorAaMf-.d.ts} +6 -6
- package/dist/chunk-ATHXI7QZ.js +1049 -0
- package/dist/{chunk-35CHQUKC.js → chunk-FECWD4HI.js} +101 -42
- package/dist/{chunk-XSWAONLH.js → chunk-JOTJ2YCI.js} +5 -8
- package/dist/index.cjs +1553 -4590
- package/dist/index.d.ts +8 -7
- package/dist/index.js +3 -3
- package/dist/msw.cjs +765 -4642
- package/dist/msw.d.ts +3 -2
- package/dist/msw.js +41 -25
- package/dist/{zod-CFHO1Ktc.d.cts → zod-BTAcqNX0.d.ts} +21 -4
- package/dist/zod.cjs +736 -4654
- package/dist/zod.d.ts +2 -2
- package/dist/zod.js +49 -36
- package/package.json +17 -11
- package/dist/CompanySearch-7_L0_02Y.d.ts +0 -313
- package/dist/SpsItemIdResponse-CSZKx_Tz.d.ts +0 -102
- package/dist/chunk-3H53DOKQ.js +0 -5009
- package/dist/index.d.cts +0 -994
- package/dist/msw.d.cts +0 -808
- package/dist/zod-DOSs4Eg9.d.ts +0 -5876
- package/dist/zod.d.cts +0 -4
package/dist/zod.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as companyBriefByOrgSchema, e as envSchema, i as itemHierarchyResponseSchema, s as spsItemIdResponseSchema } from './SpsItemIdResponse-
|
|
2
|
-
export {
|
|
1
|
+
export { d as companyBriefByOrgSchema, e as envSchema, i as itemHierarchyResponseSchema, s as spsItemIdResponseSchema } from './SpsItemIdResponse-CorAaMf-.js';
|
|
2
|
+
export { a9 as attrProdTypeSchema, aa as attributeDetailSchema, ab as bulbSchema, ac as categoryEnumSchema, ad as categoryTypeSchema, ae as companyRelationshipUpsertBodySchema, af as componentDetailsSchema, ag as connectionSchema, ah as downloadCatalogedItemsParamsSchema, ai as downloadItemsParamsSchema, aj as exportDayOfWeekEnum, ak as exportFrequencyEnum, al as exportSchema, am as exportTypeEnum, an as generateImportTemplateParamsSchema, ao as groupedAttributeListSchema, ap as groupedAttributesSchema, aq as groupedItemSchema, ar as hierarchyCategorySchema, as as hierarchyDetailsSchema, at as identityServiceDatetimePreferencesSchema, au as identityServiceOrganizationMetadataSchema, av as identityServiceOrganizationSchema, aw as identityServicePreferencesSchema, ax as identityServiceUserSchema, ay as importDetailSchema, az as importErrorSchema, aA as importErrorsSchema, aB as importSchema, aC as importStatusEnumSchema, aD as importsStatusSchema, aE as itemCategoriesSearchSchema, aF as itemCategorySchema, aG as itemDetailSchema, aH as itemDetailViewSchema, aI as itemErrorDetailsResultSchema, aJ as itemErrorDetailsResultV2Schema, aK as itemErrorDetailsSchema, aL as itemErrorDetailsV2Schema, aM as itemErrorSummaryResultV2Schema, aN as itemErrorSummaryV2Schema, aO as itemHeaderSchema, aP as itemMapSchema, aQ as itemPartnerSchema, aR as itemPriceSchema, aS as itemSearchViewSchema, aT as itemTableSchema, aU as localeSchema, aV as mediaItemSchema, aW as packComponentDetailsSchema, aX as packComponentItemInfoSchema, aY as packComponentSchema, aZ as phaseEnumSchema, a_ as registeredServiceSchema, a$ as repeatableGroupSchema, b0 as spreadsheetTemplateCompanySchema, b1 as spreadsheetTemplateSchema, b2 as tradingPartnerAccessByCompanyIdSchema, b3 as tradingPartnerStageSchema, b4 as tradingPartnerStageV2Schema, b5 as userAccountSchema, b6 as vendorPartnerAttGroupsSchema } from './zod-BTAcqNX0.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import 'ky';
|
package/dist/zod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
envSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JOTJ2YCI.js";
|
|
4
4
|
import {
|
|
5
5
|
attrProdTypeSchema,
|
|
6
6
|
attributeDetailSchema,
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
companyRelationshipUpsertBodySchema,
|
|
12
12
|
componentDetailsSchema,
|
|
13
13
|
connectionSchema,
|
|
14
|
-
external_exports,
|
|
15
14
|
generateImportTemplateParamsSchema,
|
|
16
15
|
groupedAttributeListSchema,
|
|
17
16
|
groupedAttributesSchema,
|
|
@@ -62,13 +61,18 @@ import {
|
|
|
62
61
|
tradingPartnerStageV2Schema,
|
|
63
62
|
userAccountSchema,
|
|
64
63
|
vendorPartnerAttGroupsSchema
|
|
65
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-ATHXI7QZ.js";
|
|
65
|
+
|
|
66
|
+
// lib/exports/models/Export.ts
|
|
67
|
+
import { z as z4 } from "zod";
|
|
66
68
|
|
|
67
69
|
// lib/exports/models/ExportType.ts
|
|
68
|
-
|
|
70
|
+
import { z } from "zod";
|
|
71
|
+
var exportTypeEnum = z.enum(["ALL", "UPDATES", "DELTAS_UPDATE", "NO_BUYER_PART_NUMBER"]);
|
|
69
72
|
|
|
70
73
|
// lib/exports/models/ExportFrequency.ts
|
|
71
|
-
|
|
74
|
+
import { z as z2 } from "zod";
|
|
75
|
+
var exportFrequencyEnum = z2.enum([
|
|
72
76
|
"IMMEDIATE",
|
|
73
77
|
"ONETIME",
|
|
74
78
|
"DAILY",
|
|
@@ -77,7 +81,8 @@ var exportFrequencyEnum = external_exports.enum([
|
|
|
77
81
|
]);
|
|
78
82
|
|
|
79
83
|
// lib/exports/models/ExportDayOfWeek.ts
|
|
80
|
-
|
|
84
|
+
import { z as z3 } from "zod";
|
|
85
|
+
var exportDayOfWeekEnum = z3.enum([
|
|
81
86
|
"MON",
|
|
82
87
|
"TUE",
|
|
83
88
|
"WED",
|
|
@@ -88,40 +93,47 @@ var exportDayOfWeekEnum = external_exports.enum([
|
|
|
88
93
|
]);
|
|
89
94
|
|
|
90
95
|
// lib/exports/models/Export.ts
|
|
91
|
-
var exportSchema =
|
|
92
|
-
exportName:
|
|
93
|
-
exportDescription:
|
|
94
|
-
isActive:
|
|
96
|
+
var exportSchema = z4.object({
|
|
97
|
+
exportName: z4.string(),
|
|
98
|
+
exportDescription: z4.string(),
|
|
99
|
+
isActive: z4.boolean(),
|
|
95
100
|
exportType: exportTypeEnum,
|
|
96
101
|
exportFrequency: exportFrequencyEnum,
|
|
97
|
-
includeValidAttributes:
|
|
98
|
-
dayOfMonth:
|
|
99
|
-
dayOfWeek:
|
|
100
|
-
hourOfDay:
|
|
101
|
-
date:
|
|
102
|
-
reportType:
|
|
103
|
-
catalogIds:
|
|
104
|
-
itemInfoIds:
|
|
105
|
-
excludeItemInfoIds:
|
|
106
|
-
selectionCodeIds:
|
|
107
|
-
productCodeIds:
|
|
108
|
-
productTypes:
|
|
109
|
-
deliveryType:
|
|
110
|
-
spreadsheetTemplateId:
|
|
111
|
-
emailAddresses:
|
|
112
|
-
subjectLine:
|
|
113
|
-
additionalLocales:
|
|
114
|
-
availableAttributeList:
|
|
115
|
-
systemInstanceId:
|
|
116
|
-
includeUncatalogedItems:
|
|
102
|
+
includeValidAttributes: z4.optional(z4.boolean()),
|
|
103
|
+
dayOfMonth: z4.optional(z4.number()),
|
|
104
|
+
dayOfWeek: z4.optional(exportDayOfWeekEnum),
|
|
105
|
+
hourOfDay: z4.optional(z4.number()),
|
|
106
|
+
date: z4.optional(z4.string()),
|
|
107
|
+
reportType: z4.optional(z4.enum(["SUPPLIER_REPORT", "RETAILER_REPORT"])),
|
|
108
|
+
catalogIds: z4.optional(z4.array(z4.number())),
|
|
109
|
+
itemInfoIds: z4.optional(z4.array(z4.number())),
|
|
110
|
+
excludeItemInfoIds: z4.optional(z4.array(z4.number())),
|
|
111
|
+
selectionCodeIds: z4.optional(z4.array(z4.number())),
|
|
112
|
+
productCodeIds: z4.optional(z4.array(z4.number())),
|
|
113
|
+
productTypes: z4.optional(z4.array(z4.string())),
|
|
114
|
+
deliveryType: z4.optional(z4.string()),
|
|
115
|
+
spreadsheetTemplateId: z4.optional(z4.number()),
|
|
116
|
+
emailAddresses: z4.optional(z4.array(z4.string())),
|
|
117
|
+
subjectLine: z4.optional(z4.string()),
|
|
118
|
+
additionalLocales: z4.optional(z4.array(z4.string())),
|
|
119
|
+
availableAttributeList: z4.optional(z4.array(z4.string())),
|
|
120
|
+
systemInstanceId: z4.optional(z4.string()),
|
|
121
|
+
includeUncatalogedItems: z4.optional(z4.boolean())
|
|
117
122
|
});
|
|
118
123
|
|
|
119
124
|
// lib/exports/models/DownloadItemsParams.ts
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
import { z as z5 } from "zod";
|
|
126
|
+
var downloadItemsParamsSchema = z5.object({
|
|
127
|
+
"multi-sheet": z5.boolean(),
|
|
128
|
+
ids: z5.array(z5.string()),
|
|
129
|
+
availableAttributes: z5.array(z5.string()).optional(),
|
|
130
|
+
ownerOrgId: z5.string().optional()
|
|
131
|
+
});
|
|
132
|
+
var downloadCatalogedItemsParamsSchema = z5.object({
|
|
133
|
+
"multi-sheet": z5.boolean(),
|
|
134
|
+
ids: z5.array(z5.string()),
|
|
135
|
+
availableAttributes: z5.array(z5.string()).optional(),
|
|
136
|
+
orgId: z5.string().optional()
|
|
125
137
|
});
|
|
126
138
|
export {
|
|
127
139
|
attrProdTypeSchema,
|
|
@@ -133,7 +145,8 @@ export {
|
|
|
133
145
|
companyRelationshipUpsertBodySchema,
|
|
134
146
|
componentDetailsSchema,
|
|
135
147
|
connectionSchema,
|
|
136
|
-
|
|
148
|
+
downloadCatalogedItemsParamsSchema,
|
|
149
|
+
downloadItemsParamsSchema,
|
|
137
150
|
envSchema,
|
|
138
151
|
exportDayOfWeekEnum,
|
|
139
152
|
exportFrequencyEnum,
|
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": "5.3.
|
|
6
|
+
"version": "5.3.3",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
@@ -27,15 +27,11 @@
|
|
|
27
27
|
"require": "./dist/zod.cjs"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"example": "vite",
|
|
32
|
-
"build": "tsup",
|
|
33
|
-
"build:watch": "tsup --watch"
|
|
34
|
-
},
|
|
35
30
|
"peerDependencies": {
|
|
36
31
|
"@anatine/zod-mock": "^3.13.4",
|
|
37
32
|
"@faker-js/faker": "^8.4.1",
|
|
38
|
-
"msw": "^2"
|
|
33
|
+
"msw": "^2",
|
|
34
|
+
"zod": "^3"
|
|
39
35
|
},
|
|
40
36
|
"peerDependenciesMeta": {
|
|
41
37
|
"@anatine/zod-mock": {
|
|
@@ -46,20 +42,30 @@
|
|
|
46
42
|
},
|
|
47
43
|
"msw": {
|
|
48
44
|
"optional": true
|
|
45
|
+
},
|
|
46
|
+
"zod": {
|
|
47
|
+
"optional": false
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
52
51
|
"@anatine/zod-mock": "^3.13.4",
|
|
53
52
|
"@faker-js/faker": "^8.4.1",
|
|
54
53
|
"@microsoft/api-extractor": "^7.47.9",
|
|
54
|
+
"msw": "^2.11.3",
|
|
55
55
|
"tsup": "^8.3.0",
|
|
56
|
-
"
|
|
56
|
+
"typescript": "~5.8.3",
|
|
57
|
+
"vite": "^6.2.6",
|
|
58
|
+
"zod": "^3.23.8"
|
|
57
59
|
},
|
|
58
60
|
"dependencies": {
|
|
59
|
-
"ky": "
|
|
60
|
-
"ky-universal": "0.8.2"
|
|
61
|
+
"ky": "^1.7.2"
|
|
61
62
|
},
|
|
62
63
|
"msw": {
|
|
63
64
|
"workerDirectory": "public"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"example": "vite",
|
|
68
|
+
"build": "tsup",
|
|
69
|
+
"build:watch": "tsup --watch"
|
|
64
70
|
}
|
|
65
|
-
}
|
|
71
|
+
}
|
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
declare const companySchema: z.ZodObject<{
|
|
4
|
-
active: z.ZodBoolean;
|
|
5
|
-
companyId: z.ZodNumber;
|
|
6
|
-
companyTypes: z.ZodArray<z.ZodEnum<["SUPPLIER", "RETAILER"]>, "many">;
|
|
7
|
-
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
8
|
-
features: z.ZodArray<z.ZodObject<{
|
|
9
|
-
active: z.ZodBoolean;
|
|
10
|
-
createdBy: z.ZodNullable<z.ZodString>;
|
|
11
|
-
createdDate: z.ZodNullable<z.ZodNumber>;
|
|
12
|
-
display: z.ZodString;
|
|
13
|
-
modifiedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
-
modifiedDate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
15
|
-
type: z.ZodString;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
type: string;
|
|
18
|
-
active: boolean;
|
|
19
|
-
createdBy: string | null;
|
|
20
|
-
createdDate: number | null;
|
|
21
|
-
display: string;
|
|
22
|
-
modifiedBy?: string | null | undefined;
|
|
23
|
-
modifiedDate?: number | null | undefined;
|
|
24
|
-
}, {
|
|
25
|
-
type: string;
|
|
26
|
-
active: boolean;
|
|
27
|
-
createdBy: string | null;
|
|
28
|
-
createdDate: number | null;
|
|
29
|
-
display: string;
|
|
30
|
-
modifiedBy?: string | null | undefined;
|
|
31
|
-
modifiedDate?: number | null | undefined;
|
|
32
|
-
}>, "many">;
|
|
33
|
-
identity: z.ZodObject<{
|
|
34
|
-
orgId: z.ZodNullable<z.ZodString>;
|
|
35
|
-
service: z.ZodNullable<z.ZodObject<{
|
|
36
|
-
name: z.ZodString;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
name: string;
|
|
39
|
-
}, {
|
|
40
|
-
name: string;
|
|
41
|
-
}>>;
|
|
42
|
-
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
orgId: string | null;
|
|
44
|
-
service: {
|
|
45
|
-
name: string;
|
|
46
|
-
} | null;
|
|
47
|
-
}, {
|
|
48
|
-
orgId: string | null;
|
|
49
|
-
service: {
|
|
50
|
-
name: string;
|
|
51
|
-
} | null;
|
|
52
|
-
}>;
|
|
53
|
-
modifiedAt: z.ZodNullable<z.ZodNumber>;
|
|
54
|
-
name: z.ZodString;
|
|
55
|
-
relationships: z.ZodArray<z.ZodObject<{
|
|
56
|
-
active: z.ZodBoolean;
|
|
57
|
-
application: z.ZodArray<z.ZodObject<{
|
|
58
|
-
application: z.ZodEnum<["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"]>;
|
|
59
|
-
relationshipApplicationId: z.ZodNumber;
|
|
60
|
-
}, "strip", z.ZodTypeAny, {
|
|
61
|
-
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
62
|
-
relationshipApplicationId: number;
|
|
63
|
-
}, {
|
|
64
|
-
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
65
|
-
relationshipApplicationId: number;
|
|
66
|
-
}>, "many">;
|
|
67
|
-
catalog: z.ZodArray<z.ZodObject<{
|
|
68
|
-
active: z.ZodBoolean;
|
|
69
|
-
catalogId: z.ZodNumber;
|
|
70
|
-
itemPartnerId: z.ZodNumber;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
active: boolean;
|
|
73
|
-
catalogId: number;
|
|
74
|
-
itemPartnerId: number;
|
|
75
|
-
}, {
|
|
76
|
-
active: boolean;
|
|
77
|
-
catalogId: number;
|
|
78
|
-
itemPartnerId: number;
|
|
79
|
-
}>, "many">;
|
|
80
|
-
company: z.ZodObject<{
|
|
81
|
-
companyId: z.ZodNumber;
|
|
82
|
-
companyTypes: z.ZodArray<z.ZodEnum<["SUPPLIER", "RETAILER"]>, "many">;
|
|
83
|
-
dc4Id: z.ZodNullable<z.ZodNumber>;
|
|
84
|
-
name: z.ZodString;
|
|
85
|
-
orgId: z.ZodString;
|
|
86
|
-
}, "strip", z.ZodTypeAny, {
|
|
87
|
-
companyId: number;
|
|
88
|
-
name: string;
|
|
89
|
-
orgId: string;
|
|
90
|
-
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
91
|
-
dc4Id: number | null;
|
|
92
|
-
}, {
|
|
93
|
-
companyId: number;
|
|
94
|
-
name: string;
|
|
95
|
-
orgId: string;
|
|
96
|
-
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
97
|
-
dc4Id: number | null;
|
|
98
|
-
}>;
|
|
99
|
-
createdAt: z.ZodNumber;
|
|
100
|
-
modifiedAt: z.ZodNullable<z.ZodNumber>;
|
|
101
|
-
relationshipId: z.ZodNumber;
|
|
102
|
-
}, "strip", z.ZodTypeAny, {
|
|
103
|
-
application: {
|
|
104
|
-
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
105
|
-
relationshipApplicationId: number;
|
|
106
|
-
}[];
|
|
107
|
-
active: boolean;
|
|
108
|
-
catalog: {
|
|
109
|
-
active: boolean;
|
|
110
|
-
catalogId: number;
|
|
111
|
-
itemPartnerId: number;
|
|
112
|
-
}[];
|
|
113
|
-
company: {
|
|
114
|
-
companyId: number;
|
|
115
|
-
name: string;
|
|
116
|
-
orgId: string;
|
|
117
|
-
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
118
|
-
dc4Id: number | null;
|
|
119
|
-
};
|
|
120
|
-
createdAt: number;
|
|
121
|
-
modifiedAt: number | null;
|
|
122
|
-
relationshipId: number;
|
|
123
|
-
}, {
|
|
124
|
-
application: {
|
|
125
|
-
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
126
|
-
relationshipApplicationId: number;
|
|
127
|
-
}[];
|
|
128
|
-
active: boolean;
|
|
129
|
-
catalog: {
|
|
130
|
-
active: boolean;
|
|
131
|
-
catalogId: number;
|
|
132
|
-
itemPartnerId: number;
|
|
133
|
-
}[];
|
|
134
|
-
company: {
|
|
135
|
-
companyId: number;
|
|
136
|
-
name: string;
|
|
137
|
-
orgId: string;
|
|
138
|
-
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
139
|
-
dc4Id: number | null;
|
|
140
|
-
};
|
|
141
|
-
createdAt: number;
|
|
142
|
-
modifiedAt: number | null;
|
|
143
|
-
relationshipId: number;
|
|
144
|
-
}>, "many">;
|
|
145
|
-
uniqueAttributes: z.ZodArray<z.ZodString, "many">;
|
|
146
|
-
}, "strip", z.ZodTypeAny, {
|
|
147
|
-
companyId: number;
|
|
148
|
-
name: string;
|
|
149
|
-
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
150
|
-
active: boolean;
|
|
151
|
-
createdAt: number | null;
|
|
152
|
-
modifiedAt: number | null;
|
|
153
|
-
features: {
|
|
154
|
-
type: string;
|
|
155
|
-
active: boolean;
|
|
156
|
-
createdBy: string | null;
|
|
157
|
-
createdDate: number | null;
|
|
158
|
-
display: string;
|
|
159
|
-
modifiedBy?: string | null | undefined;
|
|
160
|
-
modifiedDate?: number | null | undefined;
|
|
161
|
-
}[];
|
|
162
|
-
identity: {
|
|
163
|
-
orgId: string | null;
|
|
164
|
-
service: {
|
|
165
|
-
name: string;
|
|
166
|
-
} | null;
|
|
167
|
-
};
|
|
168
|
-
relationships: {
|
|
169
|
-
application: {
|
|
170
|
-
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
171
|
-
relationshipApplicationId: number;
|
|
172
|
-
}[];
|
|
173
|
-
active: boolean;
|
|
174
|
-
catalog: {
|
|
175
|
-
active: boolean;
|
|
176
|
-
catalogId: number;
|
|
177
|
-
itemPartnerId: number;
|
|
178
|
-
}[];
|
|
179
|
-
company: {
|
|
180
|
-
companyId: number;
|
|
181
|
-
name: string;
|
|
182
|
-
orgId: string;
|
|
183
|
-
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
184
|
-
dc4Id: number | null;
|
|
185
|
-
};
|
|
186
|
-
createdAt: number;
|
|
187
|
-
modifiedAt: number | null;
|
|
188
|
-
relationshipId: number;
|
|
189
|
-
}[];
|
|
190
|
-
uniqueAttributes: string[];
|
|
191
|
-
}, {
|
|
192
|
-
companyId: number;
|
|
193
|
-
name: string;
|
|
194
|
-
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
195
|
-
active: boolean;
|
|
196
|
-
createdAt: number | null;
|
|
197
|
-
modifiedAt: number | null;
|
|
198
|
-
features: {
|
|
199
|
-
type: string;
|
|
200
|
-
active: boolean;
|
|
201
|
-
createdBy: string | null;
|
|
202
|
-
createdDate: number | null;
|
|
203
|
-
display: string;
|
|
204
|
-
modifiedBy?: string | null | undefined;
|
|
205
|
-
modifiedDate?: number | null | undefined;
|
|
206
|
-
}[];
|
|
207
|
-
identity: {
|
|
208
|
-
orgId: string | null;
|
|
209
|
-
service: {
|
|
210
|
-
name: string;
|
|
211
|
-
} | null;
|
|
212
|
-
};
|
|
213
|
-
relationships: {
|
|
214
|
-
application: {
|
|
215
|
-
application: "ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR";
|
|
216
|
-
relationshipApplicationId: number;
|
|
217
|
-
}[];
|
|
218
|
-
active: boolean;
|
|
219
|
-
catalog: {
|
|
220
|
-
active: boolean;
|
|
221
|
-
catalogId: number;
|
|
222
|
-
itemPartnerId: number;
|
|
223
|
-
}[];
|
|
224
|
-
company: {
|
|
225
|
-
companyId: number;
|
|
226
|
-
name: string;
|
|
227
|
-
orgId: string;
|
|
228
|
-
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
229
|
-
dc4Id: number | null;
|
|
230
|
-
};
|
|
231
|
-
createdAt: number;
|
|
232
|
-
modifiedAt: number | null;
|
|
233
|
-
relationshipId: number;
|
|
234
|
-
}[];
|
|
235
|
-
uniqueAttributes: string[];
|
|
236
|
-
}>;
|
|
237
|
-
type Company = z.infer<typeof companySchema>;
|
|
238
|
-
|
|
239
|
-
declare const companySearchParamsSchema: z.ZodObject<{
|
|
240
|
-
name: z.ZodOptional<z.ZodString>;
|
|
241
|
-
companyIds: z.ZodOptional<z.ZodString>;
|
|
242
|
-
orgId: z.ZodOptional<z.ZodString>;
|
|
243
|
-
catalogName: z.ZodOptional<z.ZodString>;
|
|
244
|
-
catalogIds: z.ZodOptional<z.ZodString>;
|
|
245
|
-
type: z.ZodOptional<z.ZodEnum<["SUPPLIER", "RETAILER"]>>;
|
|
246
|
-
}, "strip", z.ZodTypeAny, {
|
|
247
|
-
type?: "SUPPLIER" | "RETAILER" | undefined;
|
|
248
|
-
name?: string | undefined;
|
|
249
|
-
orgId?: string | undefined;
|
|
250
|
-
companyIds?: string | undefined;
|
|
251
|
-
catalogName?: string | undefined;
|
|
252
|
-
catalogIds?: string | undefined;
|
|
253
|
-
}, {
|
|
254
|
-
type?: "SUPPLIER" | "RETAILER" | undefined;
|
|
255
|
-
name?: string | undefined;
|
|
256
|
-
orgId?: string | undefined;
|
|
257
|
-
companyIds?: string | undefined;
|
|
258
|
-
catalogName?: string | undefined;
|
|
259
|
-
catalogIds?: string | undefined;
|
|
260
|
-
}>;
|
|
261
|
-
declare const companySearchSchema: z.ZodObject<{
|
|
262
|
-
id: z.ZodString;
|
|
263
|
-
organizationName: z.ZodString;
|
|
264
|
-
description: z.ZodString;
|
|
265
|
-
orgId: z.ZodOptional<z.ZodString>;
|
|
266
|
-
roles: z.ZodArray<z.ZodEnum<["SUPPLIER", "RETAILER"]>, "many">;
|
|
267
|
-
connections: z.ZodNumber;
|
|
268
|
-
uniqueCriteria: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
269
|
-
serviceName: z.ZodString;
|
|
270
|
-
catalogs: z.ZodArray<z.ZodObject<{
|
|
271
|
-
categoryId: z.ZodNumber;
|
|
272
|
-
categoryName: z.ZodString;
|
|
273
|
-
}, "strip", z.ZodTypeAny, {
|
|
274
|
-
categoryId: number;
|
|
275
|
-
categoryName: string;
|
|
276
|
-
}, {
|
|
277
|
-
categoryId: number;
|
|
278
|
-
categoryName: string;
|
|
279
|
-
}>, "many">;
|
|
280
|
-
application: z.ZodOptional<z.ZodArray<z.ZodEnum<["ASSORTMENT", "ITEM-XREF", "TEST-ORDER-GENERATOR"]>, "many">>;
|
|
281
|
-
}, "strip", z.ZodTypeAny, {
|
|
282
|
-
id: string;
|
|
283
|
-
organizationName: string;
|
|
284
|
-
description: string;
|
|
285
|
-
roles: ("SUPPLIER" | "RETAILER")[];
|
|
286
|
-
connections: number;
|
|
287
|
-
serviceName: string;
|
|
288
|
-
catalogs: {
|
|
289
|
-
categoryId: number;
|
|
290
|
-
categoryName: string;
|
|
291
|
-
}[];
|
|
292
|
-
orgId?: string | undefined;
|
|
293
|
-
application?: ("ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR")[] | undefined;
|
|
294
|
-
uniqueCriteria?: string[] | undefined;
|
|
295
|
-
}, {
|
|
296
|
-
id: string;
|
|
297
|
-
organizationName: string;
|
|
298
|
-
description: string;
|
|
299
|
-
roles: ("SUPPLIER" | "RETAILER")[];
|
|
300
|
-
connections: number;
|
|
301
|
-
serviceName: string;
|
|
302
|
-
catalogs: {
|
|
303
|
-
categoryId: number;
|
|
304
|
-
categoryName: string;
|
|
305
|
-
}[];
|
|
306
|
-
orgId?: string | undefined;
|
|
307
|
-
application?: ("ASSORTMENT" | "ITEM-XREF" | "TEST-ORDER-GENERATOR")[] | undefined;
|
|
308
|
-
uniqueCriteria?: string[] | undefined;
|
|
309
|
-
}>;
|
|
310
|
-
type CompanySearchParams = z.infer<typeof companySearchParamsSchema>;
|
|
311
|
-
type CompanySearch = z.infer<typeof companySearchSchema>;
|
|
312
|
-
|
|
313
|
-
export type { CompanySearch as C, Company as a, CompanySearchParams as b };
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import * as ky from 'ky';
|
|
3
|
-
import { Options } from 'ky';
|
|
4
|
-
|
|
5
|
-
declare const companyBriefByOrgSchema: z.ZodObject<{
|
|
6
|
-
companyId: z.ZodNumber;
|
|
7
|
-
name: z.ZodString;
|
|
8
|
-
orgId: z.ZodString;
|
|
9
|
-
companyTypes: z.ZodArray<z.ZodEnum<["SUPPLIER", "RETAILER"]>, "many">;
|
|
10
|
-
dc4Id: z.ZodNumber;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
companyId: number;
|
|
13
|
-
name: string;
|
|
14
|
-
orgId: string;
|
|
15
|
-
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
16
|
-
dc4Id: number;
|
|
17
|
-
}, {
|
|
18
|
-
companyId: number;
|
|
19
|
-
name: string;
|
|
20
|
-
orgId: string;
|
|
21
|
-
companyTypes: ("SUPPLIER" | "RETAILER")[];
|
|
22
|
-
dc4Id: number;
|
|
23
|
-
}>;
|
|
24
|
-
type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
|
|
25
|
-
|
|
26
|
-
declare const companyTypeSchema: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
|
|
27
|
-
type CompanyType = z.infer<typeof companyTypeSchema>;
|
|
28
|
-
|
|
29
|
-
declare const baseUrlsSchema: z.ZodObject<{
|
|
30
|
-
local: z.ZodLiteral<"https://localhost:8443/">;
|
|
31
|
-
test: z.ZodLiteral<"https://integration.api.spscommerce.com/assortment/gateway/">;
|
|
32
|
-
prod: z.ZodLiteral<"https://api.spscommerce.com/assortment/gateway/">;
|
|
33
|
-
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
local: "https://localhost:8443/";
|
|
35
|
-
test: "https://integration.api.spscommerce.com/assortment/gateway/";
|
|
36
|
-
prod: "https://api.spscommerce.com/assortment/gateway/";
|
|
37
|
-
}, {
|
|
38
|
-
local: "https://localhost:8443/";
|
|
39
|
-
test: "https://integration.api.spscommerce.com/assortment/gateway/";
|
|
40
|
-
prod: "https://api.spscommerce.com/assortment/gateway/";
|
|
41
|
-
}>;
|
|
42
|
-
type BaseUrls = z.infer<typeof baseUrlsSchema>;
|
|
43
|
-
declare const BASE_URLS: BaseUrls;
|
|
44
|
-
declare const envSchema: z.ZodEnum<["local", "test", "prod"]>;
|
|
45
|
-
type Env = z.infer<typeof envSchema>;
|
|
46
|
-
type AsstUrl = BaseUrls[Env];
|
|
47
|
-
type GetTokenFn = () => Promise<string | null>;
|
|
48
|
-
interface AsstClientOptions extends Options {
|
|
49
|
-
prefixUrl?: AsstUrl;
|
|
50
|
-
tokenFn?: GetTokenFn;
|
|
51
|
-
}
|
|
52
|
-
type Input = string | URL | Request;
|
|
53
|
-
type Listener = (config: AsstClientOptions) => void;
|
|
54
|
-
declare class AsstClient {
|
|
55
|
-
#private;
|
|
56
|
-
constructor(options?: AsstClientOptions);
|
|
57
|
-
updateConfig({ tokenFn, ...options }: AsstClientOptions): void;
|
|
58
|
-
updateCompanyType(companyType: CompanyType): void;
|
|
59
|
-
getBaseUrl(): AsstUrl;
|
|
60
|
-
getCompanyType(): CompanyType;
|
|
61
|
-
/**
|
|
62
|
-
* Subscribe to config changes. The callback will be immediately invoked with the current config.
|
|
63
|
-
* @param subscriptionCallback Function that will be called with the new config every time it is changed
|
|
64
|
-
* @returns Function to unsubscribe to config changes
|
|
65
|
-
*/
|
|
66
|
-
subscribeToConfigChange(listener: Listener): () => boolean;
|
|
67
|
-
get(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
|
|
68
|
-
post(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
|
|
69
|
-
put(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
|
|
70
|
-
patch(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
|
|
71
|
-
head(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
|
|
72
|
-
delete(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
type Hierarchy = {
|
|
76
|
-
id: string;
|
|
77
|
-
name?: string | null;
|
|
78
|
-
description?: string | null;
|
|
79
|
-
type?: string | null;
|
|
80
|
-
child?: Hierarchy | null;
|
|
81
|
-
};
|
|
82
|
-
type ItemHierarchyResponse = {
|
|
83
|
-
itemHierarchies: Array<{
|
|
84
|
-
itemId: string;
|
|
85
|
-
hierarchies: Array<Hierarchy>;
|
|
86
|
-
}>;
|
|
87
|
-
};
|
|
88
|
-
declare const itemHierarchyResponseSchema: z.ZodType<ItemHierarchyResponse>;
|
|
89
|
-
|
|
90
|
-
declare const spsItemIdResponseSchema: z.ZodObject<{
|
|
91
|
-
id: z.ZodString;
|
|
92
|
-
ref: z.ZodString;
|
|
93
|
-
}, "strip", z.ZodTypeAny, {
|
|
94
|
-
id: string;
|
|
95
|
-
ref: string;
|
|
96
|
-
}, {
|
|
97
|
-
id: string;
|
|
98
|
-
ref: string;
|
|
99
|
-
}>;
|
|
100
|
-
type SpsItemIdResponse = z.infer<typeof spsItemIdResponseSchema>;
|
|
101
|
-
|
|
102
|
-
export { AsstClient as A, BASE_URLS as B, type CompanyBriefByOrg as C, type Env as E, type ItemHierarchyResponse as I, type SpsItemIdResponse as S, type CompanyType as a, type AsstClientOptions as b, type AsstUrl as c, companyBriefByOrgSchema as d, envSchema as e, itemHierarchyResponseSchema as i, spsItemIdResponseSchema as s };
|