@eva_solutions/auth-sdk 0.0.0-stage → 3.0.0-dev-20261107051125

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 (205) hide show
  1. package/CHANGELOG.md +290 -0
  2. package/LICENSE +21 -0
  3. package/README.md +481 -2
  4. package/dist/admin/index.cjs +4 -0
  5. package/dist/admin/index.d.cts +2 -0
  6. package/dist/admin/index.d.ts +2 -0
  7. package/dist/admin/index.js +1 -0
  8. package/dist/admin-DjvuvuI8.js +408 -0
  9. package/dist/admin-DjvuvuI8.js.map +1 -0
  10. package/dist/admin-Q6lbWqLM.cjs +419 -0
  11. package/dist/admin-Q6lbWqLM.cjs.map +1 -0
  12. package/dist/api-path-2Ulruz7R.cjs +34 -0
  13. package/dist/api-path-2Ulruz7R.cjs.map +1 -0
  14. package/dist/api-path-B-vSkL2H.js +29 -0
  15. package/dist/api-path-B-vSkL2H.js.map +1 -0
  16. package/dist/auth-19r-Q6X2.js +84 -0
  17. package/dist/auth-19r-Q6X2.js.map +1 -0
  18. package/dist/auth-DX1N5JA4.cjs +131 -0
  19. package/dist/auth-DX1N5JA4.cjs.map +1 -0
  20. package/dist/auth-handlers-B3iJaPln.js +343 -0
  21. package/dist/auth-handlers-B3iJaPln.js.map +1 -0
  22. package/dist/auth-handlers-BTbXKJms.d.ts +15 -0
  23. package/dist/auth-handlers-BTbXKJms.d.ts.map +1 -0
  24. package/dist/auth-handlers-CDzGFDTu.cjs +404 -0
  25. package/dist/auth-handlers-CDzGFDTu.cjs.map +1 -0
  26. package/dist/auth-handlers-DRUUTEtW.d.cts +15 -0
  27. package/dist/auth-handlers-DRUUTEtW.d.cts.map +1 -0
  28. package/dist/catalog-CHPqldcj.cjs +172 -0
  29. package/dist/catalog-CHPqldcj.cjs.map +1 -0
  30. package/dist/catalog-CIqpzgsM.d.cts +75 -0
  31. package/dist/catalog-CIqpzgsM.d.cts.map +1 -0
  32. package/dist/catalog-CIqpzgsM.d.ts +75 -0
  33. package/dist/catalog-CIqpzgsM.d.ts.map +1 -0
  34. package/dist/catalog-DqPhtCKZ.js +95 -0
  35. package/dist/catalog-DqPhtCKZ.js.map +1 -0
  36. package/dist/config-D6Tr7ev6.d.cts +95 -0
  37. package/dist/config-D6Tr7ev6.d.cts.map +1 -0
  38. package/dist/config-rl4_-VAq.d.ts +95 -0
  39. package/dist/config-rl4_-VAq.d.ts.map +1 -0
  40. package/dist/constants-BE1_9Tod.cjs +52 -0
  41. package/dist/constants-BE1_9Tod.cjs.map +1 -0
  42. package/dist/constants-BY7QZokc.js +29 -0
  43. package/dist/constants-BY7QZokc.js.map +1 -0
  44. package/dist/constants-CcbhOaAP.cjs +153 -0
  45. package/dist/constants-CcbhOaAP.cjs.map +1 -0
  46. package/dist/constants-rNuD5qJn.js +94 -0
  47. package/dist/constants-rNuD5qJn.js.map +1 -0
  48. package/dist/contracts/index.cjs +1006 -0
  49. package/dist/contracts/index.cjs.map +1 -0
  50. package/dist/contracts/index.d.cts +488 -0
  51. package/dist/contracts/index.d.cts.map +1 -0
  52. package/dist/contracts/index.d.ts +488 -0
  53. package/dist/contracts/index.d.ts.map +1 -0
  54. package/dist/contracts/index.js +817 -0
  55. package/dist/contracts/index.js.map +1 -0
  56. package/dist/cookies-DCIcr7uy.cjs +94 -0
  57. package/dist/cookies-DCIcr7uy.cjs.map +1 -0
  58. package/dist/cookies-DKEC7AWv.js +71 -0
  59. package/dist/cookies-DKEC7AWv.js.map +1 -0
  60. package/dist/delegated-token-CVNbMNfy.js +426 -0
  61. package/dist/delegated-token-CVNbMNfy.js.map +1 -0
  62. package/dist/delegated-token-DHSK4rHI.cjs +461 -0
  63. package/dist/delegated-token-DHSK4rHI.cjs.map +1 -0
  64. package/dist/error-helpers-BenWu-_u.d.ts +105 -0
  65. package/dist/error-helpers-BenWu-_u.d.ts.map +1 -0
  66. package/dist/error-helpers-KBHUbkOM.d.cts +105 -0
  67. package/dist/error-helpers-KBHUbkOM.d.cts.map +1 -0
  68. package/dist/error-helpers-XCh4ZJ-g.cjs +282 -0
  69. package/dist/error-helpers-XCh4ZJ-g.cjs.map +1 -0
  70. package/dist/error-helpers-lnwgNOw9.js +145 -0
  71. package/dist/error-helpers-lnwgNOw9.js.map +1 -0
  72. package/dist/error-messages-CGpW1fsg.d.cts +48 -0
  73. package/dist/error-messages-CGpW1fsg.d.cts.map +1 -0
  74. package/dist/error-messages-CGpW1fsg.d.ts +48 -0
  75. package/dist/error-messages-CGpW1fsg.d.ts.map +1 -0
  76. package/dist/event-codes-BBJHon-I.cjs +48 -0
  77. package/dist/event-codes-BBJHon-I.cjs.map +1 -0
  78. package/dist/event-codes-BgcJWsov.d.cts +42 -0
  79. package/dist/event-codes-BgcJWsov.d.cts.map +1 -0
  80. package/dist/event-codes-BgcJWsov.d.ts +42 -0
  81. package/dist/event-codes-BgcJWsov.d.ts.map +1 -0
  82. package/dist/event-codes-DR5_VlaR.js +43 -0
  83. package/dist/event-codes-DR5_VlaR.js.map +1 -0
  84. package/dist/generic/index.cjs +91 -0
  85. package/dist/generic/index.cjs.map +1 -0
  86. package/dist/generic/index.d.cts +27 -0
  87. package/dist/generic/index.d.cts.map +1 -0
  88. package/dist/generic/index.d.ts +27 -0
  89. package/dist/generic/index.d.ts.map +1 -0
  90. package/dist/generic/index.js +80 -0
  91. package/dist/generic/index.js.map +1 -0
  92. package/dist/hono/index.cjs +309 -0
  93. package/dist/hono/index.cjs.map +1 -0
  94. package/dist/hono/index.d.cts +272 -0
  95. package/dist/hono/index.d.cts.map +1 -0
  96. package/dist/hono/index.d.ts +272 -0
  97. package/dist/hono/index.d.ts.map +1 -0
  98. package/dist/hono/index.js +290 -0
  99. package/dist/hono/index.js.map +1 -0
  100. package/dist/hono-openapi/index.cjs +326 -0
  101. package/dist/hono-openapi/index.cjs.map +1 -0
  102. package/dist/hono-openapi/index.d.cts +14 -0
  103. package/dist/hono-openapi/index.d.cts.map +1 -0
  104. package/dist/hono-openapi/index.d.ts +14 -0
  105. package/dist/hono-openapi/index.d.ts.map +1 -0
  106. package/dist/hono-openapi/index.js +307 -0
  107. package/dist/hono-openapi/index.js.map +1 -0
  108. package/dist/http-client-BVF3iktR.cjs +211 -0
  109. package/dist/http-client-BVF3iktR.cjs.map +1 -0
  110. package/dist/http-client-Da0-OMfc.js +206 -0
  111. package/dist/http-client-Da0-OMfc.js.map +1 -0
  112. package/dist/index-BYzDaMR9.d.ts +312 -0
  113. package/dist/index-BYzDaMR9.d.ts.map +1 -0
  114. package/dist/index-CNNMCrdl.d.ts +66 -0
  115. package/dist/index-CNNMCrdl.d.ts.map +1 -0
  116. package/dist/index-DBZoLU4E.d.ts +240 -0
  117. package/dist/index-DBZoLU4E.d.ts.map +1 -0
  118. package/dist/index-DcvQWByo.d.cts +66 -0
  119. package/dist/index-DcvQWByo.d.cts.map +1 -0
  120. package/dist/index-Dold-Ycb.d.cts +1711 -0
  121. package/dist/index-Dold-Ycb.d.cts.map +1 -0
  122. package/dist/index-Dold-Ycb.d.ts +1711 -0
  123. package/dist/index-Dold-Ycb.d.ts.map +1 -0
  124. package/dist/index-jAO62-OD.d.cts +240 -0
  125. package/dist/index-jAO62-OD.d.cts.map +1 -0
  126. package/dist/index-o7nXcl7z.d.cts +312 -0
  127. package/dist/index-o7nXcl7z.d.cts.map +1 -0
  128. package/dist/index.cjs +89 -0
  129. package/dist/index.cjs.map +1 -0
  130. package/dist/index.d.cts +114 -0
  131. package/dist/index.d.cts.map +1 -0
  132. package/dist/index.d.ts +114 -0
  133. package/dist/index.d.ts.map +1 -0
  134. package/dist/index.js +28 -0
  135. package/dist/index.js.map +1 -0
  136. package/dist/jwt-BBNqk0TV.cjs +155 -0
  137. package/dist/jwt-BBNqk0TV.cjs.map +1 -0
  138. package/dist/jwt-DhqgH94B.js +150 -0
  139. package/dist/jwt-DhqgH94B.js.map +1 -0
  140. package/dist/key-resolver-CESqj4-P.cjs +45 -0
  141. package/dist/key-resolver-CESqj4-P.cjs.map +1 -0
  142. package/dist/key-resolver-D56I2Zpz.js +34 -0
  143. package/dist/key-resolver-D56I2Zpz.js.map +1 -0
  144. package/dist/parse-error-response-6qOQS5y9.cjs +316 -0
  145. package/dist/parse-error-response-6qOQS5y9.cjs.map +1 -0
  146. package/dist/parse-error-response-BM9-kjs0.js +239 -0
  147. package/dist/parse-error-response-BM9-kjs0.js.map +1 -0
  148. package/dist/path-segment-C25i6aaH.cjs +29 -0
  149. package/dist/path-segment-C25i6aaH.cjs.map +1 -0
  150. package/dist/path-segment-CyqnaFrP.js +24 -0
  151. package/dist/path-segment-CyqnaFrP.js.map +1 -0
  152. package/dist/react/index.cjs +336 -0
  153. package/dist/react/index.cjs.map +1 -0
  154. package/dist/react/index.d.cts +151 -0
  155. package/dist/react/index.d.cts.map +1 -0
  156. package/dist/react/index.d.ts +151 -0
  157. package/dist/react/index.d.ts.map +1 -0
  158. package/dist/react/index.js +300 -0
  159. package/dist/react/index.js.map +1 -0
  160. package/dist/refresh-dedup-CKaHHe7m.js +14 -0
  161. package/dist/refresh-dedup-CKaHHe7m.js.map +1 -0
  162. package/dist/refresh-dedup-CLdACQXR.cjs +19 -0
  163. package/dist/refresh-dedup-CLdACQXR.cjs.map +1 -0
  164. package/dist/rolldown-runtime-CmQyd0Gu.cjs +27 -0
  165. package/dist/routes-DpAzgY1V.cjs +424 -0
  166. package/dist/routes-DpAzgY1V.cjs.map +1 -0
  167. package/dist/routes-F1g5aVqP.js +347 -0
  168. package/dist/routes-F1g5aVqP.js.map +1 -0
  169. package/dist/s2s/index.cjs +24 -0
  170. package/dist/s2s/index.d.cts +5 -0
  171. package/dist/s2s/index.d.ts +5 -0
  172. package/dist/s2s/index.js +5 -0
  173. package/dist/s2s-6wbotr78.cjs +926 -0
  174. package/dist/s2s-6wbotr78.cjs.map +1 -0
  175. package/dist/s2s-B_0SIQzn.js +897 -0
  176. package/dist/s2s-B_0SIQzn.js.map +1 -0
  177. package/dist/sign-C7y6xdvT.cjs +324 -0
  178. package/dist/sign-C7y6xdvT.cjs.map +1 -0
  179. package/dist/sign-HFtcYwa-.js +259 -0
  180. package/dist/sign-HFtcYwa-.js.map +1 -0
  181. package/dist/tokens-C1nzkn21.cjs +232 -0
  182. package/dist/tokens-C1nzkn21.cjs.map +1 -0
  183. package/dist/tokens-C3Z40qd7.js +107 -0
  184. package/dist/tokens-C3Z40qd7.js.map +1 -0
  185. package/dist/types-B5sf7kKE.d.cts +52 -0
  186. package/dist/types-B5sf7kKE.d.cts.map +1 -0
  187. package/dist/types-CLOIHzRu.d.ts +96 -0
  188. package/dist/types-CLOIHzRu.d.ts.map +1 -0
  189. package/dist/types-CQTZdZIF.d.ts +52 -0
  190. package/dist/types-CQTZdZIF.d.ts.map +1 -0
  191. package/dist/types-DGeQ8j4k.d.cts +538 -0
  192. package/dist/types-DGeQ8j4k.d.cts.map +1 -0
  193. package/dist/types-DIUWza9-.d.ts +538 -0
  194. package/dist/types-DIUWza9-.d.ts.map +1 -0
  195. package/dist/types-qh6ANBCV.d.cts +96 -0
  196. package/dist/types-qh6ANBCV.d.cts.map +1 -0
  197. package/dist/webhooks/index.cjs +8 -0
  198. package/dist/webhooks/index.d.cts +5 -0
  199. package/dist/webhooks/index.d.ts +5 -0
  200. package/dist/webhooks/index.js +4 -0
  201. package/dist/webhooks-B5sAWC9W.js +74 -0
  202. package/dist/webhooks-B5sAWC9W.js.map +1 -0
  203. package/dist/webhooks-Cx11psg1.cjs +79 -0
  204. package/dist/webhooks-Cx11psg1.cjs.map +1 -0
  205. package/package.json +192 -3
