domainkit 0.11.0 → 0.12.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/dist/Connect.mjs +157 -35
- package/dist/Connect.mjs.map +1 -1
- package/dist/Server.mjs +136 -22
- package/dist/Server.mjs.map +1 -1
- package/dist/Storage.mjs +2 -0
- package/dist/Storage.mjs.map +1 -1
- package/dist/Testing.mjs +2 -1
- package/dist/Testing.mjs.map +1 -1
- package/dist/Transport.mjs +25 -2
- package/dist/Transport.mjs.map +1 -1
- package/dist/internal/conformance/storage.mjs +16 -0
- package/dist/internal/conformance/storage.mjs.map +1 -1
- package/dist/internal/storage-memory.mjs +1 -0
- package/dist/internal/storage-memory.mjs.map +1 -1
- package/dist/package.mjs +1 -1
- package/dist/types/Connect.d.ts +63 -0
- package/dist/types/Server.d.ts +948 -26
- package/dist/types/Storage.d.ts +4 -0
- package/dist/types/Testing.d.ts +2 -0
- package/dist/types/Transport.d.ts +16 -1
- package/package.json +1 -1
package/dist/types/Storage.d.ts
CHANGED
|
@@ -60,6 +60,8 @@ declare const Attachment_base: Schema.Class<Attachment, Schema.Struct<{
|
|
|
60
60
|
readonly connectionId: Schema.String;
|
|
61
61
|
readonly domain: Schema.String;
|
|
62
62
|
readonly zone: Schema.String;
|
|
63
|
+
/** The target's label as the provider gave it at attach time, so a UI names the account without a provider call. */
|
|
64
|
+
readonly label: Schema.String;
|
|
63
65
|
/** Provider zone identity (zone id, account id) decoded by the provider's `context` schema. */
|
|
64
66
|
readonly target: Schema.Unknown;
|
|
65
67
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
@@ -178,6 +180,7 @@ export interface Interface {
|
|
|
178
180
|
readonly connectionId: string;
|
|
179
181
|
readonly domain: string;
|
|
180
182
|
readonly zone: string;
|
|
183
|
+
readonly label: string;
|
|
181
184
|
readonly target: unknown;
|
|
182
185
|
}) => Fx<Attachment>;
|
|
183
186
|
readonly get: (id: string) => Fx<Attachment>;
|
|
@@ -273,6 +276,7 @@ export interface AsyncInterface {
|
|
|
273
276
|
readonly connectionId: string;
|
|
274
277
|
readonly domain: string;
|
|
275
278
|
readonly zone: string;
|
|
279
|
+
readonly label: string;
|
|
276
280
|
readonly target: unknown;
|
|
277
281
|
}) => Promise<Attachment>;
|
|
278
282
|
readonly get: (principal: Principal.Interface, id: string) => Promise<Attachment>;
|
package/dist/types/Testing.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export interface FakeProviderOptions {
|
|
|
20
20
|
readonly name?: string;
|
|
21
21
|
/** Zones the fake credential can reach. Default: `example.com`. */
|
|
22
22
|
readonly zones?: ReadonlyArray<string>;
|
|
23
|
+
/** The label each zone carries, keyed by zone. Default: the zone name. */
|
|
24
|
+
readonly labels?: Readonly<Record<string, string>>;
|
|
23
25
|
/** Pre-existing records, to produce `Noop` and `Conflict` operations. */
|
|
24
26
|
readonly records?: ReadonlyArray<{
|
|
25
27
|
readonly zone: string;
|
|
@@ -23,6 +23,9 @@ export type Readiness = Server.Readiness;
|
|
|
23
23
|
export type Attempt = Server.Attempt;
|
|
24
24
|
export type Candidate = Server.Candidate;
|
|
25
25
|
export type Discovery = Server.Discovery;
|
|
26
|
+
export type Zone = Server.Zone;
|
|
27
|
+
export type Zones = Server.Zones;
|
|
28
|
+
export type Attachment = Server.Attachment;
|
|
26
29
|
export type Field = Server.Field;
|
|
27
30
|
export type MethodDescriptor = Server.MethodDescriptor;
|
|
28
31
|
export type Method = Server.Method;
|
|
@@ -41,11 +44,21 @@ export interface ConnectionGroup {
|
|
|
41
44
|
readonly inspect: (domain: string) => Fx<Snapshot>;
|
|
42
45
|
/** Which of this owner's existing connections already reaches the domain. */
|
|
43
46
|
readonly discover: (domain: string) => Fx<Discovery>;
|
|
47
|
+
/** Every zone this owner's connections reach, and where each connection stands. */
|
|
48
|
+
readonly zones: (options?: {
|
|
49
|
+
readonly provider?: string;
|
|
50
|
+
}) => Fx<Zones>;
|
|
51
|
+
/** Connect a provider. Without a domain the account connects alone and attaches nothing. */
|
|
44
52
|
readonly start: (input: {
|
|
45
|
-
readonly domain
|
|
53
|
+
readonly domain?: string;
|
|
46
54
|
readonly provider: string;
|
|
47
55
|
readonly method: Method;
|
|
48
56
|
}) => Fx<Started>;
|
|
57
|
+
/** Prove an account again for a connection this owner holds, keeping its domains. */
|
|
58
|
+
readonly reconnect: (input: {
|
|
59
|
+
readonly connectionId: string;
|
|
60
|
+
readonly method: Method;
|
|
61
|
+
}) => Fx<Started>;
|
|
49
62
|
readonly attach: (input: {
|
|
50
63
|
readonly connectionId: string;
|
|
51
64
|
readonly domain: string;
|
|
@@ -71,6 +84,8 @@ export interface ProvisioningGroup {
|
|
|
71
84
|
readonly apply: (approvalId: Approval.ApprovalId) => Fx<Receipt.Model>;
|
|
72
85
|
/** The stored plan with its status, approval, receipt, and rejection. */
|
|
73
86
|
readonly attempt: (planId: Plan.PlanId) => Fx<Attempt>;
|
|
87
|
+
/** What one apply landed, by receipt id, for a surface that holds the id and not the attempt. */
|
|
88
|
+
readonly receipt: (receiptId: Receipt.ReceiptId) => Fx<Receipt.Model>;
|
|
74
89
|
}
|
|
75
90
|
export interface VerificationGroup {
|
|
76
91
|
/**
|