1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129 | /**
* Delegated access grants: invite other customers to manage parts of a
* domain, and handle invites you receive. Inviting/revoking on a domain is
* subject to the client's domain gate when configured.
*
* NOTE: every operation here requires an account JWT (see
* `auth.deviceLogin`); API keys are not accepted.
*/
import type { Client } from './client.js';
import type { Body } from './types.js';
/** GET /domains/registrations/{id}/grants — Who has delegated access to this domain (outgoing). */
export declare const listDomainGrants: (client: Client, id: string) => Promise<{
grants: {
accepted_at: string | null;
created_at: string;
domain?: string;
id: string;
inactive: boolean;
invited_email: string;
owner_email?: string;
payer: "owner" | "grantee" | "split";
registration_id: string;
revoked_at: string | null;
scopes: ("dns" | "tunnel" | "ipfs" | "vps")[];
state: "pending" | "active" | "revoked" | "declined" | "left";
}[];
}>;
/** POST /domains/registrations/{id}/grants — Invite another customer to manage parts of this domain. */
export declare const invite: (client: Client, id: string, body: Body<"/domains/registrations/{id}/grants", "post">) => Promise<{
grant: {
accepted_at: string | null;
created_at: string;
domain?: string;
id: string;
inactive: boolean;
invited_email: string;
owner_email?: string;
payer: "owner" | "grantee" | "split";
registration_id: string;
revoked_at: string | null;
scopes: ("dns" | "tunnel" | "ipfs" | "vps")[];
state: "pending" | "active" | "revoked" | "declined" | "left";
};
}>;
/** DELETE /domains/registrations/{id}/grants/{grant-id} — Revoke delegated access. */
export declare const revokeGrant: (client: Client, id: string, grantId: string) => Promise<{
grant: {
accepted_at: string | null;
created_at: string;
domain?: string;
id: string;
inactive: boolean;
invited_email: string;
owner_email?: string;
payer: "owner" | "grantee" | "split";
registration_id: string;
revoked_at: string | null;
scopes: ("dns" | "tunnel" | "ipfs" | "vps")[];
state: "pending" | "active" | "revoked" | "declined" | "left";
};
}>;
/** GET /grants — Domains shared with this account (incoming). */
export declare const listGrants: (client: Client) => Promise<{
grants: {
accepted_at: string | null;
created_at: string;
domain?: string;
id: string;
inactive: boolean;
invited_email: string;
owner_email?: string;
payer: "owner" | "grantee" | "split";
registration_id: string;
revoked_at: string | null;
scopes: ("dns" | "tunnel" | "ipfs" | "vps")[];
state: "pending" | "active" | "revoked" | "declined" | "left";
}[];
}>;
/** POST /grants/{id}/accept — Accept a delegated-access invite. */
export declare const acceptGrant: (client: Client, id: string) => Promise<{
grant: {
accepted_at: string | null;
created_at: string;
domain?: string;
id: string;
inactive: boolean;
invited_email: string;
owner_email?: string;
payer: "owner" | "grantee" | "split";
registration_id: string;
revoked_at: string | null;
scopes: ("dns" | "tunnel" | "ipfs" | "vps")[];
state: "pending" | "active" | "revoked" | "declined" | "left";
};
}>;
/** POST /grants/{id}/decline — Decline a delegated-access invite. */
export declare const declineGrant: (client: Client, id: string) => Promise<{
grant: {
accepted_at: string | null;
created_at: string;
domain?: string;
id: string;
inactive: boolean;
invited_email: string;
owner_email?: string;
payer: "owner" | "grantee" | "split";
registration_id: string;
revoked_at: string | null;
scopes: ("dns" | "tunnel" | "ipfs" | "vps")[];
state: "pending" | "active" | "revoked" | "declined" | "left";
};
}>;
/** POST /grants/{id}/leave — Walk away from an active grant. */
export declare const leaveGrant: (client: Client, id: string) => Promise<{
grant: {
accepted_at: string | null;
created_at: string;
domain?: string;
id: string;
inactive: boolean;
invited_email: string;
owner_email?: string;
payer: "owner" | "grantee" | "split";
registration_id: string;
revoked_at: string | null;
scopes: ("dns" | "tunnel" | "ipfs" | "vps")[];
state: "pending" | "active" | "revoked" | "declined" | "left";
};
}>;
|