@relevanceai/sdk 1.40.0 → 1.41.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.
@@ -62,6 +62,14 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
62
62
  options
63
63
  });
64
64
  }
65
+ async CreateProject(input, options) {
66
+ return this.SendRequest({
67
+ input,
68
+ method: 'post',
69
+ path: '/projects/create',
70
+ options
71
+ });
72
+ }
65
73
  async UpdateProject(input, options) {
66
74
  return this.SendRequest({
67
75
  input,
@@ -814,6 +822,14 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
814
822
  options
815
823
  });
816
824
  }
825
+ async UpsertWorkflowStatus(input, options) {
826
+ return this.SendRequest({
827
+ input,
828
+ method: 'post',
829
+ path: '/workflows/{workflow_id}/status',
830
+ options
831
+ });
832
+ }
817
833
  async DeleteFieldChildren(input, options) {
818
834
  return this.SendRequest({
819
835
  input,
@@ -826,7 +842,7 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
826
842
  return this.SendRequest({
827
843
  input,
828
844
  method: 'post',
829
- path: '/datasets/{dataset_id}/field_children/{fieldchildren_id}/list',
845
+ path: '/datasets/{dataset_id}/field_children/list',
830
846
  options
831
847
  });
832
848
  }
@@ -850,7 +866,7 @@ class DiscoveryApiClient extends BaseClient_1._GenericClient {
850
866
  return this.SendRequest({
851
867
  input,
852
868
  method: 'post',
853
- path: '/workflows/favourites/{favouriteworkflow_id}/list',
869
+ path: '/workflows/favourites/list',
854
870
  options
855
871
  });
856
872
  }
@@ -150,6 +150,18 @@ var DiscoveryApiClient = /** @class */ (function (_super) {
150
150
  });
151
151
  });
152
152
  };
