@softruck/api-contracts 0.1.1-beta.3

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 (250) hide show
  1. package/README.md +0 -0
  2. package/dist/alerts/api.d.ts +9 -0
  3. package/dist/alerts/api.js +8 -0
  4. package/dist/alerts/index.d.ts +3 -0
  5. package/dist/alerts/index.js +3 -0
  6. package/dist/alerts/schemas.d.ts +65 -0
  7. package/dist/alerts/schemas.js +29 -0
  8. package/dist/alerts/types.d.ts +36 -0
  9. package/dist/alerts/types.js +1 -0
  10. package/dist/auth/api.d.ts +26 -0
  11. package/dist/auth/api.js +39 -0
  12. package/dist/auth/index.d.ts +3 -0
  13. package/dist/auth/index.js +3 -0
  14. package/dist/auth/schemas/access-codes.d.ts +16 -0
  15. package/dist/auth/schemas/access-codes.js +13 -0
  16. package/dist/auth/schemas/login.d.ts +13 -0
  17. package/dist/auth/schemas/login.js +9 -0
  18. package/dist/auth/schemas/passwords.d.ts +81 -0
  19. package/dist/auth/schemas/passwords.js +28 -0
  20. package/dist/auth/schemas/sessions.d.ts +3 -0
  21. package/dist/auth/schemas/sessions.js +2 -0
  22. package/dist/auth/schemas/tokens.d.ts +11 -0
  23. package/dist/auth/schemas/tokens.js +9 -0
  24. package/dist/auth/schemas.d.ts +5 -0
  25. package/dist/auth/schemas.js +5 -0
  26. package/dist/auth/types.d.ts +1 -0
  27. package/dist/auth/types.js +1 -0
  28. package/dist/checklist/api.d.ts +30 -0
  29. package/dist/checklist/api.js +15 -0
  30. package/dist/checklist/index.d.ts +3 -0
  31. package/dist/checklist/index.js +3 -0
  32. package/dist/checklist/schemas.d.ts +62 -0
  33. package/dist/checklist/schemas.js +46 -0
  34. package/dist/checklist/types.d.ts +76 -0
  35. package/dist/checklist/types.js +1 -0
  36. package/dist/chips/api.d.ts +17 -0
  37. package/dist/chips/api.js +8 -0
  38. package/dist/chips/connections/api.d.ts +13 -0
  39. package/dist/chips/connections/api.js +4 -0
  40. package/dist/chips/connections/index.d.ts +3 -0
  41. package/dist/chips/connections/index.js +3 -0
  42. package/dist/chips/connections/schemas.d.ts +31 -0
  43. package/dist/chips/connections/schemas.js +31 -0
  44. package/dist/chips/connections/types.d.ts +26 -0
  45. package/dist/chips/connections/types.js +1 -0
  46. package/dist/chips/index.d.ts +5 -0
  47. package/dist/chips/index.js +5 -0
  48. package/dist/chips/requirements/api.d.ts +13 -0
  49. package/dist/chips/requirements/api.js +4 -0
  50. package/dist/chips/requirements/index.d.ts +3 -0
  51. package/dist/chips/requirements/index.js +3 -0
  52. package/dist/chips/requirements/schemas.d.ts +21 -0
  53. package/dist/chips/requirements/schemas.js +21 -0
  54. package/dist/chips/requirements/types.d.ts +16 -0
  55. package/dist/chips/requirements/types.js +1 -0
  56. package/dist/chips/schemas.d.ts +78 -0
  57. package/dist/chips/schemas.js +72 -0
  58. package/dist/chips/types.d.ts +76 -0
  59. package/dist/chips/types.js +1 -0
  60. package/dist/core/client.d.ts +45 -0
  61. package/dist/core/client.js +42 -0
  62. package/dist/core/index.d.ts +4 -0
  63. package/dist/core/index.js +4 -0
  64. package/dist/core/query-builder.d.ts +34 -0
  65. package/dist/core/query-builder.js +86 -0
  66. package/dist/core/schemas.d.ts +80 -0
  67. package/dist/core/schemas.js +31 -0
  68. package/dist/core/types.d.ts +119 -0
  69. package/dist/core/types.js +2 -0
  70. package/dist/devices/activations/api.d.ts +20 -0
  71. package/dist/devices/activations/api.js +9 -0
  72. package/dist/devices/activations/index.d.ts +3 -0
  73. package/dist/devices/activations/index.js +3 -0
  74. package/dist/devices/activations/schemas.d.ts +42 -0
  75. package/dist/devices/activations/schemas.js +42 -0
  76. package/dist/devices/activations/types.d.ts +75 -0
  77. package/dist/devices/activations/types.js +1 -0
  78. package/dist/devices/api.d.ts +28 -0
  79. package/dist/devices/api.js +11 -0
  80. package/dist/devices/commands/api.d.ts +17 -0
  81. package/dist/devices/commands/api.js +8 -0
  82. package/dist/devices/commands/index.d.ts +3 -0
  83. package/dist/devices/commands/index.js +3 -0
  84. package/dist/devices/commands/schemas.d.ts +39 -0
  85. package/dist/devices/commands/schemas.js +33 -0
  86. package/dist/devices/commands/types.d.ts +58 -0
  87. package/dist/devices/commands/types.js +1 -0
  88. package/dist/devices/index.d.ts +5 -0
  89. package/dist/devices/index.js +5 -0
  90. package/dist/devices/schemas.d.ts +115 -0
  91. package/dist/devices/schemas.js +96 -0
  92. package/dist/devices/types.d.ts +142 -0
  93. package/dist/devices/types.js +1 -0
  94. package/dist/enterprises/api.d.ts +27 -0
  95. package/dist/enterprises/api.js +15 -0
  96. package/dist/enterprises/index.d.ts +3 -0
  97. package/dist/enterprises/index.js +3 -0
  98. package/dist/enterprises/schemas.d.ts +59 -0
  99. package/dist/enterprises/schemas.js +53 -0
  100. package/dist/enterprises/types.d.ts +160 -0
  101. package/dist/enterprises/types.js +1 -0
  102. package/dist/events/api.d.ts +18 -0
  103. package/dist/events/api.js +13 -0
  104. package/dist/events/index.d.ts +3 -0
  105. package/dist/events/index.js +3 -0
  106. package/dist/events/schemas.d.ts +262 -0
  107. package/dist/events/schemas.js +54 -0
  108. package/dist/events/types.d.ts +130 -0
  109. package/dist/events/types.js +1 -0
  110. package/dist/exports/api.d.ts +18 -0
  111. package/dist/exports/api.js +9 -0
  112. package/dist/exports/index.d.ts +3 -0
  113. package/dist/exports/index.js +3 -0
  114. package/dist/exports/schemas.d.ts +27 -0
  115. package/dist/exports/schemas.js +22 -0
  116. package/dist/exports/types.d.ts +47 -0
  117. package/dist/exports/types.js +1 -0
  118. package/dist/fuelings/api.d.ts +22 -0
  119. package/dist/fuelings/api.js +9 -0
  120. package/dist/fuelings/index.d.ts +3 -0
  121. package/dist/fuelings/index.js +3 -0
  122. package/dist/fuelings/schemas.d.ts +84 -0
  123. package/dist/fuelings/schemas.js +52 -0
  124. package/dist/fuelings/types.d.ts +80 -0
  125. package/dist/fuelings/types.js +1 -0
  126. package/dist/index.d.ts +22 -0
  127. package/dist/index.js +22 -0
  128. package/dist/maintenances/api.d.ts +31 -0
  129. package/dist/maintenances/api.js +12 -0
  130. package/dist/maintenances/index.d.ts +3 -0
  131. package/dist/maintenances/index.js +3 -0
  132. package/dist/maintenances/schemas.d.ts +74 -0
  133. package/dist/maintenances/schemas.js +44 -0
  134. package/dist/maintenances/types.d.ts +69 -0
  135. package/dist/maintenances/types.js +1 -0
  136. package/dist/operation-logs/api.d.ts +13 -0
  137. package/dist/operation-logs/api.js +10 -0
  138. package/dist/operation-logs/index.d.ts +3 -0
  139. package/dist/operation-logs/index.js +3 -0
  140. package/dist/operation-logs/schemas.d.ts +34 -0
  141. package/dist/operation-logs/schemas.js +22 -0
  142. package/dist/operation-logs/types.d.ts +32 -0
  143. package/dist/operation-logs/types.js +1 -0
  144. package/dist/protocols/api.d.ts +34 -0
  145. package/dist/protocols/api.js +13 -0
  146. package/dist/protocols/index.d.ts +3 -0
  147. package/dist/protocols/index.js +3 -0
  148. package/dist/protocols/schemas.d.ts +66 -0
  149. package/dist/protocols/schemas.js +36 -0
  150. package/dist/protocols/types.d.ts +99 -0
  151. package/dist/protocols/types.js +1 -0
  152. package/dist/service-orders/api.d.ts +38 -0
  153. package/dist/service-orders/api.js +14 -0
  154. package/dist/service-orders/index.d.ts +3 -0
  155. package/dist/service-orders/index.js +3 -0
  156. package/dist/service-orders/schemas.d.ts +82 -0
  157. package/dist/service-orders/schemas.js +47 -0
  158. package/dist/service-orders/types.d.ts +84 -0
  159. package/dist/service-orders/types.js +1 -0
  160. package/dist/sharings/api.d.ts +17 -0
  161. package/dist/sharings/api.js +8 -0
  162. package/dist/sharings/index.d.ts +3 -0
  163. package/dist/sharings/index.js +3 -0
  164. package/dist/sharings/schemas.d.ts +47 -0
  165. package/dist/sharings/schemas.js +36 -0
  166. package/dist/sharings/types.d.ts +54 -0
  167. package/dist/sharings/types.js +1 -0
  168. package/dist/surveys/api.d.ts +2 -0
  169. package/dist/surveys/api.js +3 -0
  170. package/dist/surveys/index.d.ts +3 -0
  171. package/dist/surveys/index.js +3 -0
  172. package/dist/surveys/schemas.d.ts +33 -0
  173. package/dist/surveys/schemas.js +23 -0
  174. package/dist/surveys/types.d.ts +27 -0
  175. package/dist/surveys/types.js +1 -0
  176. package/dist/tags/api.d.ts +24 -0
  177. package/dist/tags/api.js +28 -0
  178. package/dist/tags/index.d.ts +3 -0
  179. package/dist/tags/index.js +3 -0
  180. package/dist/tags/schemas.d.ts +26 -0
  181. package/dist/tags/schemas.js +19 -0
  182. package/dist/tags/types.d.ts +16 -0
  183. package/dist/tags/types.js +1 -0
  184. package/dist/tracking/api.d.ts +2 -0
  185. package/dist/tracking/api.js +3 -0
  186. package/dist/tracking/index.d.ts +3 -0
  187. package/dist/tracking/index.js +3 -0
  188. package/dist/tracking/schemas.d.ts +12 -0
  189. package/dist/tracking/schemas.js +12 -0
  190. package/dist/tracking/types.d.ts +11 -0
  191. package/dist/tracking/types.js +1 -0
  192. package/dist/trajectories/api.d.ts +27 -0
  193. package/dist/trajectories/api.js +13 -0
  194. package/dist/trajectories/index.d.ts +3 -0
  195. package/dist/trajectories/index.js +3 -0
  196. package/dist/trajectories/schemas.d.ts +39 -0
  197. package/dist/trajectories/schemas.js +30 -0
  198. package/dist/trajectories/types.d.ts +58 -0
  199. package/dist/trajectories/types.js +1 -0
  200. package/dist/trips/api.d.ts +30 -0
  201. package/dist/trips/api.js +12 -0
  202. package/dist/trips/index.d.ts +3 -0
  203. package/dist/trips/index.js +3 -0
  204. package/dist/trips/schemas.d.ts +62 -0
  205. package/dist/trips/schemas.js +36 -0
  206. package/dist/trips/types.d.ts +65 -0
  207. package/dist/trips/types.js +1 -0
  208. package/dist/users/api.d.ts +533 -0
  209. package/dist/users/api.js +102 -0
  210. package/dist/users/configuration/api.d.ts +21 -0
  211. package/dist/users/configuration/api.js +16 -0
  212. package/dist/users/configuration/index.d.ts +3 -0
  213. package/dist/users/configuration/index.js +3 -0
  214. package/dist/users/configuration/schemas.d.ts +91 -0
  215. package/dist/users/configuration/schemas.js +42 -0
  216. package/dist/users/configuration/types.d.ts +36 -0
  217. package/dist/users/configuration/types.js +1 -0
  218. package/dist/users/index.d.ts +4 -0
  219. package/dist/users/index.js +4 -0
  220. package/dist/users/schemas/addresses.d.ts +136 -0
  221. package/dist/users/schemas/addresses.js +94 -0
  222. package/dist/users/schemas/authenticated-user.d.ts +30 -0
  223. package/dist/users/schemas/authenticated-user.js +21 -0
  224. package/dist/users/schemas/common.d.ts +28 -0
  225. package/dist/users/schemas/common.js +26 -0
  226. package/dist/users/schemas/documents.d.ts +40 -0
  227. package/dist/users/schemas/documents.js +53 -0
  228. package/dist/users/schemas/passwords.d.ts +10 -0
  229. package/dist/users/schemas/passwords.js +15 -0
  230. package/dist/users/schemas/roles.d.ts +60 -0
  231. package/dist/users/schemas/roles.js +9 -0
  232. package/dist/users/schemas/sessions.d.ts +84 -0
  233. package/dist/users/schemas/sessions.js +55 -0
  234. package/dist/users/schemas/usernames.d.ts +14 -0
  235. package/dist/users/schemas/usernames.js +12 -0
  236. package/dist/users/schemas/users.d.ts +648 -0
  237. package/dist/users/schemas/users.js +243 -0
  238. package/dist/users/schemas.d.ts +8 -0
  239. package/dist/users/schemas.js +8 -0
  240. package/dist/users/types.d.ts +1 -0
  241. package/dist/users/types.js +1 -0
  242. package/dist/vehicles/api.d.ts +28 -0
  243. package/dist/vehicles/api.js +13 -0
  244. package/dist/vehicles/index.d.ts +3 -0
  245. package/dist/vehicles/index.js +3 -0
  246. package/dist/vehicles/schemas.d.ts +88 -0
  247. package/dist/vehicles/schemas.js +71 -0
  248. package/dist/vehicles/types.d.ts +142 -0
  249. package/dist/vehicles/types.js +1 -0
  250. package/package.json +59 -0
