@nirvana-labs/nirvana 1.44.1 → 1.45.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 +14 -0
- package/package.json +1 -1
- package/resources/organizations.d.mts +50 -1
- package/resources/organizations.d.mts.map +1 -1
- package/resources/organizations.d.ts +50 -1
- package/resources/organizations.d.ts.map +1 -1
- package/resources/organizations.js +41 -0
- package/resources/organizations.js.map +1 -1
- package/resources/organizations.mjs +41 -0
- package/resources/organizations.mjs.map +1 -1
- package/src/resources/organizations.ts +63 -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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.45.0 (2026-02-09)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.44.1...v1.45.0](https://github.com/nirvana-labs/nirvana-typescript/compare/v1.44.1...v1.45.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([3730a00](https://github.com/nirvana-labs/nirvana-typescript/commit/3730a00abe0301a211f41879dafe50955d56fa20))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **internal:** add health check to MCP server when running in HTTP mode ([969027e](https://github.com/nirvana-labs/nirvana-typescript/commit/969027e6096b0bb914fc1e7ec600e5dc4d60aef1))
|
|
15
|
+
* **internal:** upgrade hono ([14a33f7](https://github.com/nirvana-labs/nirvana-typescript/commit/14a33f7e00fe9378fe6680d7246060509ca0d424))
|
|
16
|
+
|
|
3
17
|
## 1.44.1 (2026-02-06)
|
|
4
18
|
|
|
5
19
|
Full Changelog: [v1.44.0...v1.44.1](https://github.com/nirvana-labs/nirvana-typescript/compare/v1.44.0...v1.44.1)
|
package/package.json
CHANGED
|
@@ -4,12 +4,49 @@ import { APIPromise } from "../core/api-promise.mjs";
|
|
|
4
4
|
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
|
|
5
5
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
6
|
export declare class Organizations extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a new organization
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const organization = await client.organizations.create({
|
|
13
|
+
* name: 'My Organization',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
create(body: OrganizationCreateParams, options?: RequestOptions): APIPromise<Organization>;
|
|
18
|
+
/**
|
|
19
|
+
* Update an existing organization
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const organization = await client.organizations.update(
|
|
24
|
+
* 'organization_id',
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
update(organizationID: string, body: OrganizationUpdateParams, options?: RequestOptions): APIPromise<Organization>;
|
|
7
29
|
/**
|
|
8
30
|
* List all Organizations
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* // Automatically fetches more pages as needed.
|
|
35
|
+
* for await (const organization of client.organizations.list()) {
|
|
36
|
+
* // ...
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
9
39
|
*/
|
|
10
40
|
list(query?: OrganizationListParams | null | undefined, options?: RequestOptions): PagePromise<OrganizationsCursor, Organization>;
|
|
11
41
|
/**
|
|
12
42
|
* Get details about an Organization
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const organization = await client.organizations.get(
|
|
47
|
+
* 'organization_id',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
13
50
|
*/
|
|
14
51
|
get(organizationID: string, options?: RequestOptions): APIPromise<Organization>;
|
|
15
52
|
}
|
|
@@ -42,9 +79,21 @@ export interface OrganizationList {
|
|
|
42
79
|
*/
|
|
43
80
|
pagination: Shared.Pagination;
|
|
44
81
|
}
|
|
82
|
+
export interface OrganizationCreateParams {
|
|
83
|
+
/**
|
|
84
|
+
* Organization name.
|
|
85
|
+
*/
|
|
86
|
+
name: string;
|
|
87
|
+
}
|
|
88
|
+
export interface OrganizationUpdateParams {
|
|
89
|
+
/**
|
|
90
|
+
* Organization name.
|
|
91
|
+
*/
|
|
92
|
+
name?: string;
|
|
93
|
+
}
|
|
45
94
|
export interface OrganizationListParams extends CursorParams {
|
|
46
95
|
}
|
|
47
96
|
export declare namespace Organizations {
|
|
48
|
-
export { type Organization as Organization, type OrganizationList as OrganizationList, type OrganizationsCursor as OrganizationsCursor, type OrganizationListParams as OrganizationListParams, };
|
|
97
|
+
export { type Organization as Organization, type OrganizationList as OrganizationList, type OrganizationsCursor as OrganizationsCursor, type OrganizationCreateParams as OrganizationCreateParams, type OrganizationUpdateParams as OrganizationUpdateParams, type OrganizationListParams as OrganizationListParams, };
|
|
49
98
|
}
|
|
50
99
|
//# sourceMappingURL=organizations.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.mts","sourceRoot":"","sources":["../src/resources/organizations.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,aAAc,SAAQ,WAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"organizations.d.mts","sourceRoot":"","sources":["../src/resources/organizations.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,aAAc,SAAQ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,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -4,12 +4,49 @@ import { APIPromise } from "../core/api-promise.js";
|
|
|
4
4
|
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.js";
|
|
5
5
|
import { RequestOptions } from "../internal/request-options.js";
|
|
6
6
|
export declare class Organizations extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a new organization
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const organization = await client.organizations.create({
|
|
13
|
+
* name: 'My Organization',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
create(body: OrganizationCreateParams, options?: RequestOptions): APIPromise<Organization>;
|
|
18
|
+
/**
|
|
19
|
+
* Update an existing organization
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const organization = await client.organizations.update(
|
|
24
|
+
* 'organization_id',
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
update(organizationID: string, body: OrganizationUpdateParams, options?: RequestOptions): APIPromise<Organization>;
|
|
7
29
|
/**
|
|
8
30
|
* List all Organizations
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* // Automatically fetches more pages as needed.
|
|
35
|
+
* for await (const organization of client.organizations.list()) {
|
|
36
|
+
* // ...
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
9
39
|
*/
|
|
10
40
|
list(query?: OrganizationListParams | null | undefined, options?: RequestOptions): PagePromise<OrganizationsCursor, Organization>;
|
|
11
41
|
/**
|
|
12
42
|
* Get details about an Organization
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const organization = await client.organizations.get(
|
|
47
|
+
* 'organization_id',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
13
50
|
*/
|
|
14
51
|
get(organizationID: string, options?: RequestOptions): APIPromise<Organization>;
|
|
15
52
|
}
|
|
@@ -42,9 +79,21 @@ export interface OrganizationList {
|
|
|
42
79
|
*/
|
|
43
80
|
pagination: Shared.Pagination;
|
|
44
81
|
}
|
|
82
|
+
export interface OrganizationCreateParams {
|
|
83
|
+
/**
|
|
84
|
+
* Organization name.
|
|
85
|
+
*/
|
|
86
|
+
name: string;
|
|
87
|
+
}
|
|
88
|
+
export interface OrganizationUpdateParams {
|
|
89
|
+
/**
|
|
90
|
+
* Organization name.
|
|
91
|
+
*/
|
|
92
|
+
name?: string;
|
|
93
|
+
}
|
|
45
94
|
export interface OrganizationListParams extends CursorParams {
|
|
46
95
|
}
|
|
47
96
|
export declare namespace Organizations {
|
|
48
|
-
export { type Organization as Organization, type OrganizationList as OrganizationList, type OrganizationsCursor as OrganizationsCursor, type OrganizationListParams as OrganizationListParams, };
|
|
97
|
+
export { type Organization as Organization, type OrganizationList as OrganizationList, type OrganizationsCursor as OrganizationsCursor, type OrganizationCreateParams as OrganizationCreateParams, type OrganizationUpdateParams as OrganizationUpdateParams, type OrganizationListParams as OrganizationListParams, };
|
|
49
98
|
}
|
|
50
99
|
//# sourceMappingURL=organizations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../src/resources/organizations.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,aAAc,SAAQ,WAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"organizations.d.ts","source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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,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -6,14 +6,55 @@ const resource_1 = require("../core/resource.js");
|
|
|
6
6
|
const pagination_1 = require("../core/pagination.js");
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
class Organizations extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new organization
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const organization = await client.organizations.create({
|
|
15
|
+
* name: 'My Organization',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(body, options) {
|
|
20
|
+
return this._client.post('/v1/organizations', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Update an existing organization
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const organization = await client.organizations.update(
|
|
28
|
+
* 'organization_id',
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
update(organizationID, body, options) {
|
|
33
|
+
return this._client.patch((0, path_1.path) `/v1/organizations/${organizationID}`, { body, ...options });
|
|
34
|
+
}
|
|
9
35
|
/**
|
|
10
36
|
* List all Organizations
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* // Automatically fetches more pages as needed.
|
|
41
|
+
* for await (const organization of client.organizations.list()) {
|
|
42
|
+
* // ...
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
11
45
|
*/
|
|
12
46
|
list(query = {}, options) {
|
|
13
47
|
return this._client.getAPIList('/v1/organizations', (pagination_1.Cursor), { query, ...options });
|
|
14
48
|
}
|
|
15
49
|
/**
|
|
16
50
|
* Get details about an Organization
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const organization = await client.organizations.get(
|
|
55
|
+
* 'organization_id',
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
17
58
|
*/
|
|
18
59
|
get(organizationID, options) {
|
|
19
60
|
return this._client.get((0, path_1.path) `/v1/organizations/${organizationID}`, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAA4E;AAE5E,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAA4E;AAE5E,oDAA8C;AAE9C,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;CACF;AAhED,sCAgEC"}
|
|
@@ -3,14 +3,55 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
3
3
|
import { Cursor } from "../core/pagination.mjs";
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
export class Organizations extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new organization
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const organization = await client.organizations.create({
|
|
12
|
+
* name: 'My Organization',
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(body, options) {
|
|
17
|
+
return this._client.post('/v1/organizations', { body, ...options });
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Update an existing organization
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const organization = await client.organizations.update(
|
|
25
|
+
* 'organization_id',
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
update(organizationID, body, options) {
|
|
30
|
+
return this._client.patch(path `/v1/organizations/${organizationID}`, { body, ...options });
|
|
31
|
+
}
|
|
6
32
|
/**
|
|
7
33
|
* List all Organizations
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* // Automatically fetches more pages as needed.
|
|
38
|
+
* for await (const organization of client.organizations.list()) {
|
|
39
|
+
* // ...
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
8
42
|
*/
|
|
9
43
|
list(query = {}, options) {
|
|
10
44
|
return this._client.getAPIList('/v1/organizations', (Cursor), { query, ...options });
|
|
11
45
|
}
|
|
12
46
|
/**
|
|
13
47
|
* Get details about an Organization
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const organization = await client.organizations.get(
|
|
52
|
+
* 'organization_id',
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
14
55
|
*/
|
|
15
56
|
get(organizationID, options) {
|
|
16
57
|
return this._client.get(path `/v1/organizations/${organizationID}`, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.mjs","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"organizations.mjs","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;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,IAAI,CAAA,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,MAAoB,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,IAAI,CAAA,qBAAqB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF"}
|
|
@@ -8,8 +8,48 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
9
|
|
|
10
10
|
export class Organizations extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Create a new organization
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const organization = await client.organizations.create({
|
|
17
|
+
* name: 'My Organization',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
create(body: OrganizationCreateParams, options?: RequestOptions): APIPromise<Organization> {
|
|
22
|
+
return this._client.post('/v1/organizations', { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Update an existing organization
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const organization = await client.organizations.update(
|
|
31
|
+
* 'organization_id',
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
update(
|
|
36
|
+
organizationID: string,
|
|
37
|
+
body: OrganizationUpdateParams,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<Organization> {
|
|
40
|
+
return this._client.patch(path`/v1/organizations/${organizationID}`, { body, ...options });
|
|
41
|
+
}
|
|
42
|
+
|
|
11
43
|
/**
|
|
12
44
|
* List all Organizations
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* // Automatically fetches more pages as needed.
|
|
49
|
+
* for await (const organization of client.organizations.list()) {
|
|
50
|
+
* // ...
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
13
53
|
*/
|
|
14
54
|
list(
|
|
15
55
|
query: OrganizationListParams | null | undefined = {},
|
|
@@ -20,6 +60,13 @@ export class Organizations extends APIResource {
|
|
|
20
60
|
|
|
21
61
|
/**
|
|
22
62
|
* Get details about an Organization
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const organization = await client.organizations.get(
|
|
67
|
+
* 'organization_id',
|
|
68
|
+
* );
|
|
69
|
+
* ```
|
|
23
70
|
*/
|
|
24
71
|
get(organizationID: string, options?: RequestOptions): APIPromise<Organization> {
|
|
25
72
|
return this._client.get(path`/v1/organizations/${organizationID}`, options);
|
|
@@ -62,6 +109,20 @@ export interface OrganizationList {
|
|
|
62
109
|
pagination: Shared.Pagination;
|
|
63
110
|
}
|
|
64
111
|
|
|
112
|
+
export interface OrganizationCreateParams {
|
|
113
|
+
/**
|
|
114
|
+
* Organization name.
|
|
115
|
+
*/
|
|
116
|
+
name: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface OrganizationUpdateParams {
|
|
120
|
+
/**
|
|
121
|
+
* Organization name.
|
|
122
|
+
*/
|
|
123
|
+
name?: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
65
126
|
export interface OrganizationListParams extends CursorParams {}
|
|
66
127
|
|
|
67
128
|
export declare namespace Organizations {
|
|
@@ -69,6 +130,8 @@ export declare namespace Organizations {
|
|
|
69
130
|
type Organization as Organization,
|
|
70
131
|
type OrganizationList as OrganizationList,
|
|
71
132
|
type OrganizationsCursor as OrganizationsCursor,
|
|
133
|
+
type OrganizationCreateParams as OrganizationCreateParams,
|
|
134
|
+
type OrganizationUpdateParams as OrganizationUpdateParams,
|
|
72
135
|
type OrganizationListParams as OrganizationListParams,
|
|
73
136
|
};
|
|
74
137
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.45.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.45.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.45.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.45.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|