openlayer 0.20.2 → 0.21.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +1 -0
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +1 -0
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +3 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +1 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/inference-pipelines/inference-pipelines.d.mts +14 -14
  20. package/resources/inference-pipelines/inference-pipelines.d.mts.map +1 -1
  21. package/resources/inference-pipelines/inference-pipelines.d.ts +14 -14
  22. package/resources/inference-pipelines/inference-pipelines.d.ts.map +1 -1
  23. package/resources/projects/inference-pipelines.d.mts +31 -31
  24. package/resources/projects/inference-pipelines.d.mts.map +1 -1
  25. package/resources/projects/inference-pipelines.d.ts +31 -31
  26. package/resources/projects/inference-pipelines.d.ts.map +1 -1
  27. package/resources/workspaces/api-keys.d.mts +52 -0
  28. package/resources/workspaces/api-keys.d.mts.map +1 -0
  29. package/resources/workspaces/api-keys.d.ts +52 -0
  30. package/resources/workspaces/api-keys.d.ts.map +1 -0
  31. package/resources/workspaces/api-keys.js +23 -0
  32. package/resources/workspaces/api-keys.js.map +1 -0
  33. package/resources/workspaces/api-keys.mjs +19 -0
  34. package/resources/workspaces/api-keys.mjs.map +1 -0
  35. package/resources/workspaces/index.d.mts +4 -0
  36. package/resources/workspaces/index.d.mts.map +1 -0
  37. package/resources/workspaces/index.d.ts +4 -0
  38. package/resources/workspaces/index.d.ts.map +1 -0
  39. package/resources/workspaces/index.js +11 -0
  40. package/resources/workspaces/index.js.map +1 -0
  41. package/resources/workspaces/index.mjs +5 -0
  42. package/resources/workspaces/index.mjs.map +1 -0
  43. package/resources/workspaces/invites.d.mts +152 -0
  44. package/resources/workspaces/invites.d.mts.map +1 -0
  45. package/resources/workspaces/invites.d.ts +152 -0
  46. package/resources/workspaces/invites.d.ts.map +1 -0
  47. package/resources/workspaces/invites.js +36 -0
  48. package/resources/workspaces/invites.js.map +1 -0
  49. package/resources/workspaces/invites.mjs +32 -0
  50. package/resources/workspaces/invites.mjs.map +1 -0
  51. package/resources/workspaces/workspaces.d.mts +173 -0
  52. package/resources/workspaces/workspaces.d.mts.map +1 -0
  53. package/resources/workspaces/workspaces.d.ts +173 -0
  54. package/resources/workspaces/workspaces.d.ts.map +1 -0
  55. package/resources/workspaces/workspaces.js +48 -0
  56. package/resources/workspaces/workspaces.js.map +1 -0
  57. package/resources/workspaces/workspaces.mjs +43 -0
  58. package/resources/workspaces/workspaces.mjs.map +1 -0
  59. package/resources/workspaces.d.mts +2 -0
  60. package/resources/workspaces.d.mts.map +1 -0
  61. package/resources/workspaces.d.ts +2 -0
  62. package/resources/workspaces.d.ts.map +1 -0
  63. package/resources/workspaces.js +6 -0
  64. package/resources/workspaces.js.map +1 -0
  65. package/resources/workspaces.mjs +3 -0
  66. package/resources/workspaces.mjs.map +1 -0
  67. package/src/client.ts +15 -0
  68. package/src/resources/index.ts +6 -0
  69. package/src/resources/inference-pipelines/inference-pipelines.ts +24 -24
  70. package/src/resources/projects/inference-pipelines.ts +46 -46
  71. package/src/resources/workspaces/api-keys.ts +69 -0
  72. package/src/resources/workspaces/index.ts +16 -0
  73. package/src/resources/workspaces/invites.ts +210 -0
  74. package/src/resources/workspaces/workspaces.ts +267 -0
  75. package/src/resources/workspaces.ts +3 -0
  76. package/src/version.ts +1 -1
  77. package/version.d.mts +1 -1
  78. package/version.d.ts +1 -1
  79. package/version.js +1 -1
  80. package/version.mjs +1 -1
