@structured-id/ui-core 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +9 -5
  2. package/dist/browser-vp/index.d.cts +0 -11
  3. package/dist/browser-vp/index.d.ts +0 -11
  4. package/dist/index.cjs +13721 -9514
  5. package/dist/index.d.cts +4362 -2375
  6. package/dist/index.d.ts +4362 -2375
  7. package/dist/index.js +13937 -9730
  8. package/package.json +3 -3
  9. package/src/browser-vp/crypto.ts +0 -1
  10. package/src/browser-vp/index.ts +0 -2
  11. package/src/browser-vp/prf.ts +0 -2
  12. package/src/browser-vp/storage.ts +0 -2
  13. package/src/browser-vp/types.ts +0 -2
  14. package/src/browser-vp/vp.ts +0 -2
  15. package/src/composables/index.ts +6 -1
  16. package/src/composables/useAccountTransport.test.ts +121 -0
  17. package/src/composables/useAccountTransport.ts +69 -0
  18. package/src/composables/useBffAuth.ts +44 -34
  19. package/src/generated/google/api/httpbody.ts +159 -0
  20. package/src/generated/google/protobuf/any.ts +326 -0
  21. package/src/generated/google/rpc/error_details.ts +1386 -0
  22. package/src/generated/google/rpc/status.ts +127 -0
  23. package/src/generated/sid/v1/account/account.ts +1 -1
  24. package/src/generated/sid/v1/admin/admin.client.ts +15 -12
  25. package/src/generated/sid/v1/admin/admin.ts +24 -89
  26. package/src/generated/sid/v1/admin/enrollment.client.ts +24 -12
  27. package/src/generated/sid/v1/admin/enrollment.ts +65 -3
  28. package/src/generated/sid/v1/admin/events.client.ts +8 -8
  29. package/src/generated/sid/v1/admin/flow.ts +1 -1
  30. package/src/generated/sid/v1/admin/keys.ts +1 -1
  31. package/src/generated/sid/v1/admin/notifications.client.ts +12 -6
  32. package/src/generated/sid/v1/admin/notifications.ts +11 -70
  33. package/src/generated/sid/v1/admin/operations.ts +20 -35
  34. package/src/generated/sid/v1/admin/organizations.client.ts +2 -2
  35. package/src/generated/sid/v1/admin/organizations.ts +15 -32
  36. package/src/generated/sid/v1/admin/provisioning.client.ts +232 -0
  37. package/src/generated/sid/v1/admin/provisioning.ts +1383 -0
  38. package/src/generated/sid/v1/admin/scopes.ts +1 -1
  39. package/src/generated/sid/v1/admin/security.client.ts +22 -24
  40. package/src/generated/sid/v1/admin/security.ts +13 -22
  41. package/src/generated/sid/v1/admin/settings.client.ts +29 -18
  42. package/src/generated/sid/v1/admin/settings.ts +2 -82
  43. package/src/generated/sid/v1/attestation/attestation.client.ts +6 -6
  44. package/src/generated/sid/v1/attestation/attestation.ts +8 -8
  45. package/src/generated/sid/v1/authn/auth.client.ts +101 -58
  46. package/src/generated/sid/v1/authn/auth.ts +842 -414
  47. package/src/generated/sid/v1/authn/flows.ts +0 -12
  48. package/src/generated/sid/v1/authn/issuer.client.ts +489 -0
  49. package/src/generated/sid/v1/authn/issuer.ts +1600 -0
  50. package/src/generated/sid/v1/authn/password_history.client.ts +57 -0
  51. package/src/generated/sid/v1/authn/password_history.ts +578 -0
  52. package/src/generated/sid/v1/authn/system_integration.client.ts +73 -0
  53. package/src/generated/sid/v1/authn/system_integration.ts +218 -0
  54. package/src/generated/sid/v1/authz/authz.ts +1498 -317
  55. package/src/generated/sid/v1/authz/forward_auth.client.ts +97 -0
  56. package/src/generated/sid/v1/authz/forward_auth.ts +79 -0
  57. package/src/generated/sid/v1/authz/governance.client.ts +2 -2
  58. package/src/generated/sid/v1/authz/governance.ts +61 -4
  59. package/src/generated/sid/v1/common/errors.ts +532 -6
  60. package/src/generated/sid/v1/events/event_stream.client.ts +2 -2
  61. package/src/generated/sid/v1/events/event_stream.ts +2 -1
  62. package/src/generated/sid/v1/identity/identity.ts +98 -58
  63. package/src/generated/sid/v1/ids/ids.ts +395 -0
  64. package/src/generated/sid/v1/machine/machine_user.ts +0 -36
  65. package/src/generated/sid/v1/machine/pat.client.ts +2 -19
  66. package/src/generated/sid/v1/machine/pat.ts +1 -186
  67. package/src/generated/sid/v1/projects/projects.client.ts +137 -19
  68. package/src/generated/sid/v1/projects/projects.ts +2105 -405
  69. package/src/generated/sid/v1/scim/scim.client.ts +248 -2
  70. package/src/generated/sid/v1/scim/scim.ts +153 -14
  71. package/src/generated/sid/v1/test/test.ts +1 -1
  72. package/src/i18n/index.ts +0 -11
  73. package/src/index.ts +36 -2
  74. package/src/package-exports.test.ts +18 -0
  75. package/src/profile/components/SidLoginForm.vue +5 -2
  76. package/src/profile/components/SidRegistrationForm.test.ts +58 -1
  77. package/src/profile/components/SidRegistrationForm.vue +110 -12
  78. package/src/profile/components/index.ts +4 -0
  79. package/src/profile/composables/index.ts +2 -1
  80. package/src/profile/composables/useAccountApi.ts +20 -7
  81. package/src/profile/composables/useAuth.test.ts +453 -0
  82. package/src/profile/composables/useAuth.ts +414 -0
  83. package/src/profile/composables/useAuthApi.opaque.test.ts +18 -0
  84. package/src/profile/composables/useAuthApi.ts +188 -20
  85. package/src/profile/composables/useEnrollmentApi.test.ts +33 -0
  86. package/src/profile/composables/useEnrollmentApi.ts +26 -0
  87. package/src/profile/composables/useIdentityApi.ts +17 -7
  88. package/src/profile/composables/useLoginSuccess.test.ts +97 -3
  89. package/src/profile/composables/useLoginSuccess.ts +80 -22
  90. package/src/profile/composables/useSecurityLevel.test.ts +10 -3
  91. package/src/profile/composables/useSecurityLevel.ts +12 -3
  92. package/src/quasar/SidPrincipalInput.vue +4 -7
  93. package/src/utils/normalizePrincipal.test.ts +19 -5
  94. package/src/utils/normalizePrincipal.ts +7 -9
  95. package/src/utils/rpcRefusal.test.ts +151 -0
  96. package/src/utils/rpcRefusal.ts +252 -0
  97. package/src/utils/validators.test.ts +9 -0
  98. package/src/utils/validators.ts +14 -2
  99. package/src/composables/useAuth.ts +0 -40
  100. package/src/profile/composables/useOpaqueAuth.test.ts +0 -290
  101. package/src/profile/composables/useOpaqueAuth.ts +0 -191
