@structured-id/proto 0.3.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 +7 -0
- package/NOTICE +1 -2
- package/README.md +7 -37
- package/dist/generated/sid/v1/admin/enrollment.client.d.ts +14 -4
- package/dist/generated/sid/v1/admin/enrollment.client.js +7 -2
- package/dist/generated/sid/v1/admin/enrollment.client.js.map +1 -1
- package/dist/generated/sid/v1/admin/enrollment.d.ts +43 -4
- package/dist/generated/sid/v1/admin/enrollment.js +43 -3
- 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 +5 -11
- 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,12 @@
|
|
|
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
|
+
|
|
3
10
|
## [0.3.0](https://github.com/structured-id/sdk/compare/typescript-proto-v0.2.0...typescript-proto-v0.3.0) (2026-10-16)
|
|
4
11
|
|
|
5
12
|
|
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,7 +25,8 @@ 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
|
*/
|
|
@@ -39,7 +40,11 @@ export interface IEnrollmentServiceClient {
|
|
|
39
40
|
*/
|
|
40
41
|
getInstanceStatus(input: Empty, options?: RpcOptions): UnaryCall<Empty, InstanceStatus>;
|
|
41
42
|
/**
|
|
42
|
-
*
|
|
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.
|
|
43
48
|
*
|
|
44
49
|
* @generated from protobuf rpc: UpdateEnrollmentPolicy
|
|
45
50
|
*/
|
|
@@ -92,7 +97,8 @@ export declare class EnrollmentServiceClient implements IEnrollmentServiceClient
|
|
|
92
97
|
};
|
|
93
98
|
constructor(_transport: RpcTransport);
|
|
94
99
|
/**
|
|
95
|
-
*
|
|
100
|
+
* The enrollment policy in force: the stored one, else the defaults, with
|
|
101
|
+
* the mode the deployment pins.
|
|
96
102
|
*
|
|
97
103
|
* @generated from protobuf rpc: GetEnrollmentPolicy
|
|
98
104
|
*/
|
|
@@ -106,7 +112,11 @@ export declare class EnrollmentServiceClient implements IEnrollmentServiceClient
|
|
|
106
112
|
*/
|
|
107
113
|
getInstanceStatus(input: Empty, options?: RpcOptions): UnaryCall<Empty, InstanceStatus>;
|
|
108
114
|
/**
|
|
109
|
-
*
|
|
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.
|
|
110
120
|
*
|
|
111
121
|
* @generated from protobuf rpc: UpdateEnrollmentPolicy
|
|
112
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
|
*/
|
|
@@ -37,7 +38,11 @@ export class EnrollmentServiceClient {
|
|
|
37
38
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
40
|
-
*
|
|
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.
|
|
41
46
|
*
|
|
42
47
|
* @generated from protobuf rpc: UpdateEnrollmentPolicy
|
|
43
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 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 * 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 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 * 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"]}
|
|
@@ -53,6 +53,14 @@ export interface EnrollmentPolicy {
|
|
|
53
53
|
* @generated from protobuf field: bool track_source = 4
|
|
54
54
|
*/
|
|
55
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;
|
|
56
64
|
}
|
|
57
65
|
/**
|
|
58
66
|
* Configuration for the invite system.
|
|
@@ -310,13 +318,17 @@ export interface UpdateEnrollmentPolicyRequest {
|
|
|
310
318
|
*/
|
|
311
319
|
export interface CreateInviteRequest {
|
|
312
320
|
/**
|
|
313
|
-
* 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.
|
|
314
324
|
*
|
|
315
325
|
* @generated from protobuf field: uint32 max_uses = 1
|
|
316
326
|
*/
|
|
317
327
|
maxUses: number;
|
|
318
328
|
/**
|
|
319
|
-
* 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.
|
|
320
332
|
*
|
|
321
333
|
* @generated from protobuf field: optional google.protobuf.Timestamp expires_at = 2
|
|
322
334
|
*/
|
|
@@ -329,6 +341,20 @@ export interface CreateInviteRequest {
|
|
|
329
341
|
metadata: {
|
|
330
342
|
[key: string]: string;
|
|
331
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;
|
|
332
358
|
}
|
|
333
359
|
/**
|
|
334
360
|
* @generated from protobuf message sid.v1.admin.ListInvitesRequest
|
|
@@ -394,13 +420,14 @@ export interface BulkCreateInvitesRequest {
|
|
|
394
420
|
*/
|
|
395
421
|
count: number;
|
|
396
422
|
/**
|
|
397
|
-
* Max uses per code
|
|
423
|
+
* Max uses per code; 0 as in CreateInviteRequest.max_uses.
|
|
398
424
|
*
|
|
399
425
|
* @generated from protobuf field: uint32 max_uses = 2
|
|
400
426
|
*/
|
|
401
427
|
maxUses: number;
|
|
402
428
|
/**
|
|
403
|
-
* Expiration for all generated codes
|
|
429
|
+
* Expiration for all generated codes; not set as in
|
|
430
|
+
* CreateInviteRequest.expires_at.
|
|
404
431
|
*
|
|
405
432
|
* @generated from protobuf field: optional google.protobuf.Timestamp expires_at = 3
|
|
406
433
|
*/
|
|
@@ -413,6 +440,18 @@ export interface BulkCreateInvitesRequest {
|
|
|
413
440
|
metadata: {
|
|
414
441
|
[key: string]: string;
|
|
415
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;
|
|
416
455
|
}
|
|
417
456
|
/**
|
|
418
457
|
* @generated from protobuf message sid.v1.admin.BulkCreateInvitesResponse
|
|
@@ -222,7 +222,8 @@ class EnrollmentPolicy$Type extends MessageType {
|
|
|
222
222
|
{ no: 1, name: "mode", kind: "enum", T: () => ["sid.v1.admin.EnrollmentMode", EnrollmentMode, "ENROLLMENT_MODE_"] },
|
|
223
223
|
{ no: 2, name: "invite", kind: "message", T: () => InviteConfig },
|
|
224
224
|
{ no: 3, name: "allowed_domains", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
225
|
-
{ 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*/ }
|
|
226
227
|
]);
|
|
227
228
|
}
|
|
228
229
|
create(value) {
|
|
@@ -230,6 +231,7 @@ class EnrollmentPolicy$Type extends MessageType {
|
|
|
230
231
|
message.mode = 0;
|
|
231
232
|
message.allowedDomains = [];
|
|
232
233
|
message.trackSource = false;
|
|
234
|
+
message.modePinned = false;
|
|
233
235
|
if (value !== undefined)
|
|
234
236
|
reflectionMergePartial(this, message, value);
|
|
235
237
|
return message;
|
|
@@ -251,6 +253,9 @@ class EnrollmentPolicy$Type extends MessageType {
|
|
|
251
253
|
case /* bool track_source */ 4:
|
|
252
254
|
message.trackSource = reader.bool();
|
|
253
255
|
break;
|
|
256
|
+
case /* bool mode_pinned */ 5:
|
|
257
|
+
message.modePinned = reader.bool();
|
|
258
|
+
break;
|
|
254
259
|
default:
|
|
255
260
|
let u = options.readUnknownField;
|
|
256
261
|
if (u === "throw")
|
|
@@ -275,6 +280,9 @@ class EnrollmentPolicy$Type extends MessageType {
|
|
|
275
280
|
/* bool track_source = 4; */
|
|
276
281
|
if (message.trackSource !== false)
|
|
277
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);
|
|
278
286
|
let u = options.writeUnknownFields;
|
|
279
287
|
if (u !== false)
|
|
280
288
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -900,13 +908,17 @@ class CreateInviteRequest$Type extends MessageType {
|
|
|
900
908
|
super("sid.v1.admin.CreateInviteRequest", [
|
|
901
909
|
{ no: 1, name: "max_uses", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
902
910
|
{ no: 2, name: "expires_at", kind: "message", T: () => Timestamp },
|
|
903
|
-
{ 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*/ }
|
|
904
914
|
]);
|
|
905
915
|
}
|
|
906
916
|
create(value) {
|
|
907
917
|
const message = globalThis.Object.create((this.messagePrototype));
|
|
908
918
|
message.maxUses = 0;
|
|
909
919
|
message.metadata = {};
|
|
920
|
+
message.neverExpires = false;
|
|
921
|
+
message.unlimitedUses = false;
|
|
910
922
|
if (value !== undefined)
|
|
911
923
|
reflectionMergePartial(this, message, value);
|
|
912
924
|
return message;
|
|
@@ -925,6 +937,12 @@ class CreateInviteRequest$Type extends MessageType {
|
|
|
925
937
|
case /* map<string, string> metadata */ 3:
|
|
926
938
|
this.binaryReadMap3(message.metadata, reader, options);
|
|
927
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;
|
|
928
946
|
default:
|
|
929
947
|
let u = options.readUnknownField;
|
|
930
948
|
if (u === "throw")
|
|
@@ -962,6 +980,12 @@ class CreateInviteRequest$Type extends MessageType {
|
|
|
962
980
|
/* map<string, string> metadata = 3; */
|
|
963
981
|
for (let k of globalThis.Object.keys(message.metadata))
|
|
964
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);
|
|
965
989
|
let u = options.writeUnknownFields;
|
|
966
990
|
if (u !== false)
|
|
967
991
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1160,7 +1184,9 @@ class BulkCreateInvitesRequest$Type extends MessageType {
|
|
|
1160
1184
|
{ no: 1, name: "count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
1161
1185
|
{ no: 2, name: "max_uses", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
1162
1186
|
{ no: 3, name: "expires_at", kind: "message", T: () => Timestamp },
|
|
1163
|
-
{ 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*/ }
|
|
1164
1190
|
]);
|
|
1165
1191
|
}
|
|
1166
1192
|
create(value) {
|
|
@@ -1168,6 +1194,8 @@ class BulkCreateInvitesRequest$Type extends MessageType {
|
|
|
1168
1194
|
message.count = 0;
|
|
1169
1195
|
message.maxUses = 0;
|
|
1170
1196
|
message.metadata = {};
|
|
1197
|
+
message.neverExpires = false;
|
|
1198
|
+
message.unlimitedUses = false;
|
|
1171
1199
|
if (value !== undefined)
|
|
1172
1200
|
reflectionMergePartial(this, message, value);
|
|
1173
1201
|
return message;
|
|
@@ -1189,6 +1217,12 @@ class BulkCreateInvitesRequest$Type extends MessageType {
|
|
|
1189
1217
|
case /* map<string, string> metadata */ 4:
|
|
1190
1218
|
this.binaryReadMap4(message.metadata, reader, options);
|
|
1191
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;
|
|
1192
1226
|
default:
|
|
1193
1227
|
let u = options.readUnknownField;
|
|
1194
1228
|
if (u === "throw")
|
|
@@ -1229,6 +1263,12 @@ class BulkCreateInvitesRequest$Type extends MessageType {
|
|
|
1229
1263
|
/* map<string, string> metadata = 4; */
|
|
1230
1264
|
for (let k of globalThis.Object.keys(message.metadata))
|
|
1231
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);
|
|
1232
1272
|
let u = options.writeUnknownFields;
|
|
1233
1273
|
if (u !== false)
|
|
1234
1274
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|