@spscommerce/asst-api 4.1.1 → 4.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.
Files changed (73) hide show
  1. package/package.json +4 -4
  2. package/dist/CompanyBriefByOrg-57oGCtjK.d.ts +0 -3427
  3. package/dist/CompanyBriefByOrg-LTdsUKm4.d.ts +0 -3427
  4. package/dist/CompanyBriefByOrg-itus4RMD.d.cts +0 -131
  5. package/dist/CompanyBriefByOrg-itus4RMD.d.ts +0 -131
  6. package/dist/chunk-27XV7TS2.js +0 -522
  7. package/dist/chunk-2VJS5KPH.js +0 -5182
  8. package/dist/chunk-2W3LZ4AO.js +0 -513
  9. package/dist/chunk-3XNXQYIB.js +0 -521
  10. package/dist/chunk-4C475UZX.js +0 -5164
  11. package/dist/chunk-5AROSGQB.js +0 -5034
  12. package/dist/chunk-7F5CQRS2.js +0 -567
  13. package/dist/chunk-7OEXJIWW.js +0 -565
  14. package/dist/chunk-A22SEYVL.js +0 -530
  15. package/dist/chunk-AH5MG2WF.js +0 -5040
  16. package/dist/chunk-BDSSH6MN.js +0 -574
  17. package/dist/chunk-BFIQVABZ.js +0 -528
  18. package/dist/chunk-BJTO4CRW.js +0 -558
  19. package/dist/chunk-BLMS4KUD.js +0 -5164
  20. package/dist/chunk-BTNVA4NZ.js +0 -568
  21. package/dist/chunk-CNQTNX3M.js +0 -567
  22. package/dist/chunk-CUVSWUIQ.js +0 -5040
  23. package/dist/chunk-DP2ZMQG5.js +0 -4881
  24. package/dist/chunk-EMBJNPTB.js +0 -5040
  25. package/dist/chunk-EO2UMCWY.js +0 -574
  26. package/dist/chunk-FTB465WY.js +0 -575
  27. package/dist/chunk-G6A4EVAL.js +0 -528
  28. package/dist/chunk-GDARBI5R.js +0 -5185
  29. package/dist/chunk-HY2SRD5L.js +0 -5003
  30. package/dist/chunk-ISQ3LQRI.js +0 -565
  31. package/dist/chunk-KKX3CXHP.js +0 -558
  32. package/dist/chunk-LJVJ4SYE.js +0 -568
  33. package/dist/chunk-LYMA4XGG.js +0 -5181
  34. package/dist/chunk-MLAU3LFL.js +0 -527
  35. package/dist/chunk-MQREZR54.js +0 -5164
  36. package/dist/chunk-N4A4BVKV.js +0 -5163
  37. package/dist/chunk-QVEV57JA.js +0 -5185
  38. package/dist/chunk-SI7CWAHC.js +0 -574
  39. package/dist/chunk-SK6U2JDX.js +0 -566
  40. package/dist/chunk-SQBB5K5J.js +0 -574
  41. package/dist/chunk-TQ2IQDSM.js +0 -568
  42. package/dist/chunk-TTT6PM27.js +0 -558
  43. package/dist/chunk-VFMKDLXO.js +0 -570
  44. package/dist/chunk-VKPQOGVS.js +0 -565
  45. package/dist/chunk-VLLI4AYA.js +0 -520
  46. package/dist/chunk-VNFLJ5FV.js +0 -530
  47. package/dist/chunk-WNCDQJEM.js +0 -5034
  48. package/dist/chunk-XYZVRJF3.js +0 -5162
  49. package/dist/chunk-YJCJB4OT.js +0 -79
  50. package/dist/chunk-YJMQ4PGM.js +0 -559
  51. package/dist/chunk-Z6PXGHNC.js +0 -570
  52. package/dist/chunk-ZQ32XEVW.js +0 -79
  53. package/dist/chunk-ZXXDLGW7.js +0 -513
  54. package/dist/index-B8ovDTs5.d.cts +0 -14
  55. package/dist/index-BFKgtuVI.d.ts +0 -14
  56. package/dist/index-Zz-6wNSh.d.ts +0 -106
  57. package/dist/index-fgr_c5Wj.d.ts +0 -106
  58. package/dist/zod-6gU8y6oS.d.cts +0 -6712
  59. package/dist/zod-B4sIVoVX.d.ts +0 -6712
  60. package/dist/zod-BI81QHVK.d.ts +0 -6715
  61. package/dist/zod-BUCQsGOm.d.ts +0 -6712
  62. package/dist/zod-BdDmL7rg.d.ts +0 -6718
  63. package/dist/zod-Bl_5j5Nx.d.ts +0 -6712
  64. package/dist/zod-Bxu34bbp.d.ts +0 -6718
  65. package/dist/zod-C4kEHhO8.d.cts +0 -6718
  66. package/dist/zod-C5pRCHei.d.ts +0 -6712
  67. package/dist/zod-CIacR1Kf.d.cts +0 -6712
  68. package/dist/zod-DBbdP-KT.d.cts +0 -6718
  69. package/dist/zod-DzhoVlw_.d.cts +0 -6712
  70. package/dist/zod-FdtLO2-F.d.cts +0 -6715
  71. package/dist/zod-NE2xXWlK.d.ts +0 -3416
  72. package/dist/zod-lSiFMzqK.d.cts +0 -6712
  73. package/dist/zod-zxqlYYMG.d.ts +0 -3416
