@onkernel/sdk 0.86.1 → 0.87.1
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/CHANGELOG.md +19 -1
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/lib/browser-routing.js +3 -3
- package/lib/browser-routing.js.map +1 -1
- package/lib/browser-routing.mjs +3 -3
- package/lib/browser-routing.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audit-logs/audit-logs.d.mts +169 -0
- package/resources/audit-logs/audit-logs.d.mts.map +1 -0
- package/resources/audit-logs/audit-logs.d.ts +169 -0
- package/resources/audit-logs/audit-logs.d.ts.map +1 -0
- package/resources/audit-logs/audit-logs.js +53 -0
- package/resources/audit-logs/audit-logs.js.map +1 -0
- package/resources/audit-logs/audit-logs.mjs +48 -0
- package/resources/audit-logs/audit-logs.mjs.map +1 -0
- package/resources/audit-logs/export-destinations.d.mts +163 -0
- package/resources/audit-logs/export-destinations.d.mts.map +1 -0
- package/resources/audit-logs/export-destinations.d.ts +163 -0
- package/resources/audit-logs/export-destinations.d.ts.map +1 -0
- package/resources/audit-logs/export-destinations.js +62 -0
- package/resources/audit-logs/export-destinations.js.map +1 -0
- package/resources/audit-logs/export-destinations.mjs +58 -0
- package/resources/audit-logs/export-destinations.mjs.map +1 -0
- package/resources/audit-logs/index.d.mts +3 -0
- package/resources/audit-logs/index.d.mts.map +1 -0
- package/resources/audit-logs/index.d.ts +3 -0
- package/resources/audit-logs/index.d.ts.map +1 -0
- package/resources/audit-logs/index.js +9 -0
- package/resources/audit-logs/index.js.map +1 -0
- package/resources/audit-logs/index.mjs +4 -0
- package/resources/audit-logs/index.mjs.map +1 -0
- package/resources/audit-logs.d.mts +1 -164
- package/resources/audit-logs.d.mts.map +1 -1
- package/resources/audit-logs.d.ts +1 -164
- package/resources/audit-logs.d.ts.map +1 -1
- package/resources/audit-logs.js +2 -41
- package/resources/audit-logs.js.map +1 -1
- package/resources/audit-logs.mjs +1 -39
- package/resources/audit-logs.mjs.map +1 -1
- package/resources/auth/auth.d.mts +4 -0
- package/resources/auth/auth.d.mts.map +1 -1
- package/resources/auth/auth.d.ts +4 -0
- package/resources/auth/auth.d.ts.map +1 -1
- package/resources/auth/auth.js +4 -0
- package/resources/auth/auth.js.map +1 -1
- package/resources/auth/auth.mjs +4 -0
- package/resources/auth/auth.mjs.map +1 -1
- package/resources/auth/context.d.mts +106 -0
- package/resources/auth/context.d.mts.map +1 -0
- package/resources/auth/context.d.ts +106 -0
- package/resources/auth/context.d.ts.map +1 -0
- package/resources/auth/context.js +25 -0
- package/resources/auth/context.js.map +1 -0
- package/resources/auth/context.mjs +21 -0
- package/resources/auth/context.mjs.map +1 -0
- package/resources/auth/index.d.mts +1 -0
- package/resources/auth/index.d.mts.map +1 -1
- package/resources/auth/index.d.ts +1 -0
- package/resources/auth/index.d.ts.map +1 -1
- package/resources/auth/index.js +3 -1
- package/resources/auth/index.js.map +1 -1
- package/resources/auth/index.mjs +1 -0
- package/resources/auth/index.mjs.map +1 -1
- package/resources/browser-pools.d.mts +5 -0
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +5 -0
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browsers/browsers.d.mts +20 -0
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +20 -0
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invocations.d.mts +5 -0
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +5 -0
- package/resources/invocations.d.ts.map +1 -1
- package/src/client.ts +7 -7
- package/src/lib/browser-routing.ts +3 -2
- package/src/resources/audit-logs/audit-logs.ts +281 -0
- package/src/resources/audit-logs/export-destinations.ts +262 -0
- package/src/resources/audit-logs/index.ts +25 -0
- package/src/resources/audit-logs.ts +1 -249
- package/src/resources/auth/auth.ts +6 -0
- package/src/resources/auth/context.ts +125 -0
- package/src/resources/auth/index.ts +1 -0
- package/src/resources/browser-pools.ts +6 -0
- package/src/resources/browsers/browsers.ts +24 -0
- package/src/resources/index.ts +1 -1
- package/src/resources/invocations.ts +6 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,165 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { PagePromise, PageTokenPagination, type PageTokenPaginationParams } from "../core/pagination.js";
|
|
4
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
-
import { type AuditLogDownloadDestination, type AuditLogDownloadOptions, type AuditLogDownloadParams, type AuditLogDownloadProgress, type AuditLogDownloadResult } from "../lib/audit-log-download.js";
|
|
6
|
-
export type { AuditLogDownloadDestination, AuditLogDownloadOptions, AuditLogDownloadParams, AuditLogDownloadProgress, AuditLogDownloadResult, } from "../lib/audit-log-download.js";
|
|
7
|
-
/**
|
|
8
|
-
* Read audit log records for the authenticated organization.
|
|
9
|
-
*/
|
|
10
|
-
export declare class AuditLogs extends APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* API for searching audit logs. Limited to at most 30 day search, returns up to
|
|
13
|
-
* 100 records per page. Not recommended for bulk export.
|
|
14
|
-
*/
|
|
15
|
-
list(query: AuditLogListParams, options?: RequestOptions): PagePromise<AuditLogEntriesPageTokenPagination, AuditLogEntry>;
|
|
16
|
-
/**
|
|
17
|
-
* Download an organization's audit log records for a time range as a file, for
|
|
18
|
-
* archival, compliance, or offline analysis. For interactive browsing, use GET
|
|
19
|
-
* /audit-logs.
|
|
20
|
-
*/
|
|
21
|
-
exportChunk(query: AuditLogExportChunkParams, options?: RequestOptions): APIPromise<Response>;
|
|
22
|
-
/**
|
|
23
|
-
* Download a complete gzip-compressed JSON Lines audit log export to a writable
|
|
24
|
-
* destination. The SDK verifies every chunk and retries transient transfer
|
|
25
|
-
* failures. It does not close the destination. If the download fails, the
|
|
26
|
-
* destination may contain a partial export; use a temporary file and atomic
|
|
27
|
-
* rename when the completed export must be published atomically.
|
|
28
|
-
*/
|
|
29
|
-
download(query: AuditLogDownloadParams, destination: AuditLogDownloadDestination, options?: AuditLogDownloadOptions): Promise<AuditLogDownloadResult>;
|
|
30
|
-
}
|
|
31
|
-
export type AuditLogEntriesPageTokenPagination = PageTokenPagination<AuditLogEntry>;
|
|
32
|
-
export interface AuditLogEntry {
|
|
33
|
-
/**
|
|
34
|
-
* Authentication strategy used for the request.
|
|
35
|
-
*/
|
|
36
|
-
auth_strategy: string;
|
|
37
|
-
/**
|
|
38
|
-
* Client IP address.
|
|
39
|
-
*/
|
|
40
|
-
client_ip: string;
|
|
41
|
-
/**
|
|
42
|
-
* Request host.
|
|
43
|
-
*/
|
|
44
|
-
domain: string;
|
|
45
|
-
/**
|
|
46
|
-
* Request duration in milliseconds.
|
|
47
|
-
*/
|
|
48
|
-
duration_ms: number;
|
|
49
|
-
/**
|
|
50
|
-
* Email of the authenticated user at request time, if any.
|
|
51
|
-
*/
|
|
52
|
-
email: string;
|
|
53
|
-
/**
|
|
54
|
-
* HTTP method.
|
|
55
|
-
*/
|
|
56
|
-
method: string;
|
|
57
|
-
/**
|
|
58
|
-
* Request path.
|
|
59
|
-
*/
|
|
60
|
-
path: string;
|
|
61
|
-
/**
|
|
62
|
-
* Matched API route pattern, if available.
|
|
63
|
-
*/
|
|
64
|
-
route: string;
|
|
65
|
-
/**
|
|
66
|
-
* HTTP response status code.
|
|
67
|
-
*/
|
|
68
|
-
status: number;
|
|
69
|
-
/**
|
|
70
|
-
* UTC time when the request was received.
|
|
71
|
-
*/
|
|
72
|
-
timestamp: string;
|
|
73
|
-
/**
|
|
74
|
-
* User agent header.
|
|
75
|
-
*/
|
|
76
|
-
user_agent: string;
|
|
77
|
-
/**
|
|
78
|
-
* ID of the authenticated user, if any.
|
|
79
|
-
*/
|
|
80
|
-
user_id: string;
|
|
81
|
-
}
|
|
82
|
-
export interface AuditLogListParams extends PageTokenPaginationParams {
|
|
83
|
-
/**
|
|
84
|
-
* Upper bound (exclusive) for the audit record timestamp.
|
|
85
|
-
*/
|
|
86
|
-
end: string;
|
|
87
|
-
/**
|
|
88
|
-
* Lower bound (inclusive) for the audit record timestamp.
|
|
89
|
-
*/
|
|
90
|
-
start: string;
|
|
91
|
-
/**
|
|
92
|
-
* Filter by authentication strategy.
|
|
93
|
-
*/
|
|
94
|
-
auth_strategy?: string;
|
|
95
|
-
/**
|
|
96
|
-
* Filter out results by HTTP method.
|
|
97
|
-
*/
|
|
98
|
-
exclude_method?: Array<string>;
|
|
99
|
-
/**
|
|
100
|
-
* Filter by HTTP method.
|
|
101
|
-
*/
|
|
102
|
-
method?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Free-text search over path, user ID, email, client IP, and status.
|
|
105
|
-
*/
|
|
106
|
-
search?: string;
|
|
107
|
-
/**
|
|
108
|
-
* Additional user IDs to OR into free-text search.
|
|
109
|
-
*/
|
|
110
|
-
search_user_id?: Array<string>;
|
|
111
|
-
/**
|
|
112
|
-
* Filter by service name.
|
|
113
|
-
*/
|
|
114
|
-
service?: string;
|
|
115
|
-
}
|
|
116
|
-
export interface AuditLogExportChunkParams {
|
|
117
|
-
/**
|
|
118
|
-
* Upper bound (exclusive) for the audit record timestamp.
|
|
119
|
-
*/
|
|
120
|
-
end: string;
|
|
121
|
-
/**
|
|
122
|
-
* Lower bound (inclusive) for the audit record timestamp.
|
|
123
|
-
*/
|
|
124
|
-
start: string;
|
|
125
|
-
/**
|
|
126
|
-
* Filter by authentication strategy.
|
|
127
|
-
*/
|
|
128
|
-
auth_strategy?: string;
|
|
129
|
-
/**
|
|
130
|
-
* Opaque cursor from X-Next-Cursor for the next chunk of older records.
|
|
131
|
-
*/
|
|
132
|
-
cursor?: string;
|
|
133
|
-
/**
|
|
134
|
-
* Filter out results by HTTP method.
|
|
135
|
-
*/
|
|
136
|
-
exclude_method?: Array<string>;
|
|
137
|
-
/**
|
|
138
|
-
* Encoding for the returned chunk.
|
|
139
|
-
*/
|
|
140
|
-
format?: 'jsonl' | 'jsonl.gz';
|
|
141
|
-
/**
|
|
142
|
-
* Maximum number of records to return in this chunk.
|
|
143
|
-
*/
|
|
144
|
-
limit?: number;
|
|
145
|
-
/**
|
|
146
|
-
* Filter by HTTP method.
|
|
147
|
-
*/
|
|
148
|
-
method?: string;
|
|
149
|
-
/**
|
|
150
|
-
* Free-text search over path, user ID, email, client IP, and status.
|
|
151
|
-
*/
|
|
152
|
-
search?: string;
|
|
153
|
-
/**
|
|
154
|
-
* Additional user IDs to OR into free-text search.
|
|
155
|
-
*/
|
|
156
|
-
search_user_id?: Array<string>;
|
|
157
|
-
/**
|
|
158
|
-
* Filter by service name.
|
|
159
|
-
*/
|
|
160
|
-
service?: string;
|
|
161
|
-
}
|
|
162
|
-
export declare namespace AuditLogs {
|
|
163
|
-
export { type AuditLogEntry as AuditLogEntry, type AuditLogEntriesPageTokenPagination as AuditLogEntriesPageTokenPagination, type AuditLogListParams as AuditLogListParams, type AuditLogExportChunkParams as AuditLogExportChunkParams, type AuditLogDownloadDestination as AuditLogDownloadDestination, type AuditLogDownloadOptions as AuditLogDownloadOptions, type AuditLogDownloadParams as AuditLogDownloadParams, type AuditLogDownloadProgress as AuditLogDownloadProgress, type AuditLogDownloadResult as AuditLogDownloadResult, };
|
|
164
|
-
}
|
|
1
|
+
export * from "./audit-logs/index.js";
|
|
165
2
|
//# sourceMappingURL=audit-logs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logs.d.ts","sourceRoot":"","sources":["../src/resources/audit-logs.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"audit-logs.d.ts","sourceRoot":"","sources":["../src/resources/audit-logs.ts"],"names":[],"mappings":"AAEA,sCAAmC"}
|
package/resources/audit-logs.js
CHANGED
|
@@ -1,45 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const pagination_1 = require("../core/pagination.js");
|
|
7
|
-
const headers_1 = require("../internal/headers.js");
|
|
8
|
-
const audit_log_download_1 = require("../lib/audit-log-download.js");
|
|
9
|
-
/**
|
|
10
|
-
* Read audit log records for the authenticated organization.
|
|
11
|
-
*/
|
|
12
|
-
class AuditLogs extends resource_1.APIResource {
|
|
13
|
-
/**
|
|
14
|
-
* API for searching audit logs. Limited to at most 30 day search, returns up to
|
|
15
|
-
* 100 records per page. Not recommended for bulk export.
|
|
16
|
-
*/
|
|
17
|
-
list(query, options) {
|
|
18
|
-
return this._client.getAPIList('/audit-logs', (pagination_1.PageTokenPagination), { query, ...options });
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Download an organization's audit log records for a time range as a file, for
|
|
22
|
-
* archival, compliance, or offline analysis. For interactive browsing, use GET
|
|
23
|
-
* /audit-logs.
|
|
24
|
-
*/
|
|
25
|
-
exportChunk(query, options) {
|
|
26
|
-
return this._client.get('/audit-logs/export/chunk', {
|
|
27
|
-
query,
|
|
28
|
-
...options,
|
|
29
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: 'application/octet-stream' }, options?.headers]),
|
|
30
|
-
__binaryResponse: true,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Download a complete gzip-compressed JSON Lines audit log export to a writable
|
|
35
|
-
* destination. The SDK verifies every chunk and retries transient transfer
|
|
36
|
-
* failures. It does not close the destination. If the download fails, the
|
|
37
|
-
* destination may contain a partial export; use a temporary file and atomic
|
|
38
|
-
* rename when the completed export must be published atomically.
|
|
39
|
-
*/
|
|
40
|
-
download(query, destination, options) {
|
|
41
|
-
return (0, audit_log_download_1.downloadAuditLogs)((chunkQuery, chunkOptions) => this.exportChunk(chunkQuery, chunkOptions), query, destination, this._client.timeout, options);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.AuditLogs = AuditLogs;
|
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./audit-logs/index.js"), exports);
|
|
45
6
|
//# sourceMappingURL=audit-logs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logs.js","sourceRoot":"","sources":["../src/resources/audit-logs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"audit-logs.js","sourceRoot":"","sources":["../src/resources/audit-logs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gEAAmC"}
|
package/resources/audit-logs.mjs
CHANGED
|
@@ -1,41 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { PageTokenPagination } from "../core/pagination.mjs";
|
|
4
|
-
import { buildHeaders } from "../internal/headers.mjs";
|
|
5
|
-
import { downloadAuditLogs, } from "../lib/audit-log-download.mjs";
|
|
6
|
-
/**
|
|
7
|
-
* Read audit log records for the authenticated organization.
|
|
8
|
-
*/
|
|
9
|
-
export class AuditLogs extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* API for searching audit logs. Limited to at most 30 day search, returns up to
|
|
12
|
-
* 100 records per page. Not recommended for bulk export.
|
|
13
|
-
*/
|
|
14
|
-
list(query, options) {
|
|
15
|
-
return this._client.getAPIList('/audit-logs', (PageTokenPagination), { query, ...options });
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Download an organization's audit log records for a time range as a file, for
|
|
19
|
-
* archival, compliance, or offline analysis. For interactive browsing, use GET
|
|
20
|
-
* /audit-logs.
|
|
21
|
-
*/
|
|
22
|
-
exportChunk(query, options) {
|
|
23
|
-
return this._client.get('/audit-logs/export/chunk', {
|
|
24
|
-
query,
|
|
25
|
-
...options,
|
|
26
|
-
headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]),
|
|
27
|
-
__binaryResponse: true,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Download a complete gzip-compressed JSON Lines audit log export to a writable
|
|
32
|
-
* destination. The SDK verifies every chunk and retries transient transfer
|
|
33
|
-
* failures. It does not close the destination. If the download fails, the
|
|
34
|
-
* destination may contain a partial export; use a temporary file and atomic
|
|
35
|
-
* rename when the completed export must be published atomically.
|
|
36
|
-
*/
|
|
37
|
-
download(query, destination, options) {
|
|
38
|
-
return downloadAuditLogs((chunkQuery, chunkOptions) => this.exportChunk(chunkQuery, chunkOptions), query, destination, this._client.timeout, options);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
2
|
+
export * from "./audit-logs/index.mjs";
|
|
41
3
|
//# sourceMappingURL=audit-logs.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logs.mjs","sourceRoot":"","sources":["../src/resources/audit-logs.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,
|
|
1
|
+
{"version":3,"file":"audit-logs.mjs","sourceRoot":"","sources":["../src/resources/audit-logs.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,uCAAmC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import * as ConnectionsAPI from "./connections.mjs";
|
|
3
3
|
import { ConnectionCreateParams, ConnectionFollowResponse, ConnectionListParams, ConnectionLoginParams, ConnectionSubmitParams, ConnectionTimelineParams, ConnectionUpdateParams, Connections, LoginResponse, ManagedAuth, ManagedAuthCreateRequest, ManagedAuthTimelineEvent, ManagedAuthTimelineEventsOffsetPagination, ManagedAuthUpdateRequest, ManagedAuthsOffsetPagination, SubmitFieldsRequest, SubmitFieldsResponse } from "./connections.mjs";
|
|
4
|
+
import * as ContextAPI from "./context.mjs";
|
|
5
|
+
import { AuthContext, Context } from "./context.mjs";
|
|
4
6
|
export declare class Auth extends APIResource {
|
|
7
|
+
context: ContextAPI.Context;
|
|
5
8
|
connections: ConnectionsAPI.Connections;
|
|
6
9
|
}
|
|
7
10
|
export declare namespace Auth {
|
|
11
|
+
export { Context as Context, type AuthContext as AuthContext };
|
|
8
12
|
export { Connections as Connections, type LoginResponse as LoginResponse, type ManagedAuth as ManagedAuth, type ManagedAuthCreateRequest as ManagedAuthCreateRequest, type ManagedAuthTimelineEvent as ManagedAuthTimelineEvent, type ManagedAuthUpdateRequest as ManagedAuthUpdateRequest, type SubmitFieldsRequest as SubmitFieldsRequest, type SubmitFieldsResponse as SubmitFieldsResponse, type ConnectionFollowResponse as ConnectionFollowResponse, type ManagedAuthsOffsetPagination as ManagedAuthsOffsetPagination, type ManagedAuthTimelineEventsOffsetPagination as ManagedAuthTimelineEventsOffsetPagination, type ConnectionCreateParams as ConnectionCreateParams, type ConnectionUpdateParams as ConnectionUpdateParams, type ConnectionListParams as ConnectionListParams, type ConnectionLoginParams as ConnectionLoginParams, type ConnectionSubmitParams as ConnectionSubmitParams, type ConnectionTimelineParams as ConnectionTimelineParams, };
|
|
9
13
|
}
|
|
10
14
|
//# sourceMappingURL=auth.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["../../src/resources/auth/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,0BAAsB;AAChD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,yCAAyC,EACzC,wBAAwB,EACxB,4BAA4B,EAC5B,mBAAmB,EACnB,oBAAoB,EACrB,0BAAsB;
|
|
1
|
+
{"version":3,"file":"auth.d.mts","sourceRoot":"","sources":["../../src/resources/auth/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,0BAAsB;AAChD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,yCAAyC,EACzC,wBAAwB,EACxB,4BAA4B,EAC5B,mBAAmB,EACnB,oBAAoB,EACrB,0BAAsB;AACvB,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,sBAAkB;AAEjD,qBAAa,IAAK,SAAQ,WAAW;IACnC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IACnE,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;CACxF;AAKD,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;IAE/D,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
package/resources/auth/auth.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as ConnectionsAPI from "./connections.js";
|
|
3
3
|
import { ConnectionCreateParams, ConnectionFollowResponse, ConnectionListParams, ConnectionLoginParams, ConnectionSubmitParams, ConnectionTimelineParams, ConnectionUpdateParams, Connections, LoginResponse, ManagedAuth, ManagedAuthCreateRequest, ManagedAuthTimelineEvent, ManagedAuthTimelineEventsOffsetPagination, ManagedAuthUpdateRequest, ManagedAuthsOffsetPagination, SubmitFieldsRequest, SubmitFieldsResponse } from "./connections.js";
|
|
4
|
+
import * as ContextAPI from "./context.js";
|
|
5
|
+
import { AuthContext, Context } from "./context.js";
|
|
4
6
|
export declare class Auth extends APIResource {
|
|
7
|
+
context: ContextAPI.Context;
|
|
5
8
|
connections: ConnectionsAPI.Connections;
|
|
6
9
|
}
|
|
7
10
|
export declare namespace Auth {
|
|
11
|
+
export { Context as Context, type AuthContext as AuthContext };
|
|
8
12
|
export { Connections as Connections, type LoginResponse as LoginResponse, type ManagedAuth as ManagedAuth, type ManagedAuthCreateRequest as ManagedAuthCreateRequest, type ManagedAuthTimelineEvent as ManagedAuthTimelineEvent, type ManagedAuthUpdateRequest as ManagedAuthUpdateRequest, type SubmitFieldsRequest as SubmitFieldsRequest, type SubmitFieldsResponse as SubmitFieldsResponse, type ConnectionFollowResponse as ConnectionFollowResponse, type ManagedAuthsOffsetPagination as ManagedAuthsOffsetPagination, type ManagedAuthTimelineEventsOffsetPagination as ManagedAuthTimelineEventsOffsetPagination, type ConnectionCreateParams as ConnectionCreateParams, type ConnectionUpdateParams as ConnectionUpdateParams, type ConnectionListParams as ConnectionListParams, type ConnectionLoginParams as ConnectionLoginParams, type ConnectionSubmitParams as ConnectionSubmitParams, type ConnectionTimelineParams as ConnectionTimelineParams, };
|
|
9
13
|
}
|
|
10
14
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/resources/auth/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,cAAc,yBAAsB;AAChD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,yCAAyC,EACzC,wBAAwB,EACxB,4BAA4B,EAC5B,mBAAmB,EACnB,oBAAoB,EACrB,yBAAsB;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/resources/auth/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,cAAc,yBAAsB;AAChD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,yCAAyC,EACzC,wBAAwB,EACxB,4BAA4B,EAC5B,mBAAmB,EACnB,oBAAoB,EACrB,yBAAsB;AACvB,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,qBAAkB;AAEjD,qBAAa,IAAK,SAAQ,WAAW;IACnC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IACnE,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;CACxF;AAKD,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;IAE/D,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
package/resources/auth/auth.js
CHANGED
|
@@ -6,12 +6,16 @@ const tslib_1 = require("../../internal/tslib.js");
|
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
|
7
7
|
const ConnectionsAPI = tslib_1.__importStar(require("./connections.js"));
|
|
8
8
|
const connections_1 = require("./connections.js");
|
|
9
|
+
const ContextAPI = tslib_1.__importStar(require("./context.js"));
|
|
10
|
+
const context_1 = require("./context.js");
|
|
9
11
|
class Auth extends resource_1.APIResource {
|
|
10
12
|
constructor() {
|
|
11
13
|
super(...arguments);
|
|
14
|
+
this.context = new ContextAPI.Context(this._client);
|
|
12
15
|
this.connections = new ConnectionsAPI.Connections(this._client);
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
exports.Auth = Auth;
|
|
19
|
+
Auth.Context = context_1.Context;
|
|
16
20
|
Auth.Connections = connections_1.Connections;
|
|
17
21
|
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/resources/auth/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,yEAAgD;AAChD,kDAkBuB;
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/resources/auth/auth.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,yEAAgD;AAChD,kDAkBuB;AACvB,iEAAwC;AACxC,0CAAiD;AAEjD,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzF,CAAC;CAAA;AAHD,oBAGC;AAED,IAAI,CAAC,OAAO,GAAG,iBAAO,CAAC;AACvB,IAAI,CAAC,WAAW,GAAG,yBAAW,CAAC"}
|
package/resources/auth/auth.mjs
CHANGED
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import * as ConnectionsAPI from "./connections.mjs";
|
|
4
4
|
import { Connections, } from "./connections.mjs";
|
|
5
|
+
import * as ContextAPI from "./context.mjs";
|
|
6
|
+
import { Context } from "./context.mjs";
|
|
5
7
|
export class Auth extends APIResource {
|
|
6
8
|
constructor() {
|
|
7
9
|
super(...arguments);
|
|
10
|
+
this.context = new ContextAPI.Context(this._client);
|
|
8
11
|
this.connections = new ConnectionsAPI.Connections(this._client);
|
|
9
12
|
}
|
|
10
13
|
}
|
|
14
|
+
Auth.Context = Context;
|
|
11
15
|
Auth.Connections = Connections;
|
|
12
16
|
//# sourceMappingURL=auth.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../../src/resources/auth/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,0BAAsB;AAChD,OAAO,EAQL,WAAW,GAUZ,0BAAsB;
|
|
1
|
+
{"version":3,"file":"auth.mjs","sourceRoot":"","sources":["../../src/resources/auth/auth.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,0BAAsB;AAChD,OAAO,EAQL,WAAW,GAUZ,0BAAsB;AACvB,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAAe,OAAO,EAAE,sBAAkB;AAEjD,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzF,CAAC;CAAA;AAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACvB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Inspect the identity and authorization context for the current request.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Context extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the authenticated principal, organization, credential scope, and
|
|
10
|
+
* effective request scope. The response is derived from the verified request
|
|
11
|
+
* context and does not expose credential secrets.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const authContext = await client.auth.context.retrieve();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
retrieve(options?: RequestOptions): APIPromise<AuthContext>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The identity and authorization context resolved for the current request.
|
|
22
|
+
*/
|
|
23
|
+
export interface AuthContext {
|
|
24
|
+
authentication: AuthContext.Authentication;
|
|
25
|
+
/**
|
|
26
|
+
* The credential's maximum scope and the effective scope selected for this
|
|
27
|
+
* request. Future permission data can be added without changing scope semantics.
|
|
28
|
+
*/
|
|
29
|
+
authorization: AuthContext.Authorization;
|
|
30
|
+
organization: AuthContext.Organization;
|
|
31
|
+
principal: AuthContext.Principal;
|
|
32
|
+
}
|
|
33
|
+
export declare namespace AuthContext {
|
|
34
|
+
interface Authentication {
|
|
35
|
+
/**
|
|
36
|
+
* The API key ID when authenticated with an API key; null for session credentials.
|
|
37
|
+
*/
|
|
38
|
+
credential_id: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* The credential format used to authenticate the request.
|
|
41
|
+
*/
|
|
42
|
+
method: 'api_key' | 'jwt';
|
|
43
|
+
/**
|
|
44
|
+
* The source classification resolved by authentication middleware.
|
|
45
|
+
*/
|
|
46
|
+
source: 'api_key' | 'oauth' | 'dashboard';
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The credential's maximum scope and the effective scope selected for this
|
|
50
|
+
* request. Future permission data can be added without changing scope semantics.
|
|
51
|
+
*/
|
|
52
|
+
interface Authorization {
|
|
53
|
+
/**
|
|
54
|
+
* A scope within the authenticated organization. A null project_id represents
|
|
55
|
+
* organization-wide scope.
|
|
56
|
+
*/
|
|
57
|
+
credential_scope: Authorization.CredentialScope;
|
|
58
|
+
/**
|
|
59
|
+
* A scope within the authenticated organization. A null project_id represents
|
|
60
|
+
* organization-wide scope.
|
|
61
|
+
*/
|
|
62
|
+
effective_scope: Authorization.EffectiveScope;
|
|
63
|
+
}
|
|
64
|
+
namespace Authorization {
|
|
65
|
+
/**
|
|
66
|
+
* A scope within the authenticated organization. A null project_id represents
|
|
67
|
+
* organization-wide scope.
|
|
68
|
+
*/
|
|
69
|
+
interface CredentialScope {
|
|
70
|
+
/**
|
|
71
|
+
* The Kernel project ID, or null when the scope is organization-wide.
|
|
72
|
+
*/
|
|
73
|
+
project_id: string | null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A scope within the authenticated organization. A null project_id represents
|
|
77
|
+
* organization-wide scope.
|
|
78
|
+
*/
|
|
79
|
+
interface EffectiveScope {
|
|
80
|
+
/**
|
|
81
|
+
* The Kernel project ID, or null when the scope is organization-wide.
|
|
82
|
+
*/
|
|
83
|
+
project_id: string | null;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
interface Organization {
|
|
87
|
+
/**
|
|
88
|
+
* The authenticated Kernel organization ID.
|
|
89
|
+
*/
|
|
90
|
+
id: string;
|
|
91
|
+
}
|
|
92
|
+
interface Principal {
|
|
93
|
+
/**
|
|
94
|
+
* The API key ID for API-key principals or user ID for user principals.
|
|
95
|
+
*/
|
|
96
|
+
id: string;
|
|
97
|
+
/**
|
|
98
|
+
* The kind of principal authenticated for the request.
|
|
99
|
+
*/
|
|
100
|
+
type: 'api_key' | 'user';
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
export declare namespace Context {
|
|
104
|
+
export { type AuthContext as AuthContext };
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=context.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.mts","sourceRoot":"","sources":["../../src/resources/auth/context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;CAG5D;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,WAAW,CAAC,cAAc,CAAC;IAE3C;;;OAGG;IACH,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC;IAEzC,YAAY,EAAE,WAAW,CAAC,YAAY,CAAC;IAEvC,SAAS,EAAE,WAAW,CAAC,SAAS,CAAC;CAClC;AAED,yBAAiB,WAAW,CAAC;IAC3B,UAAiB,cAAc;QAC7B;;WAEG;QACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,MAAM,EAAE,SAAS,GAAG,KAAK,CAAC;QAE1B;;WAEG;QACH,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;KAC3C;IAED;;;OAGG;IACH,UAAiB,aAAa;QAC5B;;;WAGG;QACH,gBAAgB,EAAE,aAAa,CAAC,eAAe,CAAC;QAEhD;;;WAGG;QACH,eAAe,EAAE,aAAa,CAAC,cAAc,CAAC;KAC/C;IAED,UAAiB,aAAa,CAAC;QAC7B;;;WAGG;QACH,UAAiB,eAAe;YAC9B;;eAEG;YACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;SAC3B;QAED;;;WAGG;QACH,UAAiB,cAAc;YAC7B;;eAEG;YACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;SAC3B;KACF;IAED,UAAiB,YAAY;QAC3B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;IAED,UAAiB,SAAS;QACxB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;KAC1B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;CAC5C"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Inspect the identity and authorization context for the current request.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Context extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the authenticated principal, organization, credential scope, and
|
|
10
|
+
* effective request scope. The response is derived from the verified request
|
|
11
|
+
* context and does not expose credential secrets.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const authContext = await client.auth.context.retrieve();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
retrieve(options?: RequestOptions): APIPromise<AuthContext>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The identity and authorization context resolved for the current request.
|
|
22
|
+
*/
|
|
23
|
+
export interface AuthContext {
|
|
24
|
+
authentication: AuthContext.Authentication;
|
|
25
|
+
/**
|
|
26
|
+
* The credential's maximum scope and the effective scope selected for this
|
|
27
|
+
* request. Future permission data can be added without changing scope semantics.
|
|
28
|
+
*/
|
|
29
|
+
authorization: AuthContext.Authorization;
|
|
30
|
+
organization: AuthContext.Organization;
|
|
31
|
+
principal: AuthContext.Principal;
|
|
32
|
+
}
|
|
33
|
+
export declare namespace AuthContext {
|
|
34
|
+
interface Authentication {
|
|
35
|
+
/**
|
|
36
|
+
* The API key ID when authenticated with an API key; null for session credentials.
|
|
37
|
+
*/
|
|
38
|
+
credential_id: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* The credential format used to authenticate the request.
|
|
41
|
+
*/
|
|
42
|
+
method: 'api_key' | 'jwt';
|
|
43
|
+
/**
|
|
44
|
+
* The source classification resolved by authentication middleware.
|
|
45
|
+
*/
|
|
46
|
+
source: 'api_key' | 'oauth' | 'dashboard';
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The credential's maximum scope and the effective scope selected for this
|
|
50
|
+
* request. Future permission data can be added without changing scope semantics.
|
|
51
|
+
*/
|
|
52
|
+
interface Authorization {
|
|
53
|
+
/**
|
|
54
|
+
* A scope within the authenticated organization. A null project_id represents
|
|
55
|
+
* organization-wide scope.
|
|
56
|
+
*/
|
|
57
|
+
credential_scope: Authorization.CredentialScope;
|
|
58
|
+
/**
|
|
59
|
+
* A scope within the authenticated organization. A null project_id represents
|
|
60
|
+
* organization-wide scope.
|
|
61
|
+
*/
|
|
62
|
+
effective_scope: Authorization.EffectiveScope;
|
|
63
|
+
}
|
|
64
|
+
namespace Authorization {
|
|
65
|
+
/**
|
|
66
|
+
* A scope within the authenticated organization. A null project_id represents
|
|
67
|
+
* organization-wide scope.
|
|
68
|
+
*/
|
|
69
|
+
interface CredentialScope {
|
|
70
|
+
/**
|
|
71
|
+
* The Kernel project ID, or null when the scope is organization-wide.
|
|
72
|
+
*/
|
|
73
|
+
project_id: string | null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A scope within the authenticated organization. A null project_id represents
|
|
77
|
+
* organization-wide scope.
|
|
78
|
+
*/
|
|
79
|
+
interface EffectiveScope {
|
|
80
|
+
/**
|
|
81
|
+
* The Kernel project ID, or null when the scope is organization-wide.
|
|
82
|
+
*/
|
|
83
|
+
project_id: string | null;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
interface Organization {
|
|
87
|
+
/**
|
|
88
|
+
* The authenticated Kernel organization ID.
|
|
89
|
+
*/
|
|
90
|
+
id: string;
|
|
91
|
+
}
|
|
92
|
+
interface Principal {
|
|
93
|
+
/**
|
|
94
|
+
* The API key ID for API-key principals or user ID for user principals.
|
|
95
|
+
*/
|
|
96
|
+
id: string;
|
|
97
|
+
/**
|
|
98
|
+
* The kind of principal authenticated for the request.
|
|
99
|
+
*/
|
|
100
|
+
type: 'api_key' | 'user';
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
export declare namespace Context {
|
|
104
|
+
export { type AuthContext as AuthContext };
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/resources/auth/context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;CAG5D;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,WAAW,CAAC,cAAc,CAAC;IAE3C;;;OAGG;IACH,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC;IAEzC,YAAY,EAAE,WAAW,CAAC,YAAY,CAAC;IAEvC,SAAS,EAAE,WAAW,CAAC,SAAS,CAAC;CAClC;AAED,yBAAiB,WAAW,CAAC;IAC3B,UAAiB,cAAc;QAC7B;;WAEG;QACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,MAAM,EAAE,SAAS,GAAG,KAAK,CAAC;QAE1B;;WAEG;QACH,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;KAC3C;IAED;;;OAGG;IACH,UAAiB,aAAa;QAC5B;;;WAGG;QACH,gBAAgB,EAAE,aAAa,CAAC,eAAe,CAAC;QAEhD;;;WAGG;QACH,eAAe,EAAE,aAAa,CAAC,cAAc,CAAC;KAC/C;IAED,UAAiB,aAAa,CAAC;QAC7B;;;WAGG;QACH,UAAiB,eAAe;YAC9B;;eAEG;YACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;SAC3B;QAED;;;WAGG;QACH,UAAiB,cAAc;YAC7B;;eAEG;YACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;SAC3B;KACF;IAED,UAAiB,YAAY;QAC3B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;IAED,UAAiB,SAAS;QACxB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;KAC1B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;CAC5C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Context = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* Inspect the identity and authorization context for the current request.
|
|
8
|
+
*/
|
|
9
|
+
class Context extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Returns the authenticated principal, organization, credential scope, and
|
|
12
|
+
* effective request scope. The response is derived from the verified request
|
|
13
|
+
* context and does not expose credential secrets.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const authContext = await client.auth.context.retrieve();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
retrieve(options) {
|
|
21
|
+
return this._client.get('/auth/context', options);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.Context = Context;
|
|
25
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/resources/auth/context.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;CACF;AAdD,0BAcC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Inspect the identity and authorization context for the current request.
|
|
5
|
+
*/
|
|
6
|
+
export class Context extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the authenticated principal, organization, credential scope, and
|
|
9
|
+
* effective request scope. The response is derived from the verified request
|
|
10
|
+
* context and does not expose credential secrets.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const authContext = await client.auth.context.retrieve();
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
retrieve(options) {
|
|
18
|
+
return this._client.get('/auth/context', options);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=context.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.mjs","sourceRoot":"","sources":["../../src/resources/auth/context.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;CACF"}
|