@tailorkit/client-platform 0.1.0-beta.1 → 0.1.0-beta.10

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 (47) hide show
  1. package/LICENSE.md +201 -0
  2. package/dist/{chunk-VS3R5QGP.js → chunk-VUBA7FI4.js} +45 -16
  3. package/dist/{chunk-GBVROCWH.js → chunk-WF3QVXF6.js} +11 -0
  4. package/dist/client/client/client.gen.d.ts +0 -1
  5. package/dist/client/client/index.d.ts +2 -1
  6. package/dist/client/client/index.js +1 -1
  7. package/dist/client/client/types.gen.d.ts +1 -2
  8. package/dist/client/client/utils.gen.d.ts +1 -2
  9. package/dist/client/client.gen.d.ts +2 -3
  10. package/dist/client/client.gen.js +1 -1
  11. package/dist/client/core/auth.gen.d.ts +7 -1
  12. package/dist/client/core/bodySerializer.gen.d.ts +0 -1
  13. package/dist/client/core/params.gen.d.ts +2 -3
  14. package/dist/client/core/params.gen.js +1 -1
  15. package/dist/client/core/pathSerializer.gen.d.ts +3 -4
  16. package/dist/client/core/queryKeySerializer.gen.d.ts +1 -2
  17. package/dist/client/core/serverSentEvents.gen.d.ts +0 -1
  18. package/dist/client/core/types.gen.d.ts +5 -1
  19. package/dist/client/core/utils.gen.d.ts +0 -1
  20. package/dist/client/index.d.ts +2 -3
  21. package/dist/client/index.js +8 -4
  22. package/dist/client/sdk.gen.d.ts +20 -19
  23. package/dist/client/sdk.gen.js +8 -4
  24. package/dist/client/types.gen.d.ts +177 -18
  25. package/dist/client.d.ts +0 -1
  26. package/dist/index.d.ts +0 -1
  27. package/dist/index.js +8 -4
  28. package/package.json +7 -17
  29. package/LICENSE +0 -674
  30. package/dist/client/client/client.gen.d.ts.map +0 -1
  31. package/dist/client/client/index.d.ts.map +0 -1
  32. package/dist/client/client/types.gen.d.ts.map +0 -1
  33. package/dist/client/client/utils.gen.d.ts.map +0 -1
  34. package/dist/client/client.gen.d.ts.map +0 -1
  35. package/dist/client/core/auth.gen.d.ts.map +0 -1
  36. package/dist/client/core/bodySerializer.gen.d.ts.map +0 -1
  37. package/dist/client/core/params.gen.d.ts.map +0 -1
  38. package/dist/client/core/pathSerializer.gen.d.ts.map +0 -1
  39. package/dist/client/core/queryKeySerializer.gen.d.ts.map +0 -1
  40. package/dist/client/core/serverSentEvents.gen.d.ts.map +0 -1
  41. package/dist/client/core/types.gen.d.ts.map +0 -1
  42. package/dist/client/core/utils.gen.d.ts.map +0 -1
  43. package/dist/client/index.d.ts.map +0 -1
  44. package/dist/client/sdk.gen.d.ts.map +0 -1
  45. package/dist/client/types.gen.d.ts.map +0 -1
  46. package/dist/client.d.ts.map +0 -1
  47. package/dist/index.d.ts.map +0 -1
@@ -13,11 +13,13 @@ import {
13
13
  deploymentsCreate,
14
14
  deploymentsGet,
15
15
  deploymentsList,
16
- deploymentsPublish
17
- } from "../chunk-GBVROCWH.js";
16
+ deploymentsPublish,
17
+ previewResolve,
18
+ previewStart
19
+ } from "../chunk-WF3QVXF6.js";
18
20
  import "../chunk-BV7KDGT6.js";
19
21
  import "../chunk-X5TBL4RL.js";
20
- import "../chunk-VS3R5QGP.js";
22
+ import "../chunk-VUBA7FI4.js";
21
23
  import "../chunk-RRYF7FTJ.js";
22
24
  import "../chunk-4K3CQFYO.js";
23
25
  import "../chunk-MG3GT4SQ.js";
@@ -41,5 +43,7 @@ export {
41
43
  deploymentsCreate,
42
44
  deploymentsGet,
43
45
  deploymentsList,
44
- deploymentsPublish
46
+ deploymentsPublish,
47
+ previewResolve,
48
+ previewStart
45
49
  };
