@fabrika/auth-core 0.9.0-dev.2 → 0.9.0-dev.20
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/package.json +2 -2
- package/src/canonical-path.ts +18 -0
- package/src/client-address.ts +74 -0
- package/src/contract-canonical.ts +152 -1
- package/src/contract-encoding.ts +181 -0
- package/src/contract.ts +201 -9
- package/src/dev-environment.ts +6 -0
- package/src/egress.ts +97 -0
- package/src/endpoint-digest.ts +22 -2
- package/src/framework-release.ts +2 -0
- package/src/framework-variables.ts +15 -0
- package/src/index.ts +8 -0
- package/src/locale.ts +1 -1
- package/src/managed-environment.ts +140 -0
- package/src/membership.ts +12 -4
- package/src/ops.ts +1933 -0
- package/src/public-egress.ts +168 -0
- package/src/requirement.ts +5 -2
- package/src/rpc.ts +8 -8
- package/src/sha256.ts +52 -14
- package/src/terminal.ts +105 -0
- package/src/token.ts +73 -13
- package/src/types.ts +63 -2
- package/src/wire.ts +7 -0
- package/types/src/canonical-path.d.ts +6 -0
- package/types/src/client-address.d.ts +7 -0
- package/types/src/contract-canonical.d.ts +11 -1
- package/types/src/contract-encoding.d.ts +18 -0
- package/types/src/contract.d.ts +186 -8
- package/types/src/dev-environment.d.ts +5 -0
- package/types/src/egress.d.ts +27 -0
- package/types/src/endpoint-digest.d.ts +5 -0
- package/types/src/framework-release.d.ts +2 -0
- package/types/src/framework-variables.d.ts +12 -1
- package/types/src/index.d.ts +8 -0
- package/types/src/locale.d.ts +1 -1
- package/types/src/managed-environment.d.ts +32 -0
- package/types/src/membership.d.ts +8 -3
- package/types/src/ops.d.ts +657 -0
- package/types/src/public-egress.d.ts +31 -0
- package/types/src/requirement.d.ts +2 -2
- package/types/src/rpc.d.ts +5 -5
- package/types/src/sha256.d.ts +10 -0
- package/types/src/terminal.d.ts +72 -0
- package/types/src/token.d.ts +36 -11
- package/types/src/types.d.ts +42 -2
- package/types/src/wire.d.ts +6 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ContractArtifact, EndpointRow } from './contract';
|
|
2
|
+
import { type Locale } from './locale';
|
|
2
3
|
import type { PrincipalAffiliation, Scope } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* What an endpoint may ask IAM about the members of its own target (`ctx.members`): `manage` where its action is the
|
|
@@ -98,14 +99,18 @@ export declare const MAX_INVITATION_MESSAGE_LENGTH = 1000;
|
|
|
98
99
|
* What an invitation by address carries besides its role. `label` is the invited person's company as the application
|
|
99
100
|
* names it, `message` the inviter's personal note; both are plain text IAM escapes wherever it inserts them. `resend`
|
|
100
101
|
* rotates the open invitation's link, restarts its lifetime and sends it again; without it, repeating an invitation
|
|
101
|
-
* answers the open one and sends nothing.
|
|
102
|
+
* answers the open one and sends nothing. `locale` is the invited person's language, when the application knows it: IAM
|
|
103
|
+
* writes the invitation and the pages its link opens in it, and its acceptance keeps it as the person's, so IAM's later
|
|
104
|
+
* e-mails (a password reset) and pages speak it too. Without one, IAM speaks the language the person already has, else the
|
|
105
|
+
* application's. A resend that names one replaces the stored one.
|
|
102
106
|
*/
|
|
103
107
|
export interface InvitationOptions {
|
|
104
108
|
readonly label?: string;
|
|
105
109
|
readonly message?: string;
|
|
106
110
|
readonly resend?: boolean;
|
|
111
|
+
readonly locale?: Locale;
|
|
107
112
|
}
|
|
108
|
-
/** Why IAM refuses an invitation's label or
|
|
113
|
+
/** Why IAM refuses an invitation's label, message or locale, or `null`. A message may break lines; nothing else is a control character. */
|
|
109
114
|
export declare function invitationOptionsProblem(options: InvitationOptions): string | null;
|
|
110
115
|
/** How long a delegation grant may be held before it is spent. One request, so seconds. */
|
|
111
116
|
export declare const DELEGATION_GRANT_TTL_SECONDS = 120;
|
|
@@ -152,7 +157,7 @@ export interface AssignMemberInput extends MembershipCaller {
|
|
|
152
157
|
scope: Scope;
|
|
153
158
|
role: string;
|
|
154
159
|
member: MemberTarget;
|
|
155
|
-
/** Only with an address: the invitation's label, message and
|
|
160
|
+
/** Only with an address: the invitation's label, message, resend and locale (`InvitationOptions`). */
|
|
156
161
|
invitation?: InvitationOptions;
|
|
157
162
|
}
|
|
158
163
|
export type AssignMemberResult = {
|