@deliverart/sdk-js-customer 0.0.3 → 0.0.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @deliverart/sdk-js-company
2
2
 
3
+ ## 0.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - fe949f7: fix types
8
+
9
+ ## 0.0.4
10
+
11
+ ### Patch Changes
12
+
13
+ - a3cded1: Increase version pkg
14
+
3
15
  ## 0.0.3
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -105,37 +105,58 @@ var import_zod2 = require("zod");
105
105
 
106
106
  // src/types.ts
107
107
  var import_zod = require("zod");
108
- var customerPathSchema = import_zod.z.string().refine((val) => /^\/customers\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
109
- message: "Invalid customer path format"
110
- });
108
+ var customerPathSchema = import_zod.z.string().refine(
109
+ (val) => /^\/customers\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
110
+ val
111
+ ),
112
+ {
113
+ message: "Invalid customer path format"
114
+ }
115
+ );
111
116
  var customerNullablePathSchema = import_zod.z.string().nullable().refine(
112
117
  (val) => {
113
118
  if (!val) return true;
114
- return /^\/customers\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
119
+ return /^\/customers\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
120
+ val
121
+ );
115
122
  },
116
123
  {
117
124
  message: "Invalid customer path format"
118
125
  }
119
126
  );
120
- var customerAddressPathSchema = import_zod.z.string().refine((val) => /^\/customers\/addresses\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
121
- message: "Invalid customerAddress path format"
122
- });
127
+ var customerAddressPathSchema = import_zod.z.string().refine(
128
+ (val) => /^\/customers\/addresses\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
129
+ val
130
+ ),
131
+ {
132
+ message: "Invalid customerAddress path format"
133
+ }
134
+ );
123
135
  var customerAddressNullablePathSchema = import_zod.z.string().nullable().refine(
124
136
  (val) => {
125
137
  if (!val) return true;
126
- return /^\/customers\/addresses\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
138
+ return /^\/customers\/addresses\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
139
+ val
140
+ );
127
141
  },
128
142
  {
129
143
  message: "Invalid customerAddress path format"
130
144
  }
131
145
  );
132
- var customerBusinessProfilePathSchema = import_zod.z.string().refine((val) => /^\/customers\/business_profiles\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
133
- message: "Invalid customerBusinessProfile path format"
134
- });
146
+ var customerBusinessProfilePathSchema = import_zod.z.string().refine(
147
+ (val) => /^\/customers\/business_profiles\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
148
+ val
149
+ ),
150
+ {
151
+ message: "Invalid customerBusinessProfile path format"
152
+ }
153
+ );
135
154
  var customerBusinessProfileNullablePathSchema = import_zod.z.string().nullable().refine(
136
155
  (val) => {
137
156
  if (!val) return true;
138
- return /^\/customers\/business_profiles\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
157
+ return /^\/customers\/business_profiles\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
158
+ val
159
+ );
139
160
  },
140
161
  {
141
162
  message: "Invalid customerBusinessProfile path format"
@@ -152,7 +173,7 @@ var customerSchema = import_zod2.z.object({
152
173
  hasBusinessProfiles: import_zod2.z.boolean(),
153
174
  hasAddresses: import_zod2.z.boolean(),
154
175
  ordersPlaced: import_zod2.z.number(),
155
- totalSpent: import_zod2.z.number(),
176
+ totalSpent: import_zod2.z.string(),
156
177
  createdAt: import_sdk_js_global_types.datetimeSchema,
157
178
  updatedAt: import_sdk_js_global_types.datetimeSchema
158
179
  });
@@ -615,10 +636,10 @@ var getCustomersQuerySchema = import_zod13.z.object({
615
636
  "ordersPlaced[lt]": import_zod13.z.coerce.number().optional(),
616
637
  "ordersPlaced[lte]": import_zod13.z.coerce.number().optional(),
617
638
  "totalSpent[between]": import_zod13.z.coerce.number().optional(),
618
- "totalSpent[gt]": import_zod13.z.coerce.number().optional(),
619
- "totalSpent[gte]": import_zod13.z.coerce.number().optional(),
620
- "totalSpent[lt]": import_zod13.z.coerce.number().optional(),
621
- "totalSpent[lte]": import_zod13.z.coerce.number().optional(),
639
+ "totalSpent[gt]": import_zod13.z.coerce.string().optional(),
640
+ "totalSpent[gte]": import_zod13.z.coerce.string().optional(),
641
+ "totalSpent[lt]": import_zod13.z.coerce.string().optional(),
642
+ "totalSpent[lte]": import_zod13.z.coerce.string().optional(),
622
643
  "order[firstName]": import_sdk_js_global_types6.sortDirSchema.optional(),
623
644
  "order[lastName]": import_sdk_js_global_types6.sortDirSchema.optional(),
624
645
  "order[createdAt]": import_sdk_js_global_types6.sortDirSchema.optional(),