@@ -1,131 +0,0 @@
1
- import * as ky from 'ky';
2
- import { Options } from 'ky';
3
- import { z } from 'zod';
4
-
5
- declare const baseUrlsSchema: z.ZodObject<{
6
- local: z.ZodLiteral<"https://localhost:8443/">;
7
- test: z.ZodLiteral<"https://integration.api.spscommerce.com/assortment/gateway/">;
8
- prod: z.ZodLiteral<"https://api.spscommerce.com/assortment/gateway/">;
9
- }, "strip", z.ZodTypeAny, {
10
- local: "https://localhost:8443/";
11
- test: "https://integration.api.spscommerce.com/assortment/gateway/";
12
- prod: "https://api.spscommerce.com/assortment/gateway/";
13
- }, {
14
- local: "https://localhost:8443/";
15
- test: "https://integration.api.spscommerce.com/assortment/gateway/";
16
- prod: "https://api.spscommerce.com/assortment/gateway/";
17
- }>;
18
- type BaseUrls = z.infer<typeof baseUrlsSchema>;
19
- declare const BASE_URLS: BaseUrls;
20
- declare const envSchema: z.ZodEnum<["local", "test", "prod"]>;
21
- type Env = z.infer<typeof envSchema>;
22
- type AsstUrl = BaseUrls[Env];
23
- interface AsstClientOptions extends Options {
24
- prefixUrl?: AsstUrl;
25
- }
26
- type Input = string | URL | Request;
27
- type Listener = (config: AsstClientOptions) => void;
28
- declare class AsstClient {
29
- #private;
30
- constructor(options?: AsstClientOptions);
31
- updateConfig(options: AsstClientOptions): void;
32
- getBaseUrl(): AsstUrl;
33
- /**
34
- * Subscribe to config changes. The callback will be immediately invoked with the current config.
35
- * @param subscriptionCallback Function that will be called with the new config every time it is changed
36
- * @returns Function to unsubscribe to config changes
37
- */
38
- subscribeToConfigChange(listener: Listener): () => boolean;
39
- get(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
40
- post(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
41
- put(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
42
- patch(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
43
- head(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
44
- delete(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
45
- }
46
-
47
- declare const attributeValidValuesSchema: z.ZodObject<{
48
- value: z.ZodString;
49
- isDefault: z.ZodBoolean;
50
- locale: z.ZodString;
51
- createdBy: z.ZodString;
52
- createdDate: z.ZodNumber;
53
- modifiedDate: z.ZodNumber;
54
- modifiedBy: z.ZodString;
55
- attributeId: z.ZodNumber;
56
- attrValueId: z.ZodNumber;
57
- attrKeyPair: z.ZodString;
58
- }, "strip", z.ZodTypeAny, {
59
- value: string;
60
- createdDate: number;
61
- createdBy: string;
62
- modifiedDate: number;
63
- modifiedBy: string;
64
- attributeId: number;
65
- isDefault: boolean;
66
- locale: string;
67
- attrKeyPair: string;
68
- attrValueId: number;
69
- }, {
70
- value: string;
71
- createdDate: number;
72
- createdBy: string;
73
- modifiedDate: number;
74
- modifiedBy: string;
75
- attributeId: number;
76
- isDefault: boolean;
77
- locale: string;
78
- attrKeyPair: string;
79
- attrValueId: number;
80
- }>;
81
- type AttributeValidValues = z.infer<typeof attributeValidValuesSchema>;
82
-
83
- declare const spsItemIdResponseSchema: z.ZodObject<{
84
- id: z.ZodString;
85
- ref: z.ZodString;
86
- }, "strip", z.ZodTypeAny, {
87
- id: string;
88
- ref: string;
89
- }, {
90
- id: string;
91
- ref: string;
92
- }>;
93
- type SpsItemIdResponse = z.infer<typeof spsItemIdResponseSchema>;
94
-
95
- declare const companyBriefByOrgSchema: z.ZodObject<{
96
- companyId: z.ZodNumber;
97
- name: z.ZodString;
98
- orgId: z.ZodString;
99
- companyType: z.ZodObject<{
100
- type: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
101
- display: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
102
- }, "strip", z.ZodTypeAny, {
103
- type: "SUPPLIER" | "RETAILER";
104
- display: "SUPPLIER" | "RETAILER";
105
- }, {
106
- type: "SUPPLIER" | "RETAILER";
107
- display: "SUPPLIER" | "RETAILER";
108
- }>;
109
- dc4Id: z.ZodNumber;
110
- }, "strip", z.ZodTypeAny, {
111
- name: string;
112
- orgId: string;
113
- companyId: number;
114
- companyType: {
115
- type: "SUPPLIER" | "RETAILER";
116
- display: "SUPPLIER" | "RETAILER";
117
- };
118
- dc4Id: number;
119
- }, {
120
- name: string;
121
- orgId: string;
122
- companyId: number;
123
- companyType: {
124
- type: "SUPPLIER" | "RETAILER";
125
- display: "SUPPLIER" | "RETAILER";
126
- };
127
- dc4Id: number;
128
- }>;
129
- type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
130
-
131
- export { AsstClient as A, BASE_URLS as B, type CompanyBriefByOrg as C, type Env as E, type SpsItemIdResponse as S, type AttributeValidValues as a, type AsstClientOptions as b, type AsstUrl as c, attributeValidValuesSchema as d, envSchema as e, companyBriefByOrgSchema as f, spsItemIdResponseSchema as s };
@@ -1,131 +0,0 @@
1
- import * as ky from 'ky';
2
- import { Options } from 'ky';
3
- import { z } from 'zod';
4
-
5
- declare const baseUrlsSchema: z.ZodObject<{
6
- local: z.ZodLiteral<"https://localhost:8443/">;
7
- test: z.ZodLiteral<"https://integration.api.spscommerce.com/assortment/gateway/">;
8
- prod: z.ZodLiteral<"https://api.spscommerce.com/assortment/gateway/">;
9
- }, "strip", z.ZodTypeAny, {
10
- local: "https://localhost:8443/";
11
- test: "https://integration.api.spscommerce.com/assortment/gateway/";
12
- prod: "https://api.spscommerce.com/assortment/gateway/";
13
- }, {
14
- local: "https://localhost:8443/";
15
- test: "https://integration.api.spscommerce.com/assortment/gateway/";
16
- prod: "https://api.spscommerce.com/assortment/gateway/";
17
- }>;
18
- type BaseUrls = z.infer<typeof baseUrlsSchema>;
19
- declare const BASE_URLS: BaseUrls;
20
- declare const envSchema: z.ZodEnum<["local", "test", "prod"]>;
21
- type Env = z.infer<typeof envSchema>;
22
- type AsstUrl = BaseUrls[Env];
23
- interface AsstClientOptions extends Options {
24
- prefixUrl?: AsstUrl;
25
- }
26
- type Input = string | URL | Request;
27
- type Listener = (config: AsstClientOptions) => void;
28
- declare class AsstClient {
29
- #private;
30
- constructor(options?: AsstClientOptions);
31
- updateConfig(options: AsstClientOptions): void;
32
- getBaseUrl(): AsstUrl;
33
- /**
34
- * Subscribe to config changes. The callback will be immediately invoked with the current config.
35
- * @param subscriptionCallback Function that will be called with the new config every time it is changed
36
- * @returns Function to unsubscribe to config changes
37
- */
38
- subscribeToConfigChange(listener: Listener): () => boolean;
39
- get(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
40
- post(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
41
- put(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
42
- patch(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
43
- head(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
44
- delete(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
45
- }
46
-
47
- declare const attributeValidValuesSchema: z.ZodObject<{
48
- value: z.ZodString;
49
- isDefault: z.ZodBoolean;
50
- locale: z.ZodString;
51
- createdBy: z.ZodString;
52
- createdDate: z.ZodNumber;
53
- modifiedDate: z.ZodNumber;
54
- modifiedBy: z.ZodString;
55
- attributeId: z.ZodNumber;
56
- attrValueId: z.ZodNumber;
57
- attrKeyPair: z.ZodString;
58
- }, "strip", z.ZodTypeAny, {
59
- value: string;
60
- createdDate: number;
61
- createdBy: string;
62
- modifiedDate: number;
63
- modifiedBy: string;
64
- attributeId: number;
65
- isDefault: boolean;
66
- locale: string;
67
- attrKeyPair: string;
68
- attrValueId: number;
69
- }, {
70
- value: string;
71
- createdDate: number;
72
- createdBy: string;
73
- modifiedDate: number;
74
- modifiedBy: string;
75
- attributeId: number;
76
- isDefault: boolean;
77
- locale: string;
78
- attrKeyPair: string;
79
- attrValueId: number;
80
- }>;
81
- type AttributeValidValues = z.infer<typeof attributeValidValuesSchema>;
82
-
83
- declare const spsItemIdResponseSchema: z.ZodObject<{
84
- id: z.ZodString;
85
- ref: z.ZodString;
86
- }, "strip", z.ZodTypeAny, {
87
- id: string;
88
- ref: string;
89
- }, {
90
- id: string;
91
- ref: string;
92
- }>;
93
- type SpsItemIdResponse = z.infer<typeof spsItemIdResponseSchema>;
94
-
95
- declare const companyBriefByOrgSchema: z.ZodObject<{
96
- companyId: z.ZodNumber;
97
- name: z.ZodString;
98
- orgId: z.ZodString;
99
- companyType: z.ZodObject<{
100
- type: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
101
- display: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
102
- }, "strip", z.ZodTypeAny, {
103
- type: "SUPPLIER" | "RETAILER";
104
- display: "SUPPLIER" | "RETAILER";
105
- }, {
106
- type: "SUPPLIER" | "RETAILER";
107
- display: "SUPPLIER" | "RETAILER";
108
- }>;
109
- dc4Id: z.ZodNumber;
110
- }, "strip", z.ZodTypeAny, {
111
- name: string;
112
- orgId: string;
113
- companyId: number;
114
- companyType: {
115
- type: "SUPPLIER" | "RETAILER";
116
- display: "SUPPLIER" | "RETAILER";
117
- };
118
- dc4Id: number;
119
- }, {
120
- name: string;
121
- orgId: string;
122
- companyId: number;
123
- companyType: {
124
- type: "SUPPLIER" | "RETAILER";
125
- display: "SUPPLIER" | "RETAILER";
126
- };
127
- dc4Id: number;
128
- }>;
129
- type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
130
-
131
- export { AsstClient as A, BASE_URLS as B, type CompanyBriefByOrg as C, type Env as E, type SpsItemIdResponse as S, type AttributeValidValues as a, type AsstClientOptions as b, type AsstUrl as c, attributeValidValuesSchema as d, envSchema as e, companyBriefByOrgSchema as f, spsItemIdResponseSchema as s };