@spscommerce/asst-api 4.2.3 → 4.3.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 (111) hide show
  1. package/dist/{SpsItemIdResponse-CkHdH_QJ.d.cts → SpsItemIdResponse-0VgfCmG_.d.cts} +26 -1
  2. package/dist/{SpsItemIdResponse-CkHdH_QJ.d.ts → SpsItemIdResponse-0VgfCmG_.d.ts} +26 -1
  3. package/dist/{CompanyBriefByOrg-Dy2omcT0.d.cts → SpsItemIdResponse-CI_Ao86P.d.cts} +29 -37
  4. package/dist/{CompanyBriefByOrg-Dy2omcT0.d.ts → SpsItemIdResponse-CI_Ao86P.d.ts} +29 -37
  5. package/dist/chunk-355LPVI6.js +126 -0
  6. package/dist/{chunk-BVCWT7AV.js → chunk-55ECRTUX.js} +1 -1
  7. package/dist/chunk-63KIELUR.js +128 -0
  8. package/dist/{chunk-C73WZRUL.js → chunk-CI3ZSIT4.js} +1 -1
  9. package/dist/chunk-DK2OMRWR.js +134 -0
  10. package/dist/{chunk-HHJDDPFR.js → chunk-LKUGPDIT.js} +21 -11
  11. package/dist/{chunk-SPR77CVW.js → chunk-NFZI7D22.js} +29 -14
  12. package/dist/{chunk-MH76527N.js → chunk-NUUQDRHD.js} +14 -7
  13. package/dist/index.cjs +8 -4
  14. package/dist/index.d.cts +18 -7
  15. package/dist/index.d.ts +18 -7
  16. package/dist/index.js +5 -17
  17. package/dist/msw.cjs +65 -19
  18. package/dist/msw.d.cts +58 -4
  19. package/dist/msw.d.ts +58 -4
  20. package/dist/msw.js +61 -13
  21. package/dist/{zod-VuA-QJOT.d.ts → zod-C41Rts8D.d.cts} +11 -23
  22. package/dist/{zod-CFNzalN6.d.ts → zod-CJmsC_DX.d.cts} +60 -39
  23. package/dist/zod-COyz02Lh.d.ts +5903 -0
  24. package/dist/{zod-BRmUARvM.d.cts → zod-CzPw-bfk.d.cts} +60 -39
  25. package/dist/{zod-jDi_gO0s.d.cts → zod-vDuspd-x.d.ts} +29 -44
  26. package/dist/zod-xWM6u1LJ.d.ts +5900 -0
  27. package/dist/zod.cjs +8 -4
  28. package/dist/zod.d.cts +2 -2
  29. package/dist/zod.d.ts +2 -2
  30. package/dist/zod.js +2 -2
  31. package/package.json +3 -3
  32. package/dist/CompanyBriefByOrg-57oGCtjK.d.ts +0 -3427
  33. package/dist/CompanyBriefByOrg-LTdsUKm4.d.ts +0 -3427
  34. package/dist/CompanyBriefByOrg-itus4RMD.d.cts +0 -131
  35. package/dist/CompanyBriefByOrg-itus4RMD.d.ts +0 -131
  36. package/dist/chunk-27XV7TS2.js +0 -522
  37. package/dist/chunk-2ETQHIXC.js +0 -528
  38. package/dist/chunk-2VJS5KPH.js +0 -5182
  39. package/dist/chunk-2W3LZ4AO.js +0 -513
  40. package/dist/chunk-3XNXQYIB.js +0 -521
  41. package/dist/chunk-4C475UZX.js +0 -5164
  42. package/dist/chunk-4RARACQK.js +0 -528
  43. package/dist/chunk-5AROSGQB.js +0 -5034
  44. package/dist/chunk-7CGKH3QQ.js +0 -528
  45. package/dist/chunk-7F5CQRS2.js +0 -567
  46. package/dist/chunk-7OEXJIWW.js +0 -565
  47. package/dist/chunk-A22SEYVL.js +0 -530
  48. package/dist/chunk-AH5MG2WF.js +0 -5040
  49. package/dist/chunk-BDSSH6MN.js +0 -574
  50. package/dist/chunk-BFIQVABZ.js +0 -528
  51. package/dist/chunk-BJTO4CRW.js +0 -558
  52. package/dist/chunk-BLMS4KUD.js +0 -5164
  53. package/dist/chunk-BTNVA4NZ.js +0 -568
  54. package/dist/chunk-CNQTNX3M.js +0 -567
  55. package/dist/chunk-CUVSWUIQ.js +0 -5040
  56. package/dist/chunk-DP2ZMQG5.js +0 -4881
  57. package/dist/chunk-EMBJNPTB.js +0 -5040
  58. package/dist/chunk-EO2UMCWY.js +0 -574
  59. package/dist/chunk-FTB465WY.js +0 -575
  60. package/dist/chunk-G6A4EVAL.js +0 -528
  61. package/dist/chunk-GDARBI5R.js +0 -5185
  62. package/dist/chunk-HY2SRD5L.js +0 -5003
  63. package/dist/chunk-ISQ3LQRI.js +0 -565
  64. package/dist/chunk-KKX3CXHP.js +0 -558
  65. package/dist/chunk-LCK4AEWB.js +0 -79
  66. package/dist/chunk-LJVJ4SYE.js +0 -568
  67. package/dist/chunk-LYMA4XGG.js +0 -5181
  68. package/dist/chunk-MLAU3LFL.js +0 -527
  69. package/dist/chunk-MQREZR54.js +0 -5164
  70. package/dist/chunk-N4A4BVKV.js +0 -5163
  71. package/dist/chunk-QVEV57JA.js +0 -5185
  72. package/dist/chunk-SI7CWAHC.js +0 -574
  73. package/dist/chunk-SK6U2JDX.js +0 -566
  74. package/dist/chunk-SQBB5K5J.js +0 -574
  75. package/dist/chunk-TQ2IQDSM.js +0 -568
  76. package/dist/chunk-TTT6PM27.js +0 -558
  77. package/dist/chunk-VFMKDLXO.js +0 -570
  78. package/dist/chunk-VKPQOGVS.js +0 -565
  79. package/dist/chunk-VLLI4AYA.js +0 -520
  80. package/dist/chunk-VNFLJ5FV.js +0 -530
  81. package/dist/chunk-WNCDQJEM.js +0 -5034
  82. package/dist/chunk-XYZVRJF3.js +0 -5162
  83. package/dist/chunk-YJCJB4OT.js +0 -79
  84. package/dist/chunk-YJMQ4PGM.js +0 -559
  85. package/dist/chunk-Z6PXGHNC.js +0 -570
  86. package/dist/chunk-ZQ32XEVW.js +0 -79
  87. package/dist/chunk-ZXXDLGW7.js +0 -513
  88. package/dist/index-9KKchLwe.d.cts +0 -14
  89. package/dist/index-B8ovDTs5.d.cts +0 -14
  90. package/dist/index-BFKgtuVI.d.ts +0 -14
  91. package/dist/index-DeivEdv0.d.ts +0 -14
  92. package/dist/index-Zz-6wNSh.d.ts +0 -106
  93. package/dist/index-fgr_c5Wj.d.ts +0 -106
  94. package/dist/zod-6gU8y6oS.d.cts +0 -6712
  95. package/dist/zod-B4sIVoVX.d.ts +0 -6712
  96. package/dist/zod-BI81QHVK.d.ts +0 -6715
  97. package/dist/zod-BUCQsGOm.d.ts +0 -6712
  98. package/dist/zod-BdDmL7rg.d.ts +0 -6718
  99. package/dist/zod-Bl_5j5Nx.d.ts +0 -6712
  100. package/dist/zod-Bxu34bbp.d.ts +0 -6718
  101. package/dist/zod-C4kEHhO8.d.cts +0 -6718
  102. package/dist/zod-C5pRCHei.d.ts +0 -6712
  103. package/dist/zod-CIacR1Kf.d.cts +0 -6712
  104. package/dist/zod-DBbdP-KT.d.cts +0 -6718
  105. package/dist/zod-DyBGOUbG.d.ts +0 -5876
  106. package/dist/zod-DzhoVlw_.d.cts +0 -6712
  107. package/dist/zod-FdtLO2-F.d.cts +0 -6715
  108. package/dist/zod-NE2xXWlK.d.ts +0 -3416
  109. package/dist/zod-lSiFMzqK.d.cts +0 -6712
  110. package/dist/zod-rs54beS2.d.cts +0 -5876
  111. 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 };