@tailorkit/client-platform 0.1.0-beta.1 → 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.
Files changed (52) hide show
  1. package/LICENSE.md +201 -0
  2. package/dist/{chunk-BV7KDGT6.js → chunk-TZBKIIYQ.js} +1 -1
  3. package/dist/{chunk-VS3R5QGP.js → chunk-VUBA7FI4.js} +45 -16
  4. package/dist/{chunk-GBVROCWH.js → chunk-XGSFDGUP.js} +16 -2
  5. package/dist/client/client/client.gen.d.ts +0 -1
  6. package/dist/client/client/client.gen.js +2 -2
  7. package/dist/client/client/index.d.ts +2 -1
  8. package/dist/client/client/index.js +3 -3
  9. package/dist/client/client/types.gen.d.ts +1 -2
  10. package/dist/client/client/utils.gen.d.ts +1 -2
  11. package/dist/client/client.gen.d.ts +2 -3
  12. package/dist/client/client.gen.js +4 -4
  13. package/dist/client/core/auth.gen.d.ts +7 -1
  14. package/dist/client/core/bodySerializer.gen.d.ts +0 -1
  15. package/dist/client/core/params.gen.d.ts +2 -3
  16. package/dist/client/core/params.gen.js +1 -1
  17. package/dist/client/core/pathSerializer.gen.d.ts +3 -4
  18. package/dist/client/core/queryKeySerializer.gen.d.ts +1 -2
  19. package/dist/client/core/serverSentEvents.gen.d.ts +0 -1
  20. package/dist/client/core/types.gen.d.ts +5 -1
  21. package/dist/client/core/utils.gen.d.ts +0 -1
  22. package/dist/client/index.d.ts +2 -3
  23. package/dist/client/index.js +11 -7
  24. package/dist/client/sdk.gen.d.ts +20 -19
  25. package/dist/client/sdk.gen.js +11 -7
  26. package/dist/client/types.gen.d.ts +183 -18
  27. package/dist/client.d.ts +0 -1
  28. package/dist/index.d.ts +0 -1
  29. package/dist/index.js +11 -7
  30. package/dist/preview-tunnel.d.ts +3 -0
  31. package/dist/preview-tunnel.js +9 -0
  32. package/package.json +15 -18
  33. package/LICENSE +0 -674
  34. package/dist/client/client/client.gen.d.ts.map +0 -1
  35. package/dist/client/client/index.d.ts.map +0 -1
  36. package/dist/client/client/types.gen.d.ts.map +0 -1
  37. package/dist/client/client/utils.gen.d.ts.map +0 -1
  38. package/dist/client/client.gen.d.ts.map +0 -1
  39. package/dist/client/core/auth.gen.d.ts.map +0 -1
  40. package/dist/client/core/bodySerializer.gen.d.ts.map +0 -1
  41. package/dist/client/core/params.gen.d.ts.map +0 -1
  42. package/dist/client/core/pathSerializer.gen.d.ts.map +0 -1
  43. package/dist/client/core/queryKeySerializer.gen.d.ts.map +0 -1
  44. package/dist/client/core/serverSentEvents.gen.d.ts.map +0 -1
  45. package/dist/client/core/types.gen.d.ts.map +0 -1
  46. package/dist/client/core/utils.gen.d.ts.map +0 -1
  47. package/dist/client/index.d.ts.map +0 -1
  48. package/dist/client/sdk.gen.d.ts.map +0 -1
  49. package/dist/client/types.gen.d.ts.map +0 -1
  50. package/dist/client.d.ts.map +0 -1
  51. package/dist/index.d.ts.map +0 -1
  52. package/dist/{chunk-4K3CQFYO.js → chunk-ZVCWQQGA.js} +3 -3
