@nirvana-labs/nirvana 1.53.1 → 1.54.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/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/resources/audit-logs/audit-logs.d.mts +24 -9
- package/resources/audit-logs/audit-logs.d.mts.map +1 -1
- package/resources/audit-logs/audit-logs.d.ts +24 -9
- package/resources/audit-logs/audit-logs.d.ts.map +1 -1
- package/resources/audit-logs/audit-logs.js +1 -4
- package/resources/audit-logs/audit-logs.js.map +1 -1
- package/resources/audit-logs/audit-logs.mjs +1 -4
- package/resources/audit-logs/audit-logs.mjs.map +1 -1
- package/resources/organizations/organizations.d.mts +9 -55
- package/resources/organizations/organizations.d.mts.map +1 -1
- package/resources/organizations/organizations.d.ts +9 -55
- package/resources/organizations/organizations.d.ts.map +1 -1
- package/resources/organizations/organizations.js +15 -0
- package/resources/organizations/organizations.js.map +1 -1
- package/resources/organizations/organizations.mjs +15 -0
- package/resources/organizations/organizations.mjs.map +1 -1
- package/src/resources/audit-logs/api.md +2 -0
- package/src/resources/audit-logs/audit-logs.ts +30 -12
- package/src/resources/organizations/api.md +1 -3
- package/src/resources/organizations/organizations.ts +14 -68
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.54.0 (2026-03-06)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.53.1...v1.54.0](https://github.com/nirvana-labs/nirvana-typescript/compare/v1.53.1...v1.54.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([427fb8d](https://github.com/nirvana-labs/nirvana-typescript/commit/427fb8d7fcfc409e992b796835a428559f24b7b4))
|
|
10
|
+
* **api:** api update ([0bfea4d](https://github.com/nirvana-labs/nirvana-typescript/commit/0bfea4d12ebac25f9b2b7b7c638ee151a1c39996))
|
|
11
|
+
|
|
3
12
|
## 1.53.1 (2026-03-06)
|
|
4
13
|
|
|
5
14
|
Full Changelog: [v1.53.0...v1.53.1](https://github.com/nirvana-labs/nirvana-typescript/compare/v1.53.0...v1.53.1)
|
package/package.json
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import * as Shared from "../shared.mjs";
|
|
3
|
-
import * as OrganizationsAPI from "../organizations/organizations.mjs";
|
|
4
|
-
import { AuditLogsCursor } from "../organizations/organizations.mjs";
|
|
5
3
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
6
|
-
import { type CursorParams, PagePromise } from "../../core/pagination.mjs";
|
|
4
|
+
import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.mjs";
|
|
7
5
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
8
6
|
export declare class AuditLogs extends APIResource {
|
|
9
7
|
/**
|
|
10
8
|
* List Audit Log entries for an organization
|
|
11
9
|
*/
|
|
12
|
-
list(query?: AuditLogListParams | null | undefined, options?: RequestOptions): PagePromise<AuditLogsCursor,
|
|
10
|
+
list(query?: AuditLogListParams | null | undefined, options?: RequestOptions): PagePromise<AuditLogsCursor, AuditLog>;
|
|
13
11
|
/**
|
|
14
12
|
* Get an Audit Log entry
|
|
15
13
|
*/
|
|
16
|
-
get(auditLogID: string, options?: RequestOptions): APIPromise<
|
|
14
|
+
get(auditLogID: string, options?: RequestOptions): APIPromise<AuditLog>;
|
|
17
15
|
}
|
|
16
|
+
export type AuditLogsCursor = Cursor<AuditLog>;
|
|
18
17
|
/**
|
|
19
18
|
* Audit log entry.
|
|
20
19
|
*/
|
|
@@ -26,7 +25,7 @@ export interface AuditLog {
|
|
|
26
25
|
/**
|
|
27
26
|
* The entity that performed the action.
|
|
28
27
|
*/
|
|
29
|
-
actor:
|
|
28
|
+
actor: AuditLogActor;
|
|
30
29
|
/**
|
|
31
30
|
* Client IP address.
|
|
32
31
|
*/
|
|
@@ -52,17 +51,33 @@ export interface AuditLog {
|
|
|
52
51
|
*/
|
|
53
52
|
user_agent: string;
|
|
54
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* The entity that performed the action.
|
|
56
|
+
*/
|
|
57
|
+
export interface AuditLogActor {
|
|
58
|
+
/**
|
|
59
|
+
* Unique identifier for the actor.
|
|
60
|
+
*/
|
|
61
|
+
id: string;
|
|
62
|
+
/**
|
|
63
|
+
* Type of actor.
|
|
64
|
+
*/
|
|
65
|
+
type: AuditLogType;
|
|
66
|
+
}
|
|
55
67
|
export interface AuditLogList {
|
|
56
|
-
items: Array<
|
|
68
|
+
items: Array<AuditLog>;
|
|
57
69
|
/**
|
|
58
70
|
* Pagination response details.
|
|
59
71
|
*/
|
|
60
72
|
pagination: Shared.Pagination;
|
|
61
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Type of actor.
|
|
76
|
+
*/
|
|
77
|
+
export type AuditLogType = 'user' | 'api_key';
|
|
62
78
|
export interface AuditLogListParams extends CursorParams {
|
|
63
79
|
}
|
|
64
80
|
export declare namespace AuditLogs {
|
|
65
|
-
export { type AuditLog as AuditLog, type AuditLogList as AuditLogList, type AuditLogListParams as AuditLogListParams, };
|
|
81
|
+
export { type AuditLog as AuditLog, type AuditLogActor as AuditLogActor, type AuditLogList as AuditLogList, type AuditLogType as AuditLogType, type AuditLogsCursor as AuditLogsCursor, type AuditLogListParams as AuditLogListParams, };
|
|
66
82
|
}
|
|
67
|
-
export { type AuditLogsCursor };
|
|
68
83
|
//# sourceMappingURL=audit-logs.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logs.d.mts","sourceRoot":"","sources":["../../src/resources/audit-logs/audit-logs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,
|
|
1
|
+
{"version":3,"file":"audit-logs.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MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;AAE9C,MAAM,WAAW,kBAAmB,SAAQ,YAAY;CAAG;AAE3D,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as Shared from "../shared.js";
|
|
3
|
-
import * as OrganizationsAPI from "../organizations/organizations.js";
|
|
4
|
-
import { AuditLogsCursor } from "../organizations/organizations.js";
|
|
5
3
|
import { APIPromise } from "../../core/api-promise.js";
|
|
6
|
-
import { type CursorParams, PagePromise } from "../../core/pagination.js";
|
|
4
|
+
import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.js";
|
|
7
5
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
8
6
|
export declare class AuditLogs extends APIResource {
|
|
9
7
|
/**
|
|
10
8
|
* List Audit Log entries for an organization
|
|
11
9
|
*/
|
|
12
|
-
list(query?: AuditLogListParams | null | undefined, options?: RequestOptions): PagePromise<AuditLogsCursor,
|
|
10
|
+
list(query?: AuditLogListParams | null | undefined, options?: RequestOptions): PagePromise<AuditLogsCursor, AuditLog>;
|
|
13
11
|
/**
|
|
14
12
|
* Get an Audit Log entry
|
|
15
13
|
*/
|
|
16
|
-
get(auditLogID: string, options?: RequestOptions): APIPromise<
|
|
14
|
+
get(auditLogID: string, options?: RequestOptions): APIPromise<AuditLog>;
|
|
17
15
|
}
|
|
16
|
+
export type AuditLogsCursor = Cursor<AuditLog>;
|
|
18
17
|
/**
|
|
19
18
|
* Audit log entry.
|
|
20
19
|
*/
|
|
@@ -26,7 +25,7 @@ export interface AuditLog {
|
|
|
26
25
|
/**
|
|
27
26
|
* The entity that performed the action.
|
|
28
27
|
*/
|
|
29
|
-
actor:
|
|
28
|
+
actor: AuditLogActor;
|
|
30
29
|
/**
|
|
31
30
|
* Client IP address.
|
|
32
31
|
*/
|
|
@@ -52,17 +51,33 @@ export interface AuditLog {
|
|
|
52
51
|
*/
|
|
53
52
|
user_agent: string;
|
|
54
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* The entity that performed the action.
|
|
56
|
+
*/
|
|
57
|
+
export interface AuditLogActor {
|
|
58
|
+
/**
|
|
59
|
+
* Unique identifier for the actor.
|
|
60
|
+
*/
|
|
61
|
+
id: string;
|
|
62
|
+
/**
|
|
63
|
+
* Type of actor.
|
|
64
|
+
*/
|
|
65
|
+
type: AuditLogType;
|
|
66
|
+
}
|
|
55
67
|
export interface AuditLogList {
|
|
56
|
-
items: Array<
|
|
68
|
+
items: Array<AuditLog>;
|
|
57
69
|
/**
|
|
58
70
|
* Pagination response details.
|
|
59
71
|
*/
|
|
60
72
|
pagination: Shared.Pagination;
|
|
61
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Type of actor.
|
|
76
|
+
*/
|
|
77
|
+
export type AuditLogType = 'user' | 'api_key';
|
|
62
78
|
export interface AuditLogListParams extends CursorParams {
|
|
63
79
|
}
|
|
64
80
|
export declare namespace AuditLogs {
|
|
65
|
-
export { type AuditLog as AuditLog, type AuditLogList as AuditLogList, type AuditLogListParams as AuditLogListParams, };
|
|
81
|
+
export { type AuditLog as AuditLog, type AuditLogActor as AuditLogActor, type AuditLogList as AuditLogList, type AuditLogType as AuditLogType, type AuditLogsCursor as AuditLogsCursor, type AuditLogListParams as AuditLogListParams, };
|
|
66
82
|
}
|
|
67
|
-
export { type AuditLogsCursor };
|
|
68
83
|
//# sourceMappingURL=audit-logs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logs.d.ts","sourceRoot":"","sources":["../../src/resources/audit-logs/audit-logs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,
|
|
1
|
+
{"version":3,"file":"audit-logs.d.ts","sourceRoot":"","sources":["../../src/resources/audit-logs/audit-logs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,QAAQ,CAAC;IAIzC;;OAEG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;CAGxE;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IAErB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAEvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;AAE9C,MAAM,WAAW,kBAAmB,SAAQ,YAAY;CAAG;AAE3D,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -10,10 +10,7 @@ class AuditLogs extends resource_1.APIResource {
|
|
|
10
10
|
* List Audit Log entries for an organization
|
|
11
11
|
*/
|
|
12
12
|
list(query = {}, options) {
|
|
13
|
-
return this._client.getAPIList('/v1/audit_logs', (pagination_1.Cursor), {
|
|
14
|
-
query,
|
|
15
|
-
...options,
|
|
16
|
-
});
|
|
13
|
+
return this._client.getAPIList('/v1/audit_logs', (pagination_1.Cursor), { query, ...options });
|
|
17
14
|
}
|
|
18
15
|
/**
|
|
19
16
|
* Get an Audit Log entry
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logs.js","sourceRoot":"","sources":["../../src/resources/audit-logs/audit-logs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;
|
|
1
|
+
{"version":3,"file":"audit-logs.js","sourceRoot":"","sources":["../../src/resources/audit-logs/audit-logs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAA+E;AAE/E,uDAAiD;AAEjD,MAAa,SAAU,SAAQ,sBAAW;IACxC;;OAEG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,mBAAgB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,UAAkB,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AAjBD,8BAiBC"}
|
|
@@ -7,10 +7,7 @@ export class AuditLogs extends APIResource {
|
|
|
7
7
|
* List Audit Log entries for an organization
|
|
8
8
|
*/
|
|
9
9
|
list(query = {}, options) {
|
|
10
|
-
return this._client.getAPIList('/v1/audit_logs', (Cursor), {
|
|
11
|
-
query,
|
|
12
|
-
...options,
|
|
13
|
-
});
|
|
10
|
+
return this._client.getAPIList('/v1/audit_logs', (Cursor), { query, ...options });
|
|
14
11
|
}
|
|
15
12
|
/**
|
|
16
13
|
* Get an Audit Log entry
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logs.mjs","sourceRoot":"","sources":["../../src/resources/audit-logs/audit-logs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"audit-logs.mjs","sourceRoot":"","sources":["../../src/resources/audit-logs/audit-logs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,MAAgB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,UAAkB,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF"}
|
|
@@ -49,63 +49,17 @@ export declare class Organizations extends APIResource {
|
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
get(organizationID: string, options?: RequestOptions): APIPromise<Organization>;
|
|
52
|
-
}
|
|
53
|
-
export type OrganizationsCursor = Cursor<Organization>;
|
|
54
|
-
export type AuditLogsCursor = Cursor<AuditLog>;
|
|
55
|
-
/**
|
|
56
|
-
* Audit log entry.
|
|
57
|
-
*/
|
|
58
|
-
export interface AuditLog {
|
|
59
|
-
/**
|
|
60
|
-
* Unique identifier for the audit log entry.
|
|
61
|
-
*/
|
|
62
|
-
id: string;
|
|
63
|
-
/**
|
|
64
|
-
* The entity that performed the action.
|
|
65
|
-
*/
|
|
66
|
-
actor: AuditLogActor;
|
|
67
|
-
/**
|
|
68
|
-
* Client IP address.
|
|
69
|
-
*/
|
|
70
|
-
client_ip: string;
|
|
71
|
-
/**
|
|
72
|
-
* When the action occurred.
|
|
73
|
-
*/
|
|
74
|
-
created_at: string;
|
|
75
|
-
/**
|
|
76
|
-
* HTTP method of the request.
|
|
77
|
-
*/
|
|
78
|
-
method: string;
|
|
79
|
-
/**
|
|
80
|
-
* Request path.
|
|
81
|
-
*/
|
|
82
|
-
path: string;
|
|
83
52
|
/**
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
user_agent: string;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* The entity that performed the action.
|
|
94
|
-
*/
|
|
95
|
-
export interface AuditLogActor {
|
|
96
|
-
/**
|
|
97
|
-
* Unique identifier for the actor.
|
|
98
|
-
*/
|
|
99
|
-
id: string;
|
|
100
|
-
/**
|
|
101
|
-
* Type of actor.
|
|
53
|
+
* Leave an Organization
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* await client.organizations.leave('organization_id');
|
|
58
|
+
* ```
|
|
102
59
|
*/
|
|
103
|
-
|
|
60
|
+
leave(organizationID: string, options?: RequestOptions): APIPromise<void>;
|
|
104
61
|
}
|
|
105
|
-
|
|
106
|
-
* Type of actor.
|
|
107
|
-
*/
|
|
108
|
-
export type AuditLogType = 'user' | 'api_key';
|
|
62
|
+
export type OrganizationsCursor = Cursor<Organization>;
|
|
109
63
|
/**
|
|
110
64
|
* Organization response.
|
|
111
65
|
*/
|
|
@@ -184,6 +138,6 @@ export interface OrganizationUpdateParams {
|
|
|
184
138
|
export interface OrganizationListParams extends CursorParams {
|
|
185
139
|
}
|
|
186
140
|
export declare namespace Organizations {
|
|
187
|
-
export { type
|
|
141
|
+
export { type Organization as Organization, type OrganizationList as OrganizationList, type OrganizationMembership as OrganizationMembership, type Services as Services, type OrganizationsCursor as OrganizationsCursor, type OrganizationCreateParams as OrganizationCreateParams, type OrganizationUpdateParams as OrganizationUpdateParams, type OrganizationListParams as OrganizationListParams, };
|
|
188
142
|
}
|
|
189
143
|
//# sourceMappingURL=organizations.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.mts","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"organizations.d.mts","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAE1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,a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,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAuB,SAAQ,YAAY;CAAG;AAE/D,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -49,63 +49,17 @@ export declare class Organizations extends APIResource {
|
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
get(organizationID: string, options?: RequestOptions): APIPromise<Organization>;
|
|
52
|
-
}
|
|
53
|
-
export type OrganizationsCursor = Cursor<Organization>;
|
|
54
|
-
export type AuditLogsCursor = Cursor<AuditLog>;
|
|
55
|
-
/**
|
|
56
|
-
* Audit log entry.
|
|
57
|
-
*/
|
|
58
|
-
export interface AuditLog {
|
|
59
|
-
/**
|
|
60
|
-
* Unique identifier for the audit log entry.
|
|
61
|
-
*/
|
|
62
|
-
id: string;
|
|
63
|
-
/**
|
|
64
|
-
* The entity that performed the action.
|
|
65
|
-
*/
|
|
66
|
-
actor: AuditLogActor;
|
|
67
|
-
/**
|
|
68
|
-
* Client IP address.
|
|
69
|
-
*/
|
|
70
|
-
client_ip: string;
|
|
71
|
-
/**
|
|
72
|
-
* When the action occurred.
|
|
73
|
-
*/
|
|
74
|
-
created_at: string;
|
|
75
|
-
/**
|
|
76
|
-
* HTTP method of the request.
|
|
77
|
-
*/
|
|
78
|
-
method: string;
|
|
79
|
-
/**
|
|
80
|
-
* Request path.
|
|
81
|
-
*/
|
|
82
|
-
path: string;
|
|
83
52
|
/**
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
user_agent: string;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* The entity that performed the action.
|
|
94
|
-
*/
|
|
95
|
-
export interface AuditLogActor {
|
|
96
|
-
/**
|
|
97
|
-
* Unique identifier for the actor.
|
|
98
|
-
*/
|
|
99
|
-
id: string;
|
|
100
|
-
/**
|
|
101
|
-
* Type of actor.
|
|
53
|
+
* Leave an Organization
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* await client.organizations.leave('organization_id');
|
|
58
|
+
* ```
|
|
102
59
|
*/
|
|
103
|
-
|
|
60
|
+
leave(organizationID: string, options?: RequestOptions): APIPromise<void>;
|
|
104
61
|
}
|
|
105
|
-
|
|
106
|
-
* Type of actor.
|
|
107
|
-
*/
|
|
108
|
-
export type AuditLogType = 'user' | 'api_key';
|
|
62
|
+
export type OrganizationsCursor = Cursor<Organization>;
|
|
109
63
|
/**
|
|
110
64
|
* Organization response.
|
|
111
65
|
*/
|
|
@@ -184,6 +138,6 @@ export interface OrganizationUpdateParams {
|
|
|
184
138
|
export interface OrganizationListParams extends CursorParams {
|
|
185
139
|
}
|
|
186
140
|
export declare namespace Organizations {
|
|
187
|
-
export { type
|
|
141
|
+
export { type Organization as Organization, type OrganizationList as OrganizationList, type OrganizationMembership as OrganizationMembership, type Services as Services, type OrganizationsCursor as OrganizationsCursor, type OrganizationCreateParams as OrganizationCreateParams, type OrganizationUpdateParams as OrganizationUpdateParams, type OrganizationListParams as OrganizationListParams, };
|
|
188
142
|
}
|
|
189
143
|
//# sourceMappingURL=organizations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAE1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAI1F;;;;;;;;;OASG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;IAI3B;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mBAAmB,EAAE,YAAY,CAAC;IAIjD;;;;;;;;;OASG;IACH,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAI/E;;;;;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,gBAAgB,EACzC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Organizations = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
8
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
9
|
class Organizations extends resource_1.APIResource {
|
|
9
10
|
/**
|
|
@@ -59,6 +60,20 @@ class Organizations extends resource_1.APIResource {
|
|
|
59
60
|
get(organizationID, options) {
|
|
60
61
|
return this._client.get((0, path_1.path) `/v1/organizations/${organizationID}`, options);
|
|
61
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Leave an Organization
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* await client.organizations.leave('organization_id');
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
leave(organizationID, options) {
|
|
72
|
+
return this._client.post((0, path_1.path) `/v1/organizations/${organizationID}/leave`, {
|
|
73
|
+
...options,
|
|
74
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
62
77
|
}
|
|
63
78
|
exports.Organizations = Organizations;
|
|
64
79
|
//# sourceMappingURL=organizations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAA+E;
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAA+E;AAC/E,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,cAAsB,EACtB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,qBAAqB,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAA,mBAAoB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;OASG;IACH,GAAG,CAAC,cAAsB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,cAAsB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,qBAAqB,cAAc,QAAQ,EAAE;YACxE,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;CACF;AA/ED,sCA+EC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import { Cursor } from "../../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
5
|
import { path } from "../../internal/utils/path.mjs";
|
|
5
6
|
export class Organizations extends APIResource {
|
|
6
7
|
/**
|
|
@@ -56,5 +57,19 @@ export class Organizations extends APIResource {
|
|
|
56
57
|
get(organizationID, options) {
|
|
57
58
|
return this._client.get(path `/v1/organizations/${organizationID}`, options);
|
|
58
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Leave an Organization
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* await client.organizations.leave('organization_id');
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
leave(organizationID, options) {
|
|
69
|
+
return this._client.post(path `/v1/organizations/${organizationID}/leave`, {
|
|
70
|
+
...options,
|
|
71
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
59
74
|
}
|
|
60
75
|
//# sourceMappingURL=organizations.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.mjs","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,MAAM,EAAkC;
|
|
1
|
+
{"version":3,"file":"organizations.mjs","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,MAAM,EAAkC;OAC1C,EAAE,YAAY,EAAE;OAEh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logs.ts">AuditLog</a></code>
|
|
6
|
+
- <code><a href="./src/resources/audit-logs.ts">AuditLogActor</a></code>
|
|
6
7
|
- <code><a href="./src/resources/audit-logs.ts">AuditLogList</a></code>
|
|
8
|
+
- <code><a href="./src/resources/audit-logs.ts">AuditLogType</a></code>
|
|
7
9
|
|
|
8
10
|
Methods:
|
|
9
11
|
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as Shared from '../shared';
|
|
5
|
-
import * as OrganizationsAPI from '../organizations/organizations';
|
|
6
|
-
import { AuditLogsCursor } from '../organizations/organizations';
|
|
7
5
|
import { APIPromise } from '../../core/api-promise';
|
|
8
6
|
import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
|
|
9
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
@@ -16,21 +14,20 @@ export class AuditLogs extends APIResource {
|
|
|
16
14
|
list(
|
|
17
15
|
query: AuditLogListParams | null | undefined = {},
|
|
18
16
|
options?: RequestOptions,
|
|
19
|
-
): PagePromise<AuditLogsCursor,
|
|
20
|
-
return this._client.getAPIList('/v1/audit_logs', Cursor<
|
|
21
|
-
query,
|
|
22
|
-
...options,
|
|
23
|
-
});
|
|
17
|
+
): PagePromise<AuditLogsCursor, AuditLog> {
|
|
18
|
+
return this._client.getAPIList('/v1/audit_logs', Cursor<AuditLog>, { query, ...options });
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
/**
|
|
27
22
|
* Get an Audit Log entry
|
|
28
23
|
*/
|
|
29
|
-
get(auditLogID: string, options?: RequestOptions): APIPromise<
|
|
24
|
+
get(auditLogID: string, options?: RequestOptions): APIPromise<AuditLog> {
|
|
30
25
|
return this._client.get(path`/v1/audit_logs/${auditLogID}`, options);
|
|
31
26
|
}
|
|
32
27
|
}
|
|
33
28
|
|
|
29
|
+
export type AuditLogsCursor = Cursor<AuditLog>;
|
|
30
|
+
|
|
34
31
|
/**
|
|
35
32
|
* Audit log entry.
|
|
36
33
|
*/
|
|
@@ -43,7 +40,7 @@ export interface AuditLog {
|
|
|
43
40
|
/**
|
|
44
41
|
* The entity that performed the action.
|
|
45
42
|
*/
|
|
46
|
-
actor:
|
|
43
|
+
actor: AuditLogActor;
|
|
47
44
|
|
|
48
45
|
/**
|
|
49
46
|
* Client IP address.
|
|
@@ -76,8 +73,23 @@ export interface AuditLog {
|
|
|
76
73
|
user_agent: string;
|
|
77
74
|
}
|
|
78
75
|
|
|
76
|
+
/**
|
|
77
|
+
* The entity that performed the action.
|
|
78
|
+
*/
|
|
79
|
+
export interface AuditLogActor {
|
|
80
|
+
/**
|
|
81
|
+
* Unique identifier for the actor.
|
|
82
|
+
*/
|
|
83
|
+
id: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Type of actor.
|
|
87
|
+
*/
|
|
88
|
+
type: AuditLogType;
|
|
89
|
+
}
|
|
90
|
+
|
|
79
91
|
export interface AuditLogList {
|
|
80
|
-
items: Array<
|
|
92
|
+
items: Array<AuditLog>;
|
|
81
93
|
|
|
82
94
|
/**
|
|
83
95
|
* Pagination response details.
|
|
@@ -85,14 +97,20 @@ export interface AuditLogList {
|
|
|
85
97
|
pagination: Shared.Pagination;
|
|
86
98
|
}
|
|
87
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Type of actor.
|
|
102
|
+
*/
|
|
103
|
+
export type AuditLogType = 'user' | 'api_key';
|
|
104
|
+
|
|
88
105
|
export interface AuditLogListParams extends CursorParams {}
|
|
89
106
|
|
|
90
107
|
export declare namespace AuditLogs {
|
|
91
108
|
export {
|
|
92
109
|
type AuditLog as AuditLog,
|
|
110
|
+
type AuditLogActor as AuditLogActor,
|
|
93
111
|
type AuditLogList as AuditLogList,
|
|
112
|
+
type AuditLogType as AuditLogType,
|
|
113
|
+
type AuditLogsCursor as AuditLogsCursor,
|
|
94
114
|
type AuditLogListParams as AuditLogListParams,
|
|
95
115
|
};
|
|
96
116
|
}
|
|
97
|
-
|
|
98
|
-
export { type AuditLogsCursor };
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Types:
|
|
4
4
|
|
|
5
|
-
- <code><a href="./src/resources/organizations.ts">AuditLog</a></code>
|
|
6
|
-
- <code><a href="./src/resources/organizations.ts">AuditLogActor</a></code>
|
|
7
|
-
- <code><a href="./src/resources/organizations.ts">AuditLogType</a></code>
|
|
8
5
|
- <code><a href="./src/resources/organizations.ts">Organization</a></code>
|
|
9
6
|
- <code><a href="./src/resources/organizations.ts">OrganizationList</a></code>
|
|
10
7
|
- <code><a href="./src/resources/organizations.ts">OrganizationMembership</a></code>
|
|
@@ -16,3 +13,4 @@ Methods:
|
|
|
16
13
|
- <code title="patch /v1/organizations/{organization_id}">client.organizations.<a href="./src/resources/organizations.ts">update</a>(organizationID, { ...params }) -> Organization</code>
|
|
17
14
|
- <code title="get /v1/organizations">client.organizations.<a href="./src/resources/organizations.ts">list</a>({ ...params }) -> OrganizationsCursor</code>
|
|
18
15
|
- <code title="get /v1/organizations/{organization_id}">client.organizations.<a href="./src/resources/organizations.ts">get</a>(organizationID) -> Organization</code>
|
|
16
|
+
- <code title="post /v1/organizations/{organization_id}/leave">client.organizations.<a href="./src/resources/organizations.ts">leave</a>(organizationID) -> void</code>
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import * as Shared from '../shared';
|
|
5
5
|
import { APIPromise } from '../../core/api-promise';
|
|
6
6
|
import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
|
|
7
|
+
import { buildHeaders } from '../../internal/headers';
|
|
7
8
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
9
|
import { path } from '../../internal/utils/path';
|
|
9
10
|
|
|
@@ -71,76 +72,24 @@ export class Organizations extends APIResource {
|
|
|
71
72
|
get(organizationID: string, options?: RequestOptions): APIPromise<Organization> {
|
|
72
73
|
return this._client.get(path`/v1/organizations/${organizationID}`, options);
|
|
73
74
|
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export type OrganizationsCursor = Cursor<Organization>;
|
|
77
|
-
|
|
78
|
-
export type AuditLogsCursor = Cursor<AuditLog>;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Audit log entry.
|
|
82
|
-
*/
|
|
83
|
-
export interface AuditLog {
|
|
84
|
-
/**
|
|
85
|
-
* Unique identifier for the audit log entry.
|
|
86
|
-
*/
|
|
87
|
-
id: string;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* The entity that performed the action.
|
|
91
|
-
*/
|
|
92
|
-
actor: AuditLogActor;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Client IP address.
|
|
96
|
-
*/
|
|
97
|
-
client_ip: string;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* When the action occurred.
|
|
101
|
-
*/
|
|
102
|
-
created_at: string;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* HTTP method of the request.
|
|
106
|
-
*/
|
|
107
|
-
method: string;
|
|
108
75
|
|
|
109
76
|
/**
|
|
110
|
-
*
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*
|
|
116
|
-
*/
|
|
117
|
-
status_code: number;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* User agent string.
|
|
121
|
-
*/
|
|
122
|
-
user_agent: string;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* The entity that performed the action.
|
|
127
|
-
*/
|
|
128
|
-
export interface AuditLogActor {
|
|
129
|
-
/**
|
|
130
|
-
* Unique identifier for the actor.
|
|
131
|
-
*/
|
|
132
|
-
id: string;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Type of actor.
|
|
77
|
+
* Leave an Organization
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* await client.organizations.leave('organization_id');
|
|
82
|
+
* ```
|
|
136
83
|
*/
|
|
137
|
-
|
|
84
|
+
leave(organizationID: string, options?: RequestOptions): APIPromise<void> {
|
|
85
|
+
return this._client.post(path`/v1/organizations/${organizationID}/leave`, {
|
|
86
|
+
...options,
|
|
87
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
138
90
|
}
|
|
139
91
|
|
|
140
|
-
|
|
141
|
-
* Type of actor.
|
|
142
|
-
*/
|
|
143
|
-
export type AuditLogType = 'user' | 'api_key';
|
|
92
|
+
export type OrganizationsCursor = Cursor<Organization>;
|
|
144
93
|
|
|
145
94
|
/**
|
|
146
95
|
* Organization response.
|
|
@@ -236,9 +185,6 @@ export interface OrganizationListParams extends CursorParams {}
|
|
|
236
185
|
|
|
237
186
|
export declare namespace Organizations {
|
|
238
187
|
export {
|
|
239
|
-
type AuditLog as AuditLog,
|
|
240
|
-
type AuditLogActor as AuditLogActor,
|
|
241
|
-
type AuditLogType as AuditLogType,
|
|
242
188
|
type Organization as Organization,
|
|
243
189
|
type OrganizationList as OrganizationList,
|
|
244
190
|
type OrganizationMembership as OrganizationMembership,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.54.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.54.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.54.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.54.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|