@onkernel/sdk 0.86.1 → 0.87.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.
Files changed (105) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/client.d.mts +1 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +1 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/audit-logs/audit-logs.d.mts +169 -0
  12. package/resources/audit-logs/audit-logs.d.mts.map +1 -0
  13. package/resources/audit-logs/audit-logs.d.ts +169 -0
  14. package/resources/audit-logs/audit-logs.d.ts.map +1 -0
  15. package/resources/audit-logs/audit-logs.js +53 -0
  16. package/resources/audit-logs/audit-logs.js.map +1 -0
  17. package/resources/audit-logs/audit-logs.mjs +48 -0
  18. package/resources/audit-logs/audit-logs.mjs.map +1 -0
  19. package/resources/audit-logs/export-destinations.d.mts +163 -0
  20. package/resources/audit-logs/export-destinations.d.mts.map +1 -0
  21. package/resources/audit-logs/export-destinations.d.ts +163 -0
  22. package/resources/audit-logs/export-destinations.d.ts.map +1 -0
  23. package/resources/audit-logs/export-destinations.js +62 -0
  24. package/resources/audit-logs/export-destinations.js.map +1 -0
  25. package/resources/audit-logs/export-destinations.mjs +58 -0
  26. package/resources/audit-logs/export-destinations.mjs.map +1 -0
  27. package/resources/audit-logs/index.d.mts +3 -0
  28. package/resources/audit-logs/index.d.mts.map +1 -0
  29. package/resources/audit-logs/index.d.ts +3 -0
  30. package/resources/audit-logs/index.d.ts.map +1 -0
  31. package/resources/audit-logs/index.js +9 -0
  32. package/resources/audit-logs/index.js.map +1 -0
  33. package/resources/audit-logs/index.mjs +4 -0
  34. package/resources/audit-logs/index.mjs.map +1 -0
  35. package/resources/audit-logs.d.mts +1 -164
  36. package/resources/audit-logs.d.mts.map +1 -1
  37. package/resources/audit-logs.d.ts +1 -164
  38. package/resources/audit-logs.d.ts.map +1 -1
  39. package/resources/audit-logs.js +2 -41
  40. package/resources/audit-logs.js.map +1 -1
  41. package/resources/audit-logs.mjs +1 -39
  42. package/resources/audit-logs.mjs.map +1 -1
  43. package/resources/auth/auth.d.mts +4 -0
  44. package/resources/auth/auth.d.mts.map +1 -1
  45. package/resources/auth/auth.d.ts +4 -0
  46. package/resources/auth/auth.d.ts.map +1 -1
  47. package/resources/auth/auth.js +4 -0
  48. package/resources/auth/auth.js.map +1 -1
  49. package/resources/auth/auth.mjs +4 -0
  50. package/resources/auth/auth.mjs.map +1 -1
  51. package/resources/auth/context.d.mts +106 -0
  52. package/resources/auth/context.d.mts.map +1 -0
  53. package/resources/auth/context.d.ts +106 -0
  54. package/resources/auth/context.d.ts.map +1 -0
  55. package/resources/auth/context.js +25 -0
  56. package/resources/auth/context.js.map +1 -0
  57. package/resources/auth/context.mjs +21 -0
  58. package/resources/auth/context.mjs.map +1 -0
  59. package/resources/auth/index.d.mts +1 -0
  60. package/resources/auth/index.d.mts.map +1 -1
  61. package/resources/auth/index.d.ts +1 -0
  62. package/resources/auth/index.d.ts.map +1 -1
  63. package/resources/auth/index.js +3 -1
  64. package/resources/auth/index.js.map +1 -1
  65. package/resources/auth/index.mjs +1 -0
  66. package/resources/auth/index.mjs.map +1 -1
  67. package/resources/browser-pools.d.mts +5 -0
  68. package/resources/browser-pools.d.mts.map +1 -1
  69. package/resources/browser-pools.d.ts +5 -0
  70. package/resources/browser-pools.d.ts.map +1 -1
  71. package/resources/browsers/browsers.d.mts +20 -0
  72. package/resources/browsers/browsers.d.mts.map +1 -1
  73. package/resources/browsers/browsers.d.ts +20 -0
  74. package/resources/browsers/browsers.d.ts.map +1 -1
  75. package/resources/browsers/browsers.js.map +1 -1
  76. package/resources/browsers/browsers.mjs.map +1 -1
  77. package/resources/index.d.mts +1 -1
  78. package/resources/index.d.mts.map +1 -1
  79. package/resources/index.d.ts +1 -1
  80. package/resources/index.d.ts.map +1 -1
  81. package/resources/index.js +1 -1
  82. package/resources/index.js.map +1 -1
  83. package/resources/index.mjs +1 -1
  84. package/resources/index.mjs.map +1 -1
  85. package/resources/invocations.d.mts +5 -0
  86. package/resources/invocations.d.mts.map +1 -1
  87. package/resources/invocations.d.ts +5 -0
  88. package/resources/invocations.d.ts.map +1 -1
  89. package/src/client.ts +7 -7
  90. package/src/resources/audit-logs/audit-logs.ts +281 -0
  91. package/src/resources/audit-logs/export-destinations.ts +262 -0
  92. package/src/resources/audit-logs/index.ts +25 -0
  93. package/src/resources/audit-logs.ts +1 -249
  94. package/src/resources/auth/auth.ts +6 -0
  95. package/src/resources/auth/context.ts +125 -0
  96. package/src/resources/auth/index.ts +1 -0
  97. package/src/resources/browser-pools.ts +6 -0
  98. package/src/resources/browsers/browsers.ts +24 -0
  99. package/src/resources/index.ts +1 -1
  100. package/src/resources/invocations.ts +6 -0
  101. package/src/version.ts +1 -1
  102. package/version.d.mts +1 -1
  103. package/version.d.ts +1 -1
  104. package/version.js +1 -1
  105. package/version.mjs +1 -1