@@ -0,0 +1,60 @@
1
+ import { z } from 'zod';
2
+ export declare const RoleSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ attributes: z.ZodObject<{
5
+ name: z.ZodString;
6
+ }, z.core.$strip>;
7
+ }, z.core.$strip>;
8
+ export type Role = z.infer<typeof RoleSchema>;
9
+ export declare const RoleQueryParamsSchema: z.ZodObject<{
10
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"only">]>>;
11
+ page: z.ZodOptional<z.ZodNumber>;
12
+ limit: z.ZodOptional<z.ZodNumber>;
13
+ search: z.ZodOptional<z.ZodString>;
14
+ attributes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodType<"name", unknown, z.core.$ZodTypeInternals<"name", unknown>>, z.ZodLiteral<"*">]>>>;
15
+ filters: z.ZodOptional<z.ZodRecord<z.ZodType<"name", unknown, z.core.$ZodTypeInternals<"name", unknown>> & z.core.$partial, z.ZodUnion<readonly [z.ZodObject<{
16
+ operator: z.ZodEnum<{
17
+ in: "in";
18
+ eq: "eq";
19
+ neq: "neq";
20
+ gt: "gt";
21
+ gte: "gte";
22
+ lt: "lt";
23
+ lte: "lte";
24
+ btw: "btw";
25
+ nbtw: "nbtw";
26
+ ilk: "ilk";
27
+ ew: "ew";
28
+ sw: "sw";
29
+ nin: "nin";
30
+ is: "is";
31
+ }>;
32
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
33
+ }, z.core.$strict>, z.ZodArray<z.ZodObject<{
34
+ operator: z.ZodEnum<{
35
+ in: "in";
36
+ eq: "eq";
37
+ neq: "neq";
38
+ gt: "gt";
39
+ gte: "gte";
40
+ lt: "lt";
41
+ lte: "lte";
42
+ btw: "btw";
43
+ nbtw: "nbtw";
44
+ ilk: "ilk";
45
+ ew: "ew";
46
+ sw: "sw";
47
+ nin: "nin";
48
+ is: "is";
49
+ }>;
50
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
51
+ }, z.core.$strict>>]>>>;
52
+ sort: z.ZodOptional<z.ZodObject<{
53
+ prop: z.ZodType<"name", unknown, z.core.$ZodTypeInternals<"name", unknown>>;
54
+ order: z.ZodEnum<{
55
+ ASC: "ASC";
56
+ DESC: "DESC";
57
+ }>;
58
+ }, z.core.$strict>>;
59
+ }, z.core.$strict>;
60
+ export type RoleQueryParams = z.infer<typeof RoleQueryParamsSchema>;
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ import { makeQueryParamsSchema } from '../../core/schemas.js';
3
+ import { RoleAttributesSchema } from './common.js';
4
+ export const RoleSchema = z.object({
5
+ id: z.string(),
6
+ attributes: RoleAttributesSchema,
7
+ });
8
+ const RoleAttributeKeySchema = RoleSchema.shape.attributes.keyof();
9
+ export const RoleQueryParamsSchema = makeQueryParamsSchema(RoleAttributeKeySchema);
@@ -0,0 +1,84 @@
1
+ import { z } from 'zod';
2
+ export declare const UserSessionSchema: z.ZodObject<{
3
+ type: z.ZodOptional<z.ZodLiteral<"user_sessions">>;
4
+ id: z.ZodString;
5
+ uuid: z.ZodOptional<z.ZodString>;
6
+ attributes: z.ZodObject<{
7
+ os_name: z.ZodNullable<z.ZodString>;
8
+ os_version: z.ZodNullable<z.ZodString>;
9
+ browser: z.ZodNullable<z.ZodString>;
10
+ browser_version: z.ZodNullable<z.ZodString>;
11
+ last_seen_ip: z.ZodNullable<z.ZodString>;
12
+ created_at: z.ZodNullable<z.ZodString>;
13
+ issued_at: z.ZodNullable<z.ZodString>;
14
+ refreshes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15
+ user_agent_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ device: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ device_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ screen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ connection: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ platform: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ currentSession: z.ZodOptional<z.ZodBoolean>;
24
+ }, z.core.$strip>;
25
+ relationships: z.ZodOptional<z.ZodObject<{
26
+ user: z.ZodOptional<z.ZodObject<{
27
+ type: z.ZodLiteral<"user">;
28
+ id: z.ZodString;
29
+ }, z.core.$strip>>;
30
+ }, z.core.$strip>>;
31
+ }, z.core.$strip>;
32
+ export type UserSession = z.infer<typeof UserSessionSchema>;
33
+ export declare const SessionQueryParamsSchema: z.ZodObject<{
34
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"only">]>>;
35
+ page: z.ZodOptional<z.ZodNumber>;
36
+ limit: z.ZodOptional<z.ZodNumber>;
37
+ search: z.ZodOptional<z.ZodString>;
38
+ attributes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodType<"platform" | "screen" | "browser" | "created_at" | "updated_at" | "refreshes" | "user_agent_name" | "device" | "device_model" | "browser_version" | "os_name" | "os_version" | "connection" | "last_seen_ip" | "issued_at" | "expires_at", unknown, z.core.$ZodTypeInternals<"platform" | "screen" | "browser" | "created_at" | "updated_at" | "refreshes" | "user_agent_name" | "device" | "device_model" | "browser_version" | "os_name" | "os_version" | "connection" | "last_seen_ip" | "issued_at" | "expires_at", unknown>>, z.ZodLiteral<"*">]>>>;
39
+ filters: z.ZodOptional<z.ZodRecord<z.ZodType<"platform" | "screen" | "browser" | "created_at" | "updated_at" | "refreshes" | "user_agent_name" | "device" | "device_model" | "browser_version" | "os_name" | "os_version" | "connection" | "last_seen_ip" | "issued_at" | "expires_at", unknown, z.core.$ZodTypeInternals<"platform" | "screen" | "browser" | "created_at" | "updated_at" | "refreshes" | "user_agent_name" | "device" | "device_model" | "browser_version" | "os_name" | "os_version" | "connection" | "last_seen_ip" | "issued_at" | "expires_at", unknown>> & z.core.$partial, z.ZodUnion<readonly [z.ZodObject<{
40
+ operator: z.ZodEnum<{
41
+ in: "in";
42
+ eq: "eq";
43
+ neq: "neq";
44
+ gt: "gt";
45
+ gte: "gte";
46
+ lt: "lt";
47
+ lte: "lte";
48
+ btw: "btw";
49
+ nbtw: "nbtw";
50
+ ilk: "ilk";
51
+ ew: "ew";
52
+ sw: "sw";
53
+ nin: "nin";
54
+ is: "is";
55
+ }>;
56
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
57
+ }, z.core.$strict>, z.ZodArray<z.ZodObject<{
58
+ operator: z.ZodEnum<{
59
+ in: "in";
60
+ eq: "eq";
61
+ neq: "neq";
62
+ gt: "gt";
63
+ gte: "gte";
64
+ lt: "lt";
65
+ lte: "lte";
66
+ btw: "btw";
67
+ nbtw: "nbtw";
68
+ ilk: "ilk";
69
+ ew: "ew";
70
+ sw: "sw";
71
+ nin: "nin";
72
+ is: "is";
73
+ }>;
74
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
75
+ }, z.core.$strict>>]>>>;
76
+ sort: z.ZodOptional<z.ZodObject<{
77
+ prop: z.ZodType<"platform" | "screen" | "browser" | "created_at" | "updated_at" | "refreshes" | "user_agent_name" | "device" | "device_model" | "browser_version" | "os_name" | "os_version" | "connection" | "last_seen_ip" | "issued_at" | "expires_at", unknown, z.core.$ZodTypeInternals<"platform" | "screen" | "browser" | "created_at" | "updated_at" | "refreshes" | "user_agent_name" | "device" | "device_model" | "browser_version" | "os_name" | "os_version" | "connection" | "last_seen_ip" | "issued_at" | "expires_at", unknown>>;
78
+ order: z.ZodEnum<{
79
+ ASC: "ASC";
80
+ DESC: "DESC";
81
+ }>;
82
+ }, z.core.$strict>>;
83
+ }, z.core.$strict>;
84
+ export type SessionQueryParams = z.infer<typeof SessionQueryParamsSchema>;
@@ -0,0 +1,55 @@
1
+ import { z } from 'zod';
2
+ import { makeQueryParamsSchema } from '../../core/schemas.js';
3
+ const SessionAttributeKeySchema = z.enum([
4
+ 'refreshes',
5
+ 'user_agent_name',
6
+ 'device',
7
+ 'device_model',
8
+ 'browser',
9
+ 'browser_version',
10
+ 'os_name',
11
+ 'os_version',
12
+ 'screen',
13
+ 'connection',
14
+ 'platform',
15
+ 'last_seen_ip',
16
+ 'issued_at',
17
+ 'expires_at',
18
+ 'created_at',
19
+ 'updated_at',
20
+ ]);
21
+ export const UserSessionSchema = z.object({
22
+ type: z.literal('user_sessions').optional(),
23
+ id: z.string(),
24
+ uuid: z.string().optional(),
25
+ attributes: z.object({
26
+ os_name: z.string().nullable(),
27
+ os_version: z.string().nullable(),
28
+ browser: z.string().nullable(),
29
+ browser_version: z.string().nullable(),
30
+ last_seen_ip: z.string().nullable(),
31
+ created_at: z.string().nullable(),
32
+ issued_at: z.string().nullable(),
33
+ refreshes: z.number().nullable().optional(),
34
+ user_agent_name: z.string().nullable().optional(),
35
+ device: z.string().nullable().optional(),
36
+ device_model: z.string().nullable().optional(),
37
+ screen: z.string().nullable().optional(),
38
+ connection: z.string().nullable().optional(),
39
+ platform: z.string().nullable().optional(),
40
+ expires_at: z.string().nullable().optional(),
41
+ updated_at: z.string().nullable().optional(),
42
+ currentSession: z.boolean().optional(),
43
+ }),
44
+ relationships: z
45
+ .object({
46
+ user: z
47
+ .object({
48
+ type: z.literal('user'),
49
+ id: z.string(),
50
+ })
51
+ .optional(),
52
+ })
53
+ .optional(),
54
+ });
55
+ export const SessionQueryParamsSchema = makeQueryParamsSchema(SessionAttributeKeySchema);
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const CheckUsernamePayloadSchema: z.ZodObject<{
3
+ data: z.ZodObject<{
4
+ usernames: z.ZodArray<z.ZodString>;
5
+ }, z.core.$strip>;
6
+ }, z.core.$strip>;
7
+ export type CheckUsernamePayload = z.infer<typeof CheckUsernamePayloadSchema>;
8
+ export declare const CheckUsernameResponseSchema: z.ZodObject<{
9
+ data: z.ZodArray<z.ZodObject<{
10
+ username: z.ZodString;
11
+ isTaken: z.ZodBoolean;
12
+ }, z.core.$strip>>;
13
+ }, z.core.$strip>;
14
+ export type CheckUsernameResponse = z.infer<typeof CheckUsernameResponseSchema>;
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export const CheckUsernamePayloadSchema = z.object({
3
+ data: z.object({
4
+ usernames: z.array(z.string()).min(1).max(1000),
5
+ }),
6
+ });
7
+ export const CheckUsernameResponseSchema = z.object({
8
+ data: z.array(z.object({
9
+ username: z.string(),
10
+ isTaken: z.boolean(),
11
+ })),
12
+ });