@codeforamerica/safety-net-openapi-california 1.0.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 (211) hide show
  1. package/dist/applications/client/client.gen.d.ts +2 -0
  2. package/dist/applications/client/client.gen.js +128 -0
  3. package/dist/applications/client/index.d.ts +8 -0
  4. package/dist/applications/client/index.js +6 -0
  5. package/dist/applications/client/types.gen.d.ts +88 -0
  6. package/dist/applications/client/types.gen.js +2 -0
  7. package/dist/applications/client/utils.gen.d.ts +14 -0
  8. package/dist/applications/client/utils.gen.js +171 -0
  9. package/dist/applications/client.gen.d.ts +12 -0
  10. package/dist/applications/client.gen.js +3 -0
  11. package/dist/applications/core/auth.gen.d.ts +18 -0
  12. package/dist/applications/core/auth.gen.js +14 -0
  13. package/dist/applications/core/bodySerializer.gen.d.ts +25 -0
  14. package/dist/applications/core/bodySerializer.gen.js +57 -0
  15. package/dist/applications/core/params.gen.d.ts +43 -0
  16. package/dist/applications/core/params.gen.js +100 -0
  17. package/dist/applications/core/pathSerializer.gen.d.ts +33 -0
  18. package/dist/applications/core/pathSerializer.gen.js +114 -0
  19. package/dist/applications/core/queryKeySerializer.gen.d.ts +18 -0
  20. package/dist/applications/core/queryKeySerializer.gen.js +99 -0
  21. package/dist/applications/core/serverSentEvents.gen.d.ts +71 -0
  22. package/dist/applications/core/serverSentEvents.gen.js +137 -0
  23. package/dist/applications/core/types.gen.d.ts +78 -0
  24. package/dist/applications/core/types.gen.js +2 -0
  25. package/dist/applications/core/utils.gen.d.ts +19 -0
  26. package/dist/applications/core/utils.gen.js +87 -0
  27. package/dist/applications/index.d.ts +2 -0
  28. package/dist/applications/index.js +2 -0
  29. package/dist/applications/sdk.gen.d.ts +45 -0
  30. package/dist/applications/sdk.gen.js +70 -0
  31. package/dist/applications/types.gen.d.ts +34007 -0
  32. package/dist/applications/types.gen.js +2 -0
  33. package/dist/applications/zod.gen.d.ts +17374 -0
  34. package/dist/applications/zod.gen.js +16857 -0
  35. package/dist/households/client/client.gen.d.ts +2 -0
  36. package/dist/households/client/client.gen.js +128 -0
  37. package/dist/households/client/index.d.ts +8 -0
  38. package/dist/households/client/index.js +6 -0
  39. package/dist/households/client/types.gen.d.ts +88 -0
  40. package/dist/households/client/types.gen.js +2 -0
  41. package/dist/households/client/utils.gen.d.ts +14 -0
  42. package/dist/households/client/utils.gen.js +171 -0
  43. package/dist/households/client.gen.d.ts +12 -0
  44. package/dist/households/client.gen.js +3 -0
  45. package/dist/households/core/auth.gen.d.ts +18 -0
  46. package/dist/households/core/auth.gen.js +14 -0
  47. package/dist/households/core/bodySerializer.gen.d.ts +25 -0
  48. package/dist/households/core/bodySerializer.gen.js +57 -0
  49. package/dist/households/core/params.gen.d.ts +43 -0
  50. package/dist/households/core/params.gen.js +100 -0
  51. package/dist/households/core/pathSerializer.gen.d.ts +33 -0
  52. package/dist/households/core/pathSerializer.gen.js +114 -0
  53. package/dist/households/core/queryKeySerializer.gen.d.ts +18 -0
  54. package/dist/households/core/queryKeySerializer.gen.js +99 -0
  55. package/dist/households/core/serverSentEvents.gen.d.ts +71 -0
  56. package/dist/households/core/serverSentEvents.gen.js +137 -0
  57. package/dist/households/core/types.gen.d.ts +78 -0
  58. package/dist/households/core/types.gen.js +2 -0
  59. package/dist/households/core/utils.gen.d.ts +19 -0
  60. package/dist/households/core/utils.gen.js +87 -0
  61. package/dist/households/index.d.ts +2 -0
  62. package/dist/households/index.js +2 -0
  63. package/dist/households/sdk.gen.d.ts +45 -0
  64. package/dist/households/sdk.gen.js +70 -0
  65. package/dist/households/types.gen.d.ts +1693 -0
  66. package/dist/households/types.gen.js +2 -0
  67. package/dist/households/zod.gen.d.ts +624 -0
  68. package/dist/households/zod.gen.js +625 -0
  69. package/dist/incomes/client/client.gen.d.ts +2 -0
  70. package/dist/incomes/client/client.gen.js +128 -0
  71. package/dist/incomes/client/index.d.ts +8 -0
  72. package/dist/incomes/client/index.js +6 -0
  73. package/dist/incomes/client/types.gen.d.ts +88 -0
  74. package/dist/incomes/client/types.gen.js +2 -0
  75. package/dist/incomes/client/utils.gen.d.ts +14 -0
  76. package/dist/incomes/client/utils.gen.js +171 -0
  77. package/dist/incomes/client.gen.d.ts +12 -0
  78. package/dist/incomes/client.gen.js +3 -0
  79. package/dist/incomes/core/auth.gen.d.ts +18 -0
  80. package/dist/incomes/core/auth.gen.js +14 -0
  81. package/dist/incomes/core/bodySerializer.gen.d.ts +25 -0
  82. package/dist/incomes/core/bodySerializer.gen.js +57 -0
  83. package/dist/incomes/core/params.gen.d.ts +43 -0
  84. package/dist/incomes/core/params.gen.js +100 -0
  85. package/dist/incomes/core/pathSerializer.gen.d.ts +33 -0
  86. package/dist/incomes/core/pathSerializer.gen.js +114 -0
  87. package/dist/incomes/core/queryKeySerializer.gen.d.ts +18 -0
  88. package/dist/incomes/core/queryKeySerializer.gen.js +99 -0
  89. package/dist/incomes/core/serverSentEvents.gen.d.ts +71 -0
  90. package/dist/incomes/core/serverSentEvents.gen.js +137 -0
  91. package/dist/incomes/core/types.gen.d.ts +78 -0
  92. package/dist/incomes/core/types.gen.js +2 -0
  93. package/dist/incomes/core/utils.gen.d.ts +19 -0
  94. package/dist/incomes/core/utils.gen.js +87 -0
  95. package/dist/incomes/index.d.ts +2 -0
  96. package/dist/incomes/index.js +2 -0
  97. package/dist/incomes/sdk.gen.d.ts +47 -0
  98. package/dist/incomes/sdk.gen.js +72 -0
  99. package/dist/incomes/types.gen.d.ts +1425 -0
  100. package/dist/incomes/types.gen.js +2 -0
  101. package/dist/incomes/zod.gen.d.ts +961 -0
  102. package/dist/incomes/zod.gen.js +920 -0
  103. package/dist/index.d.ts +5 -0
  104. package/dist/index.js +5 -0
  105. package/dist/persons/client/client.gen.d.ts +2 -0
  106. package/dist/persons/client/client.gen.js +128 -0
  107. package/dist/persons/client/index.d.ts +8 -0
  108. package/dist/persons/client/index.js +6 -0
  109. package/dist/persons/client/types.gen.d.ts +88 -0
  110. package/dist/persons/client/types.gen.js +2 -0
  111. package/dist/persons/client/utils.gen.d.ts +14 -0
  112. package/dist/persons/client/utils.gen.js +171 -0
  113. package/dist/persons/client.gen.d.ts +12 -0
  114. package/dist/persons/client.gen.js +3 -0
  115. package/dist/persons/core/auth.gen.d.ts +18 -0
  116. package/dist/persons/core/auth.gen.js +14 -0
  117. package/dist/persons/core/bodySerializer.gen.d.ts +25 -0
  118. package/dist/persons/core/bodySerializer.gen.js +57 -0
  119. package/dist/persons/core/params.gen.d.ts +43 -0
  120. package/dist/persons/core/params.gen.js +100 -0
  121. package/dist/persons/core/pathSerializer.gen.d.ts +33 -0
  122. package/dist/persons/core/pathSerializer.gen.js +114 -0
  123. package/dist/persons/core/queryKeySerializer.gen.d.ts +18 -0
  124. package/dist/persons/core/queryKeySerializer.gen.js +99 -0
  125. package/dist/persons/core/serverSentEvents.gen.d.ts +71 -0
  126. package/dist/persons/core/serverSentEvents.gen.js +137 -0
  127. package/dist/persons/core/types.gen.d.ts +78 -0
  128. package/dist/persons/core/types.gen.js +2 -0
  129. package/dist/persons/core/utils.gen.d.ts +19 -0
  130. package/dist/persons/core/utils.gen.js +87 -0
  131. package/dist/persons/index.d.ts +2 -0
  132. package/dist/persons/index.js +2 -0
  133. package/dist/persons/sdk.gen.d.ts +45 -0
  134. package/dist/persons/sdk.gen.js +70 -0
  135. package/dist/persons/types.gen.d.ts +7595 -0
  136. package/dist/persons/types.gen.js +2 -0
  137. package/dist/persons/zod.gen.d.ts +3578 -0
  138. package/dist/persons/zod.gen.js +3579 -0
  139. package/dist/search-helpers.d.ts +242 -0
  140. package/dist/search-helpers.js +244 -0
  141. package/package.json +95 -0
  142. package/src/applications/client/client.gen.ts +166 -0
  143. package/src/applications/client/index.ts +23 -0
  144. package/src/applications/client/types.gen.ts +197 -0
  145. package/src/applications/client/utils.gen.ts +213 -0
  146. package/src/applications/client.gen.ts +16 -0
  147. package/src/applications/core/auth.gen.ts +42 -0
  148. package/src/applications/core/bodySerializer.gen.ts +100 -0
  149. package/src/applications/core/params.gen.ts +176 -0
  150. package/src/applications/core/pathSerializer.gen.ts +181 -0
  151. package/src/applications/core/queryKeySerializer.gen.ts +136 -0
  152. package/src/applications/core/serverSentEvents.gen.ts +266 -0
  153. package/src/applications/core/types.gen.ts +118 -0
  154. package/src/applications/core/utils.gen.ts +143 -0
  155. package/src/applications/index.ts +4 -0
  156. package/src/applications/sdk.gen.ts +92 -0
  157. package/src/applications/types.gen.ts +34043 -0
  158. package/src/applications/zod.gen.ts +16877 -0
  159. package/src/households/client/client.gen.ts +166 -0
  160. package/src/households/client/index.ts +23 -0
  161. package/src/households/client/types.gen.ts +197 -0
  162. package/src/households/client/utils.gen.ts +213 -0
  163. package/src/households/client.gen.ts +16 -0
  164. package/src/households/core/auth.gen.ts +42 -0
  165. package/src/households/core/bodySerializer.gen.ts +100 -0
  166. package/src/households/core/params.gen.ts +176 -0
  167. package/src/households/core/pathSerializer.gen.ts +181 -0
  168. package/src/households/core/queryKeySerializer.gen.ts +136 -0
  169. package/src/households/core/serverSentEvents.gen.ts +266 -0
  170. package/src/households/core/types.gen.ts +118 -0
  171. package/src/households/core/utils.gen.ts +143 -0
  172. package/src/households/index.ts +4 -0
  173. package/src/households/sdk.gen.ts +92 -0
  174. package/src/households/types.gen.ts +1729 -0
  175. package/src/households/zod.gen.ts +645 -0
  176. package/src/incomes/client/client.gen.ts +166 -0
  177. package/src/incomes/client/index.ts +23 -0
  178. package/src/incomes/client/types.gen.ts +197 -0
  179. package/src/incomes/client/utils.gen.ts +213 -0
  180. package/src/incomes/client.gen.ts +16 -0
  181. package/src/incomes/core/auth.gen.ts +42 -0
  182. package/src/incomes/core/bodySerializer.gen.ts +100 -0
  183. package/src/incomes/core/params.gen.ts +176 -0
  184. package/src/incomes/core/pathSerializer.gen.ts +181 -0
  185. package/src/incomes/core/queryKeySerializer.gen.ts +136 -0
  186. package/src/incomes/core/serverSentEvents.gen.ts +266 -0
  187. package/src/incomes/core/types.gen.ts +118 -0
  188. package/src/incomes/core/utils.gen.ts +143 -0
  189. package/src/incomes/index.ts +4 -0
  190. package/src/incomes/sdk.gen.ts +94 -0
  191. package/src/incomes/types.gen.ts +1460 -0
  192. package/src/incomes/zod.gen.ts +939 -0
  193. package/src/index.ts +5 -0
  194. package/src/persons/client/client.gen.ts +166 -0
  195. package/src/persons/client/index.ts +23 -0
  196. package/src/persons/client/types.gen.ts +197 -0
  197. package/src/persons/client/utils.gen.ts +213 -0
  198. package/src/persons/client.gen.ts +16 -0
  199. package/src/persons/core/auth.gen.ts +42 -0
  200. package/src/persons/core/bodySerializer.gen.ts +100 -0
  201. package/src/persons/core/params.gen.ts +176 -0
  202. package/src/persons/core/pathSerializer.gen.ts +181 -0
  203. package/src/persons/core/queryKeySerializer.gen.ts +136 -0
  204. package/src/persons/core/serverSentEvents.gen.ts +266 -0
  205. package/src/persons/core/types.gen.ts +118 -0
  206. package/src/persons/core/utils.gen.ts +143 -0
  207. package/src/persons/index.ts +4 -0
  208. package/src/persons/sdk.gen.ts +92 -0
  209. package/src/persons/types.gen.ts +7631 -0
  210. package/src/persons/zod.gen.ts +3599 -0
  211. package/src/search-helpers.ts +264 -0