@@ -0,0 +1,62 @@
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.ExportDestinations = void 0;
5
+ const resource_1 = require("../../core/resource.js");
6
+ const pagination_1 = require("../../core/pagination.js");
7
+ const headers_1 = require("../../internal/headers.js");
8
+ const path_1 = require("../../internal/utils/path.js");
9
+ /**
10
+ * Read audit log records for the authenticated organization.
11
+ */
12
+ class ExportDestinations extends resource_1.APIResource {
13
+ /**
14
+ * Create a paused destination. Activate it with a status update once the
15
+ * destination test passes. Requires an active Enterprise plan.
16
+ */
17
+ create(body, options) {
18
+ return this._client.post('/audit-logs/export/destinations', { body, ...options });
19
+ }
20
+ /**
21
+ * Retrieve details for a single audit log export destination by its ID.
22
+ */
23
+ retrieve(id, options) {
24
+ return this._client.get((0, path_1.path) `/audit-logs/export/destinations/${id}`, options);
25
+ }
26
+ /**
27
+ * Apply a partial update to a destination. Requires an active Enterprise plan.
28
+ * Returns 409 when the destination was changed concurrently, because the merged
29
+ * configuration this request validated is no longer the one that would be stored;
30
+ * retry against fresh state. Pausing prevents new delivery attempts, but an S3
31
+ * upload already in progress may complete after the response.
32
+ */
33
+ update(id, body, options) {
34
+ return this._client.patch((0, path_1.path) `/audit-logs/export/destinations/${id}`, { body, ...options });
35
+ }
36
+ /**
37
+ * List audit log export destinations for the organization with pagination support.
38
+ */
39
+ list(query = {}, options) {
40
+ return this._client.getAPIList('/audit-logs/export/destinations', (pagination_1.OffsetPagination), { query, ...options });
41
+ }
42
+ /**
43
+ * Soft delete the destination and prevent new delivery attempts. An S3 upload
44
+ * already in progress may complete after the response.
45
+ */
46
+ delete(id, options) {
47
+ return this._client.delete((0, path_1.path) `/audit-logs/export/destinations/${id}`, {
48
+ ...options,
49
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
50
+ });
51
+ }
52
+ /**
53
+ * Verify the destination is writable by assuming the configured role and uploading
54
+ * a temporary probe object with the same request metadata as a real delivery.
55
+ * Requires an active Enterprise plan.
56
+ */
57
+ test(id, options) {
58
+ return this._client.post((0, path_1.path) `/audit-logs/export/destinations/${id}/test`, options);
59
+ }
60
+ }
61
+ exports.ExportDestinations = ExportDestinations;
62
+ //# sourceMappingURL=export-destinations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-destinations.js","sourceRoot":"","sources":["../../src/resources/audit-logs/export-destinations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,kBAAmB,SAAQ,sBAAW;IACjD;;;OAGG;IACH,MAAM,CACJ,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mCAAmC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CACJ,EAAU,EACV,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,mCAAmC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAwD,EAAE,EAC1D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,iCAAiC,EACjC,CAAA,6BAA2C,CAAA,EAC3C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,mCAAmC,EAAE,EAAE,EAAE;YACtE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,mCAAmC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF;AAnED,gDAmEC"}
@@ -0,0 +1,58 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import { OffsetPagination } from "../../core/pagination.mjs";
4
+ import { buildHeaders } from "../../internal/headers.mjs";
5
+ import { path } from "../../internal/utils/path.mjs";
6
+ /**
7
+ * Read audit log records for the authenticated organization.
8
+ */
9
+ export class ExportDestinations extends APIResource {
10
+ /**
11
+ * Create a paused destination. Activate it with a status update once the
12
+ * destination test passes. Requires an active Enterprise plan.
13
+ */
14
+ create(body, options) {
15
+ return this._client.post('/audit-logs/export/destinations', { body, ...options });
16
+ }
17
+ /**
18
+ * Retrieve details for a single audit log export destination by its ID.
19
+ */
20
+ retrieve(id, options) {
21
+ return this._client.get(path `/audit-logs/export/destinations/${id}`, options);
22
+ }
23
+ /**
24
+ * Apply a partial update to a destination. Requires an active Enterprise plan.
25
+ * Returns 409 when the destination was changed concurrently, because the merged
26
+ * configuration this request validated is no longer the one that would be stored;
27
+ * retry against fresh state. Pausing prevents new delivery attempts, but an S3
28
+ * upload already in progress may complete after the response.
29
+ */
30
+ update(id, body, options) {
31
+ return this._client.patch(path `/audit-logs/export/destinations/${id}`, { body, ...options });
32
+ }
33
+ /**
34
+ * List audit log export destinations for the organization with pagination support.
35
+ */
36
+ list(query = {}, options) {
37
+ return this._client.getAPIList('/audit-logs/export/destinations', (OffsetPagination), { query, ...options });
38
+ }
39
+ /**
40
+ * Soft delete the destination and prevent new delivery attempts. An S3 upload
41
+ * already in progress may complete after the response.
42
+ */
43
+ delete(id, options) {
44
+ return this._client.delete(path `/audit-logs/export/destinations/${id}`, {
45
+ ...options,
46
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
47
+ });
48
+ }
49
+ /**
50
+ * Verify the destination is writable by assuming the configured role and uploading
51
+ * a temporary probe object with the same request metadata as a real delivery.
52
+ * Requires an active Enterprise plan.
53
+ */
54
+ test(id, options) {
55
+ return this._client.post(path `/audit-logs/export/destinations/${id}/test`, options);
56
+ }
57
+ }
58
+ //# sourceMappingURL=export-destinations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-destinations.mjs","sourceRo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E,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,mCAAmC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export { AuditLogs, type AuditLogEntry, type AuditLogListParams, type AuditLogExportChunkParams, type AuditLogEntriesPageTokenPagination, type AuditLogDownloadDestination, type AuditLogDownloadOptions, type AuditLogDownloadParams, type AuditLogDownloadProgress, type AuditLogDownloadResult, } from "./audit-logs.mjs";
2
+ export { ExportDestinations, type AuditLogExportDestination, type AuditLogExportDestinationTestResult, type CreateAuditLogExportDestinationRequest, type UpdateAuditLogExportDestinationRequest, type ExportDestinationCreateParams, type ExportDestinationUpdateParams, type ExportDestinationListParams, type AuditLogExportDestinationsOffsetPagination, } from "./export-destinations.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/audit-logs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,kCAAkC,EACvC,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B,yBAAqB;AACtB,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,sCAAsC,EAC3C,KAAK,sCAAsC,EAC3C,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,0CAA0C,GAChD,kCAA8B"}
@@ -0,0 +1,3 @@
1
+ export { AuditLogs, type AuditLogEntry, type AuditLogListParams, type AuditLogExportChunkParams, type AuditLogEntriesPageTokenPagination, type AuditLogDownloadDestination, type AuditLogDownloadOptions, type AuditLogDownloadParams, type AuditLogDownloadProgress, type AuditLogDownloadResult, } from "./audit-logs.js";
2
+ export { ExportDestinations, type AuditLogExportDestination, type AuditLogExportDestinationTestResult, type CreateAuditLogExportDestinationRequest, type UpdateAuditLogExportDestinationRequest, type ExportDestinationCreateParams, type ExportDestinationUpdateParams, type ExportDestinationListParams, type AuditLogExportDestinationsOffsetPagination, } from "./export-destinations.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/audit-logs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,kCAAkC,EACvC,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B,wBAAqB;AACtB,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,sCAAsC,EAC3C,KAAK,sCAAsC,EAC3C,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,0CAA0C,GAChD,iCAA8B"}
@@ -0,0 +1,9 @@
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.ExportDestinations = exports.AuditLogs = void 0;
5
+ var audit_logs_1 = require("./audit-logs.js");
6
+ Object.defineProperty(exports, "AuditLogs", { enumerable: true, get: function () { return audit_logs_1.AuditLogs; } });
7
+ var export_destinations_1 = require("./export-destinations.js");
8
+ Object.defineProperty(exports, "ExportDestinations", { enumerable: true, get: function () { return export_destinations_1.ExportDestinations; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/audit-logs/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CAWsB;AAVpB,uGAAA,SAAS,OAAA;AAWX,gEAU+B;AAT7B,yHAAA,kBAAkB,OAAA"}
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { AuditLogs, } from "./audit-logs.mjs";
3
+ export { ExportDestinations, } from "./export-destinations.mjs";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/audit-logs/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,SAAS,GAUV,yBAAqB;AACtB,OAAO,EACL,kBAAkB,GASnB,kCAA8B"}
@@ -1,165 +1,2 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { PagePromise, PageTokenPagination, type PageTokenPaginationParams } from "../core/pagination.mjs";
4
- import { RequestOptions } from "../internal/request-options.mjs";
5
- import { type AuditLogDownloadDestination, type AuditLogDownloadOptions, type AuditLogDownloadParams, type AuditLogDownloadProgress, type AuditLogDownloadResult } from "../lib/audit-log-download.mjs";
6
- export type { AuditLogDownloadDestination, AuditLogDownloadOptions, AuditLogDownloadParams, AuditLogDownloadProgress, AuditLogDownloadResult, } from "../lib/audit-log-download.mjs";
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.mjs";
165
2
  //# sourceMappingURL=audit-logs.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audit-logs.d.mts","sourceRoot":"","sources":["../src/resources/audit-logs.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AC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
1
+ {"version":3,"file":"audit-logs.d.mts","sourceRoot":"","sources":["../src/resources/audit-logs.ts"],"names":[],"mappings":"AAEA,uCAAmC"}
@@ -1,165 +1,2 @@
1
- import { APIResource } from "../core/resource.js";
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,OAAO,EAAE,WAAW,EAAE,4BAA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G;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
1
+ {"version":3,"file":"audit-logs.d.ts","sourceRoot":"","sources":["../src/resources/audit-logs.ts"],"names":[],"mappings":"AAEA,sCAAmC"}
@@ -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
- exports.AuditLogs = void 0;
5
- const resource_1 = require("../core/resource.js");
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,kDAA+C;AAE/C,sDAAsG;AACtG,oDAAmD;AAEnD,qEAOmC;AAUnC;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;OAGG;IACH,IAAI,CACF,KAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,gCAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,KAAgC,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE;YAClD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CACN,KAA6B,EAC7B,WAAwC,EACxC,OAAiC;QAEjC,OAAO,IAAA,sCAAiB,EACtB,CAAC,UAAU,EAAE,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,EACxE,KAAK,EACL,WAAW,EACX,IAAI,CAAC,OAAO,CAAC,OAAO,EACpB,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AA9CD,8BA8CC"}
1
+ {"version":3,"file":"audit-logs.js","sourceRoot":"","sources":["../src/resources/audit-logs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gEAAmC"}
@@ -1,41 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
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,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAe,mBAAmB,EAAkC,+BAA2B;AACtG,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EACL,iBAAiB,GAMlB,sCAAkC;AAUnC;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;OAGG;IACH,IAAI,CACF,KAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,mBAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,KAAgC,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE;YAClD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CACN,KAA6B,EAC7B,WAAwC,EACxC,OAAiC;QAEjC,OAAO,iBAAiB,CACtB,CAAC,UAAU,EAAE,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,EACxE,KAAK,EACL,WAAW,EACX,IAAI,CAAC,OAAO,CAAC,OAAO,EACpB,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}
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