@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,171 @@
1
+ /**
2
+ * Actions recorded in the audit log. Recording itself isn't: the payment
3
+ * keeps who recorded it, and the ledger the movement.
4
+ */
5
+ export declare const ActionPaymentVoided = "recorded_payments.PaymentVoided";
6
+ /**
7
+ * Actions recorded in the audit log. Recording itself isn't: the payment
8
+ * keeps who recorded it, and the ledger the movement.
9
+ */
10
+ export declare const ActionTerminalRegistered = "recorded_payments.TerminalRegistered";
11
+ /**
12
+ * Actions recorded in the audit log. Recording itself isn't: the payment
13
+ * keeps who recorded it, and the ledger the movement.
14
+ */
15
+ export declare const ActionTerminalRetired = "recorded_payments.TerminalRetired";
16
+ /**
17
+ * StepUpVoid is the re-authentication a void needs.
18
+ */
19
+ export declare const StepUpVoid = "recorded_payments_void";
20
+ /**
21
+ * Channels.
22
+ */
23
+ export declare const ChannelCash = "cash";
24
+ /**
25
+ * Channels.
26
+ */
27
+ export declare const ChannelPOS = "pos";
28
+ /**
29
+ * Channels.
30
+ */
31
+ export declare const ChannelBankTransfer = "bank_transfer";
32
+ /**
33
+ * Payment statuses.
34
+ */
35
+ export declare const StatusRecorded = "recorded";
36
+ /**
37
+ * Payment statuses.
38
+ */
39
+ export declare const StatusVoided = "voided";
40
+ /**
41
+ * Terminal statuses.
42
+ */
43
+ export declare const TerminalActive = "active";
44
+ /**
45
+ * Terminal statuses.
46
+ */
47
+ export declare const TerminalRetired = "retired";
48
+ export interface PaymentResponse {
49
+ id: string;
50
+ team_kind: string;
51
+ team_id: string;
52
+ channel: string;
53
+ amount: {
54
+ amount: number;
55
+ currency: string;
56
+ };
57
+ terminal_id?: string;
58
+ reference?: string;
59
+ card_last4?: string;
60
+ subject: Subject;
61
+ recorded_by: string;
62
+ status: string;
63
+ voided_by?: string;
64
+ void_reason?: string;
65
+ voided_at?: string;
66
+ created_at: string;
67
+ }
68
+ export interface TerminalResponse {
69
+ id: string;
70
+ team_kind: string;
71
+ team_id: string;
72
+ provider: string;
73
+ terminal_code: string;
74
+ serial?: string;
75
+ label?: string;
76
+ status: string;
77
+ created_at: string;
78
+ retired_at?: string;
79
+ }
80
+ /**
81
+ * RegisterTerminalRequest registers a POS terminal to a team.
82
+ */
83
+ export interface RegisterTerminalRequest {
84
+ /**
85
+ * Provider is who supplied it: "moniepoint", "opay", "palmpay", a bank.
86
+ */
87
+ provider: string;
88
+ /**
89
+ * Code is the provider's terminal ID, printed on its slips.
90
+ */
91
+ terminal_code: string;
92
+ serial: string;
93
+ label: string;
94
+ }
95
+ /**
96
+ * SummaryResponse totals recorded (not voided) payments.
97
+ */
98
+ export interface SummaryResponse {
99
+ by_channel: ChannelTotal[];
100
+ by_terminal: TerminalTotal[];
101
+ }
102
+ export interface ChannelTotal {
103
+ channel: string;
104
+ count: number;
105
+ total: {
106
+ amount: number;
107
+ currency: string;
108
+ };
109
+ }
110
+ export interface TerminalTotal {
111
+ terminal_id: string;
112
+ count: number;
113
+ total: {
114
+ amount: number;
115
+ currency: string;
116
+ };
117
+ }
118
+ /**
119
+ * Team permissions, checked in the team (AuthorizeIn): a store's roles
120
+ * decide who records, reads, voids and manages terminals.
121
+ */
122
+ export declare const PermissionRecord: string;
123
+ /**
124
+ * Team permissions, checked in the team (AuthorizeIn): a store's roles
125
+ * decide who records, reads, voids and manages terminals.
126
+ */
127
+ export declare const PermissionRead: string;
128
+ /**
129
+ * Team permissions, checked in the team (AuthorizeIn): a store's roles
130
+ * decide who records, reads, voids and manages terminals.
131
+ */
132
+ export declare const PermissionVoid: string;
133
+ /**
134
+ * Team permissions, checked in the team (AuthorizeIn): a store's roles
135
+ * decide who records, reads, voids and manages terminals.
136
+ */
137
+ export declare const PermissionTerminals: string;
138
+ export type Service = unknown;
139
+ /**
140
+ * RecordRequest is one payment a team took.
141
+ */
142
+ export interface RecordRequest {
143
+ channel: string;
144
+ amount: {
145
+ amount: number;
146
+ currency: string;
147
+ };
148
+ /**
149
+ * Terminal is the POS terminal it was taken on (pos only).
150
+ */
151
+ terminal_id?: string;
152
+ /**
153
+ * Reference is the slip's RRN (pos) or the transfer's reference.
154
+ */
155
+ reference: string;
156
+ card_last4: string;
157
+ /**
158
+ * Subject is what it pays for: "order" and its ID.
159
+ */
160
+ subject: Subject;
161
+ }
162
+ /**
163
+ * Subject is what a payment is for.
164
+ */
165
+ export interface Subject {
166
+ type: string;
167
+ id: string;
168
+ }
169
+ export declare const SettingCash: string;
170
+ export declare const SettingPOS: string;
171
+ export declare const SettingBankTransfer: string;
@@ -0,0 +1,79 @@
1
+ // Code generated by tygo. DO NOT EDIT.
2
+ //////////
3
+ // source: actions.go
4
+ /**
5
+ * Actions recorded in the audit log. Recording itself isn't: the payment
6
+ * keeps who recorded it, and the ledger the movement.
7
+ */
8
+ export const ActionPaymentVoided = "recorded_payments.PaymentVoided";
9
+ /**
10
+ * Actions recorded in the audit log. Recording itself isn't: the payment
11
+ * keeps who recorded it, and the ledger the movement.
12
+ */
13
+ export const ActionTerminalRegistered = "recorded_payments.TerminalRegistered";
14
+ /**
15
+ * Actions recorded in the audit log. Recording itself isn't: the payment
16
+ * keeps who recorded it, and the ledger the movement.
17
+ */
18
+ export const ActionTerminalRetired = "recorded_payments.TerminalRetired";
19
+ /**
20
+ * StepUpVoid is the re-authentication a void needs.
21
+ */
22
+ export const StepUpVoid = "recorded_payments_void";
23
+ //////////
24
+ // source: dto.go
25
+ /**
26
+ * Channels.
27
+ */
28
+ export const ChannelCash = "cash";
29
+ /**
30
+ * Channels.
31
+ */
32
+ export const ChannelPOS = "pos";
33
+ /**
34
+ * Channels.
35
+ */
36
+ export const ChannelBankTransfer = "bank_transfer";
37
+ /**
38
+ * Payment statuses.
39
+ */
40
+ export const StatusRecorded = "recorded";
41
+ /**
42
+ * Payment statuses.
43
+ */
44
+ export const StatusVoided = "voided";
45
+ /**
46
+ * Terminal statuses.
47
+ */
48
+ export const TerminalActive = "active";
49
+ /**
50
+ * Terminal statuses.
51
+ */
52
+ export const TerminalRetired = "retired";
53
+ //////////
54
+ // source: permissions.go
55
+ /**
56
+ * Team permissions, checked in the team (AuthorizeIn): a store's roles
57
+ * decide who records, reads, voids and manages terminals.
58
+ */
59
+ export const PermissionRecord = "recorded_payments.record";
60
+ /**
61
+ * Team permissions, checked in the team (AuthorizeIn): a store's roles
62
+ * decide who records, reads, voids and manages terminals.
63
+ */
64
+ export const PermissionRead = "recorded_payments.read";
65
+ /**
66
+ * Team permissions, checked in the team (AuthorizeIn): a store's roles
67
+ * decide who records, reads, voids and manages terminals.
68
+ */
69
+ export const PermissionVoid = "recorded_payments.void";
70
+ /**
71
+ * Team permissions, checked in the team (AuthorizeIn): a store's roles
72
+ * decide who records, reads, voids and manages terminals.
73
+ */
74
+ export const PermissionTerminals = "recorded_payments.terminals";
75
+ //////////
76
+ // source: settings.go
77
+ export const SettingCash = "recorded_payments.cash";
78
+ export const SettingPOS = "recorded_payments.pos";
79
+ export const SettingBankTransfer = "recorded_payments.bank_transfer";
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Actions recorded in the audit log (section 42.1). Sign-in and sign-out
3
+ * are recorded by auth.
4
+ */
5
+ export declare const ActionSessionSignedOut = "sessions.SessionSignedOut";
6
+ /**
7
+ * Actions recorded in the audit log (section 42.1). Sign-in and sign-out
8
+ * are recorded by auth.
9
+ */
10
+ export declare const ActionOtherSessionsSignedOut = "sessions.OtherSessionsSignedOut";
11
+ /**
12
+ * SessionResponse is one sign-in. Device fields come from the X-Device-*
13
+ * headers the app sent when signing in (empty for a browser, which has
14
+ * UserAgent instead). Current marks the session making the request.
15
+ */
16
+ export interface SessionResponse {
17
+ id: string;
18
+ current: boolean;
19
+ methods: string[];
20
+ device_name: string;
21
+ device_type: string;
22
+ app_version: string;
23
+ user_agent: string;
24
+ first_ip: string;
25
+ last_ip: string;
26
+ created_at: string;
27
+ last_seen_at: string;
28
+ expires_at: string;
29
+ }
30
+ export interface ListResponse {
31
+ sessions: SessionResponse[];
32
+ }
33
+ /**
34
+ * ActionManageSessions is the re-authentication action for signing out a
35
+ * session: without it, someone holding a stolen session could sign the
36
+ * owner out.
37
+ */
38
+ export declare const ActionManageSessions = "manage_sessions";
39
+ /**
40
+ * Stable error codes for this module (section 42.5: <module>.<error>).
41
+ */
42
+ export declare const ErrCodeNotFound = "sessions.not_found";
43
+ /**
44
+ * Stable error codes for this module (section 42.5: <module>.<error>).
45
+ */
46
+ export declare const ErrCodeUnauthenticated = "sessions.unauthenticated";
47
+ /**
48
+ * Permissions this module guards (section 25.1: one source of truth). By
49
+ * convention "<domain>.write" acts on the caller's own resources and
50
+ * "<domain>.manage" on anyone's.
51
+ */
52
+ export declare const PermissionSessionRead: string;
53
+ /**
54
+ * Permissions this module guards (section 25.1: one source of truth). By
55
+ * convention "<domain>.write" acts on the caller's own resources and
56
+ * "<domain>.manage" on anyone's.
57
+ */
58
+ export declare const PermissionSessionWrite: string;
59
+ /**
60
+ * PermissionReadUserSessions lets an admin list another user's sessions
61
+ * (docs/user-admin.md): they show IP addresses.
62
+ */
63
+ export declare const PermissionReadUserSessions: string;
64
+ export type Service = unknown;
@@ -0,0 +1,48 @@
1
+ // Code generated by tygo. DO NOT EDIT.
2
+ //////////
3
+ // source: actions.go
4
+ /**
5
+ * Actions recorded in the audit log (section 42.1). Sign-in and sign-out
6
+ * are recorded by auth.
7
+ */
8
+ export const ActionSessionSignedOut = "sessions.SessionSignedOut";
9
+ /**
10
+ * Actions recorded in the audit log (section 42.1). Sign-in and sign-out
11
+ * are recorded by auth.
12
+ */
13
+ export const ActionOtherSessionsSignedOut = "sessions.OtherSessionsSignedOut";
14
+ /**
15
+ * ActionManageSessions is the re-authentication action for signing out a
16
+ * session: without it, someone holding a stolen session could sign the
17
+ * owner out.
18
+ */
19
+ export const ActionManageSessions = "manage_sessions";
20
+ //////////
21
+ // source: errors.go
22
+ /**
23
+ * Stable error codes for this module (section 42.5: <module>.<error>).
24
+ */
25
+ export const ErrCodeNotFound = "sessions.not_found";
26
+ /**
27
+ * Stable error codes for this module (section 42.5: <module>.<error>).
28
+ */
29
+ export const ErrCodeUnauthenticated = "sessions.unauthenticated";
30
+ //////////
31
+ // source: permissions.go
32
+ /**
33
+ * Permissions this module guards (section 25.1: one source of truth). By
34
+ * convention "<domain>.write" acts on the caller's own resources and
35
+ * "<domain>.manage" on anyone's.
36
+ */
37
+ export const PermissionSessionRead = "sessions.read";
38
+ /**
39
+ * Permissions this module guards (section 25.1: one source of truth). By
40
+ * convention "<domain>.write" acts on the caller's own resources and
41
+ * "<domain>.manage" on anyone's.
42
+ */
43
+ export const PermissionSessionWrite = "sessions.write";
44
+ /**
45
+ * PermissionReadUserSessions lets an admin list another user's sessions
46
+ * (docs/user-admin.md): they show IP addresses.
47
+ */
48
+ export const PermissionReadUserSessions = "users.read_sessions";
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Actions recorded in the audit log (section 42.1).
3
+ */
4
+ export declare const ActionSettingChanged = "settings.SettingChanged";
5
+ /**
6
+ * StepUpSecret is the re-authentication action a change to a Secret
7
+ * setting needs (a payment gateway's key): whoever changes it can redirect
8
+ * the money.
9
+ */
10
+ export declare const StepUpSecret = "manage_secret_settings";
11
+ /**
12
+ * SettingResponse is a setting as the running application sees it: the
13
+ * value is the one modules read from the in-memory snapshot, and the rest
14
+ * comes from the owning module's manifest.
15
+ */
16
+ export interface SettingResponse {
17
+ key: string;
18
+ value: string;
19
+ group: string;
20
+ description: string;
21
+ type: string;
22
+ schema: {
23
+ [key: string]: unknown;
24
+ };
25
+ is_editable: boolean;
26
+ /**
27
+ * IsMessage marks a message setting: its value is a message template
28
+ * ({"email": {"subject", "text", "html"}, "sms"}), and POST
29
+ * /v1/settings/{key}/preview renders a draft of it.
30
+ */
31
+ is_message: boolean;
32
+ }
33
+ /**
34
+ * SettingGroupResponse is one group of settings on the admin panel's
35
+ * settings page: the settings whose keys start with Name and a dot, with
36
+ * the title and description the owning module gives them.
37
+ */
38
+ export interface SettingGroupResponse {
39
+ name: string;
40
+ title: string;
41
+ description: string;
42
+ /**
43
+ * Count is how many settings the group holds.
44
+ */
45
+ count: number;
46
+ }
47
+ /**
48
+ * PreviewResponse is a draft message rendered with sample data, one item
49
+ * per way it goes out. Problem is why saving it would be refused (a
50
+ * template that does not parse, an SMS without the code), or empty.
51
+ */
52
+ export interface PreviewResponse {
53
+ rendered: RenderedMessage[];
54
+ problem: string;
55
+ }
56
+ /**
57
+ * RenderedMessage is one way a message goes out: an email's parts, or an
58
+ * SMS body.
59
+ */
60
+ export interface RenderedMessage {
61
+ name: string;
62
+ subject?: string;
63
+ text?: string;
64
+ html?: string;
65
+ sms?: string;
66
+ }
67
+ /**
68
+ * UpdateSettingRequest replaces a setting's value. The value must have the
69
+ * setting's type: a JSON number for "number", true or false for "boolean",
70
+ * a string for "string", and an array or object for "json".
71
+ */
72
+ export interface UpdateSettingRequest {
73
+ value: unknown;
74
+ }
75
+ /**
76
+ * TestSMSRequest sends a test SMS through the gateway the settings name.
77
+ */
78
+ export interface TestSMSRequest {
79
+ phone: string;
80
+ }
81
+ /**
82
+ * TestMailRequest sends a test email through the mail settings.
83
+ */
84
+ export interface TestMailRequest {
85
+ email: string;
86
+ }
87
+ export interface TestResponse {
88
+ sent: boolean;
89
+ }
90
+ /**
91
+ * Setting lookup error codes
92
+ */
93
+ export declare const ErrCodeNotFound = "settings.not_found";
94
+ /**
95
+ * Stable error codes for this module (section 42.5: <module>.<error>).
96
+ * These are part of the module's public contract: once released, a code must
97
+ * not change meaning.
98
+ */
99
+ export declare const ErrCodeExists = "settings.exists";
100
+ /**
101
+ * Setting validation and constraint error codes
102
+ */
103
+ export declare const ErrCodeNotEditable = "settings.not_editable";
104
+ /**
105
+ * Stable error codes for this module (section 42.5: <module>.<error>).
106
+ * These are part of the module's public contract: once released, a code must
107
+ * not change meaning.
108
+ */
109
+ export declare const ErrCodeInvalidValue = "settings.invalid_value";
110
+ /**
111
+ * Stable error codes for this module (section 42.5: <module>.<error>).
112
+ * These are part of the module's public contract: once released, a code must
113
+ * not change meaning.
114
+ */
115
+ export declare const ErrCodeNotMessage = "settings.not_message";
116
+ /**
117
+ * Setting operation error codes
118
+ */
119
+ export declare const ErrCodeFailedToRead = "settings.read_failed";
120
+ /**
121
+ * Stable error codes for this module (section 42.5: <module>.<error>).
122
+ * These are part of the module's public contract: once released, a code must
123
+ * not change meaning.
124
+ */
125
+ export declare const ErrCodeInternal = "settings.internal";
126
+ /**
127
+ * RateLimitTest limits test messages: each one may cost money.
128
+ */
129
+ export declare const RateLimitTest = "settings.test";
130
+ /**
131
+ * Permissions this module guards (section 25.1: one source of truth). By
132
+ * convention "<domain>.write" acts on the caller's own resources and
133
+ * "<domain>.manage" on anyone's.
134
+ */
135
+ export declare const PermissionSettingRead: string;
136
+ /**
137
+ * Permissions this module guards (section 25.1: one source of truth). By
138
+ * convention "<domain>.write" acts on the caller's own resources and
139
+ * "<domain>.manage" on anyone's.
140
+ */
141
+ export declare const PermissionSettingManage: string;
142
+ /**
143
+ * Service is the settings administration API. Modules that only need values
144
+ * read them from the settings.Reader in modular.Deps instead, which never
145
+ * touches the database.
146
+ */
147
+ export type Service = unknown;
@@ -0,0 +1,69 @@
1
+ // Code generated by tygo. DO NOT EDIT.
2
+ //////////
3
+ // source: actions.go
4
+ /**
5
+ * Actions recorded in the audit log (section 42.1).
6
+ */
7
+ export const ActionSettingChanged = "settings.SettingChanged";
8
+ /**
9
+ * StepUpSecret is the re-authentication action a change to a Secret
10
+ * setting needs (a payment gateway's key): whoever changes it can redirect
11
+ * the money.
12
+ */
13
+ export const StepUpSecret = "manage_secret_settings";
14
+ //////////
15
+ // source: errors.go
16
+ /**
17
+ * Setting lookup error codes
18
+ */
19
+ export const ErrCodeNotFound = "settings.not_found";
20
+ /**
21
+ * Stable error codes for this module (section 42.5: <module>.<error>).
22
+ * These are part of the module's public contract: once released, a code must
23
+ * not change meaning.
24
+ */
25
+ export const ErrCodeExists = "settings.exists";
26
+ /**
27
+ * Setting validation and constraint error codes
28
+ */
29
+ export const ErrCodeNotEditable = "settings.not_editable";
30
+ /**
31
+ * Stable error codes for this module (section 42.5: <module>.<error>).
32
+ * These are part of the module's public contract: once released, a code must
33
+ * not change meaning.
34
+ */
35
+ export const ErrCodeInvalidValue = "settings.invalid_value";
36
+ /**
37
+ * Stable error codes for this module (section 42.5: <module>.<error>).
38
+ * These are part of the module's public contract: once released, a code must
39
+ * not change meaning.
40
+ */
41
+ export const ErrCodeNotMessage = "settings.not_message";
42
+ /**
43
+ * Setting operation error codes
44
+ */
45
+ export const ErrCodeFailedToRead = "settings.read_failed";
46
+ /**
47
+ * Stable error codes for this module (section 42.5: <module>.<error>).
48
+ * These are part of the module's public contract: once released, a code must
49
+ * not change meaning.
50
+ */
51
+ export const ErrCodeInternal = "settings.internal";
52
+ /**
53
+ * RateLimitTest limits test messages: each one may cost money.
54
+ */
55
+ export const RateLimitTest = "settings.test";
56
+ //////////
57
+ // source: permissions.go
58
+ /**
59
+ * Permissions this module guards (section 25.1: one source of truth). By
60
+ * convention "<domain>.write" acts on the caller's own resources and
61
+ * "<domain>.manage" on anyone's.
62
+ */
63
+ export const PermissionSettingRead = "settings.read";
64
+ /**
65
+ * Permissions this module guards (section 25.1: one source of truth). By
66
+ * convention "<domain>.write" acts on the caller's own resources and
67
+ * "<domain>.manage" on anyone's.
68
+ */
69
+ export const PermissionSettingManage = "settings.manage";