@@ -1,6 +1,43 @@
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];
4
41
  export type AppsListData = {
5
42
  body?: never;
6
43
  path?: never;
@@ -18,6 +55,7 @@ export type AppsListResponses = {
18
55
  200: {
19
56
  items: Array<{
20
57
  id: string;
58
+ publicId: string;
21
59
  projectId: string;
22
60
  scopeId: string;
23
61
  name: string;
@@ -27,12 +65,22 @@ export type AppsListResponses = {
27
65
  updatedAt: string;
28
66
  currentDeployment: {
29
67
  id: string;
68
+ publicId: string;
30
69
  appId: string;
31
70
  status: "uploading" | "deploying" | "verifying" | "published";
32
71
  clientEntryFileId: string | null;
72
+ logoLightFileId: string | null;
73
+ logoDarkFileId: string | null;
74
+ logoLightPath: string | null;
75
+ logoDarkPath: string | null;
33
76
  createdAt: string;
34
77
  updatedAt: string;
35
78
  } | null;
79
+ clientPath?: string;
80
+ logoPaths?: {
81
+ dark?: string;
82
+ light?: string;
83
+ };
36
84
  }>;
37
85
  pagination: {
38
86
  hasMore: boolean;
@@ -58,6 +106,7 @@ export type AppsCreateResponses = {
58
106
  */
59
107
  200: {
60
108
  id: string;
109
+ publicId: string;
61
110
  projectId: string;
62
111
  scopeId: string;
63
112
  name: string;
@@ -67,12 +116,22 @@ export type AppsCreateResponses = {
67
116
  updatedAt: string;
68
117
  currentDeployment: {
69
118
  id: string;
119
+ publicId: string;
70
120
  appId: string;
71
121
  status: "uploading" | "deploying" | "verifying" | "published";
72
122
  clientEntryFileId: string | null;
123
+ logoLightFileId: string | null;
124
+ logoDarkFileId: string | null;
125
+ logoLightPath: string | null;
126
+ logoDarkPath: string | null;
73
127
  createdAt: string;
74
128
  updatedAt: string;
75
129
  } | null;
130
+ clientPath?: string;
131
+ logoPaths?: {
132
+ dark?: string;
133
+ light?: string;
134
+ };
76
135
  };
77
136
  };
78
137
  export type AppsCreateResponse = AppsCreateResponses[keyof AppsCreateResponses];
@@ -111,6 +170,7 @@ export type AppsGetResponses = {
111
170
  */
112
171
  200: {
113
172
  id: string;
173
+ publicId: string;
114
174
  projectId: string;
115
175
  scopeId: string;
116
176
  name: string;
@@ -120,12 +180,22 @@ export type AppsGetResponses = {
120
180
  updatedAt: string;
121
181
  currentDeployment: {
122
182
  id: string;
183
+ publicId: string;
123
184
  appId: string;
124
185
  status: "uploading" | "deploying" | "verifying" | "published";
125
186
  clientEntryFileId: string | null;
187
+ logoLightFileId: string | null;
188
+ logoDarkFileId: string | null;
189
+ logoLightPath: string | null;
190
+ logoDarkPath: string | null;
126
191
  createdAt: string;
127
192
  updatedAt: string;
128
193
  } | null;
194
+ clientPath?: string;
195
+ logoPaths?: {
196
+ dark?: string;
197
+ light?: string;
198
+ };
129
199
  };
130
200
  };
131
201
  export type AppsGetResponse = AppsGetResponses[keyof AppsGetResponses];
@@ -148,6 +218,7 @@ export type AppsUpdateResponses = {
148
218
  */
149
219
  200: {
150
220
  id: string;
221
+ publicId: string;
151
222
  projectId: string;
152
223
  scopeId: string;
153
224
  name: string;
@@ -157,12 +228,22 @@ export type AppsUpdateResponses = {
157
228
  updatedAt: string;
158
229
  currentDeployment: {
159
230
  id: string;
231
+ publicId: string;
160
232
  appId: string;
161
233
  status: "uploading" | "deploying" | "verifying" | "published";
162
234
  clientEntryFileId: string | null;
235
+ logoLightFileId: string | null;
236
+ logoDarkFileId: string | null;
237
+ logoLightPath: string | null;
238
+ logoDarkPath: string | null;
163
239
  createdAt: string;
164
240
  updatedAt: string;
165
241
  } | null;
242
+ clientPath?: string;
243
+ logoPaths?: {
244
+ dark?: string;
245
+ light?: string;
246
+ };
166
247
  };
167
248
  };
168
249
  export type AppsUpdateResponse = AppsUpdateResponses[keyof AppsUpdateResponses];
@@ -184,6 +265,7 @@ export type AppsDeployResponses = {
184
265
  */
185
266
  200: {
186
267
  id: string;
268
+ publicId: string;
187
269
  projectId: string;
188
270
  scopeId: string;
189
271
  name: string;
@@ -193,12 +275,22 @@ export type AppsDeployResponses = {
193
275
  updatedAt: string;
194
276
  currentDeployment: {
195
277
  id: string;
278
+ publicId: string;
196
279
  appId: string;
197
280
  status: "uploading" | "deploying" | "verifying" | "published";
198
281
  clientEntryFileId: string | null;
282
+ logoLightFileId: string | null;
283
+ logoDarkFileId: string | null;
284
+ logoLightPath: string | null;
285
+ logoDarkPath: string | null;
199
286
  createdAt: string;
200
287
  updatedAt: string;
201
288
  } | null;
289
+ clientPath?: string;
290
+ logoPaths?: {
291
+ dark?: string;
292
+ light?: string;
293
+ };
202
294
  };
203
295
  };
204
296
  export type AppsDeployResponse = AppsDeployResponses[keyof AppsDeployResponses];
@@ -316,9 +408,14 @@ export type DeploymentsListResponses = {
316
408
  200: {
317
409
  items: Array<{
318
410
  id: string;
411
+ publicId: string;
319
412
  appId: string;
320
413
  status: "uploading" | "deploying" | "verifying" | "published";
321
414
  clientEntryFileId: string | null;
415
+ logoLightFileId: string | null;
416
+ logoDarkFileId: string | null;
417
+ logoLightPath: string | null;
418
+ logoDarkPath: string | null;
322
419
  createdAt: string;
323
420
  updatedAt: string;
324
421
  }>;
@@ -335,13 +432,25 @@ export type DeploymentsCreateData = {
335
432
  appId: string;
336
433
  assets: [
337
434
  {
338
- contentType: "application/javascript";
339
- encoding: "utf-8";
340
435
  checksum: string;
341
436
  contentLength: number;
342
- objectKey: string;
437
+ contentType: "application/javascript";
438
+ encoding: "utf-8";
439
+ objectKey: "client.js";
343
440
  }
344
441
  ];
442
+ logos?: {
443
+ dark?: {
444
+ checksum: string;
445
+ contentLength: number;
446
+ contentType: "image/svg+xml" | "image/png" | "image/webp";
447
+ };
448
+ light?: {
449
+ checksum: string;
450
+ contentLength: number;
451
+ contentType: "image/svg+xml" | "image/png" | "image/webp";
452
+ };
453
+ };
345
454
  scopeId: string;
346
455
  };
347
456
  path?: never;
@@ -353,14 +462,45 @@ export type DeploymentsCreateResponses = {
353
462
  * OK
354
463
  */
355
464
  200: {
356
- assets: [
357
- {
465
+ assets: Array<{
466
+ file: {
467
+ id: string;
468
+ appDeploymentId: string;
469
+ objectKey: string;
470
+ contentType: "application/javascript" | "image/svg+xml" | "image/png" | "image/webp";
471
+ encoding: "utf-8" | null;
472
+ contentLength: number;
473
+ checksum: string | null;
474
+ status: "uploading" | "verifying" | "verified" | "failed";
475
+ createdAt: string;
476
+ updatedAt: string;
477
+ };
478
+ headers?: {
479
+ [key: string]: string;
480
+ };
481
+ uploadUrl: string;
482
+ }>;
483
+ deployment: {
484
+ id: string;
485
+ publicId: string;
486
+ appId: string;
487
+ status: "uploading" | "deploying" | "verifying" | "published";
488
+ clientEntryFileId: string | null;
489
+ logoLightFileId: string | null;
490
+ logoDarkFileId: string | null;
491
+ logoLightPath: string | null;
492
+ logoDarkPath: string | null;
493
+ createdAt: string;
494
+ updatedAt: string;
495
+ };
496
+ logos?: {
497
+ dark?: {
358
498
  file: {
359
499
  id: string;
360
500
  appDeploymentId: string;
361
501
  objectKey: string;
362
- contentType: "application/javascript";
363
- encoding: "utf-8";
502
+ contentType: "image/svg+xml" | "image/png" | "image/webp";
503
+ encoding: "utf-8" | null;
364
504
  contentLength: number;
365
505
  checksum: string | null;
366
506
  status: "uploading" | "verifying" | "verified" | "failed";
@@ -370,16 +510,26 @@ export type DeploymentsCreateResponses = {
370
510
  headers?: {
371
511
  [key: string]: string;
372
512
  };
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;
513
+ uploadUrl?: string;
514
+ };
515
+ light?: {
516
+ file: {
517
+ id: string;
518
+ appDeploymentId: string;
519
+ objectKey: string;
520
+ contentType: "image/svg+xml" | "image/png" | "image/webp";
521
+ encoding: "utf-8" | null;
522
+ contentLength: number;
523
+ checksum: string | null;
524
+ status: "uploading" | "verifying" | "verified" | "failed";
525
+ createdAt: string;
526
+ updatedAt: string;
527
+ };
528
+ headers?: {
529
+ [key: string]: string;
530
+ };
531
+ uploadUrl?: string;
532
+ };
383
533
  };
384
534
  };
385
535
  };
@@ -400,9 +550,14 @@ export type DeploymentsGetResponses = {
400
550
  */
401
551
  200: {
402
552
  id: string;
553
+ publicId: string;
403
554
  appId: string;
404
555
  status: "uploading" | "deploying" | "verifying" | "published";
405
556
  clientEntryFileId: string | null;
557
+ logoLightFileId: string | null;
558
+ logoDarkFileId: string | null;
559
+ logoLightPath: string | null;
560
+ logoDarkPath: string | null;
406
561
  createdAt: string;
407
562
  updatedAt: string;
408
563
  };
@@ -425,12 +580,16 @@ export type DeploymentsPublishResponses = {
425
580
  */
426
581
  200: {
427
582
  id: string;
583
+ publicId: string;
428
584
  appId: string;
429
585
  status: "uploading" | "deploying" | "verifying" | "published";
430
586
  clientEntryFileId: string | null;
587
+ logoLightFileId: string | null;
588
+ logoDarkFileId: string | null;
589
+ logoLightPath: string | null;
590
+ logoDarkPath: string | null;
431
591
  createdAt: string;
432
592
  updatedAt: string;
433
593
  };
434
594
  };
435
595
  export type DeploymentsPublishResponse = DeploymentsPublishResponses[keyof DeploymentsPublishResponses];
436
- //# sourceMappingURL=types.gen.d.ts.map
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,11 +17,13 @@ import {
17
17
  deploymentsCreate,
18
18
  deploymentsGet,
19
19
  deploymentsList,
20
- deploymentsPublish
21
- } from "./chunk-GBVROCWH.js";
20
+ deploymentsPublish,
21
+ previewResolve,
22
+ previewStart
23
+ } from "./chunk-WF3QVXF6.js";
22
24
  import "./chunk-BV7KDGT6.js";
23
25
  import "./chunk-X5TBL4RL.js";
24
- import "./chunk-VS3R5QGP.js";
26
+ import "./chunk-VUBA7FI4.js";
25
27
  import "./chunk-RRYF7FTJ.js";
26
28
  import "./chunk-4K3CQFYO.js";
27
29
  import "./chunk-MG3GT4SQ.js";
@@ -46,5 +48,7 @@ export {
46
48
  deploymentsCreate,
47
49
  deploymentsGet,
48
50
  deploymentsList,
49
- deploymentsPublish
51
+ deploymentsPublish,
52
+ previewResolve,
53
+ previewStart
50
54
  };
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.10",
4
+ "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/AlfieJones/tailorkit.git",
@@ -11,28 +11,16 @@
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"
38
26
  }
@@ -41,16 +29,18 @@
41
29
  "access": "public"
42
30
  },
43
31
  "devDependencies": {
44
- "@hey-api/openapi-ts": "^0.99.0",
32
+ "@hey-api/openapi-ts": "0.99.0",
45
33
  "@tailorkit/api-platform": "0.0.0",
46
34
  "@tailorkit/config": "0.0.0",
47
35
  "@types/node": "26.2.0",
48
36
  "tsup": "^8.5.1",
49
- "typescript": "^7.0.2"
37
+ "typescript": "^7.0.2",
38
+ "vitest": "^5.0.0"
50
39
  },
51
40
  "scripts": {
52
41
  "build": "tsup 'src/**/*.ts' --format esm --target node20 --clean && tsc -p tsconfig.build.json",
53
42
  "generate": "openapi-ts",
54
- "check-types": "tsc --noEmit"
43
+ "check-types": "tsc --noEmit",
44
+ "test": "vitest run"
55
45
  }
56
46
  }