@stack-spot/portal-network 0.193.0-alpha.1 → 0.194.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 +14 -0
- package/dist/api/cloudPlatform.d.ts +6 -0
- package/dist/api/cloudPlatform.d.ts.map +1 -1
- package/dist/api/cloudPlatform.js +9 -0
- package/dist/api/cloudPlatform.js.map +1 -1
- package/dist/apis-itau.json +0 -8
- package/dist/apis.json +0 -8
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +93 -13
- package/dist/client/ai.js.map +1 -1
- package/dist/client/cloud-platform.d.ts +83 -4
- package/dist/client/cloud-platform.d.ts.map +1 -1
- package/dist/client/cloud-platform.js +77 -5
- package/dist/client/cloud-platform.js.map +1 -1
- package/dist/client/types.d.ts +25 -5
- package/dist/client/types.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/cloudPlatform.ts +17 -0
- package/src/apis-itau.json +0 -8
- package/src/apis.json +0 -8
- package/src/client/ai.ts +94 -12
- package/src/client/cloud-platform.ts +44 -4
- package/src/client/types.ts +26 -5
- package/src/index.ts +0 -1
- package/dist/api/codeGen.d.ts +0 -51
- package/dist/api/codeGen.d.ts.map +0 -1
- package/dist/api/codeGen.js +0 -49
- package/dist/api/codeGen.js.map +0 -1
- package/dist/client/code-gen.d.ts +0 -14
- package/dist/client/code-gen.d.ts.map +0 -1
- package/dist/client/code-gen.js +0 -35
- package/dist/client/code-gen.js.map +0 -1
- package/src/api/codeGen.ts +0 -92
- package/src/client/code-gen.ts +0 -45
package/src/index.ts
CHANGED
|
@@ -21,7 +21,6 @@ export { insightsClient } from './client/insights'
|
|
|
21
21
|
export { notificationClient } from './client/notification'
|
|
22
22
|
export { runtimeManagerClient } from './client/runtime-manager'
|
|
23
23
|
export { secretsClient } from './client/secrets'
|
|
24
|
-
export { codeGenClient } from './client/code-gen'
|
|
25
24
|
export * from './client/types'
|
|
26
25
|
export { workflowClient } from './client/workflow'
|
|
27
26
|
export { workspaceClient } from './client/workspace'
|
package/dist/api/codeGen.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FastAPI
|
|
3
|
-
* 0.1.0
|
|
4
|
-
* DO NOT MODIFY - This file has been generated using oazapfts.
|
|
5
|
-
* See https://www.npmjs.com/package/oazapfts
|
|
6
|
-
*/
|
|
7
|
-
import * as Oazapfts from "@oazapfts/runtime";
|
|
8
|
-
export declare const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders>;
|
|
9
|
-
export declare const servers: {};
|
|
10
|
-
export type TaskCreateRequest = {
|
|
11
|
-
repo_url: string;
|
|
12
|
-
prompt: string;
|
|
13
|
-
};
|
|
14
|
-
export type TaskStatus = "received" | "vm_requested" | "in_progress" | "completed" | "error";
|
|
15
|
-
export type TaskResponse = {
|
|
16
|
-
id: string;
|
|
17
|
-
repo_url: string;
|
|
18
|
-
prompt: string;
|
|
19
|
-
status: TaskStatus;
|
|
20
|
-
};
|
|
21
|
-
export type ValidationError = {
|
|
22
|
-
loc: (string | number)[];
|
|
23
|
-
msg: string;
|
|
24
|
-
"type": string;
|
|
25
|
-
};
|
|
26
|
-
export type HttpValidationError = {
|
|
27
|
-
detail?: ValidationError[];
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Read Healthz
|
|
31
|
-
*/
|
|
32
|
-
export declare function readHealthzHealthzGet(opts?: Oazapfts.RequestOpts): Promise<{
|
|
33
|
-
[key: string]: string;
|
|
34
|
-
}>;
|
|
35
|
-
/**
|
|
36
|
-
* Create Task
|
|
37
|
-
*/
|
|
38
|
-
export declare function createTaskV1TasksPost({ taskCreateRequest }: {
|
|
39
|
-
taskCreateRequest: TaskCreateRequest;
|
|
40
|
-
}, opts?: Oazapfts.RequestOpts): Promise<TaskResponse>;
|
|
41
|
-
/**
|
|
42
|
-
* Perform Task Action
|
|
43
|
-
*/
|
|
44
|
-
export declare function performTaskActionV1TasksTaskIdActionsPost(opts?: Oazapfts.RequestOpts): Promise<any>;
|
|
45
|
-
/**
|
|
46
|
-
* Sse Endpoint
|
|
47
|
-
*/
|
|
48
|
-
export declare function sseEndpointV1SseTasksTaskIdUpdatesGet({ taskId }: {
|
|
49
|
-
taskId: string;
|
|
50
|
-
}, opts?: Oazapfts.RequestOpts): Promise<any>;
|
|
51
|
-
//# sourceMappingURL=codeGen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeGen.d.ts","sourceRoot":"","sources":["../../src/api/codeGen.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAG9D,CAAC;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC;AAC1B,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,GAAG,WAAW,GAAG,OAAO,CAAC;AAC7F,MAAM,MAAM,YAAY,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,eAAe,GAAG;IAC1B,GAAG,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;CAC9B,CAAC;AACF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW;;GAShE;AACD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,iBAAiB,EAAE,EAAE;IACzD,iBAAiB,EAAE,iBAAiB,CAAC;CACxC,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,yBAY7B;AACD;;GAEG;AACH,wBAAgB,yCAAyC,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,gBAQpF;AACD;;GAEG;AACH,wBAAgB,qCAAqC,CAAC,EAAE,MAAM,EAAE,EAAE;IAC9D,MAAM,EAAE,MAAM,CAAC;CAClB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,gBAU7B"}
|
package/dist/api/codeGen.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FastAPI
|
|
3
|
-
* 0.1.0
|
|
4
|
-
* DO NOT MODIFY - This file has been generated using oazapfts.
|
|
5
|
-
* See https://www.npmjs.com/package/oazapfts
|
|
6
|
-
*/
|
|
7
|
-
import * as Oazapfts from "@oazapfts/runtime";
|
|
8
|
-
export const defaults = {
|
|
9
|
-
headers: {},
|
|
10
|
-
baseUrl: "/",
|
|
11
|
-
};
|
|
12
|
-
const oazapfts = Oazapfts.runtime(defaults);
|
|
13
|
-
export const servers = {};
|
|
14
|
-
/**
|
|
15
|
-
* Read Healthz
|
|
16
|
-
*/
|
|
17
|
-
export function readHealthzHealthzGet(opts) {
|
|
18
|
-
return oazapfts.ok(oazapfts.fetchJson("/healthz", {
|
|
19
|
-
...opts
|
|
20
|
-
}));
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Create Task
|
|
24
|
-
*/
|
|
25
|
-
export function createTaskV1TasksPost({ taskCreateRequest }, opts) {
|
|
26
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/tasks", oazapfts.json({
|
|
27
|
-
...opts,
|
|
28
|
-
method: "POST",
|
|
29
|
-
body: taskCreateRequest
|
|
30
|
-
})));
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Perform Task Action
|
|
34
|
-
*/
|
|
35
|
-
export function performTaskActionV1TasksTaskIdActionsPost(opts) {
|
|
36
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/tasks/${encodeURIComponent(taskId)}/actions`, {
|
|
37
|
-
...opts,
|
|
38
|
-
method: "POST"
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Sse Endpoint
|
|
43
|
-
*/
|
|
44
|
-
export function sseEndpointV1SseTasksTaskIdUpdatesGet({ taskId }, opts) {
|
|
45
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/sse/tasks/${encodeURIComponent(taskId)}/updates`, {
|
|
46
|
-
...opts
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=codeGen.js.map
|
package/dist/api/codeGen.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeGen.js","sourceRoot":"","sources":["../../src/api/codeGen.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,MAAM,QAAQ,GAA8C;IAC/D,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,GAAG;CACf,CAAC;AACF,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;AAoB1B;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAA2B;IAC7D,OAAO,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAKlC,UAAU,EAAE;QACX,GAAG,IAAI;KACV,CAAC,CAAC,CAAC;AACR,CAAC;AACD;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAE,iBAAiB,EAExD,EAAE,IAA2B;IAC1B,OAAO,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAMlC,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC;QAC1B,GAAG,IAAI;QACP,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,iBAAiB;KAC1B,CAAC,CAAC,CAAC,CAAC;AACT,CAAC;AACD;;GAEG;AACH,MAAM,UAAU,yCAAyC,CAAC,IAA2B;IACjF,OAAO,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAGlC,aAAa,kBAAkB,CAAC,MAAM,CAAC,UAAU,EAAE;QAClD,GAAG,IAAI;QACP,MAAM,EAAE,MAAM;KACjB,CAAC,CAAC,CAAC;AACR,CAAC;AACD;;GAEG;AACH,MAAM,UAAU,qCAAqC,CAAC,EAAE,MAAM,EAE7D,EAAE,IAA2B;IAC1B,OAAO,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAMlC,iBAAiB,kBAAkB,CAAC,MAAM,CAAC,UAAU,EAAE;QACtD,GAAG,IAAI;KACV,CAAC,CAAC,CAAC;AACR,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime';
|
|
2
|
-
import { StackspotAPIError } from '../error/StackspotAPIError.js';
|
|
3
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
4
|
-
declare class CodeGen extends ReactQueryNetworkClient {
|
|
5
|
-
constructor();
|
|
6
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError;
|
|
7
|
-
createTask: import("../network/types.js").MutationObject<{
|
|
8
|
-
taskCreateRequest: import("../api/codeGen.js").TaskCreateRequest;
|
|
9
|
-
}, import("../api/codeGen.js").TaskResponse>;
|
|
10
|
-
sseTask(taskId: string, minChangeIntervalMS?: number): any;
|
|
11
|
-
}
|
|
12
|
-
export declare const codeGenClient: CodeGen;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=code-gen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-gen.d.ts","sourceRoot":"","sources":["../../src/client/code-gen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAQ7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAG5E,cAAM,OAAQ,SAAQ,uBAAuB;;IAK3C,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAIlE,UAAU;;8CAAuC;IAEjD,OAAO,CAAC,MAAM,EAAC,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,GAAG;CAkB1D;AAED,eAAO,MAAM,aAAa,SAAgB,CAAA"}
|
package/dist/client/code-gen.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { getApiAddresses } from '../api-addresses.js';
|
|
2
|
-
import { createTaskV1TasksPost, defaults, } from '../api/codeGen.js';
|
|
3
|
-
import { DefaultAPIError } from '../error/DefaultAPIError.js';
|
|
4
|
-
import { codeShiftDictionary } from '../error/dictionary/code-shift.js';
|
|
5
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
6
|
-
import { StreamedJson } from '../utils/StreamedJson.js';
|
|
7
|
-
class CodeGen extends ReactQueryNetworkClient {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(getApiAddresses().codeGen.url, defaults);
|
|
10
|
-
Object.defineProperty(this, "createTask", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
writable: true,
|
|
14
|
-
value: this.mutation(createTaskV1TasksPost)
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
buildStackSpotError(error) {
|
|
18
|
-
return new DefaultAPIError(error.data, error.status, codeShiftDictionary, error.headers);
|
|
19
|
-
}
|
|
20
|
-
sseTask(taskId, minChangeIntervalMS) {
|
|
21
|
-
const abortController = new AbortController();
|
|
22
|
-
const headers = {
|
|
23
|
-
'Content-Type': 'application/json',
|
|
24
|
-
'Accept': 'text/event-stream',
|
|
25
|
-
};
|
|
26
|
-
const events = this.stream(this.resolveURL(`/v1/sse/tasks/${taskId}/updates`), { method: 'get', headers, signal: abortController.signal });
|
|
27
|
-
return new StreamedJson({
|
|
28
|
-
eventsPromise: events,
|
|
29
|
-
abortController,
|
|
30
|
-
minChangeIntervalMS,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
export const codeGenClient = new CodeGen();
|
|
35
|
-
//# sourceMappingURL=code-gen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-gen.js","sourceRoot":"","sources":["../../src/client/code-gen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EACL,qBAAqB,EACrB,QAAQ,GACT,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,MAAM,OAAQ,SAAQ,uBAAuB;IAC3C;QACE,KAAK,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QAOhD;;;;mBAAa,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC;WAAA;IANjD,CAAC;IAES,mBAAmB,CAAC,KAAgB;QAC5C,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAC1F,CAAC;IAID,OAAO,CAAC,MAAa,EAAE,mBAA4B;QACjD,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAA;QAC7C,MAAM,OAAO,GAAG;YACd,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,mBAAmB;SAC9B,CAAA;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CACxB,IAAI,CAAC,UAAU,CAAC,iBAAiB,MAAM,UAAU,CAAC,EAClD,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,CAAC,MAAM,EAAE,CAC3D,CAAA;QAED,OAAO,IAAI,YAAY,CAAC;YACtB,aAAa,EAAE,MAAM;YACrB,eAAe;YACf,mBAAmB;SACpB,CAAC,CAAA;IACJ,CAAC;CAEF;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,EAAE,CAAA"}
|
package/src/api/codeGen.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FastAPI
|
|
3
|
-
* 0.1.0
|
|
4
|
-
* DO NOT MODIFY - This file has been generated using oazapfts.
|
|
5
|
-
* See https://www.npmjs.com/package/oazapfts
|
|
6
|
-
*/
|
|
7
|
-
import * as Oazapfts from "@oazapfts/runtime";
|
|
8
|
-
import * as QS from "@oazapfts/runtime/query";
|
|
9
|
-
export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
|
|
10
|
-
headers: {},
|
|
11
|
-
baseUrl: "/",
|
|
12
|
-
};
|
|
13
|
-
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
|
-
export const servers = {};
|
|
15
|
-
export type TaskCreateRequest = {
|
|
16
|
-
repo_url: string;
|
|
17
|
-
prompt: string;
|
|
18
|
-
};
|
|
19
|
-
export type TaskStatus = "received" | "vm_requested" | "in_progress" | "completed" | "error";
|
|
20
|
-
export type TaskResponse = {
|
|
21
|
-
id: string;
|
|
22
|
-
repo_url: string;
|
|
23
|
-
prompt: string;
|
|
24
|
-
status: TaskStatus;
|
|
25
|
-
};
|
|
26
|
-
export type ValidationError = {
|
|
27
|
-
loc: (string | number)[];
|
|
28
|
-
msg: string;
|
|
29
|
-
"type": string;
|
|
30
|
-
};
|
|
31
|
-
export type HttpValidationError = {
|
|
32
|
-
detail?: ValidationError[];
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Read Healthz
|
|
36
|
-
*/
|
|
37
|
-
export function readHealthzHealthzGet(opts?: Oazapfts.RequestOpts) {
|
|
38
|
-
return oazapfts.ok(oazapfts.fetchJson<{
|
|
39
|
-
status: 200;
|
|
40
|
-
data: {
|
|
41
|
-
[key: string]: string;
|
|
42
|
-
};
|
|
43
|
-
}>("/healthz", {
|
|
44
|
-
...opts
|
|
45
|
-
}));
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Create Task
|
|
49
|
-
*/
|
|
50
|
-
export function createTaskV1TasksPost({ taskCreateRequest }: {
|
|
51
|
-
taskCreateRequest: TaskCreateRequest;
|
|
52
|
-
}, opts?: Oazapfts.RequestOpts) {
|
|
53
|
-
return oazapfts.ok(oazapfts.fetchJson<{
|
|
54
|
-
status: 200;
|
|
55
|
-
data: TaskResponse;
|
|
56
|
-
} | {
|
|
57
|
-
status: 422;
|
|
58
|
-
data: HttpValidationError;
|
|
59
|
-
}>("/v1/tasks", oazapfts.json({
|
|
60
|
-
...opts,
|
|
61
|
-
method: "POST",
|
|
62
|
-
body: taskCreateRequest
|
|
63
|
-
})));
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Perform Task Action
|
|
67
|
-
*/
|
|
68
|
-
export function performTaskActionV1TasksTaskIdActionsPost(opts?: Oazapfts.RequestOpts) {
|
|
69
|
-
return oazapfts.ok(oazapfts.fetchJson<{
|
|
70
|
-
status: 200;
|
|
71
|
-
data: any;
|
|
72
|
-
}>(`/v1/tasks/${encodeURIComponent(taskId)}/actions`, {
|
|
73
|
-
...opts,
|
|
74
|
-
method: "POST"
|
|
75
|
-
}));
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Sse Endpoint
|
|
79
|
-
*/
|
|
80
|
-
export function sseEndpointV1SseTasksTaskIdUpdatesGet({ taskId }: {
|
|
81
|
-
taskId: string;
|
|
82
|
-
}, opts?: Oazapfts.RequestOpts) {
|
|
83
|
-
return oazapfts.ok(oazapfts.fetchJson<{
|
|
84
|
-
status: 200;
|
|
85
|
-
data: any;
|
|
86
|
-
} | {
|
|
87
|
-
status: 422;
|
|
88
|
-
data: HttpValidationError;
|
|
89
|
-
}>(`/v1/sse/tasks/${encodeURIComponent(taskId)}/updates`, {
|
|
90
|
-
...opts
|
|
91
|
-
}));
|
|
92
|
-
}
|
package/src/client/code-gen.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
3
|
-
import { getApiAddresses } from '../api-addresses'
|
|
4
|
-
import {
|
|
5
|
-
createTaskV1TasksPost,
|
|
6
|
-
defaults,
|
|
7
|
-
} from '../api/codeGen'
|
|
8
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
9
|
-
import { codeShiftDictionary } from '../error/dictionary/code-shift'
|
|
10
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
11
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
12
|
-
import { StreamedJson } from '../utils/StreamedJson'
|
|
13
|
-
|
|
14
|
-
class CodeGen extends ReactQueryNetworkClient {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(getApiAddresses().codeGen.url, defaults)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
20
|
-
return new DefaultAPIError(error.data, error.status, codeShiftDictionary, error.headers)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
createTask = this.mutation(createTaskV1TasksPost)
|
|
24
|
-
|
|
25
|
-
sseTask(taskId:string, minChangeIntervalMS?: number): any {
|
|
26
|
-
const abortController = new AbortController()
|
|
27
|
-
const headers = {
|
|
28
|
-
'Content-Type': 'application/json',
|
|
29
|
-
'Accept': 'text/event-stream',
|
|
30
|
-
}
|
|
31
|
-
const events = this.stream(
|
|
32
|
-
this.resolveURL(`/v1/sse/tasks/${taskId}/updates`),
|
|
33
|
-
{ method: 'get', headers, signal: abortController.signal },
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
return new StreamedJson({
|
|
37
|
-
eventsPromise: events,
|
|
38
|
-
abortController,
|
|
39
|
-
minChangeIntervalMS,
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const codeGenClient = new CodeGen()
|