@structured-id/ui-core 0.1.5
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.
- package/LICENSE +661 -0
- package/README.md +47 -0
- package/dist/browser-vp/index.cjs +349 -0
- package/dist/browser-vp/index.d.cts +287 -0
- package/dist/browser-vp/index.d.ts +287 -0
- package/dist/browser-vp/index.js +349 -0
- package/dist/chunk-C3Q766CY.cjs +125 -0
- package/dist/chunk-J5YXRXB5.js +125 -0
- package/dist/index.cjs +19360 -0
- package/dist/index.d.cts +9536 -0
- package/dist/index.d.ts +9536 -0
- package/dist/index.js +19360 -0
- package/dist/storage-4CB2JTLW.cjs +22 -0
- package/dist/storage-THRWREZP.js +22 -0
- package/package.json +93 -0
- package/src/browser-vp/crypto.ts +254 -0
- package/src/browser-vp/index.test.ts +10 -0
- package/src/browser-vp/index.ts +118 -0
- package/src/browser-vp/prf.ts +181 -0
- package/src/browser-vp/storage.test.ts +9 -0
- package/src/browser-vp/storage.ts +165 -0
- package/src/browser-vp/types.ts +97 -0
- package/src/browser-vp/vp.test.ts +43 -0
- package/src/browser-vp/vp.ts +113 -0
- package/src/components/SidAvatar.vue +106 -0
- package/src/components/SidConfirmDialog.vue +125 -0
- package/src/components/SidStatusBadge.vue +71 -0
- package/src/components/index.ts +5 -0
- package/src/composables/index.ts +10 -0
- package/src/composables/useAuth.ts +40 -0
- package/src/composables/useBffAuth.ts +147 -0
- package/src/composables/useGrpc.test.ts +196 -0
- package/src/composables/useGrpc.ts +120 -0
- package/src/composables/useSession.ts +80 -0
- package/src/generated/google/api/http.ts +687 -0
- package/src/generated/google/protobuf/descriptor.ts +4865 -0
- package/src/generated/google/protobuf/duration.ts +230 -0
- package/src/generated/google/protobuf/empty.ts +94 -0
- package/src/generated/google/protobuf/struct.ts +484 -0
- package/src/generated/google/protobuf/timestamp.ts +287 -0
- package/src/generated/sid/v1/account/account.client.ts +527 -0
- package/src/generated/sid/v1/account/account.ts +3261 -0
- package/src/generated/sid/v1/admin/admin.client.ts +136 -0
- package/src/generated/sid/v1/admin/admin.ts +846 -0
- package/src/generated/sid/v1/admin/admin_roles.client.ts +181 -0
- package/src/generated/sid/v1/admin/admin_roles.ts +1606 -0
- package/src/generated/sid/v1/admin/analytics.client.ts +106 -0
- package/src/generated/sid/v1/admin/analytics.ts +1017 -0
- package/src/generated/sid/v1/admin/branding.client.ts +166 -0
- package/src/generated/sid/v1/admin/branding.ts +1906 -0
- package/src/generated/sid/v1/admin/enrollment.client.ts +165 -0
- package/src/generated/sid/v1/admin/enrollment.ts +1704 -0
- package/src/generated/sid/v1/admin/events.client.ts +195 -0
- package/src/generated/sid/v1/admin/events.ts +1900 -0
- package/src/generated/sid/v1/admin/flow.client.ts +183 -0
- package/src/generated/sid/v1/admin/flow.ts +1552 -0
- package/src/generated/sid/v1/admin/keys.client.ts +107 -0
- package/src/generated/sid/v1/admin/keys.ts +931 -0
- package/src/generated/sid/v1/admin/login_experience.client.ts +160 -0
- package/src/generated/sid/v1/admin/login_experience.ts +1061 -0
- package/src/generated/sid/v1/admin/migration.client.ts +127 -0
- package/src/generated/sid/v1/admin/migration.ts +1948 -0
- package/src/generated/sid/v1/admin/notifications.client.ts +128 -0
- package/src/generated/sid/v1/admin/notifications.ts +1332 -0
- package/src/generated/sid/v1/admin/operations.client.ts +241 -0
- package/src/generated/sid/v1/admin/operations.ts +2648 -0
- package/src/generated/sid/v1/admin/organizations.client.ts +57 -0
- package/src/generated/sid/v1/admin/organizations.ts +349 -0
- package/src/generated/sid/v1/admin/scopes.client.ts +171 -0
- package/src/generated/sid/v1/admin/scopes.ts +1324 -0
- package/src/generated/sid/v1/admin/security.client.ts +412 -0
- package/src/generated/sid/v1/admin/security.ts +4086 -0
- package/src/generated/sid/v1/admin/sessions.client.ts +114 -0
- package/src/generated/sid/v1/admin/sessions.ts +923 -0
- package/src/generated/sid/v1/admin/settings.client.ts +340 -0
- package/src/generated/sid/v1/admin/settings.ts +2395 -0
- package/src/generated/sid/v1/admin/user_profile.client.ts +57 -0
- package/src/generated/sid/v1/admin/user_profile.ts +730 -0
- package/src/generated/sid/v1/admin/webhooks.client.ts +269 -0
- package/src/generated/sid/v1/admin/webhooks.ts +2804 -0
- package/src/generated/sid/v1/attestation/attestation.client.ts +115 -0
- package/src/generated/sid/v1/attestation/attestation.ts +813 -0
- package/src/generated/sid/v1/authn/auth.client.ts +900 -0
- package/src/generated/sid/v1/authn/auth.ts +9287 -0
- package/src/generated/sid/v1/authn/flows.client.ts +413 -0
- package/src/generated/sid/v1/authn/flows.ts +3217 -0
- package/src/generated/sid/v1/authz/authz.client.ts +459 -0
- package/src/generated/sid/v1/authz/authz.ts +5343 -0
- package/src/generated/sid/v1/authz/governance.client.ts +102 -0
- package/src/generated/sid/v1/authz/governance.ts +818 -0
- package/src/generated/sid/v1/common/errors.ts +184 -0
- package/src/generated/sid/v1/common/pagination.ts +152 -0
- package/src/generated/sid/v1/common/transport.ts +227 -0
- package/src/generated/sid/v1/common/types.ts +151 -0
- package/src/generated/sid/v1/events/event_stream.client.ts +67 -0
- package/src/generated/sid/v1/events/event_stream.ts +374 -0
- package/src/generated/sid/v1/federation/upstream.client.ts +142 -0
- package/src/generated/sid/v1/federation/upstream.ts +1736 -0
- package/src/generated/sid/v1/identity/identity.client.ts +467 -0
- package/src/generated/sid/v1/identity/identity.ts +5613 -0
- package/src/generated/sid/v1/machine/machine_user.client.ts +219 -0
- package/src/generated/sid/v1/machine/machine_user.ts +2400 -0
- package/src/generated/sid/v1/machine/pat.client.ts +147 -0
- package/src/generated/sid/v1/machine/pat.ts +1268 -0
- package/src/generated/sid/v1/projects/projects.client.ts +286 -0
- package/src/generated/sid/v1/projects/projects.ts +2714 -0
- package/src/generated/sid/v1/scim/scim.client.ts +274 -0
- package/src/generated/sid/v1/scim/scim.ts +3043 -0
- package/src/generated/sid/v1/test/test.client.ts +232 -0
- package/src/generated/sid/v1/test/test.ts +1136 -0
- package/src/i18n/index.ts +40 -0
- package/src/index.ts +157 -0
- package/src/profile/auth.ts +15 -0
- package/src/profile/components/ConsentManager.vue +88 -0
- package/src/profile/components/ProfileEditor.vue +146 -0
- package/src/profile/components/SecuritySettings.vue +170 -0
- package/src/profile/components/SessionList.vue +100 -0
- package/src/profile/components/SidLoginForm.test.ts +80 -0
- package/src/profile/components/SidLoginForm.vue +230 -0
- package/src/profile/components/SidMfaChallenge.test.ts +127 -0
- package/src/profile/components/SidMfaChallenge.vue +243 -0
- package/src/profile/components/SidRegistrationForm.test.ts +79 -0
- package/src/profile/components/SidRegistrationForm.vue +317 -0
- package/src/profile/components/index.ts +11 -0
- package/src/profile/composables/index.ts +6 -0
- package/src/profile/composables/useAccountApi.ts +203 -0
- package/src/profile/composables/useAuthApi.opaque.test.ts +140 -0
- package/src/profile/composables/useAuthApi.ts +617 -0
- package/src/profile/composables/useIdentityApi.ts +123 -0
- package/src/profile/composables/useLoginSuccess.test.ts +112 -0
- package/src/profile/composables/useLoginSuccess.ts +65 -0
- package/src/profile/composables/useOpaqueAuth.test.ts +290 -0
- package/src/profile/composables/useOpaqueAuth.ts +191 -0
- package/src/profile/composables/useSecurityLevel.test.ts +198 -0
- package/src/profile/composables/useSecurityLevel.ts +324 -0
- package/src/profile/index.ts +18 -0
- package/src/quasar/SidPrincipalInput.vue +209 -0
- package/src/quasar/index.ts +8 -0
- package/src/stores/auth.test.ts +83 -0
- package/src/stores/auth.ts +92 -0
- package/src/stores/index.ts +1 -0
- package/src/transport/adaptive.test.ts +728 -0
- package/src/transport/adaptive.ts +308 -0
- package/src/transport/framing.test.ts +227 -0
- package/src/transport/framing.ts +98 -0
- package/src/transport/webtransport.test.ts +728 -0
- package/src/transport/webtransport.ts +323 -0
- package/src/types/auth.ts +58 -0
- package/src/types/index.ts +1 -0
- package/src/utils/formatters.test.ts +26 -0
- package/src/utils/formatters.ts +69 -0
- package/src/utils/index.ts +16 -0
- package/src/utils/normalizePrincipal.test.ts +188 -0
- package/src/utils/normalizePrincipal.ts +159 -0
- package/src/utils/validators.test.ts +75 -0
- package/src/utils/validators.ts +36 -0
|
@@ -0,0 +1,1332 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies
|
|
2
|
+
// @generated from protobuf file "sid/v1/admin/notifications.proto" (package "sid.v1.admin", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
9
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
10
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
+
import { Timestamp } from "../../../google/protobuf/timestamp";
|
|
15
|
+
// ── Messages ──
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Summary entry in the template catalog.
|
|
19
|
+
*
|
|
20
|
+
* @generated from protobuf message sid.v1.admin.TemplateSummary
|
|
21
|
+
*/
|
|
22
|
+
export interface TemplateSummary {
|
|
23
|
+
/**
|
|
24
|
+
* @generated from protobuf field: string template_id = 1
|
|
25
|
+
*/
|
|
26
|
+
templateId: string;
|
|
27
|
+
/**
|
|
28
|
+
* @generated from protobuf field: string name = 2
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* @generated from protobuf field: string description = 3
|
|
33
|
+
*/
|
|
34
|
+
description: string;
|
|
35
|
+
/**
|
|
36
|
+
* Which channels this template supports.
|
|
37
|
+
*
|
|
38
|
+
* @generated from protobuf field: repeated sid.v1.admin.NotificationChannel channels = 4
|
|
39
|
+
*/
|
|
40
|
+
channels: NotificationChannel[];
|
|
41
|
+
/**
|
|
42
|
+
* Event that triggers this notification.
|
|
43
|
+
*
|
|
44
|
+
* @generated from protobuf field: string trigger = 5
|
|
45
|
+
*/
|
|
46
|
+
trigger: string;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the template has been customized (non-default).
|
|
49
|
+
*
|
|
50
|
+
* @generated from protobuf field: bool customized = 6
|
|
51
|
+
*/
|
|
52
|
+
customized: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* @generated from protobuf field: google.protobuf.Timestamp updated_at = 7
|
|
55
|
+
*/
|
|
56
|
+
updatedAt?: Timestamp;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Full template with content for a specific channel + locale.
|
|
60
|
+
*
|
|
61
|
+
* @generated from protobuf message sid.v1.admin.NotificationTemplate
|
|
62
|
+
*/
|
|
63
|
+
export interface NotificationTemplate {
|
|
64
|
+
/**
|
|
65
|
+
* @generated from protobuf field: string template_id = 1
|
|
66
|
+
*/
|
|
67
|
+
templateId: string;
|
|
68
|
+
/**
|
|
69
|
+
* @generated from protobuf field: string name = 2
|
|
70
|
+
*/
|
|
71
|
+
name: string;
|
|
72
|
+
/**
|
|
73
|
+
* @generated from protobuf field: string description = 3
|
|
74
|
+
*/
|
|
75
|
+
description: string;
|
|
76
|
+
/**
|
|
77
|
+
* @generated from protobuf field: repeated sid.v1.admin.NotificationChannel channels = 4
|
|
78
|
+
*/
|
|
79
|
+
channels: NotificationChannel[];
|
|
80
|
+
/**
|
|
81
|
+
* @generated from protobuf field: string trigger = 5
|
|
82
|
+
*/
|
|
83
|
+
trigger: string;
|
|
84
|
+
/**
|
|
85
|
+
* @generated from protobuf field: bool customized = 6
|
|
86
|
+
*/
|
|
87
|
+
customized: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* @generated from protobuf field: google.protobuf.Timestamp updated_at = 7
|
|
90
|
+
*/
|
|
91
|
+
updatedAt?: Timestamp;
|
|
92
|
+
/**
|
|
93
|
+
* Content for the requested channel + locale.
|
|
94
|
+
*
|
|
95
|
+
* @generated from protobuf field: sid.v1.admin.TemplateContent content = 8
|
|
96
|
+
*/
|
|
97
|
+
content?: TemplateContent;
|
|
98
|
+
/**
|
|
99
|
+
* Available locales for this template.
|
|
100
|
+
*
|
|
101
|
+
* @generated from protobuf field: repeated string available_locales = 9
|
|
102
|
+
*/
|
|
103
|
+
availableLocales: string[];
|
|
104
|
+
/**
|
|
105
|
+
* Variables available for this template type.
|
|
106
|
+
*
|
|
107
|
+
* @generated from protobuf field: repeated sid.v1.admin.TemplateVariable variables = 10
|
|
108
|
+
*/
|
|
109
|
+
variables: TemplateVariable[];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Content varies by channel type.
|
|
113
|
+
*
|
|
114
|
+
* @generated from protobuf message sid.v1.admin.TemplateContent
|
|
115
|
+
*/
|
|
116
|
+
export interface TemplateContent {
|
|
117
|
+
/**
|
|
118
|
+
* @generated from protobuf field: sid.v1.admin.NotificationChannel channel = 1
|
|
119
|
+
*/
|
|
120
|
+
channel: NotificationChannel;
|
|
121
|
+
/**
|
|
122
|
+
* @generated from protobuf field: string locale = 2
|
|
123
|
+
*/
|
|
124
|
+
locale: string;
|
|
125
|
+
/**
|
|
126
|
+
* Email fields.
|
|
127
|
+
*
|
|
128
|
+
* @generated from protobuf field: string subject = 3
|
|
129
|
+
*/
|
|
130
|
+
subject: string;
|
|
131
|
+
/**
|
|
132
|
+
* @generated from protobuf field: string html_body = 4
|
|
133
|
+
*/
|
|
134
|
+
htmlBody: string;
|
|
135
|
+
/**
|
|
136
|
+
* @generated from protobuf field: string text_body = 5
|
|
137
|
+
*/
|
|
138
|
+
textBody: string;
|
|
139
|
+
/**
|
|
140
|
+
* SMS fields.
|
|
141
|
+
*
|
|
142
|
+
* @generated from protobuf field: string sms_body = 6
|
|
143
|
+
*/
|
|
144
|
+
smsBody: string;
|
|
145
|
+
/**
|
|
146
|
+
* Push fields.
|
|
147
|
+
*
|
|
148
|
+
* @generated from protobuf field: string push_title = 7
|
|
149
|
+
*/
|
|
150
|
+
pushTitle: string;
|
|
151
|
+
/**
|
|
152
|
+
* @generated from protobuf field: string push_body = 8
|
|
153
|
+
*/
|
|
154
|
+
pushBody: string;
|
|
155
|
+
/**
|
|
156
|
+
* @generated from protobuf field: string push_action_url = 9
|
|
157
|
+
*/
|
|
158
|
+
pushActionUrl: string;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Variable description for the template editor UI.
|
|
162
|
+
*
|
|
163
|
+
* @generated from protobuf message sid.v1.admin.TemplateVariable
|
|
164
|
+
*/
|
|
165
|
+
export interface TemplateVariable {
|
|
166
|
+
/**
|
|
167
|
+
* @generated from protobuf field: string name = 1
|
|
168
|
+
*/
|
|
169
|
+
name: string;
|
|
170
|
+
/**
|
|
171
|
+
* @generated from protobuf field: string description = 2
|
|
172
|
+
*/
|
|
173
|
+
description: string;
|
|
174
|
+
/**
|
|
175
|
+
* Example value for preview.
|
|
176
|
+
*
|
|
177
|
+
* @generated from protobuf field: string example = 3
|
|
178
|
+
*/
|
|
179
|
+
example: string;
|
|
180
|
+
}
|
|
181
|
+
// ── Requests / Responses ──
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @generated from protobuf message sid.v1.admin.ListTemplatesRequest
|
|
185
|
+
*/
|
|
186
|
+
export interface ListTemplatesRequest {
|
|
187
|
+
/**
|
|
188
|
+
* Filter by channel.
|
|
189
|
+
*
|
|
190
|
+
* @generated from protobuf field: sid.v1.admin.NotificationChannel channel = 1
|
|
191
|
+
*/
|
|
192
|
+
channel: NotificationChannel;
|
|
193
|
+
/**
|
|
194
|
+
* Filter: only customized templates.
|
|
195
|
+
*
|
|
196
|
+
* @generated from protobuf field: bool customized_only = 2
|
|
197
|
+
*/
|
|
198
|
+
customizedOnly: boolean;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @generated from protobuf message sid.v1.admin.ListTemplatesResponse
|
|
202
|
+
*/
|
|
203
|
+
export interface ListTemplatesResponse {
|
|
204
|
+
/**
|
|
205
|
+
* @generated from protobuf field: repeated sid.v1.admin.TemplateSummary templates = 1
|
|
206
|
+
*/
|
|
207
|
+
templates: TemplateSummary[];
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* @generated from protobuf message sid.v1.admin.GetTemplateRequest
|
|
211
|
+
*/
|
|
212
|
+
export interface GetTemplateRequest {
|
|
213
|
+
/**
|
|
214
|
+
* @generated from protobuf field: string template_id = 1
|
|
215
|
+
*/
|
|
216
|
+
templateId: string;
|
|
217
|
+
/**
|
|
218
|
+
* @generated from protobuf field: sid.v1.admin.NotificationChannel channel = 2
|
|
219
|
+
*/
|
|
220
|
+
channel: NotificationChannel;
|
|
221
|
+
/**
|
|
222
|
+
* @generated from protobuf field: string locale = 3
|
|
223
|
+
*/
|
|
224
|
+
locale: string;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* @generated from protobuf message sid.v1.admin.UpdateTemplateRequest
|
|
228
|
+
*/
|
|
229
|
+
export interface UpdateTemplateRequest {
|
|
230
|
+
/**
|
|
231
|
+
* @generated from protobuf field: string template_id = 1
|
|
232
|
+
*/
|
|
233
|
+
templateId: string;
|
|
234
|
+
/**
|
|
235
|
+
* @generated from protobuf field: sid.v1.admin.TemplateContent content = 2
|
|
236
|
+
*/
|
|
237
|
+
content?: TemplateContent;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* @generated from protobuf message sid.v1.admin.ResetTemplateRequest
|
|
241
|
+
*/
|
|
242
|
+
export interface ResetTemplateRequest {
|
|
243
|
+
/**
|
|
244
|
+
* @generated from protobuf field: string template_id = 1
|
|
245
|
+
*/
|
|
246
|
+
templateId: string;
|
|
247
|
+
/**
|
|
248
|
+
* @generated from protobuf field: sid.v1.admin.NotificationChannel channel = 2
|
|
249
|
+
*/
|
|
250
|
+
channel: NotificationChannel;
|
|
251
|
+
/**
|
|
252
|
+
* @generated from protobuf field: string locale = 3
|
|
253
|
+
*/
|
|
254
|
+
locale: string;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* @generated from protobuf message sid.v1.admin.PreviewTemplateRequest
|
|
258
|
+
*/
|
|
259
|
+
export interface PreviewTemplateRequest {
|
|
260
|
+
/**
|
|
261
|
+
* @generated from protobuf field: string template_id = 1
|
|
262
|
+
*/
|
|
263
|
+
templateId: string;
|
|
264
|
+
/**
|
|
265
|
+
* @generated from protobuf field: sid.v1.admin.NotificationChannel channel = 2
|
|
266
|
+
*/
|
|
267
|
+
channel: NotificationChannel;
|
|
268
|
+
/**
|
|
269
|
+
* @generated from protobuf field: string locale = 3
|
|
270
|
+
*/
|
|
271
|
+
locale: string;
|
|
272
|
+
/**
|
|
273
|
+
* Optional variable overrides (JSON key-value).
|
|
274
|
+
*
|
|
275
|
+
* @generated from protobuf field: map<string, string> sample_data = 4
|
|
276
|
+
*/
|
|
277
|
+
sampleData: {
|
|
278
|
+
[key: string]: string;
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* @generated from protobuf message sid.v1.admin.PreviewTemplateResponse
|
|
283
|
+
*/
|
|
284
|
+
export interface PreviewTemplateResponse {
|
|
285
|
+
/**
|
|
286
|
+
* Rendered subject (email only).
|
|
287
|
+
*
|
|
288
|
+
* @generated from protobuf field: string rendered_subject = 1
|
|
289
|
+
*/
|
|
290
|
+
renderedSubject: string;
|
|
291
|
+
/**
|
|
292
|
+
* Rendered body (HTML for email, plain text for SMS/push).
|
|
293
|
+
*
|
|
294
|
+
* @generated from protobuf field: string rendered_body = 2
|
|
295
|
+
*/
|
|
296
|
+
renderedBody: string;
|
|
297
|
+
/**
|
|
298
|
+
* Plain text body (email fallback).
|
|
299
|
+
*
|
|
300
|
+
* @generated from protobuf field: string rendered_text = 3
|
|
301
|
+
*/
|
|
302
|
+
renderedText: string;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* @generated from protobuf message sid.v1.admin.SendTestNotificationRequest
|
|
306
|
+
*/
|
|
307
|
+
export interface SendTestNotificationRequest {
|
|
308
|
+
/**
|
|
309
|
+
* @generated from protobuf field: string template_id = 1
|
|
310
|
+
*/
|
|
311
|
+
templateId: string;
|
|
312
|
+
/**
|
|
313
|
+
* @generated from protobuf field: sid.v1.admin.NotificationChannel channel = 2
|
|
314
|
+
*/
|
|
315
|
+
channel: NotificationChannel;
|
|
316
|
+
/**
|
|
317
|
+
* @generated from protobuf field: string locale = 3
|
|
318
|
+
*/
|
|
319
|
+
locale: string;
|
|
320
|
+
/**
|
|
321
|
+
* Recipient override (default: requesting admin's email/phone).
|
|
322
|
+
*
|
|
323
|
+
* @generated from protobuf field: string recipient = 4
|
|
324
|
+
*/
|
|
325
|
+
recipient: string;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* @generated from protobuf message sid.v1.admin.SendTestNotificationResponse
|
|
329
|
+
*/
|
|
330
|
+
export interface SendTestNotificationResponse {
|
|
331
|
+
/**
|
|
332
|
+
* @generated from protobuf field: bool success = 1
|
|
333
|
+
*/
|
|
334
|
+
success: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* @generated from protobuf field: string error = 2
|
|
337
|
+
*/
|
|
338
|
+
error: string;
|
|
339
|
+
}
|
|
340
|
+
// ── Enums ──
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* @generated from protobuf enum sid.v1.admin.NotificationChannel
|
|
344
|
+
*/
|
|
345
|
+
export enum NotificationChannel {
|
|
346
|
+
/**
|
|
347
|
+
* @generated from protobuf enum value: NOTIFICATION_CHANNEL_UNSPECIFIED = 0;
|
|
348
|
+
*/
|
|
349
|
+
UNSPECIFIED = 0,
|
|
350
|
+
/**
|
|
351
|
+
* @generated from protobuf enum value: NOTIFICATION_CHANNEL_EMAIL = 1;
|
|
352
|
+
*/
|
|
353
|
+
EMAIL = 1,
|
|
354
|
+
/**
|
|
355
|
+
* @generated from protobuf enum value: NOTIFICATION_CHANNEL_SMS = 2;
|
|
356
|
+
*/
|
|
357
|
+
SMS = 2,
|
|
358
|
+
/**
|
|
359
|
+
* @generated from protobuf enum value: NOTIFICATION_CHANNEL_PUSH = 3;
|
|
360
|
+
*/
|
|
361
|
+
PUSH = 3
|
|
362
|
+
}
|
|
363
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
364
|
+
class TemplateSummary$Type extends MessageType<TemplateSummary> {
|
|
365
|
+
constructor() {
|
|
366
|
+
super("sid.v1.admin.TemplateSummary", [
|
|
367
|
+
{ no: 1, name: "template_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
368
|
+
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
369
|
+
{ no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
370
|
+
{ no: 4, name: "channels", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["sid.v1.admin.NotificationChannel", NotificationChannel, "NOTIFICATION_CHANNEL_"] },
|
|
371
|
+
{ no: 5, name: "trigger", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
372
|
+
{ no: 6, name: "customized", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
373
|
+
{ no: 7, name: "updated_at", kind: "message", T: () => Timestamp }
|
|
374
|
+
]);
|
|
375
|
+
}
|
|
376
|
+
create(value?: PartialMessage<TemplateSummary>): TemplateSummary {
|
|
377
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
378
|
+
message.templateId = "";
|
|
379
|
+
message.name = "";
|
|
380
|
+
message.description = "";
|
|
381
|
+
message.channels = [];
|
|
382
|
+
message.trigger = "";
|
|
383
|
+
message.customized = false;
|
|
384
|
+
if (value !== undefined)
|
|
385
|
+
reflectionMergePartial<TemplateSummary>(this, message, value);
|
|
386
|
+
return message;
|
|
387
|
+
}
|
|
388
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateSummary): TemplateSummary {
|
|
389
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
390
|
+
while (reader.pos < end) {
|
|
391
|
+
let [fieldNo, wireType] = reader.tag();
|
|
392
|
+
switch (fieldNo) {
|
|
393
|
+
case /* string template_id */ 1:
|
|
394
|
+
message.templateId = reader.string();
|
|
395
|
+
break;
|
|
396
|
+
case /* string name */ 2:
|
|
397
|
+
message.name = reader.string();
|
|
398
|
+
break;
|
|
399
|
+
case /* string description */ 3:
|
|
400
|
+
message.description = reader.string();
|
|
401
|
+
break;
|
|
402
|
+
case /* repeated sid.v1.admin.NotificationChannel channels */ 4:
|
|
403
|
+
if (wireType === WireType.LengthDelimited)
|
|
404
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
405
|
+
message.channels.push(reader.int32());
|
|
406
|
+
else
|
|
407
|
+
message.channels.push(reader.int32());
|
|
408
|
+
break;
|
|
409
|
+
case /* string trigger */ 5:
|
|
410
|
+
message.trigger = reader.string();
|
|
411
|
+
break;
|
|
412
|
+
case /* bool customized */ 6:
|
|
413
|
+
message.customized = reader.bool();
|
|
414
|
+
break;
|
|
415
|
+
case /* google.protobuf.Timestamp updated_at */ 7:
|
|
416
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
417
|
+
break;
|
|
418
|
+
default:
|
|
419
|
+
let u = options.readUnknownField;
|
|
420
|
+
if (u === "throw")
|
|
421
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
422
|
+
let d = reader.skip(wireType);
|
|
423
|
+
if (u !== false)
|
|
424
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return message;
|
|
428
|
+
}
|
|
429
|
+
internalBinaryWrite(message: TemplateSummary, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
430
|
+
/* string template_id = 1; */
|
|
431
|
+
if (message.templateId !== "")
|
|
432
|
+
writer.tag(1, WireType.LengthDelimited).string(message.templateId);
|
|
433
|
+
/* string name = 2; */
|
|
434
|
+
if (message.name !== "")
|
|
435
|
+
writer.tag(2, WireType.LengthDelimited).string(message.name);
|
|
436
|
+
/* string description = 3; */
|
|
437
|
+
if (message.description !== "")
|
|
438
|
+
writer.tag(3, WireType.LengthDelimited).string(message.description);
|
|
439
|
+
/* repeated sid.v1.admin.NotificationChannel channels = 4; */
|
|
440
|
+
if (message.channels.length) {
|
|
441
|
+
writer.tag(4, WireType.LengthDelimited).fork();
|
|
442
|
+
for (let i = 0; i < message.channels.length; i++)
|
|
443
|
+
writer.int32(message.channels[i]);
|
|
444
|
+
writer.join();
|
|
445
|
+
}
|
|
446
|
+
/* string trigger = 5; */
|
|
447
|
+
if (message.trigger !== "")
|
|
448
|
+
writer.tag(5, WireType.LengthDelimited).string(message.trigger);
|
|
449
|
+
/* bool customized = 6; */
|
|
450
|
+
if (message.customized !== false)
|
|
451
|
+
writer.tag(6, WireType.Varint).bool(message.customized);
|
|
452
|
+
/* google.protobuf.Timestamp updated_at = 7; */
|
|
453
|
+
if (message.updatedAt)
|
|
454
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
455
|
+
let u = options.writeUnknownFields;
|
|
456
|
+
if (u !== false)
|
|
457
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
458
|
+
return writer;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* @generated MessageType for protobuf message sid.v1.admin.TemplateSummary
|
|
463
|
+
*/
|
|
464
|
+
export const TemplateSummary = new TemplateSummary$Type();
|
|
465
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
466
|
+
class NotificationTemplate$Type extends MessageType<NotificationTemplate> {
|
|
467
|
+
constructor() {
|
|
468
|
+
super("sid.v1.admin.NotificationTemplate", [
|
|
469
|
+
{ no: 1, name: "template_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
470
|
+
{ no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
471
|
+
{ no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
472
|
+
{ no: 4, name: "channels", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["sid.v1.admin.NotificationChannel", NotificationChannel, "NOTIFICATION_CHANNEL_"] },
|
|
473
|
+
{ no: 5, name: "trigger", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
474
|
+
{ no: 6, name: "customized", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
475
|
+
{ no: 7, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
476
|
+
{ no: 8, name: "content", kind: "message", T: () => TemplateContent },
|
|
477
|
+
{ no: 9, name: "available_locales", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
478
|
+
{ no: 10, name: "variables", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TemplateVariable }
|
|
479
|
+
]);
|
|
480
|
+
}
|
|
481
|
+
create(value?: PartialMessage<NotificationTemplate>): NotificationTemplate {
|
|
482
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
483
|
+
message.templateId = "";
|
|
484
|
+
message.name = "";
|
|
485
|
+
message.description = "";
|
|
486
|
+
message.channels = [];
|
|
487
|
+
message.trigger = "";
|
|
488
|
+
message.customized = false;
|
|
489
|
+
message.availableLocales = [];
|
|
490
|
+
message.variables = [];
|
|
491
|
+
if (value !== undefined)
|
|
492
|
+
reflectionMergePartial<NotificationTemplate>(this, message, value);
|
|
493
|
+
return message;
|
|
494
|
+
}
|
|
495
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NotificationTemplate): NotificationTemplate {
|
|
496
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
497
|
+
while (reader.pos < end) {
|
|
498
|
+
let [fieldNo, wireType] = reader.tag();
|
|
499
|
+
switch (fieldNo) {
|
|
500
|
+
case /* string template_id */ 1:
|
|
501
|
+
message.templateId = reader.string();
|
|
502
|
+
break;
|
|
503
|
+
case /* string name */ 2:
|
|
504
|
+
message.name = reader.string();
|
|
505
|
+
break;
|
|
506
|
+
case /* string description */ 3:
|
|
507
|
+
message.description = reader.string();
|
|
508
|
+
break;
|
|
509
|
+
case /* repeated sid.v1.admin.NotificationChannel channels */ 4:
|
|
510
|
+
if (wireType === WireType.LengthDelimited)
|
|
511
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
512
|
+
message.channels.push(reader.int32());
|
|
513
|
+
else
|
|
514
|
+
message.channels.push(reader.int32());
|
|
515
|
+
break;
|
|
516
|
+
case /* string trigger */ 5:
|
|
517
|
+
message.trigger = reader.string();
|
|
518
|
+
break;
|
|
519
|
+
case /* bool customized */ 6:
|
|
520
|
+
message.customized = reader.bool();
|
|
521
|
+
break;
|
|
522
|
+
case /* google.protobuf.Timestamp updated_at */ 7:
|
|
523
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
524
|
+
break;
|
|
525
|
+
case /* sid.v1.admin.TemplateContent content */ 8:
|
|
526
|
+
message.content = TemplateContent.internalBinaryRead(reader, reader.uint32(), options, message.content);
|
|
527
|
+
break;
|
|
528
|
+
case /* repeated string available_locales */ 9:
|
|
529
|
+
message.availableLocales.push(reader.string());
|
|
530
|
+
break;
|
|
531
|
+
case /* repeated sid.v1.admin.TemplateVariable variables */ 10:
|
|
532
|
+
message.variables.push(TemplateVariable.internalBinaryRead(reader, reader.uint32(), options));
|
|
533
|
+
break;
|
|
534
|
+
default:
|
|
535
|
+
let u = options.readUnknownField;
|
|
536
|
+
if (u === "throw")
|
|
537
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
538
|
+
let d = reader.skip(wireType);
|
|
539
|
+
if (u !== false)
|
|
540
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
return message;
|
|
544
|
+
}
|
|
545
|
+
internalBinaryWrite(message: NotificationTemplate, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
546
|
+
/* string template_id = 1; */
|
|
547
|
+
if (message.templateId !== "")
|
|
548
|
+
writer.tag(1, WireType.LengthDelimited).string(message.templateId);
|
|
549
|
+
/* string name = 2; */
|
|
550
|
+
if (message.name !== "")
|
|
551
|
+
writer.tag(2, WireType.LengthDelimited).string(message.name);
|
|
552
|
+
/* string description = 3; */
|
|
553
|
+
if (message.description !== "")
|
|
554
|
+
writer.tag(3, WireType.LengthDelimited).string(message.description);
|
|
555
|
+
/* repeated sid.v1.admin.NotificationChannel channels = 4; */
|
|
556
|
+
if (message.channels.length) {
|
|
557
|
+
writer.tag(4, WireType.LengthDelimited).fork();
|
|
558
|
+
for (let i = 0; i < message.channels.length; i++)
|
|
559
|
+
writer.int32(message.channels[i]);
|
|
560
|
+
writer.join();
|
|
561
|
+
}
|
|
562
|
+
/* string trigger = 5; */
|
|
563
|
+
if (message.trigger !== "")
|
|
564
|
+
writer.tag(5, WireType.LengthDelimited).string(message.trigger);
|
|
565
|
+
/* bool customized = 6; */
|
|
566
|
+
if (message.customized !== false)
|
|
567
|
+
writer.tag(6, WireType.Varint).bool(message.customized);
|
|
568
|
+
/* google.protobuf.Timestamp updated_at = 7; */
|
|
569
|
+
if (message.updatedAt)
|
|
570
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
571
|
+
/* sid.v1.admin.TemplateContent content = 8; */
|
|
572
|
+
if (message.content)
|
|
573
|
+
TemplateContent.internalBinaryWrite(message.content, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
574
|
+
/* repeated string available_locales = 9; */
|
|
575
|
+
for (let i = 0; i < message.availableLocales.length; i++)
|
|
576
|
+
writer.tag(9, WireType.LengthDelimited).string(message.availableLocales[i]);
|
|
577
|
+
/* repeated sid.v1.admin.TemplateVariable variables = 10; */
|
|
578
|
+
for (let i = 0; i < message.variables.length; i++)
|
|
579
|
+
TemplateVariable.internalBinaryWrite(message.variables[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
580
|
+
let u = options.writeUnknownFields;
|
|
581
|
+
if (u !== false)
|
|
582
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
583
|
+
return writer;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* @generated MessageType for protobuf message sid.v1.admin.NotificationTemplate
|
|
588
|
+
*/
|
|
589
|
+
export const NotificationTemplate = new NotificationTemplate$Type();
|
|
590
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
591
|
+
class TemplateContent$Type extends MessageType<TemplateContent> {
|
|
592
|
+
constructor() {
|
|
593
|
+
super("sid.v1.admin.TemplateContent", [
|
|
594
|
+
{ no: 1, name: "channel", kind: "enum", T: () => ["sid.v1.admin.NotificationChannel", NotificationChannel, "NOTIFICATION_CHANNEL_"] },
|
|
595
|
+
{ no: 2, name: "locale", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
596
|
+
{ no: 3, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
597
|
+
{ no: 4, name: "html_body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
598
|
+
{ no: 5, name: "text_body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
599
|
+
{ no: 6, name: "sms_body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
600
|
+
{ no: 7, name: "push_title", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
601
|
+
{ no: 8, name: "push_body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
602
|
+
{ no: 9, name: "push_action_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
603
|
+
]);
|
|
604
|
+
}
|
|
605
|
+
create(value?: PartialMessage<TemplateContent>): TemplateContent {
|
|
606
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
607
|
+
message.channel = 0;
|
|
608
|
+
message.locale = "";
|
|
609
|
+
message.subject = "";
|
|
610
|
+
message.htmlBody = "";
|
|
611
|
+
message.textBody = "";
|
|
612
|
+
message.smsBody = "";
|
|
613
|
+
message.pushTitle = "";
|
|
614
|
+
message.pushBody = "";
|
|
615
|
+
message.pushActionUrl = "";
|
|
616
|
+
if (value !== undefined)
|
|
617
|
+
reflectionMergePartial<TemplateContent>(this, message, value);
|
|
618
|
+
return message;
|
|
619
|
+
}
|
|
620
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateContent): TemplateContent {
|
|
621
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
622
|
+
while (reader.pos < end) {
|
|
623
|
+
let [fieldNo, wireType] = reader.tag();
|
|
624
|
+
switch (fieldNo) {
|
|
625
|
+
case /* sid.v1.admin.NotificationChannel channel */ 1:
|
|
626
|
+
message.channel = reader.int32();
|
|
627
|
+
break;
|
|
628
|
+
case /* string locale */ 2:
|
|
629
|
+
message.locale = reader.string();
|
|
630
|
+
break;
|
|
631
|
+
case /* string subject */ 3:
|
|
632
|
+
message.subject = reader.string();
|
|
633
|
+
break;
|
|
634
|
+
case /* string html_body */ 4:
|
|
635
|
+
message.htmlBody = reader.string();
|
|
636
|
+
break;
|
|
637
|
+
case /* string text_body */ 5:
|
|
638
|
+
message.textBody = reader.string();
|
|
639
|
+
break;
|
|
640
|
+
case /* string sms_body */ 6:
|
|
641
|
+
message.smsBody = reader.string();
|
|
642
|
+
break;
|
|
643
|
+
case /* string push_title */ 7:
|
|
644
|
+
message.pushTitle = reader.string();
|
|
645
|
+
break;
|
|
646
|
+
case /* string push_body */ 8:
|
|
647
|
+
message.pushBody = reader.string();
|
|
648
|
+
break;
|
|
649
|
+
case /* string push_action_url */ 9:
|
|
650
|
+
message.pushActionUrl = reader.string();
|
|
651
|
+
break;
|
|
652
|
+
default:
|
|
653
|
+
let u = options.readUnknownField;
|
|
654
|
+
if (u === "throw")
|
|
655
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
656
|
+
let d = reader.skip(wireType);
|
|
657
|
+
if (u !== false)
|
|
658
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
return message;
|
|
662
|
+
}
|
|
663
|
+
internalBinaryWrite(message: TemplateContent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
664
|
+
/* sid.v1.admin.NotificationChannel channel = 1; */
|
|
665
|
+
if (message.channel !== 0)
|
|
666
|
+
writer.tag(1, WireType.Varint).int32(message.channel);
|
|
667
|
+
/* string locale = 2; */
|
|
668
|
+
if (message.locale !== "")
|
|
669
|
+
writer.tag(2, WireType.LengthDelimited).string(message.locale);
|
|
670
|
+
/* string subject = 3; */
|
|
671
|
+
if (message.subject !== "")
|
|
672
|
+
writer.tag(3, WireType.LengthDelimited).string(message.subject);
|
|
673
|
+
/* string html_body = 4; */
|
|
674
|
+
if (message.htmlBody !== "")
|
|
675
|
+
writer.tag(4, WireType.LengthDelimited).string(message.htmlBody);
|
|
676
|
+
/* string text_body = 5; */
|
|
677
|
+
if (message.textBody !== "")
|
|
678
|
+
writer.tag(5, WireType.LengthDelimited).string(message.textBody);
|
|
679
|
+
/* string sms_body = 6; */
|
|
680
|
+
if (message.smsBody !== "")
|
|
681
|
+
writer.tag(6, WireType.LengthDelimited).string(message.smsBody);
|
|
682
|
+
/* string push_title = 7; */
|
|
683
|
+
if (message.pushTitle !== "")
|
|
684
|
+
writer.tag(7, WireType.LengthDelimited).string(message.pushTitle);
|
|
685
|
+
/* string push_body = 8; */
|
|
686
|
+
if (message.pushBody !== "")
|
|
687
|
+
writer.tag(8, WireType.LengthDelimited).string(message.pushBody);
|
|
688
|
+
/* string push_action_url = 9; */
|
|
689
|
+
if (message.pushActionUrl !== "")
|
|
690
|
+
writer.tag(9, WireType.LengthDelimited).string(message.pushActionUrl);
|
|
691
|
+
let u = options.writeUnknownFields;
|
|
692
|
+
if (u !== false)
|
|
693
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
694
|
+
return writer;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* @generated MessageType for protobuf message sid.v1.admin.TemplateContent
|
|
699
|
+
*/
|
|
700
|
+
export const TemplateContent = new TemplateContent$Type();
|
|
701
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
702
|
+
class TemplateVariable$Type extends MessageType<TemplateVariable> {
|
|
703
|
+
constructor() {
|
|
704
|
+
super("sid.v1.admin.TemplateVariable", [
|
|
705
|
+
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
706
|
+
{ no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
707
|
+
{ no: 3, name: "example", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
708
|
+
]);
|
|
709
|
+
}
|
|
710
|
+
create(value?: PartialMessage<TemplateVariable>): TemplateVariable {
|
|
711
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
712
|
+
message.name = "";
|
|
713
|
+
message.description = "";
|
|
714
|
+
message.example = "";
|
|
715
|
+
if (value !== undefined)
|
|
716
|
+
reflectionMergePartial<TemplateVariable>(this, message, value);
|
|
717
|
+
return message;
|
|
718
|
+
}
|
|
719
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TemplateVariable): TemplateVariable {
|
|
720
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
721
|
+
while (reader.pos < end) {
|
|
722
|
+
let [fieldNo, wireType] = reader.tag();
|
|
723
|
+
switch (fieldNo) {
|
|
724
|
+
case /* string name */ 1:
|
|
725
|
+
message.name = reader.string();
|
|
726
|
+
break;
|
|
727
|
+
case /* string description */ 2:
|
|
728
|
+
message.description = reader.string();
|
|
729
|
+
break;
|
|
730
|
+
case /* string example */ 3:
|
|
731
|
+
message.example = reader.string();
|
|
732
|
+
break;
|
|
733
|
+
default:
|
|
734
|
+
let u = options.readUnknownField;
|
|
735
|
+
if (u === "throw")
|
|
736
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
737
|
+
let d = reader.skip(wireType);
|
|
738
|
+
if (u !== false)
|
|
739
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
return message;
|
|
743
|
+
}
|
|
744
|
+
internalBinaryWrite(message: TemplateVariable, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
745
|
+
/* string name = 1; */
|
|
746
|
+
if (message.name !== "")
|
|
747
|
+
writer.tag(1, WireType.LengthDelimited).string(message.name);
|
|
748
|
+
/* string description = 2; */
|
|
749
|
+
if (message.description !== "")
|
|
750
|
+
writer.tag(2, WireType.LengthDelimited).string(message.description);
|
|
751
|
+
/* string example = 3; */
|
|
752
|
+
if (message.example !== "")
|
|
753
|
+
writer.tag(3, WireType.LengthDelimited).string(message.example);
|
|
754
|
+
let u = options.writeUnknownFields;
|
|
755
|
+
if (u !== false)
|
|
756
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
757
|
+
return writer;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* @generated MessageType for protobuf message sid.v1.admin.TemplateVariable
|
|
762
|
+
*/
|
|
763
|
+
export const TemplateVariable = new TemplateVariable$Type();
|
|
764
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
765
|
+
class ListTemplatesRequest$Type extends MessageType<ListTemplatesRequest> {
|
|
766
|
+
constructor() {
|
|
767
|
+
super("sid.v1.admin.ListTemplatesRequest", [
|
|
768
|
+
{ no: 1, name: "channel", kind: "enum", T: () => ["sid.v1.admin.NotificationChannel", NotificationChannel, "NOTIFICATION_CHANNEL_"] },
|
|
769
|
+
{ no: 2, name: "customized_only", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
770
|
+
]);
|
|
771
|
+
}
|
|
772
|
+
create(value?: PartialMessage<ListTemplatesRequest>): ListTemplatesRequest {
|
|
773
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
774
|
+
message.channel = 0;
|
|
775
|
+
message.customizedOnly = false;
|
|
776
|
+
if (value !== undefined)
|
|
777
|
+
reflectionMergePartial<ListTemplatesRequest>(this, message, value);
|
|
778
|
+
return message;
|
|
779
|
+
}
|
|
780
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTemplatesRequest): ListTemplatesRequest {
|
|
781
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
782
|
+
while (reader.pos < end) {
|
|
783
|
+
let [fieldNo, wireType] = reader.tag();
|
|
784
|
+
switch (fieldNo) {
|
|
785
|
+
case /* sid.v1.admin.NotificationChannel channel */ 1:
|
|
786
|
+
message.channel = reader.int32();
|
|
787
|
+
break;
|
|
788
|
+
case /* bool customized_only */ 2:
|
|
789
|
+
message.customizedOnly = reader.bool();
|
|
790
|
+
break;
|
|
791
|
+
default:
|
|
792
|
+
let u = options.readUnknownField;
|
|
793
|
+
if (u === "throw")
|
|
794
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
795
|
+
let d = reader.skip(wireType);
|
|
796
|
+
if (u !== false)
|
|
797
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
return message;
|
|
801
|
+
}
|
|
802
|
+
internalBinaryWrite(message: ListTemplatesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
803
|
+
/* sid.v1.admin.NotificationChannel channel = 1; */
|
|
804
|
+
if (message.channel !== 0)
|
|
805
|
+
writer.tag(1, WireType.Varint).int32(message.channel);
|
|
806
|
+
/* bool customized_only = 2; */
|
|
807
|
+
if (message.customizedOnly !== false)
|
|
808
|
+
writer.tag(2, WireType.Varint).bool(message.customizedOnly);
|
|
809
|
+
let u = options.writeUnknownFields;
|
|
810
|
+
if (u !== false)
|
|
811
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
812
|
+
return writer;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* @generated MessageType for protobuf message sid.v1.admin.ListTemplatesRequest
|
|
817
|
+
*/
|
|
818
|
+
export const ListTemplatesRequest = new ListTemplatesRequest$Type();
|
|
819
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
820
|
+
class ListTemplatesResponse$Type extends MessageType<ListTemplatesResponse> {
|
|
821
|
+
constructor() {
|
|
822
|
+
super("sid.v1.admin.ListTemplatesResponse", [
|
|
823
|
+
{ no: 1, name: "templates", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TemplateSummary }
|
|
824
|
+
]);
|
|
825
|
+
}
|
|
826
|
+
create(value?: PartialMessage<ListTemplatesResponse>): ListTemplatesResponse {
|
|
827
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
828
|
+
message.templates = [];
|
|
829
|
+
if (value !== undefined)
|
|
830
|
+
reflectionMergePartial<ListTemplatesResponse>(this, message, value);
|
|
831
|
+
return message;
|
|
832
|
+
}
|
|
833
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTemplatesResponse): ListTemplatesResponse {
|
|
834
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
835
|
+
while (reader.pos < end) {
|
|
836
|
+
let [fieldNo, wireType] = reader.tag();
|
|
837
|
+
switch (fieldNo) {
|
|
838
|
+
case /* repeated sid.v1.admin.TemplateSummary templates */ 1:
|
|
839
|
+
message.templates.push(TemplateSummary.internalBinaryRead(reader, reader.uint32(), options));
|
|
840
|
+
break;
|
|
841
|
+
default:
|
|
842
|
+
let u = options.readUnknownField;
|
|
843
|
+
if (u === "throw")
|
|
844
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
845
|
+
let d = reader.skip(wireType);
|
|
846
|
+
if (u !== false)
|
|
847
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
return message;
|
|
851
|
+
}
|
|
852
|
+
internalBinaryWrite(message: ListTemplatesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
853
|
+
/* repeated sid.v1.admin.TemplateSummary templates = 1; */
|
|
854
|
+
for (let i = 0; i < message.templates.length; i++)
|
|
855
|
+
TemplateSummary.internalBinaryWrite(message.templates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
856
|
+
let u = options.writeUnknownFields;
|
|
857
|
+
if (u !== false)
|
|
858
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
859
|
+
return writer;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* @generated MessageType for protobuf message sid.v1.admin.ListTemplatesResponse
|
|
864
|
+
*/
|
|
865
|
+
export const ListTemplatesResponse = new ListTemplatesResponse$Type();
|
|
866
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
867
|
+
class GetTemplateRequest$Type extends MessageType<GetTemplateRequest> {
|
|
868
|
+
constructor() {
|
|
869
|
+
super("sid.v1.admin.GetTemplateRequest", [
|
|
870
|
+
{ no: 1, name: "template_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
871
|
+
{ no: 2, name: "channel", kind: "enum", T: () => ["sid.v1.admin.NotificationChannel", NotificationChannel, "NOTIFICATION_CHANNEL_"] },
|
|
872
|
+
{ no: 3, name: "locale", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
873
|
+
]);
|
|
874
|
+
}
|
|
875
|
+
create(value?: PartialMessage<GetTemplateRequest>): GetTemplateRequest {
|
|
876
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
877
|
+
message.templateId = "";
|
|
878
|
+
message.channel = 0;
|
|
879
|
+
message.locale = "";
|
|
880
|
+
if (value !== undefined)
|
|
881
|
+
reflectionMergePartial<GetTemplateRequest>(this, message, value);
|
|
882
|
+
return message;
|
|
883
|
+
}
|
|
884
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetTemplateRequest): GetTemplateRequest {
|
|
885
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
886
|
+
while (reader.pos < end) {
|
|
887
|
+
let [fieldNo, wireType] = reader.tag();
|
|
888
|
+
switch (fieldNo) {
|
|
889
|
+
case /* string template_id */ 1:
|
|
890
|
+
message.templateId = reader.string();
|
|
891
|
+
break;
|
|
892
|
+
case /* sid.v1.admin.NotificationChannel channel */ 2:
|
|
893
|
+
message.channel = reader.int32();
|
|
894
|
+
break;
|
|
895
|
+
case /* string locale */ 3:
|
|
896
|
+
message.locale = reader.string();
|
|
897
|
+
break;
|
|
898
|
+
default:
|
|
899
|
+
let u = options.readUnknownField;
|
|
900
|
+
if (u === "throw")
|
|
901
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
902
|
+
let d = reader.skip(wireType);
|
|
903
|
+
if (u !== false)
|
|
904
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
return message;
|
|
908
|
+
}
|
|
909
|
+
internalBinaryWrite(message: GetTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
910
|
+
/* string template_id = 1; */
|
|
911
|
+
if (message.templateId !== "")
|
|
912
|
+
writer.tag(1, WireType.LengthDelimited).string(message.templateId);
|
|
913
|
+
/* sid.v1.admin.NotificationChannel channel = 2; */
|
|
914
|
+
if (message.channel !== 0)
|
|
915
|
+
writer.tag(2, WireType.Varint).int32(message.channel);
|
|
916
|
+
/* string locale = 3; */
|
|
917
|
+
if (message.locale !== "")
|
|
918
|
+
writer.tag(3, WireType.LengthDelimited).string(message.locale);
|
|
919
|
+
let u = options.writeUnknownFields;
|
|
920
|
+
if (u !== false)
|
|
921
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
922
|
+
return writer;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* @generated MessageType for protobuf message sid.v1.admin.GetTemplateRequest
|
|
927
|
+
*/
|
|
928
|
+
export const GetTemplateRequest = new GetTemplateRequest$Type();
|
|
929
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
930
|
+
class UpdateTemplateRequest$Type extends MessageType<UpdateTemplateRequest> {
|
|
931
|
+
constructor() {
|
|
932
|
+
super("sid.v1.admin.UpdateTemplateRequest", [
|
|
933
|
+
{ no: 1, name: "template_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
934
|
+
{ no: 2, name: "content", kind: "message", T: () => TemplateContent }
|
|
935
|
+
]);
|
|
936
|
+
}
|
|
937
|
+
create(value?: PartialMessage<UpdateTemplateRequest>): UpdateTemplateRequest {
|
|
938
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
939
|
+
message.templateId = "";
|
|
940
|
+
if (value !== undefined)
|
|
941
|
+
reflectionMergePartial<UpdateTemplateRequest>(this, message, value);
|
|
942
|
+
return message;
|
|
943
|
+
}
|
|
944
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateTemplateRequest): UpdateTemplateRequest {
|
|
945
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
946
|
+
while (reader.pos < end) {
|
|
947
|
+
let [fieldNo, wireType] = reader.tag();
|
|
948
|
+
switch (fieldNo) {
|
|
949
|
+
case /* string template_id */ 1:
|
|
950
|
+
message.templateId = reader.string();
|
|
951
|
+
break;
|
|
952
|
+
case /* sid.v1.admin.TemplateContent content */ 2:
|
|
953
|
+
message.content = TemplateContent.internalBinaryRead(reader, reader.uint32(), options, message.content);
|
|
954
|
+
break;
|
|
955
|
+
default:
|
|
956
|
+
let u = options.readUnknownField;
|
|
957
|
+
if (u === "throw")
|
|
958
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
959
|
+
let d = reader.skip(wireType);
|
|
960
|
+
if (u !== false)
|
|
961
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
return message;
|
|
965
|
+
}
|
|
966
|
+
internalBinaryWrite(message: UpdateTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
967
|
+
/* string template_id = 1; */
|
|
968
|
+
if (message.templateId !== "")
|
|
969
|
+
writer.tag(1, WireType.LengthDelimited).string(message.templateId);
|
|
970
|
+
/* sid.v1.admin.TemplateContent content = 2; */
|
|
971
|
+
if (message.content)
|
|
972
|
+
TemplateContent.internalBinaryWrite(message.content, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
973
|
+
let u = options.writeUnknownFields;
|
|
974
|
+
if (u !== false)
|
|
975
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
976
|
+
return writer;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* @generated MessageType for protobuf message sid.v1.admin.UpdateTemplateRequest
|
|
981
|
+
*/
|
|
982
|
+
export const UpdateTemplateRequest = new UpdateTemplateRequest$Type();
|
|
983
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
984
|
+
class ResetTemplateRequest$Type extends MessageType<ResetTemplateRequest> {
|
|
985
|
+
constructor() {
|
|
986
|
+
super("sid.v1.admin.ResetTemplateRequest", [
|
|
987
|
+
{ no: 1, name: "template_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
988
|
+
{ no: 2, name: "channel", kind: "enum", T: () => ["sid.v1.admin.NotificationChannel", NotificationChannel, "NOTIFICATION_CHANNEL_"] },
|
|
989
|
+
{ no: 3, name: "locale", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
990
|
+
]);
|
|
991
|
+
}
|
|
992
|
+
create(value?: PartialMessage<ResetTemplateRequest>): ResetTemplateRequest {
|
|
993
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
994
|
+
message.templateId = "";
|
|
995
|
+
message.channel = 0;
|
|
996
|
+
message.locale = "";
|
|
997
|
+
if (value !== undefined)
|
|
998
|
+
reflectionMergePartial<ResetTemplateRequest>(this, message, value);
|
|
999
|
+
return message;
|
|
1000
|
+
}
|
|
1001
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResetTemplateRequest): ResetTemplateRequest {
|
|
1002
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1003
|
+
while (reader.pos < end) {
|
|
1004
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1005
|
+
switch (fieldNo) {
|
|
1006
|
+
case /* string template_id */ 1:
|
|
1007
|
+
message.templateId = reader.string();
|
|
1008
|
+
break;
|
|
1009
|
+
case /* sid.v1.admin.NotificationChannel channel */ 2:
|
|
1010
|
+
message.channel = reader.int32();
|
|
1011
|
+
break;
|
|
1012
|
+
case /* string locale */ 3:
|
|
1013
|
+
message.locale = reader.string();
|
|
1014
|
+
break;
|
|
1015
|
+
default:
|
|
1016
|
+
let u = options.readUnknownField;
|
|
1017
|
+
if (u === "throw")
|
|
1018
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1019
|
+
let d = reader.skip(wireType);
|
|
1020
|
+
if (u !== false)
|
|
1021
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
return message;
|
|
1025
|
+
}
|
|
1026
|
+
internalBinaryWrite(message: ResetTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1027
|
+
/* string template_id = 1; */
|
|
1028
|
+
if (message.templateId !== "")
|
|
1029
|
+
writer.tag(1, WireType.LengthDelimited).string(message.templateId);
|
|
1030
|
+
/* sid.v1.admin.NotificationChannel channel = 2; */
|
|
1031
|
+
if (message.channel !== 0)
|
|
1032
|
+
writer.tag(2, WireType.Varint).int32(message.channel);
|
|
1033
|
+
/* string locale = 3; */
|
|
1034
|
+
if (message.locale !== "")
|
|
1035
|
+
writer.tag(3, WireType.LengthDelimited).string(message.locale);
|
|
1036
|
+
let u = options.writeUnknownFields;
|
|
1037
|
+
if (u !== false)
|
|
1038
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1039
|
+
return writer;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* @generated MessageType for protobuf message sid.v1.admin.ResetTemplateRequest
|
|
1044
|
+
*/
|
|
1045
|
+
export const ResetTemplateRequest = new ResetTemplateRequest$Type();
|
|
1046
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1047
|
+
class PreviewTemplateRequest$Type extends MessageType<PreviewTemplateRequest> {
|
|
1048
|
+
constructor() {
|
|
1049
|
+
super("sid.v1.admin.PreviewTemplateRequest", [
|
|
1050
|
+
{ no: 1, name: "template_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1051
|
+
{ no: 2, name: "channel", kind: "enum", T: () => ["sid.v1.admin.NotificationChannel", NotificationChannel, "NOTIFICATION_CHANNEL_"] },
|
|
1052
|
+
{ no: 3, name: "locale", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1053
|
+
{ no: 4, name: "sample_data", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }
|
|
1054
|
+
]);
|
|
1055
|
+
}
|
|
1056
|
+
create(value?: PartialMessage<PreviewTemplateRequest>): PreviewTemplateRequest {
|
|
1057
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1058
|
+
message.templateId = "";
|
|
1059
|
+
message.channel = 0;
|
|
1060
|
+
message.locale = "";
|
|
1061
|
+
message.sampleData = {};
|
|
1062
|
+
if (value !== undefined)
|
|
1063
|
+
reflectionMergePartial<PreviewTemplateRequest>(this, message, value);
|
|
1064
|
+
return message;
|
|
1065
|
+
}
|
|
1066
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PreviewTemplateRequest): PreviewTemplateRequest {
|
|
1067
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1068
|
+
while (reader.pos < end) {
|
|
1069
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1070
|
+
switch (fieldNo) {
|
|
1071
|
+
case /* string template_id */ 1:
|
|
1072
|
+
message.templateId = reader.string();
|
|
1073
|
+
break;
|
|
1074
|
+
case /* sid.v1.admin.NotificationChannel channel */ 2:
|
|
1075
|
+
message.channel = reader.int32();
|
|
1076
|
+
break;
|
|
1077
|
+
case /* string locale */ 3:
|
|
1078
|
+
message.locale = reader.string();
|
|
1079
|
+
break;
|
|
1080
|
+
case /* map<string, string> sample_data */ 4:
|
|
1081
|
+
this.binaryReadMap4(message.sampleData, reader, options);
|
|
1082
|
+
break;
|
|
1083
|
+
default:
|
|
1084
|
+
let u = options.readUnknownField;
|
|
1085
|
+
if (u === "throw")
|
|
1086
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1087
|
+
let d = reader.skip(wireType);
|
|
1088
|
+
if (u !== false)
|
|
1089
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
return message;
|
|
1093
|
+
}
|
|
1094
|
+
private binaryReadMap4(map: PreviewTemplateRequest["sampleData"], reader: IBinaryReader, options: BinaryReadOptions): void {
|
|
1095
|
+
let len = reader.uint32(), end = reader.pos + len, key: keyof PreviewTemplateRequest["sampleData"] | undefined, val: PreviewTemplateRequest["sampleData"][any] | undefined;
|
|
1096
|
+
while (reader.pos < end) {
|
|
1097
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1098
|
+
switch (fieldNo) {
|
|
1099
|
+
case 1:
|
|
1100
|
+
key = reader.string();
|
|
1101
|
+
break;
|
|
1102
|
+
case 2:
|
|
1103
|
+
val = reader.string();
|
|
1104
|
+
break;
|
|
1105
|
+
default: throw new globalThis.Error("unknown map entry field for sid.v1.admin.PreviewTemplateRequest.sample_data");
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
map[key ?? ""] = val ?? "";
|
|
1109
|
+
}
|
|
1110
|
+
internalBinaryWrite(message: PreviewTemplateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1111
|
+
/* string template_id = 1; */
|
|
1112
|
+
if (message.templateId !== "")
|
|
1113
|
+
writer.tag(1, WireType.LengthDelimited).string(message.templateId);
|
|
1114
|
+
/* sid.v1.admin.NotificationChannel channel = 2; */
|
|
1115
|
+
if (message.channel !== 0)
|
|
1116
|
+
writer.tag(2, WireType.Varint).int32(message.channel);
|
|
1117
|
+
/* string locale = 3; */
|
|
1118
|
+
if (message.locale !== "")
|
|
1119
|
+
writer.tag(3, WireType.LengthDelimited).string(message.locale);
|
|
1120
|
+
/* map<string, string> sample_data = 4; */
|
|
1121
|
+
for (let k of globalThis.Object.keys(message.sampleData))
|
|
1122
|
+
writer.tag(4, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.sampleData[k]).join();
|
|
1123
|
+
let u = options.writeUnknownFields;
|
|
1124
|
+
if (u !== false)
|
|
1125
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1126
|
+
return writer;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* @generated MessageType for protobuf message sid.v1.admin.PreviewTemplateRequest
|
|
1131
|
+
*/
|
|
1132
|
+
export const PreviewTemplateRequest = new PreviewTemplateRequest$Type();
|
|
1133
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1134
|
+
class PreviewTemplateResponse$Type extends MessageType<PreviewTemplateResponse> {
|
|
1135
|
+
constructor() {
|
|
1136
|
+
super("sid.v1.admin.PreviewTemplateResponse", [
|
|
1137
|
+
{ no: 1, name: "rendered_subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1138
|
+
{ no: 2, name: "rendered_body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1139
|
+
{ no: 3, name: "rendered_text", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1140
|
+
]);
|
|
1141
|
+
}
|
|
1142
|
+
create(value?: PartialMessage<PreviewTemplateResponse>): PreviewTemplateResponse {
|
|
1143
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1144
|
+
message.renderedSubject = "";
|
|
1145
|
+
message.renderedBody = "";
|
|
1146
|
+
message.renderedText = "";
|
|
1147
|
+
if (value !== undefined)
|
|
1148
|
+
reflectionMergePartial<PreviewTemplateResponse>(this, message, value);
|
|
1149
|
+
return message;
|
|
1150
|
+
}
|
|
1151
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PreviewTemplateResponse): PreviewTemplateResponse {
|
|
1152
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1153
|
+
while (reader.pos < end) {
|
|
1154
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1155
|
+
switch (fieldNo) {
|
|
1156
|
+
case /* string rendered_subject */ 1:
|
|
1157
|
+
message.renderedSubject = reader.string();
|
|
1158
|
+
break;
|
|
1159
|
+
case /* string rendered_body */ 2:
|
|
1160
|
+
message.renderedBody = reader.string();
|
|
1161
|
+
break;
|
|
1162
|
+
case /* string rendered_text */ 3:
|
|
1163
|
+
message.renderedText = reader.string();
|
|
1164
|
+
break;
|
|
1165
|
+
default:
|
|
1166
|
+
let u = options.readUnknownField;
|
|
1167
|
+
if (u === "throw")
|
|
1168
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1169
|
+
let d = reader.skip(wireType);
|
|
1170
|
+
if (u !== false)
|
|
1171
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
return message;
|
|
1175
|
+
}
|
|
1176
|
+
internalBinaryWrite(message: PreviewTemplateResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1177
|
+
/* string rendered_subject = 1; */
|
|
1178
|
+
if (message.renderedSubject !== "")
|
|
1179
|
+
writer.tag(1, WireType.LengthDelimited).string(message.renderedSubject);
|
|
1180
|
+
/* string rendered_body = 2; */
|
|
1181
|
+
if (message.renderedBody !== "")
|
|
1182
|
+
writer.tag(2, WireType.LengthDelimited).string(message.renderedBody);
|
|
1183
|
+
/* string rendered_text = 3; */
|
|
1184
|
+
if (message.renderedText !== "")
|
|
1185
|
+
writer.tag(3, WireType.LengthDelimited).string(message.renderedText);
|
|
1186
|
+
let u = options.writeUnknownFields;
|
|
1187
|
+
if (u !== false)
|
|
1188
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1189
|
+
return writer;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
/**
|
|
1193
|
+
* @generated MessageType for protobuf message sid.v1.admin.PreviewTemplateResponse
|
|
1194
|
+
*/
|
|
1195
|
+
export const PreviewTemplateResponse = new PreviewTemplateResponse$Type();
|
|
1196
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1197
|
+
class SendTestNotificationRequest$Type extends MessageType<SendTestNotificationRequest> {
|
|
1198
|
+
constructor() {
|
|
1199
|
+
super("sid.v1.admin.SendTestNotificationRequest", [
|
|
1200
|
+
{ no: 1, name: "template_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1201
|
+
{ no: 2, name: "channel", kind: "enum", T: () => ["sid.v1.admin.NotificationChannel", NotificationChannel, "NOTIFICATION_CHANNEL_"] },
|
|
1202
|
+
{ no: 3, name: "locale", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1203
|
+
{ no: 4, name: "recipient", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1204
|
+
]);
|
|
1205
|
+
}
|
|
1206
|
+
create(value?: PartialMessage<SendTestNotificationRequest>): SendTestNotificationRequest {
|
|
1207
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1208
|
+
message.templateId = "";
|
|
1209
|
+
message.channel = 0;
|
|
1210
|
+
message.locale = "";
|
|
1211
|
+
message.recipient = "";
|
|
1212
|
+
if (value !== undefined)
|
|
1213
|
+
reflectionMergePartial<SendTestNotificationRequest>(this, message, value);
|
|
1214
|
+
return message;
|
|
1215
|
+
}
|
|
1216
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendTestNotificationRequest): SendTestNotificationRequest {
|
|
1217
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1218
|
+
while (reader.pos < end) {
|
|
1219
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1220
|
+
switch (fieldNo) {
|
|
1221
|
+
case /* string template_id */ 1:
|
|
1222
|
+
message.templateId = reader.string();
|
|
1223
|
+
break;
|
|
1224
|
+
case /* sid.v1.admin.NotificationChannel channel */ 2:
|
|
1225
|
+
message.channel = reader.int32();
|
|
1226
|
+
break;
|
|
1227
|
+
case /* string locale */ 3:
|
|
1228
|
+
message.locale = reader.string();
|
|
1229
|
+
break;
|
|
1230
|
+
case /* string recipient */ 4:
|
|
1231
|
+
message.recipient = reader.string();
|
|
1232
|
+
break;
|
|
1233
|
+
default:
|
|
1234
|
+
let u = options.readUnknownField;
|
|
1235
|
+
if (u === "throw")
|
|
1236
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1237
|
+
let d = reader.skip(wireType);
|
|
1238
|
+
if (u !== false)
|
|
1239
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
return message;
|
|
1243
|
+
}
|
|
1244
|
+
internalBinaryWrite(message: SendTestNotificationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1245
|
+
/* string template_id = 1; */
|
|
1246
|
+
if (message.templateId !== "")
|
|
1247
|
+
writer.tag(1, WireType.LengthDelimited).string(message.templateId);
|
|
1248
|
+
/* sid.v1.admin.NotificationChannel channel = 2; */
|
|
1249
|
+
if (message.channel !== 0)
|
|
1250
|
+
writer.tag(2, WireType.Varint).int32(message.channel);
|
|
1251
|
+
/* string locale = 3; */
|
|
1252
|
+
if (message.locale !== "")
|
|
1253
|
+
writer.tag(3, WireType.LengthDelimited).string(message.locale);
|
|
1254
|
+
/* string recipient = 4; */
|
|
1255
|
+
if (message.recipient !== "")
|
|
1256
|
+
writer.tag(4, WireType.LengthDelimited).string(message.recipient);
|
|
1257
|
+
let u = options.writeUnknownFields;
|
|
1258
|
+
if (u !== false)
|
|
1259
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1260
|
+
return writer;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
/**
|
|
1264
|
+
* @generated MessageType for protobuf message sid.v1.admin.SendTestNotificationRequest
|
|
1265
|
+
*/
|
|
1266
|
+
export const SendTestNotificationRequest = new SendTestNotificationRequest$Type();
|
|
1267
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1268
|
+
class SendTestNotificationResponse$Type extends MessageType<SendTestNotificationResponse> {
|
|
1269
|
+
constructor() {
|
|
1270
|
+
super("sid.v1.admin.SendTestNotificationResponse", [
|
|
1271
|
+
{ no: 1, name: "success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1272
|
+
{ no: 2, name: "error", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1273
|
+
]);
|
|
1274
|
+
}
|
|
1275
|
+
create(value?: PartialMessage<SendTestNotificationResponse>): SendTestNotificationResponse {
|
|
1276
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1277
|
+
message.success = false;
|
|
1278
|
+
message.error = "";
|
|
1279
|
+
if (value !== undefined)
|
|
1280
|
+
reflectionMergePartial<SendTestNotificationResponse>(this, message, value);
|
|
1281
|
+
return message;
|
|
1282
|
+
}
|
|
1283
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendTestNotificationResponse): SendTestNotificationResponse {
|
|
1284
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1285
|
+
while (reader.pos < end) {
|
|
1286
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1287
|
+
switch (fieldNo) {
|
|
1288
|
+
case /* bool success */ 1:
|
|
1289
|
+
message.success = reader.bool();
|
|
1290
|
+
break;
|
|
1291
|
+
case /* string error */ 2:
|
|
1292
|
+
message.error = reader.string();
|
|
1293
|
+
break;
|
|
1294
|
+
default:
|
|
1295
|
+
let u = options.readUnknownField;
|
|
1296
|
+
if (u === "throw")
|
|
1297
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1298
|
+
let d = reader.skip(wireType);
|
|
1299
|
+
if (u !== false)
|
|
1300
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
return message;
|
|
1304
|
+
}
|
|
1305
|
+
internalBinaryWrite(message: SendTestNotificationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1306
|
+
/* bool success = 1; */
|
|
1307
|
+
if (message.success !== false)
|
|
1308
|
+
writer.tag(1, WireType.Varint).bool(message.success);
|
|
1309
|
+
/* string error = 2; */
|
|
1310
|
+
if (message.error !== "")
|
|
1311
|
+
writer.tag(2, WireType.LengthDelimited).string(message.error);
|
|
1312
|
+
let u = options.writeUnknownFields;
|
|
1313
|
+
if (u !== false)
|
|
1314
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1315
|
+
return writer;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* @generated MessageType for protobuf message sid.v1.admin.SendTestNotificationResponse
|
|
1320
|
+
*/
|
|
1321
|
+
export const SendTestNotificationResponse = new SendTestNotificationResponse$Type();
|
|
1322
|
+
/**
|
|
1323
|
+
* @generated ServiceType for protobuf service sid.v1.admin.NotificationTemplateService
|
|
1324
|
+
*/
|
|
1325
|
+
export const NotificationTemplateService = new ServiceType("sid.v1.admin.NotificationTemplateService", [
|
|
1326
|
+
{ name: "ListTemplates", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/admin/notification-templates" } }, I: ListTemplatesRequest, O: ListTemplatesResponse },
|
|
1327
|
+
{ name: "GetTemplate", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/admin/notification-templates/{template_id}" } }, I: GetTemplateRequest, O: NotificationTemplate },
|
|
1328
|
+
{ name: "UpdateTemplate", options: { "google.api.http": { patch: "/v1/admin/notification-templates/{template_id}", body: "*" } }, I: UpdateTemplateRequest, O: NotificationTemplate },
|
|
1329
|
+
{ name: "ResetTemplate", options: { "google.api.http": { post: "/v1/admin/notification-templates/{template_id}/reset", body: "*" } }, I: ResetTemplateRequest, O: NotificationTemplate },
|
|
1330
|
+
{ name: "PreviewTemplate", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { post: "/v1/admin/notification-templates/{template_id}/preview", body: "*" } }, I: PreviewTemplateRequest, O: PreviewTemplateResponse },
|
|
1331
|
+
{ name: "SendTestNotification", options: { "google.api.http": { post: "/v1/admin/notification-templates/{template_id}/test", body: "*" } }, I: SendTestNotificationRequest, O: SendTestNotificationResponse }
|
|
1332
|
+
]);
|