153
+ DiscoveryApiClient.prototype.CreateProject = function (input, options) {
154
+ return __awaiter(this, void 0, void 0, function () {
155
+ return __generator(this, function (_a) {
156
+ return [2 /*return*/, this.SendRequest({
157
+ input: input,
158
+ method: 'post',
159
+ path: '/projects/create',
160
+ options: options
161
+ })];
162
+ });
163
+ });
164
+ };
153
165
  DiscoveryApiClient.prototype.UpdateProject = function (input, options) {
154
166
  return __awaiter(this, void 0, void 0, function () {
155
167
  return __generator(this, function (_a) {
@@ -1278,6 +1290,18 @@ var DiscoveryApiClient = /** @class */ (function (_super) {
1278
1290
  });
1279
1291
  });
1280
1292
  };
1293
+ DiscoveryApiClient.prototype.UpsertWorkflowStatus = function (input, options) {
1294
+ return __awaiter(this, void 0, void 0, function () {
1295
+ return __generator(this, function (_a) {
1296
+ return [2 /*return*/, this.SendRequest({
1297
+ input: input,
1298
+ method: 'post',
1299
+ path: '/workflows/{workflow_id}/status',
1300
+ options: options
1301
+ })];
1302
+ });
1303
+ });
1304
+ };
1281
1305
  DiscoveryApiClient.prototype.DeleteFieldChildren = function (input, options) {
1282
1306
  return __awaiter(this, void 0, void 0, function () {
1283
1307
  return __generator(this, function (_a) {
@@ -1296,7 +1320,7 @@ var DiscoveryApiClient = /** @class */ (function (_super) {
1296
1320
  return [2 /*return*/, this.SendRequest({
1297
1321
  input: input,
1298
1322
  method: 'post',
1299
- path: '/datasets/{dataset_id}/field_children/{fieldchildren_id}/list',
1323
+ path: '/datasets/{dataset_id}/field_children/list',
1300
1324
  options: options
1301
1325
  })];
1302
1326
  });
@@ -1332,7 +1356,7 @@ var DiscoveryApiClient = /** @class */ (function (_super) {
1332
1356
  return [2 /*return*/, this.SendRequest({
1333
1357
  input: input,
1334
1358
  method: 'post',
1335
- path: '/workflows/favourites/{favouriteworkflow_id}/list',
1359
+ path: '/workflows/favourites/list',
1336
1360
  options: options
1337
1361
  })];
1338
1362
  });
@@ -14,6 +14,8 @@ export declare type DeleteDeployableKeyInput = operations['DeleteDeployableKey']
14
14
  export declare type DeleteDeployableKeyOutput = operations['DeleteDeployableKey']['responses']['200']['content']['application/json'];
15
15
  export declare type ListDeployablesInput = {};
16
16
  export declare type ListDeployablesOutput = operations['ListDeployables']['responses']['200']['content']['application/json'];
17
+ export declare type CreateProjectInput = operations['CreateProject']['requestBody']['content']['application/json'];
18
+ export declare type CreateProjectOutput = operations['CreateProject']['responses']['200']['content']['application/json'];
17
19
  export declare type UpdateProjectInput = operations['UpdateProject']['requestBody']['content']['application/json'];
18
20
  export declare type UpdateProjectOutput = operations['UpdateProject']['responses']['200']['content']['application/json'];
19
21
  export declare type TransferProjectToOrganizationInput = operations['TransferProjectToOrganization']['requestBody']['content']['application/json'];
@@ -202,6 +204,8 @@ export declare type DeleteWorkflowStatusInput = operations['DeleteWorkflowStatus
202
204
  export declare type DeleteWorkflowStatusOutput = operations['DeleteWorkflowStatus']['responses']['200']['content']['application/json'];
203
205
  export declare type UpsertWorkflowMetadataInput = operations['UpsertWorkflowMetadata']['requestBody']['content']['application/json'];
204
206
  export declare type UpsertWorkflowMetadataOutput = operations['UpsertWorkflowMetadata']['responses']['200']['content']['application/json'];
207
+ export declare type UpsertWorkflowStatusInput = operations['UpsertWorkflowStatus']['requestBody']['content']['application/json'];
208
+ export declare type UpsertWorkflowStatusOutput = operations['UpsertWorkflowStatus']['responses']['200']['content']['application/json'];
205
209
  export declare type DeleteFieldChildrenInput = operations['DeleteFieldChildren']['requestBody']['content']['application/json'];
206
210
  export declare type DeleteFieldChildrenOutput = operations['DeleteFieldChildren']['responses']['200']['content']['application/json'];
207
211
  export declare type ListFieldChildrensInput = operations['ListFieldChildrens']['requestBody']['content']['application/json'];
@@ -223,6 +227,7 @@ export declare class DiscoveryApiClient extends _GenericClient {
223
227
  CreateDeployableKey(input: CommandInput<CreateDeployableKeyInput>, options?: _GenericMethodOptions): Promise<CommandOutput<CreateDeployableKeyOutput>>;
224
228
  DeleteDeployableKey(input: CommandInput<DeleteDeployableKeyInput>, options?: _GenericMethodOptions): Promise<CommandOutput<DeleteDeployableKeyOutput>>;
225
229
  ListDeployables(input: CommandInput<ListDeployablesInput>, options?: _GenericMethodOptions): Promise<CommandOutput<ListDeployablesOutput>>;
230
+ CreateProject(input: CommandInput<CreateProjectInput>, options?: _GenericMethodOptions): Promise<CommandOutput<CreateProjectOutput>>;
226
231
  UpdateProject(input: CommandInput<UpdateProjectInput>, options?: _GenericMethodOptions): Promise<CommandOutput<UpdateProjectOutput>>;
227
232
  TransferProjectToOrganization(input: CommandInput<TransferProjectToOrganizationInput>, options?: _GenericMethodOptions): Promise<CommandOutput<TransferProjectToOrganizationOutput>>;
228
233
  ListProjects(input: CommandInput<ListProjectsInput>, options?: _GenericMethodOptions): Promise<CommandOutput<ListProjectsOutput>>;
@@ -317,6 +322,7 @@ export declare class DiscoveryApiClient extends _GenericClient {
317
322
  GetWorkflowStatus(input: CommandInput<GetWorkflowStatusInput>, options?: _GenericMethodOptions): Promise<CommandOutput<GetWorkflowStatusOutput>>;
318
323
  DeleteWorkflowStatus(input: CommandInput<DeleteWorkflowStatusInput>, options?: _GenericMethodOptions): Promise<CommandOutput<DeleteWorkflowStatusOutput>>;
319
324
  UpsertWorkflowMetadata(input: CommandInput<UpsertWorkflowMetadataInput>, options?: _GenericMethodOptions): Promise<CommandOutput<UpsertWorkflowMetadataOutput>>;
325
+ UpsertWorkflowStatus(input: CommandInput<UpsertWorkflowStatusInput>, options?: _GenericMethodOptions): Promise<CommandOutput<UpsertWorkflowStatusOutput>>;
320
326
  DeleteFieldChildren(input: CommandInput<DeleteFieldChildrenInput>, options?: _GenericMethodOptions): Promise<CommandOutput<DeleteFieldChildrenOutput>>;
321
327
  ListFieldChildrens(input: CommandInput<ListFieldChildrensInput>, options?: _GenericMethodOptions): Promise<CommandOutput<ListFieldChildrensOutput>>;
322
328
  UpdateFieldChildren(input: CommandInput<UpdateFieldChildrenInput>, options?: _GenericMethodOptions): Promise<CommandOutput<UpdateFieldChildrenOutput>>;
@@ -33,6 +33,10 @@ export interface paths {
33
33
  /** List all deployables. */
34
34
  get: operations["ListDeployables"];
35
35
  };
36
+ "/projects/create": {
37
+ /** Create a new Project that your user will have access to */
38
+ post: operations["CreateProject"];
39
+ };
36
40
  "/projects/update": {
37
41
  /** Update metadata of a Project */
38
42
  post: operations["UpdateProject"];
@@ -530,10 +534,14 @@ export interface paths {
530
534
  /** Update metadata for a workflow run */
531
535
  post: operations["UpsertWorkflowMetadata"];
532
536
  };
537
+ "/workflows/{workflow_id}/status": {
538
+ /** Update status for a workflow run */
539
+ post: operations["UpsertWorkflowStatus"];
540
+ };
533
541
  "/datasets/{dataset_id}/field_children/{fieldchildren_id}/delete": {
534
542
  post: operations["DeleteFieldChildren"];
535
543
  };
536
- "/datasets/{dataset_id}/field_children/{fieldchildren_id}/list": {
544
+ "/datasets/{dataset_id}/field_children/list": {
537
545
  post: operations["ListFieldChildrens"];
538
546
  };
539
547
  "/datasets/{dataset_id}/field_children/{fieldchildren_id}/update": {
@@ -542,7 +550,7 @@ export interface paths {
542
550
  "/workflows/favourites/{favouriteworkflow_id}/delete": {
543
551
  post: operations["DeleteFavouriteWorkflow"];
544
552
  };
545
- "/workflows/favourites/{favouriteworkflow_id}/list": {
553
+ "/workflows/favourites/list": {
546
554
  post: operations["ListFavouriteWorkflows"];
547
555
  };
548
556
  "/workflows/favourites/{favouriteworkflow_id}/update": {
@@ -632,6 +640,15 @@ export interface components {
632
640
  }[];
633
641
  count: number;
634
642
  };
643
+ CreateProjectInput: {
644
+ /** @description The name of the project */
645
+ name?: string;
646
+ /** @description The description of the project */
647
+ description?: string;
648
+ };
649
+ CreateProjectOutput: {
650
+ project_id: string;
651
+ };
635
652
  UpdateProjectInput: {
636
653
  /** @description The name of the project */
637
654
  name?: string;
@@ -690,6 +707,8 @@ export interface components {
690
707
  last_name?: string;
691
708
  role?: string;
692
709
  company?: string;
710
+ label?: string;
711
+ notes?: string;
693
712
  permissions?: components["schemas"]["permissions"];
694
713
  organization_permissions?: {
695
714
  [key: string]: components["schemas"]["permissions"];
@@ -710,6 +729,29 @@ export interface components {
710
729
  page?: number;
711
730
  /** @default 20 */
712
731
  page_size?: number;
732
+ required_permissions?: {
733
+ items: {
734
+ [key: string]: {
735
+ resources?: {
736
+ datasets?: {
737
+ [key: string]: boolean;
738
+ };
739
+ deployables?: {
740
+ [key: string]: boolean;
741
+ };
742
+ users?: {
743
+ [key: string]: boolean;
744
+ };
745
+ workflows?: {
746
+ [key: string]: boolean;
747
+ };
748
+ };
749
+ actions?: {
750
+ [key: string]: boolean;
751
+ };
752
+ };
753
+ };
754
+ };
713
755
  };
714
756
  ListUsersOutput: {
715
757
  results: {
@@ -719,6 +761,8 @@ export interface components {
719
761
  last_name?: string;
720
762
  role?: string;
721
763
  company?: string;
764
+ label?: string;
765
+ notes?: string;
722
766
  permissions: {
723
767
  projects: {
724
768
  [key: string]: {
@@ -847,6 +891,8 @@ export interface components {
847
891
  last_name?: string;
848
892
  role?: string;
849
893
  company?: string;
894
+ label?: string;
895
+ notes?: string;
850
896
  user_id: string;
851
897
  key_id: string;
852
898
  permissions: components["schemas"]["fullUserPermissions"];
@@ -949,6 +995,8 @@ export interface components {
949
995
  last_name?: string;
950
996
  role?: string;
951
997
  company?: string;
998
+ label?: string;
999
+ notes?: string;
952
1000
  permissions: {
953
1001
  projects: {
954
1002
  [key: string]: {
@@ -1013,6 +1061,8 @@ export interface components {
1013
1061
  last_name?: string;
1014
1062
  role?: string;
1015
1063
  company?: string;
1064
+ label?: string;
1065
+ notes?: string;
1016
1066
  permissions?: components["schemas"]["permissions"];
1017
1067
  organization_permissions?: {
1018
1068
  [key: string]: components["schemas"]["permissions"];
@@ -3828,6 +3878,8 @@ export interface components {
3828
3878
  last_name?: string;
3829
3879
  role?: string;
3830
3880
  company?: string;
3881
+ label?: string;
3882
+ notes?: string;
3831
3883
  }[];
3832
3884
  };
3833
3885
  ListProjectsInOrganizationInput: unknown;
@@ -7338,17 +7390,20 @@ export interface components {
7338
7390
  };
7339
7391
  notebook_path: string;
7340
7392
  instance_type?: string;
7393
+ dataset_id?: string;
7341
7394
  };
7342
7395
  TriggerWorkflowOutput: {
7343
7396
  job_id: string;
7344
7397
  };
7345
7398
  ListWorkflowsInput: unknown;
7346
7399
  ListWorkflowsOutput: {
7347
- results: {
7400
+ results: ({
7348
7401
  job_status: "InProgress" | "Completed" | "Failed" | "Stopping" | "Stopped";
7349
7402
  job_message: string;
7350
7403
  creation_time: string;
7351
7404
  notebook_path?: string;
7405
+ dataset_id?: string;
7406
+ status?: string;
7352
7407
  params?: {
7353
7408
  [key: string]: unknown;
7354
7409
  };
@@ -7356,7 +7411,9 @@ export interface components {
7356
7411
  metadata?: {
7357
7412
  [key: string]: unknown;
7358
7413
  };
7359
- }[];
7414
+ } & {
7415
+ [key: string]: unknown;
7416
+ })[];
7360
7417
  };
7361
7418
  GetWorkflowStatusInput: unknown;
7362
7419
  GetWorkflowStatusOutput: {
@@ -7364,6 +7421,8 @@ export interface components {
7364
7421
  job_message: string;
7365
7422
  creation_time: string;
7366
7423
  notebook_path?: string;
7424
+ dataset_id?: string;
7425
+ status?: string;
7367
7426
  params?: {
7368
7427
  [key: string]: unknown;
7369
7428
  };
@@ -7371,6 +7430,8 @@ export interface components {
7371
7430
  metadata?: {
7372
7431
  [key: string]: unknown;
7373
7432
  };
7433
+ } & {
7434
+ [key: string]: unknown;
7374
7435
  };
7375
7436
  DeleteWorkflowStatusInput: unknown;
7376
7437
  DeleteWorkflowStatusOutput: unknown;
@@ -7381,6 +7442,19 @@ export interface components {
7381
7442
  };
7382
7443
  };
7383
7444
  UpsertWorkflowMetadataOutput: unknown;
7445
+ UpsertWorkflowStatusInput: {
7446
+ /** @description Metadata of the workflow. Can be an object including any information you want to store. */
7447
+ metadata?: {
7448
+ [key: string]: unknown;
7449
+ };
7450
+ /** @description Status of the workflow. Used for knowing when to send an email notification. */
7451
+ status: "complete" | "inprogress" | "failed";
7452
+ /** @description Workflow name that is passed into the email. */
7453
+ workflow_name?: string;
7454
+ /** @description Additional information of the workflow that is passed into the email. */
7455
+ additional_information?: string;
7456
+ };
7457
+ UpsertWorkflowStatusOutput: unknown;
7384
7458
  DeleteFieldChildrenInput: unknown;
7385
7459
  DeleteFieldChildrenOutput: unknown;
7386
7460
  ListFieldChildrensInput: {
@@ -7559,6 +7633,23 @@ export interface operations {
7559
7633
  };
7560
7634
  };
7561
7635
  };
7636
+ /** Create a new Project that your user will have access to */
7637
+ CreateProject: {
7638
+ parameters: {};
7639
+ responses: {
7640
+ /** successful operation */
7641
+ 200: {
7642
+ content: {
7643
+ "application/json": components["schemas"]["CreateProjectOutput"];
7644
+ };
7645
+ };
7646
+ };
7647
+ requestBody: {
7648
+ content: {
7649
+ "application/json": components["schemas"]["CreateProjectInput"];
7650
+ };
7651
+ };
7652
+ };
7562
7653
  /** Update metadata of a Project */
7563
7654
  UpdateProject: {
7564
7655
  parameters: {};
@@ -9795,6 +9886,28 @@ export interface operations {
9795
9886
  };
9796
9887
  };
9797
9888
  };
9889
+ /** Update status for a workflow run */
9890
+ UpsertWorkflowStatus: {
9891
+ parameters: {
9892
+ path: {
9893
+ /** ID of workflow */
9894
+ workflow_id: string;
9895
+ };
9896
+ };
9897
+ responses: {
9898
+ /** successful operation */
9899
+ 200: {
9900
+ content: {
9901
+ "application/json": components["schemas"]["UpsertWorkflowStatusOutput"];
9902
+ };
9903
+ };
9904
+ };
9905
+ requestBody: {
9906
+ content: {
9907
+ "application/json": components["schemas"]["UpsertWorkflowStatusInput"];
9908
+ };
9909
+ };
9910
+ };
9798
9911
  DeleteFieldChildren: {
9799
9912
  parameters: {
9800
9913
  path: {
@@ -9823,8 +9936,6 @@ export interface operations {
9823
9936
  path: {
9824
9937
  /** ID of dataset */
9825
9938
  dataset_id: string;
9826
- /** ID of fieldchildren */
9827
- fieldchildren_id: string;
9828
9939
  };
9829
9940
  };
9830
9941
  responses: {
@@ -9886,12 +9997,7 @@ export interface operations {
9886
9997
  };
9887
9998
  };
9888
9999
  ListFavouriteWorkflows: {
9889
- parameters: {
9890
- path: {
9891
- /** ID of favouriteworkflow */
9892
- favouriteworkflow_id: string;
9893
- };
9894
- };
10000
+ parameters: {};
9895
10001
  responses: {
9896
10002
  /** successful operation */
9897
10003
  200: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relevanceai/sdk",
3
- "version": "1.40.0",
3
+ "version": "1.41.0",
4
4
  "description": "Javascript client for RelevanceAI APIs. Browser, Node.js and typescript support.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "types": "./dist-types/index.d.ts",