@colveor/admin 0.0.0-stage → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/LICENSE.md +106 -0
  2. package/README.md +365 -2
  3. package/TAILWINDADMIN-LICENSE +21 -0
  4. package/dist/account/data.d.ts +1 -0
  5. package/dist/account/data.js +44 -0
  6. package/dist/account/profile.d.ts +6 -0
  7. package/dist/account/profile.js +118 -0
  8. package/dist/account/sessions.d.ts +1 -0
  9. package/dist/account/sessions.js +26 -0
  10. package/dist/account/shared.d.ts +26 -0
  11. package/dist/account/shared.js +44 -0
  12. package/dist/account/two-factor.d.ts +5 -0
  13. package/dist/account/two-factor.js +60 -0
  14. package/dist/actions.d.ts +39 -0
  15. package/dist/actions.js +81 -0
  16. package/dist/api/audit.gen.d.ts +80 -0
  17. package/dist/api/audit.gen.js +43 -0
  18. package/dist/api/auth.gen.d.ts +537 -0
  19. package/dist/api/auth.gen.js +313 -0
  20. package/dist/api/errors.gen.d.ts +16 -0
  21. package/dist/api/errors.gen.js +2 -0
  22. package/dist/api/gormx.gen.d.ts +60 -0
  23. package/dist/api/gormx.gen.js +16 -0
  24. package/dist/api/health.gen.d.ts +103 -0
  25. package/dist/api/health.gen.js +23 -0
  26. package/dist/api/index.gen.d.ts +21 -0
  27. package/dist/api/index.gen.js +22 -0
  28. package/dist/api/invitations.gen.d.ts +128 -0
  29. package/dist/api/invitations.gen.js +57 -0
  30. package/dist/api/ledger.gen.d.ts +269 -0
  31. package/dist/api/ledger.gen.js +113 -0
  32. package/dist/api/msgtemplate.gen.d.ts +31 -0
  33. package/dist/api/msgtemplate.gen.js +2 -0
  34. package/dist/api/notifications.gen.d.ts +66 -0
  35. package/dist/api/notifications.gen.js +28 -0
  36. package/dist/api/outbox.gen.d.ts +8 -0
  37. package/dist/api/outbox.gen.js +2 -0
  38. package/dist/api/queue.gen.d.ts +112 -0
  39. package/dist/api/queue.gen.js +15 -0
  40. package/dist/api/rbac.gen.d.ts +406 -0
  41. package/dist/api/rbac.gen.js +191 -0
  42. package/dist/api/reauth.gen.d.ts +289 -0
  43. package/dist/api/reauth.gen.js +122 -0
  44. package/dist/api/recorded_payments.gen.d.ts +171 -0
  45. package/dist/api/recorded_payments.gen.js +79 -0
  46. package/dist/api/sessions.gen.d.ts +64 -0
  47. package/dist/api/sessions.gen.js +48 -0
  48. package/dist/api/settings.gen.d.ts +147 -0
  49. package/dist/api/settings.gen.js +69 -0
  50. package/dist/api/storage.gen.d.ts +327 -0
  51. package/dist/api/storage.gen.js +208 -0
  52. package/dist/api/support_access.gen.d.ts +155 -0
  53. package/dist/api/support_access.gen.js +131 -0
  54. package/dist/api/users.gen.d.ts +407 -0
  55. package/dist/api/users.gen.js +159 -0
  56. package/dist/api/verification.gen.d.ts +427 -0
  57. package/dist/api/verification.gen.js +280 -0
  58. package/dist/api/webhooks.gen.d.ts +110 -0
  59. package/dist/api/webhooks.gen.js +45 -0
  60. package/dist/auth-layout.d.ts +9 -0
  61. package/dist/auth-layout.js +5 -0
  62. package/dist/banner.d.ts +1 -0
  63. package/dist/banner.js +49 -0
  64. package/dist/client.d.ts +41 -0
  65. package/dist/client.js +72 -0
  66. package/dist/config.d.ts +27 -0
  67. package/dist/config.js +82 -0
  68. package/dist/dates.d.ts +4 -0
  69. package/dist/dates.js +16 -0
  70. package/dist/header.d.ts +12 -0
  71. package/dist/header.js +105 -0
  72. package/dist/icons.d.ts +2 -0
  73. package/dist/icons.js +15 -0
  74. package/dist/index.d.ts +28 -0
  75. package/dist/index.js +42 -0
  76. package/dist/kit/avatar.d.ts +5 -0
  77. package/dist/kit/avatar.js +16 -0
  78. package/dist/kit/badge.d.ts +10 -0
  79. package/dist/kit/badge.js +31 -0
  80. package/dist/kit/card.d.ts +12 -0
  81. package/dist/kit/card.js +7 -0
  82. package/dist/kit/code-area.d.ts +15 -0
  83. package/dist/kit/code-area.js +69 -0
  84. package/dist/kit/dropdown.d.ts +26 -0
  85. package/dist/kit/dropdown.js +67 -0
  86. package/dist/kit/filter-tabs.d.ts +9 -0
  87. package/dist/kit/filter-tabs.js +7 -0
  88. package/dist/kit/modal.d.ts +8 -0
  89. package/dist/kit/modal.js +15 -0
  90. package/dist/kit/page-header.d.ts +13 -0
  91. package/dist/kit/page-header.js +13 -0
  92. package/dist/kit/search.d.ts +4 -0
  93. package/dist/kit/search.js +16 -0
  94. package/dist/kit/tooltip.d.ts +17 -0
  95. package/dist/kit/tooltip.js +52 -0
  96. package/dist/message-editor.d.ts +9 -0
  97. package/dist/message-editor.js +80 -0
  98. package/dist/money.d.ts +10 -0
  99. package/dist/money.js +17 -0
  100. package/dist/next.d.ts +6 -0
  101. package/dist/next.js +19 -0
  102. package/dist/pages/account.d.ts +1 -0
  103. package/dist/pages/account.js +47 -0
  104. package/dist/pages/audit.d.ts +1 -0
  105. package/dist/pages/audit.js +88 -0
  106. package/dist/pages/forgot-password.d.ts +1 -0
  107. package/dist/pages/forgot-password.js +73 -0
  108. package/dist/pages/ledger.d.ts +1 -0
  109. package/dist/pages/ledger.js +132 -0
  110. package/dist/pages/roles.d.ts +1 -0
  111. package/dist/pages/roles.js +102 -0
  112. package/dist/pages/settings.d.ts +1 -0
  113. package/dist/pages/settings.js +86 -0
  114. package/dist/pages/sign-in.d.ts +5 -0
  115. package/dist/pages/sign-in.js +117 -0
  116. package/dist/pages/status.d.ts +1 -0
  117. package/dist/pages/status.js +122 -0
  118. package/dist/pages/support.d.ts +1 -0
  119. package/dist/pages/support.js +90 -0
  120. package/dist/pages/teams.d.ts +1 -0
  121. package/dist/pages/teams.js +94 -0
  122. package/dist/pages/users.d.ts +1 -0
  123. package/dist/pages/users.js +158 -0
  124. package/dist/pages/webhooks.d.ts +1 -0
  125. package/dist/pages/webhooks.js +88 -0
  126. package/dist/permissions.d.ts +5 -0
  127. package/dist/permissions.js +31 -0
  128. package/dist/proof.d.ts +10 -0
  129. package/dist/proof.js +78 -0
  130. package/dist/proxy.d.ts +10 -0
  131. package/dist/proxy.js +166 -0
  132. package/dist/retry.d.ts +8 -0
  133. package/dist/retry.js +30 -0
  134. package/dist/router.d.ts +13 -0
  135. package/dist/router.js +14 -0
  136. package/dist/setting-fields.d.ts +12 -0
  137. package/dist/setting-fields.js +102 -0
  138. package/dist/setting-list.d.ts +22 -0
  139. package/dist/setting-list.js +78 -0
  140. package/dist/shell.d.ts +40 -0
  141. package/dist/shell.js +97 -0
  142. package/dist/support.d.ts +37 -0
  143. package/dist/support.js +76 -0
  144. package/dist/table.d.ts +40 -0
  145. package/dist/table.js +73 -0
  146. package/dist/ui.d.ts +39 -0
  147. package/dist/ui.js +56 -0
  148. package/dist/user-actions.d.ts +30 -0
  149. package/dist/user-actions.js +129 -0
  150. package/dist/user-roles.d.ts +4 -0
  151. package/dist/user-roles.js +51 -0
  152. package/dist/user-row-menu.d.ts +14 -0
  153. package/dist/user-row-menu.js +45 -0
  154. package/dist/version.d.ts +1 -0
  155. package/dist/version.js +3 -0
  156. package/package.json +63 -4
