@structured-id/proto 0.2.0 → 0.4.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.
- package/CHANGELOG.md +14 -0
- package/NOTICE +1 -2
- package/README.md +7 -37
- package/dist/generated/sid/v1/admin/enrollment.client.d.ts +20 -8
- package/dist/generated/sid/v1/admin/enrollment.client.js +10 -4
- package/dist/generated/sid/v1/admin/enrollment.client.js.map +1 -1
- package/dist/generated/sid/v1/admin/enrollment.d.ts +82 -10
- package/dist/generated/sid/v1/admin/enrollment.js +85 -10
- package/dist/generated/sid/v1/admin/enrollment.js.map +1 -1
- package/dist/generated/sid/v1/authn/auth.client.d.ts +10 -0
- package/dist/generated/sid/v1/authn/auth.client.js +5 -0
- package/dist/generated/sid/v1/authn/auth.client.js.map +1 -1
- package/dist/generated/sid/v1/authn/auth.d.ts +53 -56
- package/dist/generated/sid/v1/authn/auth.js +16 -65
- package/dist/generated/sid/v1/authn/auth.js.map +1 -1
- package/dist/generated/sid/v1/federation/upstream.d.ts +0 -4
- package/dist/generated/sid/v1/federation/upstream.js +0 -8
- package/dist/generated/sid/v1/federation/upstream.js.map +1 -1
- package/package.json +9 -15
- package/dist/generated/sid/v1/common/transport.d.ts +0 -86
- package/dist/generated/sid/v1/common/transport.js +0 -163
- package/dist/generated/sid/v1/common/transport.js.map +0 -1
- package/dist/transport/adaptive.d.ts +0 -72
- package/dist/transport/adaptive.js +0 -223
- package/dist/transport/adaptive.js.map +0 -1
- package/dist/transport/framing.d.ts +0 -33
- package/dist/transport/framing.js +0 -81
- package/dist/transport/framing.js.map +0 -1
- package/dist/transport/index.d.ts +0 -7
- package/dist/transport/index.js +0 -8
- package/dist/transport/index.js.map +0 -1
- package/dist/transport/transport-failure.d.ts +0 -7
- package/dist/transport/transport-failure.js +0 -17
- package/dist/transport/transport-failure.js.map +0 -1
- package/dist/transport/webtransport.d.ts +0 -56
- package/dist/transport/webtransport.js +0 -278
- package/dist/transport/webtransport.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.0](https://github.com/structured-id/sdk/compare/typescript-proto-v0.3.0...typescript-proto-v0.4.0) (2026-10-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **proto:** remove the WebTransport browser transport ([#20](https://github.com/structured-id/sdk/issues/20)) ([05e5ba9](https://github.com/structured-id/sdk/commit/05e5ba90151a68814deb467cd6e1fdc464b546cc)), closes [#19](https://github.com/structured-id/sdk/issues/19)
|
|
9
|
+
|
|
10
|
+
## [0.3.0](https://github.com/structured-id/sdk/compare/typescript-proto-v0.2.0...typescript-proto-v0.3.0) (2026-10-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **proto:** report whether a local administrator claim exists ([#17](https://github.com/structured-id/sdk/issues/17)) ([0b78d08](https://github.com/structured-id/sdk/commit/0b78d08932ab95e72042d6a429762e41c2a3f53a)), closes [#16](https://github.com/structured-id/sdk/issues/16)
|
|
16
|
+
|
|
3
17
|
## [0.2.0](https://github.com/structured-id/sdk/compare/typescript-proto-v0.1.1...typescript-proto-v0.2.0) (2026-10-10)
|
|
4
18
|
|
|
5
19
|
|
package/NOTICE
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
Copyright (C) Dmitry Prudnikov
|
|
3
3
|
|
|
4
4
|
StructuredID public sid.v1 API for TypeScript: messages and clients generated
|
|
5
|
-
from the StructuredID proto definitions
|
|
6
|
-
WebTransport transport.
|
|
5
|
+
from the StructuredID proto definitions.
|
|
7
6
|
|
|
8
7
|
LICENSE
|
|
9
8
|
-------
|
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
The public StructuredID `sid.v1` API for TypeScript: the messages and service
|
|
4
4
|
clients generated from the [proto definitions](https://github.com/structured-id/proto)
|
|
5
|
-
with [protobuf-ts](https://github.com/timostamm/protobuf-ts)
|
|
6
|
-
`google.rpc` error model
|
|
7
|
-
|
|
5
|
+
with [protobuf-ts](https://github.com/timostamm/protobuf-ts) and the
|
|
6
|
+
`google.rpc` error model. The clients run on any protobuf-ts transport:
|
|
7
|
+
gRPC-web in a browser, gRPC on a server.
|
|
8
8
|
|
|
9
9
|
It carries no UI code and no framework dependency: a Vue, React or plain
|
|
10
10
|
TypeScript application, a worker or a Node script use the same modules.
|
|
@@ -12,25 +12,22 @@ TypeScript application, a worker or a Node script use the same modules.
|
|
|
12
12
|
## Use
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
|
-
npm install @structured-id/proto
|
|
15
|
+
npm install @structured-id/proto @protobuf-ts/grpcweb-transport
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Every schema file is its own module, under the path of the `.proto` file:
|
|
19
19
|
|
|
20
20
|
```ts
|
|
21
|
+
import { GrpcWebFetchTransport } from "@protobuf-ts/grpcweb-transport";
|
|
21
22
|
import { IdentityServiceClient } from "@structured-id/proto/sid/v1/identity/identity.client";
|
|
22
23
|
import { GetCurrentProfileRequest } from "@structured-id/proto/sid/v1/identity/identity";
|
|
23
24
|
import { Status } from "@structured-id/proto/google/rpc/status";
|
|
24
|
-
import { AdaptiveRpcTransport } from "@structured-id/proto/transport";
|
|
25
25
|
|
|
26
|
-
const transport = new
|
|
27
|
-
|
|
28
|
-
// Optional: WebTransport (HTTP/3) with per-call fallback to gRPC-web.
|
|
29
|
-
webTransportUrl: "https://sid.example.com:4433",
|
|
26
|
+
const transport = new GrpcWebFetchTransport({
|
|
27
|
+
baseUrl: "https://sid.example.com",
|
|
30
28
|
// Send the session cookie of a backend-for-frontend.
|
|
31
29
|
fetchInit: { credentials: "include" },
|
|
32
30
|
});
|
|
33
|
-
await transport.init();
|
|
34
31
|
|
|
35
32
|
const identity = new IdentityServiceClient(transport);
|
|
36
33
|
const { response } = await identity.getCurrentProfile(GetCurrentProfileRequest.create());
|
|
@@ -41,33 +38,6 @@ holds a `google.rpc.Status`; decode it with `Status.fromBinary` and branch on
|
|
|
41
38
|
the `google.rpc.ErrorInfo` reason and domain in its details, never on the
|
|
42
39
|
message text.
|
|
43
40
|
|
|
44
|
-
### Transport
|
|
45
|
-
|
|
46
|
-
`AdaptiveRpcTransport` sends every unary call over WebTransport while the
|
|
47
|
-
connection is up. A locally observed connection or stream I/O failure retries
|
|
48
|
-
that call over gRPC-web and reconnects WebTransport in the background. Server
|
|
49
|
-
statuses, including `UNAVAILABLE`, `CANCELLED` and `UNKNOWN`, are returned as is:
|
|
50
|
-
a status code alone is not evidence of a failed connection. Malformed protobuf
|
|
51
|
-
responses report `DATA_LOSS`; local encoding errors report `INTERNAL`. Neither
|
|
52
|
-
triggers failover. A server error status rejects the call's headers, response,
|
|
53
|
-
status and trailers promises, preserving its metadata on `RpcError`.
|
|
54
|
-
Server streaming always goes over
|
|
55
|
-
gRPC-web. Without a `webTransportUrl`, or where the runtime has no
|
|
56
|
-
`WebTransport`, it is plain gRPC-web.
|
|
57
|
-
|
|
58
|
-
`RpcOptions.abort` cancels an active stream and prevents a fallback attempt for
|
|
59
|
-
that cancelled call. `close()` stops background reconnects, including an
|
|
60
|
-
attempt already in progress. Transport-change callbacks are observers: an
|
|
61
|
-
exception in one cannot change connection health or the call's result.
|
|
62
|
-
Remote closure also switches to gRPC-web and starts recovery when no RPC is
|
|
63
|
-
active. A late failure from a retired connection cannot disable its replacement.
|
|
64
|
-
|
|
65
|
-
`WebTransportRpcTransport`, `WebTransportConnection` and the frame helpers are
|
|
66
|
-
exported for applications that manage the connection themselves.
|
|
67
|
-
|
|
68
|
-
The declarations use the DOM types (`WebTransport`, streams, `RequestInit`):
|
|
69
|
-
a TypeScript project compiling against them includes the `DOM` library.
|
|
70
|
-
|
|
71
41
|
### Identifiers
|
|
72
42
|
|
|
73
43
|
The `sid.v1.ids` messages are those of
|
|
@@ -25,20 +25,26 @@ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
|
|
25
25
|
*/
|
|
26
26
|
export interface IEnrollmentServiceClient {
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* The enrollment policy in force: the stored one, else the defaults, with
|
|
29
|
+
* the mode the deployment pins.
|
|
29
30
|
*
|
|
30
31
|
* @generated from protobuf rpc: GetEnrollmentPolicy
|
|
31
32
|
*/
|
|
32
33
|
getEnrollmentPolicy(input: Empty, options?: RpcOptions): UnaryCall<Empty, EnrollmentPolicy>;
|
|
33
34
|
/**
|
|
34
|
-
* Whether the installation
|
|
35
|
-
* Public: while
|
|
35
|
+
* Whether the installation offers a local administrator claim, and whether
|
|
36
|
+
* it was taken. Public: while the claim is open, the registration page asks
|
|
37
|
+
* for the claim token.
|
|
36
38
|
*
|
|
37
39
|
* @generated from protobuf rpc: GetInstanceStatus
|
|
38
40
|
*/
|
|
39
41
|
getInstanceStatus(input: Empty, options?: RpcOptions): UnaryCall<Empty, InstanceStatus>;
|
|
40
42
|
/**
|
|
41
|
-
*
|
|
43
|
+
* Replace the stored enrollment policy (mode, domains, invite defaults,
|
|
44
|
+
* tracking); returns the policy in force. Administrators only. Refused with
|
|
45
|
+
* FAILED_PRECONDITION when it changes a mode the deployment pins, and with
|
|
46
|
+
* INVALID_ARGUMENT for a domain-restricted policy without a domain or an
|
|
47
|
+
* allowed domain that is no domain name.
|
|
42
48
|
*
|
|
43
49
|
* @generated from protobuf rpc: UpdateEnrollmentPolicy
|
|
44
50
|
*/
|
|
@@ -91,20 +97,26 @@ export declare class EnrollmentServiceClient implements IEnrollmentServiceClient
|
|
|
91
97
|
};
|
|
92
98
|
constructor(_transport: RpcTransport);
|
|
93
99
|
/**
|
|
94
|
-
*
|
|
100
|
+
* The enrollment policy in force: the stored one, else the defaults, with
|
|
101
|
+
* the mode the deployment pins.
|
|
95
102
|
*
|
|
96
103
|
* @generated from protobuf rpc: GetEnrollmentPolicy
|
|
97
104
|
*/
|
|
98
105
|
getEnrollmentPolicy(input: Empty, options?: RpcOptions): UnaryCall<Empty, EnrollmentPolicy>;
|
|
99
106
|
/**
|
|
100
|
-
* Whether the installation
|
|
101
|
-
* Public: while
|
|
107
|
+
* Whether the installation offers a local administrator claim, and whether
|
|
108
|
+
* it was taken. Public: while the claim is open, the registration page asks
|
|
109
|
+
* for the claim token.
|
|
102
110
|
*
|
|
103
111
|
* @generated from protobuf rpc: GetInstanceStatus
|
|
104
112
|
*/
|
|
105
113
|
getInstanceStatus(input: Empty, options?: RpcOptions): UnaryCall<Empty, InstanceStatus>;
|
|
106
114
|
/**
|
|
107
|
-
*
|
|
115
|
+
* Replace the stored enrollment policy (mode, domains, invite defaults,
|
|
116
|
+
* tracking); returns the policy in force. Administrators only. Refused with
|
|
117
|
+
* FAILED_PRECONDITION when it changes a mode the deployment pins, and with
|
|
118
|
+
* INVALID_ARGUMENT for a domain-restricted policy without a domain or an
|
|
119
|
+
* allowed domain that is no domain name.
|
|
108
120
|
*
|
|
109
121
|
* @generated from protobuf rpc: UpdateEnrollmentPolicy
|
|
110
122
|
*/
|
|
@@ -17,7 +17,8 @@ export class EnrollmentServiceClient {
|
|
|
17
17
|
this._transport = _transport;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* The enrollment policy in force: the stored one, else the defaults, with
|
|
21
|
+
* the mode the deployment pins.
|
|
21
22
|
*
|
|
22
23
|
* @generated from protobuf rpc: GetEnrollmentPolicy
|
|
23
24
|
*/
|
|
@@ -26,8 +27,9 @@ export class EnrollmentServiceClient {
|
|
|
26
27
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
|
-
* Whether the installation
|
|
30
|
-
* Public: while
|
|
30
|
+
* Whether the installation offers a local administrator claim, and whether
|
|
31
|
+
* it was taken. Public: while the claim is open, the registration page asks
|
|
32
|
+
* for the claim token.
|
|
31
33
|
*
|
|
32
34
|
* @generated from protobuf rpc: GetInstanceStatus
|
|
33
35
|
*/
|
|
@@ -36,7 +38,11 @@ export class EnrollmentServiceClient {
|
|
|
36
38
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
|
-
*
|
|
41
|
+
* Replace the stored enrollment policy (mode, domains, invite defaults,
|
|
42
|
+
* tracking); returns the policy in force. Administrators only. Refused with
|
|
43
|
+
* FAILED_PRECONDITION when it changes a mode the deployment pins, and with
|
|
44
|
+
* INVALID_ARGUMENT for a domain-restricted policy without a domain or an
|
|
45
|
+
* allowed domain that is no domain name.
|
|
40
46
|
*
|
|
41
47
|
* @generated from protobuf rpc: UpdateEnrollmentPolicy
|
|
42
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrollment.client.js","sourceRoot":"","sources":["../../../../../src/generated/sid/v1/admin/enrollment.client.ts"],"names":[],"mappings":"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","sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies,ts_nocheck\n// @generated from protobuf file \"sid/v1/admin/enrollment.proto\" (package \"sid.v1.admin\", syntax proto3)\n// tslint:disable\n// @ts-nocheck\nimport type { RpcTransport } from \"@protobuf-ts/runtime-rpc\";\nimport type { ServiceInfo } from \"@protobuf-ts/runtime-rpc\";\nimport { EnrollmentService } from \"./enrollment.js\";\nimport type { RegistrationStats } from \"./enrollment.js\";\nimport type { GetRegistrationStatsRequest } from \"./enrollment.js\";\nimport type { BulkCreateInvitesResponse } from \"./enrollment.js\";\nimport type { BulkCreateInvitesRequest } from \"./enrollment.js\";\nimport type { RevokeInviteRequest } from \"./enrollment.js\";\nimport type { ListInvitesResponse } from \"./enrollment.js\";\nimport type { ListInvitesRequest } from \"./enrollment.js\";\nimport type { Invite } from \"./enrollment.js\";\nimport type { CreateInviteRequest } from \"./enrollment.js\";\nimport type { UpdateEnrollmentPolicyRequest } from \"./enrollment.js\";\nimport type { InstanceStatus } from \"./enrollment.js\";\nimport { stackIntercept } from \"@protobuf-ts/runtime-rpc\";\nimport type { EnrollmentPolicy } from \"./enrollment.js\";\nimport type { Empty } from \"../../../google/protobuf/empty.js\";\nimport type { UnaryCall } from \"@protobuf-ts/runtime-rpc\";\nimport type { RpcOptions } from \"@protobuf-ts/runtime-rpc\";\n/**\n * EnrollmentService manages registration gating policies, invite codes,\n * and registration source analytics.\n *\n * ── Enrollment Policy ──\n *\n * @generated from protobuf service sid.v1.admin.EnrollmentService\n */\nexport interface IEnrollmentServiceClient {\n /**\n * Get the current enrollment policy.\n *\n * @generated from protobuf rpc: GetEnrollmentPolicy\n */\n getEnrollmentPolicy(input: Empty, options?: RpcOptions): UnaryCall<Empty, EnrollmentPolicy>;\n /**\n * Whether the installation has been claimed by its first administrator.\n * Public: while unclaimed, the registration page asks for the claim token.\n *\n * @generated from protobuf rpc: GetInstanceStatus\n */\n getInstanceStatus(input: Empty, options?: RpcOptions): UnaryCall<Empty, InstanceStatus>;\n /**\n * Update the enrollment policy (mode, domains, tracking).\n *\n * @generated from protobuf rpc: UpdateEnrollmentPolicy\n */\n updateEnrollmentPolicy(input: UpdateEnrollmentPolicyRequest, options?: RpcOptions): UnaryCall<UpdateEnrollmentPolicyRequest, EnrollmentPolicy>;\n // ── Invite Management ──\n\n /**\n * Create a new invite code.\n *\n * @generated from protobuf rpc: CreateInvite\n */\n createInvite(input: CreateInviteRequest, options?: RpcOptions): UnaryCall<CreateInviteRequest, Invite>;\n /**\n * List invite codes (paginated, filterable by status).\n *\n * @generated from protobuf rpc: ListInvites\n */\n listInvites(input: ListInvitesRequest, options?: RpcOptions): UnaryCall<ListInvitesRequest, ListInvitesResponse>;\n /**\n * Revoke an invite code (deactivate, cannot be used anymore).\n *\n * @generated from protobuf rpc: RevokeInvite\n */\n revokeInvite(input: RevokeInviteRequest, options?: RpcOptions): UnaryCall<RevokeInviteRequest, Empty>;\n /**\n * Bulk-generate invite codes.\n *\n * @generated from protobuf rpc: BulkCreateInvites\n */\n bulkCreateInvites(input: BulkCreateInvitesRequest, options?: RpcOptions): UnaryCall<BulkCreateInvitesRequest, BulkCreateInvitesResponse>;\n // ── Registration Analytics ──\n\n /**\n * Get registration statistics by source type for a given period.\n *\n * @generated from protobuf rpc: GetRegistrationStats\n */\n getRegistrationStats(input: GetRegistrationStatsRequest, options?: RpcOptions): UnaryCall<GetRegistrationStatsRequest, RegistrationStats>;\n}\n/**\n * EnrollmentService manages registration gating policies, invite codes,\n * and registration source analytics.\n *\n * ── Enrollment Policy ──\n *\n * @generated from protobuf service sid.v1.admin.EnrollmentService\n */\nexport class EnrollmentServiceClient implements IEnrollmentServiceClient, ServiceInfo {\n typeName = EnrollmentService.typeName;\n methods = EnrollmentService.methods;\n options = EnrollmentService.options;\n constructor(private readonly _transport: RpcTransport) {\n }\n /**\n * Get the current enrollment policy.\n *\n * @generated from protobuf rpc: GetEnrollmentPolicy\n */\n getEnrollmentPolicy(input: Empty, options?: RpcOptions): UnaryCall<Empty, EnrollmentPolicy> {\n const method = this.methods[0], opt = this._transport.mergeOptions(options);\n return stackIntercept<Empty, EnrollmentPolicy>(\"unary\", this._transport, method, opt, input);\n }\n /**\n * Whether the installation has been claimed by its first administrator.\n * Public: while unclaimed, the registration page asks for the claim token.\n *\n * @generated from protobuf rpc: GetInstanceStatus\n */\n getInstanceStatus(input: Empty, options?: RpcOptions): UnaryCall<Empty, InstanceStatus> {\n const method = this.methods[1], opt = this._transport.mergeOptions(options);\n return stackIntercept<Empty, InstanceStatus>(\"unary\", this._transport, method, opt, input);\n }\n /**\n * Update the enrollment policy (mode, domains, tracking).\n *\n * @generated from protobuf rpc: UpdateEnrollmentPolicy\n */\n updateEnrollmentPolicy(input: UpdateEnrollmentPolicyRequest, options?: RpcOptions): UnaryCall<UpdateEnrollmentPolicyRequest, EnrollmentPolicy> {\n const method = this.methods[2], opt = this._transport.mergeOptions(options);\n return stackIntercept<UpdateEnrollmentPolicyRequest, EnrollmentPolicy>(\"unary\", this._transport, method, opt, input);\n }\n // ── Invite Management ──\n\n /**\n * Create a new invite code.\n *\n * @generated from protobuf rpc: CreateInvite\n */\n createInvite(input: CreateInviteRequest, options?: RpcOptions): UnaryCall<CreateInviteRequest, Invite> {\n const method = this.methods[3], opt = this._transport.mergeOptions(options);\n return stackIntercept<CreateInviteRequest, Invite>(\"unary\", this._transport, method, opt, input);\n }\n /**\n * List invite codes (paginated, filterable by status).\n *\n * @generated from protobuf rpc: ListInvites\n */\n listInvites(input: ListInvitesRequest, options?: RpcOptions): UnaryCall<ListInvitesRequest, ListInvitesResponse> {\n const method = this.methods[4], opt = this._transport.mergeOptions(options);\n return stackIntercept<ListInvitesRequest, ListInvitesResponse>(\"unary\", this._transport, method, opt, input);\n }\n /**\n * Revoke an invite code (deactivate, cannot be used anymore).\n *\n * @generated from protobuf rpc: RevokeInvite\n */\n revokeInvite(input: RevokeInviteRequest, options?: RpcOptions): UnaryCall<RevokeInviteRequest, Empty> {\n const method = this.methods[5], opt = this._transport.mergeOptions(options);\n return stackIntercept<RevokeInviteRequest, Empty>(\"unary\", this._transport, method, opt, input);\n }\n /**\n * Bulk-generate invite codes.\n *\n * @generated from protobuf rpc: BulkCreateInvites\n */\n bulkCreateInvites(input: BulkCreateInvitesRequest, options?: RpcOptions): UnaryCall<BulkCreateInvitesRequest, BulkCreateInvitesResponse> {\n const method = this.methods[6], opt = this._transport.mergeOptions(options);\n return stackIntercept<BulkCreateInvitesRequest, BulkCreateInvitesResponse>(\"unary\", this._transport, method, opt, input);\n }\n // ── Registration Analytics ──\n\n /**\n * Get registration statistics by source type for a given period.\n *\n * @generated from protobuf rpc: GetRegistrationStats\n */\n getRegistrationStats(input: GetRegistrationStatsRequest, options?: RpcOptions): UnaryCall<GetRegistrationStatsRequest, RegistrationStats> {\n const method = this.methods[7], opt = this._transport.mergeOptions(options);\n return stackIntercept<GetRegistrationStatsRequest, RegistrationStats>(\"unary\", this._transport, method, opt, input);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"enrollment.client.js","sourceRoot":"","sources":["../../../../../src/generated/sid/v1/admin/enrollment.client.ts"],"names":[],"mappings":"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","sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies,ts_nocheck\n// @generated from protobuf file \"sid/v1/admin/enrollment.proto\" (package \"sid.v1.admin\", syntax proto3)\n// tslint:disable\n// @ts-nocheck\nimport type { RpcTransport } from \"@protobuf-ts/runtime-rpc\";\nimport type { ServiceInfo } from \"@protobuf-ts/runtime-rpc\";\nimport { EnrollmentService } from \"./enrollment.js\";\nimport type { RegistrationStats } from \"./enrollment.js\";\nimport type { GetRegistrationStatsRequest } from \"./enrollment.js\";\nimport type { BulkCreateInvitesResponse } from \"./enrollment.js\";\nimport type { BulkCreateInvitesRequest } from \"./enrollment.js\";\nimport type { RevokeInviteRequest } from \"./enrollment.js\";\nimport type { ListInvitesResponse } from \"./enrollment.js\";\nimport type { ListInvitesRequest } from \"./enrollment.js\";\nimport type { Invite } from \"./enrollment.js\";\nimport type { CreateInviteRequest } from \"./enrollment.js\";\nimport type { UpdateEnrollmentPolicyRequest } from \"./enrollment.js\";\nimport type { InstanceStatus } from \"./enrollment.js\";\nimport { stackIntercept } from \"@protobuf-ts/runtime-rpc\";\nimport type { EnrollmentPolicy } from \"./enrollment.js\";\nimport type { Empty } from \"../../../google/protobuf/empty.js\";\nimport type { UnaryCall } from \"@protobuf-ts/runtime-rpc\";\nimport type { RpcOptions } from \"@protobuf-ts/runtime-rpc\";\n/**\n * EnrollmentService manages registration gating policies, invite codes,\n * and registration source analytics.\n *\n * ── Enrollment Policy ──\n *\n * @generated from protobuf service sid.v1.admin.EnrollmentService\n */\nexport interface IEnrollmentServiceClient {\n /**\n * The enrollment policy in force: the stored one, else the defaults, with\n * the mode the deployment pins.\n *\n * @generated from protobuf rpc: GetEnrollmentPolicy\n */\n getEnrollmentPolicy(input: Empty, options?: RpcOptions): UnaryCall<Empty, EnrollmentPolicy>;\n /**\n * Whether the installation offers a local administrator claim, and whether\n * it was taken. Public: while the claim is open, the registration page asks\n * for the claim token.\n *\n * @generated from protobuf rpc: GetInstanceStatus\n */\n getInstanceStatus(input: Empty, options?: RpcOptions): UnaryCall<Empty, InstanceStatus>;\n /**\n * Replace the stored enrollment policy (mode, domains, invite defaults,\n * tracking); returns the policy in force. Administrators only. Refused with\n * FAILED_PRECONDITION when it changes a mode the deployment pins, and with\n * INVALID_ARGUMENT for a domain-restricted policy without a domain or an\n * allowed domain that is no domain name.\n *\n * @generated from protobuf rpc: UpdateEnrollmentPolicy\n */\n updateEnrollmentPolicy(input: UpdateEnrollmentPolicyRequest, options?: RpcOptions): UnaryCall<UpdateEnrollmentPolicyRequest, EnrollmentPolicy>;\n // ── Invite Management ──\n\n /**\n * Create a new invite code.\n *\n * @generated from protobuf rpc: CreateInvite\n */\n createInvite(input: CreateInviteRequest, options?: RpcOptions): UnaryCall<CreateInviteRequest, Invite>;\n /**\n * List invite codes (paginated, filterable by status).\n *\n * @generated from protobuf rpc: ListInvites\n */\n listInvites(input: ListInvitesRequest, options?: RpcOptions): UnaryCall<ListInvitesRequest, ListInvitesResponse>;\n /**\n * Revoke an invite code (deactivate, cannot be used anymore).\n *\n * @generated from protobuf rpc: RevokeInvite\n */\n revokeInvite(input: RevokeInviteRequest, options?: RpcOptions): UnaryCall<RevokeInviteRequest, Empty>;\n /**\n * Bulk-generate invite codes.\n *\n * @generated from protobuf rpc: BulkCreateInvites\n */\n bulkCreateInvites(input: BulkCreateInvitesRequest, options?: RpcOptions): UnaryCall<BulkCreateInvitesRequest, BulkCreateInvitesResponse>;\n // ── Registration Analytics ──\n\n /**\n * Get registration statistics by source type for a given period.\n *\n * @generated from protobuf rpc: GetRegistrationStats\n */\n getRegistrationStats(input: GetRegistrationStatsRequest, options?: RpcOptions): UnaryCall<GetRegistrationStatsRequest, RegistrationStats>;\n}\n/**\n * EnrollmentService manages registration gating policies, invite codes,\n * and registration source analytics.\n *\n * ── Enrollment Policy ──\n *\n * @generated from protobuf service sid.v1.admin.EnrollmentService\n */\nexport class EnrollmentServiceClient implements IEnrollmentServiceClient, ServiceInfo {\n typeName = EnrollmentService.typeName;\n methods = EnrollmentService.methods;\n options = EnrollmentService.options;\n constructor(private readonly _transport: RpcTransport) {\n }\n /**\n * The enrollment policy in force: the stored one, else the defaults, with\n * the mode the deployment pins.\n *\n * @generated from protobuf rpc: GetEnrollmentPolicy\n */\n getEnrollmentPolicy(input: Empty, options?: RpcOptions): UnaryCall<Empty, EnrollmentPolicy> {\n const method = this.methods[0], opt = this._transport.mergeOptions(options);\n return stackIntercept<Empty, EnrollmentPolicy>(\"unary\", this._transport, method, opt, input);\n }\n /**\n * Whether the installation offers a local administrator claim, and whether\n * it was taken. Public: while the claim is open, the registration page asks\n * for the claim token.\n *\n * @generated from protobuf rpc: GetInstanceStatus\n */\n getInstanceStatus(input: Empty, options?: RpcOptions): UnaryCall<Empty, InstanceStatus> {\n const method = this.methods[1], opt = this._transport.mergeOptions(options);\n return stackIntercept<Empty, InstanceStatus>(\"unary\", this._transport, method, opt, input);\n }\n /**\n * Replace the stored enrollment policy (mode, domains, invite defaults,\n * tracking); returns the policy in force. Administrators only. Refused with\n * FAILED_PRECONDITION when it changes a mode the deployment pins, and with\n * INVALID_ARGUMENT for a domain-restricted policy without a domain or an\n * allowed domain that is no domain name.\n *\n * @generated from protobuf rpc: UpdateEnrollmentPolicy\n */\n updateEnrollmentPolicy(input: UpdateEnrollmentPolicyRequest, options?: RpcOptions): UnaryCall<UpdateEnrollmentPolicyRequest, EnrollmentPolicy> {\n const method = this.methods[2], opt = this._transport.mergeOptions(options);\n return stackIntercept<UpdateEnrollmentPolicyRequest, EnrollmentPolicy>(\"unary\", this._transport, method, opt, input);\n }\n // ── Invite Management ──\n\n /**\n * Create a new invite code.\n *\n * @generated from protobuf rpc: CreateInvite\n */\n createInvite(input: CreateInviteRequest, options?: RpcOptions): UnaryCall<CreateInviteRequest, Invite> {\n const method = this.methods[3], opt = this._transport.mergeOptions(options);\n return stackIntercept<CreateInviteRequest, Invite>(\"unary\", this._transport, method, opt, input);\n }\n /**\n * List invite codes (paginated, filterable by status).\n *\n * @generated from protobuf rpc: ListInvites\n */\n listInvites(input: ListInvitesRequest, options?: RpcOptions): UnaryCall<ListInvitesRequest, ListInvitesResponse> {\n const method = this.methods[4], opt = this._transport.mergeOptions(options);\n return stackIntercept<ListInvitesRequest, ListInvitesResponse>(\"unary\", this._transport, method, opt, input);\n }\n /**\n * Revoke an invite code (deactivate, cannot be used anymore).\n *\n * @generated from protobuf rpc: RevokeInvite\n */\n revokeInvite(input: RevokeInviteRequest, options?: RpcOptions): UnaryCall<RevokeInviteRequest, Empty> {\n const method = this.methods[5], opt = this._transport.mergeOptions(options);\n return stackIntercept<RevokeInviteRequest, Empty>(\"unary\", this._transport, method, opt, input);\n }\n /**\n * Bulk-generate invite codes.\n *\n * @generated from protobuf rpc: BulkCreateInvites\n */\n bulkCreateInvites(input: BulkCreateInvitesRequest, options?: RpcOptions): UnaryCall<BulkCreateInvitesRequest, BulkCreateInvitesResponse> {\n const method = this.methods[6], opt = this._transport.mergeOptions(options);\n return stackIntercept<BulkCreateInvitesRequest, BulkCreateInvitesResponse>(\"unary\", this._transport, method, opt, input);\n }\n // ── Registration Analytics ──\n\n /**\n * Get registration statistics by source type for a given period.\n *\n * @generated from protobuf rpc: GetRegistrationStats\n */\n getRegistrationStats(input: GetRegistrationStatsRequest, options?: RpcOptions): UnaryCall<GetRegistrationStatsRequest, RegistrationStats> {\n const method = this.methods[7], opt = this._transport.mergeOptions(options);\n return stackIntercept<GetRegistrationStatsRequest, RegistrationStats>(\"unary\", this._transport, method, opt, input);\n }\n}\n"]}
|
|
@@ -7,19 +7,18 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
|
7
7
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
8
8
|
import { Timestamp } from "../../../google/protobuf/timestamp.js";
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* The installation's bootstrap status, as the registration page needs it.
|
|
11
11
|
*
|
|
12
12
|
* @generated from protobuf message sid.v1.admin.InstanceStatus
|
|
13
13
|
*/
|
|
14
14
|
export interface InstanceStatus {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* enrollment mode. The token itself is never returned.
|
|
16
|
+
* The local administrator claim of this installation. The token itself is
|
|
17
|
+
* never returned, nor who holds administration.
|
|
19
18
|
*
|
|
20
|
-
* @generated from protobuf field:
|
|
19
|
+
* @generated from protobuf field: sid.v1.admin.AdministratorClaim claim = 2
|
|
21
20
|
*/
|
|
22
|
-
|
|
21
|
+
claim: AdministratorClaim;
|
|
23
22
|
}
|
|
24
23
|
/**
|
|
25
24
|
* Enrollment (registration) policy — controls who can create profiles.
|
|
@@ -54,6 +53,14 @@ export interface EnrollmentPolicy {
|
|
|
54
53
|
* @generated from protobuf field: bool track_source = 4
|
|
55
54
|
*/
|
|
56
55
|
trackSource: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Output only: the deployment pins `mode`, which then applies whatever
|
|
58
|
+
* mode an administrator stored; an update that changes it is refused.
|
|
59
|
+
* Ignored in an update request.
|
|
60
|
+
*
|
|
61
|
+
* @generated from protobuf field: bool mode_pinned = 5
|
|
62
|
+
*/
|
|
63
|
+
modePinned: boolean;
|
|
57
64
|
}
|
|
58
65
|
/**
|
|
59
66
|
* Configuration for the invite system.
|
|
@@ -311,13 +318,17 @@ export interface UpdateEnrollmentPolicyRequest {
|
|
|
311
318
|
*/
|
|
312
319
|
export interface CreateInviteRequest {
|
|
313
320
|
/**
|
|
314
|
-
* Maximum number of times this code can be used.
|
|
321
|
+
* Maximum number of times this code can be used. 0: the enrollment
|
|
322
|
+
* policy's InviteConfig.default_max_uses, unless unlimited_uses asks for
|
|
323
|
+
* no limit.
|
|
315
324
|
*
|
|
316
325
|
* @generated from protobuf field: uint32 max_uses = 1
|
|
317
326
|
*/
|
|
318
327
|
maxUses: number;
|
|
319
328
|
/**
|
|
320
|
-
* Expiration timestamp. Not set
|
|
329
|
+
* Expiration timestamp, in the future. Not set: the enrollment policy's
|
|
330
|
+
* InviteConfig.default_expiry_hours from now (no expiry when that is 0),
|
|
331
|
+
* unless never_expires asks for none.
|
|
321
332
|
*
|
|
322
333
|
* @generated from protobuf field: optional google.protobuf.Timestamp expires_at = 2
|
|
323
334
|
*/
|
|
@@ -330,6 +341,20 @@ export interface CreateInviteRequest {
|
|
|
330
341
|
metadata: {
|
|
331
342
|
[key: string]: string;
|
|
332
343
|
};
|
|
344
|
+
/**
|
|
345
|
+
* The invite never expires, whatever the policy's default expiry. Refused
|
|
346
|
+
* with INVALID_ARGUMENT together with expires_at.
|
|
347
|
+
*
|
|
348
|
+
* @generated from protobuf field: bool never_expires = 4
|
|
349
|
+
*/
|
|
350
|
+
neverExpires: boolean;
|
|
351
|
+
/**
|
|
352
|
+
* The invite has no use limit, whatever the policy's default. Refused with
|
|
353
|
+
* INVALID_ARGUMENT together with a nonzero max_uses.
|
|
354
|
+
*
|
|
355
|
+
* @generated from protobuf field: bool unlimited_uses = 5
|
|
356
|
+
*/
|
|
357
|
+
unlimitedUses: boolean;
|
|
333
358
|
}
|
|
334
359
|
/**
|
|
335
360
|
* @generated from protobuf message sid.v1.admin.ListInvitesRequest
|
|
@@ -395,13 +420,14 @@ export interface BulkCreateInvitesRequest {
|
|
|
395
420
|
*/
|
|
396
421
|
count: number;
|
|
397
422
|
/**
|
|
398
|
-
* Max uses per code
|
|
423
|
+
* Max uses per code; 0 as in CreateInviteRequest.max_uses.
|
|
399
424
|
*
|
|
400
425
|
* @generated from protobuf field: uint32 max_uses = 2
|
|
401
426
|
*/
|
|
402
427
|
maxUses: number;
|
|
403
428
|
/**
|
|
404
|
-
* Expiration for all generated codes
|
|
429
|
+
* Expiration for all generated codes; not set as in
|
|
430
|
+
* CreateInviteRequest.expires_at.
|
|
405
431
|
*
|
|
406
432
|
* @generated from protobuf field: optional google.protobuf.Timestamp expires_at = 3
|
|
407
433
|
*/
|
|
@@ -414,6 +440,18 @@ export interface BulkCreateInvitesRequest {
|
|
|
414
440
|
metadata: {
|
|
415
441
|
[key: string]: string;
|
|
416
442
|
};
|
|
443
|
+
/**
|
|
444
|
+
* The codes never expire; as in CreateInviteRequest.never_expires.
|
|
445
|
+
*
|
|
446
|
+
* @generated from protobuf field: bool never_expires = 5
|
|
447
|
+
*/
|
|
448
|
+
neverExpires: boolean;
|
|
449
|
+
/**
|
|
450
|
+
* The codes have no use limit; as in CreateInviteRequest.unlimited_uses.
|
|
451
|
+
*
|
|
452
|
+
* @generated from protobuf field: bool unlimited_uses = 6
|
|
453
|
+
*/
|
|
454
|
+
unlimitedUses: boolean;
|
|
417
455
|
}
|
|
418
456
|
/**
|
|
419
457
|
* @generated from protobuf message sid.v1.admin.BulkCreateInvitesResponse
|
|
@@ -437,6 +475,40 @@ export interface GetRegistrationStatsRequest {
|
|
|
437
475
|
*/
|
|
438
476
|
periodDays: number;
|
|
439
477
|
}
|
|
478
|
+
/**
|
|
479
|
+
* Whether an installation offers a local first-administrator claim.
|
|
480
|
+
*
|
|
481
|
+
* @generated from protobuf enum sid.v1.admin.AdministratorClaim
|
|
482
|
+
*/
|
|
483
|
+
export declare enum AdministratorClaim {
|
|
484
|
+
/**
|
|
485
|
+
* @generated from protobuf enum value: ADMINISTRATOR_CLAIM_UNSPECIFIED = 0;
|
|
486
|
+
*/
|
|
487
|
+
UNSPECIFIED = 0,
|
|
488
|
+
/**
|
|
489
|
+
* A self-managed installation without its first administrator: while open,
|
|
490
|
+
* self-registration accepts only a registration carrying the claim token
|
|
491
|
+
* from the service log, whatever the enrollment mode.
|
|
492
|
+
*
|
|
493
|
+
* @generated from protobuf enum value: ADMINISTRATOR_CLAIM_OPEN = 1;
|
|
494
|
+
*/
|
|
495
|
+
OPEN = 1,
|
|
496
|
+
/**
|
|
497
|
+
* A self-managed installation whose claim was taken: registration follows
|
|
498
|
+
* the enrollment policy, and the token grants nothing.
|
|
499
|
+
*
|
|
500
|
+
* @generated from protobuf enum value: ADMINISTRATOR_CLAIM_CLAIMED = 2;
|
|
501
|
+
*/
|
|
502
|
+
CLAIMED = 2,
|
|
503
|
+
/**
|
|
504
|
+
* A centrally managed installation: administration comes through authorized
|
|
505
|
+
* provisioning, never a local claim, so no token is accepted. Registration
|
|
506
|
+
* follows the enrollment policy whether or not a local administrator exists.
|
|
507
|
+
*
|
|
508
|
+
* @generated from protobuf enum value: ADMINISTRATOR_CLAIM_UNAVAILABLE = 3;
|
|
509
|
+
*/
|
|
510
|
+
UNAVAILABLE = 3
|
|
511
|
+
}
|
|
440
512
|
/**
|
|
441
513
|
* Registration gating mode.
|
|
442
514
|
*
|
|
@@ -9,6 +9,41 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
9
9
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
10
10
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
11
11
|
import { Timestamp } from "../../../google/protobuf/timestamp.js";
|
|
12
|
+
/**
|
|
13
|
+
* Whether an installation offers a local first-administrator claim.
|
|
14
|
+
*
|
|
15
|
+
* @generated from protobuf enum sid.v1.admin.AdministratorClaim
|
|
16
|
+
*/
|
|
17
|
+
export var AdministratorClaim;
|
|
18
|
+
(function (AdministratorClaim) {
|
|
19
|
+
/**
|
|
20
|
+
* @generated from protobuf enum value: ADMINISTRATOR_CLAIM_UNSPECIFIED = 0;
|
|
21
|
+
*/
|
|
22
|
+
AdministratorClaim[AdministratorClaim["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
23
|
+
/**
|
|
24
|
+
* A self-managed installation without its first administrator: while open,
|
|
25
|
+
* self-registration accepts only a registration carrying the claim token
|
|
26
|
+
* from the service log, whatever the enrollment mode.
|
|
27
|
+
*
|
|
28
|
+
* @generated from protobuf enum value: ADMINISTRATOR_CLAIM_OPEN = 1;
|
|
29
|
+
*/
|
|
30
|
+
AdministratorClaim[AdministratorClaim["OPEN"] = 1] = "OPEN";
|
|
31
|
+
/**
|
|
32
|
+
* A self-managed installation whose claim was taken: registration follows
|
|
33
|
+
* the enrollment policy, and the token grants nothing.
|
|
34
|
+
*
|
|
35
|
+
* @generated from protobuf enum value: ADMINISTRATOR_CLAIM_CLAIMED = 2;
|
|
36
|
+
*/
|
|
37
|
+
AdministratorClaim[AdministratorClaim["CLAIMED"] = 2] = "CLAIMED";
|
|
38
|
+
/**
|
|
39
|
+
* A centrally managed installation: administration comes through authorized
|
|
40
|
+
* provisioning, never a local claim, so no token is accepted. Registration
|
|
41
|
+
* follows the enrollment policy whether or not a local administrator exists.
|
|
42
|
+
*
|
|
43
|
+
* @generated from protobuf enum value: ADMINISTRATOR_CLAIM_UNAVAILABLE = 3;
|
|
44
|
+
*/
|
|
45
|
+
AdministratorClaim[AdministratorClaim["UNAVAILABLE"] = 3] = "UNAVAILABLE";
|
|
46
|
+
})(AdministratorClaim || (AdministratorClaim = {}));
|
|
12
47
|
// ══════════════════════════════════════════════════════════════════════════
|
|
13
48
|
// Enums
|
|
14
49
|
// ══════════════════════════════════════════════════════════════════════════
|
|
@@ -137,12 +172,12 @@ export var InviteStatus;
|
|
|
137
172
|
class InstanceStatus$Type extends MessageType {
|
|
138
173
|
constructor() {
|
|
139
174
|
super("sid.v1.admin.InstanceStatus", [
|
|
140
|
-
{ no:
|
|
175
|
+
{ no: 2, name: "claim", kind: "enum", T: () => ["sid.v1.admin.AdministratorClaim", AdministratorClaim, "ADMINISTRATOR_CLAIM_"] }
|
|
141
176
|
]);
|
|
142
177
|
}
|
|
143
178
|
create(value) {
|
|
144
179
|
const message = globalThis.Object.create((this.messagePrototype));
|
|
145
|
-
message.
|
|
180
|
+
message.claim = 0;
|
|
146
181
|
if (value !== undefined)
|
|
147
182
|
reflectionMergePartial(this, message, value);
|
|
148
183
|
return message;
|
|
@@ -152,8 +187,8 @@ class InstanceStatus$Type extends MessageType {
|
|
|
152
187
|
while (reader.pos < end) {
|
|
153
188
|
let [fieldNo, wireType] = reader.tag();
|
|
154
189
|
switch (fieldNo) {
|
|
155
|
-
case /*
|
|
156
|
-
message.
|
|
190
|
+
case /* sid.v1.admin.AdministratorClaim claim */ 2:
|
|
191
|
+
message.claim = reader.int32();
|
|
157
192
|
break;
|
|
158
193
|
default:
|
|
159
194
|
let u = options.readUnknownField;
|
|
@@ -167,9 +202,9 @@ class InstanceStatus$Type extends MessageType {
|
|
|
167
202
|
return message;
|
|
168
203
|
}
|
|
169
204
|
internalBinaryWrite(message, writer, options) {
|
|
170
|
-
/*
|
|
171
|
-
if (message.
|
|
172
|
-
writer.tag(
|
|
205
|
+
/* sid.v1.admin.AdministratorClaim claim = 2; */
|
|
206
|
+
if (message.claim !== 0)
|
|
207
|
+
writer.tag(2, WireType.Varint).int32(message.claim);
|
|
173
208
|
let u = options.writeUnknownFields;
|
|
174
209
|
if (u !== false)
|
|
175
210
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -187,7 +222,8 @@ class EnrollmentPolicy$Type extends MessageType {
|
|
|
187
222
|
{ no: 1, name: "mode", kind: "enum", T: () => ["sid.v1.admin.EnrollmentMode", EnrollmentMode, "ENROLLMENT_MODE_"] },
|
|
188
223
|
{ no: 2, name: "invite", kind: "message", T: () => InviteConfig },
|
|
189
224
|
{ no: 3, name: "allowed_domains", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
190
|
-
{ no: 4, name: "track_source", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
225
|
+
{ no: 4, name: "track_source", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
226
|
+
{ no: 5, name: "mode_pinned", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
191
227
|
]);
|
|
192
228
|
}
|
|
193
229
|
create(value) {
|
|
@@ -195,6 +231,7 @@ class EnrollmentPolicy$Type extends MessageType {
|
|
|
195
231
|
message.mode = 0;
|
|
196
232
|
message.allowedDomains = [];
|
|
197
233
|
message.trackSource = false;
|
|
234
|
+
message.modePinned = false;
|
|
198
235
|
if (value !== undefined)
|
|
199
236
|
reflectionMergePartial(this, message, value);
|
|
200
237
|
return message;
|
|
@@ -216,6 +253,9 @@ class EnrollmentPolicy$Type extends MessageType {
|
|
|
216
253
|
case /* bool track_source */ 4:
|
|
217
254
|
message.trackSource = reader.bool();
|
|
218
255
|
break;
|
|
256
|
+
case /* bool mode_pinned */ 5:
|
|
257
|
+
message.modePinned = reader.bool();
|
|
258
|
+
break;
|
|
219
259
|
default:
|
|
220
260
|
let u = options.readUnknownField;
|
|
221
261
|
if (u === "throw")
|
|
@@ -240,6 +280,9 @@ class EnrollmentPolicy$Type extends MessageType {
|
|
|
240
280
|
/* bool track_source = 4; */
|
|
241
281
|
if (message.trackSource !== false)
|
|
242
282
|
writer.tag(4, WireType.Varint).bool(message.trackSource);
|
|
283
|
+
/* bool mode_pinned = 5; */
|
|
284
|
+
if (message.modePinned !== false)
|
|
285
|
+
writer.tag(5, WireType.Varint).bool(message.modePinned);
|
|
243
286
|
let u = options.writeUnknownFields;
|
|
244
287
|
if (u !== false)
|
|
245
288
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -865,13 +908,17 @@ class CreateInviteRequest$Type extends MessageType {
|
|
|
865
908
|
super("sid.v1.admin.CreateInviteRequest", [
|
|
866
909
|
{ no: 1, name: "max_uses", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
867
910
|
{ no: 2, name: "expires_at", kind: "message", T: () => Timestamp },
|
|
868
|
-
{ no: 3, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }
|
|
911
|
+
{ no: 3, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } },
|
|
912
|
+
{ no: 4, name: "never_expires", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
913
|
+
{ no: 5, name: "unlimited_uses", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
869
914
|
]);
|
|
870
915
|
}
|
|
871
916
|
create(value) {
|
|
872
917
|
const message = globalThis.Object.create((this.messagePrototype));
|
|
873
918
|
message.maxUses = 0;
|
|
874
919
|
message.metadata = {};
|
|
920
|
+
message.neverExpires = false;
|
|
921
|
+
message.unlimitedUses = false;
|
|
875
922
|
if (value !== undefined)
|
|
876
923
|
reflectionMergePartial(this, message, value);
|
|
877
924
|
return message;
|
|
@@ -890,6 +937,12 @@ class CreateInviteRequest$Type extends MessageType {
|
|
|
890
937
|
case /* map<string, string> metadata */ 3:
|
|
891
938
|
this.binaryReadMap3(message.metadata, reader, options);
|
|
892
939
|
break;
|
|
940
|
+
case /* bool never_expires */ 4:
|
|
941
|
+
message.neverExpires = reader.bool();
|
|
942
|
+
break;
|
|
943
|
+
case /* bool unlimited_uses */ 5:
|
|
944
|
+
message.unlimitedUses = reader.bool();
|
|
945
|
+
break;
|
|
893
946
|
default:
|
|
894
947
|
let u = options.readUnknownField;
|
|
895
948
|
if (u === "throw")
|
|
@@ -927,6 +980,12 @@ class CreateInviteRequest$Type extends MessageType {
|
|
|
927
980
|
/* map<string, string> metadata = 3; */
|
|
928
981
|
for (let k of globalThis.Object.keys(message.metadata))
|
|
929
982
|
writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.metadata[k]).join();
|
|
983
|
+
/* bool never_expires = 4; */
|
|
984
|
+
if (message.neverExpires !== false)
|
|
985
|
+
writer.tag(4, WireType.Varint).bool(message.neverExpires);
|
|
986
|
+
/* bool unlimited_uses = 5; */
|
|
987
|
+
if (message.unlimitedUses !== false)
|
|
988
|
+
writer.tag(5, WireType.Varint).bool(message.unlimitedUses);
|
|
930
989
|
let u = options.writeUnknownFields;
|
|
931
990
|
if (u !== false)
|
|
932
991
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1125,7 +1184,9 @@ class BulkCreateInvitesRequest$Type extends MessageType {
|
|
|
1125
1184
|
{ no: 1, name: "count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
1126
1185
|
{ no: 2, name: "max_uses", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
1127
1186
|
{ no: 3, name: "expires_at", kind: "message", T: () => Timestamp },
|
|
1128
|
-
{ no: 4, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }
|
|
1187
|
+
{ no: 4, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } },
|
|
1188
|
+
{ no: 5, name: "never_expires", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1189
|
+
{ no: 6, name: "unlimited_uses", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1129
1190
|
]);
|
|
1130
1191
|
}
|
|
1131
1192
|
create(value) {
|
|
@@ -1133,6 +1194,8 @@ class BulkCreateInvitesRequest$Type extends MessageType {
|
|
|
1133
1194
|
message.count = 0;
|
|
1134
1195
|
message.maxUses = 0;
|
|
1135
1196
|
message.metadata = {};
|
|
1197
|
+
message.neverExpires = false;
|
|
1198
|
+
message.unlimitedUses = false;
|
|
1136
1199
|
if (value !== undefined)
|
|
1137
1200
|
reflectionMergePartial(this, message, value);
|
|
1138
1201
|
return message;
|
|
@@ -1154,6 +1217,12 @@ class BulkCreateInvitesRequest$Type extends MessageType {
|
|
|
1154
1217
|
case /* map<string, string> metadata */ 4:
|
|
1155
1218
|
this.binaryReadMap4(message.metadata, reader, options);
|
|
1156
1219
|
break;
|
|
1220
|
+
case /* bool never_expires */ 5:
|
|
1221
|
+
message.neverExpires = reader.bool();
|
|
1222
|
+
break;
|
|
1223
|
+
case /* bool unlimited_uses */ 6:
|
|
1224
|
+
message.unlimitedUses = reader.bool();
|
|
1225
|
+
break;
|
|
1157
1226
|
default:
|
|
1158
1227
|
let u = options.readUnknownField;
|
|
1159
1228
|
if (u === "throw")
|
|
@@ -1194,6 +1263,12 @@ class BulkCreateInvitesRequest$Type extends MessageType {
|
|
|
1194
1263
|
/* map<string, string> metadata = 4; */
|
|
1195
1264
|
for (let k of globalThis.Object.keys(message.metadata))
|
|
1196
1265
|
writer.tag(4, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.metadata[k]).join();
|
|
1266
|
+
/* bool never_expires = 5; */
|
|
1267
|
+
if (message.neverExpires !== false)
|
|
1268
|
+
writer.tag(5, WireType.Varint).bool(message.neverExpires);
|
|
1269
|
+
/* bool unlimited_uses = 6; */
|
|
1270
|
+
if (message.unlimitedUses !== false)
|
|
1271
|
+
writer.tag(6, WireType.Varint).bool(message.unlimitedUses);
|
|
1197
1272
|
let u = options.writeUnknownFields;
|
|
1198
1273
|
if (u !== false)
|
|
1199
1274
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|