@tailorkit/client-platform 0.1.0-beta.2 → 0.1.0-beta.20
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/LICENSE.md +201 -0
- package/dist/agent.d.ts +31 -0
- package/dist/agent.js +10 -0
- package/dist/{chunk-4K3CQFYO.js → chunk-3CR3KAER.js} +3 -3
- package/dist/chunk-AX5PTMUR.js +23 -0
- package/dist/{chunk-TWOK2M2L.js → chunk-HXX7UM4A.js} +2 -1
- package/dist/chunk-KF2MA65O.js +211 -0
- package/dist/{chunk-BV7KDGT6.js → chunk-P5HWCKOQ.js} +1 -1
- package/dist/chunk-PTDO4GSQ.js +115 -0
- package/dist/{chunk-VS3R5QGP.js → chunk-VUBA7FI4.js} +45 -16
- package/dist/client/client/client.gen.d.ts +1 -2
- package/dist/client/client/client.gen.js +2 -2
- package/dist/client/client/index.d.ts +10 -9
- package/dist/client/client/index.js +5 -5
- package/dist/client/client/types.gen.d.ts +5 -6
- package/dist/client/client/utils.gen.d.ts +3 -4
- package/dist/client/client.gen.d.ts +3 -4
- package/dist/client/client.gen.js +4 -4
- package/dist/client/core/auth.gen.d.ts +7 -1
- package/dist/client/core/bodySerializer.gen.d.ts +1 -2
- package/dist/client/core/params.gen.d.ts +2 -3
- package/dist/client/core/params.gen.js +1 -1
- package/dist/client/core/pathSerializer.gen.d.ts +3 -4
- package/dist/client/core/queryKeySerializer.gen.d.ts +1 -2
- package/dist/client/core/serverSentEvents.gen.d.ts +1 -2
- package/dist/client/core/serverSentEvents.gen.js +1 -1
- package/dist/client/core/types.gen.d.ts +7 -3
- package/dist/client/core/utils.gen.d.ts +1 -2
- package/dist/client/index.d.ts +2 -3
- package/dist/client/index.js +23 -7
- package/dist/client/sdk.gen.d.ts +26 -19
- package/dist/client/sdk.gen.js +23 -7
- package/dist/client/types.gen.d.ts +665 -100
- package/dist/client.d.ts +1 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.js +45 -7
- package/dist/preview.d.ts +109 -0
- package/dist/preview.js +16 -0
- package/package.json +21 -19
- package/LICENSE +0 -674
- package/dist/chunk-GBVROCWH.js +0 -123
- package/dist/client/client/client.gen.d.ts.map +0 -1
- package/dist/client/client/index.d.ts.map +0 -1
- package/dist/client/client/types.gen.d.ts.map +0 -1
- package/dist/client/client/utils.gen.d.ts.map +0 -1
- package/dist/client/client.gen.d.ts.map +0 -1
- package/dist/client/core/auth.gen.d.ts.map +0 -1
- package/dist/client/core/bodySerializer.gen.d.ts.map +0 -1
- package/dist/client/core/params.gen.d.ts.map +0 -1
- package/dist/client/core/pathSerializer.gen.d.ts.map +0 -1
- package/dist/client/core/queryKeySerializer.gen.d.ts.map +0 -1
- package/dist/client/core/serverSentEvents.gen.d.ts.map +0 -1
- package/dist/client/core/types.gen.d.ts.map +0 -1
- package/dist/client/core/utils.gen.d.ts.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/sdk.gen.d.ts.map +0 -1
- package/dist/client/types.gen.d.ts.map +0 -1
- package/dist/client.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
package/dist/client.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export * from "./client/index";
|
|
2
|
-
export * from "./client";
|
|
3
|
-
|
|
1
|
+
export * from "./client/index.js";
|
|
2
|
+
export * from "./client.js";
|
|
3
|
+
export * from "./preview.js";
|
|
4
|
+
export * from "./agent.js";
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
agentChatSchema,
|
|
3
|
+
agentChunkSchema,
|
|
4
|
+
agentMessagesSchema
|
|
5
|
+
} from "./chunk-AX5PTMUR.js";
|
|
1
6
|
import {
|
|
2
7
|
createClientConfig
|
|
3
8
|
} from "./chunk-5IRC5P4W.js";
|
|
9
|
+
import {
|
|
10
|
+
ACTIVE_PREVIEW_CONFLICT_REASON,
|
|
11
|
+
createPreviewWebSocketClient,
|
|
12
|
+
previewBuildManifestSchema,
|
|
13
|
+
previewEventSchema,
|
|
14
|
+
previewFileManifestSchema,
|
|
15
|
+
previewMetadataSchema
|
|
16
|
+
} from "./chunk-PTDO4GSQ.js";
|
|
4
17
|
import "./chunk-5X7JZMEF.js";
|
|
5
18
|
import {
|
|
19
|
+
appAgentChat,
|
|
6
20
|
appsCreate,
|
|
7
21
|
appsDelete,
|
|
8
22
|
appsDeploy,
|
|
9
23
|
appsGet,
|
|
10
24
|
appsList,
|
|
25
|
+
appsRuntimeSession,
|
|
11
26
|
appsUpdate,
|
|
12
27
|
cliAuthApprove,
|
|
13
28
|
cliAuthDeny,
|
|
@@ -17,25 +32,37 @@ import {
|
|
|
17
32
|
deploymentsCreate,
|
|
18
33
|
deploymentsGet,
|
|
19
34
|
deploymentsList,
|
|
20
|
-
deploymentsPublish
|
|
21
|
-
|
|
22
|
-
|
|
35
|
+
deploymentsPublish,
|
|
36
|
+
deploymentsRuntime,
|
|
37
|
+
previewAccept,
|
|
38
|
+
previewAccepted,
|
|
39
|
+
previewInvitation,
|
|
40
|
+
previewStart,
|
|
41
|
+
previewStop
|
|
42
|
+
} from "./chunk-KF2MA65O.js";
|
|
43
|
+
import "./chunk-P5HWCKOQ.js";
|
|
23
44
|
import "./chunk-X5TBL4RL.js";
|
|
24
|
-
import "./chunk-VS3R5QGP.js";
|
|
25
45
|
import "./chunk-RRYF7FTJ.js";
|
|
26
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-3CR3KAER.js";
|
|
47
|
+
import "./chunk-HXX7UM4A.js";
|
|
27
48
|
import "./chunk-MG3GT4SQ.js";
|
|
28
49
|
import "./chunk-KP5YYTW6.js";
|
|
29
50
|
import "./chunk-TZPDFAYB.js";
|
|
30
51
|
import "./chunk-ZLGFMDTV.js";
|
|
52
|
+
import "./chunk-VUBA7FI4.js";
|
|
31
53
|
import "./chunk-JETBOCXO.js";
|
|
32
|
-
import "./chunk-TWOK2M2L.js";
|
|
33
54
|
export {
|
|
55
|
+
ACTIVE_PREVIEW_CONFLICT_REASON,
|
|
56
|
+
agentChatSchema,
|
|
57
|
+
agentChunkSchema,
|
|
58
|
+
agentMessagesSchema,
|
|
59
|
+
appAgentChat,
|
|
34
60
|
appsCreate,
|
|
35
61
|
appsDelete,
|
|
36
62
|
appsDeploy,
|
|
37
63
|
appsGet,
|
|
38
64
|
appsList,
|
|
65
|
+
appsRuntimeSession,
|
|
39
66
|
appsUpdate,
|
|
40
67
|
cliAuthApprove,
|
|
41
68
|
cliAuthDeny,
|
|
@@ -43,8 +70,19 @@ export {
|
|
|
43
70
|
cliAuthStart,
|
|
44
71
|
cliAuthVerifyToken,
|
|
45
72
|
createClientConfig,
|
|
73
|
+
createPreviewWebSocketClient,
|
|
46
74
|
deploymentsCreate,
|
|
47
75
|
deploymentsGet,
|
|
48
76
|
deploymentsList,
|
|
49
|
-
deploymentsPublish
|
|
77
|
+
deploymentsPublish,
|
|
78
|
+
deploymentsRuntime,
|
|
79
|
+
previewAccept,
|
|
80
|
+
previewAccepted,
|
|
81
|
+
previewBuildManifestSchema,
|
|
82
|
+
previewEventSchema,
|
|
83
|
+
previewFileManifestSchema,
|
|
84
|
+
previewInvitation,
|
|
85
|
+
previewMetadataSchema,
|
|
86
|
+
previewStart,
|
|
87
|
+
previewStop
|
|
50
88
|
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Stable error discriminator for an app that already has an active preview. */
|
|
3
|
+
export declare const ACTIVE_PREVIEW_CONFLICT_REASON: "ACTIVE_PREVIEW_EXISTS";
|
|
4
|
+
export declare const previewFileManifestSchema: z.ZodObject<{
|
|
5
|
+
path: z.ZodString;
|
|
6
|
+
contentType: z.ZodString;
|
|
7
|
+
size: z.ZodNumber;
|
|
8
|
+
chunks: z.ZodNumber;
|
|
9
|
+
sha256: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const previewBuildManifestSchema: z.ZodObject<{
|
|
12
|
+
files: z.ZodArray<z.ZodObject<{
|
|
13
|
+
path: z.ZodString;
|
|
14
|
+
contentType: z.ZodString;
|
|
15
|
+
size: z.ZodNumber;
|
|
16
|
+
chunks: z.ZodNumber;
|
|
17
|
+
sha256: z.ZodString;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
views: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
20
|
+
slot: z.ZodString;
|
|
21
|
+
path: z.ZodString;
|
|
22
|
+
instances: z.ZodOptional<z.ZodLiteral<true>>;
|
|
23
|
+
disabled: z.ZodOptional<z.ZodLiteral<true>>;
|
|
24
|
+
}, z.core.$strip>>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export declare const previewEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
type: z.ZodLiteral<"begin">;
|
|
28
|
+
buildId: z.ZodString;
|
|
29
|
+
revision: z.ZodNumber;
|
|
30
|
+
manifest: z.ZodObject<{
|
|
31
|
+
files: z.ZodArray<z.ZodObject<{
|
|
32
|
+
path: z.ZodString;
|
|
33
|
+
contentType: z.ZodString;
|
|
34
|
+
size: z.ZodNumber;
|
|
35
|
+
chunks: z.ZodNumber;
|
|
36
|
+
sha256: z.ZodString;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
views: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
|
+
slot: z.ZodString;
|
|
40
|
+
path: z.ZodString;
|
|
41
|
+
instances: z.ZodOptional<z.ZodLiteral<true>>;
|
|
42
|
+
disabled: z.ZodOptional<z.ZodLiteral<true>>;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
type: z.ZodLiteral<"chunk">;
|
|
47
|
+
revision: z.ZodNumber;
|
|
48
|
+
fileIndex: z.ZodNumber;
|
|
49
|
+
chunkIndex: z.ZodNumber;
|
|
50
|
+
base64: z.ZodString;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
type: z.ZodLiteral<"complete">;
|
|
53
|
+
revision: z.ZodNumber;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
type: z.ZodLiteral<"ended">;
|
|
56
|
+
}, z.core.$strip>], "type">;
|
|
57
|
+
export declare const previewMetadataSchema: z.ZodObject<{
|
|
58
|
+
sessionId: z.ZodUUID;
|
|
59
|
+
expiresAt: z.ZodString;
|
|
60
|
+
websocketUrl: z.ZodURL;
|
|
61
|
+
token: z.ZodString;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
export type PreviewFileManifest = z.infer<typeof previewFileManifestSchema>;
|
|
64
|
+
export type PreviewBuildManifest = z.infer<typeof previewBuildManifestSchema>;
|
|
65
|
+
export type PreviewEvent = z.infer<typeof previewEventSchema>;
|
|
66
|
+
declare const beginInput: z.ZodObject<{
|
|
67
|
+
manifest: z.ZodObject<{
|
|
68
|
+
files: z.ZodArray<z.ZodObject<{
|
|
69
|
+
path: z.ZodString;
|
|
70
|
+
contentType: z.ZodString;
|
|
71
|
+
size: z.ZodNumber;
|
|
72
|
+
chunks: z.ZodNumber;
|
|
73
|
+
sha256: z.ZodString;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
views: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
76
|
+
slot: z.ZodString;
|
|
77
|
+
path: z.ZodString;
|
|
78
|
+
instances: z.ZodOptional<z.ZodLiteral<true>>;
|
|
79
|
+
disabled: z.ZodOptional<z.ZodLiteral<true>>;
|
|
80
|
+
}, z.core.$strip>>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
declare const uploadInput: z.ZodObject<{
|
|
84
|
+
buildId: z.ZodString;
|
|
85
|
+
fileIndex: z.ZodNumber;
|
|
86
|
+
chunkIndex: z.ZodNumber;
|
|
87
|
+
base64: z.ZodString;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
declare const buildIdOutput: z.ZodObject<{
|
|
90
|
+
buildId: z.ZodString;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
declare const acceptedOutput: z.ZodObject<{
|
|
93
|
+
accepted: z.ZodLiteral<true>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
declare const commitOutput: z.ZodObject<{
|
|
96
|
+
revision: z.ZodNumber;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
export interface PreviewWebSocketClient {
|
|
99
|
+
beginBuild(input: z.input<typeof beginInput>): Promise<z.infer<typeof buildIdOutput>>;
|
|
100
|
+
uploadChunk(input: z.input<typeof uploadInput>): Promise<z.infer<typeof acceptedOutput>>;
|
|
101
|
+
commitBuild(input: {
|
|
102
|
+
buildId: string;
|
|
103
|
+
}): Promise<z.infer<typeof commitOutput>>;
|
|
104
|
+
heartbeat(): Promise<z.infer<typeof acceptedOutput>>;
|
|
105
|
+
subscribe(): Promise<AsyncIterable<PreviewEvent>>;
|
|
106
|
+
}
|
|
107
|
+
/** Validates every preview WebSocket request, response, and streamed event. */
|
|
108
|
+
export declare function createPreviewWebSocketClient(websocket: WebSocket): PreviewWebSocketClient;
|
|
109
|
+
export {};
|
package/dist/preview.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ACTIVE_PREVIEW_CONFLICT_REASON,
|
|
3
|
+
createPreviewWebSocketClient,
|
|
4
|
+
previewBuildManifestSchema,
|
|
5
|
+
previewEventSchema,
|
|
6
|
+
previewFileManifestSchema,
|
|
7
|
+
previewMetadataSchema
|
|
8
|
+
} from "./chunk-PTDO4GSQ.js";
|
|
9
|
+
export {
|
|
10
|
+
ACTIVE_PREVIEW_CONFLICT_REASON,
|
|
11
|
+
createPreviewWebSocketClient,
|
|
12
|
+
previewBuildManifestSchema,
|
|
13
|
+
previewEventSchema,
|
|
14
|
+
previewFileManifestSchema,
|
|
15
|
+
previewMetadataSchema
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -1,56 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailorkit/client-platform",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
4
|
-
"license": "
|
|
3
|
+
"version": "0.1.0-beta.20",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/tailorkit-labs/TailorKit.git",
|
|
8
8
|
"directory": "packages/client-platform"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
13
|
"type": "module",
|
|
14
|
-
"imports": {
|
|
15
|
-
"#*": [
|
|
16
|
-
"./src/*",
|
|
17
|
-
"./src/*.ts",
|
|
18
|
-
"./src/*.tsx",
|
|
19
|
-
"./src/*/index.ts",
|
|
20
|
-
"./src/*/index.tsx"
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
14
|
"exports": {
|
|
24
15
|
".": {
|
|
25
|
-
"development": "./src/index.ts",
|
|
26
16
|
"types": "./dist/index.d.ts",
|
|
27
17
|
"import": "./dist/index.js"
|
|
28
18
|
},
|
|
29
19
|
"./client": {
|
|
30
|
-
"development": "./src/client/index.ts",
|
|
31
20
|
"types": "./dist/client/index.d.ts",
|
|
32
21
|
"import": "./dist/client/index.js"
|
|
33
22
|
},
|
|
34
23
|
"./client/*": {
|
|
35
|
-
"development": "./src/client/*.ts",
|
|
36
24
|
"types": "./dist/client/*.d.ts",
|
|
37
25
|
"import": "./dist/client/*.js"
|
|
26
|
+
},
|
|
27
|
+
"./preview": {
|
|
28
|
+
"types": "./dist/preview.d.ts",
|
|
29
|
+
"import": "./dist/preview.js"
|
|
30
|
+
},
|
|
31
|
+
"./agent": {
|
|
32
|
+
"types": "./dist/agent.d.ts",
|
|
33
|
+
"import": "./dist/agent.js"
|
|
38
34
|
}
|
|
39
35
|
},
|
|
40
36
|
"publishConfig": {
|
|
41
37
|
"access": "public"
|
|
42
38
|
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@orpc/client": "2.0.0-beta.40",
|
|
41
|
+
"ai": "^7.0.127",
|
|
42
|
+
"zod": "^4.6.5"
|
|
43
|
+
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"@hey-api/openapi-ts": "
|
|
45
|
+
"@hey-api/openapi-ts": "next",
|
|
45
46
|
"@tailorkit/api-platform": "0.0.0",
|
|
46
47
|
"@tailorkit/config": "0.0.0",
|
|
47
|
-
"@types/node": "26.
|
|
48
|
+
"@types/node": "26.6.4",
|
|
48
49
|
"tsup": "^8.5.1",
|
|
49
50
|
"typescript": "^7.0.2"
|
|
50
51
|
},
|
|
51
52
|
"scripts": {
|
|
52
53
|
"build": "tsup 'src/**/*.ts' --format esm --target node20 --clean && tsc -p tsconfig.build.json",
|
|
53
|
-
"generate": "openapi-ts",
|
|
54
|
-
"check-types": "tsc --noEmit"
|
|
54
|
+
"generate": "openapi-ts && node ./scripts/restore-openapi-params.mjs && node ./scripts/normalize-esm-imports.mjs && node ./scripts/normalize-sse-cancellation.mjs && vp fmt src/client",
|
|
55
|
+
"check-types": "tsc --noEmit",
|
|
56
|
+
"test": "vp test run"
|
|
55
57
|
}
|
|
56
58
|
}
|