@nirvana-labs/nirvana 1.64.0 → 1.66.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 +32 -0
- package/bin/migration-config.json +33 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/instance-types/index.d.mts +2 -0
- package/resources/instance-types/index.d.mts.map +1 -0
- package/resources/instance-types/index.d.ts +2 -0
- package/resources/instance-types/index.d.ts.map +1 -0
- package/resources/instance-types/index.js +7 -0
- package/resources/instance-types/index.js.map +1 -0
- package/resources/instance-types/index.mjs +3 -0
- package/resources/instance-types/index.mjs.map +1 -0
- package/resources/instance-types/instance-types.d.mts +44 -0
- package/resources/instance-types/instance-types.d.mts.map +1 -0
- package/resources/instance-types/instance-types.d.ts +44 -0
- package/resources/instance-types/instance-types.d.ts.map +1 -0
- package/resources/instance-types/instance-types.js +19 -0
- package/resources/instance-types/instance-types.js.map +1 -0
- package/resources/instance-types/instance-types.mjs +15 -0
- package/resources/instance-types/instance-types.mjs.map +1 -0
- package/resources/instance-types.d.mts +2 -0
- package/resources/instance-types.d.mts.map +1 -0
- package/resources/instance-types.d.ts +2 -0
- package/resources/instance-types.d.ts.map +1 -0
- package/resources/instance-types.js +6 -0
- package/resources/instance-types.js.map +1 -0
- package/resources/instance-types.mjs +3 -0
- package/resources/instance-types.mjs.map +1 -0
- package/resources/organizations/index.d.mts +1 -0
- package/resources/organizations/index.d.mts.map +1 -1
- package/resources/organizations/index.d.ts +1 -0
- package/resources/organizations/index.d.ts.map +1 -1
- package/resources/organizations/index.js +3 -1
- package/resources/organizations/index.js.map +1 -1
- package/resources/organizations/index.mjs +1 -0
- package/resources/organizations/index.mjs.map +1 -1
- package/resources/organizations/memberships.d.mts +56 -0
- package/resources/organizations/memberships.d.mts.map +1 -0
- package/resources/organizations/memberships.d.ts +56 -0
- package/resources/organizations/memberships.d.ts.map +1 -0
- package/resources/organizations/memberships.js +43 -0
- package/resources/organizations/memberships.js.map +1 -0
- package/resources/organizations/memberships.mjs +39 -0
- package/resources/organizations/memberships.mjs.map +1 -0
- package/resources/organizations/organizations.d.mts +38 -2
- package/resources/organizations/organizations.d.mts.map +1 -1
- package/resources/organizations/organizations.d.ts +38 -2
- package/resources/organizations/organizations.d.ts.map +1 -1
- package/resources/organizations/organizations.js +8 -0
- package/resources/organizations/organizations.js.map +1 -1
- package/resources/organizations/organizations.mjs +7 -0
- package/resources/organizations/organizations.mjs.map +1 -1
- package/src/client.ts +5 -0
- package/src/resources/index.ts +2 -1
- package/src/resources/instance-types/api.md +9 -0
- package/src/resources/instance-types/index.ts +3 -0
- package/src/resources/instance-types/instance-types.ts +69 -0
- package/src/resources/instance-types.ts +3 -0
- package/src/resources/organizations/api.md +21 -10
- package/src/resources/organizations/index.ts +6 -0
- package/src/resources/organizations/memberships.ts +86 -0
- package/src/resources/organizations/organizations.ts +59 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,yEAAgD;AAChD,kDAKuB;AAEvB,yDAA+E;A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AAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAjFD,sCAiFC;AAuLD,aAAa,CAAC,WAAW,GAAG,yBAAW,CAAC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as MembershipsAPI from "./memberships.mjs";
|
|
4
|
+
import { Memberships, } from "./memberships.mjs";
|
|
3
5
|
import { Cursor } from "../../core/pagination.mjs";
|
|
4
6
|
import { buildHeaders } from "../../internal/headers.mjs";
|
|
5
7
|
import { path } from "../../internal/utils/path.mjs";
|
|
6
8
|
export class Organizations extends APIResource {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.memberships = new MembershipsAPI.Memberships(this._client);
|
|
12
|
+
}
|
|
7
13
|
/**
|
|
8
14
|
* Create a new organization
|
|
9
15
|
*
|
|
@@ -72,4 +78,5 @@ export class Organizations extends APIResource {
|
|
|
72
78
|
});
|
|
73
79
|
}
|
|
74
80
|
}
|
|
81
|
+
Organizations.Memberships = Memberships;
|
|
75
82
|
//# 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;
|
|
1
|
+
{"version":3,"file":"organizations.mjs","sourceRoot":"","sources":["../../src/resources/organizations/organizations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,cAAc;OACnB,EAGL,WAAW,GAEZ;OAEM,EAAE,MAAM,EAAkC;OAC1C,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WA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Promise } from './core/api-promise';
|
|
|
22
22
|
import { APIKeys } from './resources/api-keys/api-keys';
|
|
23
23
|
import { AuditLogs } from './resources/audit-logs/audit-logs';
|
|
24
24
|
import { Compute } from './resources/compute/compute';
|
|
25
|
+
import { InstanceTypes } from './resources/instance-types/instance-types';
|
|
25
26
|
import { Networking } from './resources/networking/networking';
|
|
26
27
|
import { NKS } from './resources/nks/nks';
|
|
27
28
|
import { Operations } from './resources/operations/operations';
|
|
@@ -761,6 +762,7 @@ export class NirvanaLabs {
|
|
|
761
762
|
auditLogs: API.AuditLogs = new API.AuditLogs(this);
|
|
762
763
|
projects: API.Projects = new API.Projects(this);
|
|
763
764
|
regions: API.Regions = new API.Regions(this);
|
|
765
|
+
instanceTypes: API.InstanceTypes = new API.InstanceTypes(this);
|
|
764
766
|
compute: API.Compute = new API.Compute(this);
|
|
765
767
|
networking: API.Networking = new API.Networking(this);
|
|
766
768
|
rpcNodes: API.RPCNodes = new API.RPCNodes(this);
|
|
@@ -774,6 +776,7 @@ NirvanaLabs.Organizations = Organizations;
|
|
|
774
776
|
NirvanaLabs.AuditLogs = AuditLogs;
|
|
775
777
|
NirvanaLabs.Projects = Projects;
|
|
776
778
|
NirvanaLabs.Regions = Regions;
|
|
779
|
+
NirvanaLabs.InstanceTypes = InstanceTypes;
|
|
777
780
|
NirvanaLabs.Compute = Compute;
|
|
778
781
|
NirvanaLabs.Networking = Networking;
|
|
779
782
|
NirvanaLabs.RPCNodes = RPCNodes;
|
|
@@ -799,6 +802,8 @@ export declare namespace NirvanaLabs {
|
|
|
799
802
|
|
|
800
803
|
export { Regions as Regions };
|
|
801
804
|
|
|
805
|
+
export { InstanceTypes as InstanceTypes };
|
|
806
|
+
|
|
802
807
|
export { Compute as Compute };
|
|
803
808
|
|
|
804
809
|
export { Networking as Networking };
|
package/src/resources/index.ts
CHANGED
|
@@ -4,10 +4,11 @@ export * from './shared';
|
|
|
4
4
|
export { APIKeys } from './api-keys';
|
|
5
5
|
export { AuditLogs } from './audit-logs';
|
|
6
6
|
export { Compute } from './compute/compute';
|
|
7
|
+
export { InstanceTypes } from './instance-types';
|
|
7
8
|
export { NKS } from './nks/nks';
|
|
8
9
|
export { Networking } from './networking/networking';
|
|
9
10
|
export { Operations } from './operations';
|
|
10
|
-
export { Organizations } from './organizations';
|
|
11
|
+
export { Organizations } from './organizations/organizations';
|
|
11
12
|
export { Projects } from './projects';
|
|
12
13
|
export { RPCNodes } from './rpc-nodes/rpc-nodes';
|
|
13
14
|
export { Regions } from './regions';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# InstanceTypes
|
|
2
|
+
|
|
3
|
+
Types:
|
|
4
|
+
|
|
5
|
+
- <code><a href="./src/resources/instance-types.ts">InstanceTypeList</a></code>
|
|
6
|
+
|
|
7
|
+
Methods:
|
|
8
|
+
|
|
9
|
+
- <code title="get /v1/instance_types">client.instanceTypes.<a href="./src/resources/instance-types.ts">list</a>({ ...params }) -> InstanceTypeListItemsCursor</code>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as Shared from '../shared';
|
|
5
|
+
import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
|
|
8
|
+
export class InstanceTypes extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List instance types
|
|
11
|
+
*/
|
|
12
|
+
list(
|
|
13
|
+
query: InstanceTypeListParams | null | undefined = {},
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): PagePromise<InstanceTypeListItemsCursor, InstanceTypeList.Item> {
|
|
16
|
+
return this._client.getAPIList('/v1/instance_types', Cursor<InstanceTypeList.Item>, {
|
|
17
|
+
query,
|
|
18
|
+
...options,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type InstanceTypeListItemsCursor = Cursor<InstanceTypeList.Item>;
|
|
24
|
+
|
|
25
|
+
export interface InstanceTypeList {
|
|
26
|
+
items: Array<InstanceTypeList.Item>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Pagination response details.
|
|
30
|
+
*/
|
|
31
|
+
pagination: Shared.Pagination;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export namespace InstanceTypeList {
|
|
35
|
+
/**
|
|
36
|
+
* Instance type.
|
|
37
|
+
*/
|
|
38
|
+
export interface Item {
|
|
39
|
+
chipset: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* When the Instance Type was created.
|
|
43
|
+
*/
|
|
44
|
+
created_at: string;
|
|
45
|
+
|
|
46
|
+
memory_gi: number;
|
|
47
|
+
|
|
48
|
+
name: string;
|
|
49
|
+
|
|
50
|
+
region: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* When the Instance Type was updated.
|
|
54
|
+
*/
|
|
55
|
+
updated_at: string;
|
|
56
|
+
|
|
57
|
+
vcpu: number;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface InstanceTypeListParams extends CursorParams {}
|
|
62
|
+
|
|
63
|
+
export declare namespace InstanceTypes {
|
|
64
|
+
export {
|
|
65
|
+
type InstanceTypeList as InstanceTypeList,
|
|
66
|
+
type InstanceTypeListItemsCursor as InstanceTypeListItemsCursor,
|
|
67
|
+
type InstanceTypeListParams as InstanceTypeListParams,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -2,16 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
Types:
|
|
4
4
|
|
|
5
|
-
- <code><a href="./src/resources/organizations.ts">Organization</a></code>
|
|
6
|
-
- <code><a href="./src/resources/organizations.ts">OrganizationDomain</a></code>
|
|
7
|
-
- <code><a href="./src/resources/organizations.ts">OrganizationList</a></code>
|
|
8
|
-
- <code><a href="./src/resources/organizations.ts">OrganizationMembership</a></code>
|
|
9
|
-
- <code><a href="./src/resources/organizations.ts">OrganizationServices</a></code>
|
|
5
|
+
- <code><a href="./src/resources/organizations/organizations.ts">Organization</a></code>
|
|
6
|
+
- <code><a href="./src/resources/organizations/organizations.ts">OrganizationDomain</a></code>
|
|
7
|
+
- <code><a href="./src/resources/organizations/organizations.ts">OrganizationList</a></code>
|
|
8
|
+
- <code><a href="./src/resources/organizations/organizations.ts">OrganizationMembership</a></code>
|
|
9
|
+
- <code><a href="./src/resources/organizations/organizations.ts">OrganizationServices</a></code>
|
|
10
10
|
|
|
11
11
|
Methods:
|
|
12
12
|
|
|
13
|
-
- <code title="post /v1/organizations">client.organizations.<a href="./src/resources/organizations.ts">create</a>({ ...params }) -> Organization</code>
|
|
14
|
-
- <code title="patch /v1/organizations/{organization_id}">client.organizations.<a href="./src/resources/organizations.ts">update</a>(organizationID, { ...params }) -> Organization</code>
|
|
15
|
-
- <code title="get /v1/organizations">client.organizations.<a href="./src/resources/organizations.ts">list</a>({ ...params }) -> OrganizationsCursor</code>
|
|
16
|
-
- <code title="get /v1/organizations/{organization_id}">client.organizations.<a href="./src/resources/organizations.ts">get</a>(organizationID) -> Organization</code>
|
|
17
|
-
- <code title="post /v1/organizations/{organization_id}/leave">client.organizations.<a href="./src/resources/organizations.ts">leave</a>(organizationID) -> void</code>
|
|
13
|
+
- <code title="post /v1/organizations">client.organizations.<a href="./src/resources/organizations/organizations.ts">create</a>({ ...params }) -> Organization</code>
|
|
14
|
+
- <code title="patch /v1/organizations/{organization_id}">client.organizations.<a href="./src/resources/organizations/organizations.ts">update</a>(organizationID, { ...params }) -> Organization</code>
|
|
15
|
+
- <code title="get /v1/organizations">client.organizations.<a href="./src/resources/organizations/organizations.ts">list</a>({ ...params }) -> OrganizationsCursor</code>
|
|
16
|
+
- <code title="get /v1/organizations/{organization_id}">client.organizations.<a href="./src/resources/organizations/organizations.ts">get</a>(organizationID) -> Organization</code>
|
|
17
|
+
- <code title="post /v1/organizations/{organization_id}/leave">client.organizations.<a href="./src/resources/organizations/organizations.ts">leave</a>(organizationID) -> void</code>
|
|
18
|
+
|
|
19
|
+
## Memberships
|
|
20
|
+
|
|
21
|
+
Types:
|
|
22
|
+
|
|
23
|
+
- <code><a href="./src/resources/organizations/memberships.ts">OrganizationMembershipList</a></code>
|
|
24
|
+
|
|
25
|
+
Methods:
|
|
26
|
+
|
|
27
|
+
- <code title="get /v1/organizations/{organization_id}/memberships">client.organizations.memberships.<a href="./src/resources/organizations/memberships.ts">list</a>(organizationID, { ...params }) -> OrganizationMembershipsCursor</code>
|
|
28
|
+
- <code title="get /v1/organizations/{organization_id}/memberships/{membership_id}">client.organizations.memberships.<a href="./src/resources/organizations/memberships.ts">get</a>(membershipID, { ...params }) -> OrganizationMembership</code>
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
Memberships,
|
|
5
|
+
type OrganizationMembershipList,
|
|
6
|
+
type MembershipListParams,
|
|
7
|
+
type MembershipGetParams,
|
|
8
|
+
} from './memberships';
|
|
3
9
|
export { Organizations } from './organizations';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as Shared from '../shared';
|
|
5
|
+
import * as OrganizationsAPI from './organizations';
|
|
6
|
+
import { OrganizationMembershipsCursor } from './organizations';
|
|
7
|
+
import { APIPromise } from '../../core/api-promise';
|
|
8
|
+
import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
|
|
9
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
10
|
+
import { path } from '../../internal/utils/path';
|
|
11
|
+
|
|
12
|
+
export class Memberships extends APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* List all memberships for an organization
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* // Automatically fetches more pages as needed.
|
|
19
|
+
* for await (const organizationMembership of client.organizations.memberships.list(
|
|
20
|
+
* 'organization_id',
|
|
21
|
+
* )) {
|
|
22
|
+
* // ...
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
list(
|
|
27
|
+
organizationID: string,
|
|
28
|
+
query: MembershipListParams | null | undefined = {},
|
|
29
|
+
options?: RequestOptions,
|
|
30
|
+
): PagePromise<OrganizationMembershipsCursor, OrganizationsAPI.OrganizationMembership> {
|
|
31
|
+
return this._client.getAPIList(
|
|
32
|
+
path`/v1/organizations/${organizationID}/memberships`,
|
|
33
|
+
Cursor<OrganizationsAPI.OrganizationMembership>,
|
|
34
|
+
{ query, ...options },
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get details about an organization membership
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const organizationMembership =
|
|
44
|
+
* await client.organizations.memberships.get(
|
|
45
|
+
* 'membership_id',
|
|
46
|
+
* { organization_id: 'organization_id' },
|
|
47
|
+
* );
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
get(
|
|
51
|
+
membershipID: string,
|
|
52
|
+
params: MembershipGetParams,
|
|
53
|
+
options?: RequestOptions,
|
|
54
|
+
): APIPromise<OrganizationsAPI.OrganizationMembership> {
|
|
55
|
+
const { organization_id } = params;
|
|
56
|
+
return this._client.get(path`/v1/organizations/${organization_id}/memberships/${membershipID}`, options);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface OrganizationMembershipList {
|
|
61
|
+
items: Array<OrganizationsAPI.OrganizationMembership>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Pagination response details.
|
|
65
|
+
*/
|
|
66
|
+
pagination: Shared.Pagination;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface MembershipListParams extends CursorParams {}
|
|
70
|
+
|
|
71
|
+
export interface MembershipGetParams {
|
|
72
|
+
/**
|
|
73
|
+
* Organization ID
|
|
74
|
+
*/
|
|
75
|
+
organization_id: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export declare namespace Memberships {
|
|
79
|
+
export {
|
|
80
|
+
type OrganizationMembershipList as OrganizationMembershipList,
|
|
81
|
+
type MembershipListParams as MembershipListParams,
|
|
82
|
+
type MembershipGetParams as MembershipGetParams,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { type OrganizationMembershipsCursor };
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as Shared from '../shared';
|
|
5
|
+
import * as MembershipsAPI from './memberships';
|
|
6
|
+
import {
|
|
7
|
+
MembershipGetParams,
|
|
8
|
+
MembershipListParams,
|
|
9
|
+
Memberships,
|
|
10
|
+
OrganizationMembershipList,
|
|
11
|
+
} from './memberships';
|
|
5
12
|
import { APIPromise } from '../../core/api-promise';
|
|
6
13
|
import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
|
|
7
14
|
import { buildHeaders } from '../../internal/headers';
|
|
@@ -9,6 +16,8 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
9
16
|
import { path } from '../../internal/utils/path';
|
|
10
17
|
|
|
11
18
|
export class Organizations extends APIResource {
|
|
19
|
+
memberships: MembershipsAPI.Memberships = new MembershipsAPI.Memberships(this._client);
|
|
20
|
+
|
|
12
21
|
/**
|
|
13
22
|
* Create a new organization
|
|
14
23
|
*
|
|
@@ -91,6 +100,8 @@ export class Organizations extends APIResource {
|
|
|
91
100
|
|
|
92
101
|
export type OrganizationsCursor = Cursor<Organization>;
|
|
93
102
|
|
|
103
|
+
export type OrganizationMembershipsCursor = Cursor<OrganizationMembership>;
|
|
104
|
+
|
|
94
105
|
/**
|
|
95
106
|
* Organization response.
|
|
96
107
|
*/
|
|
@@ -113,7 +124,7 @@ export interface Organization {
|
|
|
113
124
|
/**
|
|
114
125
|
* Current user's membership details.
|
|
115
126
|
*/
|
|
116
|
-
membership:
|
|
127
|
+
membership: Organization.Membership;
|
|
117
128
|
|
|
118
129
|
/**
|
|
119
130
|
* Organization name.
|
|
@@ -141,6 +152,23 @@ export interface Organization {
|
|
|
141
152
|
auth_id?: string;
|
|
142
153
|
}
|
|
143
154
|
|
|
155
|
+
export namespace Organization {
|
|
156
|
+
/**
|
|
157
|
+
* Current user's membership details.
|
|
158
|
+
*/
|
|
159
|
+
export interface Membership {
|
|
160
|
+
/**
|
|
161
|
+
* Membership ID.
|
|
162
|
+
*/
|
|
163
|
+
id: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Role of the user in the organization.
|
|
167
|
+
*/
|
|
168
|
+
role: 'owner' | 'member';
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
144
172
|
/**
|
|
145
173
|
* Organization domain details.
|
|
146
174
|
*/
|
|
@@ -171,7 +199,7 @@ export interface OrganizationList {
|
|
|
171
199
|
}
|
|
172
200
|
|
|
173
201
|
/**
|
|
174
|
-
*
|
|
202
|
+
* Organization membership details.
|
|
175
203
|
*/
|
|
176
204
|
export interface OrganizationMembership {
|
|
177
205
|
/**
|
|
@@ -179,10 +207,30 @@ export interface OrganizationMembership {
|
|
|
179
207
|
*/
|
|
180
208
|
id: string;
|
|
181
209
|
|
|
210
|
+
/**
|
|
211
|
+
* When the membership was created.
|
|
212
|
+
*/
|
|
213
|
+
created_at: string;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Organization ID.
|
|
217
|
+
*/
|
|
218
|
+
organization_id: string;
|
|
219
|
+
|
|
182
220
|
/**
|
|
183
221
|
* Role of the user in the organization.
|
|
184
222
|
*/
|
|
185
223
|
role: 'owner' | 'member';
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* When the membership was updated.
|
|
227
|
+
*/
|
|
228
|
+
updated_at: string;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* User ID.
|
|
232
|
+
*/
|
|
233
|
+
user_id: string;
|
|
186
234
|
}
|
|
187
235
|
|
|
188
236
|
/**
|
|
@@ -231,6 +279,8 @@ export interface OrganizationUpdateParams {
|
|
|
231
279
|
|
|
232
280
|
export interface OrganizationListParams extends CursorParams {}
|
|
233
281
|
|
|
282
|
+
Organizations.Memberships = Memberships;
|
|
283
|
+
|
|
234
284
|
export declare namespace Organizations {
|
|
235
285
|
export {
|
|
236
286
|
type Organization as Organization,
|
|
@@ -243,4 +293,11 @@ export declare namespace Organizations {
|
|
|
243
293
|
type OrganizationUpdateParams as OrganizationUpdateParams,
|
|
244
294
|
type OrganizationListParams as OrganizationListParams,
|
|
245
295
|
};
|
|
296
|
+
|
|
297
|
+
export {
|
|
298
|
+
Memberships as Memberships,
|
|
299
|
+
type OrganizationMembershipList as OrganizationMembershipList,
|
|
300
|
+
type MembershipListParams as MembershipListParams,
|
|
301
|
+
type MembershipGetParams as MembershipGetParams,
|
|
302
|
+
};
|
|
246
303
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.66.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.66.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.66.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.66.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|