@deliverart/sdk-js-user 0.2.3 → 0.2.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-user
2
2
 
3
+ ## 0.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 96473b8: Add path schema
8
+
9
+ ## 0.2.4
10
+
11
+ ### Patch Changes
12
+
13
+ - 3c37ffd: update dependencies
14
+
3
15
  ## 0.2.3
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -41,6 +41,8 @@ __export(index_exports, {
41
41
  securityRoles: () => securityRoles,
42
42
  updateUserInputSchema: () => updateUserInputSchema,
43
43
  updateUserResponseSchema: () => updateUserResponseSchema,
44
+ userNullablePathSchema: () => userNullablePathSchema,
45
+ userPathSchema: () => userPathSchema,
44
46
  userSchema: () => userSchema,
45
47
  userStepSchema: () => userStepSchema,
46
48
  userSteps: () => userSteps,
@@ -100,6 +102,18 @@ var userSteps = [
100
102
  "create_point_of_sale"
101
103
  ];
102
104
  var userStepSchema = import_zod.z.enum(userSteps);
105
+ var userPathSchema = import_zod.z.string().refine((val) => /^\/users\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
106
+ message: "Invalid user path format"
107
+ });
108
+ var userNullablePathSchema = import_zod.z.string().nullable().refine(
109
+ (val) => {
110
+ if (!val) return true;
111
+ return /^\/users\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
112
+ },
113
+ {
114
+ message: "Invalid user path format"
115
+ }
116
+ );
103
117
 
104
118
  // src/models.ts
105
119
  var userSchema = import_zod2.z.object({
@@ -289,6 +303,8 @@ var UpdateUser = class extends import_sdk_js_core6.AbstractApiRequest {
289
303
  securityRoles,
290
304
  updateUserInputSchema,
291
305
  updateUserResponseSchema,
306
+ userNullablePathSchema,
307
+ userPathSchema,
292
308
  userSchema,
293
309
  userStepSchema,
294
310
  userSteps,
package/dist/index.d.cts CHANGED
@@ -747,5 +747,9 @@ type SecurityRole = z.infer<typeof securityRoleSchema>;
747
747
  declare const userSteps: readonly ["registration", "verify_email", "create_company", "create_point_of_sale"];
748
748
  declare const userStepSchema: z.ZodEnum<["registration", "verify_email", "create_company", "create_point_of_sale"]>;
749
749
  type UserStep = z.infer<typeof userStepSchema>;
750
+ declare const userPathSchema: z.ZodEffects<z.ZodString, string, string>;
751
+ type UserPath = z.infer<typeof userPathSchema>;
752
+ declare const userNullablePathSchema: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
753
+ type UserNullablePath = z.infer<typeof userNullablePathSchema>;
750
754
 
751
- export { CreateUser, type CreateUserInput, type CreateUserResponse, DeleteUser, GetMe, type GetMeResponse, GetUserDetails, type GetUserDetailsResponse, GetUsers, type GetUsersQueryParams, type GetUsersResponse, type SecurityRole, UpdateUser, type UpdateUserInput, type UpdateUserResponse, type User, type UserStep, type WritableUser, createUserInputSchema, createUserResponseSchema, deleteUserInputSchema, deleteUserResponseSchema, getMeInputSchema, getMeResponseSchema, getUserDetailsInputSchema, getUserDetailsResponseSchema, getUsersInputSchema, getUsersQuerySchema, getUsersResponseSchema, securityRoleSchema, securityRoles, updateUserInputSchema, updateUserResponseSchema, userSchema, userStepSchema, userSteps, writableUserSchema };
755
+ export { CreateUser, type CreateUserInput, type CreateUserResponse, DeleteUser, GetMe, type GetMeResponse, GetUserDetails, type GetUserDetailsResponse, GetUsers, type GetUsersQueryParams, type GetUsersResponse, type SecurityRole, UpdateUser, type UpdateUserInput, type UpdateUserResponse, type User, type UserNullablePath, type UserPath, type UserStep, type WritableUser, createUserInputSchema, createUserResponseSchema, deleteUserInputSchema, deleteUserResponseSchema, getMeInputSchema, getMeResponseSchema, getUserDetailsInputSchema, getUserDetailsResponseSchema, getUsersInputSchema, getUsersQuerySchema, getUsersResponseSchema, securityRoleSchema, securityRoles, updateUserInputSchema, updateUserResponseSchema, userNullablePathSchema, userPathSchema, userSchema, userStepSchema, userSteps, writableUserSchema };
package/dist/index.d.ts CHANGED
@@ -747,5 +747,9 @@ type SecurityRole = z.infer<typeof securityRoleSchema>;
747
747
  declare const userSteps: readonly ["registration", "verify_email", "create_company", "create_point_of_sale"];
748
748
  declare const userStepSchema: z.ZodEnum<["registration", "verify_email", "create_company", "create_point_of_sale"]>;
749
749
  type UserStep = z.infer<typeof userStepSchema>;
750
+ declare const userPathSchema: z.ZodEffects<z.ZodString, string, string>;
751
+ type UserPath = z.infer<typeof userPathSchema>;
752
+ declare const userNullablePathSchema: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
753
+ type UserNullablePath = z.infer<typeof userNullablePathSchema>;
750
754
 
751
- export { CreateUser, type CreateUserInput, type CreateUserResponse, DeleteUser, GetMe, type GetMeResponse, GetUserDetails, type GetUserDetailsResponse, GetUsers, type GetUsersQueryParams, type GetUsersResponse, type SecurityRole, UpdateUser, type UpdateUserInput, type UpdateUserResponse, type User, type UserStep, type WritableUser, createUserInputSchema, createUserResponseSchema, deleteUserInputSchema, deleteUserResponseSchema, getMeInputSchema, getMeResponseSchema, getUserDetailsInputSchema, getUserDetailsResponseSchema, getUsersInputSchema, getUsersQuerySchema, getUsersResponseSchema, securityRoleSchema, securityRoles, updateUserInputSchema, updateUserResponseSchema, userSchema, userStepSchema, userSteps, writableUserSchema };
755
+ export { CreateUser, type CreateUserInput, type CreateUserResponse, DeleteUser, GetMe, type GetMeResponse, GetUserDetails, type GetUserDetailsResponse, GetUsers, type GetUsersQueryParams, type GetUsersResponse, type SecurityRole, UpdateUser, type UpdateUserInput, type UpdateUserResponse, type User, type UserNullablePath, type UserPath, type UserStep, type WritableUser, createUserInputSchema, createUserResponseSchema, deleteUserInputSchema, deleteUserResponseSchema, getMeInputSchema, getMeResponseSchema, getUserDetailsInputSchema, getUserDetailsResponseSchema, getUsersInputSchema, getUsersQuerySchema, getUsersResponseSchema, securityRoleSchema, securityRoles, updateUserInputSchema, updateUserResponseSchema, userNullablePathSchema, userPathSchema, userSchema, userStepSchema, userSteps, writableUserSchema };
package/dist/index.js CHANGED
@@ -50,6 +50,18 @@ var userSteps = [
50
50
  "create_point_of_sale"
51
51
  ];
52
52
  var userStepSchema = z.enum(userSteps);
53
+ var userPathSchema = z.string().refine((val) => /^\/users\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
54
+ message: "Invalid user path format"
55
+ });
56
+ var userNullablePathSchema = z.string().nullable().refine(
57
+ (val) => {
58
+ if (!val) return true;
59
+ return /^\/users\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
60
+ },
61
+ {
62
+ message: "Invalid user path format"
63
+ }
64
+ );
53
65
 
54
66
  // src/models.ts
55
67
  var userSchema = z2.object({
@@ -241,6 +253,8 @@ export {
241
253
  securityRoles,
242
254
  updateUserInputSchema,
243
255
  updateUserResponseSchema,
256
+ userNullablePathSchema,
257
+ userPathSchema,
244
258
  userSchema,
245
259
  userStepSchema,
246
260
  userSteps,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deliverart/sdk-js-user",
3
3
  "description": "Deliverart JavaScript SDK for User Management",
4
- "version": "0.2.3",
4
+ "version": "0.2.5",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "zod": "3.25.67",
16
16
  "axios": "1.9.0",
17
17
  "@deliverart/sdk-js-core": "0.1.3",
18
- "@deliverart/sdk-js-global-types": "0.0.10"
18
+ "@deliverart/sdk-js-global-types": "0.0.13"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@changesets/cli": "^2.29.4",
package/src/types.ts CHANGED
@@ -49,3 +49,24 @@ export const userSteps = [
49
49
  ] as const
50
50
  export const userStepSchema = z.enum(userSteps)
51
51
  export type UserStep = z.infer<typeof userStepSchema>
52
+
53
+ export const userPathSchema = z
54
+ .string()
55
+ .refine(val => /^\/users\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
56
+ message: 'Invalid user path format',
57
+ })
58
+ export type UserPath = z.infer<typeof userPathSchema>
59
+
60
+ export const userNullablePathSchema = z
61
+ .string()
62
+ .nullable()
63
+ .refine(
64
+ val => {
65
+ if (!val) return true
66
+ return /^\/users\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val)
67
+ },
68
+ {
69
+ message: 'Invalid user path format',
70
+ },
71
+ )
72
+ export type UserNullablePath = z.infer<typeof userNullablePathSchema>