vr-commons 1.0.106 → 1.0.107

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.
@@ -166,43 +166,50 @@ export declare const limitedUpdateSchema: z.ZodObject<{
166
166
  id: string;
167
167
  }>;
168
168
  body: z.ZodEffects<z.ZodObject<{
169
- pricingId: z.ZodOptional<z.ZodString>;
169
+ pricingId: z.ZodString;
170
170
  productId: z.ZodString;
171
- userId: z.ZodOptional<z.ZodString>;
171
+ deviceIds: z.ZodArray<z.ZodString, "many">;
172
+ userId: z.ZodString;
172
173
  }, "strip", z.ZodTypeAny, {
174
+ userId: string;
175
+ deviceIds: string[];
176
+ pricingId: string;
173
177
  productId: string;
174
- userId?: string | undefined;
175
- pricingId?: string | undefined;
176
178
  }, {
179
+ userId: string;
180
+ deviceIds: string[];
181
+ pricingId: string;
177
182
  productId: string;
178
- userId?: string | undefined;
179
- pricingId?: string | undefined;
180
183
  }>, {
184
+ userId: string;
185
+ deviceIds: string[];
186
+ pricingId: string;
181
187
  productId: string;
182
- userId?: string | undefined;
183
- pricingId?: string | undefined;
184
188
  }, {
189
+ userId: string;
190
+ deviceIds: string[];
191
+ pricingId: string;
185
192
  productId: string;
186
- userId?: string | undefined;
187
- pricingId?: string | undefined;
188
193
  }>;
189
194
  }, "strip", z.ZodTypeAny, {
190
195
  params: {
191
196
  id: string;
192
197
  };
193
198
  body: {
199
+ userId: string;
200
+ deviceIds: string[];
201
+ pricingId: string;
194
202
  productId: string;
195
- userId?: string | undefined;
196
- pricingId?: string | undefined;
197
203
  };
198
204
  }, {
199
205
  params: {
200
206
  id: string;
201
207
  };
202
208
  body: {
209
+ userId: string;
210
+ deviceIds: string[];
211
+ pricingId: string;
203
212
  productId: string;
204
- userId?: string | undefined;
205
- pricingId?: string | undefined;
206
213
  };
207
214
  }>;
208
215
  export declare const recordPaymentSchema: z.ZodObject<{
@@ -67,10 +67,14 @@ exports.limitedUpdateSchema = zod_1.z.object({
67
67
  body: zod_1.z
68
68
  .object({
69
69
  // Can update pricing before any payments
70
- pricingId: zod_1.z.string().uuid("Invalid pricing ID").optional(),
70
+ pricingId: zod_1.z.string().uuid("Invalid pricing ID"),
71
71
  productId: zod_1.z.string().uuid("Invalid product ID"),
72
+ deviceIds: zod_1.z
73
+ .array(zod_1.z.string().uuid("Invalid device ID"))
74
+ .min(1, "At least one device required")
75
+ .max(10, "Maximum 10 devices per plan"),
72
76
  // Can reassign to different user before any payments
73
- userId: zod_1.z.string().uuid("Invalid user ID").optional(),
77
+ userId: zod_1.z.string().uuid("Invalid user ID"),
74
78
  })
75
79
  .refine((data) => Object.keys(data).length > 0, {
76
80
  message: "At least one field to update is required",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-commons",
3
- "version": "1.0.106",
3
+ "version": "1.0.107",
4
4
  "description": "Shared functions package",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",