@structured-id/ui-core 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +47 -0
- package/dist/browser-vp/index.cjs +349 -0
- package/dist/browser-vp/index.d.cts +287 -0
- package/dist/browser-vp/index.d.ts +287 -0
- package/dist/browser-vp/index.js +349 -0
- package/dist/chunk-C3Q766CY.cjs +125 -0
- package/dist/chunk-J5YXRXB5.js +125 -0
- package/dist/index.cjs +19360 -0
- package/dist/index.d.cts +9536 -0
- package/dist/index.d.ts +9536 -0
- package/dist/index.js +19360 -0
- package/dist/storage-4CB2JTLW.cjs +22 -0
- package/dist/storage-THRWREZP.js +22 -0
- package/package.json +93 -0
- package/src/browser-vp/crypto.ts +254 -0
- package/src/browser-vp/index.test.ts +10 -0
- package/src/browser-vp/index.ts +118 -0
- package/src/browser-vp/prf.ts +181 -0
- package/src/browser-vp/storage.test.ts +9 -0
- package/src/browser-vp/storage.ts +165 -0
- package/src/browser-vp/types.ts +97 -0
- package/src/browser-vp/vp.test.ts +43 -0
- package/src/browser-vp/vp.ts +113 -0
- package/src/components/SidAvatar.vue +106 -0
- package/src/components/SidConfirmDialog.vue +125 -0
- package/src/components/SidStatusBadge.vue +71 -0
- package/src/components/index.ts +5 -0
- package/src/composables/index.ts +10 -0
- package/src/composables/useAuth.ts +40 -0
- package/src/composables/useBffAuth.ts +147 -0
- package/src/composables/useGrpc.test.ts +196 -0
- package/src/composables/useGrpc.ts +120 -0
- package/src/composables/useSession.ts +80 -0
- package/src/generated/google/api/http.ts +687 -0
- package/src/generated/google/protobuf/descriptor.ts +4865 -0
- package/src/generated/google/protobuf/duration.ts +230 -0
- package/src/generated/google/protobuf/empty.ts +94 -0
- package/src/generated/google/protobuf/struct.ts +484 -0
- package/src/generated/google/protobuf/timestamp.ts +287 -0
- package/src/generated/sid/v1/account/account.client.ts +527 -0
- package/src/generated/sid/v1/account/account.ts +3261 -0
- package/src/generated/sid/v1/admin/admin.client.ts +136 -0
- package/src/generated/sid/v1/admin/admin.ts +846 -0
- package/src/generated/sid/v1/admin/admin_roles.client.ts +181 -0
- package/src/generated/sid/v1/admin/admin_roles.ts +1606 -0
- package/src/generated/sid/v1/admin/analytics.client.ts +106 -0
- package/src/generated/sid/v1/admin/analytics.ts +1017 -0
- package/src/generated/sid/v1/admin/branding.client.ts +166 -0
- package/src/generated/sid/v1/admin/branding.ts +1906 -0
- package/src/generated/sid/v1/admin/enrollment.client.ts +165 -0
- package/src/generated/sid/v1/admin/enrollment.ts +1704 -0
- package/src/generated/sid/v1/admin/events.client.ts +195 -0
- package/src/generated/sid/v1/admin/events.ts +1900 -0
- package/src/generated/sid/v1/admin/flow.client.ts +183 -0
- package/src/generated/sid/v1/admin/flow.ts +1552 -0
- package/src/generated/sid/v1/admin/keys.client.ts +107 -0
- package/src/generated/sid/v1/admin/keys.ts +931 -0
- package/src/generated/sid/v1/admin/login_experience.client.ts +160 -0
- package/src/generated/sid/v1/admin/login_experience.ts +1061 -0
- package/src/generated/sid/v1/admin/migration.client.ts +127 -0
- package/src/generated/sid/v1/admin/migration.ts +1948 -0
- package/src/generated/sid/v1/admin/notifications.client.ts +128 -0
- package/src/generated/sid/v1/admin/notifications.ts +1332 -0
- package/src/generated/sid/v1/admin/operations.client.ts +241 -0
- package/src/generated/sid/v1/admin/operations.ts +2648 -0
- package/src/generated/sid/v1/admin/organizations.client.ts +57 -0
- package/src/generated/sid/v1/admin/organizations.ts +349 -0
- package/src/generated/sid/v1/admin/scopes.client.ts +171 -0
- package/src/generated/sid/v1/admin/scopes.ts +1324 -0
- package/src/generated/sid/v1/admin/security.client.ts +412 -0
- package/src/generated/sid/v1/admin/security.ts +4086 -0
- package/src/generated/sid/v1/admin/sessions.client.ts +114 -0
- package/src/generated/sid/v1/admin/sessions.ts +923 -0
- package/src/generated/sid/v1/admin/settings.client.ts +340 -0
- package/src/generated/sid/v1/admin/settings.ts +2395 -0
- package/src/generated/sid/v1/admin/user_profile.client.ts +57 -0
- package/src/generated/sid/v1/admin/user_profile.ts +730 -0
- package/src/generated/sid/v1/admin/webhooks.client.ts +269 -0
- package/src/generated/sid/v1/admin/webhooks.ts +2804 -0
- package/src/generated/sid/v1/attestation/attestation.client.ts +115 -0
- package/src/generated/sid/v1/attestation/attestation.ts +813 -0
- package/src/generated/sid/v1/authn/auth.client.ts +900 -0
- package/src/generated/sid/v1/authn/auth.ts +9287 -0
- package/src/generated/sid/v1/authn/flows.client.ts +413 -0
- package/src/generated/sid/v1/authn/flows.ts +3217 -0
- package/src/generated/sid/v1/authz/authz.client.ts +459 -0
- package/src/generated/sid/v1/authz/authz.ts +5343 -0
- package/src/generated/sid/v1/authz/governance.client.ts +102 -0
- package/src/generated/sid/v1/authz/governance.ts +818 -0
- package/src/generated/sid/v1/common/errors.ts +184 -0
- package/src/generated/sid/v1/common/pagination.ts +152 -0
- package/src/generated/sid/v1/common/transport.ts +227 -0
- package/src/generated/sid/v1/common/types.ts +151 -0
- package/src/generated/sid/v1/events/event_stream.client.ts +67 -0
- package/src/generated/sid/v1/events/event_stream.ts +374 -0
- package/src/generated/sid/v1/federation/upstream.client.ts +142 -0
- package/src/generated/sid/v1/federation/upstream.ts +1736 -0
- package/src/generated/sid/v1/identity/identity.client.ts +467 -0
- package/src/generated/sid/v1/identity/identity.ts +5613 -0
- package/src/generated/sid/v1/machine/machine_user.client.ts +219 -0
- package/src/generated/sid/v1/machine/machine_user.ts +2400 -0
- package/src/generated/sid/v1/machine/pat.client.ts +147 -0
- package/src/generated/sid/v1/machine/pat.ts +1268 -0
- package/src/generated/sid/v1/projects/projects.client.ts +286 -0
- package/src/generated/sid/v1/projects/projects.ts +2714 -0
- package/src/generated/sid/v1/scim/scim.client.ts +274 -0
- package/src/generated/sid/v1/scim/scim.ts +3043 -0
- package/src/generated/sid/v1/test/test.client.ts +232 -0
- package/src/generated/sid/v1/test/test.ts +1136 -0
- package/src/i18n/index.ts +40 -0
- package/src/index.ts +157 -0
- package/src/profile/auth.ts +15 -0
- package/src/profile/components/ConsentManager.vue +88 -0
- package/src/profile/components/ProfileEditor.vue +146 -0
- package/src/profile/components/SecuritySettings.vue +170 -0
- package/src/profile/components/SessionList.vue +100 -0
- package/src/profile/components/SidLoginForm.test.ts +80 -0
- package/src/profile/components/SidLoginForm.vue +230 -0
- package/src/profile/components/SidMfaChallenge.test.ts +127 -0
- package/src/profile/components/SidMfaChallenge.vue +243 -0
- package/src/profile/components/SidRegistrationForm.test.ts +79 -0
- package/src/profile/components/SidRegistrationForm.vue +317 -0
- package/src/profile/components/index.ts +11 -0
- package/src/profile/composables/index.ts +6 -0
- package/src/profile/composables/useAccountApi.ts +203 -0
- package/src/profile/composables/useAuthApi.opaque.test.ts +140 -0
- package/src/profile/composables/useAuthApi.ts +617 -0
- package/src/profile/composables/useIdentityApi.ts +123 -0
- package/src/profile/composables/useLoginSuccess.test.ts +112 -0
- package/src/profile/composables/useLoginSuccess.ts +65 -0
- package/src/profile/composables/useOpaqueAuth.test.ts +290 -0
- package/src/profile/composables/useOpaqueAuth.ts +191 -0
- package/src/profile/composables/useSecurityLevel.test.ts +198 -0
- package/src/profile/composables/useSecurityLevel.ts +324 -0
- package/src/profile/index.ts +18 -0
- package/src/quasar/SidPrincipalInput.vue +209 -0
- package/src/quasar/index.ts +8 -0
- package/src/stores/auth.test.ts +83 -0
- package/src/stores/auth.ts +92 -0
- package/src/stores/index.ts +1 -0
- package/src/transport/adaptive.test.ts +728 -0
- package/src/transport/adaptive.ts +308 -0
- package/src/transport/framing.test.ts +227 -0
- package/src/transport/framing.ts +98 -0
- package/src/transport/webtransport.test.ts +728 -0
- package/src/transport/webtransport.ts +323 -0
- package/src/types/auth.ts +58 -0
- package/src/types/index.ts +1 -0
- package/src/utils/formatters.test.ts +26 -0
- package/src/utils/formatters.ts +69 -0
- package/src/utils/index.ts +16 -0
- package/src/utils/normalizePrincipal.test.ts +188 -0
- package/src/utils/normalizePrincipal.ts +159 -0
- package/src/utils/validators.test.ts +75 -0
- package/src/utils/validators.ts +36 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies
|
|
2
|
+
// @generated from protobuf file "sid/v1/admin/organizations.proto" (package "sid.v1.admin", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
|
5
|
+
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
|
6
|
+
import { SiteService } from "./organizations";
|
|
7
|
+
import type { UpdateSiteNameRequest } from "./organizations";
|
|
8
|
+
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
|
9
|
+
import type { SiteInfo } from "./organizations";
|
|
10
|
+
import type { GetSiteInfoRequest } from "./organizations";
|
|
11
|
+
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
12
|
+
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
|
13
|
+
/**
|
|
14
|
+
* @generated from protobuf service sid.v1.admin.SiteService
|
|
15
|
+
*/
|
|
16
|
+
export interface ISiteServiceClient {
|
|
17
|
+
/**
|
|
18
|
+
* Get site summary info (CE/EE).
|
|
19
|
+
*
|
|
20
|
+
* @generated from protobuf rpc: GetSiteInfo
|
|
21
|
+
*/
|
|
22
|
+
getSiteInfo(input: GetSiteInfoRequest, options?: RpcOptions): UnaryCall<GetSiteInfoRequest, SiteInfo>;
|
|
23
|
+
/**
|
|
24
|
+
* Update site name.
|
|
25
|
+
*
|
|
26
|
+
* @generated from protobuf rpc: UpdateSiteName
|
|
27
|
+
*/
|
|
28
|
+
updateSiteName(input: UpdateSiteNameRequest, options?: RpcOptions): UnaryCall<UpdateSiteNameRequest, SiteInfo>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @generated from protobuf service sid.v1.admin.SiteService
|
|
32
|
+
*/
|
|
33
|
+
export class SiteServiceClient implements ISiteServiceClient, ServiceInfo {
|
|
34
|
+
typeName = SiteService.typeName;
|
|
35
|
+
methods = SiteService.methods;
|
|
36
|
+
options = SiteService.options;
|
|
37
|
+
constructor(private readonly _transport: RpcTransport) {
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get site summary info (CE/EE).
|
|
41
|
+
*
|
|
42
|
+
* @generated from protobuf rpc: GetSiteInfo
|
|
43
|
+
*/
|
|
44
|
+
getSiteInfo(input: GetSiteInfoRequest, options?: RpcOptions): UnaryCall<GetSiteInfoRequest, SiteInfo> {
|
|
45
|
+
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
46
|
+
return stackIntercept<GetSiteInfoRequest, SiteInfo>("unary", this._transport, method, opt, input);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Update site name.
|
|
50
|
+
*
|
|
51
|
+
* @generated from protobuf rpc: UpdateSiteName
|
|
52
|
+
*/
|
|
53
|
+
updateSiteName(input: UpdateSiteNameRequest, options?: RpcOptions): UnaryCall<UpdateSiteNameRequest, SiteInfo> {
|
|
54
|
+
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
|
55
|
+
return stackIntercept<UpdateSiteNameRequest, SiteInfo>("unary", this._transport, method, opt, input);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies
|
|
2
|
+
// @generated from protobuf file "sid/v1/admin/organizations.proto" (package "sid.v1.admin", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
5
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
7
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
+
// ── Messages ──
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @generated from protobuf message sid.v1.admin.GetSiteInfoRequest
|
|
18
|
+
*/
|
|
19
|
+
export interface GetSiteInfoRequest {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @generated from protobuf message sid.v1.admin.SiteInfo
|
|
23
|
+
*/
|
|
24
|
+
export interface SiteInfo {
|
|
25
|
+
/**
|
|
26
|
+
* @generated from protobuf field: string site_name = 1
|
|
27
|
+
*/
|
|
28
|
+
siteName: string;
|
|
29
|
+
/**
|
|
30
|
+
* @generated from protobuf field: string version = 2
|
|
31
|
+
*/
|
|
32
|
+
version: string;
|
|
33
|
+
/**
|
|
34
|
+
* @generated from protobuf field: sid.v1.admin.EditionType edition = 3
|
|
35
|
+
*/
|
|
36
|
+
edition: EditionType;
|
|
37
|
+
/**
|
|
38
|
+
* @generated from protobuf field: string primary_domain = 4
|
|
39
|
+
*/
|
|
40
|
+
primaryDomain: string;
|
|
41
|
+
/**
|
|
42
|
+
* @generated from protobuf field: string admin_contact = 5
|
|
43
|
+
*/
|
|
44
|
+
adminContact: string;
|
|
45
|
+
/**
|
|
46
|
+
* Quick stats.
|
|
47
|
+
*
|
|
48
|
+
* @generated from protobuf field: sid.v1.admin.SiteStats stats = 6
|
|
49
|
+
*/
|
|
50
|
+
stats?: SiteStats;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf message sid.v1.admin.SiteStats
|
|
54
|
+
*/
|
|
55
|
+
export interface SiteStats {
|
|
56
|
+
/**
|
|
57
|
+
* @generated from protobuf field: uint64 total_users = 1
|
|
58
|
+
*/
|
|
59
|
+
totalUsers: bigint;
|
|
60
|
+
/**
|
|
61
|
+
* @generated from protobuf field: uint64 active_sessions = 2
|
|
62
|
+
*/
|
|
63
|
+
activeSessions: bigint;
|
|
64
|
+
/**
|
|
65
|
+
* @generated from protobuf field: uint64 applications_count = 3
|
|
66
|
+
*/
|
|
67
|
+
applicationsCount: bigint;
|
|
68
|
+
/**
|
|
69
|
+
* @generated from protobuf field: uint64 external_users = 4
|
|
70
|
+
*/
|
|
71
|
+
externalUsers: bigint;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @generated from protobuf message sid.v1.admin.UpdateSiteNameRequest
|
|
75
|
+
*/
|
|
76
|
+
export interface UpdateSiteNameRequest {
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf field: string site_name = 1
|
|
79
|
+
*/
|
|
80
|
+
siteName: string;
|
|
81
|
+
}
|
|
82
|
+
// ── Enums ──
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @generated from protobuf enum sid.v1.admin.EditionType
|
|
86
|
+
*/
|
|
87
|
+
export enum EditionType {
|
|
88
|
+
/**
|
|
89
|
+
* @generated from protobuf enum value: EDITION_TYPE_UNSPECIFIED = 0;
|
|
90
|
+
*/
|
|
91
|
+
UNSPECIFIED = 0,
|
|
92
|
+
/**
|
|
93
|
+
* @generated from protobuf enum value: EDITION_TYPE_CE = 1;
|
|
94
|
+
*/
|
|
95
|
+
CE = 1,
|
|
96
|
+
/**
|
|
97
|
+
* @generated from protobuf enum value: EDITION_TYPE_EE = 2;
|
|
98
|
+
*/
|
|
99
|
+
EE = 2
|
|
100
|
+
}
|
|
101
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
102
|
+
class GetSiteInfoRequest$Type extends MessageType<GetSiteInfoRequest> {
|
|
103
|
+
constructor() {
|
|
104
|
+
super("sid.v1.admin.GetSiteInfoRequest", []);
|
|
105
|
+
}
|
|
106
|
+
create(value?: PartialMessage<GetSiteInfoRequest>): GetSiteInfoRequest {
|
|
107
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
108
|
+
if (value !== undefined)
|
|
109
|
+
reflectionMergePartial<GetSiteInfoRequest>(this, message, value);
|
|
110
|
+
return message;
|
|
111
|
+
}
|
|
112
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetSiteInfoRequest): GetSiteInfoRequest {
|
|
113
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
114
|
+
while (reader.pos < end) {
|
|
115
|
+
let [fieldNo, wireType] = reader.tag();
|
|
116
|
+
switch (fieldNo) {
|
|
117
|
+
default:
|
|
118
|
+
let u = options.readUnknownField;
|
|
119
|
+
if (u === "throw")
|
|
120
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
121
|
+
let d = reader.skip(wireType);
|
|
122
|
+
if (u !== false)
|
|
123
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return message;
|
|
127
|
+
}
|
|
128
|
+
internalBinaryWrite(message: GetSiteInfoRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
129
|
+
let u = options.writeUnknownFields;
|
|
130
|
+
if (u !== false)
|
|
131
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
132
|
+
return writer;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @generated MessageType for protobuf message sid.v1.admin.GetSiteInfoRequest
|
|
137
|
+
*/
|
|
138
|
+
export const GetSiteInfoRequest = new GetSiteInfoRequest$Type();
|
|
139
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
140
|
+
class SiteInfo$Type extends MessageType<SiteInfo> {
|
|
141
|
+
constructor() {
|
|
142
|
+
super("sid.v1.admin.SiteInfo", [
|
|
143
|
+
{ no: 1, name: "site_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
144
|
+
{ no: 2, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
145
|
+
{ no: 3, name: "edition", kind: "enum", T: () => ["sid.v1.admin.EditionType", EditionType, "EDITION_TYPE_"] },
|
|
146
|
+
{ no: 4, name: "primary_domain", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
147
|
+
{ no: 5, name: "admin_contact", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
148
|
+
{ no: 6, name: "stats", kind: "message", T: () => SiteStats }
|
|
149
|
+
]);
|
|
150
|
+
}
|
|
151
|
+
create(value?: PartialMessage<SiteInfo>): SiteInfo {
|
|
152
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
153
|
+
message.siteName = "";
|
|
154
|
+
message.version = "";
|
|
155
|
+
message.edition = 0;
|
|
156
|
+
message.primaryDomain = "";
|
|
157
|
+
message.adminContact = "";
|
|
158
|
+
if (value !== undefined)
|
|
159
|
+
reflectionMergePartial<SiteInfo>(this, message, value);
|
|
160
|
+
return message;
|
|
161
|
+
}
|
|
162
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteInfo): SiteInfo {
|
|
163
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
164
|
+
while (reader.pos < end) {
|
|
165
|
+
let [fieldNo, wireType] = reader.tag();
|
|
166
|
+
switch (fieldNo) {
|
|
167
|
+
case /* string site_name */ 1:
|
|
168
|
+
message.siteName = reader.string();
|
|
169
|
+
break;
|
|
170
|
+
case /* string version */ 2:
|
|
171
|
+
message.version = reader.string();
|
|
172
|
+
break;
|
|
173
|
+
case /* sid.v1.admin.EditionType edition */ 3:
|
|
174
|
+
message.edition = reader.int32();
|
|
175
|
+
break;
|
|
176
|
+
case /* string primary_domain */ 4:
|
|
177
|
+
message.primaryDomain = reader.string();
|
|
178
|
+
break;
|
|
179
|
+
case /* string admin_contact */ 5:
|
|
180
|
+
message.adminContact = reader.string();
|
|
181
|
+
break;
|
|
182
|
+
case /* sid.v1.admin.SiteStats stats */ 6:
|
|
183
|
+
message.stats = SiteStats.internalBinaryRead(reader, reader.uint32(), options, message.stats);
|
|
184
|
+
break;
|
|
185
|
+
default:
|
|
186
|
+
let u = options.readUnknownField;
|
|
187
|
+
if (u === "throw")
|
|
188
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
189
|
+
let d = reader.skip(wireType);
|
|
190
|
+
if (u !== false)
|
|
191
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return message;
|
|
195
|
+
}
|
|
196
|
+
internalBinaryWrite(message: SiteInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
197
|
+
/* string site_name = 1; */
|
|
198
|
+
if (message.siteName !== "")
|
|
199
|
+
writer.tag(1, WireType.LengthDelimited).string(message.siteName);
|
|
200
|
+
/* string version = 2; */
|
|
201
|
+
if (message.version !== "")
|
|
202
|
+
writer.tag(2, WireType.LengthDelimited).string(message.version);
|
|
203
|
+
/* sid.v1.admin.EditionType edition = 3; */
|
|
204
|
+
if (message.edition !== 0)
|
|
205
|
+
writer.tag(3, WireType.Varint).int32(message.edition);
|
|
206
|
+
/* string primary_domain = 4; */
|
|
207
|
+
if (message.primaryDomain !== "")
|
|
208
|
+
writer.tag(4, WireType.LengthDelimited).string(message.primaryDomain);
|
|
209
|
+
/* string admin_contact = 5; */
|
|
210
|
+
if (message.adminContact !== "")
|
|
211
|
+
writer.tag(5, WireType.LengthDelimited).string(message.adminContact);
|
|
212
|
+
/* sid.v1.admin.SiteStats stats = 6; */
|
|
213
|
+
if (message.stats)
|
|
214
|
+
SiteStats.internalBinaryWrite(message.stats, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
215
|
+
let u = options.writeUnknownFields;
|
|
216
|
+
if (u !== false)
|
|
217
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
218
|
+
return writer;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* @generated MessageType for protobuf message sid.v1.admin.SiteInfo
|
|
223
|
+
*/
|
|
224
|
+
export const SiteInfo = new SiteInfo$Type();
|
|
225
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
226
|
+
class SiteStats$Type extends MessageType<SiteStats> {
|
|
227
|
+
constructor() {
|
|
228
|
+
super("sid.v1.admin.SiteStats", [
|
|
229
|
+
{ no: 1, name: "total_users", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
230
|
+
{ no: 2, name: "active_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
231
|
+
{ no: 3, name: "applications_count", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
232
|
+
{ no: 4, name: "external_users", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
|
|
233
|
+
]);
|
|
234
|
+
}
|
|
235
|
+
create(value?: PartialMessage<SiteStats>): SiteStats {
|
|
236
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
237
|
+
message.totalUsers = 0n;
|
|
238
|
+
message.activeSessions = 0n;
|
|
239
|
+
message.applicationsCount = 0n;
|
|
240
|
+
message.externalUsers = 0n;
|
|
241
|
+
if (value !== undefined)
|
|
242
|
+
reflectionMergePartial<SiteStats>(this, message, value);
|
|
243
|
+
return message;
|
|
244
|
+
}
|
|
245
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteStats): SiteStats {
|
|
246
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
247
|
+
while (reader.pos < end) {
|
|
248
|
+
let [fieldNo, wireType] = reader.tag();
|
|
249
|
+
switch (fieldNo) {
|
|
250
|
+
case /* uint64 total_users */ 1:
|
|
251
|
+
message.totalUsers = reader.uint64().toBigInt();
|
|
252
|
+
break;
|
|
253
|
+
case /* uint64 active_sessions */ 2:
|
|
254
|
+
message.activeSessions = reader.uint64().toBigInt();
|
|
255
|
+
break;
|
|
256
|
+
case /* uint64 applications_count */ 3:
|
|
257
|
+
message.applicationsCount = reader.uint64().toBigInt();
|
|
258
|
+
break;
|
|
259
|
+
case /* uint64 external_users */ 4:
|
|
260
|
+
message.externalUsers = reader.uint64().toBigInt();
|
|
261
|
+
break;
|
|
262
|
+
default:
|
|
263
|
+
let u = options.readUnknownField;
|
|
264
|
+
if (u === "throw")
|
|
265
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
266
|
+
let d = reader.skip(wireType);
|
|
267
|
+
if (u !== false)
|
|
268
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return message;
|
|
272
|
+
}
|
|
273
|
+
internalBinaryWrite(message: SiteStats, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
274
|
+
/* uint64 total_users = 1; */
|
|
275
|
+
if (message.totalUsers !== 0n)
|
|
276
|
+
writer.tag(1, WireType.Varint).uint64(message.totalUsers);
|
|
277
|
+
/* uint64 active_sessions = 2; */
|
|
278
|
+
if (message.activeSessions !== 0n)
|
|
279
|
+
writer.tag(2, WireType.Varint).uint64(message.activeSessions);
|
|
280
|
+
/* uint64 applications_count = 3; */
|
|
281
|
+
if (message.applicationsCount !== 0n)
|
|
282
|
+
writer.tag(3, WireType.Varint).uint64(message.applicationsCount);
|
|
283
|
+
/* uint64 external_users = 4; */
|
|
284
|
+
if (message.externalUsers !== 0n)
|
|
285
|
+
writer.tag(4, WireType.Varint).uint64(message.externalUsers);
|
|
286
|
+
let u = options.writeUnknownFields;
|
|
287
|
+
if (u !== false)
|
|
288
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
289
|
+
return writer;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* @generated MessageType for protobuf message sid.v1.admin.SiteStats
|
|
294
|
+
*/
|
|
295
|
+
export const SiteStats = new SiteStats$Type();
|
|
296
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
297
|
+
class UpdateSiteNameRequest$Type extends MessageType<UpdateSiteNameRequest> {
|
|
298
|
+
constructor() {
|
|
299
|
+
super("sid.v1.admin.UpdateSiteNameRequest", [
|
|
300
|
+
{ no: 1, name: "site_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
301
|
+
]);
|
|
302
|
+
}
|
|
303
|
+
create(value?: PartialMessage<UpdateSiteNameRequest>): UpdateSiteNameRequest {
|
|
304
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
305
|
+
message.siteName = "";
|
|
306
|
+
if (value !== undefined)
|
|
307
|
+
reflectionMergePartial<UpdateSiteNameRequest>(this, message, value);
|
|
308
|
+
return message;
|
|
309
|
+
}
|
|
310
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSiteNameRequest): UpdateSiteNameRequest {
|
|
311
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
312
|
+
while (reader.pos < end) {
|
|
313
|
+
let [fieldNo, wireType] = reader.tag();
|
|
314
|
+
switch (fieldNo) {
|
|
315
|
+
case /* string site_name */ 1:
|
|
316
|
+
message.siteName = reader.string();
|
|
317
|
+
break;
|
|
318
|
+
default:
|
|
319
|
+
let u = options.readUnknownField;
|
|
320
|
+
if (u === "throw")
|
|
321
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
322
|
+
let d = reader.skip(wireType);
|
|
323
|
+
if (u !== false)
|
|
324
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return message;
|
|
328
|
+
}
|
|
329
|
+
internalBinaryWrite(message: UpdateSiteNameRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
330
|
+
/* string site_name = 1; */
|
|
331
|
+
if (message.siteName !== "")
|
|
332
|
+
writer.tag(1, WireType.LengthDelimited).string(message.siteName);
|
|
333
|
+
let u = options.writeUnknownFields;
|
|
334
|
+
if (u !== false)
|
|
335
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
336
|
+
return writer;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* @generated MessageType for protobuf message sid.v1.admin.UpdateSiteNameRequest
|
|
341
|
+
*/
|
|
342
|
+
export const UpdateSiteNameRequest = new UpdateSiteNameRequest$Type();
|
|
343
|
+
/**
|
|
344
|
+
* @generated ServiceType for protobuf service sid.v1.admin.SiteService
|
|
345
|
+
*/
|
|
346
|
+
export const SiteService = new ServiceType("sid.v1.admin.SiteService", [
|
|
347
|
+
{ name: "GetSiteInfo", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/admin/site" } }, I: GetSiteInfoRequest, O: SiteInfo },
|
|
348
|
+
{ name: "UpdateSiteName", options: { "google.api.http": { patch: "/v1/admin/site/name", body: "*" } }, I: UpdateSiteNameRequest, O: SiteInfo }
|
|
349
|
+
]);
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies
|
|
2
|
+
// @generated from protobuf file "sid/v1/admin/scopes.proto" (package "sid.v1.admin", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
|
5
|
+
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
|
6
|
+
import { ScopeService } from "./scopes";
|
|
7
|
+
import type { DeleteClaimMappingRequest } from "./scopes";
|
|
8
|
+
import type { UpdateClaimMappingRequest } from "./scopes";
|
|
9
|
+
import type { ClaimMapping } from "./scopes";
|
|
10
|
+
import type { AddClaimMappingRequest } from "./scopes";
|
|
11
|
+
import type { ListClaimMappingsResponse } from "./scopes";
|
|
12
|
+
import type { ListClaimMappingsRequest } from "./scopes";
|
|
13
|
+
import type { RealmScopeDefaults } from "./scopes";
|
|
14
|
+
import type { DeleteScopeRequest } from "./scopes";
|
|
15
|
+
import type { UpdateScopeRequest } from "./scopes";
|
|
16
|
+
import type { CreateScopeRequest } from "./scopes";
|
|
17
|
+
import type { Scope } from "./scopes";
|
|
18
|
+
import type { GetScopeRequest } from "./scopes";
|
|
19
|
+
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
|
20
|
+
import type { ListScopesResponse } from "./scopes";
|
|
21
|
+
import type { Empty } from "../../../google/protobuf/empty";
|
|
22
|
+
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
23
|
+
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
|
24
|
+
/**
|
|
25
|
+
* ── Scope CRUD ──
|
|
26
|
+
*
|
|
27
|
+
* @generated from protobuf service sid.v1.admin.ScopeService
|
|
28
|
+
*/
|
|
29
|
+
export interface IScopeServiceClient {
|
|
30
|
+
/**
|
|
31
|
+
* @generated from protobuf rpc: ListScopes
|
|
32
|
+
*/
|
|
33
|
+
listScopes(input: Empty, options?: RpcOptions): UnaryCall<Empty, ListScopesResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* @generated from protobuf rpc: GetScope
|
|
36
|
+
*/
|
|
37
|
+
getScope(input: GetScopeRequest, options?: RpcOptions): UnaryCall<GetScopeRequest, Scope>;
|
|
38
|
+
/**
|
|
39
|
+
* @generated from protobuf rpc: CreateScope
|
|
40
|
+
*/
|
|
41
|
+
createScope(input: CreateScopeRequest, options?: RpcOptions): UnaryCall<CreateScopeRequest, Scope>;
|
|
42
|
+
/**
|
|
43
|
+
* @generated from protobuf rpc: UpdateScope
|
|
44
|
+
*/
|
|
45
|
+
updateScope(input: UpdateScopeRequest, options?: RpcOptions): UnaryCall<UpdateScopeRequest, Scope>;
|
|
46
|
+
/**
|
|
47
|
+
* @generated from protobuf rpc: DeleteScope
|
|
48
|
+
*/
|
|
49
|
+
deleteScope(input: DeleteScopeRequest, options?: RpcOptions): UnaryCall<DeleteScopeRequest, Empty>;
|
|
50
|
+
// ── Realm Defaults ──
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf rpc: GetRealmDefaults
|
|
54
|
+
*/
|
|
55
|
+
getRealmDefaults(input: Empty, options?: RpcOptions): UnaryCall<Empty, RealmScopeDefaults>;
|
|
56
|
+
/**
|
|
57
|
+
* @generated from protobuf rpc: UpdateRealmDefaults
|
|
58
|
+
*/
|
|
59
|
+
updateRealmDefaults(input: RealmScopeDefaults, options?: RpcOptions): UnaryCall<RealmScopeDefaults, RealmScopeDefaults>;
|
|
60
|
+
// ── Claim Mappings ──
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @generated from protobuf rpc: ListClaimMappings
|
|
64
|
+
*/
|
|
65
|
+
listClaimMappings(input: ListClaimMappingsRequest, options?: RpcOptions): UnaryCall<ListClaimMappingsRequest, ListClaimMappingsResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* @generated from protobuf rpc: AddClaimMapping
|
|
68
|
+
*/
|
|
69
|
+
addClaimMapping(input: AddClaimMappingRequest, options?: RpcOptions): UnaryCall<AddClaimMappingRequest, ClaimMapping>;
|
|
70
|
+
/**
|
|
71
|
+
* @generated from protobuf rpc: UpdateClaimMapping
|
|
72
|
+
*/
|
|
73
|
+
updateClaimMapping(input: UpdateClaimMappingRequest, options?: RpcOptions): UnaryCall<UpdateClaimMappingRequest, ClaimMapping>;
|
|
74
|
+
/**
|
|
75
|
+
* @generated from protobuf rpc: DeleteClaimMapping
|
|
76
|
+
*/
|
|
77
|
+
deleteClaimMapping(input: DeleteClaimMappingRequest, options?: RpcOptions): UnaryCall<DeleteClaimMappingRequest, Empty>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* ── Scope CRUD ──
|
|
81
|
+
*
|
|
82
|
+
* @generated from protobuf service sid.v1.admin.ScopeService
|
|
83
|
+
*/
|
|
84
|
+
export class ScopeServiceClient implements IScopeServiceClient, ServiceInfo {
|
|
85
|
+
typeName = ScopeService.typeName;
|
|
86
|
+
methods = ScopeService.methods;
|
|
87
|
+
options = ScopeService.options;
|
|
88
|
+
constructor(private readonly _transport: RpcTransport) {
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @generated from protobuf rpc: ListScopes
|
|
92
|
+
*/
|
|
93
|
+
listScopes(input: Empty, options?: RpcOptions): UnaryCall<Empty, ListScopesResponse> {
|
|
94
|
+
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
95
|
+
return stackIntercept<Empty, ListScopesResponse>("unary", this._transport, method, opt, input);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @generated from protobuf rpc: GetScope
|
|
99
|
+
*/
|
|
100
|
+
getScope(input: GetScopeRequest, options?: RpcOptions): UnaryCall<GetScopeRequest, Scope> {
|
|
101
|
+
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
|
102
|
+
return stackIntercept<GetScopeRequest, Scope>("unary", this._transport, method, opt, input);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @generated from protobuf rpc: CreateScope
|
|
106
|
+
*/
|
|
107
|
+
createScope(input: CreateScopeRequest, options?: RpcOptions): UnaryCall<CreateScopeRequest, Scope> {
|
|
108
|
+
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
|
109
|
+
return stackIntercept<CreateScopeRequest, Scope>("unary", this._transport, method, opt, input);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @generated from protobuf rpc: UpdateScope
|
|
113
|
+
*/
|
|
114
|
+
updateScope(input: UpdateScopeRequest, options?: RpcOptions): UnaryCall<UpdateScopeRequest, Scope> {
|
|
115
|
+
const method = this.methods[3], opt = this._transport.mergeOptions(options);
|
|
116
|
+
return stackIntercept<UpdateScopeRequest, Scope>("unary", this._transport, method, opt, input);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* @generated from protobuf rpc: DeleteScope
|
|
120
|
+
*/
|
|
121
|
+
deleteScope(input: DeleteScopeRequest, options?: RpcOptions): UnaryCall<DeleteScopeRequest, Empty> {
|
|
122
|
+
const method = this.methods[4], opt = this._transport.mergeOptions(options);
|
|
123
|
+
return stackIntercept<DeleteScopeRequest, Empty>("unary", this._transport, method, opt, input);
|
|
124
|
+
}
|
|
125
|
+
// ── Realm Defaults ──
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @generated from protobuf rpc: GetRealmDefaults
|
|
129
|
+
*/
|
|
130
|
+
getRealmDefaults(input: Empty, options?: RpcOptions): UnaryCall<Empty, RealmScopeDefaults> {
|
|
131
|
+
const method = this.methods[5], opt = this._transport.mergeOptions(options);
|
|
132
|
+
return stackIntercept<Empty, RealmScopeDefaults>("unary", this._transport, method, opt, input);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* @generated from protobuf rpc: UpdateRealmDefaults
|
|
136
|
+
*/
|
|
137
|
+
updateRealmDefaults(input: RealmScopeDefaults, options?: RpcOptions): UnaryCall<RealmScopeDefaults, RealmScopeDefaults> {
|
|
138
|
+
const method = this.methods[6], opt = this._transport.mergeOptions(options);
|
|
139
|
+
return stackIntercept<RealmScopeDefaults, RealmScopeDefaults>("unary", this._transport, method, opt, input);
|
|
140
|
+
}
|
|
141
|
+
// ── Claim Mappings ──
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @generated from protobuf rpc: ListClaimMappings
|
|
145
|
+
*/
|
|
146
|
+
listClaimMappings(input: ListClaimMappingsRequest, options?: RpcOptions): UnaryCall<ListClaimMappingsRequest, ListClaimMappingsResponse> {
|
|
147
|
+
const method = this.methods[7], opt = this._transport.mergeOptions(options);
|
|
148
|
+
return stackIntercept<ListClaimMappingsRequest, ListClaimMappingsResponse>("unary", this._transport, method, opt, input);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @generated from protobuf rpc: AddClaimMapping
|
|
152
|
+
*/
|
|
153
|
+
addClaimMapping(input: AddClaimMappingRequest, options?: RpcOptions): UnaryCall<AddClaimMappingRequest, ClaimMapping> {
|
|
154
|
+
const method = this.methods[8], opt = this._transport.mergeOptions(options);
|
|
155
|
+
return stackIntercept<AddClaimMappingRequest, ClaimMapping>("unary", this._transport, method, opt, input);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* @generated from protobuf rpc: UpdateClaimMapping
|
|
159
|
+
*/
|
|
160
|
+
updateClaimMapping(input: UpdateClaimMappingRequest, options?: RpcOptions): UnaryCall<UpdateClaimMappingRequest, ClaimMapping> {
|
|
161
|
+
const method = this.methods[9], opt = this._transport.mergeOptions(options);
|
|
162
|
+
return stackIntercept<UpdateClaimMappingRequest, ClaimMapping>("unary", this._transport, method, opt, input);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* @generated from protobuf rpc: DeleteClaimMapping
|
|
166
|
+
*/
|
|
167
|
+
deleteClaimMapping(input: DeleteClaimMappingRequest, options?: RpcOptions): UnaryCall<DeleteClaimMappingRequest, Empty> {
|
|
168
|
+
const method = this.methods[10], opt = this._transport.mergeOptions(options);
|
|
169
|
+
return stackIntercept<DeleteClaimMappingRequest, Empty>("unary", this._transport, method, opt, input);
|
|
170
|
+
}
|
|
171
|
+
}
|