@@ -1,5 +1,5 @@
1
- import type { Client, Options as Options2, TDataShape } from "./client";
2
- import type { AppsCreateData, AppsCreateResponses, AppsDeleteData, AppsDeleteResponses, AppsDeployData, AppsDeployResponses, AppsGetData, AppsGetResponses, AppsListData, AppsListResponses, AppsUpdateData, AppsUpdateResponses, CliAuthApproveData, CliAuthApproveResponses, CliAuthDenyData, CliAuthDenyResponses, CliAuthPollData, CliAuthPollResponses, CliAuthStartData, CliAuthStartResponses, CliAuthVerifyTokenData, CliAuthVerifyTokenResponses, DeploymentsCreateData, DeploymentsCreateResponses, DeploymentsGetData, DeploymentsGetResponses, DeploymentsListData, DeploymentsListResponses, DeploymentsPublishData, DeploymentsPublishResponses } from "./types.gen";
1
+ import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from "./client";
2
+ import type { AppsCreateData, AppsCreateResponses, AppsDeleteData, AppsDeleteResponses, AppsDeployData, AppsDeployResponses, AppsGetData, AppsGetResponses, AppsListData, AppsListResponses, AppsUpdateData, AppsUpdateResponses, CliAuthApproveData, CliAuthApproveResponses, CliAuthDenyData, CliAuthDenyResponses, CliAuthPollData, CliAuthPollResponses, CliAuthStartData, CliAuthStartResponses, CliAuthVerifyTokenData, CliAuthVerifyTokenResponses, DeploymentsCreateData, DeploymentsCreateResponses, DeploymentsGetData, DeploymentsGetResponses, DeploymentsListData, DeploymentsListResponses, DeploymentsPublishData, DeploymentsPublishResponses, PreviewResolveData, PreviewResolveResponses, PreviewStartData, PreviewStartResponses } from "./types.gen";
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -11,21 +11,22 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
11
11
  * You can pass arbitrary values through the `meta` object. This can be
12
12
  * used to access values that aren't defined as part of the SDK function.
13
13
  */
14
- meta?: Record<string, unknown>;
14
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
15
15
  };