@@ -0,0 +1,1711 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * PURE module: it must never reference `zod` or any schema module of this package. The SDK
4
+ * `react` entry imports these values, and a schema module reached from there would drag its
5
+ * load-time metadata registration into the react bundle (enforced by a test in this package and
6
+ * by the SDK closure gate).
7
+ *
8
+ * Wire values only: error codes and header NAMES. Nothing here is configuration.
9
+ */
10
+ /** Core error codes of the wire error body; each key equals its value. The catalog is open. */
11
+ declare const ERROR_CODES: {
12
+ readonly account_state_locked: "account_state_locked";
13
+ readonly unauthorized: "unauthorized";
14
+ readonly validation_error: "validation_error";
15
+ readonly not_found: "not_found";
16
+ readonly conflict: "conflict";
17
+ readonly forbidden: "forbidden";
18
+ readonly rate_limited: "rate_limited";
19
+ readonly gone: "gone";
20
+ readonly unprocessable_entity: "unprocessable_entity";
21
+ readonly bad_request: "bad_request";
22
+ readonly internal_error: "internal_error";
23
+ readonly service_unavailable: "service_unavailable";
24
+ };
25
+ type CoreErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];
26
+ /** Names of the session headers exchanged with browser clients. */
27
+ declare const HEADERS: {
28
+ readonly AUTHORIZATION: "authorization";
29
+ readonly REFRESH_TOKEN: "x-eva-refresh-token";
30
+ readonly NEW_ACCESS_TOKEN: "x-eva-new-access-token";
31
+ readonly NEW_REFRESH_TOKEN: "x-eva-new-refresh-token";
32
+ };
33
+ /** Names of the headers of the service-to-service signed requests and responses. */
34
+ declare const INTERNAL_HEADERS: {
35
+ readonly X_EVA_CLIENT_ID: "x-eva-client-id";
36
+ readonly X_EVA_TIMESTAMP: "x-eva-timestamp";
37
+ readonly X_EVA_NONCE: "x-eva-nonce";
38
+ readonly X_EVA_SIGNATURE: "x-eva-signature";
39
+ readonly X_EVA_SERVER_TIME: "x-eva-server-time";
40
+ };
41
+ /**
42
+ * Account states, as an OBJECT with each key equal to its value: it is the public shape of the SDK
43
+ * (`ACCOUNT_STATES.suspendido`), unlike the two tuples below.
44
+ */
45
+ declare const ACCOUNT_STATES: {
46
+ readonly no_verificado: "no_verificado";
47
+ readonly verificado: "verificado";
48
+ readonly pendiente_de_verificacion: "pendiente_de_verificacion";
49
+ readonly suspendido: "suspendido";
50
+ readonly baneado: "baneado";
51
+ readonly eliminado: "eliminado";
52
+ };
53
+ /** Presence states of a user. A tuple so that schemas can build an enum straight from it. */
54
+ declare const ACTIVITY_STATES: readonly ["activo", "ausente", "ocupado", "desconectado"];
55
+ /** Privacy states of a user profile. A tuple, like {@link ACTIVITY_STATES}. */
56
+ declare const PRIVACY_STATES: readonly ["publico", "amigos", "invisible"];
57
+ /**
58
+ * Most ids accepted by one users batch call. The batch request schema does NOT carry this limit
59
+ * (a schema maximum would change the published OpenAPI document): whoever applies the limit reads
60
+ * this constant. It lives here, in a PURE module, so the SDK client can import it by value.
61
+ */
62
+ declare const USERS_BATCH_MAX_IDS = 100;
63
+ /**
64
+ * Names of the headers a webhook receiver reads (lower case, as receivers see them): the signature,
65
+ * the event id and the timestamp. Names only, never values.
66
+ */
67
+ declare const WEBHOOK_HEADERS: {
68
+ readonly SIGNATURE: "x-eva-webhook-signature";
69
+ readonly ID: "x-eva-webhook-id";
70
+ readonly TIMESTAMP: "x-eva-webhook-timestamp";
71
+ };
72
+ /** Seconds around "now" within which a receiver accepts the timestamp of a webhook. */
73
+ declare const WEBHOOK_TIMESTAMP_WINDOW_SECONDS = 300;
74
+ /**
75
+ * Delivery states of a webhook. A tuple, like the other enums: the API database enum is checked
76
+ * against it at compile time.
77
+ */
78
+ declare const DELIVERY_STATUSES: readonly ["pending", "delivering", "success", "expired"];
79
+ /**
80
+ * SCHEMA module (it calls `.meta()` at load time): react-reachable SDK code must not import it by
81
+ * value. It holds only the error body; the error codes live in the PURE `constants.ts`.
82
+ *
83
+ * Wire shape `{ error: { code, message } }`. `code` is an open `string`, not an enum: features add
84
+ * their own snake_case codes. Metadata uses only the zod-native metadata API, never the zod-to-openapi extension.
85
+ */
86
+ declare const errorResponseSchema: z.ZodObject<{
87
+ error: z.ZodObject<{
88
+ code: z.ZodString;
89
+ message: z.ZodString;
90
+ }, z.core.$strip>;
91
+ }, z.core.$strip>;
92
+ type ErrorResponse = z.output<typeof errorResponseSchema>;
93
+ /**
94
+ * SCHEMA module: generic confirmation responses shared by several routes. Descriptions are wire
95
+ * text and must not name routes.
96
+ */
97
+ /** Response with a confirmation message. */
98
+ declare const messageResponseSchema: z.ZodObject<{
99
+ data: z.ZodObject<{
100
+ message: z.ZodString;
101
+ }, z.core.$strip>;
102
+ }, z.core.$strip>;
103
+ /** Response with a confirmation message and the number of affected items. */
104
+ declare const messageWithCountResponseSchema: z.ZodObject<{
105
+ data: z.ZodObject<{
106
+ message: z.ZodString;
107
+ count: z.ZodNumber;
108
+ }, z.core.$strip>;
109
+ }, z.core.$strip>;
110
+ type MessageResponse = z.output<typeof messageResponseSchema>;
111
+ type MessageWithCountResponse = z.output<typeof messageWithCountResponseSchema>;
112
+ /**
113
+ * Product slug: same shape as a service client slug. It never equals a service audience; the API
114
+ * checks that with `isServiceAudience`.
115
+ */
116
+ declare const productoSlugSchema: z.ZodString;
117
+ declare const getCodeRequestSchema: z.ZodObject<{
118
+ phone: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
119
+ }, z.core.$strict>;
120
+ /**
121
+ * The two `challengeId` descriptions (here and in the login request) name no route and no path:
122
+ * route names and prefixes live only in the route descriptors, so a path change never leaves a
123
+ * stale description in the published OpenAPI document.
124
+ */
125
+ declare const getCodeResponseSchema: z.ZodObject<{
126
+ data: z.ZodObject<{
127
+ message: z.ZodString;
128
+ challengeId: z.ZodString;
129
+ }, z.core.$strip>;
130
+ }, z.core.$strip>;
131
+ /** Login body. `challengeId` is lowercase hex and is rejected, never normalized. */
132
+ declare const loginRequestSchema: z.ZodObject<{
133
+ phone: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
134
+ code: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
135
+ producto: z.ZodString;
136
+ empresaId: z.ZodOptional<z.ZodString>;
137
+ challengeId: z.ZodString;
138
+ deviceType: z.ZodString;
139
+ os: z.ZodString;
140
+ browser: z.ZodString;
141
+ userAgent: z.ZodString;
142
+ }, z.core.$strict>;
143
+ declare const loginResponseSchema: z.ZodObject<{
144
+ data: z.ZodObject<{
145
+ user: z.ZodObject<{
146
+ id: z.ZodString;
147
+ }, z.core.$strip>;
148
+ }, z.core.$strip>;
149
+ }, z.core.$strip>;
150
+ /** Active company switch body: an id, or `null` to leave the session without one. */
151
+ declare const setActiveEmpresaRequestSchema: z.ZodObject<{
152
+ empresaId: z.ZodNullable<z.ZodString>;
153
+ }, z.core.$strict>;
154
+ /** Active company switch answer. The re-issued access token travels in the `x-eva-new-access-token` header; the refresh token does not rotate. */
155
+ declare const setActiveEmpresaResponseSchema: z.ZodObject<{
156
+ data: z.ZodObject<{
157
+ empresaId: z.ZodNullable<z.ZodString>;
158
+ }, z.core.$strip>;
159
+ }, z.core.$strip>;
160
+ type GetCodeRequest = z.input<typeof getCodeRequestSchema>;
161
+ type GetCodeResponse = z.output<typeof getCodeResponseSchema>;
162
+ type LoginRequest = z.input<typeof loginRequestSchema>;
163
+ type LoginResponse = z.output<typeof loginResponseSchema>;
164
+ type SetActiveEmpresaRequest = z.input<typeof setActiveEmpresaRequestSchema>;
165
+ type SetActiveEmpresaResponse = z.output<typeof setActiveEmpresaResponseSchema>;
166
+ /**
167
+ * SCHEMA module: the user profile and its update body. The update body is the strict BASE object
168
+ * with no `.refine`, so the API can plug it into `createRoute` without changing the OpenAPI
169
+ * document; the API adds its own rules ("at least one field", "latitude and longitude together").
170
+ */
171
+ /** Public profile of a user (allowlist: it carries no internal fields). */
172
+ declare const publicProfileSchema: z.ZodObject<{
173
+ id: z.ZodString;
174
+ phone: z.ZodString;
175
+ name: z.ZodNullable<z.ZodString>;
176
+ lastName: z.ZodNullable<z.ZodString>;
177
+ email: z.ZodNullable<z.ZodString>;
178
+ dni: z.ZodNullable<z.ZodString>;
179
+ stateActivity: z.ZodEnum<{
180
+ activo: "activo";
181
+ ausente: "ausente";
182
+ ocupado: "ocupado";
183
+ desconectado: "desconectado";
184
+ }>;
185
+ statePrivacy: z.ZodEnum<{
186
+ publico: "publico";
187
+ amigos: "amigos";
188
+ invisible: "invisible";
189
+ }>;
190
+ createdAt: z.ZodString;
191
+ }, z.core.$strip>;
192
+ declare const profileResponseSchema: z.ZodObject<{
193
+ data: z.ZodObject<{
194
+ id: z.ZodString;
195
+ phone: z.ZodString;
196
+ name: z.ZodNullable<z.ZodString>;
197
+ lastName: z.ZodNullable<z.ZodString>;
198
+ email: z.ZodNullable<z.ZodString>;
199
+ dni: z.ZodNullable<z.ZodString>;
200
+ stateActivity: z.ZodEnum<{
201
+ activo: "activo";
202
+ ausente: "ausente";
203
+ ocupado: "ocupado";
204
+ desconectado: "desconectado";
205
+ }>;
206
+ statePrivacy: z.ZodEnum<{
207
+ publico: "publico";
208
+ amigos: "amigos";
209
+ invisible: "invisible";
210
+ }>;
211
+ createdAt: z.ZodString;
212
+ }, z.core.$strip>;
213
+ }, z.core.$strip>;
214
+ /** Group a company belongs to (grouping only: it grants no access). */
215
+ declare const companyGroupSchema: z.ZodObject<{
216
+ id: z.ZodString;
217
+ nombre: z.ZodString;
218
+ }, z.core.$strip>;
219
+ /** Company the user belongs to that has the product of the token contracted. */
220
+ declare const contractedCompanySchema: z.ZodObject<{
221
+ contratado: z.ZodLiteral<true>;
222
+ direccion: z.ZodNullable<z.ZodString>;
223
+ celular: z.ZodNullable<z.ZodString>;
224
+ email: z.ZodNullable<z.ZodString>;
225
+ img: z.ZodNullable<z.ZodString>;
226
+ sucursales: z.ZodArray<z.ZodObject<{
227
+ id: z.ZodString;
228
+ empresaId: z.ZodString;
229
+ nombre: z.ZodString;
230
+ direccion: z.ZodNullable<z.ZodString>;
231
+ activa: z.ZodBoolean;
232
+ }, z.core.$strip>>;
233
+ id: z.ZodString;
234
+ ruc: z.ZodString;
235
+ razonSocial: z.ZodString;
236
+ slug: z.ZodString;
237
+ rol: z.ZodEnum<{
238
+ titular: "titular";
239
+ administrador: "administrador";
240
+ miembro: "miembro";
241
+ }>;
242
+ grupo: z.ZodNullable<z.ZodObject<{
243
+ id: z.ZodString;
244
+ nombre: z.ZodString;
245
+ }, z.core.$strip>>;
246
+ }, z.core.$strip>;
247
+ /**
248
+ * Company the user HOLDS (`titular`) that has not contracted the product of the token: no contact
249
+ * data and no branches, only what is needed to ask for the contract.
250
+ */
251
+ declare const uncontractedCompanySchema: z.ZodObject<{
252
+ contratado: z.ZodLiteral<false>;
253
+ id: z.ZodString;
254
+ ruc: z.ZodString;
255
+ razonSocial: z.ZodString;
256
+ slug: z.ZodString;
257
+ rol: z.ZodEnum<{
258
+ titular: "titular";
259
+ administrador: "administrador";
260
+ miembro: "miembro";
261
+ }>;
262
+ grupo: z.ZodNullable<z.ZodObject<{
263
+ id: z.ZodString;
264
+ nombre: z.ZodString;
265
+ }, z.core.$strip>>;
266
+ }, z.core.$strip>;
267
+ /** Company of the user: with the product contracted (full data) or not (holder only, trimmed). */
268
+ declare const companySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
269
+ contratado: z.ZodLiteral<true>;
270
+ direccion: z.ZodNullable<z.ZodString>;
271
+ celular: z.ZodNullable<z.ZodString>;
272
+ email: z.ZodNullable<z.ZodString>;
273
+ img: z.ZodNullable<z.ZodString>;
274
+ sucursales: z.ZodArray<z.ZodObject<{
275
+ id: z.ZodString;
276
+ empresaId: z.ZodString;
277
+ nombre: z.ZodString;
278
+ direccion: z.ZodNullable<z.ZodString>;
279
+ activa: z.ZodBoolean;
280
+ }, z.core.$strip>>;
281
+ id: z.ZodString;
282
+ ruc: z.ZodString;
283
+ razonSocial: z.ZodString;
284
+ slug: z.ZodString;
285
+ rol: z.ZodEnum<{
286
+ titular: "titular";
287
+ administrador: "administrador";
288
+ miembro: "miembro";
289
+ }>;
290
+ grupo: z.ZodNullable<z.ZodObject<{
291
+ id: z.ZodString;
292
+ nombre: z.ZodString;
293
+ }, z.core.$strip>>;
294
+ }, z.core.$strip>, z.ZodObject<{
295
+ contratado: z.ZodLiteral<false>;
296
+ id: z.ZodString;
297
+ ruc: z.ZodString;
298
+ razonSocial: z.ZodString;
299
+ slug: z.ZodString;
300
+ rol: z.ZodEnum<{
301
+ titular: "titular";
302
+ administrador: "administrador";
303
+ miembro: "miembro";
304
+ }>;
305
+ grupo: z.ZodNullable<z.ZodObject<{
306
+ id: z.ZodString;
307
+ nombre: z.ZodString;
308
+ }, z.core.$strip>>;
309
+ }, z.core.$strip>], "contratado">;
310
+ /**
311
+ * Companies the user belongs to: the active ones that have the product of the token contracted,
312
+ * plus those the user holds without it (`contratado: false`).
313
+ */
314
+ declare const companyListResponseSchema: z.ZodObject<{
315
+ data: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
316
+ contratado: z.ZodLiteral<true>;
317
+ direccion: z.ZodNullable<z.ZodString>;
318
+ celular: z.ZodNullable<z.ZodString>;
319
+ email: z.ZodNullable<z.ZodString>;
320
+ img: z.ZodNullable<z.ZodString>;
321
+ sucursales: z.ZodArray<z.ZodObject<{
322
+ id: z.ZodString;
323
+ empresaId: z.ZodString;
324
+ nombre: z.ZodString;
325
+ direccion: z.ZodNullable<z.ZodString>;
326
+ activa: z.ZodBoolean;
327
+ }, z.core.$strip>>;
328
+ id: z.ZodString;
329
+ ruc: z.ZodString;
330
+ razonSocial: z.ZodString;
331
+ slug: z.ZodString;
332
+ rol: z.ZodEnum<{
333
+ titular: "titular";
334
+ administrador: "administrador";
335
+ miembro: "miembro";
336
+ }>;
337
+ grupo: z.ZodNullable<z.ZodObject<{
338
+ id: z.ZodString;
339
+ nombre: z.ZodString;
340
+ }, z.core.$strip>>;
341
+ }, z.core.$strip>, z.ZodObject<{
342
+ contratado: z.ZodLiteral<false>;
343
+ id: z.ZodString;
344
+ ruc: z.ZodString;
345
+ razonSocial: z.ZodString;
346
+ slug: z.ZodString;
347
+ rol: z.ZodEnum<{
348
+ titular: "titular";
349
+ administrador: "administrador";
350
+ miembro: "miembro";
351
+ }>;
352
+ grupo: z.ZodNullable<z.ZodObject<{
353
+ id: z.ZodString;
354
+ nombre: z.ZodString;
355
+ }, z.core.$strip>>;
356
+ }, z.core.$strip>], "contratado">>;
357
+ }, z.core.$strip>;
358
+ /** Update body: strict BASE object, every field optional. */
359
+ declare const updateUserRequestSchema: z.ZodObject<{
360
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
361
+ lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
362
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
363
+ dni: z.ZodOptional<z.ZodNullable<z.ZodString>>;
364
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
+ locationLat: z.ZodOptional<z.ZodNullable<z.ZodString>>;
366
+ locationLon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
367
+ }, z.core.$strict>;
368
+ type PublicProfile = z.output<typeof publicProfileSchema>;
369
+ type ProfileResponse = z.output<typeof profileResponseSchema>;
370
+ type CompanyListResponse = z.output<typeof companyListResponseSchema>;
371
+ type Company = CompanyListResponse['data'][number];
372
+ type ContractedCompany = z.output<typeof contractedCompanySchema>;
373
+ type UncontractedCompany = z.output<typeof uncontractedCompanySchema>;
374
+ type UpdateUserRequest = z.input<typeof updateUserRequestSchema>;
375
+ /** SCHEMA module: the active sessions of the authenticated user. */
376
+ /** Response of the active sessions list. */
377
+ declare const sessionListResponseSchema: z.ZodObject<{
378
+ data: z.ZodArray<z.ZodObject<{
379
+ sessionId: z.ZodUUID;
380
+ deviceType: z.ZodString;
381
+ os: z.ZodString;
382
+ browser: z.ZodString;
383
+ ipAddress: z.ZodString;
384
+ createdAt: z.ZodString;
385
+ current: z.ZodBoolean;
386
+ }, z.core.$strip>>;
387
+ }, z.core.$strip>;
388
+ type SessionListResponse = z.output<typeof sessionListResponseSchema>;
389
+ type Session = SessionListResponse['data'][number];
390
+ /**
391
+ * SCHEMA module: service-to-service users batch. `ids` is capped at `USERS_BATCH_MAX_IDS`
392
+ * (constants), the hard upper bound: the API env `USERS_BATCH_MAX_IDS` can only lower it, and the
393
+ * published OpenAPI document carries it as `maxItems`.
394
+ */
395
+ declare const usersBatchRequestSchema: z.ZodObject<{
396
+ ids: z.ZodArray<z.ZodString>;
397
+ }, z.core.$strict>;
398
+ declare const usersBatchResponseSchema: z.ZodObject<{
399
+ data: z.ZodObject<{
400
+ users: z.ZodArray<z.ZodObject<{
401
+ id: z.ZodString;
402
+ phone: z.ZodString;
403
+ name: z.ZodNullable<z.ZodString>;
404
+ lastName: z.ZodNullable<z.ZodString>;
405
+ email: z.ZodNullable<z.ZodString>;
406
+ dni: z.ZodNullable<z.ZodString>;
407
+ stateActivity: z.ZodEnum<{
408
+ activo: "activo";
409
+ ausente: "ausente";
410
+ ocupado: "ocupado";
411
+ desconectado: "desconectado";
412
+ }>;
413
+ statePrivacy: z.ZodEnum<{
414
+ publico: "publico";
415
+ amigos: "amigos";
416
+ invisible: "invisible";
417
+ }>;
418
+ createdAt: z.ZodString;
419
+ }, z.core.$strip>>;
420
+ }, z.core.$strip>;
421
+ }, z.core.$strip>;
422
+ type UsersBatchRequest = z.input<typeof usersBatchRequestSchema>;
423
+ type UsersBatchResponse = z.output<typeof usersBatchResponseSchema>;
424
+ declare const createSubscriptionRequestSchema: z.ZodObject<{
425
+ url: z.ZodString;
426
+ eventCodes: z.ZodArray<z.ZodEnum<{
427
+ readonly USER_CREATED: "user.created";
428
+ readonly USER_VERIFIED: "user.verified";
429
+ readonly USER_LOGIN_SUCCESS: "user.login_success";
430
+ readonly USER_LOGIN_FAILED: "user.login_failed";
431
+ readonly SESSION_CREATED: "session.created";
432
+ readonly SESSION_DELETED: "session.deleted";
433
+ readonly SESSION_DELETED_ALL: "session.deleted_all";
434
+ readonly USER_PROFILE_UPDATED: "user.profile_updated";
435
+ readonly USER_DELETED: "user.deleted";
436
+ readonly USER_RESTORED: "user.restored";
437
+ readonly USER_HARD_DELETED: "user.hard_deleted";
438
+ readonly EMPRESA_CREATED: "empresa.created";
439
+ readonly EMPRESA_MEMBER_ADDED: "empresa.member_added";
440
+ readonly EMPRESA_MEMBER_REMOVED: "empresa.member_removed";
441
+ readonly EMPRESA_BRANCH_CREATED: "empresa.branch_created";
442
+ readonly EMPRESA_UPDATED: "empresa.updated";
443
+ readonly EMPRESA_DEACTIVATED: "empresa.deactivated";
444
+ readonly EMPRESA_REACTIVATED: "empresa.reactivated";
445
+ readonly EMPRESA_MEMBER_ROLE_CHANGED: "empresa.member_role_changed";
446
+ readonly EMPRESA_BRANCH_UPDATED: "empresa.branch_updated";
447
+ readonly EMPRESA_BRANCH_DEACTIVATED: "empresa.branch_deactivated";
448
+ readonly EMPRESA_PRODUCT_CHANGED: "empresa.product_changed";
449
+ readonly GRUPO_UPDATED: "grupo.updated";
450
+ readonly GRUPO_MEMBER_ADDED: "grupo.member_added";
451
+ readonly GRUPO_MEMBER_REMOVED: "grupo.member_removed";
452
+ readonly AUTORIZACION_GRANTED: "autorizacion.granted";
453
+ readonly AUTORIZACION_REVOKED: "autorizacion.revoked";
454
+ }>>;
455
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
456
+ }, z.core.$strict>;
457
+ declare const updateSubscriptionRequestSchema: z.ZodObject<{
458
+ url: z.ZodOptional<z.ZodString>;
459
+ eventCodes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
460
+ readonly USER_CREATED: "user.created";
461
+ readonly USER_VERIFIED: "user.verified";
462
+ readonly USER_LOGIN_SUCCESS: "user.login_success";
463
+ readonly USER_LOGIN_FAILED: "user.login_failed";
464
+ readonly SESSION_CREATED: "session.created";
465
+ readonly SESSION_DELETED: "session.deleted";
466
+ readonly SESSION_DELETED_ALL: "session.deleted_all";
467
+ readonly USER_PROFILE_UPDATED: "user.profile_updated";
468
+ readonly USER_DELETED: "user.deleted";
469
+ readonly USER_RESTORED: "user.restored";
470
+ readonly USER_HARD_DELETED: "user.hard_deleted";
471
+ readonly EMPRESA_CREATED: "empresa.created";
472
+ readonly EMPRESA_MEMBER_ADDED: "empresa.member_added";
473
+ readonly EMPRESA_MEMBER_REMOVED: "empresa.member_removed";
474
+ readonly EMPRESA_BRANCH_CREATED: "empresa.branch_created";
475
+ readonly EMPRESA_UPDATED: "empresa.updated";
476
+ readonly EMPRESA_DEACTIVATED: "empresa.deactivated";
477
+ readonly EMPRESA_REACTIVATED: "empresa.reactivated";
478
+ readonly EMPRESA_MEMBER_ROLE_CHANGED: "empresa.member_role_changed";
479
+ readonly EMPRESA_BRANCH_UPDATED: "empresa.branch_updated";
480
+ readonly EMPRESA_BRANCH_DEACTIVATED: "empresa.branch_deactivated";
481
+ readonly EMPRESA_PRODUCT_CHANGED: "empresa.product_changed";
482
+ readonly GRUPO_UPDATED: "grupo.updated";
483
+ readonly GRUPO_MEMBER_ADDED: "grupo.member_added";
484
+ readonly GRUPO_MEMBER_REMOVED: "grupo.member_removed";
485
+ readonly AUTORIZACION_GRANTED: "autorizacion.granted";
486
+ readonly AUTORIZACION_REVOKED: "autorizacion.revoked";
487
+ }>>>;
488
+ enabled: z.ZodOptional<z.ZodBoolean>;
489
+ }, z.core.$strict>;
490
+ /** Query of the deliveries listing: numbers arrive as strings and are coerced. */
491
+ declare const deliveriesQuerySchema: z.ZodObject<{
492
+ event_id: z.ZodOptional<z.ZodString>;
493
+ subscription_id: z.ZodOptional<z.ZodString>;
494
+ status: z.ZodOptional<z.ZodEnum<{
495
+ pending: "pending";
496
+ delivering: "delivering";
497
+ success: "success";
498
+ expired: "expired";
499
+ }>>;
500
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
501
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
502
+ }, z.core.$strict>;
503
+ /**
504
+ * Query of `POST /admin/webhooks/republish-pending`: pending deliveries older than
505
+ * `older_than_minutes` (default 10, at most one week) are republished, `limit` per call (default
506
+ * and maximum 100, one QStash batch). Strict: a misspelled parameter fails instead of being ignored.
507
+ */
508
+ declare const republishPendingQuerySchema: z.ZodObject<{
509
+ older_than_minutes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
510
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
511
+ }, z.core.$strict>;
512
+ declare const republishPendingResponseSchema: z.ZodObject<{
513
+ data: z.ZodObject<{
514
+ republished: z.ZodNumber;
515
+ hasMore: z.ZodBoolean;
516
+ }, z.core.$strip>;
517
+ }, z.core.$strip>;
518
+ declare const subscriptionSchema: z.ZodObject<{
519
+ id: z.ZodString;
520
+ clientId: z.ZodString;
521
+ url: z.ZodString;
522
+ eventCodes: z.ZodArray<z.ZodString>;
523
+ enabled: z.ZodBoolean;
524
+ createdAt: z.ZodString;
525
+ updatedAt: z.ZodString;
526
+ }, z.core.$strip>;
527
+ /** Creation answer: the signing key travels only here, one time. */
528
+ declare const subscriptionWithSecretResponseSchema: z.ZodObject<{
529
+ data: z.ZodObject<{
530
+ subscription: z.ZodObject<{
531
+ id: z.ZodString;
532
+ clientId: z.ZodString;
533
+ url: z.ZodString;
534
+ eventCodes: z.ZodArray<z.ZodString>;
535
+ enabled: z.ZodBoolean;
536
+ createdAt: z.ZodString;
537
+ updatedAt: z.ZodString;
538
+ }, z.core.$strip>;
539
+ signingKey: z.ZodString;
540
+ }, z.core.$strip>;
541
+ }, z.core.$strip>;
542
+ declare const subscriptionResponseSchema: z.ZodObject<{
543
+ data: z.ZodObject<{
544
+ id: z.ZodString;
545
+ clientId: z.ZodString;
546
+ url: z.ZodString;
547
+ eventCodes: z.ZodArray<z.ZodString>;
548
+ enabled: z.ZodBoolean;
549
+ createdAt: z.ZodString;
550
+ updatedAt: z.ZodString;
551
+ }, z.core.$strip>;
552
+ }, z.core.$strip>;
553
+ declare const subscriptionListResponseSchema: z.ZodObject<{
554
+ data: z.ZodObject<{
555
+ subscriptions: z.ZodArray<z.ZodObject<{
556
+ id: z.ZodString;
557
+ clientId: z.ZodString;
558
+ url: z.ZodString;
559
+ eventCodes: z.ZodArray<z.ZodString>;
560
+ enabled: z.ZodBoolean;
561
+ createdAt: z.ZodString;
562
+ updatedAt: z.ZodString;
563
+ }, z.core.$strip>>;
564
+ }, z.core.$strip>;
565
+ }, z.core.$strip>;
566
+ declare const rotateSubscriptionSecretResponseSchema: z.ZodObject<{
567
+ data: z.ZodObject<{
568
+ id: z.ZodString;
569
+ signingKey: z.ZodString;
570
+ updatedAt: z.ZodString;
571
+ }, z.core.$strip>;
572
+ }, z.core.$strip>;
573
+ declare const deliverySchema: z.ZodObject<{
574
+ id: z.ZodString;
575
+ subscriptionId: z.ZodString;
576
+ eventId: z.ZodString;
577
+ status: z.ZodEnum<{
578
+ pending: "pending";
579
+ delivering: "delivering";
580
+ success: "success";
581
+ expired: "expired";
582
+ }>;
583
+ attempts: z.ZodNumber;
584
+ lastAttemptAt: z.ZodNullable<z.ZodString>;
585
+ nextRetryAt: z.ZodNullable<z.ZodString>;
586
+ responseStatus: z.ZodNullable<z.ZodNumber>;
587
+ createdAt: z.ZodString;
588
+ }, z.core.$strip>;
589
+ declare const deliveryListResponseSchema: z.ZodObject<{
590
+ data: z.ZodObject<{
591
+ deliveries: z.ZodArray<z.ZodObject<{
592
+ id: z.ZodString;
593
+ subscriptionId: z.ZodString;
594
+ eventId: z.ZodString;
595
+ status: z.ZodEnum<{
596
+ pending: "pending";
597
+ delivering: "delivering";
598
+ success: "success";
599
+ expired: "expired";
600
+ }>;
601
+ attempts: z.ZodNumber;
602
+ lastAttemptAt: z.ZodNullable<z.ZodString>;
603
+ nextRetryAt: z.ZodNullable<z.ZodString>;
604
+ responseStatus: z.ZodNullable<z.ZodNumber>;
605
+ createdAt: z.ZodString;
606
+ }, z.core.$strip>>;
607
+ }, z.core.$strip>;
608
+ }, z.core.$strip>;
609
+ type CreateSubscriptionRequest = z.input<typeof createSubscriptionRequestSchema>;
610
+ type UpdateSubscriptionRequest = z.input<typeof updateSubscriptionRequestSchema>;
611
+ type DeliveriesQuery = z.input<typeof deliveriesQuerySchema>;
612
+ type RepublishPendingQuery = z.input<typeof republishPendingQuerySchema>;
613
+ type RepublishPendingResponse = z.output<typeof republishPendingResponseSchema>;
614
+ type Subscription = z.output<typeof subscriptionSchema>;
615
+ type SubscriptionWithSecretResponse = z.output<typeof subscriptionWithSecretResponseSchema>;
616
+ type SubscriptionResponse = z.output<typeof subscriptionResponseSchema>;
617
+ type SubscriptionListResponse = z.output<typeof subscriptionListResponseSchema>;
618
+ type RotateSubscriptionSecretResponse = z.output<typeof rotateSubscriptionSecretResponseSchema>;
619
+ type Delivery = z.output<typeof deliverySchema>;
620
+ type DeliveryListResponse = z.output<typeof deliveryListResponseSchema>;
621
+ /**
622
+ * SCHEMA module: on-demand cleanup of expired data (admin). The query is a strict BASE object with
623
+ * no refinements, and descriptions are wire text: they must not name routes.
624
+ */
625
+ /**
626
+ * Query of `POST /admin/maintenance/cleanup`: `limit` (default and maximum 100) caps each of the two
627
+ * batches of one call. Strict: a misspelled parameter fails instead of being ignored.
628
+ */
629
+ declare const maintenanceCleanupQuerySchema: z.ZodObject<{
630
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
631
+ }, z.core.$strict>;
632
+ declare const maintenanceCleanupResponseSchema: z.ZodObject<{
633
+ data: z.ZodObject<{
634
+ usersPurged: z.ZodNumber;
635
+ eventsDeleted: z.ZodNumber;
636
+ hasMore: z.ZodBoolean;
637
+ }, z.core.$strip>;
638
+ }, z.core.$strip>;
639
+ type MaintenanceCleanupQuery = z.input<typeof maintenanceCleanupQuerySchema>;
640
+ type MaintenanceCleanupResponse = z.output<typeof maintenanceCleanupResponseSchema>;
641
+ /**
642
+ * SCHEMA module: service client provisioning (admin) and the user restore answer. The update body
643
+ * is the strict BASE object: the API adds its own "at least one field" rule on top of it, so this
644
+ * package never carries a refinement. The format of the generated key stays in the API.
645
+ */
646
+ /** Human readable slug: starts with a lower case letter, 3 to 64 chars of `[a-z0-9-]`. */
647
+ declare const serviceClientSlugSchema: z.ZodString;
648
+ /**
649
+ * Create or replace the grant of a service client on one audience. One variant per audience of the
650
+ * catalog, so a permission typo or a permission of another audience (`admin` on `auth-api`) is
651
+ * rejected by the schema itself. A test pins that every audience has its variant.
652
+ */
653
+ declare const setServiceClientGrantRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
654
+ audience: z.ZodLiteral<"auth-api">;
655
+ scopes: z.ZodPipe<z.ZodArray<z.ZodEnum<{
656
+ "users:read": "users:read";
657
+ "webhooks:read": "webhooks:read";
658
+ "webhooks:write": "webhooks:write";
659
+ "empresas:leer": "empresas:leer";
660
+ "empresas:escribir": "empresas:escribir";
661
+ "tokens:exchange": "tokens:exchange";
662
+ "contrataciones:pedir": "contrataciones:pedir";
663
+ "contrataciones:escribir": "contrataciones:escribir";
664
+ "contrataciones:leer": "contrataciones:leer";
665
+ "empresas:baja": "empresas:baja";
666
+ "autorizaciones:escribir": "autorizaciones:escribir";
667
+ "autorizaciones:leer": "autorizaciones:leer";
668
+ "directorio:leer": "directorio:leer";
669
+ }>>, z.ZodTransform<("users:read" | "webhooks:read" | "webhooks:write" | "empresas:leer" | "empresas:escribir" | "tokens:exchange" | "contrataciones:pedir" | "contrataciones:escribir" | "contrataciones:leer" | "empresas:baja" | "autorizaciones:escribir" | "autorizaciones:leer" | "directorio:leer")[], ("users:read" | "webhooks:read" | "webhooks:write" | "empresas:leer" | "empresas:escribir" | "tokens:exchange" | "contrataciones:pedir" | "contrataciones:escribir" | "contrataciones:leer" | "empresas:baja" | "autorizaciones:escribir" | "autorizaciones:leer" | "directorio:leer")[]>>;
670
+ }, z.core.$strict>, z.ZodObject<{
671
+ audience: z.ZodLiteral<"whatsapp-api">;
672
+ scopes: z.ZodPipe<z.ZodArray<z.ZodEnum<{
673
+ "messages:send:text": "messages:send:text";
674
+ "messages:send:media": "messages:send:media";
675
+ admin: "admin";
676
+ }>>, z.ZodTransform<("messages:send:text" | "messages:send:media" | "admin")[], ("messages:send:text" | "messages:send:media" | "admin")[]>>;
677
+ }, z.core.$strict>], "audience">;
678
+ declare const serviceClientGrantSchema: z.ZodObject<{
679
+ audience: z.ZodEnum<{
680
+ "auth-api": "auth-api";
681
+ "whatsapp-api": "whatsapp-api";
682
+ }>;
683
+ scopes: z.ZodArray<z.ZodString>;
684
+ }, z.core.$strip>;
685
+ declare const createServiceClientRequestSchema: z.ZodObject<{
686
+ slug: z.ZodString;
687
+ name: z.ZodOptional<z.ZodString>;
688
+ producto: z.ZodOptional<z.ZodString>;
689
+ audiencia: z.ZodOptional<z.ZodEnum<{
690
+ "auth-api": "auth-api";
691
+ "whatsapp-api": "whatsapp-api";
692
+ }>>;
693
+ esAdmin: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
694
+ }, z.core.$strict>;
695
+ /** Update body: strict BASE object, every field optional. */
696
+ declare const updateServiceClientRequestSchema: z.ZodObject<{
697
+ enabled: z.ZodOptional<z.ZodBoolean>;
698
+ esAdmin: z.ZodOptional<z.ZodBoolean>;
699
+ name: z.ZodOptional<z.ZodString>;
700
+ producto: z.ZodOptional<z.ZodNullable<z.ZodString>>;
701
+ audiencia: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
702
+ "auth-api": "auth-api";
703
+ "whatsapp-api": "whatsapp-api";
704
+ }>>>;
705
+ }, z.core.$strict>;
706
+ /** Public view of a service client: it never carries the stored key material. */
707
+ declare const serviceClientPublicSchema: z.ZodObject<{
708
+ id: z.ZodString;
709
+ slug: z.ZodString;
710
+ name: z.ZodString;
711
+ enabled: z.ZodBoolean;
712
+ esAdmin: z.ZodBoolean;
713
+ producto: z.ZodNullable<z.ZodString>;
714
+ audiencia: z.ZodNullable<z.ZodEnum<{
715
+ "auth-api": "auth-api";
716
+ "whatsapp-api": "whatsapp-api";
717
+ }>>;
718
+ grants: z.ZodArray<z.ZodObject<{
719
+ audience: z.ZodEnum<{
720
+ "auth-api": "auth-api";
721
+ "whatsapp-api": "whatsapp-api";
722
+ }>;
723
+ scopes: z.ZodArray<z.ZodString>;
724
+ }, z.core.$strip>>;
725
+ lastUsedAt: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
726
+ createdAt: z.ZodString;
727
+ updatedAt: z.ZodString;
728
+ }, z.core.$strip>;
729
+ /** Creation answer: the generated key travels only here, one time. */
730
+ declare const createServiceClientResponseSchema: z.ZodObject<{
731
+ data: z.ZodObject<{
732
+ id: z.ZodString;
733
+ slug: z.ZodString;
734
+ name: z.ZodString;
735
+ esAdmin: z.ZodBoolean;
736
+ producto: z.ZodNullable<z.ZodString>;
737
+ audiencia: z.ZodNullable<z.ZodEnum<{
738
+ "auth-api": "auth-api";
739
+ "whatsapp-api": "whatsapp-api";
740
+ }>>;
741
+ enabled: z.ZodLiteral<true>;
742
+ secret: z.ZodString;
743
+ warning: z.ZodString;
744
+ }, z.core.$strip>;
745
+ }, z.core.$strip>;
746
+ declare const listServiceClientsResponseSchema: z.ZodObject<{
747
+ data: z.ZodObject<{
748
+ clientes: z.ZodArray<z.ZodObject<{
749
+ id: z.ZodString;
750
+ slug: z.ZodString;
751
+ name: z.ZodString;
752
+ enabled: z.ZodBoolean;
753
+ esAdmin: z.ZodBoolean;
754
+ producto: z.ZodNullable<z.ZodString>;
755
+ audiencia: z.ZodNullable<z.ZodEnum<{
756
+ "auth-api": "auth-api";
757
+ "whatsapp-api": "whatsapp-api";
758
+ }>>;
759
+ grants: z.ZodArray<z.ZodObject<{
760
+ audience: z.ZodEnum<{
761
+ "auth-api": "auth-api";
762
+ "whatsapp-api": "whatsapp-api";
763
+ }>;
764
+ scopes: z.ZodArray<z.ZodString>;
765
+ }, z.core.$strip>>;
766
+ lastUsedAt: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
767
+ createdAt: z.ZodString;
768
+ updatedAt: z.ZodString;
769
+ }, z.core.$strip>>;
770
+ }, z.core.$strip>;
771
+ }, z.core.$strip>;
772
+ declare const getServiceClientResponseSchema: z.ZodObject<{
773
+ data: z.ZodObject<{
774
+ cliente: z.ZodObject<{
775
+ id: z.ZodString;
776
+ slug: z.ZodString;
777
+ name: z.ZodString;
778
+ enabled: z.ZodBoolean;
779
+ esAdmin: z.ZodBoolean;
780
+ producto: z.ZodNullable<z.ZodString>;
781
+ audiencia: z.ZodNullable<z.ZodEnum<{
782
+ "auth-api": "auth-api";
783
+ "whatsapp-api": "whatsapp-api";
784
+ }>>;
785
+ grants: z.ZodArray<z.ZodObject<{
786
+ audience: z.ZodEnum<{
787
+ "auth-api": "auth-api";
788
+ "whatsapp-api": "whatsapp-api";
789
+ }>;
790
+ scopes: z.ZodArray<z.ZodString>;
791
+ }, z.core.$strip>>;
792
+ lastUsedAt: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
793
+ createdAt: z.ZodString;
794
+ updatedAt: z.ZodString;
795
+ }, z.core.$strip>;
796
+ }, z.core.$strip>;
797
+ }, z.core.$strip>;
798
+ declare const listServiceClientGrantsResponseSchema: z.ZodObject<{
799
+ data: z.ZodObject<{
800
+ grants: z.ZodArray<z.ZodObject<{
801
+ audience: z.ZodEnum<{
802
+ "auth-api": "auth-api";
803
+ "whatsapp-api": "whatsapp-api";
804
+ }>;
805
+ scopes: z.ZodArray<z.ZodString>;
806
+ }, z.core.$strip>>;
807
+ }, z.core.$strip>;
808
+ }, z.core.$strip>;
809
+ declare const setServiceClientGrantResponseSchema: z.ZodObject<{
810
+ data: z.ZodObject<{
811
+ grant: z.ZodObject<{
812
+ audience: z.ZodEnum<{
813
+ "auth-api": "auth-api";
814
+ "whatsapp-api": "whatsapp-api";
815
+ }>;
816
+ scopes: z.ZodArray<z.ZodString>;
817
+ }, z.core.$strip>;
818
+ }, z.core.$strip>;
819
+ }, z.core.$strip>;
820
+ declare const updateServiceClientResponseSchema: z.ZodObject<{
821
+ data: z.ZodObject<{
822
+ cliente: z.ZodObject<{
823
+ id: z.ZodString;
824
+ slug: z.ZodString;
825
+ name: z.ZodString;
826
+ enabled: z.ZodBoolean;
827
+ esAdmin: z.ZodBoolean;
828
+ producto: z.ZodNullable<z.ZodString>;
829
+ audiencia: z.ZodNullable<z.ZodEnum<{
830
+ "auth-api": "auth-api";
831
+ "whatsapp-api": "whatsapp-api";
832
+ }>>;
833
+ grants: z.ZodArray<z.ZodObject<{
834
+ audience: z.ZodEnum<{
835
+ "auth-api": "auth-api";
836
+ "whatsapp-api": "whatsapp-api";
837
+ }>;
838
+ scopes: z.ZodArray<z.ZodString>;
839
+ }, z.core.$strip>>;
840
+ lastUsedAt: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
841
+ createdAt: z.ZodString;
842
+ updatedAt: z.ZodString;
843
+ }, z.core.$strip>;
844
+ warning: z.ZodOptional<z.ZodString>;
845
+ }, z.core.$strip>;
846
+ }, z.core.$strip>;
847
+ declare const rotateServiceClientSecretResponseSchema: z.ZodObject<{
848
+ data: z.ZodObject<{
849
+ slug: z.ZodString;
850
+ secret: z.ZodString;
851
+ warning: z.ZodString;
852
+ }, z.core.$strip>;
853
+ }, z.core.$strip>;
854
+ declare const restoreUserResponseSchema: z.ZodObject<{
855
+ data: z.ZodObject<{
856
+ userId: z.ZodString;
857
+ stateAccount: z.ZodLiteral<"no_verificado">;
858
+ previouslyDeletedAt: z.ZodNullable<z.ZodString>;
859
+ restoredAt: z.ZodString;
860
+ }, z.core.$strip>;
861
+ }, z.core.$strip>;
862
+ type CreateServiceClientRequest = z.input<typeof createServiceClientRequestSchema>;
863
+ type UpdateServiceClientRequest = z.input<typeof updateServiceClientRequestSchema>;
864
+ type SetServiceClientGrantRequest = z.input<typeof setServiceClientGrantRequestSchema>;
865
+ type ServiceClientGrant = z.output<typeof serviceClientGrantSchema>;
866
+ type ListServiceClientGrantsResponse = z.output<typeof listServiceClientGrantsResponseSchema>;
867
+ type SetServiceClientGrantResponse = z.output<typeof setServiceClientGrantResponseSchema>;
868
+ type ServiceClientPublic = z.output<typeof serviceClientPublicSchema>;
869
+ type CreateServiceClientResponse = z.output<typeof createServiceClientResponseSchema>;
870
+ type ListServiceClientsResponse = z.output<typeof listServiceClientsResponseSchema>;
871
+ type GetServiceClientResponse = z.output<typeof getServiceClientResponseSchema>;
872
+ type UpdateServiceClientResponse = z.output<typeof updateServiceClientResponseSchema>;
873
+ type RotateServiceClientSecretResponse = z.output<typeof rotateServiceClientSecretResponseSchema>;
874
+ type RestoreUserResponse = z.output<typeof restoreUserResponseSchema>;
875
+ /**
876
+ * SCHEMA module: the service token endpoint. Unlike the rest of the API its bodies are NOT wrapped
877
+ * in `{ data }` nor `{ error: { code, message } }`: they follow RFC 6749 (5.1 success, 5.2 errors),
878
+ * so any OAuth-aware client can read them.
879
+ *
880
+ * `audience` is a plain string on purpose: an unknown audience is answered with `invalid_target`
881
+ * (RFC 8707), not with a validation error. The API checks it against the audience catalog.
882
+ */
883
+ declare const serviceTokenRequestSchema: z.ZodObject<{
884
+ audience: z.ZodString;
885
+ scope: z.ZodOptional<z.ZodString>;
886
+ }, z.core.$strict>;
887
+ declare const serviceTokenResponseSchema: z.ZodObject<{
888
+ access_token: z.ZodString;
889
+ token_type: z.ZodLiteral<"Bearer">;
890
+ expires_in: z.ZodNumber;
891
+ scope: z.ZodString;
892
+ }, z.core.$strip>;
893
+ declare const serviceTokenErrorSchema: z.ZodObject<{
894
+ error: z.ZodEnum<{
895
+ invalid_request: "invalid_request";
896
+ invalid_client: "invalid_client";
897
+ invalid_target: "invalid_target";
898
+ invalid_scope: "invalid_scope";
899
+ temporarily_unavailable: "temporarily_unavailable";
900
+ }>;
901
+ error_description: z.ZodOptional<z.ZodString>;
902
+ }, z.core.$strip>;
903
+ type ServiceTokenRequest = z.input<typeof serviceTokenRequestSchema>;
904
+ type ServiceTokenResponse = z.output<typeof serviceTokenResponseSchema>;
905
+ type ServiceTokenError = z.output<typeof serviceTokenErrorSchema>;
906
+ /** Access token (`at+jwt`) of the person on whose behalf a product acts. */
907
+ declare const subjectTokenSchema: z.ZodString;
908
+ /** Body of the requests that carry nothing but the person (`DELETE` and the like). */
909
+ declare const subjectTokenRequestSchema: z.ZodObject<{
910
+ subjectToken: z.ZodString;
911
+ }, z.core.$strict>;
912
+ /** Branch of a company. */
913
+ declare const sucursalSchema: z.ZodObject<{
914
+ id: z.ZodString;
915
+ empresaId: z.ZodString;
916
+ nombre: z.ZodString;
917
+ direccion: z.ZodNullable<z.ZodString>;
918
+ activa: z.ZodBoolean;
919
+ }, z.core.$strip>;
920
+ /** Branch as seen by an actor with no product: no address. */
921
+ declare const sucursalRecortadaSchema: z.ZodObject<{
922
+ empresaId: z.ZodString;
923
+ activa: z.ZodBoolean;
924
+ id: z.ZodString;
925
+ nombre: z.ZodString;
926
+ }, z.core.$strip>;
927
+ /** Public profile of a company (the directory shows only these fields, and only when `visible`). */
928
+ declare const empresaPerfilSchema: z.ZodObject<{
929
+ visible: z.ZodBoolean;
930
+ rubro: z.ZodNullable<z.ZodString>;
931
+ ciudad: z.ZodNullable<z.ZodString>;
932
+ descripcion: z.ZodNullable<z.ZodString>;
933
+ }, z.core.$strip>;
934
+ /** Profile fields of the update body: `null` clears the value. */
935
+ declare const updateEmpresaPerfilSchema: z.ZodObject<{
936
+ visible: z.ZodOptional<z.ZodBoolean>;
937
+ rubro: z.ZodOptional<z.ZodNullable<z.ZodString>>;
938
+ ciudad: z.ZodOptional<z.ZodNullable<z.ZodString>>;
939
+ descripcion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
940
+ }, z.core.$strict>;
941
+ /**
942
+ * `POST /internal/empresas`. The person of `subjectToken` becomes the holder (`titular`) and the
943
+ * product of the actor is contracted in `prueba`. An actor with no product cannot create companies.
944
+ */
945
+ declare const createEmpresaRequestSchema: z.ZodObject<{
946
+ ruc: z.ZodString;
947
+ razonSocial: z.ZodString;
948
+ slug: z.ZodString;
949
+ direccion: z.ZodOptional<z.ZodString>;
950
+ celular: z.ZodOptional<z.ZodString>;
951
+ email: z.ZodOptional<z.ZodString>;
952
+ subjectToken: z.ZodString;
953
+ }, z.core.$strict>;
954
+ /**
955
+ * `PATCH /internal/empresas/{id}`: master data, profile and directory visibility. `ruc` and `slug`
956
+ * are immutable (a body carrying them is rejected by `.strict()`).
957
+ */
958
+ declare const updateEmpresaRequestSchema: z.ZodObject<{
959
+ razonSocial: z.ZodOptional<z.ZodString>;
960
+ direccion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
961
+ celular: z.ZodOptional<z.ZodNullable<z.ZodString>>;
962
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
963
+ img: z.ZodOptional<z.ZodNullable<z.ZodString>>;
964
+ perfil: z.ZodOptional<z.ZodObject<{
965
+ visible: z.ZodOptional<z.ZodBoolean>;
966
+ rubro: z.ZodOptional<z.ZodNullable<z.ZodString>>;
967
+ ciudad: z.ZodOptional<z.ZodNullable<z.ZodString>>;
968
+ descripcion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
969
+ }, z.core.$strict>>;
970
+ subjectToken: z.ZodString;
971
+ }, z.core.$strict>;
972
+ /** Query of `GET /internal/empresas`: the companies that contracted the product of the actor. */
973
+ declare const listEmpresasQuerySchema: z.ZodObject<{
974
+ q: z.ZodOptional<z.ZodString>;
975
+ cursor: z.ZodOptional<z.ZodString>;
976
+ }, z.core.$strict>;
977
+ declare const addEmpresaMemberRequestSchema: z.ZodObject<{
978
+ userId: z.ZodString;
979
+ subjectToken: z.ZodString;
980
+ }, z.core.$strict>;
981
+ /** `PATCH /internal/empresas/{id}/miembros/{userId}`: only the holder changes roles. */
982
+ declare const updateEmpresaMemberRequestSchema: z.ZodObject<{
983
+ rol: z.ZodEnum<{
984
+ titular: "titular";
985
+ administrador: "administrador";
986
+ miembro: "miembro";
987
+ }>;
988
+ subjectToken: z.ZodString;
989
+ }, z.core.$strict>;
990
+ /** `DELETE /internal/empresas/{id}/miembros/{userId}`: `userId` = the person of the token leaves by their own account. */
991
+ declare const removeEmpresaMemberRequestSchema: z.ZodObject<{
992
+ subjectToken: z.ZodString;
993
+ }, z.core.$strict>;
994
+ declare const createSucursalRequestSchema: z.ZodObject<{
995
+ nombre: z.ZodString;
996
+ direccion: z.ZodOptional<z.ZodString>;
997
+ subjectToken: z.ZodString;
998
+ }, z.core.$strict>;
999
+ declare const updateSucursalRequestSchema: z.ZodObject<{
1000
+ nombre: z.ZodOptional<z.ZodString>;
1001
+ direccion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1002
+ subjectToken: z.ZodString;
1003
+ }, z.core.$strict>;
1004
+ /** `DELETE /internal/empresas/{id}/sucursales/{sucursalId}` is a logical deactivation (`activa = false`). */
1005
+ declare const deactivateSucursalRequestSchema: z.ZodObject<{
1006
+ subjectToken: z.ZodString;
1007
+ }, z.core.$strict>;
1008
+ /**
1009
+ * `POST /admin/empresas/{id}/titular`: dispute over a RUC or a company with no holder. The person
1010
+ * becomes the holder; the previous holder (if any) stays as a `miembro` or leaves, as the runbook says.
1011
+ */
1012
+ declare const reassignTitularRequestSchema: z.ZodObject<{
1013
+ userId: z.ZodString;
1014
+ titularAnterior: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
1015
+ miembro: "miembro";
1016
+ fuera: "fuera";
1017
+ }>>>;
1018
+ }, z.core.$strict>;
1019
+ /** Company as answered by its creation (201) and its update (200). */
1020
+ declare const empresaResponseSchema: z.ZodObject<{
1021
+ data: z.ZodObject<{
1022
+ id: z.ZodString;
1023
+ ruc: z.ZodString;
1024
+ razonSocial: z.ZodString;
1025
+ slug: z.ZodString;
1026
+ direccion: z.ZodNullable<z.ZodString>;
1027
+ celular: z.ZodNullable<z.ZodString>;
1028
+ email: z.ZodNullable<z.ZodString>;
1029
+ img: z.ZodNullable<z.ZodString>;
1030
+ estado: z.ZodEnum<{
1031
+ activa: "activa";
1032
+ baja: "baja";
1033
+ }>;
1034
+ grupoId: z.ZodNullable<z.ZodString>;
1035
+ perfil: z.ZodObject<{
1036
+ visible: z.ZodBoolean;
1037
+ rubro: z.ZodNullable<z.ZodString>;
1038
+ ciudad: z.ZodNullable<z.ZodString>;
1039
+ descripcion: z.ZodNullable<z.ZodString>;
1040
+ }, z.core.$strip>;
1041
+ }, z.core.$strip>;
1042
+ }, z.core.$strip>;
1043
+ /** Page of companies; `nextCursor` is `null` on the last page. */
1044
+ declare const listEmpresasResponseSchema: z.ZodObject<{
1045
+ data: z.ZodObject<{
1046
+ empresas: z.ZodArray<z.ZodObject<{
1047
+ id: z.ZodString;
1048
+ ruc: z.ZodString;
1049
+ razonSocial: z.ZodString;
1050
+ slug: z.ZodString;
1051
+ direccion: z.ZodNullable<z.ZodString>;
1052
+ celular: z.ZodNullable<z.ZodString>;
1053
+ email: z.ZodNullable<z.ZodString>;
1054
+ img: z.ZodNullable<z.ZodString>;
1055
+ estado: z.ZodEnum<{
1056
+ activa: "activa";
1057
+ baja: "baja";
1058
+ }>;
1059
+ grupoId: z.ZodNullable<z.ZodString>;
1060
+ perfil: z.ZodObject<{
1061
+ visible: z.ZodBoolean;
1062
+ rubro: z.ZodNullable<z.ZodString>;
1063
+ ciudad: z.ZodNullable<z.ZodString>;
1064
+ descripcion: z.ZodNullable<z.ZodString>;
1065
+ }, z.core.$strip>;
1066
+ }, z.core.$strip>>;
1067
+ nextCursor: z.ZodNullable<z.ZodString>;
1068
+ }, z.core.$strip>;
1069
+ }, z.core.$strip>;
1070
+ /** Full view (`GET /internal/empresas/{id}`) for an actor whose product the company contracted. */
1071
+ declare const empresaDetailResponseSchema: z.ZodObject<{
1072
+ data: z.ZodObject<{
1073
+ sucursales: z.ZodArray<z.ZodObject<{
1074
+ id: z.ZodString;
1075
+ empresaId: z.ZodString;
1076
+ nombre: z.ZodString;
1077
+ direccion: z.ZodNullable<z.ZodString>;
1078
+ activa: z.ZodBoolean;
1079
+ }, z.core.$strip>>;
1080
+ miembros: z.ZodArray<z.ZodObject<{
1081
+ userId: z.ZodString;
1082
+ rol: z.ZodEnum<{
1083
+ titular: "titular";
1084
+ administrador: "administrador";
1085
+ miembro: "miembro";
1086
+ }>;
1087
+ }, z.core.$strip>>;
1088
+ id: z.ZodString;
1089
+ ruc: z.ZodString;
1090
+ razonSocial: z.ZodString;
1091
+ slug: z.ZodString;
1092
+ direccion: z.ZodNullable<z.ZodString>;
1093
+ celular: z.ZodNullable<z.ZodString>;
1094
+ email: z.ZodNullable<z.ZodString>;
1095
+ img: z.ZodNullable<z.ZodString>;
1096
+ estado: z.ZodEnum<{
1097
+ activa: "activa";
1098
+ baja: "baja";
1099
+ }>;
1100
+ grupoId: z.ZodNullable<z.ZodString>;
1101
+ perfil: z.ZodObject<{
1102
+ visible: z.ZodBoolean;
1103
+ rubro: z.ZodNullable<z.ZodString>;
1104
+ ciudad: z.ZodNullable<z.ZodString>;
1105
+ descripcion: z.ZodNullable<z.ZodString>;
1106
+ }, z.core.$strip>;
1107
+ vista: z.ZodLiteral<"completa">;
1108
+ }, z.core.$strip>;
1109
+ }, z.core.$strip>;
1110
+ /** Trimmed view for an actor with no product (a shared service): no contact data, no members. */
1111
+ declare const empresaRecortadaResponseSchema: z.ZodObject<{
1112
+ data: z.ZodObject<{
1113
+ vista: z.ZodLiteral<"recortada">;
1114
+ id: z.ZodString;
1115
+ razonSocial: z.ZodString;
1116
+ estado: z.ZodEnum<{
1117
+ activa: "activa";
1118
+ baja: "baja";
1119
+ }>;
1120
+ sucursales: z.ZodArray<z.ZodObject<{
1121
+ empresaId: z.ZodString;
1122
+ activa: z.ZodBoolean;
1123
+ id: z.ZodString;
1124
+ nombre: z.ZodString;
1125
+ }, z.core.$strip>>;
1126
+ }, z.core.$strip>;
1127
+ }, z.core.$strip>;
1128
+ /** `GET /internal/empresas/{id}`: one of the two views, told apart by `data.vista`. */
1129
+ declare const getEmpresaResponseSchema: z.ZodObject<{
1130
+ data: z.ZodDiscriminatedUnion<[z.ZodObject<{
1131
+ sucursales: z.ZodArray<z.ZodObject<{
1132
+ id: z.ZodString;
1133
+ empresaId: z.ZodString;
1134
+ nombre: z.ZodString;
1135
+ direccion: z.ZodNullable<z.ZodString>;
1136
+ activa: z.ZodBoolean;
1137
+ }, z.core.$strip>>;
1138
+ miembros: z.ZodArray<z.ZodObject<{
1139
+ userId: z.ZodString;
1140
+ rol: z.ZodEnum<{
1141
+ titular: "titular";
1142
+ administrador: "administrador";
1143
+ miembro: "miembro";
1144
+ }>;
1145
+ }, z.core.$strip>>;
1146
+ id: z.ZodString;
1147
+ ruc: z.ZodString;
1148
+ razonSocial: z.ZodString;
1149
+ slug: z.ZodString;
1150
+ direccion: z.ZodNullable<z.ZodString>;
1151
+ celular: z.ZodNullable<z.ZodString>;
1152
+ email: z.ZodNullable<z.ZodString>;
1153
+ img: z.ZodNullable<z.ZodString>;
1154
+ estado: z.ZodEnum<{
1155
+ activa: "activa";
1156
+ baja: "baja";
1157
+ }>;
1158
+ grupoId: z.ZodNullable<z.ZodString>;
1159
+ perfil: z.ZodObject<{
1160
+ visible: z.ZodBoolean;
1161
+ rubro: z.ZodNullable<z.ZodString>;
1162
+ ciudad: z.ZodNullable<z.ZodString>;
1163
+ descripcion: z.ZodNullable<z.ZodString>;
1164
+ }, z.core.$strip>;
1165
+ vista: z.ZodLiteral<"completa">;
1166
+ }, z.core.$strip>, z.ZodObject<{
1167
+ vista: z.ZodLiteral<"recortada">;
1168
+ id: z.ZodString;
1169
+ razonSocial: z.ZodString;
1170
+ estado: z.ZodEnum<{
1171
+ activa: "activa";
1172
+ baja: "baja";
1173
+ }>;
1174
+ sucursales: z.ZodArray<z.ZodObject<{
1175
+ empresaId: z.ZodString;
1176
+ activa: z.ZodBoolean;
1177
+ id: z.ZodString;
1178
+ nombre: z.ZodString;
1179
+ }, z.core.$strip>>;
1180
+ }, z.core.$strip>], "vista">;
1181
+ }, z.core.$strip>;
1182
+ /** Answer of adding a member (201) and of changing a role (200). */
1183
+ declare const empresaMemberResponseSchema: z.ZodObject<{
1184
+ data: z.ZodObject<{
1185
+ empresaId: z.ZodString;
1186
+ userId: z.ZodString;
1187
+ rol: z.ZodEnum<{
1188
+ titular: "titular";
1189
+ administrador: "administrador";
1190
+ miembro: "miembro";
1191
+ }>;
1192
+ }, z.core.$strip>;
1193
+ }, z.core.$strip>;
1194
+ /** Answer of creating (201) and updating (200) a branch. */
1195
+ declare const sucursalResponseSchema: z.ZodObject<{
1196
+ data: z.ZodObject<{
1197
+ id: z.ZodString;
1198
+ empresaId: z.ZodString;
1199
+ nombre: z.ZodString;
1200
+ direccion: z.ZodNullable<z.ZodString>;
1201
+ activa: z.ZodBoolean;
1202
+ }, z.core.$strip>;
1203
+ }, z.core.$strip>;
1204
+ /** Answer of `baja` and `reactivar` (internal with `empresas:baja`, and admin). */
1205
+ declare const empresaEstadoResponseSchema: z.ZodObject<{
1206
+ data: z.ZodObject<{
1207
+ id: z.ZodString;
1208
+ estado: z.ZodEnum<{
1209
+ activa: "activa";
1210
+ baja: "baja";
1211
+ }>;
1212
+ }, z.core.$strip>;
1213
+ }, z.core.$strip>;
1214
+ /** Answer of the holder reassignment. */
1215
+ declare const reassignTitularResponseSchema: z.ZodObject<{
1216
+ data: z.ZodObject<{
1217
+ empresaId: z.ZodString;
1218
+ titularUserId: z.ZodString;
1219
+ titularAnteriorUserId: z.ZodNullable<z.ZodString>;
1220
+ }, z.core.$strip>;
1221
+ }, z.core.$strip>;
1222
+ type Sucursal = z.output<typeof sucursalSchema>;
1223
+ type SucursalRecortada = z.output<typeof sucursalRecortadaSchema>;
1224
+ type EmpresaPerfil = z.output<typeof empresaPerfilSchema>;
1225
+ type CreateEmpresaRequest = z.input<typeof createEmpresaRequestSchema>;
1226
+ type UpdateEmpresaRequest = z.input<typeof updateEmpresaRequestSchema>;
1227
+ type ListEmpresasQuery = z.input<typeof listEmpresasQuerySchema>;
1228
+ type AddEmpresaMemberRequest = z.input<typeof addEmpresaMemberRequestSchema>;
1229
+ type UpdateEmpresaMemberRequest = z.input<typeof updateEmpresaMemberRequestSchema>;
1230
+ type RemoveEmpresaMemberRequest = z.input<typeof removeEmpresaMemberRequestSchema>;
1231
+ type CreateSucursalRequest = z.input<typeof createSucursalRequestSchema>;
1232
+ type UpdateSucursalRequest = z.input<typeof updateSucursalRequestSchema>;
1233
+ type DeactivateSucursalRequest = z.input<typeof deactivateSucursalRequestSchema>;
1234
+ type ReassignTitularRequest = z.input<typeof reassignTitularRequestSchema>;
1235
+ type EmpresaResponse = z.output<typeof empresaResponseSchema>;
1236
+ type ListEmpresasResponse = z.output<typeof listEmpresasResponseSchema>;
1237
+ type EmpresaDetailResponse = z.output<typeof empresaDetailResponseSchema>;
1238
+ type EmpresaRecortadaResponse = z.output<typeof empresaRecortadaResponseSchema>;
1239
+ type GetEmpresaResponse = z.output<typeof getEmpresaResponseSchema>;
1240
+ type EmpresaMemberResponse = z.output<typeof empresaMemberResponseSchema>;
1241
+ type SucursalResponse = z.output<typeof sucursalResponseSchema>;
1242
+ type EmpresaEstadoResponse = z.output<typeof empresaEstadoResponseSchema>;
1243
+ type ReassignTitularResponse = z.output<typeof reassignTitularResponseSchema>;
1244
+ declare const productoSchema: z.ZodObject<{
1245
+ slug: z.ZodString;
1246
+ nombre: z.ZodString;
1247
+ enabled: z.ZodBoolean;
1248
+ }, z.core.$strip>;
1249
+ declare const createProductoRequestSchema: z.ZodObject<{
1250
+ slug: z.ZodString;
1251
+ nombre: z.ZodString;
1252
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1253
+ }, z.core.$strict>;
1254
+ /** Update body: strict BASE object, every field optional. */
1255
+ declare const updateProductoRequestSchema: z.ZodObject<{
1256
+ nombre: z.ZodOptional<z.ZodString>;
1257
+ enabled: z.ZodOptional<z.ZodBoolean>;
1258
+ }, z.core.$strict>;
1259
+ declare const listProductosResponseSchema: z.ZodObject<{
1260
+ data: z.ZodObject<{
1261
+ productos: z.ZodArray<z.ZodObject<{
1262
+ slug: z.ZodString;
1263
+ nombre: z.ZodString;
1264
+ enabled: z.ZodBoolean;
1265
+ }, z.core.$strip>>;
1266
+ }, z.core.$strip>;
1267
+ }, z.core.$strip>;
1268
+ /** Answer of creating (201) and of updating (200) a product. */
1269
+ declare const productoResponseSchema: z.ZodObject<{
1270
+ data: z.ZodObject<{
1271
+ producto: z.ZodObject<{
1272
+ slug: z.ZodString;
1273
+ nombre: z.ZodString;
1274
+ enabled: z.ZodBoolean;
1275
+ }, z.core.$strip>;
1276
+ }, z.core.$strip>;
1277
+ }, z.core.$strip>;
1278
+ type Producto = z.output<typeof productoSchema>;
1279
+ type CreateProductoRequest = z.input<typeof createProductoRequestSchema>;
1280
+ type UpdateProductoRequest = z.input<typeof updateProductoRequestSchema>;
1281
+ type ListProductosResponse = z.output<typeof listProductosResponseSchema>;
1282
+ type ProductoResponse = z.output<typeof productoResponseSchema>;
1283
+ declare const tokenExchangeRequestSchema: z.ZodObject<{
1284
+ grant_type: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:token-exchange">;
1285
+ subject_token: z.ZodString;
1286
+ subject_token_type: z.ZodLiteral<"urn:ietf:params:oauth:token-type:access_token">;
1287
+ audience: z.ZodString;
1288
+ scope: z.ZodOptional<z.ZodString>;
1289
+ }, z.core.$strict>;
1290
+ declare const tokenExchangeResponseSchema: z.ZodObject<{
1291
+ access_token: z.ZodString;
1292
+ issued_token_type: z.ZodLiteral<"urn:ietf:params:oauth:token-type:access_token">;
1293
+ token_type: z.ZodLiteral<"Bearer">;
1294
+ expires_in: z.ZodNumber;
1295
+ scope: z.ZodString;
1296
+ }, z.core.$strip>;
1297
+ declare const tokenExchangeErrorSchema: z.ZodObject<{
1298
+ error: z.ZodEnum<{
1299
+ invalid_request: "invalid_request";
1300
+ invalid_client: "invalid_client";
1301
+ invalid_target: "invalid_target";
1302
+ invalid_scope: "invalid_scope";
1303
+ temporarily_unavailable: "temporarily_unavailable";
1304
+ invalid_grant: "invalid_grant";
1305
+ }>;
1306
+ error_description: z.ZodOptional<z.ZodString>;
1307
+ }, z.core.$strip>;
1308
+ type TokenExchangeRequest = z.input<typeof tokenExchangeRequestSchema>;
1309
+ type TokenExchangeResponse = z.output<typeof tokenExchangeResponseSchema>;
1310
+ type TokenExchangeError = z.output<typeof tokenExchangeErrorSchema>;
1311
+ /**
1312
+ * SCHEMA module: contracts of a product by a company (`empresa_productos`). A product asks for
1313
+ * its own contract (`POST`) or cancels it (`DELETE`) with its service token (permission
1314
+ * `contrataciones:pedir`, grantable to products) plus the access token
1315
+ * of a holder (`subjectToken`, see `empresas.ts`); billing (permission `contrataciones:escribir`, never granted to a product,
1316
+ * no product) and the Auth admin write any row with `PUT`. Only `prueba` and `activo`, with
1317
+ * `hasta` empty or in the future, count as contracted.
1318
+ */
1319
+ declare const contratacionSchema: z.ZodObject<{
1320
+ empresaId: z.ZodString;
1321
+ producto: z.ZodString;
1322
+ estado: z.ZodEnum<{
1323
+ prueba: "prueba";
1324
+ pendiente_pago: "pendiente_pago";
1325
+ activo: "activo";
1326
+ suspendido: "suspendido";
1327
+ cancelado: "cancelado";
1328
+ }>;
1329
+ desde: z.ZodString;
1330
+ hasta: z.ZodNullable<z.ZodString>;
1331
+ actualizadoEn: z.ZodString;
1332
+ }, z.core.$strip>;
1333
+ /**
1334
+ * `PUT .../productos/{producto}` (billing and the Auth admin). `hasta` omitted leaves it as is;
1335
+ * `null` removes the end; a value sets (or extends) it.
1336
+ */
1337
+ declare const setContratacionRequestSchema: z.ZodObject<{
1338
+ estado: z.ZodEnum<{
1339
+ prueba: "prueba";
1340
+ activo: "activo";
1341
+ suspendido: "suspendido";
1342
+ cancelado: "cancelado";
1343
+ }>;
1344
+ hasta: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1345
+ }, z.core.$strict>;
1346
+ /** Answer of asking for (201) and of writing (200) a contract. */
1347
+ declare const contratacionResponseSchema: z.ZodObject<{
1348
+ data: z.ZodObject<{
1349
+ empresaId: z.ZodString;
1350
+ producto: z.ZodString;
1351
+ estado: z.ZodEnum<{
1352
+ prueba: "prueba";
1353
+ pendiente_pago: "pendiente_pago";
1354
+ activo: "activo";
1355
+ suspendido: "suspendido";
1356
+ cancelado: "cancelado";
1357
+ }>;
1358
+ desde: z.ZodString;
1359
+ hasta: z.ZodNullable<z.ZodString>;
1360
+ actualizadoEn: z.ZodString;
1361
+ }, z.core.$strip>;
1362
+ }, z.core.$strip>;
1363
+ /** `GET /internal/empresas/{id}/productos/{producto}`: for shared services that serve service-to-service calls. */
1364
+ declare const contratadoResponseSchema: z.ZodObject<{
1365
+ data: z.ZodObject<{
1366
+ contratado: z.ZodBoolean;
1367
+ }, z.core.$strip>;
1368
+ }, z.core.$strip>;
1369
+ type Contratacion = z.output<typeof contratacionSchema>;
1370
+ type SetContratacionRequest = z.input<typeof setContratacionRequestSchema>;
1371
+ type ContratacionResponse = z.output<typeof contratacionResponseSchema>;
1372
+ type ContratadoResponse = z.output<typeof contratadoResponseSchema>;
1373
+ declare const grupoSchema: z.ZodObject<{
1374
+ id: z.ZodString;
1375
+ nombre: z.ZodString;
1376
+ empresaIds: z.ZodArray<z.ZodString>;
1377
+ }, z.core.$strip>;
1378
+ /** Creates a group with one company of the person. */
1379
+ declare const createGrupoRequestSchema: z.ZodObject<{
1380
+ nombre: z.ZodString;
1381
+ empresaId: z.ZodString;
1382
+ subjectToken: z.ZodString;
1383
+ }, z.core.$strict>;
1384
+ /** Renaming: a holder of any company of the group. */
1385
+ declare const renameGrupoRequestSchema: z.ZodObject<{
1386
+ nombre: z.ZodString;
1387
+ subjectToken: z.ZodString;
1388
+ }, z.core.$strict>;
1389
+ declare const addGrupoEmpresaRequestSchema: z.ZodObject<{
1390
+ empresaId: z.ZodString;
1391
+ subjectToken: z.ZodString;
1392
+ }, z.core.$strict>;
1393
+ declare const removeGrupoEmpresaRequestSchema: z.ZodObject<{
1394
+ subjectToken: z.ZodString;
1395
+ }, z.core.$strict>;
1396
+ /** Answer of creating (201), renaming (200) and adding a company (201). */
1397
+ declare const grupoResponseSchema: z.ZodObject<{
1398
+ data: z.ZodObject<{
1399
+ id: z.ZodString;
1400
+ nombre: z.ZodString;
1401
+ empresaIds: z.ZodArray<z.ZodString>;
1402
+ }, z.core.$strip>;
1403
+ }, z.core.$strip>;
1404
+ type Grupo = z.output<typeof grupoSchema>;
1405
+ type CreateGrupoRequest = z.input<typeof createGrupoRequestSchema>;
1406
+ type RenameGrupoRequest = z.input<typeof renameGrupoRequestSchema>;
1407
+ type AddGrupoEmpresaRequest = z.input<typeof addGrupoEmpresaRequestSchema>;
1408
+ type RemoveGrupoEmpresaRequest = z.input<typeof removeGrupoEmpresaRequestSchema>;
1409
+ type GrupoResponse = z.output<typeof grupoResponseSchema>;
1410
+ /**
1411
+ * SCHEMA module: the directory of companies, the only cross-company search. Open to users with the
1412
+ * access token of any enabled product (rate limited per user) and to services with
1413
+ * `directorio:leer`. Only active, opted-in companies, only the public profile fields, at most 50
1414
+ * per page.
1415
+ */
1416
+ declare const directorioQuerySchema: z.ZodObject<{
1417
+ q: z.ZodOptional<z.ZodString>;
1418
+ rubro: z.ZodOptional<z.ZodString>;
1419
+ ciudad: z.ZodOptional<z.ZodString>;
1420
+ cursor: z.ZodOptional<z.ZodString>;
1421
+ }, z.core.$strict>;
1422
+ declare const directorioEmpresaSchema: z.ZodObject<{
1423
+ id: z.ZodString;
1424
+ razonSocial: z.ZodString;
1425
+ rubro: z.ZodNullable<z.ZodString>;
1426
+ ciudad: z.ZodNullable<z.ZodString>;
1427
+ descripcion: z.ZodNullable<z.ZodString>;
1428
+ img: z.ZodNullable<z.ZodString>;
1429
+ }, z.core.$strip>;
1430
+ declare const directorioResponseSchema: z.ZodObject<{
1431
+ data: z.ZodObject<{
1432
+ empresas: z.ZodArray<z.ZodObject<{
1433
+ id: z.ZodString;
1434
+ razonSocial: z.ZodString;
1435
+ rubro: z.ZodNullable<z.ZodString>;
1436
+ ciudad: z.ZodNullable<z.ZodString>;
1437
+ descripcion: z.ZodNullable<z.ZodString>;
1438
+ img: z.ZodNullable<z.ZodString>;
1439
+ }, z.core.$strip>>;
1440
+ nextCursor: z.ZodNullable<z.ZodString>;
1441
+ }, z.core.$strip>;
1442
+ }, z.core.$strip>;
1443
+ type DirectorioQuery = z.input<typeof directorioQuerySchema>;
1444
+ type DirectorioEmpresa = z.output<typeof directorioEmpresaSchema>;
1445
+ type DirectorioResponse = z.output<typeof directorioResponseSchema>;
1446
+ declare const interEmpresaPermissionSchema: z.ZodEnum<{
1447
+ "whatsapp:mensajes:leer": "whatsapp:mensajes:leer";
1448
+ }>;
1449
+ declare const createAutorizacionRequestSchema: z.ZodObject<{
1450
+ beneficiariaId: z.ZodString;
1451
+ permiso: z.ZodEnum<{
1452
+ "whatsapp:mensajes:leer": "whatsapp:mensajes:leer";
1453
+ }>;
1454
+ subjectToken: z.ZodString;
1455
+ }, z.core.$strict>;
1456
+ /** `DELETE`: revocation by the grantor or renunciation by the beneficiary. */
1457
+ declare const deleteAutorizacionRequestSchema: z.ZodObject<{
1458
+ subjectToken: z.ZodString;
1459
+ }, z.core.$strict>;
1460
+ /** Query of `GET /internal/empresas/{id}/autorizaciones` (the person goes in `SUBJECT_TOKEN_HEADER`). */
1461
+ declare const listAutorizacionesQuerySchema: z.ZodObject<{
1462
+ direccion: z.ZodEnum<{
1463
+ otorgadas: "otorgadas";
1464
+ recibidas: "recibidas";
1465
+ }>;
1466
+ }, z.core.$strict>;
1467
+ /**
1468
+ * Query of `GET /internal/autorizaciones/verificar`: only for actors whose audience owns the
1469
+ * permission (the actor may also have a product). Valid only while both companies are active.
1470
+ */
1471
+ declare const verificarAutorizacionQuerySchema: z.ZodObject<{
1472
+ otorgante: z.ZodString;
1473
+ beneficiaria: z.ZodString;
1474
+ permiso: z.ZodEnum<{
1475
+ "whatsapp:mensajes:leer": "whatsapp:mensajes:leer";
1476
+ }>;
1477
+ }, z.core.$strict>;
1478
+ /** Authorization in force. */
1479
+ declare const autorizacionSchema: z.ZodObject<{
1480
+ id: z.ZodString;
1481
+ otorganteId: z.ZodString;
1482
+ beneficiariaId: z.ZodString;
1483
+ permiso: z.ZodString;
1484
+ creadaEn: z.ZodString;
1485
+ creadaPor: z.ZodString;
1486
+ }, z.core.$strip>;
1487
+ declare const autorizacionResponseSchema: z.ZodObject<{
1488
+ data: z.ZodObject<{
1489
+ id: z.ZodString;
1490
+ otorganteId: z.ZodString;
1491
+ beneficiariaId: z.ZodString;
1492
+ permiso: z.ZodString;
1493
+ creadaEn: z.ZodString;
1494
+ creadaPor: z.ZodString;
1495
+ }, z.core.$strip>;
1496
+ }, z.core.$strip>;
1497
+ declare const listAutorizacionesResponseSchema: z.ZodObject<{
1498
+ data: z.ZodObject<{
1499
+ autorizaciones: z.ZodArray<z.ZodObject<{
1500
+ id: z.ZodString;
1501
+ otorganteId: z.ZodString;
1502
+ beneficiariaId: z.ZodString;
1503
+ permiso: z.ZodString;
1504
+ creadaEn: z.ZodString;
1505
+ creadaPor: z.ZodString;
1506
+ }, z.core.$strip>>;
1507
+ }, z.core.$strip>;
1508
+ }, z.core.$strip>;
1509
+ declare const verificarAutorizacionResponseSchema: z.ZodObject<{
1510
+ data: z.ZodObject<{
1511
+ autorizado: z.ZodBoolean;
1512
+ }, z.core.$strip>;
1513
+ }, z.core.$strip>;
1514
+ /** Permissions of the inter-company catalog without repeats (first order kept); an empty list clears them. */
1515
+ declare const setProductoPermisosAutorizablesRequestSchema: z.ZodObject<{
1516
+ permisos: z.ZodPipe<z.ZodArray<z.ZodEnum<{
1517
+ "whatsapp:mensajes:leer": "whatsapp:mensajes:leer";
1518
+ }>>, z.ZodTransform<"whatsapp:mensajes:leer"[], "whatsapp:mensajes:leer"[]>>;
1519
+ }, z.core.$strict>;
1520
+ /** Permissions a product may grant on behalf of its companies (admin). */
1521
+ declare const productoPermisosAutorizablesResponseSchema: z.ZodObject<{
1522
+ data: z.ZodObject<{
1523
+ producto: z.ZodString;
1524
+ permisos: z.ZodArray<z.ZodString>;
1525
+ }, z.core.$strip>;
1526
+ }, z.core.$strip>;
1527
+ type CreateAutorizacionRequest = z.input<typeof createAutorizacionRequestSchema>;
1528
+ type DeleteAutorizacionRequest = z.input<typeof deleteAutorizacionRequestSchema>;
1529
+ type ListAutorizacionesQuery = z.input<typeof listAutorizacionesQuerySchema>;
1530
+ type VerificarAutorizacionQuery = z.input<typeof verificarAutorizacionQuerySchema>;
1531
+ type Autorizacion = z.output<typeof autorizacionSchema>;
1532
+ type AutorizacionResponse = z.output<typeof autorizacionResponseSchema>;
1533
+ type ListAutorizacionesResponse = z.output<typeof listAutorizacionesResponseSchema>;
1534
+ type VerificarAutorizacionResponse = z.output<typeof verificarAutorizacionResponseSchema>;
1535
+ type SetProductoPermisosAutorizablesRequest = z.input<typeof setProductoPermisosAutorizablesRequestSchema>;
1536
+ type ProductoPermisosAutorizablesResponse = z.output<typeof productoPermisosAutorizablesResponseSchema>;
1537
+ /**
1538
+ * Create or replace the edge of a service client towards one audience. One variant per delegable
1539
+ * audience; a test pins that every delegable audience has its variant.
1540
+ */
1541
+ declare const setServiceClientDelegationRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1542
+ audience: z.ZodLiteral<"whatsapp-api">;
1543
+ scopes: z.ZodPipe<z.ZodArray<z.ZodEnum<{
1544
+ "messages:send:text": "messages:send:text";
1545
+ "messages:send:media": "messages:send:media";
1546
+ }>>, z.ZodTransform<("messages:send:text" | "messages:send:media")[], ("messages:send:text" | "messages:send:media")[]>>;
1547
+ requiere_scope_origen: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodEnum<{
1548
+ "messages:send:text": "messages:send:text";
1549
+ "messages:send:media": "messages:send:media";
1550
+ }>>, z.ZodTransform<("messages:send:text" | "messages:send:media")[], ("messages:send:text" | "messages:send:media")[]>>>;
1551
+ }, z.core.$strict>], "audience">;
1552
+ declare const serviceClientDelegationSchema: z.ZodObject<{
1553
+ audience: z.ZodEnum<{
1554
+ "whatsapp-api": "whatsapp-api";
1555
+ }>;
1556
+ scopes: z.ZodArray<z.ZodString>;
1557
+ requiere_scope_origen: z.ZodArray<z.ZodString>;
1558
+ }, z.core.$strip>;
1559
+ declare const listServiceClientDelegationsResponseSchema: z.ZodObject<{
1560
+ data: z.ZodObject<{
1561
+ delegations: z.ZodArray<z.ZodObject<{
1562
+ audience: z.ZodEnum<{
1563
+ "whatsapp-api": "whatsapp-api";
1564
+ }>;
1565
+ scopes: z.ZodArray<z.ZodString>;
1566
+ requiere_scope_origen: z.ZodArray<z.ZodString>;
1567
+ }, z.core.$strip>>;
1568
+ }, z.core.$strip>;
1569
+ }, z.core.$strip>;
1570
+ declare const setServiceClientDelegationResponseSchema: z.ZodObject<{
1571
+ data: z.ZodObject<{
1572
+ delegation: z.ZodObject<{
1573
+ audience: z.ZodEnum<{
1574
+ "whatsapp-api": "whatsapp-api";
1575
+ }>;
1576
+ scopes: z.ZodArray<z.ZodString>;
1577
+ requiere_scope_origen: z.ZodArray<z.ZodString>;
1578
+ }, z.core.$strip>;
1579
+ }, z.core.$strip>;
1580
+ }, z.core.$strip>;
1581
+ type SetServiceClientDelegationRequest = z.input<typeof setServiceClientDelegationRequestSchema>;
1582
+ type ServiceClientDelegation = z.output<typeof serviceClientDelegationSchema>;
1583
+ type ListServiceClientDelegationsResponse = z.output<typeof listServiceClientDelegationsResponseSchema>;
1584
+ type SetServiceClientDelegationResponse = z.output<typeof setServiceClientDelegationResponseSchema>;
1585
+ declare const empresaEventPayloadSchema: z.ZodObject<{
1586
+ empresaId: z.ZodString;
1587
+ }, z.core.$strip>;
1588
+ declare const empresaMemberRoleChangedPayloadSchema: z.ZodObject<{
1589
+ empresaId: z.ZodString;
1590
+ userId: z.ZodString;
1591
+ rol: z.ZodEnum<{
1592
+ titular: "titular";
1593
+ administrador: "administrador";
1594
+ miembro: "miembro";
1595
+ }>;
1596
+ }, z.core.$strip>;
1597
+ declare const empresaBranchEventPayloadSchema: z.ZodObject<{
1598
+ empresaId: z.ZodString;
1599
+ sucursalId: z.ZodString;
1600
+ }, z.core.$strip>;
1601
+ declare const empresaProductChangedPayloadSchema: z.ZodObject<{
1602
+ empresaId: z.ZodString;
1603
+ producto: z.ZodString;
1604
+ estado: z.ZodEnum<{
1605
+ prueba: "prueba";
1606
+ pendiente_pago: "pendiente_pago";
1607
+ activo: "activo";
1608
+ suspendido: "suspendido";
1609
+ cancelado: "cancelado";
1610
+ }>;
1611
+ }, z.core.$strip>;
1612
+ /** Phase 1 events: `empresa.member_added` and `empresa.member_removed`. */
1613
+ declare const empresaMemberEventPayloadSchema: z.ZodObject<{
1614
+ empresaId: z.ZodString;
1615
+ userId: z.ZodString;
1616
+ }, z.core.$strip>;
1617
+ declare const grupoEventPayloadSchema: z.ZodObject<{
1618
+ grupoId: z.ZodString;
1619
+ }, z.core.$strip>;
1620
+ declare const grupoMemberEventPayloadSchema: z.ZodObject<{
1621
+ grupoId: z.ZodString;
1622
+ empresaId: z.ZodString;
1623
+ }, z.core.$strip>;
1624
+ declare const autorizacionEventPayloadSchema: z.ZodObject<{
1625
+ autorizacionId: z.ZodString;
1626
+ otorganteId: z.ZodString;
1627
+ beneficiariaId: z.ZodString;
1628
+ permiso: z.ZodString;
1629
+ }, z.core.$strip>;
1630
+ /** `data` schema of each `empresa.*`, `grupo.*` and `autorizacion.*` event (ids only: no `slug`, no first member), by event code. */
1631
+ declare const IDENTITY_EVENT_PAYLOAD_SCHEMAS: {
1632
+ readonly "empresa.created": z.ZodObject<{
1633
+ empresaId: z.ZodString;
1634
+ }, z.core.$strip>;
1635
+ readonly "empresa.member_added": z.ZodObject<{
1636
+ empresaId: z.ZodString;
1637
+ userId: z.ZodString;
1638
+ }, z.core.$strip>;
1639
+ readonly "empresa.member_removed": z.ZodObject<{
1640
+ empresaId: z.ZodString;
1641
+ userId: z.ZodString;
1642
+ }, z.core.$strip>;
1643
+ readonly "empresa.branch_created": z.ZodObject<{
1644
+ empresaId: z.ZodString;
1645
+ sucursalId: z.ZodString;
1646
+ }, z.core.$strip>;
1647
+ readonly "empresa.updated": z.ZodObject<{
1648
+ empresaId: z.ZodString;
1649
+ }, z.core.$strip>;
1650
+ readonly "empresa.deactivated": z.ZodObject<{
1651
+ empresaId: z.ZodString;
1652
+ }, z.core.$strip>;
1653
+ readonly "empresa.reactivated": z.ZodObject<{
1654
+ empresaId: z.ZodString;
1655
+ }, z.core.$strip>;
1656
+ readonly "empresa.member_role_changed": z.ZodObject<{
1657
+ empresaId: z.ZodString;
1658
+ userId: z.ZodString;
1659
+ rol: z.ZodEnum<{
1660
+ titular: "titular";
1661
+ administrador: "administrador";
1662
+ miembro: "miembro";
1663
+ }>;
1664
+ }, z.core.$strip>;
1665
+ readonly "empresa.branch_updated": z.ZodObject<{
1666
+ empresaId: z.ZodString;
1667
+ sucursalId: z.ZodString;
1668
+ }, z.core.$strip>;
1669
+ readonly "empresa.branch_deactivated": z.ZodObject<{
1670
+ empresaId: z.ZodString;
1671
+ sucursalId: z.ZodString;
1672
+ }, z.core.$strip>;
1673
+ readonly "empresa.product_changed": z.ZodObject<{
1674
+ empresaId: z.ZodString;
1675
+ producto: z.ZodString;
1676
+ estado: z.ZodEnum<{
1677
+ prueba: "prueba";
1678
+ pendiente_pago: "pendiente_pago";
1679
+ activo: "activo";
1680
+ suspendido: "suspendido";
1681
+ cancelado: "cancelado";
1682
+ }>;
1683
+ }, z.core.$strip>;
1684
+ readonly "grupo.updated": z.ZodObject<{
1685
+ grupoId: z.ZodString;
1686
+ }, z.core.$strip>;
1687
+ readonly "grupo.member_added": z.ZodObject<{
1688
+ grupoId: z.ZodString;
1689
+ empresaId: z.ZodString;
1690
+ }, z.core.$strip>;
1691
+ readonly "grupo.member_removed": z.ZodObject<{
1692
+ grupoId: z.ZodString;
1693
+ empresaId: z.ZodString;
1694
+ }, z.core.$strip>;
1695
+ readonly "autorizacion.granted": z.ZodObject<{
1696
+ autorizacionId: z.ZodString;
1697
+ otorganteId: z.ZodString;
1698
+ beneficiariaId: z.ZodString;
1699
+ permiso: z.ZodString;
1700
+ }, z.core.$strip>;
1701
+ readonly "autorizacion.revoked": z.ZodObject<{
1702
+ autorizacionId: z.ZodString;
1703
+ otorganteId: z.ZodString;
1704
+ beneficiariaId: z.ZodString;
1705
+ permiso: z.ZodString;
1706
+ }, z.core.$strip>;
1707
+ };
1708
+ type EmpresaProductChangedPayload = z.output<typeof empresaProductChangedPayloadSchema>;
1709
+ type AutorizacionEventPayload = z.output<typeof autorizacionEventPayloadSchema>;
1710
+ export { addGrupoEmpresaRequestSchema as $, updateServiceClientRequestSchema as $n, LoginRequest as $r, createSucursalRequestSchema as $t, autorizacionResponseSchema as A, GetServiceClientResponse as An, UsersBatchResponse as Ar, CreateEmpresaRequest as At, verificarAutorizacionResponseSchema as B, UpdateServiceClientResponse as Bn, PublicProfile as Br, ListEmpresasQuery as Bt, DeleteAutorizacionRequest as C, PRIVACY_STATES as Ci, ServiceTokenRequest as Cn, rotateSubscriptionSecretResponseSchema as Cr, UpdateProductoRequest as Ct, SetProductoPermisosAutorizablesRequest as D, serviceTokenResponseSchema as Dn, subscriptionWithSecretResponseSchema as Dr, productoSchema as Dt, ProductoPermisosAutorizablesResponse as E, WEBHOOK_TIMESTAMP_WINDOW_SECONDS as Ei, serviceTokenRequestSchema as En, subscriptionSchema as Er, productoResponseSchema as Et, listAutorizacionesQuerySchema as F, ServiceClientGrant as Fn, sessionListResponseSchema as Fr, EmpresaMemberResponse as Ft, directorioQuerySchema as G, listServiceClientsResponseSchema as Gn, companySchema as Gr, Sucursal as Gt, DirectorioQuery as H, createServiceClientResponseSchema as Hn, UpdateUserRequest as Hr, ReassignTitularRequest as Ht, listAutorizacionesResponseSchema as I, ServiceClientPublic as In, Company as Ir, EmpresaPerfil as It, CreateGrupoRequest as J, serviceClientGrantSchema as Jn, publicProfileSchema as Jr, UpdateEmpresaMemberRequest as Jt, directorioResponseSchema as K, restoreUserResponseSchema as Kn, contractedCompanySchema as Kr, SucursalRecortada as Kt, productoPermisosAutorizablesResponseSchema as L, SetServiceClientGrantRequest as Ln, CompanyListResponse as Lr, EmpresaRecortadaResponse as Lt, createAutorizacionRequestSchema as M, ListServiceClientsResponse as Mn, usersBatchResponseSchema as Mr, DeactivateSucursalRequest as Mt, deleteAutorizacionRequestSchema as N, RestoreUserResponse as Nn, Session as Nr, EmpresaDetailResponse as Nt, VerificarAutorizacionQuery as O, CreateServiceClientRequest as On, updateSubscriptionRequestSchema as Or, updateProductoRequestSchema as Ot, interEmpresaPermissionSchema as P, RotateServiceClientSecretResponse as Pn, SessionListResponse as Pr, EmpresaEstadoResponse as Pt, RenameGrupoRequest as Q, setServiceClientGrantResponseSchema as Qn, GetCodeResponse as Qr, createEmpresaRequestSchema as Qt, setProductoPermisosAutorizablesRequestSchema as R, SetServiceClientGrantResponse as Rn, ContractedCompany as Rr, EmpresaResponse as Rt, CreateAutorizacionRequest as S, INTERNAL_HEADERS as Si, ServiceTokenError as Sn, republishPendingResponseSchema as Sr, ProductoResponse as St, ListAutorizacionesResponse as T, WEBHOOK_HEADERS as Ti, serviceTokenErrorSchema as Tn, subscriptionResponseSchema as Tr, listProductosResponseSchema as Tt, DirectorioResponse as U, getServiceClientResponseSchema as Un, companyGroupSchema as Ur, ReassignTitularResponse as Ut, DirectorioEmpresa as V, createServiceClientRequestSchema as Vn, UncontractedCompany as Vr, ListEmpresasResponse as Vt, directorioEmpresaSchema as W, listServiceClientGrantsResponseSchema as Wn, companyListResponseSchema as Wr, RemoveEmpresaMemberRequest as Wt, GrupoResponse as X, serviceClientSlugSchema as Xn, updateUserRequestSchema as Xr, UpdateSucursalRequest as Xt, Grupo as Y, serviceClientPublicSchema as Yn, uncontractedCompanySchema as Yr, UpdateEmpresaRequest as Yt, RemoveGrupoEmpresaRequest as Z, setServiceClientGrantRequestSchema as Zn, GetCodeRequest as Zr, addEmpresaMemberRequestSchema as Zt, serviceClientDelegationSchema as _, ACTIVITY_STATES as _i, sucursalSchema as _n, createSubscriptionRequestSchema as _r, tokenExchangeRequestSchema as _t, empresaBranchEventPayloadSchema as a, loginRequestSchema as ai, empresaRecortadaResponseSchema as an, CreateSubscriptionRequest as ar, Contratacion as at, Autorizacion as b, ERROR_CODES as bi, updateEmpresaRequestSchema as bn, deliverySchema as br, ListProductosResponse as bt, empresaMemberRoleChangedPayloadSchema as c, setActiveEmpresaRequestSchema as ci, listEmpresasQuerySchema as cn, DeliveryListResponse as cr, SetContratacionRequest as ct, grupoMemberEventPayloadSchema as d, MessageWithCountResponse as di, reassignTitularResponseSchema as dn, RotateSubscriptionSecretResponse as dr, contratadoResponseSchema as dt, LoginResponse as ei, deactivateSucursalRequestSchema as en, updateServiceClientResponseSchema as er, createGrupoRequestSchema as et, ListServiceClientDelegationsResponse as f, messageResponseSchema as fi, removeEmpresaMemberRequestSchema as fn, Subscription as fr, setContratacionRequestSchema as ft, listServiceClientDelegationsResponseSchema as g, ACCOUNT_STATES as gi, sucursalResponseSchema as gn, UpdateSubscriptionRequest as gr, tokenExchangeErrorSchema as gt, SetServiceClientDelegationResponse as h, errorResponseSchema as hi, sucursalRecortadaSchema as hn, SubscriptionWithSecretResponse as hr, TokenExchangeResponse as ht, autorizacionEventPayloadSchema as i, getCodeResponseSchema as ii, empresaPerfilSchema as in, maintenanceCleanupResponseSchema as ir, renameGrupoRequestSchema as it, autorizacionSchema as j, ListServiceClientGrantsResponse as jn, usersBatchRequestSchema as jr, CreateSucursalRequest as jt, VerificarAutorizacionResponse as k, CreateServiceClientResponse as kn, UsersBatchRequest as kr, AddEmpresaMemberRequest as kt, empresaProductChangedPayloadSchema as l, setActiveEmpresaResponseSchema as li, listEmpresasResponseSchema as ln, RepublishPendingQuery as lr, contratacionResponseSchema as lt, SetServiceClientDelegationRequest as m, ErrorResponse as mi, subjectTokenSchema as mn, SubscriptionResponse as mr, TokenExchangeRequest as mt, EmpresaProductChangedPayload as n, SetActiveEmpresaResponse as ni, empresaEstadoResponseSchema as nn, MaintenanceCleanupResponse as nr, grupoSchema as nt, empresaEventPayloadSchema as o, loginResponseSchema as oi, empresaResponseSchema as on, DeliveriesQuery as or, ContratacionResponse as ot, ServiceClientDelegation as p, messageWithCountResponseSchema as pi, subjectTokenRequestSchema as pn, SubscriptionListResponse as pr, TokenExchangeError as pt, AddGrupoEmpresaRequest as q, rotateServiceClientSecretResponseSchema as qn, profileResponseSchema as qr, SucursalResponse as qt, IDENTITY_EVENT_PAYLOAD_SCHEMAS as r, getCodeRequestSchema as ri, empresaMemberResponseSchema as rn, maintenanceCleanupQuerySchema as rr, removeGrupoEmpresaRequestSchema as rt, empresaMemberEventPayloadSchema as s, productoSlugSchema as si, getEmpresaResponseSchema as sn, Delivery as sr, ContratadoResponse as st, AutorizacionEventPayload as t, SetActiveEmpresaRequest as ti, empresaDetailResponseSchema as tn, MaintenanceCleanupQuery as tr, grupoResponseSchema as tt, grupoEventPayloadSchema as u, MessageResponse as ui, reassignTitularRequestSchema as un, RepublishPendingResponse as ur, contratacionSchema as ut, setServiceClientDelegationRequestSchema as v, CoreErrorCode as vi, updateEmpresaMemberRequestSchema as vn, deliveriesQuerySchema as vr, tokenExchangeResponseSchema as vt, ListAutorizacionesQuery as w, USERS_BATCH_MAX_IDS as wi, ServiceTokenResponse as wn, subscriptionListResponseSchema as wr, createProductoRequestSchema as wt, AutorizacionResponse as x, HEADERS as xi, updateSucursalRequestSchema as xn, republishPendingQuerySchema as xr, Producto as xt, setServiceClientDelegationResponseSchema as y, DELIVERY_STATUSES as yi, updateEmpresaPerfilSchema as yn, deliveryListResponseSchema as yr, CreateProductoRequest as yt, verificarAutorizacionQuerySchema as z, UpdateServiceClientRequest as zn, ProfileResponse as zr, GetEmpresaResponse as zt };
1711
+ //# sourceMappingURL=index-Dold-Ycb.d.ts.map