@nirvana-labs/nirvana 1.46.2 → 1.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/client.d.mts +5 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -5
- package/client.d.ts.map +1 -1
- package/client.js +12 -5
- package/client.js.map +1 -1
- package/client.mjs +12 -5
- package/client.mjs.map +1 -1
- package/internal/tslib.js +6 -6
- package/package.json +1 -1
- package/resources/api-keys/api-keys.d.mts +168 -0
- package/resources/api-keys/api-keys.d.mts.map +1 -0
- package/resources/api-keys/api-keys.d.ts +168 -0
- package/resources/api-keys/api-keys.d.ts.map +1 -0
- package/resources/api-keys/api-keys.js +76 -0
- package/resources/api-keys/api-keys.js.map +1 -0
- package/resources/api-keys/api-keys.mjs +72 -0
- package/resources/api-keys/api-keys.mjs.map +1 -0
- package/resources/api-keys/index.d.mts +2 -0
- package/resources/api-keys/index.d.mts.map +1 -0
- package/resources/api-keys/index.d.ts +2 -0
- package/resources/api-keys/index.d.ts.map +1 -0
- package/resources/api-keys/index.js +7 -0
- package/resources/api-keys/index.js.map +1 -0
- package/resources/api-keys/index.mjs +3 -0
- package/resources/api-keys/index.mjs.map +1 -0
- package/resources/api-keys.d.mts +1 -167
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +1 -167
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +2 -72
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +1 -70
- package/resources/api-keys.mjs.map +1 -1
- package/resources/compute/vms/vms.d.mts +1 -1
- package/resources/compute/vms/vms.d.mts.map +1 -1
- package/resources/compute/vms/vms.d.ts +1 -1
- package/resources/compute/vms/vms.d.ts.map +1 -1
- package/resources/compute/volumes/volumes.d.mts +1 -1
- package/resources/compute/volumes/volumes.d.mts.map +1 -1
- package/resources/compute/volumes/volumes.d.ts +1 -1
- package/resources/compute/volumes/volumes.d.ts.map +1 -1
- package/resources/networking/connect/connections.d.mts +1 -1
- package/resources/networking/connect/connections.d.mts.map +1 -1
- package/resources/networking/connect/connections.d.ts +1 -1
- package/resources/networking/connect/connections.d.ts.map +1 -1
- package/resources/networking/firewall-rules.d.mts +1 -1
- package/resources/networking/firewall-rules.d.mts.map +1 -1
- package/resources/networking/firewall-rules.d.ts +1 -1
- package/resources/networking/firewall-rules.d.ts.map +1 -1
- package/resources/networking/vpcs/vpcs.d.mts +1 -1
- package/resources/networking/vpcs/vpcs.d.mts.map +1 -1
- package/resources/networking/vpcs/vpcs.d.ts +1 -1
- package/resources/networking/vpcs/vpcs.d.ts.map +1 -1
- package/resources/operations/index.d.mts +2 -0
- package/resources/operations/index.d.mts.map +1 -0
- package/resources/operations/index.d.ts +2 -0
- package/resources/operations/index.d.ts.map +1 -0
- package/resources/operations/index.js +7 -0
- package/resources/operations/index.js.map +1 -0
- package/resources/operations/index.mjs +3 -0
- package/resources/operations/index.mjs.map +1 -0
- package/resources/operations/operations.d.mts +82 -0
- package/resources/operations/operations.d.mts.map +1 -0
- package/resources/operations/operations.d.ts +82 -0
- package/resources/operations/operations.d.ts.map +1 -0
- package/resources/operations/operations.js +23 -0
- package/resources/operations/operations.js.map +1 -0
- package/resources/operations/operations.mjs +19 -0
- package/resources/operations/operations.mjs.map +1 -0
- package/resources/operations.d.mts +1 -81
- package/resources/operations.d.mts.map +1 -1
- package/resources/operations.d.ts +1 -81
- package/resources/operations.d.ts.map +1 -1
- package/resources/operations.js +2 -19
- package/resources/operations.js.map +1 -1
- package/resources/operations.mjs +1 -17
- package/resources/operations.mjs.map +1 -1
- package/resources/organizations/index.d.mts +2 -0
- package/resources/organizations/index.d.mts.map +1 -0
- package/resources/organizations/index.d.ts +2 -0
- package/resources/organizations/index.d.ts.map +1 -0
- package/resources/organizations/index.js +7 -0
- package/resources/organizations/index.js.map +1 -0
- package/resources/organizations/index.mjs +3 -0
- package/resources/organizations/index.mjs.map +1 -0
- package/resources/organizations/organizations.d.mts +103 -0
- package/resources/organizations/organizations.d.mts.map +1 -0
- package/resources/organizations/organizations.d.ts +103 -0
- package/resources/organizations/organizations.d.ts.map +1 -0
- package/resources/organizations/organizations.js +64 -0
- package/resources/organizations/organizations.js.map +1 -0
- package/resources/organizations/organizations.mjs +60 -0
- package/resources/organizations/organizations.mjs.map +1 -0
- package/resources/organizations.d.mts +1 -102
- package/resources/organizations.d.mts.map +1 -1
- package/resources/organizations.d.ts +1 -102
- package/resources/organizations.d.ts.map +1 -1
- package/resources/organizations.js +2 -60
- package/resources/organizations.js.map +1 -1
- package/resources/organizations.mjs +1 -58
- package/resources/organizations.mjs.map +1 -1
- package/resources/projects/index.d.mts +2 -0
- package/resources/projects/index.d.mts.map +1 -0
- package/resources/projects/index.d.ts +2 -0
- package/resources/projects/index.d.ts.map +1 -0
- package/resources/projects/index.js +7 -0
- package/resources/projects/index.js.map +1 -0
- package/resources/projects/index.mjs +3 -0
- package/resources/projects/index.mjs.map +1 -0
- package/resources/projects/projects.d.mts +171 -0
- package/resources/projects/projects.d.mts.map +1 -0
- package/resources/projects/projects.d.ts +171 -0
- package/resources/projects/projects.d.ts.map +1 -0
- package/resources/projects/projects.js +75 -0
- package/resources/projects/projects.js.map +1 -0
- package/resources/projects/projects.mjs +71 -0
- package/resources/projects/projects.mjs.map +1 -0
- package/resources/projects.d.mts +1 -174
- package/resources/projects.d.mts.map +1 -1
- package/resources/projects.d.ts +1 -174
- package/resources/projects.d.ts.map +1 -1
- package/resources/projects.js +2 -71
- package/resources/projects.js.map +1 -1
- package/resources/projects.mjs +1 -69
- package/resources/projects.mjs.map +1 -1
- package/resources/regions/index.d.mts +2 -0
- package/resources/regions/index.d.mts.map +1 -0
- package/resources/regions/index.d.ts +2 -0
- package/resources/regions/index.d.ts.map +1 -0
- package/resources/regions/index.js +7 -0
- package/resources/regions/index.js.map +1 -0
- package/resources/regions/index.mjs +3 -0
- package/resources/regions/index.mjs.map +1 -0
- package/resources/regions/regions.d.mts +108 -0
- package/resources/regions/regions.d.mts.map +1 -0
- package/resources/regions/regions.d.ts +108 -0
- package/resources/regions/regions.d.ts.map +1 -0
- package/resources/regions/regions.js +36 -0
- package/resources/regions/regions.js.map +1 -0
- package/resources/regions/regions.mjs +32 -0
- package/resources/regions/regions.mjs.map +1 -0
- package/resources/regions.d.mts +1 -107
- package/resources/regions.d.mts.map +1 -1
- package/resources/regions.d.ts +1 -107
- package/resources/regions.d.ts.map +1 -1
- package/resources/regions.js +2 -32
- package/resources/regions.js.map +1 -1
- package/resources/regions.mjs +1 -30
- package/resources/regions.mjs.map +1 -1
- package/src/client.ts +13 -5
- package/src/resources/api-keys/api-keys.ts +223 -0
- package/src/resources/api-keys/api.md +14 -0
- package/src/resources/api-keys/index.ts +3 -0
- package/src/resources/api-keys.ts +1 -221
- package/src/resources/compute/api.md +68 -0
- package/src/resources/compute/vms/vms.ts +1 -1
- package/src/resources/compute/volumes/volumes.ts +1 -1
- package/src/resources/networking/api.md +67 -0
- package/src/resources/networking/connect/connections.ts +1 -1
- package/src/resources/networking/firewall-rules.ts +1 -1
- package/src/resources/networking/vpcs/vpcs.ts +1 -1
- package/src/resources/operations/api.md +14 -0
- package/src/resources/operations/index.ts +3 -0
- package/src/resources/operations/operations.ts +114 -0
- package/src/resources/operations.ts +1 -112
- package/src/resources/organizations/api.md +13 -0
- package/src/resources/organizations/index.ts +3 -0
- package/src/resources/organizations/organizations.ts +142 -0
- package/src/resources/organizations.ts +1 -140
- package/src/resources/projects/api.md +14 -0
- package/src/resources/projects/index.ts +3 -0
- package/src/resources/projects/projects.ts +224 -0
- package/src/resources/projects.ts +1 -227
- package/src/resources/regions/api.md +12 -0
- package/src/resources/regions/index.ts +3 -0
- package/src/resources/regions/regions.ts +140 -0
- package/src/resources/regions.ts +1 -138
- package/src/resources/rpc-nodes/api.md +44 -0
- package/src/resources/user/api.md +20 -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
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as Shared from "../shared.js";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
4
|
+
import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.js";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
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>;
|
|
29
|
+
/**
|
|
30
|
+
* List 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
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
list(query?: OrganizationListParams | null | undefined, options?: RequestOptions): PagePromise<OrganizationsCursor, Organization>;
|
|
41
|
+
/**
|
|
42
|
+
* Get details about an Organization
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const organization = await client.organizations.get(
|
|
47
|
+
* 'organization_id',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
get(organizationID: string, options?: RequestOptions): APIPromise<Organization>;
|
|
52
|
+
}
|
|
53
|
+
export type OrganizationsCursor = Cursor<Organization>;
|
|
54
|
+
/**
|
|
55
|
+
* Organization response.
|
|
56
|
+
*/
|
|
57
|
+
export interface Organization {
|
|
58
|
+
/**
|
|
59
|
+
* Organization ID.
|
|
60
|
+
*/
|
|
61
|
+
id: string;
|
|
62
|
+
/**
|
|
63
|
+
* When the Organization was created.
|
|
64
|
+
*/
|
|
65
|
+
created_at: string;
|
|
66
|
+
/**
|
|
67
|
+
* Organization name.
|
|
68
|
+
*/
|
|
69
|
+
name: string;
|
|
70
|
+
/**
|
|
71
|
+
* When the Organization was updated.
|
|
72
|
+
*/
|
|
73
|
+
updated_at: string;
|
|
74
|
+
/**
|
|
75
|
+
* Authentication provider organization ID.
|
|
76
|
+
*/
|
|
77
|
+
auth_id?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface OrganizationList {
|
|
80
|
+
items: Array<Organization>;
|
|
81
|
+
/**
|
|
82
|
+
* Pagination response details.
|
|
83
|
+
*/
|
|
84
|
+
pagination: Shared.Pagination;
|
|
85
|
+
}
|
|
86
|
+
export interface OrganizationCreateParams {
|
|
87
|
+
/**
|
|
88
|
+
* Organization name.
|
|
89
|
+
*/
|
|
90
|
+
name: string;
|
|
91
|
+
}
|
|
92
|
+
export interface OrganizationUpdateParams {
|
|
93
|
+
/**
|
|
94
|
+
* Organization name.
|
|
95
|
+
*/
|
|
96
|
+
name?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface OrganizationListParams extends CursorParams {
|
|
99
|
+
}
|
|
100
|
+
export declare namespace Organizations {
|
|
101
|
+
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, };
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=organizations.d.ts.map
|
|
@@ -0,0 +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;OAC1C,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;CAGhF;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAE3B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;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,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,64 @@
|
|
|
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.Organizations = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
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
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* List 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
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
list(query = {}, options) {
|
|
47
|
+
return this._client.getAPIList('/v1/organizations', (pagination_1.Cursor), { query, ...options });
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get details about an Organization
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const organization = await client.organizations.get(
|
|
55
|
+
* 'organization_id',
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
get(organizationID, options) {
|
|
60
|
+
return this._client.get((0, path_1.path) `/v1/organizations/${organizationID}`, options);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.Organizations = Organizations;
|
|
64
|
+
//# sourceMappingURL=organizations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAA+E;AAE/E,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;CACF;AAhED,sCAgEC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { Cursor } from "../../core/pagination.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
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
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* List 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
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
list(query = {}, options) {
|
|
44
|
+
return this._client.getAPIList('/v1/organizations', (Cursor), { query, ...options });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get details about an Organization
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const organization = await client.organizations.get(
|
|
52
|
+
* 'organization_id',
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
get(organizationID, options) {
|
|
57
|
+
return this._client.get(path `/v1/organizations/${organizationID}`, options);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=organizations.mjs.map
|
|
@@ -0,0 +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;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"}
|
|
@@ -1,103 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import * as Shared from "./shared.mjs";
|
|
3
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
-
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
|
|
5
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
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>;
|
|
29
|
-
/**
|
|
30
|
-
* List organizations for the authenticated user
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```ts
|
|
34
|
-
* // Automatically fetches more pages as needed.
|
|
35
|
-
* for await (const organization of client.organizations.list()) {
|
|
36
|
-
* // ...
|
|
37
|
-
* }
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
list(query?: OrganizationListParams | null | undefined, options?: RequestOptions): PagePromise<OrganizationsCursor, Organization>;
|
|
41
|
-
/**
|
|
42
|
-
* Get details about an Organization
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```ts
|
|
46
|
-
* const organization = await client.organizations.get(
|
|
47
|
-
* 'organization_id',
|
|
48
|
-
* );
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
get(organizationID: string, options?: RequestOptions): APIPromise<Organization>;
|
|
52
|
-
}
|
|
53
|
-
export type OrganizationsCursor = Cursor<Organization>;
|
|
54
|
-
/**
|
|
55
|
-
* Organization response.
|
|
56
|
-
*/
|
|
57
|
-
export interface Organization {
|
|
58
|
-
/**
|
|
59
|
-
* Organization ID.
|
|
60
|
-
*/
|
|
61
|
-
id: string;
|
|
62
|
-
/**
|
|
63
|
-
* When the Organization was created.
|
|
64
|
-
*/
|
|
65
|
-
created_at: string;
|
|
66
|
-
/**
|
|
67
|
-
* Organization name.
|
|
68
|
-
*/
|
|
69
|
-
name: string;
|
|
70
|
-
/**
|
|
71
|
-
* When the Organization was updated.
|
|
72
|
-
*/
|
|
73
|
-
updated_at: string;
|
|
74
|
-
/**
|
|
75
|
-
* Authentication provider organization ID.
|
|
76
|
-
*/
|
|
77
|
-
auth_id?: string;
|
|
78
|
-
}
|
|
79
|
-
export interface OrganizationList {
|
|
80
|
-
items: Array<Organization>;
|
|
81
|
-
/**
|
|
82
|
-
* Pagination response details.
|
|
83
|
-
*/
|
|
84
|
-
pagination: Shared.Pagination;
|
|
85
|
-
}
|
|
86
|
-
export interface OrganizationCreateParams {
|
|
87
|
-
/**
|
|
88
|
-
* Organization name.
|
|
89
|
-
*/
|
|
90
|
-
name: string;
|
|
91
|
-
}
|
|
92
|
-
export interface OrganizationUpdateParams {
|
|
93
|
-
/**
|
|
94
|
-
* Organization name.
|
|
95
|
-
*/
|
|
96
|
-
name?: string;
|
|
97
|
-
}
|
|
98
|
-
export interface OrganizationListParams extends CursorParams {
|
|
99
|
-
}
|
|
100
|
-
export declare namespace Organizations {
|
|
101
|
-
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, };
|
|
102
|
-
}
|
|
1
|
+
export * from "./organizations/index.mjs";
|
|
103
2
|
//# sourceMappingURL=organizations.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.mts","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organizations.d.mts","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":""}
|
|
@@ -1,103 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import * as Shared from "./shared.js";
|
|
3
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
-
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.js";
|
|
5
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
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>;
|
|
29
|
-
/**
|
|
30
|
-
* List organizations for the authenticated user
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```ts
|
|
34
|
-
* // Automatically fetches more pages as needed.
|
|
35
|
-
* for await (const organization of client.organizations.list()) {
|
|
36
|
-
* // ...
|
|
37
|
-
* }
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
list(query?: OrganizationListParams | null | undefined, options?: RequestOptions): PagePromise<OrganizationsCursor, Organization>;
|
|
41
|
-
/**
|
|
42
|
-
* Get details about an Organization
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```ts
|
|
46
|
-
* const organization = await client.organizations.get(
|
|
47
|
-
* 'organization_id',
|
|
48
|
-
* );
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
get(organizationID: string, options?: RequestOptions): APIPromise<Organization>;
|
|
52
|
-
}
|
|
53
|
-
export type OrganizationsCursor = Cursor<Organization>;
|
|
54
|
-
/**
|
|
55
|
-
* Organization response.
|
|
56
|
-
*/
|
|
57
|
-
export interface Organization {
|
|
58
|
-
/**
|
|
59
|
-
* Organization ID.
|
|
60
|
-
*/
|
|
61
|
-
id: string;
|
|
62
|
-
/**
|
|
63
|
-
* When the Organization was created.
|
|
64
|
-
*/
|
|
65
|
-
created_at: string;
|
|
66
|
-
/**
|
|
67
|
-
* Organization name.
|
|
68
|
-
*/
|
|
69
|
-
name: string;
|
|
70
|
-
/**
|
|
71
|
-
* When the Organization was updated.
|
|
72
|
-
*/
|
|
73
|
-
updated_at: string;
|
|
74
|
-
/**
|
|
75
|
-
* Authentication provider organization ID.
|
|
76
|
-
*/
|
|
77
|
-
auth_id?: string;
|
|
78
|
-
}
|
|
79
|
-
export interface OrganizationList {
|
|
80
|
-
items: Array<Organization>;
|
|
81
|
-
/**
|
|
82
|
-
* Pagination response details.
|
|
83
|
-
*/
|
|
84
|
-
pagination: Shared.Pagination;
|
|
85
|
-
}
|
|
86
|
-
export interface OrganizationCreateParams {
|
|
87
|
-
/**
|
|
88
|
-
* Organization name.
|
|
89
|
-
*/
|
|
90
|
-
name: string;
|
|
91
|
-
}
|
|
92
|
-
export interface OrganizationUpdateParams {
|
|
93
|
-
/**
|
|
94
|
-
* Organization name.
|
|
95
|
-
*/
|
|
96
|
-
name?: string;
|
|
97
|
-
}
|
|
98
|
-
export interface OrganizationListParams extends CursorParams {
|
|
99
|
-
}
|
|
100
|
-
export declare namespace Organizations {
|
|
101
|
-
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, };
|
|
102
|
-
}
|
|
1
|
+
export * from "./organizations/index.js";
|
|
103
2
|
//# sourceMappingURL=organizations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":""}
|
|
@@ -1,64 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const pagination_1 = require("../core/pagination.js");
|
|
7
|
-
const path_1 = require("../internal/utils/path.js");
|
|
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
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* List organizations for the authenticated user
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```ts
|
|
40
|
-
* // Automatically fetches more pages as needed.
|
|
41
|
-
* for await (const organization of client.organizations.list()) {
|
|
42
|
-
* // ...
|
|
43
|
-
* }
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
list(query = {}, options) {
|
|
47
|
-
return this._client.getAPIList('/v1/organizations', (pagination_1.Cursor), { query, ...options });
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Get details about an Organization
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```ts
|
|
54
|
-
* const organization = await client.organizations.get(
|
|
55
|
-
* 'organization_id',
|
|
56
|
-
* );
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
get(organizationID, options) {
|
|
60
|
-
return this._client.get((0, path_1.path) `/v1/organizations/${organizationID}`, options);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.Organizations = Organizations;
|
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./organizations/index.js"), exports);
|
|
64
6
|
//# sourceMappingURL=organizations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mEAAsC"}
|
|
@@ -1,60 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { Cursor } from "../core/pagination.mjs";
|
|
4
|
-
import { path } from "../internal/utils/path.mjs";
|
|
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
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* List organizations for the authenticated user
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* // Automatically fetches more pages as needed.
|
|
38
|
-
* for await (const organization of client.organizations.list()) {
|
|
39
|
-
* // ...
|
|
40
|
-
* }
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
list(query = {}, options) {
|
|
44
|
-
return this._client.getAPIList('/v1/organizations', (Cursor), { query, ...options });
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Get details about an Organization
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const organization = await client.organizations.get(
|
|
52
|
-
* 'organization_id',
|
|
53
|
-
* );
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
get(organizationID, options) {
|
|
57
|
-
return this._client.get(path `/v1/organizations/${organizationID}`, options);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
2
|
+
export * from "./organizations/index.mjs";
|
|
60
3
|
//# sourceMappingURL=organizations.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.mjs","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"organizations.mjs","sourceRoot":"","sources":["../src/resources/organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/projects/index.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/projects/index.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
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.Projects = void 0;
|
|
5
|
+
var projects_1 = require("./projects.js");
|
|
6
|
+
Object.defineProperty(exports, "Projects", { enumerable: true, get: function () { return projects_1.Projects; } });
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/projects/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/projects/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,QAAQ,EAAE"}
|