@tailorkit/client-platform 0.1.0-beta.10 → 0.1.0-beta.11
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/{chunk-BV7KDGT6.js → chunk-TZBKIIYQ.js} +1 -1
- package/dist/{chunk-WF3QVXF6.js → chunk-XGSFDGUP.js} +16 -13
- package/dist/client/client/client.gen.js +2 -2
- package/dist/client/client/index.js +2 -2
- package/dist/client/client.gen.js +3 -3
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +4 -4
- package/dist/client/sdk.gen.d.ts +2 -2
- package/dist/client/sdk.gen.js +4 -4
- package/dist/client/types.gen.d.ts +43 -37
- package/dist/index.js +4 -4
- package/dist/preview-tunnel.d.ts +3 -0
- package/dist/preview-tunnel.js +9 -0
- package/package.json +10 -3
- package/dist/{chunk-4K3CQFYO.js → chunk-ZVCWQQGA.js} +3 -3
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
client
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TZBKIIYQ.js";
|
|
4
4
|
|
|
5
5
|
// src/client/sdk.gen.ts
|
|
6
6
|
var appsList = (options) => (options.client ?? client).get({
|
|
7
7
|
url: "/apps",
|
|
8
8
|
...options
|
|
9
9
|
});
|
|
10
|
-
var previewStart = (options) => (options.client ?? client).post({
|
|
11
|
-
url: "/preview/start",
|
|
12
|
-
...options,
|
|
13
|
-
headers: { "Content-Type": "application/json", ...options.headers }
|
|
14
|
-
});
|
|
15
|
-
var previewResolve = (options) => (options.client ?? client).get({
|
|
16
|
-
url: "/preview/{sessionId}",
|
|
17
|
-
...options
|
|
18
|
-
});
|
|
19
10
|
var appsCreate = (options) => (options.client ?? client).post({
|
|
20
11
|
url: "/apps",
|
|
21
12
|
...options,
|
|
@@ -112,11 +103,21 @@ var deploymentsPublish = (options) => (options.client ?? client).post({
|
|
|
112
103
|
...options.headers
|
|
113
104
|
}
|
|
114
105
|
});
|
|
106
|
+
var previewStart = (options) => (options.client ?? client).post({
|
|
107
|
+
url: "/preview/start",
|
|
108
|
+
...options,
|
|
109
|
+
headers: {
|
|
110
|
+
"Content-Type": "application/json",
|
|
111
|
+
...options.headers
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
var previewResolve = (options) => (options.client ?? client).get({
|
|
115
|
+
url: "/preview/{sessionId}",
|
|
116
|
+
...options
|
|
117
|
+
});
|
|
115
118
|
|
|
116
119
|
export {
|
|
117
120
|
appsList,
|
|
118
|
-
previewStart,
|
|
119
|
-
previewResolve,
|
|
120
121
|
appsCreate,
|
|
121
122
|
appsDelete,
|
|
122
123
|
appsGet,
|
|
@@ -130,5 +131,7 @@ export {
|
|
|
130
131
|
deploymentsList,
|
|
131
132
|
deploymentsCreate,
|
|
132
133
|
deploymentsGet,
|
|
133
|
-
deploymentsPublish
|
|
134
|
+
deploymentsPublish,
|
|
135
|
+
previewStart,
|
|
136
|
+
previewResolve
|
|
134
137
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createClient
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-ZVCWQQGA.js";
|
|
4
|
+
import "../../chunk-TWOK2M2L.js";
|
|
4
5
|
import "../../chunk-MG3GT4SQ.js";
|
|
5
6
|
import "../../chunk-KP5YYTW6.js";
|
|
6
7
|
import "../../chunk-TZPDFAYB.js";
|
|
7
8
|
import "../../chunk-ZLGFMDTV.js";
|
|
8
9
|
import "../../chunk-JETBOCXO.js";
|
|
9
|
-
import "../../chunk-TWOK2M2L.js";
|
|
10
10
|
export {
|
|
11
11
|
createClient
|
|
12
12
|
};
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
} from "../../chunk-RRYF7FTJ.js";
|
|
8
8
|
import {
|
|
9
9
|
createClient
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-ZVCWQQGA.js";
|
|
11
|
+
import "../../chunk-TWOK2M2L.js";
|
|
11
12
|
import {
|
|
12
13
|
createConfig,
|
|
13
14
|
mergeHeaders
|
|
@@ -20,7 +21,6 @@ import {
|
|
|
20
21
|
urlSearchParamsBodySerializer
|
|
21
22
|
} from "../../chunk-ZLGFMDTV.js";
|
|
22
23
|
import "../../chunk-JETBOCXO.js";
|
|
23
|
-
import "../../chunk-TWOK2M2L.js";
|
|
24
24
|
export {
|
|
25
25
|
buildClientParams,
|
|
26
26
|
createClient,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
client
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-TZBKIIYQ.js";
|
|
4
4
|
import "../chunk-X5TBL4RL.js";
|
|
5
5
|
import "../chunk-VUBA7FI4.js";
|
|
6
6
|
import "../chunk-RRYF7FTJ.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-ZVCWQQGA.js";
|
|
8
|
+
import "../chunk-TWOK2M2L.js";
|
|
8
9
|
import "../chunk-MG3GT4SQ.js";
|
|
9
10
|
import "../chunk-KP5YYTW6.js";
|
|
10
11
|
import "../chunk-TZPDFAYB.js";
|
|
11
12
|
import "../chunk-ZLGFMDTV.js";
|
|
12
13
|
import "../chunk-JETBOCXO.js";
|
|
13
|
-
import "../chunk-TWOK2M2L.js";
|
|
14
14
|
export {
|
|
15
15
|
client
|
|
16
16
|
};
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { appsCreate, appsDelete, appsDeploy, appsGet, appsList, appsUpdate, cliAuthApprove, cliAuthDeny, cliAuthPoll, cliAuthStart, cliAuthVerifyToken, deploymentsCreate, deploymentsGet, deploymentsList, deploymentsPublish, previewResolve, previewStart,
|
|
1
|
+
export { appsCreate, appsDelete, appsDeploy, appsGet, appsList, appsUpdate, cliAuthApprove, cliAuthDeny, cliAuthPoll, cliAuthStart, cliAuthVerifyToken, deploymentsCreate, deploymentsGet, deploymentsList, deploymentsPublish, type Options, previewResolve, previewStart, } from "./sdk.gen";
|
|
2
2
|
export type { AppsCreateData, AppsCreateResponse, AppsCreateResponses, AppsDeleteData, AppsDeleteResponse, AppsDeleteResponses, AppsDeployData, AppsDeployResponse, AppsDeployResponses, AppsGetData, AppsGetResponse, AppsGetResponses, AppsListData, AppsListResponse, AppsListResponses, AppsUpdateData, AppsUpdateResponse, AppsUpdateResponses, CliAuthApproveData, CliAuthApproveResponse, CliAuthApproveResponses, CliAuthDenyData, CliAuthDenyResponse, CliAuthDenyResponses, CliAuthPollData, CliAuthPollResponse, CliAuthPollResponses, CliAuthStartData, CliAuthStartResponse, CliAuthStartResponses, CliAuthVerifyTokenData, CliAuthVerifyTokenResponse, CliAuthVerifyTokenResponses, ClientOptions, DeploymentsCreateData, DeploymentsCreateResponse, DeploymentsCreateResponses, DeploymentsGetData, DeploymentsGetResponse, DeploymentsGetResponses, DeploymentsListData, DeploymentsListResponse, DeploymentsListResponses, DeploymentsPublishData, DeploymentsPublishResponse, DeploymentsPublishResponses, PreviewResolveData, PreviewResolveResponse, PreviewResolveResponses, PreviewStartData, PreviewStartResponse, PreviewStartResponses, } from "./types.gen";
|
package/dist/client/index.js
CHANGED
|
@@ -17,18 +17,18 @@ import {
|
|
|
17
17
|
deploymentsPublish,
|
|
18
18
|
previewResolve,
|
|
19
19
|
previewStart
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-XGSFDGUP.js";
|
|
21
|
+
import "../chunk-TZBKIIYQ.js";
|
|
22
22
|
import "../chunk-X5TBL4RL.js";
|
|
23
23
|
import "../chunk-VUBA7FI4.js";
|
|
24
24
|
import "../chunk-RRYF7FTJ.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-ZVCWQQGA.js";
|
|
26
|
+
import "../chunk-TWOK2M2L.js";
|
|
26
27
|
import "../chunk-MG3GT4SQ.js";
|
|
27
28
|
import "../chunk-KP5YYTW6.js";
|
|
28
29
|
import "../chunk-TZPDFAYB.js";
|
|
29
30
|
import "../chunk-ZLGFMDTV.js";
|
|
30
31
|
import "../chunk-JETBOCXO.js";
|
|
31
|
-
import "../chunk-TWOK2M2L.js";
|
|
32
32
|
export {
|
|
33
33
|
appsCreate,
|
|
34
34
|
appsDelete,
|
package/dist/client/sdk.gen.d.ts
CHANGED
|
@@ -14,8 +14,6 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
14
14
|
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
15
15
|
};
|
|
16
16
|
export declare const appsList: <ThrowOnError extends boolean = false>(options: Options<AppsListData, ThrowOnError>) => RequestResult<AppsListResponses, unknown, ThrowOnError>;
|
|
17
|
-
export declare const previewStart: <ThrowOnError extends boolean = false>(options: Options<PreviewStartData, ThrowOnError>) => RequestResult<PreviewStartResponses, unknown, ThrowOnError>;
|
|
18
|
-
export declare const previewResolve: <ThrowOnError extends boolean = false>(options: Options<PreviewResolveData, ThrowOnError>) => RequestResult<PreviewResolveResponses, unknown, ThrowOnError>;
|
|
19
17
|
export declare const appsCreate: <ThrowOnError extends boolean = false>(options: Options<AppsCreateData, ThrowOnError>) => RequestResult<AppsCreateResponses, unknown, ThrowOnError>;
|
|
20
18
|
export declare const appsDelete: <ThrowOnError extends boolean = false>(options: Options<AppsDeleteData, ThrowOnError>) => RequestResult<AppsDeleteResponses, unknown, ThrowOnError>;
|
|
21
19
|
export declare const appsGet: <ThrowOnError extends boolean = false>(options: Options<AppsGetData, ThrowOnError>) => RequestResult<AppsGetResponses, unknown, ThrowOnError>;
|
|
@@ -30,3 +28,5 @@ export declare const deploymentsList: <ThrowOnError extends boolean = false>(opt
|
|
|
30
28
|
export declare const deploymentsCreate: <ThrowOnError extends boolean = false>(options: Options<DeploymentsCreateData, ThrowOnError>) => RequestResult<DeploymentsCreateResponses, unknown, ThrowOnError>;
|
|
31
29
|
export declare const deploymentsGet: <ThrowOnError extends boolean = false>(options: Options<DeploymentsGetData, ThrowOnError>) => RequestResult<DeploymentsGetResponses, unknown, ThrowOnError>;
|
|
32
30
|
export declare const deploymentsPublish: <ThrowOnError extends boolean = false>(options: Options<DeploymentsPublishData, ThrowOnError>) => RequestResult<DeploymentsPublishResponses, unknown, ThrowOnError>;
|
|
31
|
+
export declare const previewStart: <ThrowOnError extends boolean = false>(options: Options<PreviewStartData, ThrowOnError>) => RequestResult<PreviewStartResponses, unknown, ThrowOnError>;
|
|
32
|
+
export declare const previewResolve: <ThrowOnError extends boolean = false>(options: Options<PreviewResolveData, ThrowOnError>) => RequestResult<PreviewResolveResponses, unknown, ThrowOnError>;
|
package/dist/client/sdk.gen.js
CHANGED
|
@@ -16,18 +16,18 @@ import {
|
|
|
16
16
|
deploymentsPublish,
|
|
17
17
|
previewResolve,
|
|
18
18
|
previewStart
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-XGSFDGUP.js";
|
|
20
|
+
import "../chunk-TZBKIIYQ.js";
|
|
21
21
|
import "../chunk-X5TBL4RL.js";
|
|
22
22
|
import "../chunk-VUBA7FI4.js";
|
|
23
23
|
import "../chunk-RRYF7FTJ.js";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-ZVCWQQGA.js";
|
|
25
|
+
import "../chunk-TWOK2M2L.js";
|
|
25
26
|
import "../chunk-MG3GT4SQ.js";
|
|
26
27
|
import "../chunk-KP5YYTW6.js";
|
|
27
28
|
import "../chunk-TZPDFAYB.js";
|
|
28
29
|
import "../chunk-ZLGFMDTV.js";
|
|
29
30
|
import "../chunk-JETBOCXO.js";
|
|
30
|
-
import "../chunk-TWOK2M2L.js";
|
|
31
31
|
export {
|
|
32
32
|
appsCreate,
|
|
33
33
|
appsDelete,
|
|
@@ -1,43 +1,6 @@
|
|
|
1
1
|
export type ClientOptions = {
|
|
2
2
|
baseUrl: "https://tailorkit.dev/api/platform" | (string & {});
|
|
3
3
|
};
|
|
4
|
-
export type PreviewStartData = {
|
|
5
|
-
body: {
|
|
6
|
-
appId: string;
|
|
7
|
-
deployToken: string;
|
|
8
|
-
};
|
|
9
|
-
path?: never;
|
|
10
|
-
query?: never;
|
|
11
|
-
url: "/preview/start";
|
|
12
|
-
};
|
|
13
|
-
export type PreviewStartResponses = {
|
|
14
|
-
200: {
|
|
15
|
-
expiresAt: string;
|
|
16
|
-
sessionId: string;
|
|
17
|
-
tunnelToken: string;
|
|
18
|
-
tunnelUrl: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export type PreviewStartResponse = PreviewStartResponses[keyof PreviewStartResponses];
|
|
22
|
-
export type PreviewResolveData = {
|
|
23
|
-
body?: never;
|
|
24
|
-
path: {
|
|
25
|
-
sessionId: string;
|
|
26
|
-
};
|
|
27
|
-
query: {
|
|
28
|
-
scopeId: string;
|
|
29
|
-
};
|
|
30
|
-
url: "/preview/{sessionId}";
|
|
31
|
-
};
|
|
32
|
-
export type PreviewResolveResponses = {
|
|
33
|
-
200: {
|
|
34
|
-
appId: string;
|
|
35
|
-
clientPath: string;
|
|
36
|
-
sessionId: string;
|
|
37
|
-
status: "connected" | "offline";
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export type PreviewResolveResponse = PreviewResolveResponses[keyof PreviewResolveResponses];
|
|
41
4
|
export type AppsListData = {
|
|
42
5
|
body?: never;
|
|
43
6
|
path?: never;
|
|
@@ -593,3 +556,46 @@ export type DeploymentsPublishResponses = {
|
|
|
593
556
|
};
|
|
594
557
|
};
|
|
595
558
|
export type DeploymentsPublishResponse = DeploymentsPublishResponses[keyof DeploymentsPublishResponses];
|
|
559
|
+
export type PreviewStartData = {
|
|
560
|
+
body: {
|
|
561
|
+
appId: string;
|
|
562
|
+
deployToken: string;
|
|
563
|
+
};
|
|
564
|
+
path?: never;
|
|
565
|
+
query?: never;
|
|
566
|
+
url: "/preview/start";
|
|
567
|
+
};
|
|
568
|
+
export type PreviewStartResponses = {
|
|
569
|
+
/**
|
|
570
|
+
* OK
|
|
571
|
+
*/
|
|
572
|
+
200: {
|
|
573
|
+
expiresAt: string;
|
|
574
|
+
sessionId: string;
|
|
575
|
+
tunnelToken: string;
|
|
576
|
+
tunnelUrl: string;
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
export type PreviewStartResponse = PreviewStartResponses[keyof PreviewStartResponses];
|
|
580
|
+
export type PreviewResolveData = {
|
|
581
|
+
body?: never;
|
|
582
|
+
path: {
|
|
583
|
+
sessionId: string;
|
|
584
|
+
};
|
|
585
|
+
query: {
|
|
586
|
+
scopeId: string;
|
|
587
|
+
};
|
|
588
|
+
url: "/preview/{sessionId}";
|
|
589
|
+
};
|
|
590
|
+
export type PreviewResolveResponses = {
|
|
591
|
+
/**
|
|
592
|
+
* OK
|
|
593
|
+
*/
|
|
594
|
+
200: {
|
|
595
|
+
appId: string;
|
|
596
|
+
clientPath: string;
|
|
597
|
+
sessionId: string;
|
|
598
|
+
status: "connected" | "offline";
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
export type PreviewResolveResponse = PreviewResolveResponses[keyof PreviewResolveResponses];
|
package/dist/index.js
CHANGED
|
@@ -20,18 +20,18 @@ import {
|
|
|
20
20
|
deploymentsPublish,
|
|
21
21
|
previewResolve,
|
|
22
22
|
previewStart
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-XGSFDGUP.js";
|
|
24
|
+
import "./chunk-TZBKIIYQ.js";
|
|
25
25
|
import "./chunk-X5TBL4RL.js";
|
|
26
26
|
import "./chunk-VUBA7FI4.js";
|
|
27
27
|
import "./chunk-RRYF7FTJ.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-ZVCWQQGA.js";
|
|
29
|
+
import "./chunk-TWOK2M2L.js";
|
|
29
30
|
import "./chunk-MG3GT4SQ.js";
|
|
30
31
|
import "./chunk-KP5YYTW6.js";
|
|
31
32
|
import "./chunk-TZPDFAYB.js";
|
|
32
33
|
import "./chunk-ZLGFMDTV.js";
|
|
33
34
|
import "./chunk-JETBOCXO.js";
|
|
34
|
-
import "./chunk-TWOK2M2L.js";
|
|
35
35
|
export {
|
|
36
36
|
appsCreate,
|
|
37
37
|
appsDelete,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PreviewTunnelRouterClient } from "@tailorkit/api-platform/preview-tunnel";
|
|
2
|
+
/** Creates the typed oRPC client for an authenticated preview tunnel WebSocket. */
|
|
3
|
+
export declare function createPreviewTunnelClient(websocket: WebSocket): PreviewTunnelRouterClient;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/preview-tunnel.ts
|
|
2
|
+
import { createORPCClient } from "@orpc/client";
|
|
3
|
+
import { RPCLink } from "@orpc/client/websocket";
|
|
4
|
+
function createPreviewTunnelClient(websocket) {
|
|
5
|
+
return createORPCClient(new RPCLink({ websocket }));
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
createPreviewTunnelClient
|
|
9
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailorkit/client-platform",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.11",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,13 +23,20 @@
|
|
|
23
23
|
"./client/*": {
|
|
24
24
|
"types": "./dist/client/*.d.ts",
|
|
25
25
|
"import": "./dist/client/*.js"
|
|
26
|
+
},
|
|
27
|
+
"./preview-tunnel": {
|
|
28
|
+
"types": "./dist/preview-tunnel.d.ts",
|
|
29
|
+
"import": "./dist/preview-tunnel.js"
|
|
26
30
|
}
|
|
27
31
|
},
|
|
28
32
|
"publishConfig": {
|
|
29
33
|
"access": "public"
|
|
30
34
|
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@orpc/client": "^1.15.0"
|
|
37
|
+
},
|
|
31
38
|
"devDependencies": {
|
|
32
|
-
"@hey-api/openapi-ts": "
|
|
39
|
+
"@hey-api/openapi-ts": "next",
|
|
33
40
|
"@tailorkit/api-platform": "0.0.0",
|
|
34
41
|
"@tailorkit/config": "0.0.0",
|
|
35
42
|
"@types/node": "26.2.0",
|
|
@@ -39,7 +46,7 @@
|
|
|
39
46
|
},
|
|
40
47
|
"scripts": {
|
|
41
48
|
"build": "tsup 'src/**/*.ts' --format esm --target node20 --clean && tsc -p tsconfig.build.json",
|
|
42
|
-
"generate": "openapi-ts",
|
|
49
|
+
"generate": "openapi-ts && node ./scripts/restore-openapi-params.mjs && oxfmt src/client",
|
|
43
50
|
"check-types": "tsc --noEmit",
|
|
44
51
|
"test": "vitest run"
|
|
45
52
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSseClient
|
|
3
|
+
} from "./chunk-TWOK2M2L.js";
|
|
1
4
|
import {
|
|
2
5
|
buildUrl,
|
|
3
6
|
createConfig,
|
|
@@ -10,9 +13,6 @@ import {
|
|
|
10
13
|
import {
|
|
11
14
|
getValidRequestBody
|
|
12
15
|
} from "./chunk-KP5YYTW6.js";
|
|
13
|
-
import {
|
|
14
|
-
createSseClient
|
|
15
|
-
} from "./chunk-TWOK2M2L.js";
|
|
16
16
|
|
|
17
17
|
// src/client/client/client.gen.ts
|
|
18
18
|
var createClient = (config = {}) => {
|