@planqk/planqk-service-sdk 1.6.0 → 1.7.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/dist/sdk/api/resources/serviceApi/client/requests/StartExecutionRequest.d.ts +2 -0
- package/dist/sdk/api/resources/serviceApi/types/GetResultResponse.d.ts +1 -1
- package/dist/sdk/api/types/ArrayResponse.d.ts +4 -0
- package/dist/sdk/api/types/InputDataRef.d.ts +8 -0
- package/dist/sdk/api/types/InputParamsRef.d.ts +8 -0
- package/dist/sdk/api/types/InputParamsRef.js +5 -0
- package/dist/sdk/api/types/{ErrorResponse.d.ts → NumberResponse.d.ts} +1 -1
- package/dist/sdk/api/types/NumberResponse.js +5 -0
- package/dist/sdk/api/types/{ResultResponse.d.ts → ObjectResponse.d.ts} +1 -1
- package/dist/sdk/api/types/ObjectResponse.js +5 -0
- package/dist/sdk/api/types/StringResponse.d.ts +4 -0
- package/dist/sdk/api/types/StringResponse.js +5 -0
- package/dist/sdk/api/types/index.d.ts +6 -2
- package/dist/sdk/api/types/index.js +6 -2
- package/package.json +1 -1
- package/src/sdk/api/resources/serviceApi/client/requests/StartExecutionRequest.ts +2 -0
- package/src/sdk/api/resources/serviceApi/types/GetResultResponse.ts +5 -1
- package/src/sdk/api/types/ArrayResponse.ts +5 -0
- package/src/sdk/api/types/InputDataRef.ts +9 -0
- package/src/sdk/api/types/InputParamsRef.ts +9 -0
- package/src/sdk/api/types/{ErrorResponse.ts → NumberResponse.ts} +1 -1
- package/src/sdk/api/types/{ResultResponse.ts → ObjectResponse.ts} +1 -1
- package/src/sdk/api/types/StringResponse.ts +5 -0
- package/src/sdk/api/types/index.ts +6 -2
- package/tests/integration.test.ts +29 -1
- /package/dist/sdk/api/types/{ErrorResponse.js → ArrayResponse.js} +0 -0
- /package/dist/sdk/api/types/{ResultResponse.js → InputDataRef.js} +0 -0
|
@@ -8,5 +8,7 @@ import * as PlanqkServiceApi from "../../../..";
|
|
|
8
8
|
*/
|
|
9
9
|
export interface StartExecutionRequest {
|
|
10
10
|
data?: PlanqkServiceApi.InputData;
|
|
11
|
+
dataRef?: PlanqkServiceApi.InputDataRef;
|
|
11
12
|
params?: PlanqkServiceApi.InputParams;
|
|
13
|
+
paramsRef?: PlanqkServiceApi.InputParamsRef;
|
|
12
14
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as PlanqkServiceApi from "../../..";
|
|
5
|
-
export type GetResultResponse = PlanqkServiceApi.
|
|
5
|
+
export type GetResultResponse = PlanqkServiceApi.ObjectResponse | PlanqkServiceApi.StringResponse | PlanqkServiceApi.NumberResponse | PlanqkServiceApi.ArrayResponse;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export * from "./InputData";
|
|
2
|
+
export * from "./InputDataRef";
|
|
2
3
|
export * from "./InputParams";
|
|
4
|
+
export * from "./InputParamsRef";
|
|
3
5
|
export * from "./InterimResultResponse";
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
+
export * from "./ObjectResponse";
|
|
7
|
+
export * from "./StringResponse";
|
|
8
|
+
export * from "./NumberResponse";
|
|
9
|
+
export * from "./ArrayResponse";
|
|
6
10
|
export * from "./JobStatus";
|
|
7
11
|
export * from "./Job";
|
|
@@ -15,9 +15,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./InputData"), exports);
|
|
18
|
+
__exportStar(require("./InputDataRef"), exports);
|
|
18
19
|
__exportStar(require("./InputParams"), exports);
|
|
20
|
+
__exportStar(require("./InputParamsRef"), exports);
|
|
19
21
|
__exportStar(require("./InterimResultResponse"), exports);
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
+
__exportStar(require("./ObjectResponse"), exports);
|
|
23
|
+
__exportStar(require("./StringResponse"), exports);
|
|
24
|
+
__exportStar(require("./NumberResponse"), exports);
|
|
25
|
+
__exportStar(require("./ArrayResponse"), exports);
|
|
22
26
|
__exportStar(require("./JobStatus"), exports);
|
|
23
27
|
__exportStar(require("./Job"), exports);
|
package/package.json
CHANGED
|
@@ -10,5 +10,7 @@ import * as PlanqkServiceApi from "../../../..";
|
|
|
10
10
|
*/
|
|
11
11
|
export interface StartExecutionRequest {
|
|
12
12
|
data?: PlanqkServiceApi.InputData;
|
|
13
|
+
dataRef?: PlanqkServiceApi.InputDataRef;
|
|
13
14
|
params?: PlanqkServiceApi.InputParams;
|
|
15
|
+
paramsRef?: PlanqkServiceApi.InputParamsRef;
|
|
14
16
|
}
|
|
@@ -4,4 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as PlanqkServiceApi from "../../..";
|
|
6
6
|
|
|
7
|
-
export type GetResultResponse =
|
|
7
|
+
export type GetResultResponse =
|
|
8
|
+
| PlanqkServiceApi.ObjectResponse
|
|
9
|
+
| PlanqkServiceApi.StringResponse
|
|
10
|
+
| PlanqkServiceApi.NumberResponse
|
|
11
|
+
| PlanqkServiceApi.ArrayResponse;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export * from "./InputData";
|
|
2
|
+
export * from "./InputDataRef";
|
|
2
3
|
export * from "./InputParams";
|
|
4
|
+
export * from "./InputParamsRef";
|
|
3
5
|
export * from "./InterimResultResponse";
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
+
export * from "./ObjectResponse";
|
|
7
|
+
export * from "./StringResponse";
|
|
8
|
+
export * from "./NumberResponse";
|
|
9
|
+
export * from "./ArrayResponse";
|
|
6
10
|
export * from "./JobStatus";
|
|
7
11
|
export * from "./Job";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {PlanqkServiceAuth, PlanqkServiceClient} from '../src'
|
|
2
2
|
import {PlanqkServiceApiClient} from '../src/sdk'
|
|
3
|
-
import {JobStatus} from '../src/sdk/api'
|
|
3
|
+
import {JobStatus, StartExecutionRequest} from '../src/sdk/api'
|
|
4
4
|
import {complexInput} from './fixtures/complex-input'
|
|
5
5
|
|
|
6
6
|
const serviceEndpoint = process.env.SERVICE_ENDPOINT
|
|
@@ -59,3 +59,31 @@ test('should use client abstraction', async () => {
|
|
|
59
59
|
job = await client.getStatus(job.id!)
|
|
60
60
|
expect(job.status).toBe(JobStatus.Succeeded)
|
|
61
61
|
}, 5 * 60 * 1000)
|
|
62
|
+
|
|
63
|
+
test('should execute with data pool ref', async () => {
|
|
64
|
+
const client = new PlanqkServiceClient(serviceEndpoint, consumerKey, consumerSecret)
|
|
65
|
+
|
|
66
|
+
const health = await client.healthCheck()
|
|
67
|
+
expect(health.status).toBe('Service is up and running')
|
|
68
|
+
|
|
69
|
+
const request: StartExecutionRequest = {
|
|
70
|
+
dataRef: {
|
|
71
|
+
dataPoolId: 'e3859bb2-1959-4d3d-852b-62ee81b28a72',
|
|
72
|
+
dataSourceDescriptorId: '1c8d341e-1c86-4e19-acae-2f84bcab55ca',
|
|
73
|
+
fileId: 'f5251675-49c6-49f3-a3a6-de75b8335d76',
|
|
74
|
+
},
|
|
75
|
+
params: {},
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
let job = await client.startExecution(request)
|
|
79
|
+
expect(job.id).toBeDefined()
|
|
80
|
+
expect(job.status).toBe(JobStatus.Pending)
|
|
81
|
+
|
|
82
|
+
job = await client.getStatus(job.id!)
|
|
83
|
+
|
|
84
|
+
const result = await client.getResult(job.id!)
|
|
85
|
+
expect(result).toBeDefined()
|
|
86
|
+
|
|
87
|
+
job = await client.getStatus(job.id!)
|
|
88
|
+
expect(job.status).toBe(JobStatus.Succeeded)
|
|
89
|
+
}, 5 * 60 * 1000)
|
|
File without changes
|
|
File without changes
|