@tailorkit/client-platform 0.1.0-beta.6 → 0.1.0-beta.7
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-VS3R5QGP.js → chunk-VUBA7FI4.js} +45 -16
- package/dist/client/client/index.d.ts +2 -0
- package/dist/client/client/index.js +1 -1
- package/dist/client/client/types.gen.d.ts +1 -1
- package/dist/client/client/utils.gen.d.ts +1 -1
- package/dist/client/client.gen.d.ts +2 -2
- package/dist/client/client.gen.js +1 -1
- package/dist/client/core/auth.gen.d.ts +7 -0
- package/dist/client/core/params.gen.d.ts +2 -2
- package/dist/client/core/params.gen.js +1 -1
- package/dist/client/core/pathSerializer.gen.d.ts +3 -3
- package/dist/client/core/queryKeySerializer.gen.d.ts +1 -1
- package/dist/client/core/types.gen.d.ts +5 -0
- package/dist/client/index.js +1 -1
- package/dist/client/sdk.gen.d.ts +17 -17
- package/dist/client/sdk.gen.js +1 -1
- package/dist/client/types.gen.d.ts +120 -16
- package/dist/index.js +1 -1
- package/package.json +6 -4
|
@@ -6,7 +6,7 @@ var extraPrefixesMap = {
|
|
|
6
6
|
$query_: "query"
|
|
7
7
|
};
|
|
8
8
|
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
9
|
-
|
|
9
|
+
function buildKeyMap(fields, map) {
|
|
10
10
|
if (!map) {
|
|
11
11
|
map = /* @__PURE__ */ new Map();
|
|
12
12
|
}
|
|
@@ -27,22 +27,51 @@ var buildKeyMap = (fields, map) => {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
return map;
|
|
30
|
-
}
|
|
31
|
-
|
|
30
|
+
}
|
|
31
|
+
function stripEmptySlots(params) {
|
|
32
32
|
for (const [slot, value] of Object.entries(params)) {
|
|
33
|
+
if (slot === "body") continue;
|
|
33
34
|
if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).length) {
|
|
34
35
|
delete params[slot];
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
38
|
+
}
|
|
39
|
+
function buildClientParams(args, fields) {
|
|
39
40
|
const params = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
query: {}
|
|
41
|
+
headers: /* @__PURE__ */ Object.create(null),
|
|
42
|
+
path: /* @__PURE__ */ Object.create(null),
|
|
43
|
+
query: /* @__PURE__ */ Object.create(null)
|
|
44
44
|
};
|
|
45
45
|
const map = buildKeyMap(fields);
|
|
46
|
+
let bodyMode;
|
|
47
|
+
function writeSlot(slot, key, value) {
|
|
48
|
+
if (slot === "body") {
|
|
49
|
+
if (bodyMode === "raw") {
|
|
50
|
+
throw new Error("Cannot mix raw and mapped body parameters.");
|
|
51
|
+
}
|
|
52
|
+
bodyMode = "mapped";
|
|
53
|
+
}
|
|
54
|
+
let record = params[slot];
|
|
55
|
+
if (record === void 0) {
|
|
56
|
+
record = /* @__PURE__ */ Object.create(null);
|
|
57
|
+
params[slot] = record;
|
|
58
|
+
}
|
|
59
|
+
if (record === null || typeof record !== "object" || Array.isArray(record)) {
|
|
60
|
+
throw new Error(`Cannot map fields into a non-object ${slot} parameter.`);
|
|
61
|
+
}
|
|
62
|
+
record[key] = value;
|
|
63
|
+
}
|
|
64
|
+
function writeRawSlot(slot, value) {
|
|
65
|
+
if (slot === "body") {
|
|
66
|
+
if (bodyMode === "mapped") {
|
|
67
|
+
throw new Error("Cannot mix raw and mapped body parameters.");
|
|
68
|
+
}
|
|
69
|
+
bodyMode = "raw";
|
|
70
|
+
params.body = value;
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
params[slot] = value;
|
|
74
|
+
}
|
|
46
75
|
let config;
|
|
47
76
|
for (const [index, arg] of args.entries()) {
|
|
48
77
|
if (fields[index]) {
|
|
@@ -56,10 +85,10 @@ var buildClientParams = (args, fields) => {
|
|
|
56
85
|
const field = map.get(config.key);
|
|
57
86
|
const name = field.map || config.key;
|
|
58
87
|
if (field.in) {
|
|
59
|
-
|
|
88
|
+
writeSlot(field.in, name, arg);
|
|
60
89
|
}
|
|
61
90
|
} else {
|
|
62
|
-
|
|
91
|
+
writeRawSlot("body", arg);
|
|
63
92
|
}
|
|
64
93
|
} else {
|
|
65
94
|
for (const [key, value] of Object.entries(arg ?? {})) {
|
|
@@ -67,19 +96,19 @@ var buildClientParams = (args, fields) => {
|
|
|
67
96
|
if (field) {
|
|
68
97
|
if (field.in) {
|
|
69
98
|
const name = field.map || key;
|
|
70
|
-
|
|
99
|
+
writeSlot(field.in, name, value);
|
|
71
100
|
} else {
|
|
72
|
-
|
|
101
|
+
writeRawSlot(field.map, value);
|
|
73
102
|
}
|
|
74
103
|
} else {
|
|
75
104
|
const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
|
|
76
105
|
if (extra) {
|
|
77
106
|
const [prefix, slot] = extra;
|
|
78
|
-
|
|
107
|
+
writeSlot(slot, key.slice(prefix.length), value);
|
|
79
108
|
} else if ("allowExtra" in config && config.allowExtra) {
|
|
80
109
|
for (const [slot, allowed] of Object.entries(config.allowExtra)) {
|
|
81
110
|
if (allowed) {
|
|
82
|
-
|
|
111
|
+
writeSlot(slot, key, value);
|
|
83
112
|
break;
|
|
84
113
|
}
|
|
85
114
|
}
|
|
@@ -90,7 +119,7 @@ var buildClientParams = (args, fields) => {
|
|
|
90
119
|
}
|
|
91
120
|
stripEmptySlots(params);
|
|
92
121
|
return params;
|
|
93
|
-
}
|
|
122
|
+
}
|
|
94
123
|
|
|
95
124
|
export {
|
|
96
125
|
buildClientParams
|
|
@@ -3,6 +3,8 @@ export type { QuerySerializerOptions } from "../core/bodySerializer.gen";
|
|
|
3
3
|
export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, } from "../core/bodySerializer.gen";
|
|
4
4
|
export { buildClientParams } from "../core/params.gen";
|
|
5
5
|
export { serializeQueryKeyValue } from "../core/queryKeySerializer.gen";
|
|
6
|
+
export type { ServerSentEventsResult } from "../core/serverSentEvents.gen";
|
|
7
|
+
export type { ClientMeta } from "../core/types.gen";
|
|
6
8
|
export { createClient } from "./client.gen";
|
|
7
9
|
export type { Client, ClientOptions, Config, CreateClientConfig, Options, RequestOptions, RequestResult, ResolvedRequestOptions, ResponseStyle, TDataShape, } from "./types.gen";
|
|
8
10
|
export { createConfig, mergeHeaders } from "./utils.gen";
|
|
@@ -88,7 +88,7 @@ export interface ClientOptions {
|
|
|
88
88
|
throwOnError?: boolean;
|
|
89
89
|
}
|
|
90
90
|
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method">) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
91
|
-
type SseFn = <TData = unknown,
|
|
91
|
+
type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, "method">) => Promise<ServerSentEventsResult<TData>>;
|
|
92
92
|
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method"> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, "method">) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
93
93
|
type BuildUrlFn = <TData extends {
|
|
94
94
|
body?: unknown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { QuerySerializerOptions } from "../core/bodySerializer.gen";
|
|
2
2
|
import type { Client, ClientOptions, Config, RequestOptions } from "./types.gen";
|
|
3
|
-
export declare const createQuerySerializer: <T = unknown>({ parameters, ...args }?: QuerySerializerOptions) => (queryParams: T) => string;
|
|
3
|
+
export declare const createQuerySerializer: <T = unknown>({ parameters, ...args }?: QuerySerializerOptions) => ((queryParams: T) => string);
|
|
4
4
|
/**
|
|
5
5
|
* Infers parseAs value from provided Content-Type header.
|
|
6
6
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ClientOptions, type Config } from "./client";
|
|
1
|
+
import { type Client, type ClientOptions, type Config } from "./client";
|
|
2
2
|
import type { ClientOptions as ClientOptions2 } from "./types.gen";
|
|
3
3
|
/**
|
|
4
4
|
* The `createClientConfig()` function will be called on client initialization
|
|
@@ -9,4 +9,4 @@ import type { ClientOptions as ClientOptions2 } from "./types.gen";
|
|
|
9
9
|
* to ensure your client always has the correct values.
|
|
10
10
|
*/
|
|
11
11
|
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
|
|
12
|
-
export declare const client:
|
|
12
|
+
export declare const client: Client;
|
|
@@ -6,6 +6,13 @@ export interface Auth {
|
|
|
6
6
|
* @default 'header'
|
|
7
7
|
*/
|
|
8
8
|
in?: "header" | "query" | "cookie";
|
|
9
|
+
/**
|
|
10
|
+
* A unique identifier for the security scheme.
|
|
11
|
+
*
|
|
12
|
+
* Defined only when there are multiple security schemes whose `Auth`
|
|
13
|
+
* shape would otherwise be identical.
|
|
14
|
+
*/
|
|
15
|
+
key?: string;
|
|
9
16
|
/**
|
|
10
17
|
* Header or query parameter name.
|
|
11
18
|
*
|
|
@@ -34,10 +34,10 @@ export interface Fields {
|
|
|
34
34
|
}
|
|
35
35
|
export type FieldsConfig = ReadonlyArray<Field | Fields>;
|
|
36
36
|
interface Params {
|
|
37
|
-
body
|
|
37
|
+
body?: unknown;
|
|
38
38
|
headers: Record<string, unknown>;
|
|
39
39
|
path: Record<string, unknown>;
|
|
40
40
|
query: Record<string, unknown>;
|
|
41
41
|
}
|
|
42
|
-
export declare
|
|
42
|
+
export declare function buildClientParams(args: ReadonlyArray<unknown>, fields: FieldsConfig): Params;
|
|
43
43
|
export {};
|
|
@@ -19,9 +19,9 @@ type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;
|
|
|
19
19
|
interface SerializePrimitiveParam extends SerializePrimitiveOptions {
|
|
20
20
|
value: string;
|
|
21
21
|
}
|
|
22
|
-
export declare const separatorArrayExplode: (style: ArraySeparatorStyle) => "
|
|
23
|
-
export declare const separatorArrayNoExplode: (style: ArraySeparatorStyle) => "
|
|
24
|
-
export declare const separatorObjectExplode: (style: ObjectSeparatorStyle) => "
|
|
22
|
+
export declare const separatorArrayExplode: (style: ArraySeparatorStyle) => "." | ";" | "," | "&";
|
|
23
|
+
export declare const separatorArrayNoExplode: (style: ArraySeparatorStyle) => "," | "|" | "%20";
|
|
24
|
+
export declare const separatorObjectExplode: (style: ObjectSeparatorStyle) => "." | ";" | "," | "&";
|
|
25
25
|
export declare const serializeArrayParam: ({ allowReserved, explode, name, style, value, }: SerializeOptions<ArraySeparatorStyle> & {
|
|
26
26
|
value: unknown[];
|
|
27
27
|
}) => string;
|
|
@@ -7,7 +7,7 @@ export type JsonValue = null | string | number | boolean | JsonValue[] | {
|
|
|
7
7
|
/**
|
|
8
8
|
* Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.
|
|
9
9
|
*/
|
|
10
|
-
export declare const queryKeyJsonReplacer: (_key: string, value: unknown) =>
|
|
10
|
+
export declare const queryKeyJsonReplacer: (_key: string, value: unknown) => unknown | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Safely stringifies a value and parses it back into a JsonValue.
|
|
13
13
|
*/
|
|
@@ -71,6 +71,11 @@ export interface Config {
|
|
|
71
71
|
*/
|
|
72
72
|
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
76
|
+
*/
|
|
77
|
+
export interface ClientMeta {
|
|
78
|
+
}
|
|
74
79
|
type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never] ? true : [T] extends [never | undefined] ? [undefined] extends [T] ? false : true : false;
|
|
75
80
|
export type OmitNever<T extends Record<string, unknown>> = {
|
|
76
81
|
[K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
|
package/dist/client/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "../chunk-GBVROCWH.js";
|
|
19
19
|
import "../chunk-BV7KDGT6.js";
|
|
20
20
|
import "../chunk-X5TBL4RL.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-VUBA7FI4.js";
|
|
22
22
|
import "../chunk-RRYF7FTJ.js";
|
|
23
23
|
import "../chunk-4K3CQFYO.js";
|
|
24
24
|
import "../chunk-MG3GT4SQ.js";
|
package/dist/client/sdk.gen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Client, Options as Options2, TDataShape } from "./client";
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from "./client";
|
|
2
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";
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
4
|
/**
|
|
@@ -11,20 +11,20 @@ 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>) =>
|
|
17
|
-
export declare const appsCreate: <ThrowOnError extends boolean = false>(options: Options<AppsCreateData, ThrowOnError>) =>
|
|
18
|
-
export declare const appsDelete: <ThrowOnError extends boolean = false>(options: Options<AppsDeleteData, ThrowOnError>) =>
|
|
19
|
-
export declare const appsGet: <ThrowOnError extends boolean = false>(options: Options<AppsGetData, ThrowOnError>) =>
|
|
20
|
-
export declare const appsUpdate: <ThrowOnError extends boolean = false>(options: Options<AppsUpdateData, ThrowOnError>) =>
|
|
21
|
-
export declare const appsDeploy: <ThrowOnError extends boolean = false>(options: Options<AppsDeployData, ThrowOnError>) =>
|
|
22
|
-
export declare const cliAuthApprove: <ThrowOnError extends boolean = false>(options: Options<CliAuthApproveData, ThrowOnError>) =>
|
|
23
|
-
export declare const cliAuthDeny: <ThrowOnError extends boolean = false>(options: Options<CliAuthDenyData, ThrowOnError>) =>
|
|
24
|
-
export declare const cliAuthPoll: <ThrowOnError extends boolean = false>(options: Options<CliAuthPollData, ThrowOnError>) =>
|
|
25
|
-
export declare const cliAuthStart: <ThrowOnError extends boolean = false>(options: Options<CliAuthStartData, ThrowOnError>) =>
|
|
26
|
-
export declare const cliAuthVerifyToken: <ThrowOnError extends boolean = false>(options: Options<CliAuthVerifyTokenData, ThrowOnError>) =>
|
|
27
|
-
export declare const deploymentsList: <ThrowOnError extends boolean = false>(options: Options<DeploymentsListData, ThrowOnError>) =>
|
|
28
|
-
export declare const deploymentsCreate: <ThrowOnError extends boolean = false>(options: Options<DeploymentsCreateData, ThrowOnError>) =>
|
|
29
|
-
export declare const deploymentsGet: <ThrowOnError extends boolean = false>(options: Options<DeploymentsGetData, ThrowOnError>) =>
|
|
30
|
-
export declare const deploymentsPublish: <ThrowOnError extends boolean = false>(options: Options<DeploymentsPublishData, ThrowOnError>) =>
|
|
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>;
|
package/dist/client/sdk.gen.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "../chunk-GBVROCWH.js";
|
|
18
18
|
import "../chunk-BV7KDGT6.js";
|
|
19
19
|
import "../chunk-X5TBL4RL.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-VUBA7FI4.js";
|
|
21
21
|
import "../chunk-RRYF7FTJ.js";
|
|
22
22
|
import "../chunk-4K3CQFYO.js";
|
|
23
23
|
import "../chunk-MG3GT4SQ.js";
|
|
@@ -32,10 +32,18 @@ export type AppsListResponses = {
|
|
|
32
32
|
appId: string;
|
|
33
33
|
status: "uploading" | "deploying" | "verifying" | "published";
|
|
34
34
|
clientEntryFileId: string | null;
|
|
35
|
+
logoLightFileId: string | null;
|
|
36
|
+
logoDarkFileId: string | null;
|
|
37
|
+
logoLightPath: string | null;
|
|
38
|
+
logoDarkPath: string | null;
|
|
35
39
|
createdAt: string;
|
|
36
40
|
updatedAt: string;
|
|
37
41
|
} | null;
|
|
38
42
|
clientPath?: string;
|
|
43
|
+
logoPaths?: {
|
|
44
|
+
dark?: string;
|
|
45
|
+
light?: string;
|
|
46
|
+
};
|
|
39
47
|
}>;
|
|
40
48
|
pagination: {
|
|
41
49
|
hasMore: boolean;
|
|
@@ -75,10 +83,18 @@ export type AppsCreateResponses = {
|
|
|
75
83
|
appId: string;
|
|
76
84
|
status: "uploading" | "deploying" | "verifying" | "published";
|
|
77
85
|
clientEntryFileId: string | null;
|
|
86
|
+
logoLightFileId: string | null;
|
|
87
|
+
logoDarkFileId: string | null;
|
|
88
|
+
logoLightPath: string | null;
|
|
89
|
+
logoDarkPath: string | null;
|
|
78
90
|
createdAt: string;
|
|
79
91
|
updatedAt: string;
|
|
80
92
|
} | null;
|
|
81
93
|
clientPath?: string;
|
|
94
|
+
logoPaths?: {
|
|
95
|
+
dark?: string;
|
|
96
|
+
light?: string;
|
|
97
|
+
};
|
|
82
98
|
};
|
|
83
99
|
};
|
|
84
100
|
export type AppsCreateResponse = AppsCreateResponses[keyof AppsCreateResponses];
|
|
@@ -131,10 +147,18 @@ export type AppsGetResponses = {
|
|
|
131
147
|
appId: string;
|
|
132
148
|
status: "uploading" | "deploying" | "verifying" | "published";
|
|
133
149
|
clientEntryFileId: string | null;
|
|
150
|
+
logoLightFileId: string | null;
|
|
151
|
+
logoDarkFileId: string | null;
|
|
152
|
+
logoLightPath: string | null;
|
|
153
|
+
logoDarkPath: string | null;
|
|
134
154
|
createdAt: string;
|
|
135
155
|
updatedAt: string;
|
|
136
156
|
} | null;
|
|
137
157
|
clientPath?: string;
|
|
158
|
+
logoPaths?: {
|
|
159
|
+
dark?: string;
|
|
160
|
+
light?: string;
|
|
161
|
+
};
|
|
138
162
|
};
|
|
139
163
|
};
|
|
140
164
|
export type AppsGetResponse = AppsGetResponses[keyof AppsGetResponses];
|
|
@@ -171,10 +195,18 @@ export type AppsUpdateResponses = {
|
|
|
171
195
|
appId: string;
|
|
172
196
|
status: "uploading" | "deploying" | "verifying" | "published";
|
|
173
197
|
clientEntryFileId: string | null;
|
|
198
|
+
logoLightFileId: string | null;
|
|
199
|
+
logoDarkFileId: string | null;
|
|
200
|
+
logoLightPath: string | null;
|
|
201
|
+
logoDarkPath: string | null;
|
|
174
202
|
createdAt: string;
|
|
175
203
|
updatedAt: string;
|
|
176
204
|
} | null;
|
|
177
205
|
clientPath?: string;
|
|
206
|
+
logoPaths?: {
|
|
207
|
+
dark?: string;
|
|
208
|
+
light?: string;
|
|
209
|
+
};
|
|
178
210
|
};
|
|
179
211
|
};
|
|
180
212
|
export type AppsUpdateResponse = AppsUpdateResponses[keyof AppsUpdateResponses];
|
|
@@ -210,10 +242,18 @@ export type AppsDeployResponses = {
|
|
|
210
242
|
appId: string;
|
|
211
243
|
status: "uploading" | "deploying" | "verifying" | "published";
|
|
212
244
|
clientEntryFileId: string | null;
|
|
245
|
+
logoLightFileId: string | null;
|
|
246
|
+
logoDarkFileId: string | null;
|
|
247
|
+
logoLightPath: string | null;
|
|
248
|
+
logoDarkPath: string | null;
|
|
213
249
|
createdAt: string;
|
|
214
250
|
updatedAt: string;
|
|
215
251
|
} | null;
|
|
216
252
|
clientPath?: string;
|
|
253
|
+
logoPaths?: {
|
|
254
|
+
dark?: string;
|
|
255
|
+
light?: string;
|
|
256
|
+
};
|
|
217
257
|
};
|
|
218
258
|
};
|
|
219
259
|
export type AppsDeployResponse = AppsDeployResponses[keyof AppsDeployResponses];
|
|
@@ -335,6 +375,10 @@ export type DeploymentsListResponses = {
|
|
|
335
375
|
appId: string;
|
|
336
376
|
status: "uploading" | "deploying" | "verifying" | "published";
|
|
337
377
|
clientEntryFileId: string | null;
|
|
378
|
+
logoLightFileId: string | null;
|
|
379
|
+
logoDarkFileId: string | null;
|
|
380
|
+
logoLightPath: string | null;
|
|
381
|
+
logoDarkPath: string | null;
|
|
338
382
|
createdAt: string;
|
|
339
383
|
updatedAt: string;
|
|
340
384
|
}>;
|
|
@@ -351,13 +395,25 @@ export type DeploymentsCreateData = {
|
|
|
351
395
|
appId: string;
|
|
352
396
|
assets: [
|
|
353
397
|
{
|
|
354
|
-
contentType: "application/javascript";
|
|
355
|
-
encoding: "utf-8";
|
|
356
398
|
checksum: string;
|
|
357
399
|
contentLength: number;
|
|
400
|
+
contentType: "application/javascript";
|
|
401
|
+
encoding: "utf-8";
|
|
358
402
|
objectKey: "client.js";
|
|
359
403
|
}
|
|
360
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
|
+
};
|
|
361
417
|
scopeId: string;
|
|
362
418
|
};
|
|
363
419
|
path?: never;
|
|
@@ -369,14 +425,45 @@ export type DeploymentsCreateResponses = {
|
|
|
369
425
|
* OK
|
|
370
426
|
*/
|
|
371
427
|
200: {
|
|
372
|
-
assets:
|
|
373
|
-
{
|
|
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?: {
|
|
374
461
|
file: {
|
|
375
462
|
id: string;
|
|
376
463
|
appDeploymentId: string;
|
|
377
464
|
objectKey: string;
|
|
378
|
-
contentType: "
|
|
379
|
-
encoding: "utf-8";
|
|
465
|
+
contentType: "image/svg+xml" | "image/png" | "image/webp";
|
|
466
|
+
encoding: "utf-8" | null;
|
|
380
467
|
contentLength: number;
|
|
381
468
|
checksum: string | null;
|
|
382
469
|
status: "uploading" | "verifying" | "verified" | "failed";
|
|
@@ -387,16 +474,25 @@ export type DeploymentsCreateResponses = {
|
|
|
387
474
|
[key: string]: string;
|
|
388
475
|
};
|
|
389
476
|
uploadUrl: string;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
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
|
+
};
|
|
400
496
|
};
|
|
401
497
|
};
|
|
402
498
|
};
|
|
@@ -421,6 +517,10 @@ export type DeploymentsGetResponses = {
|
|
|
421
517
|
appId: string;
|
|
422
518
|
status: "uploading" | "deploying" | "verifying" | "published";
|
|
423
519
|
clientEntryFileId: string | null;
|
|
520
|
+
logoLightFileId: string | null;
|
|
521
|
+
logoDarkFileId: string | null;
|
|
522
|
+
logoLightPath: string | null;
|
|
523
|
+
logoDarkPath: string | null;
|
|
424
524
|
createdAt: string;
|
|
425
525
|
updatedAt: string;
|
|
426
526
|
};
|
|
@@ -447,6 +547,10 @@ export type DeploymentsPublishResponses = {
|
|
|
447
547
|
appId: string;
|
|
448
548
|
status: "uploading" | "deploying" | "verifying" | "published";
|
|
449
549
|
clientEntryFileId: string | null;
|
|
550
|
+
logoLightFileId: string | null;
|
|
551
|
+
logoDarkFileId: string | null;
|
|
552
|
+
logoLightPath: string | null;
|
|
553
|
+
logoDarkPath: string | null;
|
|
450
554
|
createdAt: string;
|
|
451
555
|
updatedAt: string;
|
|
452
556
|
};
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-GBVROCWH.js";
|
|
22
22
|
import "./chunk-BV7KDGT6.js";
|
|
23
23
|
import "./chunk-X5TBL4RL.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-VUBA7FI4.js";
|
|
25
25
|
import "./chunk-RRYF7FTJ.js";
|
|
26
26
|
import "./chunk-4K3CQFYO.js";
|
|
27
27
|
import "./chunk-MG3GT4SQ.js";
|
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.7",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,16 +29,18 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@hey-api/openapi-ts": "
|
|
32
|
+
"@hey-api/openapi-ts": "0.0.0-next-20260824173136",
|
|
33
33
|
"@tailorkit/api-platform": "0.0.0",
|
|
34
34
|
"@tailorkit/config": "0.0.0",
|
|
35
35
|
"@types/node": "26.2.0",
|
|
36
36
|
"tsup": "^8.5.1",
|
|
37
|
-
"typescript": "^7.0.2"
|
|
37
|
+
"typescript": "^7.0.2",
|
|
38
|
+
"vitest": "^4.1.11"
|
|
38
39
|
},
|
|
39
40
|
"scripts": {
|
|
40
41
|
"build": "tsup 'src/**/*.ts' --format esm --target node20 --clean && tsc -p tsconfig.build.json",
|
|
41
42
|
"generate": "openapi-ts",
|
|
42
|
-
"check-types": "tsc --noEmit"
|
|
43
|
+
"check-types": "tsc --noEmit",
|
|
44
|
+
"test": "vitest run"
|
|
43
45
|
}
|
|
44
46
|
}
|