16
- export declare const appsList: <ThrowOnError extends boolean = false>(options: Options<AppsListData, ThrowOnError>) => import("./client").RequestResult<AppsListResponses, unknown, ThrowOnError, "fields">;
17
- export declare const appsCreate: <ThrowOnError extends boolean = false>(options: Options<AppsCreateData, ThrowOnError>) => import("./client").RequestResult<AppsCreateResponses, unknown, ThrowOnError, "fields">;
18
- export declare const appsDelete: <ThrowOnError extends boolean = false>(options: Options<AppsDeleteData, ThrowOnError>) => import("./client").RequestResult<AppsDeleteResponses, unknown, ThrowOnError, "fields">;
19
- export declare const appsGet: <ThrowOnError extends boolean = false>(options: Options<AppsGetData, ThrowOnError>) => import("./client").RequestResult<AppsGetResponses, unknown, ThrowOnError, "fields">;
20
- export declare const appsUpdate: <ThrowOnError extends boolean = false>(options: Options<AppsUpdateData, ThrowOnError>) => import("./client").RequestResult<AppsUpdateResponses, unknown, ThrowOnError, "fields">;
21
- export declare const appsDeploy: <ThrowOnError extends boolean = false>(options: Options<AppsDeployData, ThrowOnError>) => import("./client").RequestResult<AppsDeployResponses, unknown, ThrowOnError, "fields">;
22
- export declare const cliAuthApprove: <ThrowOnError extends boolean = false>(options: Options<CliAuthApproveData, ThrowOnError>) => import("./client").RequestResult<CliAuthApproveResponses, unknown, ThrowOnError, "fields">;
23
- export declare const cliAuthDeny: <ThrowOnError extends boolean = false>(options: Options<CliAuthDenyData, ThrowOnError>) => import("./client").RequestResult<CliAuthDenyResponses, unknown, ThrowOnError, "fields">;
24
- export declare const cliAuthPoll: <ThrowOnError extends boolean = false>(options: Options<CliAuthPollData, ThrowOnError>) => import("./client").RequestResult<CliAuthPollResponses, unknown, ThrowOnError, "fields">;
25
- export declare const cliAuthStart: <ThrowOnError extends boolean = false>(options: Options<CliAuthStartData, ThrowOnError>) => import("./client").RequestResult<CliAuthStartResponses, unknown, ThrowOnError, "fields">;
26
- export declare const cliAuthVerifyToken: <ThrowOnError extends boolean = false>(options: Options<CliAuthVerifyTokenData, ThrowOnError>) => import("./client").RequestResult<CliAuthVerifyTokenResponses, unknown, ThrowOnError, "fields">;
27
- export declare const deploymentsList: <ThrowOnError extends boolean = false>(options: Options<DeploymentsListData, ThrowOnError>) => import("./client").RequestResult<DeploymentsListResponses, unknown, ThrowOnError, "fields">;
28
- export declare const deploymentsCreate: <ThrowOnError extends boolean = false>(options: Options<DeploymentsCreateData, ThrowOnError>) => import("./client").RequestResult<DeploymentsCreateResponses, unknown, ThrowOnError, "fields">;
29
- export declare const deploymentsGet: <ThrowOnError extends boolean = false>(options: Options<DeploymentsGetData, ThrowOnError>) => import("./client").RequestResult<DeploymentsGetResponses, unknown, ThrowOnError, "fields">;
30
- export declare const deploymentsPublish: <ThrowOnError extends boolean = false>(options: Options<DeploymentsPublishData, ThrowOnError>) => import("./client").RequestResult<DeploymentsPublishResponses, unknown, ThrowOnError, "fields">;
31
- //# sourceMappingURL=sdk.gen.d.ts.map
16
+ export declare const appsList: <ThrowOnError extends boolean = false>(options: Options<AppsListData, ThrowOnError>) => RequestResult<AppsListResponses, unknown, ThrowOnError>;
17
+ export declare const appsCreate: <ThrowOnError extends boolean = false>(options: Options<AppsCreateData, ThrowOnError>) => RequestResult<AppsCreateResponses, unknown, ThrowOnError>;
18
+ export declare const appsDelete: <ThrowOnError extends boolean = false>(options: Options<AppsDeleteData, ThrowOnError>) => RequestResult<AppsDeleteResponses, unknown, ThrowOnError>;
19
+ export declare const appsGet: <ThrowOnError extends boolean = false>(options: Options<AppsGetData, ThrowOnError>) => RequestResult<AppsGetResponses, unknown, ThrowOnError>;
20
+ export declare const appsUpdate: <ThrowOnError extends boolean = false>(options: Options<AppsUpdateData, ThrowOnError>) => RequestResult<AppsUpdateResponses, unknown, ThrowOnError>;
21
+ export declare const appsDeploy: <ThrowOnError extends boolean = false>(options: Options<AppsDeployData, ThrowOnError>) => RequestResult<AppsDeployResponses, unknown, ThrowOnError>;
22
+ export declare const cliAuthApprove: <ThrowOnError extends boolean = false>(options: Options<CliAuthApproveData, ThrowOnError>) => RequestResult<CliAuthApproveResponses, unknown, ThrowOnError>;
23
+ export declare const cliAuthDeny: <ThrowOnError extends boolean = false>(options: Options<CliAuthDenyData, ThrowOnError>) => RequestResult<CliAuthDenyResponses, unknown, ThrowOnError>;
24
+ export declare const cliAuthPoll: <ThrowOnError extends boolean = false>(options: Options<CliAuthPollData, ThrowOnError>) => RequestResult<CliAuthPollResponses, unknown, ThrowOnError>;
25
+ export declare const cliAuthStart: <ThrowOnError extends boolean = false>(options: Options<CliAuthStartData, ThrowOnError>) => RequestResult<CliAuthStartResponses, unknown, ThrowOnError>;
26
+ export declare const cliAuthVerifyToken: <ThrowOnError extends boolean = false>(options: Options<CliAuthVerifyTokenData, ThrowOnError>) => RequestResult<CliAuthVerifyTokenResponses, unknown, ThrowOnError>;
27
+ export declare const deploymentsList: <ThrowOnError extends boolean = false>(options: Options<DeploymentsListData, ThrowOnError>) => RequestResult<DeploymentsListResponses, unknown, ThrowOnError>;
28
+ export declare const deploymentsCreate: <ThrowOnError extends boolean = false>(options: Options<DeploymentsCreateData, ThrowOnError>) => RequestResult<DeploymentsCreateResponses, unknown, ThrowOnError>;
29
+ export declare const deploymentsGet: <ThrowOnError extends boolean = false>(options: Options<DeploymentsGetData, ThrowOnError>) => RequestResult<DeploymentsGetResponses, unknown, ThrowOnError>;
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>;
@@ -13,19 +13,21 @@ import {
13
13
  deploymentsCreate,
14
14
  deploymentsGet,
15
15
  deploymentsList,
16
- deploymentsPublish
17
- } from "../chunk-GBVROCWH.js";
18
- import "../chunk-BV7KDGT6.js";
16
+ deploymentsPublish,
17
+ previewResolve,
18
+ previewStart
19
+ } from "../chunk-XGSFDGUP.js";
20
+ import "../chunk-TZBKIIYQ.js";
19
21
  import "../chunk-X5TBL4RL.js";
