@structured-id/ui-core 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/README.md +22 -10
  2. package/package.json +25 -43
  3. package/src/components/SidStatusBadge.vue +1 -5
  4. package/src/composables/useAccountTransport.test.ts +2 -1
  5. package/src/composables/useGrpc.test.ts +17 -14
  6. package/src/composables/useGrpc.ts +4 -2
  7. package/src/index.ts +2 -120
  8. package/src/profile/components/ConsentManager.vue +5 -1
  9. package/src/profile/components/ProfileEditor.vue +1 -1
  10. package/src/profile/components/SecuritySettings.vue +5 -1
  11. package/src/profile/components/SessionList.vue +2 -1
  12. package/src/profile/components/SidRegistrationForm.test.ts +173 -1
  13. package/src/profile/components/SidRegistrationForm.vue +88 -32
  14. package/src/profile/components/index.ts +1 -4
  15. package/src/profile/composables/index.ts +1 -0
  16. package/src/profile/composables/operationPlan.test.ts +155 -0
  17. package/src/profile/composables/operationPlan.ts +218 -0
  18. package/src/profile/composables/useAccountApi.ts +4 -4
  19. package/src/profile/composables/useAuth.test.ts +312 -31
  20. package/src/profile/composables/useAuth.ts +176 -30
  21. package/src/profile/composables/useAuthApi.opaque.test.ts +13 -6
  22. package/src/profile/composables/useAuthApi.ts +40 -18
  23. package/src/profile/composables/useCurrentPasswordRequirement.test.ts +196 -0
  24. package/src/profile/composables/useCurrentPasswordRequirement.ts +95 -0
  25. package/src/profile/composables/useEnrollmentApi.test.ts +7 -3
  26. package/src/profile/composables/useEnrollmentApi.ts +3 -5
  27. package/src/profile/composables/useIdentityApi.ts +4 -4
  28. package/src/profile/composables/useSecurityLevel.test.ts +1 -1
  29. package/src/profile/composables/useSecurityLevel.ts +1 -1
  30. package/src/quasar/SidPasswordCeremony.test.ts +253 -0
  31. package/src/quasar/SidPasswordCeremony.vue +456 -0
  32. package/src/quasar/index.ts +2 -0
  33. package/src/utils/rpcRefusal.test.ts +4 -4
  34. package/src/utils/rpcRefusal.ts +8 -4
  35. package/dist/browser-vp/index.cjs +0 -349
  36. package/dist/browser-vp/index.d.cts +0 -276
  37. package/dist/browser-vp/index.d.ts +0 -276
  38. package/dist/browser-vp/index.js +0 -349
  39. package/dist/chunk-C3Q766CY.cjs +0 -125
  40. package/dist/chunk-J5YXRXB5.js +0 -125
  41. package/dist/index.cjs +0 -23581
  42. package/dist/index.d.cts +0 -11539
  43. package/dist/index.d.ts +0 -11539
  44. package/dist/index.js +0 -23581
  45. package/dist/storage-4CB2JTLW.cjs +0 -22
  46. package/dist/storage-THRWREZP.js +0 -22
  47. package/src/browser-vp/crypto.ts +0 -253
  48. package/src/browser-vp/index.test.ts +0 -10
  49. package/src/browser-vp/index.ts +0 -116
  50. package/src/browser-vp/prf.ts +0 -179
  51. package/src/browser-vp/storage.test.ts +0 -9
  52. package/src/browser-vp/storage.ts +0 -163
  53. package/src/browser-vp/types.ts +0 -95
  54. package/src/browser-vp/vp.test.ts +0 -43
  55. package/src/browser-vp/vp.ts +0 -111
  56. package/src/generated/google/api/http.ts +0 -687
  57. package/src/generated/google/api/httpbody.ts +0 -159
  58. package/src/generated/google/protobuf/any.ts +0 -326
  59. package/src/generated/google/protobuf/descriptor.ts +0 -4865
  60. package/src/generated/google/protobuf/duration.ts +0 -230
  61. package/src/generated/google/protobuf/empty.ts +0 -94
  62. package/src/generated/google/protobuf/struct.ts +0 -484
  63. package/src/generated/google/protobuf/timestamp.ts +0 -287
  64. package/src/generated/google/rpc/error_details.ts +0 -1386
  65. package/src/generated/google/rpc/status.ts +0 -127
  66. package/src/generated/sid/v1/account/account.client.ts +0 -527
  67. package/src/generated/sid/v1/account/account.ts +0 -3261
  68. package/src/generated/sid/v1/admin/admin.client.ts +0 -139
  69. package/src/generated/sid/v1/admin/admin.ts +0 -781
  70. package/src/generated/sid/v1/admin/admin_roles.client.ts +0 -181
  71. package/src/generated/sid/v1/admin/admin_roles.ts +0 -1606
  72. package/src/generated/sid/v1/admin/analytics.client.ts +0 -106
  73. package/src/generated/sid/v1/admin/analytics.ts +0 -1017
  74. package/src/generated/sid/v1/admin/branding.client.ts +0 -166
  75. package/src/generated/sid/v1/admin/branding.ts +0 -1906
  76. package/src/generated/sid/v1/admin/enrollment.client.ts +0 -177
  77. package/src/generated/sid/v1/admin/enrollment.ts +0 -1766
  78. package/src/generated/sid/v1/admin/events.client.ts +0 -195
  79. package/src/generated/sid/v1/admin/events.ts +0 -1900
  80. package/src/generated/sid/v1/admin/flow.client.ts +0 -183
  81. package/src/generated/sid/v1/admin/flow.ts +0 -1552
  82. package/src/generated/sid/v1/admin/keys.client.ts +0 -107
  83. package/src/generated/sid/v1/admin/keys.ts +0 -931
  84. package/src/generated/sid/v1/admin/login_experience.client.ts +0 -160
  85. package/src/generated/sid/v1/admin/login_experience.ts +0 -1061
  86. package/src/generated/sid/v1/admin/migration.client.ts +0 -127
  87. package/src/generated/sid/v1/admin/migration.ts +0 -1948
  88. package/src/generated/sid/v1/admin/notifications.client.ts +0 -134
  89. package/src/generated/sid/v1/admin/notifications.ts +0 -1273
  90. package/src/generated/sid/v1/admin/operations.client.ts +0 -241
  91. package/src/generated/sid/v1/admin/operations.ts +0 -2633
  92. package/src/generated/sid/v1/admin/organizations.client.ts +0 -57
  93. package/src/generated/sid/v1/admin/organizations.ts +0 -332
  94. package/src/generated/sid/v1/admin/provisioning.client.ts +0 -232
  95. package/src/generated/sid/v1/admin/provisioning.ts +0 -1383
  96. package/src/generated/sid/v1/admin/scopes.client.ts +0 -171
  97. package/src/generated/sid/v1/admin/scopes.ts +0 -1324
  98. package/src/generated/sid/v1/admin/security.client.ts +0 -410
  99. package/src/generated/sid/v1/admin/security.ts +0 -4077
  100. package/src/generated/sid/v1/admin/sessions.client.ts +0 -114
  101. package/src/generated/sid/v1/admin/sessions.ts +0 -923
  102. package/src/generated/sid/v1/admin/settings.client.ts +0 -351
  103. package/src/generated/sid/v1/admin/settings.ts +0 -2458
  104. package/src/generated/sid/v1/admin/user_profile.client.ts +0 -57
  105. package/src/generated/sid/v1/admin/user_profile.ts +0 -730
  106. package/src/generated/sid/v1/admin/webhooks.client.ts +0 -269
  107. package/src/generated/sid/v1/admin/webhooks.ts +0 -2804
  108. package/src/generated/sid/v1/attestation/attestation.client.ts +0 -115
  109. package/src/generated/sid/v1/attestation/attestation.ts +0 -813
  110. package/src/generated/sid/v1/authn/auth.client.ts +0 -943
  111. package/src/generated/sid/v1/authn/auth.ts +0 -9719
  112. package/src/generated/sid/v1/authn/flows.client.ts +0 -413
  113. package/src/generated/sid/v1/authn/flows.ts +0 -3205
  114. package/src/generated/sid/v1/authn/issuer.client.ts +0 -489
  115. package/src/generated/sid/v1/authn/issuer.ts +0 -1600
  116. package/src/generated/sid/v1/authn/password_history.client.ts +0 -57
  117. package/src/generated/sid/v1/authn/password_history.ts +0 -578
  118. package/src/generated/sid/v1/authn/system_integration.client.ts +0 -73
  119. package/src/generated/sid/v1/authn/system_integration.ts +0 -218
  120. package/src/generated/sid/v1/authz/authz.client.ts +0 -459
  121. package/src/generated/sid/v1/authz/authz.ts +0 -6524
  122. package/src/generated/sid/v1/authz/forward_auth.client.ts +0 -97
  123. package/src/generated/sid/v1/authz/forward_auth.ts +0 -79
  124. package/src/generated/sid/v1/authz/governance.client.ts +0 -102
  125. package/src/generated/sid/v1/authz/governance.ts +0 -875
  126. package/src/generated/sid/v1/common/errors.ts +0 -710
  127. package/src/generated/sid/v1/common/pagination.ts +0 -152
  128. package/src/generated/sid/v1/common/transport.ts +0 -227
  129. package/src/generated/sid/v1/common/types.ts +0 -151
  130. package/src/generated/sid/v1/events/event_stream.client.ts +0 -67
  131. package/src/generated/sid/v1/events/event_stream.ts +0 -375
  132. package/src/generated/sid/v1/federation/upstream.client.ts +0 -142
  133. package/src/generated/sid/v1/federation/upstream.ts +0 -1736
  134. package/src/generated/sid/v1/identity/identity.client.ts +0 -467
  135. package/src/generated/sid/v1/identity/identity.ts +0 -5676
  136. package/src/generated/sid/v1/ids/ids.ts +0 -395
  137. package/src/generated/sid/v1/machine/machine_user.client.ts +0 -219
  138. package/src/generated/sid/v1/machine/machine_user.ts +0 -2364
  139. package/src/generated/sid/v1/machine/pat.client.ts +0 -130
  140. package/src/generated/sid/v1/machine/pat.ts +0 -1083
  141. package/src/generated/sid/v1/projects/projects.client.ts +0 -404
  142. package/src/generated/sid/v1/projects/projects.ts +0 -4446
  143. package/src/generated/sid/v1/scim/scim.client.ts +0 -520
  144. package/src/generated/sid/v1/scim/scim.ts +0 -3182
  145. package/src/generated/sid/v1/test/test.client.ts +0 -232
  146. package/src/generated/sid/v1/test/test.ts +0 -1136
  147. package/src/transport/adaptive.test.ts +0 -728
  148. package/src/transport/adaptive.ts +0 -308
  149. package/src/transport/framing.test.ts +0 -227
  150. package/src/transport/framing.ts +0 -98
  151. package/src/transport/webtransport.test.ts +0 -728
  152. package/src/transport/webtransport.ts +0 -323
