@atlasauth/backend 0.4.0 → 0.6.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/README.md +187 -0
- package/dist/client/activity.d.ts +104 -0
- package/dist/client/activity.js +29 -0
- package/dist/client/activity.js.map +1 -0
- package/dist/client/audit-events.d.ts +103 -0
- package/dist/client/audit-events.js +43 -0
- package/dist/client/audit-events.js.map +1 -0
- package/dist/client/billing-plans.d.ts +43 -0
- package/dist/client/billing-plans.js +26 -0
- package/dist/client/billing-plans.js.map +1 -1
- package/dist/client/connectors.d.ts +174 -0
- package/dist/client/connectors.js +54 -0
- package/dist/client/connectors.js.map +1 -0
- package/dist/client/data-subject-requests.d.ts +21 -0
- package/dist/client/data-subject-requests.js +15 -0
- package/dist/client/data-subject-requests.js.map +1 -1
- package/dist/client/design.d.ts +295 -0
- package/dist/client/design.js +76 -0
- package/dist/client/design.js.map +1 -0
- package/dist/client/diagnostics.d.ts +53 -0
- package/dist/client/diagnostics.js +24 -0
- package/dist/client/diagnostics.js.map +1 -0
- package/dist/client/email-addresses.d.ts +22 -0
- package/dist/client/email-addresses.js +17 -0
- package/dist/client/email-addresses.js.map +1 -0
- package/dist/client/entitlement-overrides.d.ts +50 -0
- package/dist/client/entitlement-overrides.js +20 -0
- package/dist/client/entitlement-overrides.js.map +1 -0
- package/dist/client/error.d.ts +28 -0
- package/dist/client/error.js +27 -1
- package/dist/client/error.js.map +1 -1
- package/dist/client/index.d.ts +458 -16
- package/dist/client/index.js +76 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/instance.d.ts +54 -0
- package/dist/client/instance.js +18 -0
- package/dist/client/instance.js.map +1 -1
- package/dist/client/invitations.d.ts +14 -0
- package/dist/client/invitations.js +9 -0
- package/dist/client/invitations.js.map +1 -1
- package/dist/client/legacy-auth.d.ts +45 -0
- package/dist/client/legacy-auth.js +18 -0
- package/dist/client/legacy-auth.js.map +1 -0
- package/dist/client/mcp.d.ts +86 -0
- package/dist/client/mcp.js +47 -0
- package/dist/client/mcp.js.map +1 -0
- package/dist/client/notifications.d.ts +92 -0
- package/dist/client/notifications.js +55 -0
- package/dist/client/notifications.js.map +1 -0
- package/dist/client/oauth-clients.d.ts +46 -2
- package/dist/client/oauth-clients.js +4 -0
- package/dist/client/oauth-clients.js.map +1 -1
- package/dist/client/oauth-providers.d.ts +67 -7
- package/dist/client/oauth-providers.js +7 -2
- package/dist/client/oauth-providers.js.map +1 -1
- package/dist/client/openfga.d.ts +137 -0
- package/dist/client/openfga.js +72 -0
- package/dist/client/openfga.js.map +1 -0
- package/dist/client/org-ldap-connections.d.ts +75 -0
- package/dist/client/org-ldap-connections.js +36 -0
- package/dist/client/org-ldap-connections.js.map +1 -0
- package/dist/client/organization-settings-schema.d.ts +24 -0
- package/dist/client/organization-settings-schema.js +30 -0
- package/dist/client/organization-settings-schema.js.map +1 -0
- package/dist/client/organizations.d.ts +205 -4
- package/dist/client/organizations.js +109 -0
- package/dist/client/organizations.js.map +1 -1
- package/dist/client/pca.d.ts +59 -0
- package/dist/client/pca.js +40 -0
- package/dist/client/pca.js.map +1 -0
- package/dist/client/platform.d.ts +328 -0
- package/dist/client/platform.js +187 -0
- package/dist/client/platform.js.map +1 -0
- package/dist/client/redirect-urls.d.ts +23 -0
- package/dist/client/redirect-urls.js +22 -0
- package/dist/client/redirect-urls.js.map +1 -0
- package/dist/client/request.d.ts +45 -0
- package/dist/client/request.js +35 -2
- package/dist/client/request.js.map +1 -1
- package/dist/client/session-exchange-apps.d.ts +43 -0
- package/dist/client/session-exchange-apps.js +25 -0
- package/dist/client/session-exchange-apps.js.map +1 -0
- package/dist/client/sessions.d.ts +12 -0
- package/dist/client/sessions.js +10 -0
- package/dist/client/sessions.js.map +1 -1
- package/dist/client/sign-in-tokens.d.ts +13 -1
- package/dist/client/sign-in-tokens.js +11 -0
- package/dist/client/sign-in-tokens.js.map +1 -1
- package/dist/client/test-mode.d.ts +44 -0
- package/dist/client/test-mode.js +26 -0
- package/dist/client/test-mode.js.map +1 -0
- package/dist/client/tickets.d.ts +49 -0
- package/dist/client/tickets.js +19 -0
- package/dist/client/tickets.js.map +1 -0
- package/dist/client/users.d.ts +346 -0
- package/dist/client/users.js +228 -0
- package/dist/client/users.js.map +1 -1
- package/dist/client/waitlist.d.ts +21 -0
- package/dist/client/waitlist.js +16 -0
- package/dist/client/waitlist.js.map +1 -1
- package/dist/client/webhooks.d.ts +60 -6
- package/dist/client/webhooks.js +36 -2
- package/dist/client/webhooks.js.map +1 -1
- package/dist/discovery.d.ts +49 -0
- package/dist/discovery.js +143 -0
- package/dist/discovery.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/jwks-cache.d.ts +8 -0
- package/dist/jwks-cache.js +20 -3
- package/dist/jwks-cache.js.map +1 -1
- package/dist/logout-token.d.ts +97 -0
- package/dist/logout-token.js +182 -0
- package/dist/logout-token.js.map +1 -0
- package/dist/verify.d.ts +26 -3
- package/dist/verify.js +40 -5
- package/dist/verify.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { type RequestFn } from './request';
|
|
2
|
+
/** How an installing instance gets OAuth credentials for a connector. */
|
|
3
|
+
export type ConnectorShareMode = 'prefill' | 'full_shared' | 'full_idp';
|
|
4
|
+
/**
|
|
5
|
+
* A community connector profile you publish to the connector directory: its
|
|
6
|
+
* public listing, OAuth config and share modes. The shared client secret is
|
|
7
|
+
* never returned.
|
|
8
|
+
*/
|
|
9
|
+
export interface CommunityConnector {
|
|
10
|
+
object: 'connector';
|
|
11
|
+
id: string;
|
|
12
|
+
slug: string;
|
|
13
|
+
display_name: string;
|
|
14
|
+
logo_url?: string | null;
|
|
15
|
+
tagline?: string | null;
|
|
16
|
+
description?: string | null;
|
|
17
|
+
category: string;
|
|
18
|
+
tags: unknown[];
|
|
19
|
+
website_url?: string | null;
|
|
20
|
+
docs_url?: string | null;
|
|
21
|
+
support_url?: string | null;
|
|
22
|
+
setup_guide?: string | null;
|
|
23
|
+
protocol: string;
|
|
24
|
+
authorization_endpoint?: string | null;
|
|
25
|
+
token_endpoint?: string | null;
|
|
26
|
+
userinfo_endpoint?: string | null;
|
|
27
|
+
issuer?: string | null;
|
|
28
|
+
default_scopes: string[];
|
|
29
|
+
api_scopes?: unknown[];
|
|
30
|
+
credential_fields?: unknown[];
|
|
31
|
+
share_modes: ConnectorShareMode[];
|
|
32
|
+
shared_client_id?: string | null;
|
|
33
|
+
shared_revoked: boolean;
|
|
34
|
+
idp_issuer?: string | null;
|
|
35
|
+
idp_auto_register: boolean;
|
|
36
|
+
status: 'draft' | 'published' | 'unlisted' | 'banned';
|
|
37
|
+
verified: boolean;
|
|
38
|
+
featured: boolean;
|
|
39
|
+
install_count: number;
|
|
40
|
+
view_count: number;
|
|
41
|
+
rating_avg: number;
|
|
42
|
+
rating_count: number;
|
|
43
|
+
/** Epoch ms. */
|
|
44
|
+
created_at: number;
|
|
45
|
+
/** Epoch ms. */
|
|
46
|
+
updated_at: number;
|
|
47
|
+
}
|
|
48
|
+
/** Fields of a connector profile you can set on create or update. */
|
|
49
|
+
export interface UpdateCommunityConnectorBody {
|
|
50
|
+
slug?: string;
|
|
51
|
+
display_name?: string;
|
|
52
|
+
logo_url?: string;
|
|
53
|
+
tagline?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
category?: string;
|
|
56
|
+
tags?: string[];
|
|
57
|
+
website_url?: string;
|
|
58
|
+
docs_url?: string;
|
|
59
|
+
support_url?: string;
|
|
60
|
+
screenshots?: unknown[];
|
|
61
|
+
setup_guide?: string;
|
|
62
|
+
protocol?: string;
|
|
63
|
+
authorization_endpoint?: string;
|
|
64
|
+
token_endpoint?: string;
|
|
65
|
+
userinfo_endpoint?: string;
|
|
66
|
+
issuer?: string;
|
|
67
|
+
default_scopes?: string[];
|
|
68
|
+
api_scopes?: unknown[];
|
|
69
|
+
credential_fields?: unknown[];
|
|
70
|
+
authorization_params?: Record<string, unknown>;
|
|
71
|
+
quirks?: Record<string, unknown>;
|
|
72
|
+
share_modes?: ConnectorShareMode[];
|
|
73
|
+
idp_instance_id?: string;
|
|
74
|
+
idp_issuer?: string;
|
|
75
|
+
idp_auto_register?: boolean;
|
|
76
|
+
}
|
|
77
|
+
/** `slug` is globally unique and may not shadow a built-in provider. */
|
|
78
|
+
export interface CreateCommunityConnectorBody extends UpdateCommunityConnectorBody {
|
|
79
|
+
slug: string;
|
|
80
|
+
display_name: string;
|
|
81
|
+
}
|
|
82
|
+
/** Set or rotate (`client_id` + `client_secret`) or revoke (`revoke: true`) the full_shared credentials. */
|
|
83
|
+
export interface ConnectorSharedCredentialsBody {
|
|
84
|
+
client_id?: string;
|
|
85
|
+
client_secret?: string;
|
|
86
|
+
revoke?: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface InstallConnectorBody {
|
|
89
|
+
share_mode: ConnectorShareMode;
|
|
90
|
+
/** Your own credentials (prefill mode). */
|
|
91
|
+
client_id?: string;
|
|
92
|
+
client_secret?: string;
|
|
93
|
+
scopes?: string[];
|
|
94
|
+
}
|
|
95
|
+
export interface ConnectorInstall {
|
|
96
|
+
object: 'connector_install';
|
|
97
|
+
connector: string;
|
|
98
|
+
share_mode: string;
|
|
99
|
+
provider_key?: string;
|
|
100
|
+
/** True when the install still needs your own client credentials. */
|
|
101
|
+
needs_credentials?: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface ConnectorReview {
|
|
104
|
+
object: 'connector_review';
|
|
105
|
+
connector: string;
|
|
106
|
+
rating: number;
|
|
107
|
+
}
|
|
108
|
+
/** A directory entry (built-in provider or community connector). Keys are camelCase. */
|
|
109
|
+
export interface ConnectorDirectoryEntry {
|
|
110
|
+
source: 'builtin' | 'community';
|
|
111
|
+
key: string;
|
|
112
|
+
slug: string;
|
|
113
|
+
displayName: string;
|
|
114
|
+
category: string;
|
|
115
|
+
tagline?: string | null;
|
|
116
|
+
description?: string | null;
|
|
117
|
+
logoUrl?: string | null;
|
|
118
|
+
websiteUrl?: string | null;
|
|
119
|
+
docsUrl?: string | null;
|
|
120
|
+
verified?: boolean;
|
|
121
|
+
featured?: boolean;
|
|
122
|
+
installCount?: number;
|
|
123
|
+
ratingAvg?: number;
|
|
124
|
+
ratingCount?: number;
|
|
125
|
+
rankScore?: number;
|
|
126
|
+
defaultScopes?: string[];
|
|
127
|
+
apiScopes?: unknown[];
|
|
128
|
+
credentialFields?: unknown[];
|
|
129
|
+
shareModes?: string[];
|
|
130
|
+
}
|
|
131
|
+
export interface ConnectorDirectoryParams {
|
|
132
|
+
category?: string;
|
|
133
|
+
/** Only verified community connectors. */
|
|
134
|
+
verified?: boolean;
|
|
135
|
+
/** Free-text search. */
|
|
136
|
+
q?: string;
|
|
137
|
+
limit?: number;
|
|
138
|
+
offset?: number;
|
|
139
|
+
}
|
|
140
|
+
export declare function connectorsResource(request: RequestFn): {
|
|
141
|
+
/** Your own connector profiles (draft and published). */
|
|
142
|
+
list(): Promise<{
|
|
143
|
+
object: "list";
|
|
144
|
+
data: CommunityConnector[];
|
|
145
|
+
has_more: false;
|
|
146
|
+
}>;
|
|
147
|
+
create(body: CreateCommunityConnectorBody, idempotencyKey?: string): Promise<CommunityConnector>;
|
|
148
|
+
get(id: string): Promise<CommunityConnector>;
|
|
149
|
+
update(id: string, body: UpdateCommunityConnectorBody): Promise<CommunityConnector>;
|
|
150
|
+
/** Deletes the profile and its installs, reviews and reports. */
|
|
151
|
+
delete(id: string): Promise<{
|
|
152
|
+
object: "connector";
|
|
153
|
+
id: string;
|
|
154
|
+
deleted: true;
|
|
155
|
+
}>;
|
|
156
|
+
/** List it in the public directory (unverified until reviewed). */
|
|
157
|
+
publish(id: string): Promise<CommunityConnector>;
|
|
158
|
+
/** Take it out of the directory without deleting it. */
|
|
159
|
+
unlist(id: string): Promise<CommunityConnector>;
|
|
160
|
+
/** Set, rotate or revoke the full_shared credentials. Revoking stops every install. */
|
|
161
|
+
setSharedCredentials(id: string, body: ConnectorSharedCredentialsBody): Promise<CommunityConnector>;
|
|
162
|
+
/** Enable a published connector (by slug) on this instance. */
|
|
163
|
+
install(slug: string, body: InstallConnectorBody): Promise<ConnectorInstall>;
|
|
164
|
+
/** Rate a connector you installed, 1–5, with optional text. */
|
|
165
|
+
review(slug: string, body: {
|
|
166
|
+
rating: number;
|
|
167
|
+
body?: string;
|
|
168
|
+
}): Promise<ConnectorReview>;
|
|
169
|
+
/** Browse built-in providers plus published community connectors, popular first. */
|
|
170
|
+
directory(params?: ConnectorDirectoryParams): Promise<{
|
|
171
|
+
object: "list";
|
|
172
|
+
data: ConnectorDirectoryEntry[];
|
|
173
|
+
}>;
|
|
174
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.connectorsResource = connectorsResource;
|
|
4
|
+
const request_1 = require("./request");
|
|
5
|
+
function connectorsResource(request) {
|
|
6
|
+
return {
|
|
7
|
+
/** Your own connector profiles (draft and published). */
|
|
8
|
+
list() {
|
|
9
|
+
return request({ method: 'GET', path: '/v1/connectors' });
|
|
10
|
+
},
|
|
11
|
+
create(body, idempotencyKey) {
|
|
12
|
+
return request({ method: 'POST', path: '/v1/connectors', body, idempotencyKey });
|
|
13
|
+
},
|
|
14
|
+
get(id) {
|
|
15
|
+
return request({ method: 'GET', path: `/v1/connectors/${(0, request_1.enc)(id)}` });
|
|
16
|
+
},
|
|
17
|
+
update(id, body) {
|
|
18
|
+
return request({ method: 'PATCH', path: `/v1/connectors/${(0, request_1.enc)(id)}`, body });
|
|
19
|
+
},
|
|
20
|
+
/** Deletes the profile and its installs, reviews and reports. */
|
|
21
|
+
delete(id) {
|
|
22
|
+
return request({ method: 'DELETE', path: `/v1/connectors/${(0, request_1.enc)(id)}` });
|
|
23
|
+
},
|
|
24
|
+
/** List it in the public directory (unverified until reviewed). */
|
|
25
|
+
publish(id) {
|
|
26
|
+
return request({ method: 'POST', path: `/v1/connectors/${(0, request_1.enc)(id)}/publish` });
|
|
27
|
+
},
|
|
28
|
+
/** Take it out of the directory without deleting it. */
|
|
29
|
+
unlist(id) {
|
|
30
|
+
return request({ method: 'POST', path: `/v1/connectors/${(0, request_1.enc)(id)}/unlist` });
|
|
31
|
+
},
|
|
32
|
+
/** Set, rotate or revoke the full_shared credentials. Revoking stops every install. */
|
|
33
|
+
setSharedCredentials(id, body) {
|
|
34
|
+
return request({
|
|
35
|
+
method: 'POST',
|
|
36
|
+
path: `/v1/connectors/${(0, request_1.enc)(id)}/shared_credentials`,
|
|
37
|
+
body,
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
/** Enable a published connector (by slug) on this instance. */
|
|
41
|
+
install(slug, body) {
|
|
42
|
+
return request({ method: 'POST', path: `/v1/connectors/${(0, request_1.enc)(slug)}/install`, body });
|
|
43
|
+
},
|
|
44
|
+
/** Rate a connector you installed, 1–5, with optional text. */
|
|
45
|
+
review(slug, body) {
|
|
46
|
+
return request({ method: 'POST', path: `/v1/connectors/${(0, request_1.enc)(slug)}/reviews`, body });
|
|
47
|
+
},
|
|
48
|
+
/** Browse built-in providers plus published community connectors, popular first. */
|
|
49
|
+
directory(params = {}) {
|
|
50
|
+
return request({ method: 'GET', path: '/v1/directory', query: { ...params } });
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=connectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectors.js","sourceRoot":"","sources":["../../src/client/connectors.ts"],"names":[],"mappings":";;AAsJA,gDAwDC;AA9MD,uCAAgD;AAsJhD,SAAgB,kBAAkB,CAAC,OAAkB;IACnD,OAAO;QACL,yDAAyD;QACzD,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC;QAC5D,CAAC;QACD,MAAM,CACJ,IAAkC,EAClC,cAAuB;YAEvB,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,GAAG,CAAC,EAAU;YACZ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,kBAAkB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACvE,CAAC;QACD,MAAM,CAAC,EAAU,EAAE,IAAkC;YACnD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/E,CAAC;QACD,iEAAiE;QACjE,MAAM,CAAC,EAAU;YACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,kBAAkB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1E,CAAC;QACD,mEAAmE;QACnE,OAAO,CAAC,EAAU;YAChB,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,IAAA,aAAG,EAAC,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;QAChF,CAAC;QACD,wDAAwD;QACxD,MAAM,CAAC,EAAU;YACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,IAAA,aAAG,EAAC,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QAC/E,CAAC;QACD,uFAAuF;QACvF,oBAAoB,CAClB,EAAU,EACV,IAAoC;YAEpC,OAAO,OAAO,CAAC;gBACb,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,kBAAkB,IAAA,aAAG,EAAC,EAAE,CAAC,qBAAqB;gBACpD,IAAI;aACL,CAAC,CAAC;QACL,CAAC;QACD,+DAA+D;QAC/D,OAAO,CAAC,IAAY,EAAE,IAA0B;YAC9C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,IAAA,aAAG,EAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QACxF,CAAC;QACD,+DAA+D;QAC/D,MAAM,CAAC,IAAY,EAAE,IAAuC;YAC1D,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,IAAA,aAAG,EAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QACxF,CAAC;QACD,oFAAoF;QACpF,SAAS,CACP,SAAmC,EAAE;YAErC,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC;QACjF,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -17,6 +17,8 @@ export interface DataSubjectRequest {
|
|
|
17
17
|
requested_by_id: string | null;
|
|
18
18
|
reason: string | null;
|
|
19
19
|
scheduled_for: number | null;
|
|
20
|
+
/** Estimated completion (epoch ms): an erasure's grace deadline; null for an export. */
|
|
21
|
+
eta?: number | null;
|
|
20
22
|
requested_at: number;
|
|
21
23
|
updated_at: number;
|
|
22
24
|
completed_at: number | null;
|
|
@@ -28,7 +30,26 @@ export interface ListDataSubjectRequestsParams extends CursorParams {
|
|
|
28
30
|
status?: string;
|
|
29
31
|
user_id?: string;
|
|
30
32
|
}
|
|
33
|
+
/** Identify the subject by `user_id` OR `subject_email` (`user_id` wins if both are given). */
|
|
34
|
+
export interface CreateDataSubjectRequestBody {
|
|
35
|
+
type: 'export' | 'erasure';
|
|
36
|
+
user_id?: string;
|
|
37
|
+
/** The subject's email (verified, else unverified), resolved to the user. */
|
|
38
|
+
subject_email?: string;
|
|
39
|
+
reason?: string;
|
|
40
|
+
}
|
|
31
41
|
export declare function dataSubjectRequestsResource(request: RequestFn): {
|
|
42
|
+
/**
|
|
43
|
+
* Open an export or erasure request for a user from the backend. Same worker,
|
|
44
|
+
* grace window and webhooks as the self-service flow; idempotent on an
|
|
45
|
+
* in-flight request.
|
|
46
|
+
*/
|
|
47
|
+
create(body: CreateDataSubjectRequestBody, idempotencyKey?: string): Promise<DataSubjectRequest>;
|
|
48
|
+
/**
|
|
49
|
+
* Cancel a scheduled erasure inside its grace window. Once processing or
|
|
50
|
+
* terminal it is a 409; exports are not cancellable.
|
|
51
|
+
*/
|
|
52
|
+
cancel(id: string): Promise<DataSubjectRequest>;
|
|
32
53
|
list(params?: ListDataSubjectRequestsParams): Promise<CursorPage<DataSubjectRequest>>;
|
|
33
54
|
get(id: string): Promise<DataSubjectRequest>;
|
|
34
55
|
/** Fulfil a request now — build the export package, or run the erasure — ahead of schedule. */
|
|
@@ -4,6 +4,21 @@ exports.dataSubjectRequestsResource = dataSubjectRequestsResource;
|
|
|
4
4
|
const request_1 = require("./request");
|
|
5
5
|
function dataSubjectRequestsResource(request) {
|
|
6
6
|
return {
|
|
7
|
+
/**
|
|
8
|
+
* Open an export or erasure request for a user from the backend. Same worker,
|
|
9
|
+
* grace window and webhooks as the self-service flow; idempotent on an
|
|
10
|
+
* in-flight request.
|
|
11
|
+
*/
|
|
12
|
+
create(body, idempotencyKey) {
|
|
13
|
+
return request({ method: 'POST', path: '/v1/data_subject_requests', body, idempotencyKey });
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* Cancel a scheduled erasure inside its grace window. Once processing or
|
|
17
|
+
* terminal it is a 409; exports are not cancellable.
|
|
18
|
+
*/
|
|
19
|
+
cancel(id) {
|
|
20
|
+
return request({ method: 'POST', path: `/v1/data_subject_requests/${(0, request_1.enc)(id)}/cancel` });
|
|
21
|
+
},
|
|
7
22
|
list(params = {}) {
|
|
8
23
|
return request({ method: 'GET', path: '/v1/data_subject_requests', query: { ...params } });
|
|
9
24
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-subject-requests.js","sourceRoot":"","sources":["../../src/client/data-subject-requests.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"data-subject-requests.js","sourceRoot":"","sources":["../../src/client/data-subject-requests.ts"],"names":[],"mappings":";;AA4CA,kEAkDC;AA9FD,uCAAgD;AA4ChD,SAAgB,2BAA2B,CAAC,OAAkB;IAC5D,OAAO;QACL;;;;WAIG;QACH,MAAM,CACJ,IAAkC,EAClC,cAAuB;YAEvB,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QAC9F,CAAC;QACD;;;WAGG;QACH,MAAM,CAAC,EAAU;YACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,6BAA6B,IAAA,aAAG,EAAC,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QAC1F,CAAC;QACD,IAAI,CACF,SAAwC,EAAE;YAE1C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,2BAA2B,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC;QAC7F,CAAC;QACD,GAAG,CAAC,EAAU;YACZ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,6BAA6B,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAClF,CAAC;QACD,+FAA+F;QAC/F,OAAO,CAAC,EAAU,EAAE,cAAuB;YACzC,OAAO,OAAO,CAAC;gBACb,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,6BAA6B,IAAA,aAAG,EAAC,EAAE,CAAC,UAAU;gBACpD,cAAc;aACf,CAAC,CAAC;QACL,CAAC;QACD,oFAAoF;QACpF,MAAM,CACJ,EAAU,EACV,OAA4B,EAAE,EAC9B,cAAuB;YAEvB,OAAO,OAAO,CAAC;gBACb,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,6BAA6B,IAAA,aAAG,EAAC,EAAE,CAAC,SAAS;gBACnD,IAAI;gBACJ,cAAc;aACf,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { type RequestFn } from './request';
|
|
2
|
+
import type { ListPage } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* The structured sign-in page design, shared by the instance's hosted pages,
|
|
5
|
+
* per-organization overrides and Sign in with Atlas app pages.
|
|
6
|
+
*
|
|
7
|
+
* Every leaf is a closed set of values, a bounded number, a `#RRGGBB` hex colour,
|
|
8
|
+
* a catalog id (preset, font) or an uploaded image id (`dasset_…`) — there is no
|
|
9
|
+
* field for CSS, HTML or arbitrary URLs. A stored design is a set of OVERRIDES:
|
|
10
|
+
* every section and field is optional and falls back to the chosen preset, then
|
|
11
|
+
* the defaults. Unknown keys are refused by the API with their full path.
|
|
12
|
+
*/
|
|
13
|
+
export type DesignHexColor = string;
|
|
14
|
+
export type DesignPresetId = 'minimal' | 'atlas' | 'glass' | 'midnight' | 'editorial' | 'terminal' | 'sunrise' | 'forest' | 'grape' | 'slate' | 'split-photo' | 'bold';
|
|
15
|
+
export type DesignColorScheme = 'auto' | 'light' | 'dark';
|
|
16
|
+
export type DesignTypeScale = 'minor-second' | 'major-second' | 'minor-third' | 'major-third' | 'perfect-fourth' | 'augmented-fourth' | 'perfect-fifth' | 'golden' | 'minor-seventh' | 'octave';
|
|
17
|
+
export type DesignImagePosition = 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right';
|
|
18
|
+
/** Colour slots, each a `#RRGGBB` hex. */
|
|
19
|
+
export interface DesignPalette {
|
|
20
|
+
primary?: DesignHexColor;
|
|
21
|
+
/** Text/icon colour on a primary fill (button label). */
|
|
22
|
+
primaryInk?: DesignHexColor;
|
|
23
|
+
accent?: DesignHexColor;
|
|
24
|
+
background?: DesignHexColor;
|
|
25
|
+
surface?: DesignHexColor;
|
|
26
|
+
text?: DesignHexColor;
|
|
27
|
+
muted?: DesignHexColor;
|
|
28
|
+
border?: DesignHexColor;
|
|
29
|
+
danger?: DesignHexColor;
|
|
30
|
+
success?: DesignHexColor;
|
|
31
|
+
inputBackground?: DesignHexColor;
|
|
32
|
+
inputText?: DesignHexColor;
|
|
33
|
+
}
|
|
34
|
+
export interface DesignTypography {
|
|
35
|
+
/** A font id from the design catalog (`design.catalog().fonts`). */
|
|
36
|
+
font?: string;
|
|
37
|
+
headingFont?: string;
|
|
38
|
+
/** Body text size in px (12–20). */
|
|
39
|
+
baseSize?: number;
|
|
40
|
+
/** 400–800, in steps of 100. */
|
|
41
|
+
headingWeight?: number;
|
|
42
|
+
/** 300–600, in steps of 100. */
|
|
43
|
+
bodyWeight?: number;
|
|
44
|
+
/** Letter case of button labels. */
|
|
45
|
+
letterCase?: 'none' | 'uppercase';
|
|
46
|
+
scale?: DesignTypeScale;
|
|
47
|
+
}
|
|
48
|
+
export interface DesignShape {
|
|
49
|
+
/** Card corner radius, px (0–32). */
|
|
50
|
+
radius?: number;
|
|
51
|
+
/** Button + input corner radius, px (0–999; 999 = pill). */
|
|
52
|
+
controlRadius?: number;
|
|
53
|
+
/** 0–3 px. */
|
|
54
|
+
borderWidth?: number;
|
|
55
|
+
}
|
|
56
|
+
export interface DesignElevation {
|
|
57
|
+
cardShadow?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
58
|
+
}
|
|
59
|
+
export interface DesignSpacing {
|
|
60
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
61
|
+
}
|
|
62
|
+
export interface DesignCard {
|
|
63
|
+
style?: 'solid' | 'glass' | 'outline' | 'none';
|
|
64
|
+
/** Backdrop blur, px (0–40). Only applied when `style` is `glass`. */
|
|
65
|
+
blur?: number;
|
|
66
|
+
width?: 'narrow' | 'normal' | 'wide';
|
|
67
|
+
}
|
|
68
|
+
export interface DesignLayout {
|
|
69
|
+
position?: 'center' | 'left' | 'right' | 'split';
|
|
70
|
+
/** Which side the image panel sits on. Only applied when `position` is `split`. */
|
|
71
|
+
splitImageSide?: 'left' | 'right';
|
|
72
|
+
/** `hidden` is refused on Sign in with Atlas app pages. */
|
|
73
|
+
logoPlacement?: 'card' | 'page' | 'hidden';
|
|
74
|
+
logoSize?: 'sm' | 'md' | 'lg';
|
|
75
|
+
}
|
|
76
|
+
export interface DesignButtons {
|
|
77
|
+
style?: 'solid' | 'outline' | 'soft' | 'gradient';
|
|
78
|
+
socialLayout?: 'list' | 'grid' | 'icons';
|
|
79
|
+
}
|
|
80
|
+
export interface DesignInputs {
|
|
81
|
+
style?: 'outline' | 'filled' | 'underline';
|
|
82
|
+
}
|
|
83
|
+
export interface DesignGradient {
|
|
84
|
+
type: 'linear' | 'radial';
|
|
85
|
+
/** Degrees (0–360); linear only. */
|
|
86
|
+
angle?: number;
|
|
87
|
+
/** 2–4 stops; `at` is a percentage (0–100). */
|
|
88
|
+
stops: Array<{
|
|
89
|
+
color: DesignHexColor;
|
|
90
|
+
at: number;
|
|
91
|
+
}>;
|
|
92
|
+
}
|
|
93
|
+
export interface DesignBackgroundImage {
|
|
94
|
+
/** An uploaded background image (`dasset_…`). */
|
|
95
|
+
assetId: string;
|
|
96
|
+
fit?: 'cover' | 'contain';
|
|
97
|
+
position?: DesignImagePosition;
|
|
98
|
+
/** `opacity` is 0–1. */
|
|
99
|
+
overlay?: {
|
|
100
|
+
color: DesignHexColor;
|
|
101
|
+
opacity: number;
|
|
102
|
+
};
|
|
103
|
+
/** 0–20 px. */
|
|
104
|
+
blur?: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A page background: a colour, a gradient, an uploaded image and a pattern,
|
|
108
|
+
* painted bottom to top. Setting `background` replaces the preset's background
|
|
109
|
+
* as a whole.
|
|
110
|
+
*/
|
|
111
|
+
export interface DesignBackground {
|
|
112
|
+
color?: DesignHexColor;
|
|
113
|
+
gradient?: DesignGradient;
|
|
114
|
+
image?: DesignBackgroundImage;
|
|
115
|
+
pattern?: 'none' | 'dots' | 'grid' | 'noise';
|
|
116
|
+
}
|
|
117
|
+
export interface DesignLogo {
|
|
118
|
+
/** Uploaded logo for light mode (`dasset_…`). */
|
|
119
|
+
assetId?: string;
|
|
120
|
+
/** Uploaded logo for dark mode; falls back to `assetId`. */
|
|
121
|
+
darkAssetId?: string;
|
|
122
|
+
}
|
|
123
|
+
/** A stored design: overrides on top of a preset. Every field is optional. */
|
|
124
|
+
export interface AtlasDesign {
|
|
125
|
+
version?: 1;
|
|
126
|
+
preset?: DesignPresetId;
|
|
127
|
+
colorScheme?: DesignColorScheme;
|
|
128
|
+
palette?: DesignPalette;
|
|
129
|
+
paletteDark?: DesignPalette;
|
|
130
|
+
typography?: DesignTypography;
|
|
131
|
+
shape?: DesignShape;
|
|
132
|
+
elevation?: DesignElevation;
|
|
133
|
+
spacing?: DesignSpacing;
|
|
134
|
+
card?: DesignCard;
|
|
135
|
+
layout?: DesignLayout;
|
|
136
|
+
buttons?: DesignButtons;
|
|
137
|
+
inputs?: DesignInputs;
|
|
138
|
+
background?: DesignBackground;
|
|
139
|
+
backgroundDark?: DesignBackground;
|
|
140
|
+
logo?: DesignLogo;
|
|
141
|
+
}
|
|
142
|
+
type DeepPatch<T> = {
|
|
143
|
+
[K in keyof T]?: NonNullable<T[K]> extends readonly unknown[] ? T[K] | null : NonNullable<T[K]> extends object ? DeepPatch<NonNullable<T[K]>> | null : T[K] | null;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* A partial design update: nested objects merge, arrays (gradient stops) and
|
|
147
|
+
* values replace, and `null` removes a setting (falling back to the preset).
|
|
148
|
+
*/
|
|
149
|
+
export type AtlasDesignPatch = DeepPatch<AtlasDesign>;
|
|
150
|
+
/** The fully resolved design every surface renders (defaults ← preset ← overrides). */
|
|
151
|
+
export interface ResolvedAtlasDesign {
|
|
152
|
+
version: 1;
|
|
153
|
+
preset: DesignPresetId;
|
|
154
|
+
colorScheme: DesignColorScheme;
|
|
155
|
+
palette: Required<DesignPalette>;
|
|
156
|
+
paletteDark: Required<DesignPalette>;
|
|
157
|
+
typography: Required<DesignTypography>;
|
|
158
|
+
shape: Required<DesignShape>;
|
|
159
|
+
elevation: Required<DesignElevation>;
|
|
160
|
+
spacing: Required<DesignSpacing>;
|
|
161
|
+
card: Required<DesignCard>;
|
|
162
|
+
layout: Required<DesignLayout>;
|
|
163
|
+
buttons: Required<DesignButtons>;
|
|
164
|
+
inputs: Required<DesignInputs>;
|
|
165
|
+
background: DesignBackground;
|
|
166
|
+
backgroundDark: DesignBackground;
|
|
167
|
+
logo: DesignLogo;
|
|
168
|
+
}
|
|
169
|
+
/** A colour pair that fails its contrast target. */
|
|
170
|
+
export interface DesignWarning {
|
|
171
|
+
code: 'low_contrast';
|
|
172
|
+
mode: 'light' | 'dark';
|
|
173
|
+
pair: string[];
|
|
174
|
+
ratio: number;
|
|
175
|
+
required: number;
|
|
176
|
+
/** The setting to change, e.g. `palette.primaryInk`. */
|
|
177
|
+
path: string;
|
|
178
|
+
message: string;
|
|
179
|
+
}
|
|
180
|
+
/** A stored design (instance or organization) with its resolved result. */
|
|
181
|
+
export interface DesignSettings {
|
|
182
|
+
object: 'design' | 'organization_design';
|
|
183
|
+
/** Organization designs only. */
|
|
184
|
+
organization_id?: string;
|
|
185
|
+
design: AtlasDesign;
|
|
186
|
+
resolved: ResolvedAtlasDesign;
|
|
187
|
+
warnings: DesignWarning[];
|
|
188
|
+
/** True when nothing is stored and the page is drawn from the older branding settings. */
|
|
189
|
+
legacy: boolean;
|
|
190
|
+
/** When `legacy`: the design derived from the older branding settings. */
|
|
191
|
+
legacy_design?: AtlasDesign | null;
|
|
192
|
+
}
|
|
193
|
+
/** A compiled, unsaved design. Nothing is stored. */
|
|
194
|
+
export interface DesignPreview {
|
|
195
|
+
object: 'design_preview';
|
|
196
|
+
/** The selector the CSS is scoped to: `.atlas-root`. */
|
|
197
|
+
scope: string;
|
|
198
|
+
/** CSS custom properties (`--atlas-*`) for the scope, including light/dark blocks. */
|
|
199
|
+
css: string;
|
|
200
|
+
/** Attributes to set on the scoped element (`data-atlas-layout`, …). */
|
|
201
|
+
data_attributes: Record<string, string>;
|
|
202
|
+
/** Absolute URLs of the self-hosted font stylesheets to link. */
|
|
203
|
+
font_stylesheets: string[];
|
|
204
|
+
resolved: ResolvedAtlasDesign;
|
|
205
|
+
warnings: DesignWarning[];
|
|
206
|
+
/** The sign-in page rendered with the draft design (inert, for a sandboxed frame). */
|
|
207
|
+
html: string;
|
|
208
|
+
}
|
|
209
|
+
export type DesignAssetKind = 'background' | 'logo';
|
|
210
|
+
/** An uploaded design image. Use `asset_id` in a design (`logo.assetId`, …). */
|
|
211
|
+
export interface DesignAsset {
|
|
212
|
+
object: 'design_asset';
|
|
213
|
+
/** `dasset_…` */
|
|
214
|
+
asset_id: string;
|
|
215
|
+
kind: DesignAssetKind;
|
|
216
|
+
/** Where Atlas serves the stored image. */
|
|
217
|
+
url: string;
|
|
218
|
+
width: number;
|
|
219
|
+
height: number;
|
|
220
|
+
/** `#rrggbb` for an opaque image, else null. */
|
|
221
|
+
dominant_color: string | null;
|
|
222
|
+
/** Size of the stored (WebP) image. */
|
|
223
|
+
bytes: number;
|
|
224
|
+
created_at: string;
|
|
225
|
+
}
|
|
226
|
+
export interface DeletedDesignAsset {
|
|
227
|
+
object: 'design_asset';
|
|
228
|
+
asset_id: string;
|
|
229
|
+
deleted: true;
|
|
230
|
+
}
|
|
231
|
+
/** Image bytes to upload: PNG, JPEG, GIF or WebP, up to 8 MB and 40 megapixels. */
|
|
232
|
+
export type DesignAssetData = Blob | ArrayBuffer | ArrayBufferView;
|
|
233
|
+
export interface UploadDesignAssetOptions {
|
|
234
|
+
/** What the image is for (default `background`). */
|
|
235
|
+
kind?: DesignAssetKind;
|
|
236
|
+
/** e.g. `image/png`. Required unless `data` is a Blob with a type. */
|
|
237
|
+
contentType?: string;
|
|
238
|
+
}
|
|
239
|
+
/** The public design-system catalog: presets, curated fonts and CSS variables. */
|
|
240
|
+
export interface DesignCatalog {
|
|
241
|
+
object: 'design_catalog';
|
|
242
|
+
version: 1;
|
|
243
|
+
presets: Array<{
|
|
244
|
+
id: DesignPresetId;
|
|
245
|
+
label: string;
|
|
246
|
+
description: string;
|
|
247
|
+
resolved: ResolvedAtlasDesign;
|
|
248
|
+
}>;
|
|
249
|
+
fonts: Array<{
|
|
250
|
+
id: string;
|
|
251
|
+
label: string;
|
|
252
|
+
family: string | null;
|
|
253
|
+
category: string;
|
|
254
|
+
web_font: boolean;
|
|
255
|
+
stylesheet: string | null;
|
|
256
|
+
}>;
|
|
257
|
+
css_variables: Array<{
|
|
258
|
+
name: string;
|
|
259
|
+
type: string;
|
|
260
|
+
perMode?: boolean;
|
|
261
|
+
description: string;
|
|
262
|
+
}>;
|
|
263
|
+
}
|
|
264
|
+
export declare function designResource(request: RequestFn): {
|
|
265
|
+
/** The instance's sign-in page design: stored overrides, resolved design, warnings. */
|
|
266
|
+
get(): Promise<DesignSettings>;
|
|
267
|
+
/** Replace the whole instance design. */
|
|
268
|
+
replace(design: AtlasDesign): Promise<DesignSettings>;
|
|
269
|
+
/** Change part of the instance design; `null` removes a setting. */
|
|
270
|
+
update(design: AtlasDesignPatch): Promise<DesignSettings>;
|
|
271
|
+
/** Compile an unsaved design (CSS, attributes, fonts, rendered page). Nothing is saved. */
|
|
272
|
+
preview(design: AtlasDesign): Promise<DesignPreview>;
|
|
273
|
+
/** Per-organization design overrides, layered over the instance design. */
|
|
274
|
+
organizations: {
|
|
275
|
+
get(organizationId: string): Promise<DesignSettings>;
|
|
276
|
+
/** Replace the override; `{}` removes it. */
|
|
277
|
+
replace(organizationId: string, design: AtlasDesign): Promise<DesignSettings>;
|
|
278
|
+
update(organizationId: string, design: AtlasDesignPatch): Promise<DesignSettings>;
|
|
279
|
+
};
|
|
280
|
+
/** The instance's uploaded design images. */
|
|
281
|
+
assets: {
|
|
282
|
+
/**
|
|
283
|
+
* Upload a background or logo image as raw bytes. Atlas checks it,
|
|
284
|
+
* re-encodes it as WebP and serves it.
|
|
285
|
+
*/
|
|
286
|
+
upload(data: DesignAssetData, options?: UploadDesignAssetOptions): Promise<DesignAsset>;
|
|
287
|
+
/** Newest first (up to 100). */
|
|
288
|
+
list(): Promise<ListPage<DesignAsset>>;
|
|
289
|
+
/** Refused with 409 (`meta.used_by`) while a saved design still uses it. */
|
|
290
|
+
delete(assetId: string): Promise<DeletedDesignAsset>;
|
|
291
|
+
};
|
|
292
|
+
/** The public catalog: presets (resolved), curated fonts, the CSS variable set. */
|
|
293
|
+
catalog(): Promise<DesignCatalog>;
|
|
294
|
+
};
|
|
295
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.designResource = designResource;
|
|
4
|
+
const request_1 = require("./request");
|
|
5
|
+
function designResource(request) {
|
|
6
|
+
return {
|
|
7
|
+
/** The instance's sign-in page design: stored overrides, resolved design, warnings. */
|
|
8
|
+
get() {
|
|
9
|
+
return request({ method: 'GET', path: '/v1/instance/design' });
|
|
10
|
+
},
|
|
11
|
+
/** Replace the whole instance design. */
|
|
12
|
+
replace(design) {
|
|
13
|
+
return request({ method: 'PUT', path: '/v1/instance/design', body: { design } });
|
|
14
|
+
},
|
|
15
|
+
/** Change part of the instance design; `null` removes a setting. */
|
|
16
|
+
update(design) {
|
|
17
|
+
return request({ method: 'PATCH', path: '/v1/instance/design', body: { design } });
|
|
18
|
+
},
|
|
19
|
+
/** Compile an unsaved design (CSS, attributes, fonts, rendered page). Nothing is saved. */
|
|
20
|
+
preview(design) {
|
|
21
|
+
return request({ method: 'POST', path: '/v1/instance/design/preview', body: { design } });
|
|
22
|
+
},
|
|
23
|
+
/** Per-organization design overrides, layered over the instance design. */
|
|
24
|
+
organizations: {
|
|
25
|
+
get(organizationId) {
|
|
26
|
+
return request({
|
|
27
|
+
method: 'GET',
|
|
28
|
+
path: `/v1/organizations/${(0, request_1.enc)(organizationId)}/design`,
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
/** Replace the override; `{}` removes it. */
|
|
32
|
+
replace(organizationId, design) {
|
|
33
|
+
return request({
|
|
34
|
+
method: 'PUT',
|
|
35
|
+
path: `/v1/organizations/${(0, request_1.enc)(organizationId)}/design`,
|
|
36
|
+
body: { design },
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
update(organizationId, design) {
|
|
40
|
+
return request({
|
|
41
|
+
method: 'PATCH',
|
|
42
|
+
path: `/v1/organizations/${(0, request_1.enc)(organizationId)}/design`,
|
|
43
|
+
body: { design },
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
/** The instance's uploaded design images. */
|
|
48
|
+
assets: {
|
|
49
|
+
/**
|
|
50
|
+
* Upload a background or logo image as raw bytes. Atlas checks it,
|
|
51
|
+
* re-encodes it as WebP and serves it.
|
|
52
|
+
*/
|
|
53
|
+
upload(data, options = {}) {
|
|
54
|
+
return request({
|
|
55
|
+
method: 'POST',
|
|
56
|
+
path: '/v1/design/assets',
|
|
57
|
+
query: { kind: options.kind },
|
|
58
|
+
rawBody: { data, contentType: options.contentType },
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
/** Newest first (up to 100). */
|
|
62
|
+
list() {
|
|
63
|
+
return request({ method: 'GET', path: '/v1/design/assets' });
|
|
64
|
+
},
|
|
65
|
+
/** Refused with 409 (`meta.used_by`) while a saved design still uses it. */
|
|
66
|
+
delete(assetId) {
|
|
67
|
+
return request({ method: 'DELETE', path: `/v1/design/assets/${(0, request_1.enc)(assetId)}` });
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
/** The public catalog: presets (resolved), curated fonts, the CSS variable set. */
|
|
71
|
+
catalog() {
|
|
72
|
+
return request({ method: 'GET', path: '/v1/design/catalog' });
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=design.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design.js","sourceRoot":"","sources":["../../src/client/design.ts"],"names":[],"mappings":";;AAoUA,wCAsEC;AA1YD,uCAAgD;AAoUhD,SAAgB,cAAc,CAAC,OAAkB;IAC/C,OAAO;QACL,uFAAuF;QACvF,GAAG;YACD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC,CAAC;QACjE,CAAC;QACD,yCAAyC;QACzC,OAAO,CAAC,MAAmB;YACzB,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,oEAAoE;QACpE,MAAM,CAAC,MAAwB;YAC7B,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QACrF,CAAC;QACD,2FAA2F;QAC3F,OAAO,CAAC,MAAmB;YACzB,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,6BAA6B,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAC5F,CAAC;QACD,2EAA2E;QAC3E,aAAa,EAAE;YACb,GAAG,CAAC,cAAsB;gBACxB,OAAO,OAAO,CAAC;oBACb,MAAM,EAAE,KAAK;oBACb,IAAI,EAAE,qBAAqB,IAAA,aAAG,EAAC,cAAc,CAAC,SAAS;iBACxD,CAAC,CAAC;YACL,CAAC;YACD,6CAA6C;YAC7C,OAAO,CAAC,cAAsB,EAAE,MAAmB;gBACjD,OAAO,OAAO,CAAC;oBACb,MAAM,EAAE,KAAK;oBACb,IAAI,EAAE,qBAAqB,IAAA,aAAG,EAAC,cAAc,CAAC,SAAS;oBACvD,IAAI,EAAE,EAAE,MAAM,EAAE;iBACjB,CAAC,CAAC;YACL,CAAC;YACD,MAAM,CAAC,cAAsB,EAAE,MAAwB;gBACrD,OAAO,OAAO,CAAC;oBACb,MAAM,EAAE,OAAO;oBACf,IAAI,EAAE,qBAAqB,IAAA,aAAG,EAAC,cAAc,CAAC,SAAS;oBACvD,IAAI,EAAE,EAAE,MAAM,EAAE;iBACjB,CAAC,CAAC;YACL,CAAC;SACF;QACD,6CAA6C;QAC7C,MAAM,EAAE;YACN;;;eAGG;YACH,MAAM,CAAC,IAAqB,EAAE,UAAoC,EAAE;gBAClE,OAAO,OAAO,CAAC;oBACb,MAAM,EAAE,MAAM;oBACd,IAAI,EAAE,mBAAmB;oBACzB,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE;oBAC7B,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE;iBACpD,CAAC,CAAC;YACL,CAAC;YACD,gCAAgC;YAChC,IAAI;gBACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC,CAAC;YAC/D,CAAC;YACD,4EAA4E;YAC5E,MAAM,CAAC,OAAe;gBACpB,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,qBAAqB,IAAA,aAAG,EAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YAClF,CAAC;SACF;QACD,mFAAmF;QACnF,OAAO;YACL,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC,CAAC;QAChE,CAAC;KACF,CAAC;AACJ,CAAC"}
|