@spscommerce/asst-api 0.0.1-beta.1 → 0.0.1-beta.11
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/ItemCategoriesSearch-44b87663.d.ts +318 -0
- package/dist/ItemCategoriesSearch-e0870a34.d.ts +318 -0
- package/dist/ItemCategoriesSearch-e3298650.d.ts +319 -0
- package/dist/ItemCategoriesSearch-ec43591f.d.ts +319 -0
- package/dist/ItemCategory-14816deb.d.ts +99 -0
- package/dist/ItemErrorDetails-0eed9761.d.ts +3200 -0
- package/dist/ItemErrorDetails-1614b511.d.ts +3137 -0
- package/dist/ItemErrorDetails-1bd2821e.d.ts +3137 -0
- package/dist/ItemErrorDetails-b2c79d10.d.ts +3197 -0
- package/dist/ItemErrorDetails-ba155b70.d.ts +3269 -0
- package/dist/ItemErrorDetails-bc465036.d.ts +3200 -0
- package/dist/ItemErrorDetails-e6e400aa.d.ts +3197 -0
- package/dist/ItemErrorDetailsResult-0b4a628c.d.ts +3032 -0
- package/dist/ItemErrorDetailsResult-8317ab6e.d.ts +3092 -0
- package/dist/ItemErrorDetailsResult-859368da.d.ts +3032 -0
- package/dist/ItemErrorDetailsResult-9ac97c24.d.ts +3032 -0
- package/dist/ItemErrorDetailsResult-ae90f329.d.ts +3097 -0
- package/dist/ItemErrorDetailsResult-c12c4eac.d.ts +3032 -0
- package/dist/ItemErrorDetailsResult-c62caeae.d.ts +3092 -0
- package/dist/ItemErrorDetailsResult-fbc33a43.d.ts +3097 -0
- package/dist/ItemStatusResponse-7f871d5a.d.ts +91 -0
- package/dist/TradingPartnerAccessByCompanyId-29866586.d.ts +97 -0
- package/dist/TradingPartnerAccessByCompanyId-43f83fb6.d.ts +130 -0
- package/dist/TradingPartnerAccessByCompanyId-53b868a8.d.ts +125 -0
- package/dist/TradingPartnerAccessByCompanyId-b227f0c5.d.ts +125 -0
- package/dist/TradingPartnerAccessByCompanyId-e7a1d443.d.ts +129 -0
- package/dist/chunk-3CJG5LDN.js +360 -0
- package/dist/chunk-3FMMM7IS.js +80 -0
- package/dist/chunk-3JRE7YYE.js +4576 -0
- package/dist/chunk-4HWZ3JEH.js +328 -0
- package/dist/chunk-4WER3ZLX.js +4576 -0
- package/dist/chunk-5YWAQNT6.js +4634 -0
- package/dist/chunk-6ZNFOWTV.js +78 -0
- package/dist/chunk-CB3PVPHS.js +344 -0
- package/dist/chunk-ETURPA7W.js +326 -0
- package/dist/chunk-F3KCLICG.js +77 -0
- package/dist/chunk-FS6LHGAR.js +87 -0
- package/dist/chunk-G36FM5OA.js +327 -0
- package/dist/chunk-GDFX3WTX.js +78 -0
- package/dist/chunk-GSUSBCHT.js +4576 -0
- package/dist/chunk-IHIEBLQV.js +4576 -0
- package/dist/chunk-ITWMRXLD.js +328 -0
- package/dist/chunk-J3A66IGS.js +389 -0
- package/dist/chunk-LYMGZWSR.js +80 -0
- package/dist/chunk-N2OYWNHF.js +80 -0
- package/dist/chunk-OA6PO3QG.js +78 -0
- package/dist/chunk-OBXZRDPY.js +77 -0
- package/dist/chunk-OI47EFQH.js +82 -0
- package/dist/chunk-OVOZIZA2.js +326 -0
- package/dist/chunk-RRGAJ4ZS.js +4576 -0
- package/dist/chunk-T3UCSW2B.js +81 -0
- package/dist/chunk-VNFU2PUV.js +4577 -0
- package/dist/chunk-WN2FPUF3.js +4577 -0
- package/dist/chunk-XMNYZGXF.js +84 -0
- package/dist/chunk-YCQUK6KV.js +85 -0
- package/dist/index.cjs +1001 -84
- package/dist/index.d.ts +197 -46
- package/dist/index.js +23 -56
- package/dist/msw.cjs +1056 -65
- package/dist/msw.d.ts +638 -76
- package/dist/msw.js +317 -54
- package/dist/zod.cjs +812 -17
- package/dist/zod.d.ts +4 -2
- package/dist/zod.js +112 -52
- package/package.json +2 -3
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const itemStatusResponseSchema: z.ZodObject<{
|
|
4
|
+
itemStatuses: z.ZodArray<z.ZodObject<{
|
|
5
|
+
itemId: z.ZodString;
|
|
6
|
+
itemOrgStatuses: z.ZodArray<z.ZodObject<{
|
|
7
|
+
org: z.ZodObject<{
|
|
8
|
+
ref: z.ZodString;
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
name: string;
|
|
13
|
+
id: string;
|
|
14
|
+
ref: string;
|
|
15
|
+
}, {
|
|
16
|
+
name: string;
|
|
17
|
+
id: string;
|
|
18
|
+
ref: string;
|
|
19
|
+
}>;
|
|
20
|
+
lowestInvalidStage: z.ZodNullable<z.ZodEnum<["CORE", "CORE_PLUS", "CORE_ADVANCED", "ENRICHED", "STANDARD_REQUIREMENTS"]>>;
|
|
21
|
+
validForRelationship: z.ZodBoolean;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
org: {
|
|
24
|
+
name: string;
|
|
25
|
+
id: string;
|
|
26
|
+
ref: string;
|
|
27
|
+
};
|
|
28
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
29
|
+
validForRelationship: boolean;
|
|
30
|
+
}, {
|
|
31
|
+
org: {
|
|
32
|
+
name: string;
|
|
33
|
+
id: string;
|
|
34
|
+
ref: string;
|
|
35
|
+
};
|
|
36
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
37
|
+
validForRelationship: boolean;
|
|
38
|
+
}>, "many">;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
itemId: string;
|
|
41
|
+
itemOrgStatuses: {
|
|
42
|
+
org: {
|
|
43
|
+
name: string;
|
|
44
|
+
id: string;
|
|
45
|
+
ref: string;
|
|
46
|
+
};
|
|
47
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
48
|
+
validForRelationship: boolean;
|
|
49
|
+
}[];
|
|
50
|
+
}, {
|
|
51
|
+
itemId: string;
|
|
52
|
+
itemOrgStatuses: {
|
|
53
|
+
org: {
|
|
54
|
+
name: string;
|
|
55
|
+
id: string;
|
|
56
|
+
ref: string;
|
|
57
|
+
};
|
|
58
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
59
|
+
validForRelationship: boolean;
|
|
60
|
+
}[];
|
|
61
|
+
}>, "many">;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
itemStatuses: {
|
|
64
|
+
itemId: string;
|
|
65
|
+
itemOrgStatuses: {
|
|
66
|
+
org: {
|
|
67
|
+
name: string;
|
|
68
|
+
id: string;
|
|
69
|
+
ref: string;
|
|
70
|
+
};
|
|
71
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
72
|
+
validForRelationship: boolean;
|
|
73
|
+
}[];
|
|
74
|
+
}[];
|
|
75
|
+
}, {
|
|
76
|
+
itemStatuses: {
|
|
77
|
+
itemId: string;
|
|
78
|
+
itemOrgStatuses: {
|
|
79
|
+
org: {
|
|
80
|
+
name: string;
|
|
81
|
+
id: string;
|
|
82
|
+
ref: string;
|
|
83
|
+
};
|
|
84
|
+
lowestInvalidStage: "CORE" | "CORE_PLUS" | "CORE_ADVANCED" | "ENRICHED" | "STANDARD_REQUIREMENTS" | null;
|
|
85
|
+
validForRelationship: boolean;
|
|
86
|
+
}[];
|
|
87
|
+
}[];
|
|
88
|
+
}>;
|
|
89
|
+
type ItemStatusResponse = z.infer<typeof itemStatusResponseSchema>;
|
|
90
|
+
|
|
91
|
+
export { ItemStatusResponse as I };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const vendorPartnerAttGroupsSchema: z.ZodObject<{
|
|
4
|
+
partnerCompanyId: z.ZodNumber;
|
|
5
|
+
partnerCompanyName: z.ZodString;
|
|
6
|
+
partnerAttributeGroups: z.ZodArray<z.ZodNumber, "many">;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
partnerCompanyId: number;
|
|
9
|
+
partnerCompanyName: string;
|
|
10
|
+
partnerAttributeGroups: number[];
|
|
11
|
+
}, {
|
|
12
|
+
partnerCompanyId: number;
|
|
13
|
+
partnerCompanyName: string;
|
|
14
|
+
partnerAttributeGroups: number[];
|
|
15
|
+
}>;
|
|
16
|
+
type VendorPartnerAttGroups = z.infer<typeof vendorPartnerAttGroupsSchema>;
|
|
17
|
+
|
|
18
|
+
declare const attrProdTypeSchema: z.ZodObject<{
|
|
19
|
+
attrProdTypeId: z.ZodNumber;
|
|
20
|
+
productType: z.ZodString;
|
|
21
|
+
description: z.ZodString;
|
|
22
|
+
createdDate: z.ZodNumber;
|
|
23
|
+
createdBy: z.ZodString;
|
|
24
|
+
modifiedDate: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
modifiedBy: z.ZodOptional<z.ZodString>;
|
|
26
|
+
retailerId: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
description: string;
|
|
29
|
+
attrProdTypeId: number;
|
|
30
|
+
productType: string;
|
|
31
|
+
createdDate: number;
|
|
32
|
+
createdBy: string;
|
|
33
|
+
modifiedDate?: number | undefined;
|
|
34
|
+
modifiedBy?: string | undefined;
|
|
35
|
+
retailerId?: number | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
description: string;
|
|
38
|
+
attrProdTypeId: number;
|
|
39
|
+
productType: string;
|
|
40
|
+
createdDate: number;
|
|
41
|
+
createdBy: string;
|
|
42
|
+
modifiedDate?: number | undefined;
|
|
43
|
+
modifiedBy?: string | undefined;
|
|
44
|
+
retailerId?: number | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
type AttrProdType = z.infer<typeof attrProdTypeSchema>;
|
|
47
|
+
|
|
48
|
+
declare const tradingPartnerAccessByCompanyIdSchema: z.ZodObject<{
|
|
49
|
+
companyId: z.ZodNumber;
|
|
50
|
+
companyType: z.ZodString;
|
|
51
|
+
identityOrgId: z.ZodString;
|
|
52
|
+
companyName: z.ZodString;
|
|
53
|
+
count: z.ZodNumber;
|
|
54
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
55
|
+
catalog_id: z.ZodNumber;
|
|
56
|
+
catalog_name: z.ZodString;
|
|
57
|
+
partner_company_name: z.ZodString;
|
|
58
|
+
partner_company_id: z.ZodNumber;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
catalog_id: number;
|
|
61
|
+
catalog_name: string;
|
|
62
|
+
partner_company_name: string;
|
|
63
|
+
partner_company_id: number;
|
|
64
|
+
}, {
|
|
65
|
+
catalog_id: number;
|
|
66
|
+
catalog_name: string;
|
|
67
|
+
partner_company_name: string;
|
|
68
|
+
partner_company_id: number;
|
|
69
|
+
}>, "many">;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
count: number;
|
|
72
|
+
companyId: number;
|
|
73
|
+
companyType: string;
|
|
74
|
+
identityOrgId: string;
|
|
75
|
+
companyName: string;
|
|
76
|
+
connections: {
|
|
77
|
+
catalog_id: number;
|
|
78
|
+
catalog_name: string;
|
|
79
|
+
partner_company_name: string;
|
|
80
|
+
partner_company_id: number;
|
|
81
|
+
}[];
|
|
82
|
+
}, {
|
|
83
|
+
count: number;
|
|
84
|
+
companyId: number;
|
|
85
|
+
companyType: string;
|
|
86
|
+
identityOrgId: string;
|
|
87
|
+
companyName: string;
|
|
88
|
+
connections: {
|
|
89
|
+
catalog_id: number;
|
|
90
|
+
catalog_name: string;
|
|
91
|
+
partner_company_name: string;
|
|
92
|
+
partner_company_id: number;
|
|
93
|
+
}[];
|
|
94
|
+
}>;
|
|
95
|
+
type TradingPartnerAccessByCompanyId = z.infer<typeof tradingPartnerAccessByCompanyIdSchema>;
|
|
96
|
+
|
|
97
|
+
export { AttrProdType as A, TradingPartnerAccessByCompanyId as T, VendorPartnerAttGroups as V, attrProdTypeSchema as a };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as ky_universal from 'ky-universal';
|
|
2
|
+
import { Options } from 'ky';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const BASE_URLS: {
|
|
6
|
+
readonly local: "https://localhost:8443";
|
|
7
|
+
readonly test: "https://integration.api.spscommerce.com/assortment/gateway";
|
|
8
|
+
readonly prod: "https://api.spscommerce.com/assortment/gateway";
|
|
9
|
+
};
|
|
10
|
+
type Env = keyof typeof BASE_URLS;
|
|
11
|
+
type AsstUrl = typeof BASE_URLS[Env];
|
|
12
|
+
interface AsstClientOptions extends Options {
|
|
13
|
+
prefixUrl?: AsstUrl;
|
|
14
|
+
}
|
|
15
|
+
type Input = string | URL | Request;
|
|
16
|
+
declare class AsstClient {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(options: AsstClientOptions);
|
|
19
|
+
updateConfig(options: AsstClientOptions): void;
|
|
20
|
+
getBaseUrl(): AsstUrl;
|
|
21
|
+
/**
|
|
22
|
+
* Subscribe to config changes. This function also returns the current config.
|
|
23
|
+
* @param subscriptionCallback Function that will be called with the new config every time it is changed
|
|
24
|
+
* @returns The current config
|
|
25
|
+
*/
|
|
26
|
+
subscribeToConfigChange(subscriptionCallback: (newConfig: AsstClientOptions) => void): AsstClientOptions;
|
|
27
|
+
unsubscribeToConfigChange(): void;
|
|
28
|
+
get(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
29
|
+
post(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
30
|
+
put(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
31
|
+
patch(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
32
|
+
head(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
33
|
+
delete(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare const vendorPartnerAttGroupsSchema: z.ZodObject<{
|
|
37
|
+
partnerCompanyId: z.ZodNumber;
|
|
38
|
+
partnerCompanyName: z.ZodString;
|
|
39
|
+
partnerAttributeGroups: z.ZodArray<z.ZodNumber, "many">;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
partnerCompanyId: number;
|
|
42
|
+
partnerCompanyName: string;
|
|
43
|
+
partnerAttributeGroups: number[];
|
|
44
|
+
}, {
|
|
45
|
+
partnerCompanyId: number;
|
|
46
|
+
partnerCompanyName: string;
|
|
47
|
+
partnerAttributeGroups: number[];
|
|
48
|
+
}>;
|
|
49
|
+
type VendorPartnerAttGroups = z.infer<typeof vendorPartnerAttGroupsSchema>;
|
|
50
|
+
|
|
51
|
+
declare const attrProdTypeSchema: z.ZodObject<{
|
|
52
|
+
attrProdTypeId: z.ZodNumber;
|
|
53
|
+
productType: z.ZodString;
|
|
54
|
+
description: z.ZodString;
|
|
55
|
+
createdDate: z.ZodNumber;
|
|
56
|
+
createdBy: z.ZodString;
|
|
57
|
+
modifiedDate: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
modifiedBy: z.ZodOptional<z.ZodString>;
|
|
59
|
+
retailerId: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
description: string;
|
|
62
|
+
attrProdTypeId: number;
|
|
63
|
+
productType: string;
|
|
64
|
+
createdDate: number;
|
|
65
|
+
createdBy: string;
|
|
66
|
+
modifiedDate?: number | undefined;
|
|
67
|
+
modifiedBy?: string | undefined;
|
|
68
|
+
retailerId?: number | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
description: string;
|
|
71
|
+
attrProdTypeId: number;
|
|
72
|
+
productType: string;
|
|
73
|
+
createdDate: number;
|
|
74
|
+
createdBy: string;
|
|
75
|
+
modifiedDate?: number | undefined;
|
|
76
|
+
modifiedBy?: string | undefined;
|
|
77
|
+
retailerId?: number | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
type AttrProdType = z.infer<typeof attrProdTypeSchema>;
|
|
80
|
+
|
|
81
|
+
declare const tradingPartnerAccessByCompanyIdSchema: z.ZodObject<{
|
|
82
|
+
companyId: z.ZodNumber;
|
|
83
|
+
companyType: z.ZodString;
|
|
84
|
+
identityOrgId: z.ZodString;
|
|
85
|
+
companyName: z.ZodString;
|
|
86
|
+
count: z.ZodNumber;
|
|
87
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
88
|
+
catalog_id: z.ZodNumber;
|
|
89
|
+
catalog_name: z.ZodString;
|
|
90
|
+
partner_company_name: z.ZodString;
|
|
91
|
+
partner_company_id: z.ZodNumber;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
catalog_id: number;
|
|
94
|
+
catalog_name: string;
|
|
95
|
+
partner_company_name: string;
|
|
96
|
+
partner_company_id: number;
|
|
97
|
+
}, {
|
|
98
|
+
catalog_id: number;
|
|
99
|
+
catalog_name: string;
|
|
100
|
+
partner_company_name: string;
|
|
101
|
+
partner_company_id: number;
|
|
102
|
+
}>, "many">;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
count: number;
|
|
105
|
+
companyId: number;
|
|
106
|
+
companyType: string;
|
|
107
|
+
identityOrgId: string;
|
|
108
|
+
companyName: string;
|
|
109
|
+
connections: {
|
|
110
|
+
catalog_id: number;
|
|
111
|
+
catalog_name: string;
|
|
112
|
+
partner_company_name: string;
|
|
113
|
+
partner_company_id: number;
|
|
114
|
+
}[];
|
|
115
|
+
}, {
|
|
116
|
+
count: number;
|
|
117
|
+
companyId: number;
|
|
118
|
+
companyType: string;
|
|
119
|
+
identityOrgId: string;
|
|
120
|
+
companyName: string;
|
|
121
|
+
connections: {
|
|
122
|
+
catalog_id: number;
|
|
123
|
+
catalog_name: string;
|
|
124
|
+
partner_company_name: string;
|
|
125
|
+
partner_company_id: number;
|
|
126
|
+
}[];
|
|
127
|
+
}>;
|
|
128
|
+
type TradingPartnerAccessByCompanyId = z.infer<typeof tradingPartnerAccessByCompanyIdSchema>;
|
|
129
|
+
|
|
130
|
+
export { AsstClient as A, BASE_URLS as B, Env as E, TradingPartnerAccessByCompanyId as T, VendorPartnerAttGroups as V, AttrProdType as a, AsstClientOptions as b, AsstUrl as c, attrProdTypeSchema as d };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as ky_universal from 'ky-universal';
|
|
2
|
+
import { Options } from 'ky';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const BASE_URLS: {
|
|
6
|
+
readonly local: "https://localhost:8443";
|
|
7
|
+
readonly test: "https://integration.api.spscommerce.com/assortment/gateway";
|
|
8
|
+
readonly prod: "https://api.spscommerce.com/assortment/gateway";
|
|
9
|
+
};
|
|
10
|
+
type Env = keyof typeof BASE_URLS;
|
|
11
|
+
type AsstUrl = typeof BASE_URLS[Env];
|
|
12
|
+
interface AsstClientOptions extends Options {
|
|
13
|
+
prefixUrl?: AsstUrl;
|
|
14
|
+
}
|
|
15
|
+
type Input = string | URL | Request;
|
|
16
|
+
declare class AsstClient {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(options: AsstClientOptions);
|
|
19
|
+
updateConfig(options: AsstClientOptions): void;
|
|
20
|
+
getBaseUrl(): AsstUrl;
|
|
21
|
+
subscribeToConfigChange(subscriptionCallback: (newConfig: AsstClientOptions) => void): void;
|
|
22
|
+
unsubscribeToConfigChange(): void;
|
|
23
|
+
get(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
24
|
+
post(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
25
|
+
put(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
26
|
+
patch(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
27
|
+
head(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
28
|
+
delete(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const vendorPartnerAttGroupsSchema: z.ZodObject<{
|
|
32
|
+
partnerCompanyId: z.ZodNumber;
|
|
33
|
+
partnerCompanyName: z.ZodString;
|
|
34
|
+
partnerAttributeGroups: z.ZodArray<z.ZodNumber, "many">;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
partnerCompanyId: number;
|
|
37
|
+
partnerCompanyName: string;
|
|
38
|
+
partnerAttributeGroups: number[];
|
|
39
|
+
}, {
|
|
40
|
+
partnerCompanyId: number;
|
|
41
|
+
partnerCompanyName: string;
|
|
42
|
+
partnerAttributeGroups: number[];
|
|
43
|
+
}>;
|
|
44
|
+
type VendorPartnerAttGroups = z.infer<typeof vendorPartnerAttGroupsSchema>;
|
|
45
|
+
|
|
46
|
+
declare const attrProdTypeSchema: z.ZodObject<{
|
|
47
|
+
attrProdTypeId: z.ZodNumber;
|
|
48
|
+
productType: z.ZodString;
|
|
49
|
+
description: z.ZodString;
|
|
50
|
+
createdDate: z.ZodNumber;
|
|
51
|
+
createdBy: z.ZodString;
|
|
52
|
+
modifiedDate: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
modifiedBy: z.ZodOptional<z.ZodString>;
|
|
54
|
+
retailerId: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
description: string;
|
|
57
|
+
attrProdTypeId: number;
|
|
58
|
+
productType: string;
|
|
59
|
+
createdDate: number;
|
|
60
|
+
createdBy: string;
|
|
61
|
+
modifiedDate?: number | undefined;
|
|
62
|
+
modifiedBy?: string | undefined;
|
|
63
|
+
retailerId?: number | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
description: string;
|
|
66
|
+
attrProdTypeId: number;
|
|
67
|
+
productType: string;
|
|
68
|
+
createdDate: number;
|
|
69
|
+
createdBy: string;
|
|
70
|
+
modifiedDate?: number | undefined;
|
|
71
|
+
modifiedBy?: string | undefined;
|
|
72
|
+
retailerId?: number | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
type AttrProdType = z.infer<typeof attrProdTypeSchema>;
|
|
75
|
+
|
|
76
|
+
declare const tradingPartnerAccessByCompanyIdSchema: z.ZodObject<{
|
|
77
|
+
companyId: z.ZodNumber;
|
|
78
|
+
companyType: z.ZodString;
|
|
79
|
+
identityOrgId: z.ZodString;
|
|
80
|
+
companyName: z.ZodString;
|
|
81
|
+
count: z.ZodNumber;
|
|
82
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
83
|
+
catalog_id: z.ZodNumber;
|
|
84
|
+
catalog_name: z.ZodString;
|
|
85
|
+
partner_company_name: z.ZodString;
|
|
86
|
+
partner_company_id: z.ZodNumber;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
catalog_id: number;
|
|
89
|
+
catalog_name: string;
|
|
90
|
+
partner_company_name: string;
|
|
91
|
+
partner_company_id: number;
|
|
92
|
+
}, {
|
|
93
|
+
catalog_id: number;
|
|
94
|
+
catalog_name: string;
|
|
95
|
+
partner_company_name: string;
|
|
96
|
+
partner_company_id: number;
|
|
97
|
+
}>, "many">;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
count: number;
|
|
100
|
+
companyId: number;
|
|
101
|
+
companyType: string;
|
|
102
|
+
identityOrgId: string;
|
|
103
|
+
companyName: string;
|
|
104
|
+
connections: {
|
|
105
|
+
catalog_id: number;
|
|
106
|
+
catalog_name: string;
|
|
107
|
+
partner_company_name: string;
|
|
108
|
+
partner_company_id: number;
|
|
109
|
+
}[];
|
|
110
|
+
}, {
|
|
111
|
+
count: number;
|
|
112
|
+
companyId: number;
|
|
113
|
+
companyType: string;
|
|
114
|
+
identityOrgId: string;
|
|
115
|
+
companyName: string;
|
|
116
|
+
connections: {
|
|
117
|
+
catalog_id: number;
|
|
118
|
+
catalog_name: string;
|
|
119
|
+
partner_company_name: string;
|
|
120
|
+
partner_company_id: number;
|
|
121
|
+
}[];
|
|
122
|
+
}>;
|
|
123
|
+
type TradingPartnerAccessByCompanyId = z.infer<typeof tradingPartnerAccessByCompanyIdSchema>;
|
|
124
|
+
|
|
125
|
+
export { AsstClient as A, BASE_URLS as B, Env as E, TradingPartnerAccessByCompanyId as T, VendorPartnerAttGroups as V, AttrProdType as a, AsstClientOptions as b, AsstUrl as c, attrProdTypeSchema as d };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as ky_universal from 'ky-universal';
|
|
2
|
+
import { Options } from 'ky';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const BASE_URLS: {
|
|
6
|
+
readonly local: "https://localhost:8443";
|
|
7
|
+
readonly test: "https://integration.api.spscommerce.com/assortment/gateway";
|
|
8
|
+
readonly prod: "https://api.spscommerce.com/assortment/gateway";
|
|
9
|
+
};
|
|
10
|
+
type Env = keyof typeof BASE_URLS;
|
|
11
|
+
type AsstUrl = typeof BASE_URLS[Env];
|
|
12
|
+
interface AsstClientOptions extends Options {
|
|
13
|
+
prefixUrl?: AsstUrl;
|
|
14
|
+
}
|
|
15
|
+
type Input = string | URL | Request;
|
|
16
|
+
declare class AsstClient {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(options: AsstClientOptions);
|
|
19
|
+
updateConfig(options: AsstClientOptions): void;
|
|
20
|
+
getBaseUrl(): AsstUrl;
|
|
21
|
+
subscribeToConfigChange(subscriptionCallback: (newConfig: AsstClientOptions) => void): AsstClientOptions;
|
|
22
|
+
unsubscribeToConfigChange(): void;
|
|
23
|
+
get(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
24
|
+
post(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
25
|
+
put(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
26
|
+
patch(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
27
|
+
head(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
28
|
+
delete(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const vendorPartnerAttGroupsSchema: z.ZodObject<{
|
|
32
|
+
partnerCompanyId: z.ZodNumber;
|
|
33
|
+
partnerCompanyName: z.ZodString;
|
|
34
|
+
partnerAttributeGroups: z.ZodArray<z.ZodNumber, "many">;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
partnerCompanyId: number;
|
|
37
|
+
partnerCompanyName: string;
|
|
38
|
+
partnerAttributeGroups: number[];
|
|
39
|
+
}, {
|
|
40
|
+
partnerCompanyId: number;
|
|
41
|
+
partnerCompanyName: string;
|
|
42
|
+
partnerAttributeGroups: number[];
|
|
43
|
+
}>;
|
|
44
|
+
type VendorPartnerAttGroups = z.infer<typeof vendorPartnerAttGroupsSchema>;
|
|
45
|
+
|
|
46
|
+
declare const attrProdTypeSchema: z.ZodObject<{
|
|
47
|
+
attrProdTypeId: z.ZodNumber;
|
|
48
|
+
productType: z.ZodString;
|
|
49
|
+
description: z.ZodString;
|
|
50
|
+
createdDate: z.ZodNumber;
|
|
51
|
+
createdBy: z.ZodString;
|
|
52
|
+
modifiedDate: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
modifiedBy: z.ZodOptional<z.ZodString>;
|
|
54
|
+
retailerId: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
description: string;
|
|
57
|
+
attrProdTypeId: number;
|
|
58
|
+
productType: string;
|
|
59
|
+
createdDate: number;
|
|
60
|
+
createdBy: string;
|
|
61
|
+
modifiedDate?: number | undefined;
|
|
62
|
+
modifiedBy?: string | undefined;
|
|
63
|
+
retailerId?: number | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
description: string;
|
|
66
|
+
attrProdTypeId: number;
|
|
67
|
+
productType: string;
|
|
68
|
+
createdDate: number;
|
|
69
|
+
createdBy: string;
|
|
70
|
+
modifiedDate?: number | undefined;
|
|
71
|
+
modifiedBy?: string | undefined;
|
|
72
|
+
retailerId?: number | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
type AttrProdType = z.infer<typeof attrProdTypeSchema>;
|
|
75
|
+
|
|
76
|
+
declare const tradingPartnerAccessByCompanyIdSchema: z.ZodObject<{
|
|
77
|
+
companyId: z.ZodNumber;
|
|
78
|
+
companyType: z.ZodString;
|
|
79
|
+
identityOrgId: z.ZodString;
|
|
80
|
+
companyName: z.ZodString;
|
|
81
|
+
count: z.ZodNumber;
|
|
82
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
83
|
+
catalog_id: z.ZodNumber;
|
|
84
|
+
catalog_name: z.ZodString;
|
|
85
|
+
partner_company_name: z.ZodString;
|
|
86
|
+
partner_company_id: z.ZodNumber;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
catalog_id: number;
|
|
89
|
+
catalog_name: string;
|
|
90
|
+
partner_company_name: string;
|
|
91
|
+
partner_company_id: number;
|
|
92
|
+
}, {
|
|
93
|
+
catalog_id: number;
|
|
94
|
+
catalog_name: string;
|
|
95
|
+
partner_company_name: string;
|
|
96
|
+
partner_company_id: number;
|
|
97
|
+
}>, "many">;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
count: number;
|
|
100
|
+
companyId: number;
|
|
101
|
+
companyType: string;
|
|
102
|
+
identityOrgId: string;
|
|
103
|
+
companyName: string;
|
|
104
|
+
connections: {
|
|
105
|
+
catalog_id: number;
|
|
106
|
+
catalog_name: string;
|
|
107
|
+
partner_company_name: string;
|
|
108
|
+
partner_company_id: number;
|
|
109
|
+
}[];
|
|
110
|
+
}, {
|
|
111
|
+
count: number;
|
|
112
|
+
companyId: number;
|
|
113
|
+
companyType: string;
|
|
114
|
+
identityOrgId: string;
|
|
115
|
+
companyName: string;
|
|
116
|
+
connections: {
|
|
117
|
+
catalog_id: number;
|
|
118
|
+
catalog_name: string;
|
|
119
|
+
partner_company_name: string;
|
|
120
|
+
partner_company_id: number;
|
|
121
|
+
}[];
|
|
122
|
+
}>;
|
|
123
|
+
type TradingPartnerAccessByCompanyId = z.infer<typeof tradingPartnerAccessByCompanyIdSchema>;
|
|
124
|
+
|
|
125
|
+
export { AsstClient as A, BASE_URLS as B, Env as E, TradingPartnerAccessByCompanyId as T, VendorPartnerAttGroups as V, AttrProdType as a, AsstClientOptions as b, AsstUrl as c, attrProdTypeSchema as d };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import * as ky_universal from 'ky-universal';
|
|
2
|
+
import { Options } from 'ky';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const BASE_URLS: {
|
|
6
|
+
readonly local: "https://localhost:8443";
|
|
7
|
+
readonly test: "https://integration.api.spscommerce.com/assortment/gateway";
|
|
8
|
+
readonly prod: "https://api.spscommerce.com/assortment/gateway";
|
|
9
|
+
};
|
|
10
|
+
type Env = keyof typeof BASE_URLS;
|
|
11
|
+
type AsstUrl = typeof BASE_URLS[Env];
|
|
12
|
+
interface AsstClientOptions extends Options {
|
|
13
|
+
prefixUrl?: AsstUrl;
|
|
14
|
+
}
|
|
15
|
+
type Input = string | URL | Request;
|
|
16
|
+
declare class AsstClient {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(options: AsstClientOptions);
|
|
19
|
+
updateConfig(options: AsstClientOptions): void;
|
|
20
|
+
getBaseUrl(): AsstUrl;
|
|
21
|
+
/**
|
|
22
|
+
* Subscribe to config changes. The callback will be immediately invoked with the current config.
|
|
23
|
+
* @param subscriptionCallback Function that will be called with the new config every time it is changed
|
|
24
|
+
*/
|
|
25
|
+
subscribeToConfigChange(subscriptionCallback: (newConfig: AsstClientOptions) => void): void;
|
|
26
|
+
unsubscribeToConfigChange(): void;
|
|
27
|
+
get(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
28
|
+
post(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
29
|
+
put(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
30
|
+
patch(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
31
|
+
head(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
32
|
+
delete(url: Input, options?: AsstClientOptions): ky_universal.ResponsePromise;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare const vendorPartnerAttGroupsSchema: z.ZodObject<{
|
|
36
|
+
partnerCompanyId: z.ZodNumber;
|
|
37
|
+
partnerCompanyName: z.ZodString;
|
|
38
|
+
partnerAttributeGroups: z.ZodArray<z.ZodNumber, "many">;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
partnerCompanyId: number;
|
|
41
|
+
partnerCompanyName: string;
|
|
42
|
+
partnerAttributeGroups: number[];
|
|
43
|
+
}, {
|
|
44
|
+
partnerCompanyId: number;
|
|
45
|
+
partnerCompanyName: string;
|
|
46
|
+
partnerAttributeGroups: number[];
|
|
47
|
+
}>;
|
|
48
|
+
type VendorPartnerAttGroups = z.infer<typeof vendorPartnerAttGroupsSchema>;
|
|
49
|
+
|
|
50
|
+
declare const attrProdTypeSchema: z.ZodObject<{
|
|
51
|
+
attrProdTypeId: z.ZodNumber;
|
|
52
|
+
productType: z.ZodString;
|
|
53
|
+
description: z.ZodString;
|
|
54
|
+
createdDate: z.ZodNumber;
|
|
55
|
+
createdBy: z.ZodString;
|
|
56
|
+
modifiedDate: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
modifiedBy: z.ZodOptional<z.ZodString>;
|
|
58
|
+
retailerId: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
description: string;
|
|
61
|
+
attrProdTypeId: number;
|
|
62
|
+
productType: string;
|
|
63
|
+
createdDate: number;
|
|
64
|
+
createdBy: string;
|
|
65
|
+
modifiedDate?: number | undefined;
|
|
66
|
+
modifiedBy?: string | undefined;
|
|
67
|
+
retailerId?: number | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
description: string;
|
|
70
|
+
attrProdTypeId: number;
|
|
71
|
+
productType: string;
|
|
72
|
+
createdDate: number;
|
|
73
|
+
createdBy: string;
|
|
74
|
+
modifiedDate?: number | undefined;
|
|
75
|
+
modifiedBy?: string | undefined;
|
|
76
|
+
retailerId?: number | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
type AttrProdType = z.infer<typeof attrProdTypeSchema>;
|
|
79
|
+
|
|
80
|
+
declare const tradingPartnerAccessByCompanyIdSchema: z.ZodObject<{
|
|
81
|
+
companyId: z.ZodNumber;
|
|
82
|
+
companyType: z.ZodString;
|
|
83
|
+
identityOrgId: z.ZodString;
|
|
84
|
+
companyName: z.ZodString;
|
|
85
|
+
count: z.ZodNumber;
|
|
86
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
87
|
+
catalog_id: z.ZodNumber;
|
|
88
|
+
catalog_name: z.ZodString;
|
|
89
|
+
partner_company_name: z.ZodString;
|
|
90
|
+
partner_company_id: z.ZodNumber;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
catalog_id: number;
|
|
93
|
+
catalog_name: string;
|
|
94
|
+
partner_company_name: string;
|
|
95
|
+
partner_company_id: number;
|
|
96
|
+
}, {
|
|
97
|
+
catalog_id: number;
|
|
98
|
+
catalog_name: string;
|
|
99
|
+
partner_company_name: string;
|
|
100
|
+
partner_company_id: number;
|
|
101
|
+
}>, "many">;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
count: number;
|
|
104
|
+
companyId: number;
|
|
105
|
+
companyType: string;
|
|
106
|
+
identityOrgId: string;
|
|
107
|
+
companyName: string;
|
|
108
|
+
connections: {
|
|
109
|
+
catalog_id: number;
|
|
110
|
+
catalog_name: string;
|
|
111
|
+
partner_company_name: string;
|
|
112
|
+
partner_company_id: number;
|
|
113
|
+
}[];
|
|
114
|
+
}, {
|
|
115
|
+
count: number;
|
|
116
|
+
companyId: number;
|
|
117
|
+
companyType: string;
|
|
118
|
+
identityOrgId: string;
|
|
119
|
+
companyName: string;
|
|
120
|
+
connections: {
|
|
121
|
+
catalog_id: number;
|
|
122
|
+
catalog_name: string;
|
|
123
|
+
partner_company_name: string;
|
|
124
|
+
partner_company_id: number;
|
|
125
|
+
}[];
|
|
126
|
+
}>;
|
|
127
|
+
type TradingPartnerAccessByCompanyId = z.infer<typeof tradingPartnerAccessByCompanyIdSchema>;
|
|
128
|
+
|
|
129
|
+
export { AsstClient as A, BASE_URLS as B, Env as E, TradingPartnerAccessByCompanyId as T, VendorPartnerAttGroups as V, AttrProdType as a, AsstClientOptions as b, AsstUrl as c, attrProdTypeSchema as d };
|