@@ -1,687 +0,0 @@
1
- // @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies
2
- // @generated from protobuf file "google/api/http.proto" (package "google.api", syntax proto3)
3
- // tslint:disable
4
- //
5
- // Copyright 2026 Google LLC
6
- //
7
- // Licensed under the Apache License, Version 2.0 (the "License");
8
- // you may not use this file except in compliance with the License.
9
- // You may obtain a copy of the License at
10
- //
11
- // http://www.apache.org/licenses/LICENSE-2.0
12
- //
13
- // Unless required by applicable law or agreed to in writing, software
14
- // distributed under the License is distributed on an "AS IS" BASIS,
15
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- // See the License for the specific language governing permissions and
17
- // limitations under the License.
18
- //
19
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
20
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
21
- import { WireType } from "@protobuf-ts/runtime";
22
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
23
- import type { IBinaryReader } from "@protobuf-ts/runtime";
24
- import { UnknownFieldHandler } from "@protobuf-ts/runtime";
25
- import type { PartialMessage } from "@protobuf-ts/runtime";
26
- import { reflectionMergePartial } from "@protobuf-ts/runtime";
27
- import { MessageType } from "@protobuf-ts/runtime";
28
- /**
29
- * Defines the HTTP configuration for an API service. It contains a list of
30
- * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
31
- * to one or more HTTP REST API methods.
32
- *
33
- * @generated from protobuf message google.api.Http
34
- */
35
- export interface Http {
36
- /**
37
- * A list of HTTP configuration rules that apply to individual API methods.
38
- *
39
- * **NOTE:** All service configuration rules follow "last one wins" order.
40
- *
41
- * @generated from protobuf field: repeated google.api.HttpRule rules = 1
42
- */
43
- rules: HttpRule[];
44
- /**
45
- * When set to true, URL path parameters will be fully URI-decoded except in
46
- * cases of single segment matches in reserved expansion, where "%2F" will be
47
- * left encoded.
48
- *
49
- * The default behavior is to not decode RFC 6570 reserved characters in multi
50
- * segment matches.
51
- *
52
- * @generated from protobuf field: bool fully_decode_reserved_expansion = 2
53
- */
54
- fullyDecodeReservedExpansion: boolean;
55
- }
56
- /**
57
- * gRPC Transcoding
58
- *
59
- * gRPC Transcoding is a feature for mapping between a gRPC method and one or
60
- * more HTTP REST endpoints. It allows developers to build a single API service
61
- * that supports both gRPC APIs and REST APIs. Many systems, including [Google
62
- * APIs](https://github.com/googleapis/googleapis),
63
- * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
64
- * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
65
- * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
66
- * and use it for large scale production services.
67
- *
68
- * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
69
- * how different portions of the gRPC request message are mapped to the URL
70
- * path, URL query parameters, and HTTP request body. It also controls how the
71
- * gRPC response message is mapped to the HTTP response body. `HttpRule` is
72
- * typically specified as an `google.api.http` annotation on the gRPC method.
73
- *
74
- * Each mapping specifies a URL path template and an HTTP method. The path
75
- * template may refer to one or more fields in the gRPC request message, as long
76
- * as each field is a non-repeated field with a primitive (non-message) type.
77
- * The path template controls how fields of the request message are mapped to
78
- * the URL path.
79
- *
80
- * Example:
81
- *
82
- * service Messaging {
83
- * rpc GetMessage(GetMessageRequest) returns (Message) {
84
- * option (google.api.http) = {
85
- * get: "/v1/{name=messages/*}"
86
- * };
87
- * }
88
- * }
89
- * message GetMessageRequest {
90
- * string name = 1; // Mapped to URL path.
91
- * }
92
- * message Message {
93
- * string text = 1; // The resource content.
94
- * }
95
- *
96
- * This enables an HTTP REST to gRPC mapping as below:
97
- *
98
- * - HTTP: `GET /v1/messages/123456`
99
- * - gRPC: `GetMessage(name: "messages/123456")`
100
- *
101
- * Any fields in the request message which are not bound by the path template
102
- * automatically become HTTP query parameters if there is no HTTP request body.
103
- * For example:
104
- *
105
- * service Messaging {
106
- * rpc GetMessage(GetMessageRequest) returns (Message) {
107
- * option (google.api.http) = {
108
- * get:"/v1/messages/{message_id}"
109
- * };
110
- * }
111
- * }
112
- * message GetMessageRequest {
113
- * message SubMessage {
114
- * string subfield = 1;
115
- * }
116
- * string message_id = 1; // Mapped to URL path.
117
- * int64 revision = 2; // Mapped to URL query parameter `revision`.
118
- * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
119
- * }
120
- *
121
- * This enables a HTTP JSON to RPC mapping as below:
122
- *
123
- * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
124
- * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
125
- * SubMessage(subfield: "foo"))`
126
- *
127
- * Note that fields which are mapped to URL query parameters must have a
128
- * primitive type or a repeated primitive type or a non-repeated message type.
129
- * In the case of a repeated type, the parameter can be repeated in the URL
130
- * as `...?param=A&param=B`. In the case of a message type, each field of the
131
- * message is mapped to a separate parameter, such as
132
- * `...?foo.a=A&foo.b=B&foo.c=C`.
133
- *
134
- * For HTTP methods that allow a request body, the `body` field
135
- * specifies the mapping. Consider a REST update method on the
136
- * message resource collection:
137
- *
138
- * service Messaging {
139
- * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
140
- * option (google.api.http) = {
141
- * patch: "/v1/messages/{message_id}"
142
- * body: "message"
143
- * };
144
- * }
145
- * }
146
- * message UpdateMessageRequest {
147
- * string message_id = 1; // mapped to the URL
148
- * Message message = 2; // mapped to the body
149
- * }
150
- *
151
- * The following HTTP JSON to RPC mapping is enabled, where the
152
- * representation of the JSON in the request body is determined by
153
- * protos JSON encoding:
154
- *
155
- * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
156
- * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
157
- *
158
- * The special name `*` can be used in the body mapping to define that
159
- * every field not bound by the path template should be mapped to the
160
- * request body. This enables the following alternative definition of
161
- * the update method:
162
- *
163
- * service Messaging {
164
- * rpc UpdateMessage(Message) returns (Message) {
165
- * option (google.api.http) = {
166
- * patch: "/v1/messages/{message_id}"
167
- * body: "*"
168
- * };
169
- * }
170
- * }
171
- * message Message {
172
- * string message_id = 1;
173
- * string text = 2;
174
- * }
175
- *
176
- *
177
- * The following HTTP JSON to RPC mapping is enabled:
178
- *
179
- * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
180
- * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
181
- *
182
- * Note that when using `*` in the body mapping, it is not possible to
183
- * have HTTP parameters, as all fields not bound by the path end in
184
- * the body. This makes this option more rarely used in practice when
185
- * defining REST APIs. The common usage of `*` is in custom methods
186
- * which don't use the URL at all for transferring data.
187
- *
188
- * It is possible to define multiple HTTP methods for one RPC by using
189
- * the `additional_bindings` option. Example:
190
- *
191
- * service Messaging {
192
- * rpc GetMessage(GetMessageRequest) returns (Message) {
193
- * option (google.api.http) = {
194
- * get: "/v1/messages/{message_id}"
195
- * additional_bindings {
196
- * get: "/v1/users/{user_id}/messages/{message_id}"
197
- * }
198
- * };
199
- * }
200
- * }
201
- * message GetMessageRequest {
202
- * string message_id = 1;
203
- * string user_id = 2;
204
- * }
205
- *
206
- * This enables the following two alternative HTTP JSON to RPC mappings:
207
- *
208
- * - HTTP: `GET /v1/messages/123456`
209
- * - gRPC: `GetMessage(message_id: "123456")`
210
- *
211
- * - HTTP: `GET /v1/users/me/messages/123456`
212
- * - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
213
- *
214
- * Rules for HTTP mapping
215
- *
216
- * 1. Leaf request fields (recursive expansion nested messages in the request
217
- * message) are classified into three categories:
218
- * - Fields referred by the path template. They are passed via the URL path.
219
- * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
220
- * are passed via the HTTP
221
- * request body.
222
- * - All other fields are passed via the URL query parameters, and the
223
- * parameter name is the field path in the request message. A repeated
224
- * field can be represented as multiple query parameters under the same
225
- * name.
226
- * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
227
- * query parameter, all fields
228
- * are passed via URL path and HTTP request body.
229
- * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
230
- * request body, all
231
- * fields are passed via URL path and URL query parameters.
232
- *
233
- * Path template syntax
234
- *
235
- * Template = "/" Segments [ Verb ] ;
236
- * Segments = Segment { "/" Segment } ;
237
- * Segment = "*" | "**" | LITERAL | Variable ;
238
- * Variable = "{" FieldPath [ "=" Segments ] "}" ;
239
- * FieldPath = IDENT { "." IDENT } ;
240
- * Verb = ":" LITERAL ;
241
- *
242
- * The syntax `*` matches a single URL path segment. The syntax `**` matches
243
- * zero or more URL path segments, which must be the last part of the URL path
244
- * except the `Verb`.
245
- *
246
- * The syntax `Variable` matches part of the URL path as specified by its
247
- * template. A variable template must not contain other variables. If a variable
248
- * matches a single path segment, its template may be omitted, e.g. `{var}`
249
- * is equivalent to `{var=*}`.
250
- *
251
- * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
252
- * contains any reserved character, such characters should be percent-encoded
253
- * before the matching.
254
- *
255
- * If a variable contains exactly one path segment, such as `"{var}"` or
256
- * `"{var=*}"`, when such a variable is expanded into a URL path on the client
257
- * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
258
- * server side does the reverse decoding. Such variables show up in the
259
- * [Discovery
260
- * Document](https://developers.google.com/discovery/v1/reference/apis) as
261
- * `{var}`.
262
- *
263
- * If a variable contains multiple path segments, such as `"{var=foo/*}"`
264
- * or `"{var=**}"`, when such a variable is expanded into a URL path on the
265
- * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
266
- * The server side does the reverse decoding, except "%2F" and "%2f" are left
267
- * unchanged. Such variables show up in the
268
- * [Discovery
269
- * Document](https://developers.google.com/discovery/v1/reference/apis) as
270
- * `{+var}`.
271
- *
272
- * Using gRPC API Service Configuration
273
- *
274
- * gRPC API Service Configuration (service config) is a configuration language
275
- * for configuring a gRPC service to become a user-facing product. The
276
- * service config is simply the YAML representation of the `google.api.Service`
277
- * proto message.
278
- *
279
- * As an alternative to annotating your proto file, you can configure gRPC
280
- * transcoding in your service config YAML files. You do this by specifying a
281
- * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
282
- * effect as the proto annotation. This can be particularly useful if you
283
- * have a proto that is reused in multiple services. Note that any transcoding
284
- * specified in the service config will override any matching transcoding
285
- * configuration in the proto.
286
- *
287
- * The following example selects a gRPC method and applies an `HttpRule` to it:
288
- *
289
- * http:
290
- * rules:
291
- * - selector: example.v1.Messaging.GetMessage
292
- * get: /v1/messages/{message_id}/{sub.subfield}
293
- *
294
- * Special notes
295
- *
296
- * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
297
- * proto to JSON conversion must follow the [proto3
298
- * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
299
- *
300
- * While the single segment variable follows the semantics of
301
- * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
302
- * Expansion, the multi segment variable **does not** follow RFC 6570 Section
303
- * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
304
- * does not expand special characters like `?` and `#`, which would lead
305
- * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
306
- * for multi segment variables.
307
- *
308
- * The path variables **must not** refer to any repeated or mapped field,
309
- * because client libraries are not capable of handling such variable expansion.
310
- *
311
- * The path variables **must not** capture the leading "/" character. The reason
312
- * is that the most common use case "{var}" does not capture the leading "/"
313
- * character. For consistency, all path variables must share the same behavior.
314
- *
315
- * Repeated message fields must not be mapped to URL query parameters, because
316
- * no client library can support such complicated mapping.
317
- *
318
- * If an API needs to use a JSON array for request or response body, it can map
319
- * the request or response body to a repeated field. However, some gRPC
320
- * Transcoding implementations may not support this feature.
321
- *
322
- * @generated from protobuf message google.api.HttpRule
323
- */
324
- export interface HttpRule {
325
- /**
326
- * Selects a method to which this rule applies.
327
- *
328
- * Refer to [selector][google.api.DocumentationRule.selector] for syntax
329
- * details.
330
- *
331
- * @generated from protobuf field: string selector = 1
332
- */
333
- selector: string;
334
- /**
335
- * Determines the URL pattern is matched by this rules. This pattern can be
336
- * used with any of the {get|put|post|delete|patch} methods. A custom method
337
- * can be defined using the 'custom' field.
338
- *
339
- * @generated from protobuf oneof: pattern
340
- */
341
- pattern: {
342
- oneofKind: "get";
343
- /**
344
- * Maps to HTTP GET. Used for listing and getting information about
345
- * resources.
346
- *
347
- * @generated from protobuf field: string get = 2
348
- */
349
- get: string;
350
- } | {
351
- oneofKind: "put";
352
- /**
353
- * Maps to HTTP PUT. Used for replacing a resource.
354
- *
355
- * @generated from protobuf field: string put = 3
356
- */
357
- put: string;
358
- } | {
359
- oneofKind: "post";
360
- /**
361
- * Maps to HTTP POST. Used for creating a resource or performing an action.
362
- *
363
- * @generated from protobuf field: string post = 4
364
- */
365
- post: string;
366
- } | {
367
- oneofKind: "delete";
368
- /**
369
- * Maps to HTTP DELETE. Used for deleting a resource.
370
- *
371
- * @generated from protobuf field: string delete = 5
372
- */
373
- delete: string;
374
- } | {
375
- oneofKind: "patch";
376
- /**
377
- * Maps to HTTP PATCH. Used for updating a resource.
378
- *
379
- * @generated from protobuf field: string patch = 6
380
- */
381
- patch: string;
382
- } | {
383
- oneofKind: "custom";
384
- /**
385
- * The custom pattern is used for specifying an HTTP method that is not
386
- * included in the `pattern` field, such as HEAD, or "*" to leave the
387
- * HTTP method unspecified for this rule. The wild-card rule is useful
388
- * for services that provide content to Web (HTML) clients.
389
- *
390
- * @generated from protobuf field: google.api.CustomHttpPattern custom = 8
391
- */
392
- custom: CustomHttpPattern;
393
- } | {
394
- oneofKind: undefined;
395
- };
396
- /**
397
- * The name of the request field whose value is mapped to the HTTP request
398
- * body, or `*` for mapping all request fields not captured by the path
399
- * pattern to the HTTP body, or omitted for not having any HTTP request body.
400
- *
401
- * NOTE: the referred field must be present at the top-level of the request
402
- * message type.
403
- *
404
- * @generated from protobuf field: string body = 7
405
- */
406
- body: string;
407
- /**
408
- * Optional. The name of the response field whose value is mapped to the HTTP
409
- * response body. When omitted, the entire response message will be used
410
- * as the HTTP response body.
411
- *
412
- * NOTE: The referred field must be present at the top-level of the response
413
- * message type.
414
- *
415
- * @generated from protobuf field: string response_body = 12
416
- */
417
- responseBody: string;
418
- /**
419
- * Additional HTTP bindings for the selector. Nested bindings must
420
- * not contain an `additional_bindings` field themselves (that is,
421
- * the nesting may only be one level deep).
422
- *
423
- * @generated from protobuf field: repeated google.api.HttpRule additional_bindings = 11
424
- */
425
- additionalBindings: HttpRule[];
426
- }
427
- /**
428
- * A custom pattern is used for defining custom HTTP verb.
429
- *
430
- * @generated from protobuf message google.api.CustomHttpPattern
431
- */
432
- export interface CustomHttpPattern {
433
- /**
434
- * The name of this custom HTTP verb.
435
- *
436
- * @generated from protobuf field: string kind = 1
437
- */
438
- kind: string;
439
- /**
440
- * The path matched by this custom verb.
441
- *
442
- * @generated from protobuf field: string path = 2
443
- */
444
- path: string;
445
- }
446
- // @generated message type with reflection information, may provide speed optimized methods
447
- class Http$Type extends MessageType<Http> {
448
- constructor() {
449
- super("google.api.Http", [
450
- { no: 1, name: "rules", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => HttpRule },
451
- { no: 2, name: "fully_decode_reserved_expansion", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
452
- ]);
453
- }
454
- create(value?: PartialMessage<Http>): Http {
455
- const message = globalThis.Object.create((this.messagePrototype!));
456
- message.rules = [];
457
- message.fullyDecodeReservedExpansion = false;
458
- if (value !== undefined)
459
- reflectionMergePartial<Http>(this, message, value);
460
- return message;
461
- }
462
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Http): Http {
463
- let message = target ?? this.create(), end = reader.pos + length;
464
- while (reader.pos < end) {
465
- let [fieldNo, wireType] = reader.tag();
466
- switch (fieldNo) {
467
- case /* repeated google.api.HttpRule rules */ 1:
468
- message.rules.push(HttpRule.internalBinaryRead(reader, reader.uint32(), options));
469
- break;
470
- case /* bool fully_decode_reserved_expansion */ 2:
471
- message.fullyDecodeReservedExpansion = reader.bool();
472
- break;
473
- default:
474
- let u = options.readUnknownField;
475
- if (u === "throw")
476
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
477
- let d = reader.skip(wireType);
478
- if (u !== false)
479
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
480
- }
481
- }
482
- return message;
483
- }
484
- internalBinaryWrite(message: Http, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
485
- /* repeated google.api.HttpRule rules = 1; */
486
- for (let i = 0; i < message.rules.length; i++)
487
- HttpRule.internalBinaryWrite(message.rules[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
488
- /* bool fully_decode_reserved_expansion = 2; */
489
- if (message.fullyDecodeReservedExpansion !== false)
490
- writer.tag(2, WireType.Varint).bool(message.fullyDecodeReservedExpansion);
491
- let u = options.writeUnknownFields;
492
- if (u !== false)
493
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
494
- return writer;
495
- }
496
- }
497
- /**
498
- * @generated MessageType for protobuf message google.api.Http
499
- */
500
- export const Http = new Http$Type();
501
- // @generated message type with reflection information, may provide speed optimized methods
502
- class HttpRule$Type extends MessageType<HttpRule> {
503
- constructor() {
504
- super("google.api.HttpRule", [
505
- { no: 1, name: "selector", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
506
- { no: 2, name: "get", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
507
- { no: 3, name: "put", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
508
- { no: 4, name: "post", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
509
- { no: 5, name: "delete", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
510
- { no: 6, name: "patch", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
511
- { no: 8, name: "custom", kind: "message", oneof: "pattern", T: () => CustomHttpPattern },
512
- { no: 7, name: "body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
513
- { no: 12, name: "response_body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
514
- { no: 11, name: "additional_bindings", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => HttpRule }
515
- ]);
516
- }
517
- create(value?: PartialMessage<HttpRule>): HttpRule {
518
- const message = globalThis.Object.create((this.messagePrototype!));
519
- message.selector = "";
520
- message.pattern = { oneofKind: undefined };
521
- message.body = "";
522
- message.responseBody = "";
523
- message.additionalBindings = [];
524
- if (value !== undefined)
525
- reflectionMergePartial<HttpRule>(this, message, value);
526
- return message;
527
- }
528
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HttpRule): HttpRule {
529
- let message = target ?? this.create(), end = reader.pos + length;
530
- while (reader.pos < end) {
531
- let [fieldNo, wireType] = reader.tag();
532
- switch (fieldNo) {
533
- case /* string selector */ 1:
534
- message.selector = reader.string();
535
- break;
536
- case /* string get */ 2:
537
- message.pattern = {
538
- oneofKind: "get",
539
- get: reader.string()
540
- };
541
- break;
542
- case /* string put */ 3:
543
- message.pattern = {
544
- oneofKind: "put",
545
- put: reader.string()
546
- };
547
- break;
548
- case /* string post */ 4:
549
- message.pattern = {
550
- oneofKind: "post",
551
- post: reader.string()
552
- };
553
- break;
554
- case /* string delete */ 5:
555
- message.pattern = {
556
- oneofKind: "delete",
557
- delete: reader.string()
558
- };
559
- break;
560
- case /* string patch */ 6:
561
- message.pattern = {
562
- oneofKind: "patch",
563
- patch: reader.string()
564
- };
565
- break;
566
- case /* google.api.CustomHttpPattern custom */ 8:
567
- message.pattern = {
568
- oneofKind: "custom",
569
- custom: CustomHttpPattern.internalBinaryRead(reader, reader.uint32(), options, (message.pattern as any).custom)
570
- };
571
- break;
572
- case /* string body */ 7:
573
- message.body = reader.string();
574
- break;
575
- case /* string response_body */ 12:
576
- message.responseBody = reader.string();
577
- break;
578
- case /* repeated google.api.HttpRule additional_bindings */ 11:
579
- message.additionalBindings.push(HttpRule.internalBinaryRead(reader, reader.uint32(), options));
580
- break;
581
- default:
582
- let u = options.readUnknownField;
583
- if (u === "throw")
584
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
585
- let d = reader.skip(wireType);
586
- if (u !== false)
587
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
588
- }
589
- }
590
- return message;
591
- }
592
- internalBinaryWrite(message: HttpRule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
593
- /* string selector = 1; */
594
- if (message.selector !== "")
595
- writer.tag(1, WireType.LengthDelimited).string(message.selector);
596
- /* string get = 2; */
597
- if (message.pattern.oneofKind === "get")
598
- writer.tag(2, WireType.LengthDelimited).string(message.pattern.get);
599
- /* string put = 3; */
600
- if (message.pattern.oneofKind === "put")
601
- writer.tag(3, WireType.LengthDelimited).string(message.pattern.put);
602
- /* string post = 4; */
603
- if (message.pattern.oneofKind === "post")
604
- writer.tag(4, WireType.LengthDelimited).string(message.pattern.post);
605
- /* string delete = 5; */
606
- if (message.pattern.oneofKind === "delete")
607
- writer.tag(5, WireType.LengthDelimited).string(message.pattern.delete);
608
- /* string patch = 6; */
609
- if (message.pattern.oneofKind === "patch")
610
- writer.tag(6, WireType.LengthDelimited).string(message.pattern.patch);
611
- /* string body = 7; */
612
- if (message.body !== "")
613
- writer.tag(7, WireType.LengthDelimited).string(message.body);
614
- /* google.api.CustomHttpPattern custom = 8; */
615
- if (message.pattern.oneofKind === "custom")
616
- CustomHttpPattern.internalBinaryWrite(message.pattern.custom, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
617
- /* repeated google.api.HttpRule additional_bindings = 11; */
618
- for (let i = 0; i < message.additionalBindings.length; i++)
619
- HttpRule.internalBinaryWrite(message.additionalBindings[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
620
- /* string response_body = 12; */
621
- if (message.responseBody !== "")
622
- writer.tag(12, WireType.LengthDelimited).string(message.responseBody);
623
- let u = options.writeUnknownFields;
624
- if (u !== false)
625
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
626
- return writer;
627
- }
628
- }
629
- /**
630
- * @generated MessageType for protobuf message google.api.HttpRule
631
- */
632
- export const HttpRule = new HttpRule$Type();
633
- // @generated message type with reflection information, may provide speed optimized methods
634
- class CustomHttpPattern$Type extends MessageType<CustomHttpPattern> {
635
- constructor() {
636
- super("google.api.CustomHttpPattern", [
637
- { no: 1, name: "kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
638
- { no: 2, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
639
- ]);
640
- }
641
- create(value?: PartialMessage<CustomHttpPattern>): CustomHttpPattern {
642
- const message = globalThis.Object.create((this.messagePrototype!));
643
- message.kind = "";
644
- message.path = "";
645
- if (value !== undefined)
646
- reflectionMergePartial<CustomHttpPattern>(this, message, value);
647
- return message;
648
- }
649
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CustomHttpPattern): CustomHttpPattern {
650
- let message = target ?? this.create(), end = reader.pos + length;
651
- while (reader.pos < end) {
652
- let [fieldNo, wireType] = reader.tag();
653
- switch (fieldNo) {
654
- case /* string kind */ 1:
655
- message.kind = reader.string();
656
- break;
657
- case /* string path */ 2:
658
- message.path = reader.string();
659
- break;
660
- default:
661
- let u = options.readUnknownField;
662
- if (u === "throw")
663
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
664
- let d = reader.skip(wireType);
665
- if (u !== false)
666
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
667
- }
668
- }
669
- return message;
670
- }
671
- internalBinaryWrite(message: CustomHttpPattern, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
672
- /* string kind = 1; */
673
- if (message.kind !== "")
674
- writer.tag(1, WireType.LengthDelimited).string(message.kind);
675
- /* string path = 2; */
676
- if (message.path !== "")
677
- writer.tag(2, WireType.LengthDelimited).string(message.path);
678
- let u = options.writeUnknownFields;
679
- if (u !== false)
680
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
681
- return writer;
682
- }
683
- }
684
- /**
685
- * @generated MessageType for protobuf message google.api.CustomHttpPattern
686
- */
687
- export const CustomHttpPattern = new CustomHttpPattern$Type();