@@ -0,0 +1,131 @@
1
+ // Code generated by tygo. DO NOT EDIT.
2
+ //////////
3
+ // source: actions.go
4
+ /**
5
+ * Actions recorded in the audit log (section 42.1), with the change, in its
6
+ * transaction. The target is the team; the grant's ID is in metadata.
7
+ */
8
+ export const ActionGrantRequested = "support.GrantRequested";
9
+ /**
10
+ * Actions recorded in the audit log (section 42.1), with the change, in its
11
+ * transaction. The target is the team; the grant's ID is in metadata.
12
+ */
13
+ export const ActionGrantApproved = "support.GrantApproved";
14
+ /**
15
+ * Actions recorded in the audit log (section 42.1), with the change, in its
16
+ * transaction. The target is the team; the grant's ID is in metadata.
17
+ */
18
+ export const ActionGrantDenied = "support.GrantDenied";
19
+ /**
20
+ * Actions recorded in the audit log (section 42.1), with the change, in its
21
+ * transaction. The target is the team; the grant's ID is in metadata.
22
+ */
23
+ export const ActionGrantRevoked = "support.GrantRevoked";
24
+ /**
25
+ * Actions recorded in the audit log (section 42.1), with the change, in its
26
+ * transaction. The target is the team; the grant's ID is in metadata.
27
+ */
28
+ export const ActionGrantEnded = "support.GrantEnded";
29
+ //////////
30
+ // source: dto.go
31
+ /**
32
+ * Grant statuses (docs/support-access.md). A grant past its ends_at is
33
+ * shown as StatusExpired; it is stored as active.
34
+ */
35
+ export const StatusPending = "pending";
36
+ /**
37
+ * Grant statuses (docs/support-access.md). A grant past its ends_at is
38
+ * shown as StatusExpired; it is stored as active.
39
+ */
40
+ export const StatusActive = "active";
41
+ /**
42
+ * Grant statuses (docs/support-access.md). A grant past its ends_at is
43
+ * shown as StatusExpired; it is stored as active.
44
+ */
45
+ export const StatusDenied = "denied";
46
+ /**
47
+ * Grant statuses (docs/support-access.md). A grant past its ends_at is
48
+ * shown as StatusExpired; it is stored as active.
49
+ */
50
+ export const StatusRevoked = "revoked";
51
+ /**
52
+ * Grant statuses (docs/support-access.md). A grant past its ends_at is
53
+ * shown as StatusExpired; it is stored as active.
54
+ */
55
+ export const StatusEnded = "ended";
56
+ /**
57
+ * Grant statuses (docs/support-access.md). A grant past its ends_at is
58
+ * shown as StatusExpired; it is stored as active.
59
+ */
60
+ export const StatusExpired = "expired";
61
+ //////////
62
+ // source: errors.go
63
+ /**
64
+ * Stable error codes for this module (section 42.5: <module>.<error>).
65
+ * These are part of the module's public contract: once released, a code must
66
+ * not change meaning.
67
+ */
68
+ export const ErrCodeNotFound = "support.not_found";
69
+ /**
70
+ * Stable error codes for this module (section 42.5: <module>.<error>).
71
+ * These are part of the module's public contract: once released, a code must
72
+ * not change meaning.
73
+ */
74
+ export const ErrCodeGrantOpen = "support.grant_open";
75
+ /**
76
+ * Stable error codes for this module (section 42.5: <module>.<error>).
77
+ * These are part of the module's public contract: once released, a code must
78
+ * not change meaning.
79
+ */
80
+ export const ErrCodeSelfApproval = "support.self_approval";
81
+ /**
82
+ * Stable error codes for this module (section 42.5: <module>.<error>).
83
+ * These are part of the module's public contract: once released, a code must
84
+ * not change meaning.
85
+ */
86
+ export const ErrCodeNotPending = "support.not_pending";
87
+ /**
88
+ * Stable error codes for this module (section 42.5: <module>.<error>).
89
+ * These are part of the module's public contract: once released, a code must
90
+ * not change meaning.
91
+ */
92
+ export const ErrCodeNotOpen = "support.not_open";
93
+ /**
94
+ * Stable error codes for this module (section 42.5: <module>.<error>).
95
+ * These are part of the module's public contract: once released, a code must
96
+ * not change meaning.
97
+ */
98
+ export const ErrCodeInvalidEnd = "support.invalid_end";
99
+ /**
100
+ * Stable error codes for this module (section 42.5: <module>.<error>).
101
+ * These are part of the module's public contract: once released, a code must
102
+ * not change meaning.
103
+ */
104
+ export const ErrCodeInvalidFilter = "support.invalid_filter";
105
+ //////////
106
+ // source: permissions.go
107
+ /**
108
+ * PermissionRequest lets a platform admin ask a team for access.
109
+ */
110
+ export const PermissionRequest = "support.request";
111
+ /**
112
+ * PermissionRead lets a platform admin see every grant.
113
+ */
114
+ export const PermissionRead = "support.read";
115
+ /**
116
+ * PermissionManage is a team permission: approve, deny and revoke the
117
+ * grants on the team, and see them.
118
+ */
119
+ export const PermissionManage = "support.manage";
120
+ //////////
121
+ // source: settings.go
122
+ export const SettingApproval = "support_access.approval";
123
+ export const SettingMaxHours = "support_access.max_hours";
124
+ /**
125
+ * Approval modes (SettingApproval).
126
+ */
127
+ export const ApprovalRequired = "required";
128
+ /**
129
+ * Approval modes (SettingApproval).
130
+ */
131
+ export const ApprovalNotify = "notify";
@@ -0,0 +1,407 @@
1
+ import type * as storage from "./storage.gen";
2
+ /**
3
+ * Actions recorded in the audit log (section 42.1). Changes to sign-in
4
+ * details (email, phone, password) are recorded by auth.
5
+ */
6
+ export declare const ActionProfileUpdated = "users.ProfileUpdated";
7
+ /**
8
+ * Actions recorded in the audit log (section 42.1). Changes to sign-in
9
+ * details (email, phone, password) are recorded by auth.
10
+ */
11
+ export declare const ActionPhotoRemoved = "users.PhotoRemoved";
12
+ /**
13
+ * Deleting an account (docs/account-lifecycle.md).
14
+ */
15
+ export declare const ActionDeletionRequested = "users.DeletionRequested";
16
+ /**
17
+ * Actions recorded in the audit log (section 42.1). Changes to sign-in
18
+ * details (email, phone, password) are recorded by auth.
19
+ */
20
+ export declare const ActionDeletionCancelled = "users.DeletionCancelled";
21
+ /**
22
+ * Actions recorded in the audit log (section 42.1). Changes to sign-in
23
+ * details (email, phone, password) are recorded by auth.
24
+ */
25
+ export declare const ActionAccountDeleted = "users.AccountDeleted";
26
+ /**
27
+ * Actions recorded in the audit log (section 42.1). Changes to sign-in
28
+ * details (email, phone, password) are recorded by auth.
29
+ */
30
+ export declare const ActionAccountExported = "users.AccountExported";
31
+ /**
32
+ * DeletionResponse is the signed-in user's pending deletion.
33
+ */
34
+ export interface DeletionResponse {
35
+ requested_at: string;
36
+ /**
37
+ * DueAt is when the daily job deletes the account.
38
+ */
39
+ due_at: string;
40
+ /**
41
+ * Blocked is why it waits past DueAt, by module ("ledger": "withdraw
42
+ * the money in your wallets first"); empty when nothing blocks it.
43
+ */
44
+ blocked?: {
45
+ [key: string]: string;
46
+ };
47
+ }
48
+ export declare const SettingDeletionGraceDays: string;
49
+ /**
50
+ * The re-authentication actions (StepUp.Require).
51
+ */
52
+ export declare const StepUpDeleteAccount = "delete_account";
53
+ /**
54
+ * The re-authentication actions (StepUp.Require).
55
+ */
56
+ export declare const StepUpExportAccount = "export_account";
57
+ /**
58
+ * JobDeleteAccounts deletes the accounts whose grace period is over (daily).
59
+ */
60
+ export declare const JobDeleteAccounts = "users.delete_accounts";
61
+ /**
62
+ * RateLimitExport limits exports per user: each reads every module.
63
+ */
64
+ export declare const RateLimitExport = "users.export";
65
+ export declare const ErrCodeDeletionBlocked = "users.deletion_blocked";
66
+ export declare const ErrCodeDeletionPending = "users.deletion_pending";
67
+ export declare const ErrCodeNoDeletion = "users.no_deletion";
68
+ export type AuthMethod = string;
69
+ export type UserStatus = string;
70
+ export declare const AuthMethodPassword: AuthMethod;
71
+ export declare const AuthMethodOTP: AuthMethod;
72
+ export declare const AuthMethodOAuth: AuthMethod;
73
+ export declare const UserStatusActive: UserStatus;
74
+ export declare const UserStatusPending: UserStatus;
75
+ export declare const UserStatusInvited: UserStatus;
76
+ export declare const UserStatusRevoked: UserStatus;
77
+ export declare const UserStatusSuspended: UserStatus;
78
+ export declare const UserStatusLocked: UserStatus;
79
+ export interface User {
80
+ uid: string;
81
+ email?: string;
82
+ phone?: string;
83
+ password?: string;
84
+ country_code?: string;
85
+ /**
86
+ * AuthMethod is how the account was created. It is not updated when
87
+ * sign-in methods are added later, except that a claim (someone proving
88
+ * the address of an unverified account) sets it to otp, since the
89
+ * account is then theirs from that code. Use HasPassword, the verified
90
+ * flags and the linked identities for how the user can sign in now.
91
+ */
92
+ auth_method: AuthMethod;
93
+ /**
94
+ * HasPassword reports whether a password is set, so a client can offer
95
+ * "change password" or "set a password" (through forgot password).
96
+ */
97
+ has_password: boolean;
98
+ /**
99
+ * MFAEnabled means sign-in needs a second factor (the reauth module
100
+ * turns it on and off).
101
+ */
102
+ mfa_enabled: boolean;
103
+ status: UserStatus;
104
+ locked_until?: string;
105
+ last_login_at?: string;
106
+ /**
107
+ * CreatedAt is when the user joined. The list sorts by it:
108
+ * ?sort=created_at&dir=asc for the oldest first (newest first is the
109
+ * default).
110
+ */
111
+ created_at: string;
112
+ is_email_verified: boolean;
113
+ is_phone_verified: boolean;
114
+ /**
115
+ * ContactEmail and ContactPhone are extra contact details given at
116
+ * sign-up, which are not proven: they cannot be used to sign in, are not
117
+ * unique, and never block another account. A contact becomes the
118
+ * sign-in email or phone once its owner verifies it (PromoteContact).
119
+ */
120
+ contact_email?: string;
121
+ contact_phone?: string;
122
+ is_contact_email_verified: boolean;
123
+ is_contact_phone_verified: boolean;
124
+ details?: ProfileResponse;
125
+ profile?: CreateProfileRequest;
126
+ }
127
+ /**
128
+ * Profile fields a client may set at registration and edit carry "create"
129
+ * and "patch". The rest are set by the server only: user_id, is_verified,
130
+ * is_profile_completed, private_metadata. The photo IDs are patch only: an
131
+ * uploaded file of the users.profile_photo / users.cover_photo category,
132
+ * attached through the storage contract.
133
+ */
134
+ export interface Profile {
135
+ user_id: string;
136
+ first_name: string;
137
+ middle_name?: string;
138
+ last_name: string;
139
+ display_name?: string;
140
+ username?: string;
141
+ photo_id?: string;
142
+ photo?: storage.File;
143
+ cover_photo_id?: string;
144
+ cover_photo?: storage.File;
145
+ gender?: string;
146
+ address?: Address;
147
+ date_of_birth?: string;
148
+ skills?: string[];
149
+ occupation?: string;
150
+ website_url?: string;
151
+ language_code?: string;
152
+ timezone?: string;
153
+ is_public?: boolean;
154
+ is_verified?: boolean;
155
+ onboarding_step?: number;
156
+ is_profile_completed?: boolean;
157
+ public_metadata?: {
158
+ [key: string]: unknown;
159
+ };
160
+ private_metadata?: {
161
+ [key: string]: unknown;
162
+ };
163
+ }
164
+ export interface Address {
165
+ city?: string;
166
+ state?: string;
167
+ country?: string;
168
+ postal_code?: string;
169
+ address_line_1?: string;
170
+ address_line_2?: string;
171
+ }
172
+ /**
173
+ * User account error codes
174
+ */
175
+ export declare const ErrCodeNotFound = "users.not_found";
176
+ /**
177
+ * Stable error codes for this module (section 42.5: <module>.<error>).
178
+ * These are part of the module's public contract: once released, a code must
179
+ * not change meaning.
180
+ */
181
+ export declare const ErrCodeExists = "users.exists";
182
+ /**
183
+ * Stable error codes for this module (section 42.5: <module>.<error>).
184
+ * These are part of the module's public contract: once released, a code must
185
+ * not change meaning.
186
+ */
187
+ export declare const ErrCodeCanNotCreateUser = "users.cant_create_user";
188
+ /**
189
+ * Stable error codes for this module (section 42.5: <module>.<error>).
190
+ * These are part of the module's public contract: once released, a code must
191
+ * not change meaning.
192
+ */
193
+ export declare const ErrCodeLookupFailed = "users.lookup_failed";
194
+ /**
195
+ * Stable error codes for this module (section 42.5: <module>.<error>).
196
+ * These are part of the module's public contract: once released, a code must
197
+ * not change meaning.
198
+ */
199
+ export declare const ErrCodeSelfAction = "users.self_action";
200
+ /**
201
+ * Stable error codes for this module (section 42.5: <module>.<error>).
202
+ * These are part of the module's public contract: once released, a code must
203
+ * not change meaning.
204
+ */
205
+ export declare const ErrCodeInvalidFilter = "users.invalid_filter";
206
+ /**
207
+ * Stable error codes for this module (section 42.5: <module>.<error>).
208
+ * These are part of the module's public contract: once released, a code must
209
+ * not change meaning.
210
+ */
211
+ export declare const ErrCodeInvalidStatus = "users.invalid_status";
212
+ /**
213
+ * Profile error codes
214
+ */
215
+ export declare const ErrCodeProfileNotFound = "profile.not_found";
216
+ /**
217
+ * Stable error codes for this module (section 42.5: <module>.<error>).
218
+ * These are part of the module's public contract: once released, a code must
219
+ * not change meaning.
220
+ */
221
+ export declare const ErrCodeProfileInvalidName = "profile.invalid_name";
222
+ /**
223
+ * Stable error codes for this module (section 42.5: <module>.<error>).
224
+ * These are part of the module's public contract: once released, a code must
225
+ * not change meaning.
226
+ */
227
+ export declare const ErrCodeUsernameTaken = "profile.username_taken";
228
+ /**
229
+ * Stable error codes for this module (section 42.5: <module>.<error>).
230
+ * These are part of the module's public contract: once released, a code must
231
+ * not change meaning.
232
+ */
233
+ export declare const ErrCodeInvalidUsername = "profile.invalid_username";
234
+ /**
235
+ * Stable error codes for this module (section 42.5: <module>.<error>).
236
+ * These are part of the module's public contract: once released, a code must
237
+ * not change meaning.
238
+ */
239
+ export declare const ErrCodePhotoKind = "profile.invalid_photo_kind";
240
+ /**
241
+ * UsernameResponse answers GET /v1/usernames/{username}.
242
+ */
243
+ export interface UsernameResponse {
244
+ username: string;
245
+ available: boolean;
246
+ }
247
+ /**
248
+ * UsernameRequest is a username to check, from the path.
249
+ */
250
+ export interface UsernameRequest {
251
+ Username: string;
252
+ }
253
+ /**
254
+ * Permissions this module guards (section 25.1: one source of truth). By
255
+ * convention "<domain>.write" acts on the caller's own resources and
256
+ * "<domain>.manage" on anyone's.
257
+ */
258
+ export declare const PermissionUserRead: string;
259
+ /**
260
+ * Permissions this module guards (section 25.1: one source of truth). By
261
+ * convention "<domain>.write" acts on the caller's own resources and
262
+ * "<domain>.manage" on anyone's.
263
+ */
264
+ export declare const PermissionProfileRead: string;
265
+ /**
266
+ * Permissions this module guards (section 25.1: one source of truth). By
267
+ * convention "<domain>.write" acts on the caller's own resources and
268
+ * "<domain>.manage" on anyone's.
269
+ */
270
+ export declare const PermissionProfileWrite: string;
271
+ export interface CreateProfileRequest {
272
+ first_name: string;
273
+ middle_name?: string;
274
+ last_name: string;
275
+ display_name?: string;
276
+ username?: string;
277
+ gender?: string;
278
+ address?: Address;
279
+ date_of_birth?: string;
280
+ skills?: string[];
281
+ occupation?: string;
282
+ website_url?: string;
283
+ language_code?: string;
284
+ timezone?: string;
285
+ is_public?: boolean;
286
+ onboarding_step?: number;
287
+ public_metadata?: {
288
+ [key: string]: unknown;
289
+ };
290
+ }
291
+ export interface PatchProfileRequest {
292
+ first_name?: string;
293
+ middle_name?: string;
294
+ last_name?: string;
295
+ display_name?: string;
296
+ username?: string;
297
+ photo_id?: string;
298
+ cover_photo_id?: string;
299
+ gender?: string;
300
+ address?: Address;
301
+ date_of_birth?: string;
302
+ skills?: string[];
303
+ occupation?: string;
304
+ website_url?: string;
305
+ language_code?: string;
306
+ timezone?: string;
307
+ is_public?: boolean;
308
+ onboarding_step?: number;
309
+ public_metadata?: {
310
+ [key: string]: unknown;
311
+ };
312
+ }
313
+ export interface ProfileResponse {
314
+ user_id: string;
315
+ first_name: string;
316
+ middle_name?: string;
317
+ last_name: string;
318
+ display_name?: string;
319
+ username?: string;
320
+ photo?: storage.File;
321
+ cover_photo?: storage.File;
322
+ gender?: string;
323
+ address?: Address;
324
+ date_of_birth?: string;
325
+ skills?: string[];
326
+ occupation?: string;
327
+ website_url?: string;
328
+ language_code?: string;
329
+ timezone?: string;
330
+ is_public?: boolean;
331
+ is_verified?: boolean;
332
+ onboarding_step?: number;
333
+ is_profile_completed?: boolean;
334
+ public_metadata?: {
335
+ [key: string]: unknown;
336
+ };
337
+ private_metadata?: {
338
+ [key: string]: unknown;
339
+ };
340
+ }
341
+ /**
342
+ * RateLimitUsernameCheck limits username availability checks per IP (the
343
+ * route is public, for sign-up screens).
344
+ */
345
+ export declare const RateLimitUsernameCheck = "users.username_check";
346
+ /**
347
+ * ContactField names a contact detail an owner can prove with a code.
348
+ */
349
+ export type ContactField = string;
350
+ export declare const ContactEmail: ContactField;
351
+ export declare const ContactPhone: ContactField;
352
+ /**
353
+ * UserService manages the account lifecycle, lookup, and security.
354
+ */
355
+ export type UserService = unknown;
356
+ /**
357
+ * ProfileService manages user personal information and presentation.
358
+ */
359
+ export type ProfileService = unknown;
360
+ export interface CreateUserRequest {
361
+ email?: string;
362
+ phone?: string;
363
+ password?: string;
364
+ country_code?: string;
365
+ auth_method: AuthMethod;
366
+ is_email_verified: boolean;
367
+ is_phone_verified: boolean;
368
+ contact_email?: string;
369
+ contact_phone?: string;
370
+ profile?: CreateProfileRequest;
371
+ }
372
+ export interface PatchUserRequest {
373
+ email?: string;
374
+ phone?: string;
375
+ password?: string;
376
+ country_code?: string;
377
+ status?: UserStatus;
378
+ locked_until?: string;
379
+ is_email_verified?: boolean;
380
+ is_phone_verified?: boolean;
381
+ }
382
+ export interface ListUserQuery {
383
+ uid?: string;
384
+ email?: string;
385
+ phone?: string;
386
+ auth_method?: AuthMethod;
387
+ }
388
+ export interface UserResponse {
389
+ uid: string;
390
+ email?: string;
391
+ phone?: string;
392
+ country_code?: string;
393
+ auth_method: AuthMethod;
394
+ has_password: boolean;
395
+ mfa_enabled: boolean;
396
+ status: UserStatus;
397
+ locked_until?: string;
398
+ last_login_at?: string;
399
+ created_at: string;
400
+ is_email_verified: boolean;
401
+ is_phone_verified: boolean;
402
+ contact_email?: string;
403
+ contact_phone?: string;
404
+ is_contact_email_verified: boolean;
405
+ is_contact_phone_verified: boolean;
406
+ details?: ProfileResponse;
407
+ }
@@ -0,0 +1,159 @@
1
+ //////////
2
+ // source: actions.go
3
+ /**
4
+ * Actions recorded in the audit log (section 42.1). Changes to sign-in
5
+ * details (email, phone, password) are recorded by auth.
6
+ */
7
+ export const ActionProfileUpdated = "users.ProfileUpdated";
8
+ /**
9
+ * Actions recorded in the audit log (section 42.1). Changes to sign-in
10
+ * details (email, phone, password) are recorded by auth.
11
+ */
12
+ export const ActionPhotoRemoved = "users.PhotoRemoved";
13
+ /**
14
+ * Deleting an account (docs/account-lifecycle.md).
15
+ */
16
+ export const ActionDeletionRequested = "users.DeletionRequested";
17
+ /**
18
+ * Actions recorded in the audit log (section 42.1). Changes to sign-in
19
+ * details (email, phone, password) are recorded by auth.
20
+ */
21
+ export const ActionDeletionCancelled = "users.DeletionCancelled";
22
+ /**
23
+ * Actions recorded in the audit log (section 42.1). Changes to sign-in
24
+ * details (email, phone, password) are recorded by auth.
25
+ */
26
+ export const ActionAccountDeleted = "users.AccountDeleted";
27
+ /**
28
+ * Actions recorded in the audit log (section 42.1). Changes to sign-in
29
+ * details (email, phone, password) are recorded by auth.
30
+ */
31
+ export const ActionAccountExported = "users.AccountExported";
32
+ export const SettingDeletionGraceDays = "users.deletion_grace_days";
33
+ /**
34
+ * The re-authentication actions (StepUp.Require).
35
+ */
36
+ export const StepUpDeleteAccount = "delete_account";
37
+ /**
38
+ * The re-authentication actions (StepUp.Require).
39
+ */
40
+ export const StepUpExportAccount = "export_account";
41
+ /**
42
+ * JobDeleteAccounts deletes the accounts whose grace period is over (daily).
43
+ */
44
+ export const JobDeleteAccounts = "users.delete_accounts";
45
+ /**
46
+ * RateLimitExport limits exports per user: each reads every module.
47
+ */
48
+ export const RateLimitExport = "users.export";
49
+ export const ErrCodeDeletionBlocked = "users.deletion_blocked";
50
+ export const ErrCodeDeletionPending = "users.deletion_pending";
51
+ export const ErrCodeNoDeletion = "users.no_deletion";
52
+ export const AuthMethodPassword = "password";
53
+ export const AuthMethodOTP = "otp";
54
+ export const AuthMethodOAuth = "oauth";
55
+ export const UserStatusActive = "active";
56
+ export const UserStatusPending = "pending";
57
+ export const UserStatusInvited = "invited";
58
+ export const UserStatusRevoked = "revoked";
59
+ export const UserStatusSuspended = "suspended";
60
+ export const UserStatusLocked = "locked";
61
+ //////////
62
+ // source: errors.go
63
+ /**
64
+ * User account error codes
65
+ */
66
+ export const ErrCodeNotFound = "users.not_found";
67
+ /**
68
+ * Stable error codes for this module (section 42.5: <module>.<error>).
69
+ * These are part of the module's public contract: once released, a code must
70
+ * not change meaning.
71
+ */
72
+ export const ErrCodeExists = "users.exists";
73
+ /**
74
+ * Stable error codes for this module (section 42.5: <module>.<error>).
75
+ * These are part of the module's public contract: once released, a code must
76
+ * not change meaning.
77
+ */
78
+ export const ErrCodeCanNotCreateUser = "users.cant_create_user";
79
+ /**
80
+ * Stable error codes for this module (section 42.5: <module>.<error>).
81
+ * These are part of the module's public contract: once released, a code must
82
+ * not change meaning.
83
+ */
84
+ export const ErrCodeLookupFailed = "users.lookup_failed";
85
+ /**
86
+ * Stable error codes for this module (section 42.5: <module>.<error>).
87
+ * These are part of the module's public contract: once released, a code must
88
+ * not change meaning.
89
+ */
90
+ export const ErrCodeSelfAction = "users.self_action";
91
+ /**
92
+ * Stable error codes for this module (section 42.5: <module>.<error>).
93
+ * These are part of the module's public contract: once released, a code must
94
+ * not change meaning.
95
+ */
96
+ export const ErrCodeInvalidFilter = "users.invalid_filter";
97
+ /**
98
+ * Stable error codes for this module (section 42.5: <module>.<error>).
99
+ * These are part of the module's public contract: once released, a code must
100
+ * not change meaning.
101
+ */
102
+ export const ErrCodeInvalidStatus = "users.invalid_status";
103
+ /**
104
+ * Profile error codes
105
+ */
106
+ export const ErrCodeProfileNotFound = "profile.not_found";
107
+ /**
108
+ * Stable error codes for this module (section 42.5: <module>.<error>).
109
+ * These are part of the module's public contract: once released, a code must
110
+ * not change meaning.
111
+ */
112
+ export const ErrCodeProfileInvalidName = "profile.invalid_name";
113
+ /**
114
+ * Stable error codes for this module (section 42.5: <module>.<error>).
115
+ * These are part of the module's public contract: once released, a code must
116
+ * not change meaning.
117
+ */
118
+ export const ErrCodeUsernameTaken = "profile.username_taken";
119
+ /**
120
+ * Stable error codes for this module (section 42.5: <module>.<error>).
121
+ * These are part of the module's public contract: once released, a code must
122
+ * not change meaning.
123
+ */
124
+ export const ErrCodeInvalidUsername = "profile.invalid_username";
125
+ /**
126
+ * Stable error codes for this module (section 42.5: <module>.<error>).
127
+ * These are part of the module's public contract: once released, a code must
128
+ * not change meaning.
129
+ */
130
+ export const ErrCodePhotoKind = "profile.invalid_photo_kind";
131
+ //////////
132
+ // source: permissions.go
133
+ /**
134
+ * Permissions this module guards (section 25.1: one source of truth). By
135
+ * convention "<domain>.write" acts on the caller's own resources and
136
+ * "<domain>.manage" on anyone's.
137
+ */
138
+ export const PermissionUserRead = "users.read";
139
+ /**
140
+ * Permissions this module guards (section 25.1: one source of truth). By
141
+ * convention "<domain>.write" acts on the caller's own resources and
142
+ * "<domain>.manage" on anyone's.
143
+ */
144
+ export const PermissionProfileRead = "profile.read";
145
+ /**
146
+ * Permissions this module guards (section 25.1: one source of truth). By
147
+ * convention "<domain>.write" acts on the caller's own resources and
148
+ * "<domain>.manage" on anyone's.
149
+ */
150
+ export const PermissionProfileWrite = "profile.write";
151
+ //////////
152
+ // source: ratelimits.go
153
+ /**
154
+ * RateLimitUsernameCheck limits username availability checks per IP (the
155
+ * route is public, for sign-up screens).
156
+ */
157
+ export const RateLimitUsernameCheck = "users.username_check";
158
+ export const ContactEmail = "email";
159
+ export const ContactPhone = "phone";