@@ -0,0 +1,232 @@
1
+ // @generated by protobuf-ts 2.11.1 with parameter client_generic,generate_dependencies
2
+ // @generated from protobuf file "sid/v1/admin/provisioning.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 { ProvisioningService } from "./provisioning";
7
+ import type { Empty } from "../../../google/protobuf/empty";
8
+ import type { RevokeConnectorCredentialRequest } from "./provisioning";
9
+ import type { RotateConnectorCredentialRequest } from "./provisioning";
10
+ import type { IssuedConnectorCredential } from "./provisioning";
11
+ import type { CreateConnectorCredentialRequest } from "./provisioning";
12
+ import type { ListConnectorCredentialsResponse } from "./provisioning";
13
+ import type { ListConnectorCredentialsRequest } from "./provisioning";
14
+ import type { ScimInboundConfig } from "./provisioning";
15
+ import type { GetScimInboundConfigRequest } from "./provisioning";
16
+ import type { ChangeProvisioningConnectorStateRequest } from "./provisioning";
17
+ import type { RenameProvisioningConnectorRequest } from "./provisioning";
18
+ import type { GetProvisioningConnectorRequest } from "./provisioning";
19
+ import type { ProvisioningConnector } from "./provisioning";
20
+ import type { CreateInboundConnectorRequest } from "./provisioning";
21
+ import { stackIntercept } from "@protobuf-ts/runtime-rpc";
22
+ import type { ListProvisioningConnectorsResponse } from "./provisioning";
23
+ import type { ListProvisioningConnectorsRequest } from "./provisioning";
24
+ import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
25
+ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
26
+ /**
27
+ * ProvisioningService manages provisioning connectors and their credentials.
28
+ *
29
+ * ── Connectors ──
30
+ *
31
+ * @generated from protobuf service sid.v1.admin.ProvisioningService
32
+ */
33
+ export interface IProvisioningServiceClient {
34
+ /**
35
+ * Every connector of the organization, retired ones included, newest first.
36
+ *
37
+ * @generated from protobuf rpc: ListProvisioningConnectors
38
+ */
39
+ listProvisioningConnectors(input: ListProvisioningConnectorsRequest, options?: RpcOptions): UnaryCall<ListProvisioningConnectorsRequest, ListProvisioningConnectorsResponse>;
40
+ /**
41
+ * Register an inbound connector: a directory source that will send SCIM to
42
+ * this organization. It starts active, with no credential and no grant.
43
+ * Keyed: a retry with the same idempotency key returns the connector the
44
+ * first attempt created.
45
+ *
46
+ * @generated from protobuf rpc: CreateInboundConnector
47
+ */
48
+ createInboundConnector(input: CreateInboundConnectorRequest, options?: RpcOptions): UnaryCall<CreateInboundConnectorRequest, ProvisioningConnector>;
49
+ /**
50
+ * @generated from protobuf rpc: GetProvisioningConnector
51
+ */
52
+ getProvisioningConnector(input: GetProvisioningConnectorRequest, options?: RpcOptions): UnaryCall<GetProvisioningConnectorRequest, ProvisioningConnector>;
53
+ /**
54
+ * Rename a connector still at `revision`; its identity and credentials stay.
55
+ * A changed connector is ABORTED (CONCURRENT_MODIFICATION), a retired one
56
+ * FAILED_PRECONDITION.
57
+ *
58
+ * @generated from protobuf rpc: RenameProvisioningConnector
59
+ */
60
+ renameProvisioningConnector(input: RenameProvisioningConnectorRequest, options?: RpcOptions): UnaryCall<RenameProvisioningConnectorRequest, ProvisioningConnector>;
61
+ /**
62
+ * Disable, enable again, or retire a connector. Disabling stops every
63
+ * request of it at once, its credentials kept; it deactivates no user.
64
+ * Retiring is final and revokes its credentials. A step that is no
65
+ * lifecycle transition is FAILED_PRECONDITION; moving to the state it
66
+ * already has returns it unchanged.
67
+ *
68
+ * @generated from protobuf rpc: ChangeProvisioningConnectorState
69
+ */
70
+ changeProvisioningConnectorState(input: ChangeProvisioningConnectorStateRequest, options?: RpcOptions): UnaryCall<ChangeProvisioningConnectorStateRequest, ProvisioningConnector>;
71
+ /**
72
+ * What an inbound connector's SCIM client is configured with.
73
+ *
74
+ * @generated from protobuf rpc: GetScimInboundConfig
75
+ */
76
+ getScimInboundConfig(input: GetScimInboundConfigRequest, options?: RpcOptions): UnaryCall<GetScimInboundConfigRequest, ScimInboundConfig>;
77
+ // ── Credentials of an inbound connector ──
78
+
79
+ /**
80
+ * A connector's credentials, revoked ones included: metadata only.
81
+ *
82
+ * @generated from protobuf rpc: ListConnectorCredentials
83
+ */
84
+ listConnectorCredentials(input: ListConnectorCredentialsRequest, options?: RpcOptions): UnaryCall<ListConnectorCredentialsRequest, ListConnectorCredentialsResponse>;
85
+ /**
86
+ * Issue a credential of an active inbound connector; the secret is in the
87
+ * response only. A connector holds at most two usable credentials
88
+ * (RESOURCE_EXHAUSTED beyond). Keyed: a retry with the same idempotency
89
+ * key returns the credential the first attempt created, without its
90
+ * secret; a lost secret is replaced through RotateConnectorCredential.
91
+ *
92
+ * @generated from protobuf rpc: CreateConnectorCredential
93
+ */
94
+ createConnectorCredential(input: CreateConnectorCredentialRequest, options?: RpcOptions): UnaryCall<CreateConnectorCredentialRequest, IssuedConnectorCredential>;
95
+ /**
96
+ * Replace an active credential: a new one is issued (its secret in the
97
+ * response only) and the old one keeps working for the rotation grace
98
+ * period, so the client can switch without an outage. Keyed like
99
+ * CreateConnectorCredential.
100
+ *
101
+ * @generated from protobuf rpc: RotateConnectorCredential
102
+ */
103
+ rotateConnectorCredential(input: RotateConnectorCredentialRequest, options?: RpcOptions): UnaryCall<RotateConnectorCredentialRequest, IssuedConnectorCredential>;
104
+ /**
105
+ * Revoke a credential at once, with no grace. Revoking one already
106
+ * revoked is a no-op.
107
+ *
108
+ * @generated from protobuf rpc: RevokeConnectorCredential
109
+ */
110
+ revokeConnectorCredential(input: RevokeConnectorCredentialRequest, options?: RpcOptions): UnaryCall<RevokeConnectorCredentialRequest, Empty>;
111
+ }
112
+ /**
113
+ * ProvisioningService manages provisioning connectors and their credentials.
114
+ *
115
+ * ── Connectors ──
116
+ *
117
+ * @generated from protobuf service sid.v1.admin.ProvisioningService
118
+ */
119
+ export class ProvisioningServiceClient implements IProvisioningServiceClient, ServiceInfo {
120
+ typeName = ProvisioningService.typeName;
121
+ methods = ProvisioningService.methods;
122
+ options = ProvisioningService.options;
123
+ constructor(private readonly _transport: RpcTransport) {
124
+ }
125
+ /**
126
+ * Every connector of the organization, retired ones included, newest first.
127
+ *
128
+ * @generated from protobuf rpc: ListProvisioningConnectors
129
+ */
130
+ listProvisioningConnectors(input: ListProvisioningConnectorsRequest, options?: RpcOptions): UnaryCall<ListProvisioningConnectorsRequest, ListProvisioningConnectorsResponse> {
131
+ const method = this.methods[0], opt = this._transport.mergeOptions(options);
132
+ return stackIntercept<ListProvisioningConnectorsRequest, ListProvisioningConnectorsResponse>("unary", this._transport, method, opt, input);
133
+ }
134
+ /**
135
+ * Register an inbound connector: a directory source that will send SCIM to
136
+ * this organization. It starts active, with no credential and no grant.
137
+ * Keyed: a retry with the same idempotency key returns the connector the
138
+ * first attempt created.
139
+ *
140
+ * @generated from protobuf rpc: CreateInboundConnector
141
+ */
142
+ createInboundConnector(input: CreateInboundConnectorRequest, options?: RpcOptions): UnaryCall<CreateInboundConnectorRequest, ProvisioningConnector> {
143
+ const method = this.methods[1], opt = this._transport.mergeOptions(options);
144
+ return stackIntercept<CreateInboundConnectorRequest, ProvisioningConnector>("unary", this._transport, method, opt, input);
145
+ }
146
+ /**
147
+ * @generated from protobuf rpc: GetProvisioningConnector
148
+ */
149
+ getProvisioningConnector(input: GetProvisioningConnectorRequest, options?: RpcOptions): UnaryCall<GetProvisioningConnectorRequest, ProvisioningConnector> {
150
+ const method = this.methods[2], opt = this._transport.mergeOptions(options);
151
+ return stackIntercept<GetProvisioningConnectorRequest, ProvisioningConnector>("unary", this._transport, method, opt, input);
152
+ }
153
+ /**
154
+ * Rename a connector still at `revision`; its identity and credentials stay.
155
+ * A changed connector is ABORTED (CONCURRENT_MODIFICATION), a retired one
156
+ * FAILED_PRECONDITION.
157
+ *
158
+ * @generated from protobuf rpc: RenameProvisioningConnector
159
+ */
160
+ renameProvisioningConnector(input: RenameProvisioningConnectorRequest, options?: RpcOptions): UnaryCall<RenameProvisioningConnectorRequest, ProvisioningConnector> {
161
+ const method = this.methods[3], opt = this._transport.mergeOptions(options);
162
+ return stackIntercept<RenameProvisioningConnectorRequest, ProvisioningConnector>("unary", this._transport, method, opt, input);
163
+ }
164
+ /**
165
+ * Disable, enable again, or retire a connector. Disabling stops every
166
+ * request of it at once, its credentials kept; it deactivates no user.
167
+ * Retiring is final and revokes its credentials. A step that is no
168
+ * lifecycle transition is FAILED_PRECONDITION; moving to the state it
169
+ * already has returns it unchanged.
170
+ *
171
+ * @generated from protobuf rpc: ChangeProvisioningConnectorState
172
+ */
173
+ changeProvisioningConnectorState(input: ChangeProvisioningConnectorStateRequest, options?: RpcOptions): UnaryCall<ChangeProvisioningConnectorStateRequest, ProvisioningConnector> {
174
+ const method = this.methods[4], opt = this._transport.mergeOptions(options);
175
+ return stackIntercept<ChangeProvisioningConnectorStateRequest, ProvisioningConnector>("unary", this._transport, method, opt, input);
176
+ }
177
+ /**
178
+ * What an inbound connector's SCIM client is configured with.
179
+ *
180
+ * @generated from protobuf rpc: GetScimInboundConfig
181
+ */
182
+ getScimInboundConfig(input: GetScimInboundConfigRequest, options?: RpcOptions): UnaryCall<GetScimInboundConfigRequest, ScimInboundConfig> {
183
+ const method = this.methods[5], opt = this._transport.mergeOptions(options);
184
+ return stackIntercept<GetScimInboundConfigRequest, ScimInboundConfig>("unary", this._transport, method, opt, input);
185
+ }
186
+ // ── Credentials of an inbound connector ──
187
+
188
+ /**
189
+ * A connector's credentials, revoked ones included: metadata only.
190
+ *
191
+ * @generated from protobuf rpc: ListConnectorCredentials
192
+ */
193
+ listConnectorCredentials(input: ListConnectorCredentialsRequest, options?: RpcOptions): UnaryCall<ListConnectorCredentialsRequest, ListConnectorCredentialsResponse> {
194
+ const method = this.methods[6], opt = this._transport.mergeOptions(options);
195
+ return stackIntercept<ListConnectorCredentialsRequest, ListConnectorCredentialsResponse>("unary", this._transport, method, opt, input);
196
+ }
197
+ /**
198
+ * Issue a credential of an active inbound connector; the secret is in the
199
+ * response only. A connector holds at most two usable credentials
200
+ * (RESOURCE_EXHAUSTED beyond). Keyed: a retry with the same idempotency
201
+ * key returns the credential the first attempt created, without its
202
+ * secret; a lost secret is replaced through RotateConnectorCredential.
203
+ *
204
+ * @generated from protobuf rpc: CreateConnectorCredential
205
+ */
206
+ createConnectorCredential(input: CreateConnectorCredentialRequest, options?: RpcOptions): UnaryCall<CreateConnectorCredentialRequest, IssuedConnectorCredential> {
207
+ const method = this.methods[7], opt = this._transport.mergeOptions(options);
208
+ return stackIntercept<CreateConnectorCredentialRequest, IssuedConnectorCredential>("unary", this._transport, method, opt, input);
209
+ }
210
+ /**
211
+ * Replace an active credential: a new one is issued (its secret in the
212
+ * response only) and the old one keeps working for the rotation grace
213
+ * period, so the client can switch without an outage. Keyed like
214
+ * CreateConnectorCredential.
215
+ *
216
+ * @generated from protobuf rpc: RotateConnectorCredential
217
+ */
218
+ rotateConnectorCredential(input: RotateConnectorCredentialRequest, options?: RpcOptions): UnaryCall<RotateConnectorCredentialRequest, IssuedConnectorCredential> {
219
+ const method = this.methods[8], opt = this._transport.mergeOptions(options);
220
+ return stackIntercept<RotateConnectorCredentialRequest, IssuedConnectorCredential>("unary", this._transport, method, opt, input);
221
+ }
222
+ /**
223
+ * Revoke a credential at once, with no grace. Revoking one already
224
+ * revoked is a no-op.
225
+ *
226
+ * @generated from protobuf rpc: RevokeConnectorCredential
227
+ */
228
+ revokeConnectorCredential(input: RevokeConnectorCredentialRequest, options?: RpcOptions): UnaryCall<RevokeConnectorCredentialRequest, Empty> {
229
+ const method = this.methods[9], opt = this._transport.mergeOptions(options);
230
+ return stackIntercept<RevokeConnectorCredentialRequest, Empty>("unary", this._transport, method, opt, input);
231
+ }
232
+ }