@@ -0,0 +1,645 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import { z } from 'zod';
4
+
5
+ /**
6
+ * Represents a household unit with multiple members.
7
+ */
8
+ export const zHousehold = z.object({
9
+ id: z.uuid().readonly(),
10
+ homeAddress: z.object({
11
+ addressLine1: z.string().min(1).max(150),
12
+ addressLine2: z.optional(z.string().max(150)),
13
+ city: z.string().min(1).max(100),
14
+ stateProvince: z.string().min(1).max(100),
15
+ postalCode: z.string().min(3).max(20),
16
+ county: z.optional(z.string().max(100))
17
+ }),
18
+ mailingAddress: z.optional(z.object({
19
+ addressLine1: z.string().min(1).max(150),
20
+ addressLine2: z.optional(z.string().max(150)),
21
+ city: z.string().min(1).max(100),
22
+ stateProvince: z.string().min(1).max(100),
23
+ postalCode: z.string().min(3).max(20),
24
+ county: z.optional(z.string().max(100))
25
+ })),
26
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
27
+ members: z.array(z.object({
28
+ personId: z.uuid(),
29
+ relationship: z.enum([
30
+ 'head_of_household',
31
+ 'spouse',
32
+ 'husband',
33
+ 'wife',
34
+ 'partner',
35
+ 'child',
36
+ 'parent',
37
+ 'sibling',
38
+ 'grandparent',
39
+ 'grandchild',
40
+ 'other_relative',
41
+ 'non_relative'
42
+ ])
43
+ })).min(1),
44
+ createdAt: z.iso.datetime().readonly(),
45
+ updatedAt: z.iso.datetime().readonly()
46
+ });
47
+
48
+ /**
49
+ * Represents a household unit with multiple members.
50
+ */
51
+ export const zHouseholdCreate = z.object({
52
+ id: z.uuid().readonly(),
53
+ homeAddress: z.object({
54
+ addressLine1: z.string().min(1).max(150),
55
+ addressLine2: z.optional(z.string().max(150)),
56
+ city: z.string().min(1).max(100),
57
+ stateProvince: z.string().min(1).max(100),
58
+ postalCode: z.string().min(3).max(20),
59
+ county: z.optional(z.string().max(100))
60
+ }),
61
+ mailingAddress: z.optional(z.object({
62
+ addressLine1: z.string().min(1).max(150),
63
+ addressLine2: z.optional(z.string().max(150)),
64
+ city: z.string().min(1).max(100),
65
+ stateProvince: z.string().min(1).max(100),
66
+ postalCode: z.string().min(3).max(20),
67
+ county: z.optional(z.string().max(100))
68
+ })),
69
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
70
+ members: z.array(z.object({
71
+ personId: z.uuid(),
72
+ relationship: z.enum([
73
+ 'head_of_household',
74
+ 'spouse',
75
+ 'husband',
76
+ 'wife',
77
+ 'partner',
78
+ 'child',
79
+ 'parent',
80
+ 'sibling',
81
+ 'grandparent',
82
+ 'grandchild',
83
+ 'other_relative',
84
+ 'non_relative'
85
+ ])
86
+ })).min(1),
87
+ createdAt: z.iso.datetime().readonly(),
88
+ updatedAt: z.iso.datetime().readonly()
89
+ });
90
+
91
+ /**
92
+ * Represents a household unit with multiple members.
93
+ */
94
+ export const zHouseholdUpdate = z.object({
95
+ id: z.uuid().readonly(),
96
+ homeAddress: z.object({
97
+ addressLine1: z.string().min(1).max(150),
98
+ addressLine2: z.optional(z.string().max(150)),
99
+ city: z.string().min(1).max(100),
100
+ stateProvince: z.string().min(1).max(100),
101
+ postalCode: z.string().min(3).max(20),
102
+ county: z.optional(z.string().max(100))
103
+ }),
104
+ mailingAddress: z.optional(z.object({
105
+ addressLine1: z.string().min(1).max(150),
106
+ addressLine2: z.optional(z.string().max(150)),
107
+ city: z.string().min(1).max(100),
108
+ stateProvince: z.string().min(1).max(100),
109
+ postalCode: z.string().min(3).max(20),
110
+ county: z.optional(z.string().max(100))
111
+ })),
112
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
113
+ members: z.array(z.object({
114
+ personId: z.uuid(),
115
+ relationship: z.enum([
116
+ 'head_of_household',
117
+ 'spouse',
118
+ 'husband',
119
+ 'wife',
120
+ 'partner',
121
+ 'child',
122
+ 'parent',
123
+ 'sibling',
124
+ 'grandparent',
125
+ 'grandchild',
126
+ 'other_relative',
127
+ 'non_relative'
128
+ ])
129
+ })).min(1),
130
+ createdAt: z.iso.datetime().readonly(),
131
+ updatedAt: z.iso.datetime().readonly()
132
+ });
133
+
134
+ export const zHouseholdList = z.object({
135
+ items: z.array(z.object({
136
+ id: z.uuid().readonly(),
137
+ homeAddress: z.object({
138
+ addressLine1: z.string().min(1).max(150),
139
+ addressLine2: z.optional(z.string().max(150)),
140
+ city: z.string().min(1).max(100),
141
+ stateProvince: z.string().min(1).max(100),
142
+ postalCode: z.string().min(3).max(20),
143
+ county: z.optional(z.string().max(100))
144
+ }),
145
+ mailingAddress: z.optional(z.object({
146
+ addressLine1: z.string().min(1).max(150),
147
+ addressLine2: z.optional(z.string().max(150)),
148
+ city: z.string().min(1).max(100),
149
+ stateProvince: z.string().min(1).max(100),
150
+ postalCode: z.string().min(3).max(20),
151
+ county: z.optional(z.string().max(100))
152
+ })),
153
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
154
+ members: z.array(z.object({
155
+ personId: z.uuid(),
156
+ relationship: z.enum([
157
+ 'head_of_household',
158
+ 'spouse',
159
+ 'husband',
160
+ 'wife',
161
+ 'partner',
162
+ 'child',
163
+ 'parent',
164
+ 'sibling',
165
+ 'grandparent',
166
+ 'grandchild',
167
+ 'other_relative',
168
+ 'non_relative'
169
+ ])
170
+ })).min(1),
171
+ createdAt: z.iso.datetime().readonly(),
172
+ updatedAt: z.iso.datetime().readonly()
173
+ })),
174
+ total: z.int().gte(0),
175
+ limit: z.int().gte(1).lte(100),
176
+ offset: z.int().gte(0),
177
+ hasNext: z.optional(z.boolean())
178
+ });
179
+
180
+ /**
181
+ * Represents a household unit with multiple members.
182
+ */
183
+ export const zHouseholdWritable = z.object({
184
+ homeAddress: z.object({
185
+ addressLine1: z.string().min(1).max(150),
186
+ addressLine2: z.optional(z.string().max(150)),
187
+ city: z.string().min(1).max(100),
188
+ stateProvince: z.string().min(1).max(100),
189
+ postalCode: z.string().min(3).max(20),
190
+ county: z.optional(z.string().max(100))
191
+ }),
192
+ mailingAddress: z.optional(z.object({
193
+ addressLine1: z.string().min(1).max(150),
194
+ addressLine2: z.optional(z.string().max(150)),
195
+ city: z.string().min(1).max(100),
196
+ stateProvince: z.string().min(1).max(100),
197
+ postalCode: z.string().min(3).max(20),
198
+ county: z.optional(z.string().max(100))
199
+ })),
200
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
201
+ members: z.array(z.object({
202
+ personId: z.uuid(),
203
+ relationship: z.enum([
204
+ 'head_of_household',
205
+ 'spouse',
206
+ 'husband',
207
+ 'wife',
208
+ 'partner',
209
+ 'child',
210
+ 'parent',
211
+ 'sibling',
212
+ 'grandparent',
213
+ 'grandchild',
214
+ 'other_relative',
215
+ 'non_relative'
216
+ ])
217
+ })).min(1)
218
+ });
219
+
220
+ /**
221
+ * Represents a household unit with multiple members.
222
+ */
223
+ export const zHouseholdCreateWritable = z.object({
224
+ homeAddress: z.object({
225
+ addressLine1: z.string().min(1).max(150),
226
+ addressLine2: z.optional(z.string().max(150)),
227
+ city: z.string().min(1).max(100),
228
+ stateProvince: z.string().min(1).max(100),
229
+ postalCode: z.string().min(3).max(20),
230
+ county: z.optional(z.string().max(100))
231
+ }),
232
+ mailingAddress: z.optional(z.object({
233
+ addressLine1: z.string().min(1).max(150),
234
+ addressLine2: z.optional(z.string().max(150)),
235
+ city: z.string().min(1).max(100),
236
+ stateProvince: z.string().min(1).max(100),
237
+ postalCode: z.string().min(3).max(20),
238
+ county: z.optional(z.string().max(100))
239
+ })),
240
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
241
+ members: z.array(z.object({
242
+ personId: z.uuid(),
243
+ relationship: z.enum([
244
+ 'head_of_household',
245
+ 'spouse',
246
+ 'husband',
247
+ 'wife',
248
+ 'partner',
249
+ 'child',
250
+ 'parent',
251
+ 'sibling',
252
+ 'grandparent',
253
+ 'grandchild',
254
+ 'other_relative',
255
+ 'non_relative'
256
+ ])
257
+ })).min(1)
258
+ });
259
+
260
+ /**
261
+ * Represents a household unit with multiple members.
262
+ */
263
+ export const zHouseholdUpdateWritable = z.object({
264
+ homeAddress: z.object({
265
+ addressLine1: z.string().min(1).max(150),
266
+ addressLine2: z.optional(z.string().max(150)),
267
+ city: z.string().min(1).max(100),
268
+ stateProvince: z.string().min(1).max(100),
269
+ postalCode: z.string().min(3).max(20),
270
+ county: z.optional(z.string().max(100))
271
+ }),
272
+ mailingAddress: z.optional(z.object({
273
+ addressLine1: z.string().min(1).max(150),
274
+ addressLine2: z.optional(z.string().max(150)),
275
+ city: z.string().min(1).max(100),
276
+ stateProvince: z.string().min(1).max(100),
277
+ postalCode: z.string().min(3).max(20),
278
+ county: z.optional(z.string().max(100))
279
+ })),
280
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
281
+ members: z.array(z.object({
282
+ personId: z.uuid(),
283
+ relationship: z.enum([
284
+ 'head_of_household',
285
+ 'spouse',
286
+ 'husband',
287
+ 'wife',
288
+ 'partner',
289
+ 'child',
290
+ 'parent',
291
+ 'sibling',
292
+ 'grandparent',
293
+ 'grandchild',
294
+ 'other_relative',
295
+ 'non_relative'
296
+ ])
297
+ })).min(1)
298
+ });
299
+
300
+ export const zHouseholdListWritable = z.object({
301
+ items: z.array(z.object({
302
+ homeAddress: z.object({
303
+ addressLine1: z.string().min(1).max(150),
304
+ addressLine2: z.optional(z.string().max(150)),
305
+ city: z.string().min(1).max(100),
306
+ stateProvince: z.string().min(1).max(100),
307
+ postalCode: z.string().min(3).max(20),
308
+ county: z.optional(z.string().max(100))
309
+ }),
310
+ mailingAddress: z.optional(z.object({
311
+ addressLine1: z.string().min(1).max(150),
312
+ addressLine2: z.optional(z.string().max(150)),
313
+ city: z.string().min(1).max(100),
314
+ stateProvince: z.string().min(1).max(100),
315
+ postalCode: z.string().min(3).max(20),
316
+ county: z.optional(z.string().max(100))
317
+ })),
318
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
319
+ members: z.array(z.object({
320
+ personId: z.uuid(),
321
+ relationship: z.enum([
322
+ 'head_of_household',
323
+ 'spouse',
324
+ 'husband',
325
+ 'wife',
326
+ 'partner',
327
+ 'child',
328
+ 'parent',
329
+ 'sibling',
330
+ 'grandparent',
331
+ 'grandchild',
332
+ 'other_relative',
333
+ 'non_relative'
334
+ ])
335
+ })).min(1)
336
+ })),
337
+ total: z.int().gte(0),
338
+ limit: z.int().gte(1).lte(100),
339
+ offset: z.int().gte(0),
340
+ hasNext: z.optional(z.boolean())
341
+ });
342
+
343
+ /**
344
+ * Unique identifier of the household.
345
+ */
346
+ export const zHouseholdIdParam = z.uuid();
347
+
348
+ export const zListHouseholdsData = z.object({
349
+ body: z.optional(z.never()),
350
+ path: z.optional(z.never()),
351
+ query: z.optional(z.object({
352
+ q: z.optional(z.string()),
353
+ limit: z.optional(z.int().gte(1).lte(100)).default(25),
354
+ offset: z.optional(z.int().gte(0)).default(0)
355
+ }))
356
+ });
357
+
358
+ /**
359
+ * A paginated collection of households.
360
+ */
361
+ export const zListHouseholdsResponse = z.object({
362
+ items: z.array(z.object({
363
+ id: z.uuid().readonly(),
364
+ homeAddress: z.object({
365
+ addressLine1: z.string().min(1).max(150),
366
+ addressLine2: z.optional(z.string().max(150)),
367
+ city: z.string().min(1).max(100),
368
+ stateProvince: z.string().min(1).max(100),
369
+ postalCode: z.string().min(3).max(20),
370
+ county: z.optional(z.string().max(100))
371
+ }),
372
+ mailingAddress: z.optional(z.object({
373
+ addressLine1: z.string().min(1).max(150),
374
+ addressLine2: z.optional(z.string().max(150)),
375
+ city: z.string().min(1).max(100),
376
+ stateProvince: z.string().min(1).max(100),
377
+ postalCode: z.string().min(3).max(20),
378
+ county: z.optional(z.string().max(100))
379
+ })),
380
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
381
+ members: z.array(z.object({
382
+ personId: z.uuid(),
383
+ relationship: z.enum([
384
+ 'head_of_household',
385
+ 'spouse',
386
+ 'husband',
387
+ 'wife',
388
+ 'partner',
389
+ 'child',
390
+ 'parent',
391
+ 'sibling',
392
+ 'grandparent',
393
+ 'grandchild',
394
+ 'other_relative',
395
+ 'non_relative'
396
+ ])
397
+ })).min(1),
398
+ createdAt: z.iso.datetime().readonly(),
399
+ updatedAt: z.iso.datetime().readonly()
400
+ })),
401
+ total: z.int().gte(0),
402
+ limit: z.int().gte(1).lte(100),
403
+ offset: z.int().gte(0),
404
+ hasNext: z.optional(z.boolean())
405
+ });
406
+
407
+ export const zCreateHouseholdData = z.object({
408
+ body: z.object({
409
+ id: z.uuid().readonly(),
410
+ homeAddress: z.object({
411
+ addressLine1: z.string().min(1).max(150),
412
+ addressLine2: z.optional(z.string().max(150)),
413
+ city: z.string().min(1).max(100),
414
+ stateProvince: z.string().min(1).max(100),
415
+ postalCode: z.string().min(3).max(20),
416
+ county: z.optional(z.string().max(100))
417
+ }),
418
+ mailingAddress: z.optional(z.object({
419
+ addressLine1: z.string().min(1).max(150),
420
+ addressLine2: z.optional(z.string().max(150)),
421
+ city: z.string().min(1).max(100),
422
+ stateProvince: z.string().min(1).max(100),
423
+ postalCode: z.string().min(3).max(20),
424
+ county: z.optional(z.string().max(100))
425
+ })),
426
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
427
+ members: z.array(z.object({
428
+ personId: z.uuid(),
429
+ relationship: z.enum([
430
+ 'head_of_household',
431
+ 'spouse',
432
+ 'husband',
433
+ 'wife',
434
+ 'partner',
435
+ 'child',
436
+ 'parent',
437
+ 'sibling',
438
+ 'grandparent',
439
+ 'grandchild',
440
+ 'other_relative',
441
+ 'non_relative'
442
+ ])
443
+ })).min(1),
444
+ createdAt: z.iso.datetime().readonly(),
445
+ updatedAt: z.iso.datetime().readonly()
446
+ }).and(z.record(z.string(), z.unknown())),
447
+ path: z.optional(z.never()),
448
+ query: z.optional(z.never())
449
+ });
450
+
451
+ /**
452
+ * Represents a household unit with multiple members.
453
+ */
454
+ export const zCreateHouseholdResponse = z.object({
455
+ id: z.uuid().readonly(),
456
+ homeAddress: z.object({
457
+ addressLine1: z.string().min(1).max(150),
458
+ addressLine2: z.optional(z.string().max(150)),
459
+ city: z.string().min(1).max(100),
460
+ stateProvince: z.string().min(1).max(100),
461
+ postalCode: z.string().min(3).max(20),
462
+ county: z.optional(z.string().max(100))
463
+ }),
464
+ mailingAddress: z.optional(z.object({
465
+ addressLine1: z.string().min(1).max(150),
466
+ addressLine2: z.optional(z.string().max(150)),
467
+ city: z.string().min(1).max(100),
468
+ stateProvince: z.string().min(1).max(100),
469
+ postalCode: z.string().min(3).max(20),
470
+ county: z.optional(z.string().max(100))
471
+ })),
472
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
473
+ members: z.array(z.object({
474
+ personId: z.uuid(),
475
+ relationship: z.enum([
476
+ 'head_of_household',
477
+ 'spouse',
478
+ 'husband',
479
+ 'wife',
480
+ 'partner',
481
+ 'child',
482
+ 'parent',
483
+ 'sibling',
484
+ 'grandparent',
485
+ 'grandchild',
486
+ 'other_relative',
487
+ 'non_relative'
488
+ ])
489
+ })).min(1),
490
+ createdAt: z.iso.datetime().readonly(),
491
+ updatedAt: z.iso.datetime().readonly()
492
+ });
493
+
494
+ export const zDeleteHouseholdData = z.object({
495
+ body: z.optional(z.never()),
496
+ path: z.object({
497
+ householdId: z.uuid()
498
+ }),
499
+ query: z.optional(z.never())
500
+ });
501
+
502
+ /**
503
+ * Household deleted successfully.
504
+ */
505
+ export const zDeleteHouseholdResponse = z.void();
506
+
507
+ export const zGetHouseholdData = z.object({
508
+ body: z.optional(z.never()),
509
+ path: z.object({
510
+ householdId: z.uuid()
511
+ }),
512
+ query: z.optional(z.never())
513
+ });
514
+
515
+ /**
516
+ * Represents a household unit with multiple members.
517
+ */
518
+ export const zGetHouseholdResponse = z.object({
519
+ id: z.uuid().readonly(),
520
+ homeAddress: z.object({
521
+ addressLine1: z.string().min(1).max(150),
522
+ addressLine2: z.optional(z.string().max(150)),
523
+ city: z.string().min(1).max(100),
524
+ stateProvince: z.string().min(1).max(100),
525
+ postalCode: z.string().min(3).max(20),
526
+ county: z.optional(z.string().max(100))
527
+ }),
528
+ mailingAddress: z.optional(z.object({
529
+ addressLine1: z.string().min(1).max(150),
530
+ addressLine2: z.optional(z.string().max(150)),
531
+ city: z.string().min(1).max(100),
532
+ stateProvince: z.string().min(1).max(100),
533
+ postalCode: z.string().min(3).max(20),
534
+ county: z.optional(z.string().max(100))
535
+ })),
536
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
537
+ members: z.array(z.object({
538
+ personId: z.uuid(),
539
+ relationship: z.enum([
540
+ 'head_of_household',
541
+ 'spouse',
542
+ 'husband',
543
+ 'wife',
544
+ 'partner',
545
+ 'child',
546
+ 'parent',
547
+ 'sibling',
548
+ 'grandparent',
549
+ 'grandchild',
550
+ 'other_relative',
551
+ 'non_relative'
552
+ ])
553
+ })).min(1),
554
+ createdAt: z.iso.datetime().readonly(),
555
+ updatedAt: z.iso.datetime().readonly()
556
+ });
557
+
558
+ export const zUpdateHouseholdData = z.object({
559
+ body: z.object({
560
+ id: z.uuid().readonly(),
561
+ homeAddress: z.object({
562
+ addressLine1: z.string().min(1).max(150),
563
+ addressLine2: z.optional(z.string().max(150)),
564
+ city: z.string().min(1).max(100),
565
+ stateProvince: z.string().min(1).max(100),
566
+ postalCode: z.string().min(3).max(20),
567
+ county: z.optional(z.string().max(100))
568
+ }),
569
+ mailingAddress: z.optional(z.object({
570
+ addressLine1: z.string().min(1).max(150),
571
+ addressLine2: z.optional(z.string().max(150)),
572
+ city: z.string().min(1).max(100),
573
+ stateProvince: z.string().min(1).max(100),
574
+ postalCode: z.string().min(3).max(20),
575
+ county: z.optional(z.string().max(100))
576
+ })),
577
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
578
+ members: z.array(z.object({
579
+ personId: z.uuid(),
580
+ relationship: z.enum([
581
+ 'head_of_household',
582
+ 'spouse',
583
+ 'husband',
584
+ 'wife',
585
+ 'partner',
586
+ 'child',
587
+ 'parent',
588
+ 'sibling',
589
+ 'grandparent',
590
+ 'grandchild',
591
+ 'other_relative',
592
+ 'non_relative'
593
+ ])
594
+ })).min(1),
595
+ createdAt: z.iso.datetime().readonly(),
596
+ updatedAt: z.iso.datetime().readonly()
597
+ }).and(z.record(z.string(), z.unknown())),
598
+ path: z.object({
599
+ householdId: z.uuid()
600
+ }),
601
+ query: z.optional(z.never())
602
+ });
603
+
604
+ /**
605
+ * Represents a household unit with multiple members.
606
+ */
607
+ export const zUpdateHouseholdResponse = z.object({
608
+ id: z.uuid().readonly(),
609
+ homeAddress: z.object({
610
+ addressLine1: z.string().min(1).max(150),
611
+ addressLine2: z.optional(z.string().max(150)),
612
+ city: z.string().min(1).max(100),
613
+ stateProvince: z.string().min(1).max(100),
614
+ postalCode: z.string().min(3).max(20),
615
+ county: z.optional(z.string().max(100))
616
+ }),
617
+ mailingAddress: z.optional(z.object({
618
+ addressLine1: z.string().min(1).max(150),
619
+ addressLine2: z.optional(z.string().max(150)),
620
+ city: z.string().min(1).max(100),
621
+ stateProvince: z.string().min(1).max(100),
622
+ postalCode: z.string().min(3).max(20),
623
+ county: z.optional(z.string().max(100))
624
+ })),
625
+ phoneNumber: z.optional(z.string().regex(/^\+?[0-9 .\-()]{7,20}$/)),
626
+ members: z.array(z.object({
627
+ personId: z.uuid(),
628
+ relationship: z.enum([
629
+ 'head_of_household',
630
+ 'spouse',
631
+ 'husband',
632
+ 'wife',
633
+ 'partner',
634
+ 'child',
635
+ 'parent',
636
+ 'sibling',
637
+ 'grandparent',
638
+ 'grandchild',
639
+ 'other_relative',
640
+ 'non_relative'
641
+ ])
642
+ })).min(1),
643
+ createdAt: z.iso.datetime().readonly(),
644
+ updatedAt: z.iso.datetime().readonly()
645
+ });