20
- import "../chunk-VS3R5QGP.js";
22
+ import "../chunk-VUBA7FI4.js";
21
23
  import "../chunk-RRYF7FTJ.js";
22
- import "../chunk-4K3CQFYO.js";
24
+ import "../chunk-ZVCWQQGA.js";
25
+ import "../chunk-TWOK2M2L.js";
23
26
  import "../chunk-MG3GT4SQ.js";
24
27
  import "../chunk-KP5YYTW6.js";
25
28
  import "../chunk-TZPDFAYB.js";
26
29
  import "../chunk-ZLGFMDTV.js";
27
30
  import "../chunk-JETBOCXO.js";
28
- import "../chunk-TWOK2M2L.js";
29
31
  export {
30
32
  appsCreate,
31
33
  appsDelete,
@@ -41,5 +43,7 @@ export {
41
43
  deploymentsCreate,
42
44
  deploymentsGet,
43
45
  deploymentsList,
44
- deploymentsPublish
46
+ deploymentsPublish,
47
+ previewResolve,
48
+ previewStart
45
49
  };
@@ -18,6 +18,7 @@ export type AppsListResponses = {
18
18
  200: {
19
19
  items: Array<{
20
20
  id: string;
21
+ publicId: string;
21
22
  projectId: string;
22
23
  scopeId: string;
23
24
  name: string;
@@ -27,12 +28,22 @@ export type AppsListResponses = {
27
28
  updatedAt: string;
28
29
  currentDeployment: {
29
30
  id: string;
31
+ publicId: string;
30
32
  appId: string;
31
33
  status: "uploading" | "deploying" | "verifying" | "published";
32
34
  clientEntryFileId: string | null;
35
+ logoLightFileId: string | null;
36
+ logoDarkFileId: string | null;
37
+ logoLightPath: string | null;
38
+ logoDarkPath: string | null;
33
39
  createdAt: string;
34
40
  updatedAt: string;
35
41
  } | null;
42
+ clientPath?: string;
43
+ logoPaths?: {
44
+ dark?: string;
45
+ light?: string;
46
+ };
36
47
  }>;
37
48
  pagination: {
38
49
  hasMore: boolean;
@@ -58,6 +69,7 @@ export type AppsCreateResponses = {
58
69
  */
59
70
  200: {
60
71
  id: string;
72
+ publicId: string;
61
73
  projectId: string;
62
74
  scopeId: string;
63
75
  name: string;
@@ -67,12 +79,22 @@ export type AppsCreateResponses = {
67
79
  updatedAt: string;
68
80
  currentDeployment: {
69
81
  id: string;
82
+ publicId: string;
70
83
  appId: string;
71
84
  status: "uploading" | "deploying" | "verifying" | "published";
72
85
  clientEntryFileId: string | null;
86
+ logoLightFileId: string | null;
87
+ logoDarkFileId: string | null;
88
+ logoLightPath: string | null;
89
+ logoDarkPath: string | null;
73
90
  createdAt: string;
74
91
  updatedAt: string;
75
92
  } | null;
93
+ clientPath?: string;
94
+ logoPaths?: {
95
+ dark?: string;
96
+ light?: string;
97
+ };
76
98
  };
77
99
  };
78
100
  export type AppsCreateResponse = AppsCreateResponses[keyof AppsCreateResponses];
@@ -111,6 +133,7 @@ export type AppsGetResponses = {
111
133
  */
112
134
  200: {
113
135
  id: string;
136
+ publicId: string;
114
137
  projectId: string;
115
138
  scopeId: string;
116
139
  name: string;
@@ -120,12 +143,22 @@ export type AppsGetResponses = {
120
143
  updatedAt: string;
121
144
  currentDeployment: {
122
145
  id: string;
146
+ publicId: string;
123
147
  appId: string;
124
148
  status: "uploading" | "deploying" | "verifying" | "published";
125
149
  clientEntryFileId: string | null;
150
+ logoLightFileId: string | null;
151
+ logoDarkFileId: string | null;
152
+ logoLightPath: string | null;
153
+ logoDarkPath: string | null;
126
154
  createdAt: string;
127
155
  updatedAt: string;
128
156
  } | null;
157
+ clientPath?: string;
158
+ logoPaths?: {
159
+ dark?: string;
160
+ light?: string;
161
+ };
129
162
  };
130
163
  };
131
164
  export type AppsGetResponse = AppsGetResponses[keyof AppsGetResponses];
@@ -148,6 +181,7 @@ export type AppsUpdateResponses = {
148
181
  */
149
182
  200: {
150
183
  id: string;
184
+ publicId: string;
151
185
  projectId: string;
152
186
  scopeId: string;
153
187
  name: string;
@@ -157,12 +191,22 @@ export type AppsUpdateResponses = {
157
191
  updatedAt: string;
158
192
  currentDeployment: {
159
193
  id: string;
194
+ publicId: string;
160
195
  appId: string;
161
196
  status: "uploading" | "deploying" | "verifying" | "published";
162
197
  clientEntryFileId: string | null;
198
+ logoLightFileId: string | null;
199
+ logoDarkFileId: string | null;
200
+ logoLightPath: string | null;
201
+ logoDarkPath: string | null;
163
202
  createdAt: string;
164
203
  updatedAt: string;
165
204
  } | null;
205
+ clientPath?: string;
206
+ logoPaths?: {
207
+ dark?: string;
208
+ light?: string;
209
+ };
166
210
  };
167
211
  };
168
212
  export type AppsUpdateResponse = AppsUpdateResponses[keyof AppsUpdateResponses];
@@ -184,6 +228,7 @@ export type AppsDeployResponses = {
184
228
  */
185
229
  200: {
186
230
  id: string;
231
+ publicId: string;
187
232
  projectId: string;
188
233
  scopeId: string;
189
234
  name: string;
@@ -193,12 +238,22 @@ export type AppsDeployResponses = {
193
238
  updatedAt: string;
194
239
  currentDeployment: {
195
240
  id: string;
241
+ publicId: string;
196
242
  appId: string;
197
243
  status: "uploading" | "deploying" | "verifying" | "published";
198
244
  clientEntryFileId: string | null;
245
+ logoLightFileId: string | null;
246
+ logoDarkFileId: string | null;
247
+ logoLightPath: string | null;
248
+ logoDarkPath: string | null;
199
249
  createdAt: string;
200
250
  updatedAt: string;
201
251
  } | null;
252
+ clientPath?: string;
253
+ logoPaths?: {
254
+ dark?: string;
255
+ light?: string;
256
+ };
202
257
  };
203
258
  };
204
259
  export type AppsDeployResponse = AppsDeployResponses[keyof AppsDeployResponses];
@@ -316,9 +371,14 @@ export type DeploymentsListResponses = {
316
371
  200: {
317
372
  items: Array<{
318
373
  id: string;
374
+ publicId: string;
319
375
  appId: string;
320
376
  status: "uploading" | "deploying" | "verifying" | "published";
321
377
  clientEntryFileId: string | null;
378
+ logoLightFileId: string | null;
379
+ logoDarkFileId: string | null;
380
+ logoLightPath: string | null;
381
+ logoDarkPath: string | null;
322
382
  createdAt: string;
323
383
  updatedAt: string;
324
384
  }>;
@@ -335,13 +395,25 @@ export type DeploymentsCreateData = {
335
395
  appId: string;
336
396
  assets: [
337
397
  {
338
- contentType: "application/javascript";
339
- encoding: "utf-8";
340
398
  checksum: string;
341
399
  contentLength: number;
342
- objectKey: string;
400
+ contentType: "application/javascript";
401
+ encoding: "utf-8";
402
+ objectKey: "client.js";
343
403
  }
344
404
  ];
405
+ logos?: {
406
+ dark?: {
407
+ checksum: string;
408
+ contentLength: number;
409
+ contentType: "image/svg+xml" | "image/png" | "image/webp";
410
+ };
411
+ light?: {
412
+ checksum: string;
413
+ contentLength: number;
414
+ contentType: "image/svg+xml" | "image/png" | "image/webp";
415
+ };
416
+ };
345
417
  scopeId: string;
346
418
  };
347
419
  path?: never;
@@ -353,14 +425,45 @@ export type DeploymentsCreateResponses = {
353
425
  * OK
354
426
  */
355
427
  200: {
356
- assets: [
357
- {
428
+ assets: Array<{
429
+ file: {
430
+ id: string;
431
+ appDeploymentId: string;
432
+ objectKey: string;
433
+ contentType: "application/javascript" | "image/svg+xml" | "image/png" | "image/webp";
434
+ encoding: "utf-8" | null;
435
+ contentLength: number;
436
+ checksum: string | null;
437
+ status: "uploading" | "verifying" | "verified" | "failed";
438
+ createdAt: string;
439
+ updatedAt: string;
440
+ };
441
+ headers?: {
442
+ [key: string]: string;
443
+ };
444
+ uploadUrl: string;
445
+ }>;
446
+ deployment: {
447
+ id: string;
448
+ publicId: string;
449
+ appId: string;
450
+ status: "uploading" | "deploying" | "verifying" | "published";
451
+ clientEntryFileId: string | null;
452
+ logoLightFileId: string | null;
453
+ logoDarkFileId: string | null;
454
+ logoLightPath: string | null;
455
+ logoDarkPath: string | null;
456
+ createdAt: string;
457
+ updatedAt: string;
458
+ };
459
+ logos?: {
460
+ dark?: {
358
461
  file: {
359
462
  id: string;
360
463
  appDeploymentId: string;
361
464
  objectKey: string;
362
- contentType: "application/javascript";
363
- encoding: "utf-8";
465
+ contentType: "image/svg+xml" | "image/png" | "image/webp";
466
+ encoding: "utf-8" | null;
364
467
  contentLength: number;
365
468
  checksum: string | null;
366
469
  status: "uploading" | "verifying" | "verified" | "failed";
@@ -370,16 +473,26 @@ export type DeploymentsCreateResponses = {
370
473
  headers?: {
371
474
  [key: string]: string;
372
475
  };
373
- uploadUrl: string;
374
- }
375
- ];
376
- deployment: {
377
- id: string;
378
- appId: string;
379
- status: "uploading" | "deploying" | "verifying" | "published";
380
- clientEntryFileId: string | null;
381
- createdAt: string;
382
- updatedAt: string;
476
+ uploadUrl?: string;
477
+ };
478
+ light?: {
479
+ file: {
480
+ id: string;
481
+ appDeploymentId: string;
482
+ objectKey: string;
483
+ contentType: "image/svg+xml" | "image/png" | "image/webp";
484
+ encoding: "utf-8" | null;
485
+ contentLength: number;
486
+ checksum: string | null;
487
+ status: "uploading" | "verifying" | "verified" | "failed";
488
+ createdAt: string;
489
+ updatedAt: string;
490
+ };
491
+ headers?: {
492
+ [key: string]: string;
493
+ };
494
+ uploadUrl?: string;
495
+ };
383
496
  };
384
497
  };
385
498
  };
@@ -400,9 +513,14 @@ export type DeploymentsGetResponses = {
400
513
  */
401
514
  200: {
402
515
  id: string;
516
+ publicId: string;
403
517
  appId: string;
404
518
  status: "uploading" | "deploying" | "verifying" | "published";
405
519
  clientEntryFileId: string | null;
520
+ logoLightFileId: string | null;
521
+ logoDarkFileId: string | null;
522
+ logoLightPath: string | null;
523
+ logoDarkPath: string | null;
406
524
  createdAt: string;
407
525
  updatedAt: string;
408
526
  };
@@ -425,12 +543,59 @@ export type DeploymentsPublishResponses = {
425
543
  */
426
544
  200: {
427
545
  id: string;
546
+ publicId: string;
428
547
  appId: string;
429
548
  status: "uploading" | "deploying" | "verifying" | "published";
430
549
  clientEntryFileId: string | null;
550
+ logoLightFileId: string | null;
551
+ logoDarkFileId: string | null;
552
+ logoLightPath: string | null;
553
+ logoDarkPath: string | null;
431
554
  createdAt: string;
432
555
  updatedAt: string;
433
556
  };
434
557
  };
435
558
  export type DeploymentsPublishResponse = DeploymentsPublishResponses[keyof DeploymentsPublishResponses];
436
- //# sourceMappingURL=types.gen.d.ts.map
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/client.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  import type { CreateClientConfig } from "./client/client";
2
2
  export declare const createClientConfig: CreateClientConfig;
3
- //# sourceMappingURL=client.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export * from "./client/index";
2
2
  export * from "./client";
3
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -17,19 +17,21 @@ import {
17
17
  deploymentsCreate,
18
18
  deploymentsGet,
19
19
  deploymentsList,
20
- deploymentsPublish
21
- } from "./chunk-GBVROCWH.js";
22
- import "./chunk-BV7KDGT6.js";
20
+ deploymentsPublish,
21
+ previewResolve,
22
+ previewStart
23
+ } from "./chunk-XGSFDGUP.js";
24
+ import "./chunk-TZBKIIYQ.js";
23
25
  import "./chunk-X5TBL4RL.js";
24
- import "./chunk-VS3R5QGP.js";
26
+ import "./chunk-VUBA7FI4.js";
25
27
  import "./chunk-RRYF7FTJ.js";
26
- import "./chunk-4K3CQFYO.js";
28
+ import "./chunk-ZVCWQQGA.js";
29
+ import "./chunk-TWOK2M2L.js";
27
30
  import "./chunk-MG3GT4SQ.js";
28
31
  import "./chunk-KP5YYTW6.js";
29
32
  import "./chunk-TZPDFAYB.js";
30
33
  import "./chunk-ZLGFMDTV.js";
31
34
  import "./chunk-JETBOCXO.js";
32
- import "./chunk-TWOK2M2L.js";
33
35
  export {
34
36
  appsCreate,
35
37
  appsDelete,
@@ -46,5 +48,7 @@ export {
46
48
  deploymentsCreate,
47
49
  deploymentsGet,
48
50
  deploymentsList,
49
- deploymentsPublish
51
+ deploymentsPublish,
52
+ previewResolve,
53
+ previewStart
50
54
  };
@@ -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,7 +1,7 @@
1
1
  {
2
2
  "name": "@tailorkit/client-platform",
3
- "version": "0.1.0-beta.1",
4
- "license": "AGPL-3.0-only",
3
+ "version": "0.1.0-beta.11",
4
+ "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/AlfieJones/tailorkit.git",
@@ -11,46 +11,43 @@
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-tunnel": {
28
+ "types": "./dist/preview-tunnel.d.ts",
29
+ "import": "./dist/preview-tunnel.js"
38
30
  }
39
31
  },
40
32
  "publishConfig": {
41
33
  "access": "public"
42
34
  },
35
+ "dependencies": {
36
+ "@orpc/client": "^1.15.0"
37
+ },
43
38
  "devDependencies": {
44
- "@hey-api/openapi-ts": "^0.99.0",
39
+ "@hey-api/openapi-ts": "next",
45
40
  "@tailorkit/api-platform": "0.0.0",
46
41
  "@tailorkit/config": "0.0.0",
47
42
  "@types/node": "26.2.0",
48
43
  "tsup": "^8.5.1",
49
- "typescript": "^7.0.2"
44
+ "typescript": "^7.0.2",
45
+ "vitest": "^5.0.0"
50
46
  },
51
47
  "scripts": {
52
48
  "build": "tsup 'src/**/*.ts' --format esm --target node20 --clean && tsc -p tsconfig.build.json",
53
- "generate": "openapi-ts",
54
- "check-types": "tsc --noEmit"
49
+ "generate": "openapi-ts && node ./scripts/restore-openapi-params.mjs && oxfmt src/client",
50
+ "check-types": "tsc --noEmit",
51
+ "test": "vitest run"
55
52
  }
56
53
  }