@@ -147,12 +147,12 @@ export interface InferencePipelineRetrieveResponse {
147
147
  totalGoalCount: number;
148
148
 
149
149
  dataBackend?:
150
- | InferencePipelineRetrieveResponse.UnionMember0
151
- | InferencePipelineRetrieveResponse.BackendType
152
- | InferencePipelineRetrieveResponse.UnionMember2
153
- | InferencePipelineRetrieveResponse.UnionMember3
154
- | InferencePipelineRetrieveResponse.UnionMember4
155
- | InferencePipelineRetrieveResponse.UnionMember5
150
+ | InferencePipelineRetrieveResponse.BigQueryDataBackend
151
+ | InferencePipelineRetrieveResponse.DefaultDataBackend
152
+ | InferencePipelineRetrieveResponse.SnowflakeDataBackend
153
+ | InferencePipelineRetrieveResponse.DatabricksDtlDataBackend
154
+ | InferencePipelineRetrieveResponse.RedshiftDataBackend
155
+ | InferencePipelineRetrieveResponse.PostgresDataBackend
156
156
  | null;
157
157
 
158
158
  /**
@@ -180,7 +180,7 @@ export namespace InferencePipelineRetrieveResponse {
180
180
  app: string;
181
181
  }
182
182
 
183
- export interface UnionMember0 {
183
+ export interface BigQueryDataBackend {
184
184
  backendType: 'bigquery';
185
185
 
186
186
  bigqueryConnectionId: string | null;
@@ -194,11 +194,11 @@ export namespace InferencePipelineRetrieveResponse {
194
194
  partitionType?: 'DAY' | 'MONTH' | 'YEAR' | null;
195
195
  }
196
196
 
197
- export interface BackendType {
197
+ export interface DefaultDataBackend {
198
198
  backendType: 'default';
199
199
  }
200
200
 
201
- export interface UnionMember2 {
201
+ export interface SnowflakeDataBackend {
202
202
  backendType: 'snowflake';
203
203
 
204
204
  database: string;
@@ -210,7 +210,7 @@ export namespace InferencePipelineRetrieveResponse {
210
210
  table: string | null;
211
211
  }
212
212
 
213
- export interface UnionMember3 {
213
+ export interface DatabricksDtlDataBackend {
214
214
  backendType: 'databricks_dtl';
215
215
 
216
216
  databricksDtlConnectionId: string | null;
@@ -218,7 +218,7 @@ export namespace InferencePipelineRetrieveResponse {
218
218
  tableId: string | null;
219
219
  }
220
220
 
221
- export interface UnionMember4 {
221
+ export interface RedshiftDataBackend {
222
222
  backendType: 'redshift';
223
223
 
224
224
  redshiftConnectionId: string | null;
@@ -228,7 +228,7 @@ export namespace InferencePipelineRetrieveResponse {
228
228
  tableName: string;
229
229
  }
230
230
 
231
- export interface UnionMember5 {
231
+ export interface PostgresDataBackend {
232
232
  backendType: 'postgres';
233
233
 
234
234
  database: string;
@@ -515,12 +515,12 @@ export interface InferencePipelineUpdateResponse {
515
515
  totalGoalCount: number;
516
516
 
517
517
  dataBackend?:
518
- | InferencePipelineUpdateResponse.UnionMember0
519
- | InferencePipelineUpdateResponse.BackendType
520
- | InferencePipelineUpdateResponse.UnionMember2
521
- | InferencePipelineUpdateResponse.UnionMember3
522
- | InferencePipelineUpdateResponse.UnionMember4
523
- | InferencePipelineUpdateResponse.UnionMember5
518
+ | InferencePipelineUpdateResponse.BigQueryDataBackend
519
+ | InferencePipelineUpdateResponse.DefaultDataBackend
520
+ | InferencePipelineUpdateResponse.SnowflakeDataBackend
521
+ | InferencePipelineUpdateResponse.DatabricksDtlDataBackend
522
+ | InferencePipelineUpdateResponse.RedshiftDataBackend
523
+ | InferencePipelineUpdateResponse.PostgresDataBackend
524
524
  | null;
525
525
 
526
526
  /**
@@ -548,7 +548,7 @@ export namespace InferencePipelineUpdateResponse {
548
548
  app: string;
549
549
  }
550
550
 
551
- export interface UnionMember0 {
551
+ export interface BigQueryDataBackend {
552
552
  backendType: 'bigquery';
553
553
 
554
554
  bigqueryConnectionId: string | null;
@@ -562,11 +562,11 @@ export namespace InferencePipelineUpdateResponse {
562
562
  partitionType?: 'DAY' | 'MONTH' | 'YEAR' | null;
563
563
  }
564
564
 
565
- export interface BackendType {
565
+ export interface DefaultDataBackend {
566
566
  backendType: 'default';
567
567
  }
568
568
 
569
- export interface UnionMember2 {
569
+ export interface SnowflakeDataBackend {
570
570
  backendType: 'snowflake';
571
571
 
572
572
  database: string;
@@ -578,7 +578,7 @@ export namespace InferencePipelineUpdateResponse {
578
578
  table: string | null;
579
579
  }
580
580
 
581
- export interface UnionMember3 {
581
+ export interface DatabricksDtlDataBackend {
582
582
  backendType: 'databricks_dtl';
583
583
 
584
584
  databricksDtlConnectionId: string | null;
@@ -586,7 +586,7 @@ export namespace InferencePipelineUpdateResponse {
586
586
  tableId: string | null;
587
587
  }
588
588
 
589
- export interface UnionMember4 {
589
+ export interface RedshiftDataBackend {
590
590
  backendType: 'redshift';
591
591
 
592
592
  redshiftConnectionId: string | null;
@@ -596,7 +596,7 @@ export namespace InferencePipelineUpdateResponse {
596
596
  tableName: string;
597
597
  }
598
598
 
599
- export interface UnionMember5 {
599
+ export interface PostgresDataBackend {
600
600
  backendType: 'postgres';
601
601
 
602
602
  database: string;
@@ -123,12 +123,12 @@ export interface InferencePipelineCreateResponse {
123
123
  totalGoalCount: number;
124
124
 
125
125
  dataBackend?:
126
- | InferencePipelineCreateResponse.UnionMember0
127
- | InferencePipelineCreateResponse.BackendType
128
- | InferencePipelineCreateResponse.UnionMember2
129
- | InferencePipelineCreateResponse.UnionMember3
130
- | InferencePipelineCreateResponse.UnionMember4
131
- | InferencePipelineCreateResponse.UnionMember5
126
+ | InferencePipelineCreateResponse.BigQueryDataBackend
127
+ | InferencePipelineCreateResponse.DefaultDataBackend
128
+ | InferencePipelineCreateResponse.SnowflakeDataBackend
129
+ | InferencePipelineCreateResponse.DatabricksDtlDataBackend
130
+ | InferencePipelineCreateResponse.RedshiftDataBackend
131
+ | InferencePipelineCreateResponse.PostgresDataBackend
132
132
  | null;
133
133
 
134
134
  /**
@@ -156,7 +156,7 @@ export namespace InferencePipelineCreateResponse {
156
156
  app: string;
157
157
  }
158
158
 
159
- export interface UnionMember0 {
159
+ export interface BigQueryDataBackend {
160
160
  backendType: 'bigquery';
161
161
 
162
162
  bigqueryConnectionId: string | null;
@@ -170,11 +170,11 @@ export namespace InferencePipelineCreateResponse {
170
170
  partitionType?: 'DAY' | 'MONTH' | 'YEAR' | null;
171
171
  }
172
172
 
173
- export interface BackendType {
173
+ export interface DefaultDataBackend {
174
174
  backendType: 'default';
175
175
  }
176
176
 
177
- export interface UnionMember2 {
177
+ export interface SnowflakeDataBackend {
178
178
  backendType: 'snowflake';
179
179
 
180
180
  database: string;
@@ -186,7 +186,7 @@ export namespace InferencePipelineCreateResponse {
186
186
  table: string | null;
187
187
  }
188
188
 
189
- export interface UnionMember3 {
189
+ export interface DatabricksDtlDataBackend {
190
190
  backendType: 'databricks_dtl';
191
191
 
192
192
  databricksDtlConnectionId: string | null;
@@ -194,7 +194,7 @@ export namespace InferencePipelineCreateResponse {
194
194
  tableId: string | null;
195
195
  }
196
196
 
197
- export interface UnionMember4 {
197
+ export interface RedshiftDataBackend {
198
198
  backendType: 'redshift';
199
199
 
200
200
  redshiftConnectionId: string | null;
@@ -204,7 +204,7 @@ export namespace InferencePipelineCreateResponse {
204
204
  tableName: string;
205
205
  }
206
206
 
207
- export interface UnionMember5 {
207
+ export interface PostgresDataBackend {
208
208
  backendType: 'postgres';
209
209
 
210
210
  database: string;
@@ -496,12 +496,12 @@ export namespace InferencePipelineListResponse {
496
496
  totalGoalCount: number;
497
497
 
498
498
  dataBackend?:
499
- | Item.UnionMember0
500
- | Item.BackendType
501
- | Item.UnionMember2
502
- | Item.UnionMember3
503
- | Item.UnionMember4
504
- | Item.UnionMember5
499
+ | Item.BigQueryDataBackend
500
+ | Item.DefaultDataBackend
501
+ | Item.SnowflakeDataBackend
502
+ | Item.DatabricksDtlDataBackend
503
+ | Item.RedshiftDataBackend
504
+ | Item.PostgresDataBackend
505
505
  | null;
506
506
 
507
507
  /**
@@ -529,7 +529,7 @@ export namespace InferencePipelineListResponse {
529
529
  app: string;
530
530
  }
531
531
 
532
- export interface UnionMember0 {
532
+ export interface BigQueryDataBackend {
533
533
  backendType: 'bigquery';
534
534
 
535
535
  bigqueryConnectionId: string | null;
@@ -543,11 +543,11 @@ export namespace InferencePipelineListResponse {
543
543
  partitionType?: 'DAY' | 'MONTH' | 'YEAR' | null;
544
544
  }
545
545
 
546
- export interface BackendType {
546
+ export interface DefaultDataBackend {
547
547
  backendType: 'default';
548
548
  }
549
549
 
550
- export interface UnionMember2 {
550
+ export interface SnowflakeDataBackend {
551
551
  backendType: 'snowflake';
552
552
 
553
553
  database: string;
@@ -559,7 +559,7 @@ export namespace InferencePipelineListResponse {
559
559
  table: string | null;
560
560
  }
561
561
 
562
- export interface UnionMember3 {
562
+ export interface DatabricksDtlDataBackend {
563
563
  backendType: 'databricks_dtl';
564
564
 
565
565
  databricksDtlConnectionId: string | null;
@@ -567,7 +567,7 @@ export namespace InferencePipelineListResponse {
567
567
  tableId: string | null;
568
568
  }
569
569
 
570
- export interface UnionMember4 {
570
+ export interface RedshiftDataBackend {
571
571
  backendType: 'redshift';
572
572
 
573
573
  redshiftConnectionId: string | null;
@@ -577,7 +577,7 @@ export namespace InferencePipelineListResponse {
577
577
  tableName: string;
578
578
  }
579
579
 
580
- export interface UnionMember5 {
580
+ export interface PostgresDataBackend {
581
581
  backendType: 'postgres';
582
582
 
583
583
  database: string;
@@ -803,12 +803,12 @@ export interface InferencePipelineCreateParams {
803
803
  name: string;
804
804
 
805
805
  dataBackend?:
806
- | InferencePipelineCreateParams.UnionMember0
807
- | InferencePipelineCreateParams.BackendType
808
- | InferencePipelineCreateParams.UnionMember2
809
- | InferencePipelineCreateParams.UnionMember3
810
- | InferencePipelineCreateParams.UnionMember4
811
- | InferencePipelineCreateParams.UnionMember5
806
+ | InferencePipelineCreateParams.BigQueryDataBackend
807
+ | InferencePipelineCreateParams.DefaultDataBackend
808
+ | InferencePipelineCreateParams.SnowflakeDataBackend
809
+ | InferencePipelineCreateParams.DatabricksDtlDataBackend
810
+ | InferencePipelineCreateParams.RedshiftDataBackend
811
+ | InferencePipelineCreateParams.PostgresDataBackend
812
812
  | null;
813
813
 
814
814
  project?: InferencePipelineCreateParams.Project | null;
@@ -817,12 +817,12 @@ export interface InferencePipelineCreateParams {
817
817
  }
818
818
 
819
819
  export namespace InferencePipelineCreateParams {
820
- export interface UnionMember0 {
820
+ export interface BigQueryDataBackend {
821
821
  backendType: 'bigquery';
822
822
 
823
823
  bigqueryConnectionId: string | null;
824
824
 
825
- config: UnionMember0.Config;
825
+ config: BigQueryDataBackend.Config;
826
826
 
827
827
  datasetId: string;
828
828
 
@@ -833,7 +833,7 @@ export namespace InferencePipelineCreateParams {
833
833
  partitionType?: 'DAY' | 'MONTH' | 'YEAR' | null;
834
834
  }
835
835
 
836
- export namespace UnionMember0 {
836
+ export namespace BigQueryDataBackend {
837
837
  export interface Config {
838
838
  /**
839
839
  * Name of the column with the ground truths.
@@ -865,14 +865,14 @@ export namespace InferencePipelineCreateParams {
865
865
  }
866
866
  }
867
867
 
868
- export interface BackendType {
868
+ export interface DefaultDataBackend {
869
869
  backendType: 'default';
870
870
  }
871
871
 
872
- export interface UnionMember2 {
872
+ export interface SnowflakeDataBackend {
873
873
  backendType: 'snowflake';
874
874
 
875
- config: UnionMember2.Config;
875
+ config: SnowflakeDataBackend.Config;
876
876
 
877
877
  database: string;
878
878
 
@@ -883,7 +883,7 @@ export namespace InferencePipelineCreateParams {
883
883
  table: string | null;
884
884
  }
885
885
 
886
- export namespace UnionMember2 {
886
+ export namespace SnowflakeDataBackend {
887
887
  export interface Config {
888
888
  /**
889
889
  * Name of the column with the ground truths.
@@ -915,17 +915,17 @@ export namespace InferencePipelineCreateParams {
915
915
  }
916
916
  }
917
917
 
918
- export interface UnionMember3 {
918
+ export interface DatabricksDtlDataBackend {
919
919
  backendType: 'databricks_dtl';
920
920
 
921
- config: UnionMember3.Config;
921
+ config: DatabricksDtlDataBackend.Config;
922
922
 
923
923
  databricksDtlConnectionId: string | null;
924
924
 
925
925
  tableId: string | null;
926
926
  }
927
927
 
928
- export namespace UnionMember3 {
928
+ export namespace DatabricksDtlDataBackend {
929
929
  export interface Config {
930
930
  /**
931
931
  * Name of the column with the ground truths.
@@ -957,10 +957,10 @@ export namespace InferencePipelineCreateParams {
957
957
  }
958
958
  }
959
959
 
960
- export interface UnionMember4 {
960
+ export interface RedshiftDataBackend {
961
961
  backendType: 'redshift';
962
962
 
963
- config: UnionMember4.Config;
963
+ config: RedshiftDataBackend.Config;
964
964
 
965
965
  redshiftConnectionId: string | null;
966
966
 
@@ -969,7 +969,7 @@ export namespace InferencePipelineCreateParams {
969
969
  tableName: string;
970
970
  }
971
971
 
972
- export namespace UnionMember4 {
972
+ export namespace RedshiftDataBackend {
973
973
  export interface Config {
974
974
  /**
975
975
  * Name of the column with the ground truths.
@@ -1001,10 +1001,10 @@ export namespace InferencePipelineCreateParams {
1001
1001
  }
1002
1002
  }
1003
1003
 
1004
- export interface UnionMember5 {
1004
+ export interface PostgresDataBackend {
1005
1005
  backendType: 'postgres';
1006
1006
 
1007
- config: UnionMember5.Config;
1007
+ config: PostgresDataBackend.Config;
1008
1008
 
1009
1009
  database: string;
1010
1010
 
@@ -1015,7 +1015,7 @@ export namespace InferencePipelineCreateParams {
1015
1015
  table: string | null;
1016
1016
  }
1017
1017
 
1018
- export namespace UnionMember5 {
1018
+ export namespace PostgresDataBackend {
1019
1019
  export interface Config {
1020
1020
  /**
1021
1021
  * Name of the column with the ground truths.
@@ -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 { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class APIKeys extends APIResource {
9
+ /**
10
+ * Create a new API key in a workspace.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const apiKey = await client.workspaces.apiKeys.create(
15
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
16
+ * );
17
+ * ```
18
+ */
19
+ create(
20
+ workspaceID: string,
21
+ body: APIKeyCreateParams | null | undefined = {},
22
+ options?: RequestOptions,
23
+ ): APIPromise<APIKeyCreateResponse> {
24
+ return this._client.post(path`/workspaces/${workspaceID}/api-keys`, { body, ...options });
25
+ }
26
+ }
27
+
28
+ export interface APIKeyCreateResponse {
29
+ /**
30
+ * The API key id.
31
+ */
32
+ id: string;
33
+
34
+ /**
35
+ * The API key creation date.
36
+ */
37
+ dateCreated: string;
38
+
39
+ /**
40
+ * The API key last use date.
41
+ */
42
+ dateLastUsed: string | null;
43
+
44
+ /**
45
+ * The API key last update date.
46
+ */
47
+ dateUpdated: string;
48
+
49
+ /**
50
+ * The API key value.
51
+ */
52
+ secureKey: string;
53
+
54
+ /**
55
+ * The API key name.
56
+ */
57
+ name?: string | null;
58
+ }
59
+
60
+ export interface APIKeyCreateParams {
61
+ /**
62
+ * The API key name.
63
+ */
64
+ name?: string | null;
65
+ }
66
+
67
+ export declare namespace APIKeys {
68
+ export { type APIKeyCreateResponse as APIKeyCreateResponse, type APIKeyCreateParams as APIKeyCreateParams };
69
+ }
@@ -0,0 +1,16 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { APIKeys, type APIKeyCreateResponse, type APIKeyCreateParams } from './api-keys';
4
+ export {
5
+ Invites,
6
+ type InviteCreateResponse,
7
+ type InviteListResponse,
8
+ type InviteCreateParams,
9
+ type InviteListParams,
10
+ } from './invites';
11
+ export {
12
+ Workspaces,
13
+ type WorkspaceRetrieveResponse,
14
+ type WorkspaceUpdateResponse,
15
+ type WorkspaceUpdateParams,
16
+ } from './workspaces';
@@ -0,0 +1,210 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class Invites extends APIResource {
9
+ /**
10
+ * Invite users to a workspace.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const invite = await client.workspaces.invites.create(
15
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
16
+ * );
17
+ * ```
18
+ */
19
+ create(
20
+ workspaceID: string,
21
+ body: InviteCreateParams | null | undefined = {},
22
+ options?: RequestOptions,
23
+ ): APIPromise<InviteCreateResponse> {
24
+ return this._client.post(path`/workspaces/${workspaceID}/invites`, { body, ...options });
25
+ }
26
+
27
+ /**
28
+ * Retrieve a list of invites in a workspace.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * const invites = await client.workspaces.invites.list(
33
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
34
+ * );
35
+ * ```
36
+ */
37
+ list(
38
+ workspaceID: string,
39
+ query: InviteListParams | null | undefined = {},
40
+ options?: RequestOptions,
41
+ ): APIPromise<InviteListResponse> {
42
+ return this._client.get(path`/workspaces/${workspaceID}/invites`, { query, ...options });
43
+ }
44
+ }
45
+
46
+ export interface InviteCreateResponse {
47
+ items: Array<InviteCreateResponse.Item>;
48
+ }
49
+
50
+ export namespace InviteCreateResponse {
51
+ export interface Item {
52
+ /**
53
+ * The invite id.
54
+ */
55
+ id: string;
56
+
57
+ creator: Item.Creator;
58
+
59
+ /**
60
+ * The invite creation date.
61
+ */
62
+ dateCreated: string;
63
+
64
+ /**
65
+ * The invite email.
66
+ */
67
+ email: string;
68
+
69
+ /**
70
+ * The invite role.
71
+ */
72
+ role: 'ADMIN' | 'MEMBER' | 'VIEWER';
73
+
74
+ /**
75
+ * The invite status.
76
+ */
77
+ status: 'accepted' | 'pending';
78
+
79
+ workspace: Item.Workspace;
80
+ }
81
+
82
+ export namespace Item {
83
+ export interface Creator {
84
+ /**
85
+ * The invite creator id.
86
+ */
87
+ id?: string;
88
+
89
+ /**
90
+ * The invite creator name.
91
+ */
92
+ name?: string | null;
93
+
94
+ /**
95
+ * The invite creator username.
96
+ */
97
+ username?: string | null;
98
+ }
99
+
100
+ export interface Workspace {
101
+ id: string;
102
+
103
+ dateCreated: string;
104
+
105
+ memberCount: number;
106
+
107
+ name: string;
108
+
109
+ slug: string;
110
+ }
111
+ }
112
+ }
113
+
114
+ export interface InviteListResponse {
115
+ items: Array<InviteListResponse.Item>;
116
+ }
117
+
118
+ export namespace InviteListResponse {
119
+ export interface Item {
120
+ /**
121
+ * The invite id.
122
+ */
123
+ id: string;
124
+
125
+ creator: Item.Creator;
126
+
127
+ /**
128
+ * The invite creation date.
129
+ */
130
+ dateCreated: string;
131
+
132
+ /**
133
+ * The invite email.
134
+ */
135
+ email: string;
136
+
137
+ /**
138
+ * The invite role.
139
+ */
140
+ role: 'ADMIN' | 'MEMBER' | 'VIEWER';
141
+
142
+ /**
143
+ * The invite status.
144
+ */
145
+ status: 'accepted' | 'pending';
146
+
147
+ workspace: Item.Workspace;
148
+ }
149
+
150
+ export namespace Item {
151
+ export interface Creator {
152
+ /**
153
+ * The invite creator id.
154
+ */
155
+ id?: string;
156
+
157
+ /**
158
+ * The invite creator name.
159
+ */
160
+ name?: string | null;
161
+
162
+ /**
163
+ * The invite creator username.
164
+ */
165
+ username?: string | null;
166
+ }
167
+
168
+ export interface Workspace {
169
+ id: string;
170
+
171
+ dateCreated: string;
172
+
173
+ memberCount: number;
174
+
175
+ name: string;
176
+
177
+ slug: string;
178
+ }
179
+ }
180
+ }
181
+
182
+ export interface InviteCreateParams {
183
+ emails?: Array<string>;
184
+
185
+ /**
186
+ * The member role.
187
+ */
188
+ role?: 'ADMIN' | 'MEMBER' | 'VIEWER';
189
+ }
190
+
191
+ export interface InviteListParams {
192
+ /**
193
+ * The page to return in a paginated query.
194
+ */
195
+ page?: number;
196
+
197
+ /**
198
+ * Maximum number of items to return per page.
199
+ */
200
+ perPage?: number;
201
+ }
202
+
203
+ export declare namespace Invites {
204
+ export {
205
+ type InviteCreateResponse as InviteCreateResponse,
206
+ type InviteListResponse as InviteListResponse,
207
+ type InviteCreateParams as InviteCreateParams,
208
+ type InviteListParams as InviteListParams,
209
+ };
210
+ }