@tailor-platform/sdk 0.17.0 → 0.18.1
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/CHANGELOG.md +22 -0
- package/dist/cli/api.d.mts +32 -32
- package/dist/cli/api.mjs +2 -2
- package/dist/cli/api.mjs.map +1 -1
- package/dist/cli/index.mjs +343 -14
- package/dist/cli/index.mjs.map +1 -1
- package/dist/configure/index.d.mts +3 -3
- package/dist/{index-Bin7-j3v.d.mts → index-Ba6ekRxa.d.mts} +2 -2
- package/dist/job-CL8myeqs.mjs.map +1 -1
- package/dist/{resume-B2ba5opn.mjs → resume-8Y9mmXHa.mjs} +87 -157
- package/dist/{resume-B2ba5opn.mjs.map → resume-8Y9mmXHa.mjs.map} +1 -1
- package/dist/{types-Da_WnvA0.d.mts → types-Dz5wcR2h.d.mts} +13 -5
- package/dist/utils/test/index.d.mts +2 -2
- package/docs/cli-reference.md +10 -0
- package/docs/configuration.md +26 -0
- package/docs/services/auth.md +21 -2
- package/docs/services/tailordb.md +21 -1
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#174](https://github.com/tailor-platform/sdk/pull/174) [`67483e1`](https://github.com/tailor-platform/sdk/commit/67483e19128b19bb26eea3a99e7f23f304255f14) Thanks [@riku99](https://github.com/riku99)! - Add staticwebsite deploy command to the tailor-sdk CLI for static web hosting
|
|
8
|
+
|
|
9
|
+
Add staticwebsite get command to inspect static website details (name, URL, allowed IP addresses, etc.) from the CLI.
|
|
10
|
+
|
|
11
|
+
Add staticwebsite list command to list static websites (including workspace ID, URL, and allowed IP address count) from the CLI.
|
|
12
|
+
|
|
13
|
+
## 0.18.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#198](https://github.com/tailor-platform/sdk/pull/198) [`7f06c62`](https://github.com/tailor-platform/sdk/commit/7f06c620a2b3baf551dcbd39418fcb0675661463) Thanks [@toiroakr](https://github.com/toiroakr)! - refactor!: rename entityAction to actionEntity
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#203](https://github.com/tailor-platform/sdk/pull/203) [`f3c559e`](https://github.com/tailor-platform/sdk/commit/f3c559e426572431db25f4b71af414650dc6e9a4) Thanks [@remiposo](https://github.com/remiposo)! - Fix Kysely type generation for enum array fields to wrap union types in parentheses
|
|
22
|
+
|
|
23
|
+
- [#192](https://github.com/tailor-platform/sdk/pull/192) [`d2ce834`](https://github.com/tailor-platform/sdk/commit/d2ce8345fb839f6086f4286c27373dfa3336734c) Thanks [@k1LoW](https://github.com/k1LoW)! - feat: support `accessTokenLifetimeSeconds` and `refreshTokenLifetimeSeconds` for auth oauth2 client
|
|
24
|
+
|
|
3
25
|
## 0.17.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/dist/cli/api.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./../user-defined.d.ts" />
|
|
2
2
|
|
|
3
|
-
import { AppConfig, CodeGeneratorBase, Executor, Generator, IdProviderConfig,
|
|
3
|
+
import { AppConfig, CodeGeneratorBase, Executor, Generator, IdProviderConfig, OAuth2ClientInput, Resolver, TailorDBTypeConfig } from "../types-Dz5wcR2h.mjs";
|
|
4
4
|
import "citty";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import "@bufbuild/protobuf/wkt";
|
|
@@ -90,7 +90,7 @@ interface GeneratorAuthInput {
|
|
|
90
90
|
machineUsers?: Record<string, {
|
|
91
91
|
attributes: Record<string, unknown>;
|
|
92
92
|
}>;
|
|
93
|
-
oauth2Clients?: Record<string,
|
|
93
|
+
oauth2Clients?: Record<string, OAuth2ClientInput>;
|
|
94
94
|
idProvider?: IdProviderConfig;
|
|
95
95
|
}
|
|
96
96
|
interface GeneratorInput<T, R> {
|
|
@@ -184,29 +184,29 @@ interface WorkspaceInfo {
|
|
|
184
184
|
}
|
|
185
185
|
//#endregion
|
|
186
186
|
//#region src/cli/workspace/create.d.ts
|
|
187
|
-
interface
|
|
187
|
+
interface CreateWorkspaceOptions {
|
|
188
188
|
name: string;
|
|
189
189
|
region: string;
|
|
190
190
|
deleteProtection?: boolean;
|
|
191
191
|
organizationId?: string;
|
|
192
192
|
folderId?: string;
|
|
193
193
|
}
|
|
194
|
-
declare function
|
|
194
|
+
declare function createWorkspace(options: CreateWorkspaceOptions): Promise<WorkspaceInfo>;
|
|
195
195
|
//#endregion
|
|
196
196
|
//#region src/cli/workspace/list.d.ts
|
|
197
|
-
interface
|
|
197
|
+
interface ListWorkspacesOptions {
|
|
198
198
|
limit?: number;
|
|
199
199
|
}
|
|
200
|
-
declare function
|
|
200
|
+
declare function listWorkspaces(options?: ListWorkspacesOptions): Promise<WorkspaceInfo[]>;
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region src/cli/workspace/delete.d.ts
|
|
203
|
-
interface
|
|
203
|
+
interface DeleteWorkspaceOptions {
|
|
204
204
|
workspaceId: string;
|
|
205
205
|
}
|
|
206
|
-
declare function
|
|
206
|
+
declare function deleteWorkspace(options: DeleteWorkspaceOptions): Promise<void>;
|
|
207
207
|
//#endregion
|
|
208
208
|
//#region src/cli/machineuser/list.d.ts
|
|
209
|
-
interface
|
|
209
|
+
interface ListMachineUsersOptions {
|
|
210
210
|
workspaceId?: string;
|
|
211
211
|
profile?: string;
|
|
212
212
|
configPath?: string;
|
|
@@ -218,10 +218,10 @@ interface MachineUserInfo {
|
|
|
218
218
|
createdAt: string;
|
|
219
219
|
updatedAt: string;
|
|
220
220
|
}
|
|
221
|
-
declare function
|
|
221
|
+
declare function listMachineUsers(options?: ListMachineUsersOptions): Promise<MachineUserInfo[]>;
|
|
222
222
|
//#endregion
|
|
223
223
|
//#region src/cli/machineuser/token.d.ts
|
|
224
|
-
interface
|
|
224
|
+
interface GetMachineUserTokenOptions {
|
|
225
225
|
name: string;
|
|
226
226
|
workspaceId?: string;
|
|
227
227
|
profile?: string;
|
|
@@ -232,7 +232,7 @@ interface MachineUserTokenInfo {
|
|
|
232
232
|
tokenType: string;
|
|
233
233
|
expiresAt: string;
|
|
234
234
|
}
|
|
235
|
-
declare function
|
|
235
|
+
declare function getMachineUserToken(options: GetMachineUserTokenOptions): Promise<MachineUserTokenInfo>;
|
|
236
236
|
//#endregion
|
|
237
237
|
//#region src/cli/oauth2client/transform.d.ts
|
|
238
238
|
interface OAuth2ClientInfo {
|
|
@@ -254,21 +254,21 @@ interface OAuth2ClientCredentials {
|
|
|
254
254
|
}
|
|
255
255
|
//#endregion
|
|
256
256
|
//#region src/cli/oauth2client/get.d.ts
|
|
257
|
-
interface
|
|
257
|
+
interface GetOAuth2ClientOptions {
|
|
258
258
|
name: string;
|
|
259
259
|
workspaceId?: string;
|
|
260
260
|
profile?: string;
|
|
261
261
|
configPath?: string;
|
|
262
262
|
}
|
|
263
|
-
declare function
|
|
263
|
+
declare function getOAuth2Client(options: GetOAuth2ClientOptions): Promise<OAuth2ClientCredentials>;
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region src/cli/oauth2client/list.d.ts
|
|
266
|
-
interface
|
|
266
|
+
interface ListOAuth2ClientsOptions {
|
|
267
267
|
workspaceId?: string;
|
|
268
268
|
profile?: string;
|
|
269
269
|
configPath?: string;
|
|
270
270
|
}
|
|
271
|
-
declare function
|
|
271
|
+
declare function listOAuth2Clients(options?: ListOAuth2ClientsOptions): Promise<OAuth2ClientInfo[]>;
|
|
272
272
|
//#endregion
|
|
273
273
|
//#region src/cli/workflow/transform.d.ts
|
|
274
274
|
interface WorkflowListInfo {
|
|
@@ -303,22 +303,22 @@ interface WorkflowExecutionInfo {
|
|
|
303
303
|
}
|
|
304
304
|
//#endregion
|
|
305
305
|
//#region src/cli/workflow/list.d.ts
|
|
306
|
-
interface
|
|
306
|
+
interface ListWorkflowsOptions {
|
|
307
307
|
workspaceId?: string;
|
|
308
308
|
profile?: string;
|
|
309
309
|
}
|
|
310
|
-
declare function
|
|
310
|
+
declare function listWorkflows(options?: ListWorkflowsOptions): Promise<WorkflowListInfo[]>;
|
|
311
311
|
//#endregion
|
|
312
312
|
//#region src/cli/workflow/get.d.ts
|
|
313
|
-
interface
|
|
313
|
+
interface GetWorkflowOptions {
|
|
314
314
|
nameOrId: string;
|
|
315
315
|
workspaceId?: string;
|
|
316
316
|
profile?: string;
|
|
317
317
|
}
|
|
318
|
-
declare function
|
|
318
|
+
declare function getWorkflow(options: GetWorkflowOptions): Promise<WorkflowInfo>;
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/cli/workflow/start.d.ts
|
|
321
|
-
interface
|
|
321
|
+
interface StartWorkflowOptions {
|
|
322
322
|
nameOrId: string;
|
|
323
323
|
machineUser: string;
|
|
324
324
|
arg?: Jsonifiable;
|
|
@@ -327,20 +327,20 @@ interface WorkflowStartOptions {
|
|
|
327
327
|
configPath?: string;
|
|
328
328
|
interval?: number;
|
|
329
329
|
}
|
|
330
|
-
interface
|
|
330
|
+
interface StartWorkflowResultWithWait {
|
|
331
331
|
executionId: string;
|
|
332
332
|
wait: () => Promise<WorkflowExecutionInfo>;
|
|
333
333
|
}
|
|
334
|
-
declare function
|
|
334
|
+
declare function startWorkflow(options: StartWorkflowOptions): Promise<StartWorkflowResultWithWait>;
|
|
335
335
|
//#endregion
|
|
336
336
|
//#region src/cli/workflow/executions.d.ts
|
|
337
|
-
interface
|
|
337
|
+
interface ListWorkflowExecutionsOptions {
|
|
338
338
|
workspaceId?: string;
|
|
339
339
|
profile?: string;
|
|
340
340
|
workflowName?: string;
|
|
341
341
|
status?: string;
|
|
342
342
|
}
|
|
343
|
-
interface
|
|
343
|
+
interface GetWorkflowExecutionOptions {
|
|
344
344
|
executionId: string;
|
|
345
345
|
workspaceId?: string;
|
|
346
346
|
profile?: string;
|
|
@@ -353,25 +353,25 @@ interface WorkflowExecutionDetailInfo extends WorkflowExecutionInfo {
|
|
|
353
353
|
result?: string;
|
|
354
354
|
})[];
|
|
355
355
|
}
|
|
356
|
-
interface
|
|
356
|
+
interface GetWorkflowExecutionResult {
|
|
357
357
|
execution: WorkflowExecutionDetailInfo;
|
|
358
358
|
wait: () => Promise<WorkflowExecutionDetailInfo>;
|
|
359
359
|
}
|
|
360
|
-
declare function
|
|
361
|
-
declare function
|
|
360
|
+
declare function listWorkflowExecutions(options?: ListWorkflowExecutionsOptions): Promise<WorkflowExecutionInfo[]>;
|
|
361
|
+
declare function getWorkflowExecution(options: GetWorkflowExecutionOptions): Promise<GetWorkflowExecutionResult>;
|
|
362
362
|
//#endregion
|
|
363
363
|
//#region src/cli/workflow/resume.d.ts
|
|
364
|
-
interface
|
|
364
|
+
interface ResumeWorkflowOptions {
|
|
365
365
|
executionId: string;
|
|
366
366
|
workspaceId?: string;
|
|
367
367
|
profile?: string;
|
|
368
368
|
interval?: number;
|
|
369
369
|
}
|
|
370
|
-
interface
|
|
370
|
+
interface ResumeWorkflowResultWithWait {
|
|
371
371
|
executionId: string;
|
|
372
372
|
wait: () => Promise<WorkflowExecutionInfo>;
|
|
373
373
|
}
|
|
374
|
-
declare function
|
|
374
|
+
declare function resumeWorkflow(options: ResumeWorkflowOptions): Promise<ResumeWorkflowResultWithWait>;
|
|
375
375
|
//#endregion
|
|
376
376
|
//#region src/cli/context.d.ts
|
|
377
377
|
declare function loadWorkspaceId(opts?: {
|
|
@@ -383,5 +383,5 @@ declare function loadAccessToken(opts?: {
|
|
|
383
383
|
profile?: string;
|
|
384
384
|
}): Promise<string>;
|
|
385
385
|
//#endregion
|
|
386
|
-
export { type ApplicationInfo, type ApplyOptions, type CodeGenerator, type
|
|
386
|
+
export { type ApplicationInfo, type ApplyOptions, type CodeGenerator, type CreateWorkspaceOptions, type DeleteWorkspaceOptions, type Executor, type GenerateOptions, type GeneratorInput, type GeneratorResult, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowOptions, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListWorkflowExecutionsOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type MachineUserInfo, type MachineUserTokenInfo, type OAuth2ClientCredentials, type OAuth2ClientInfo, type RemoveOptions, type Resolver, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, type ShowOptions, type StartWorkflowOptions, type StartWorkflowResultWithWait, type ParsedTailorDBType as TailorDBType, type WorkflowExecutionInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkspaceInfo, apply, createWorkspace, deleteWorkspace, generate, generateUserTypes, getMachineUserToken, getOAuth2Client, getWorkflow, getWorkflowExecution, listMachineUsers, listOAuth2Clients, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, remove, resumeWorkflow, show, startWorkflow };
|
|
387
387
|
//# sourceMappingURL=api.d.mts.map
|
package/dist/cli/api.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { apply,
|
|
1
|
+
import { apply, createWorkspace, deleteWorkspace, generate, generateUserTypes, getMachineUserToken, getOAuth2Client, getWorkflow, getWorkflowExecution, listMachineUsers, listOAuth2Clients, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, remove, resumeWorkflow, show, startWorkflow } from "../resume-8Y9mmXHa.mjs";
|
|
2
2
|
import "../job-CL8myeqs.mjs";
|
|
3
3
|
import { register } from "node:module";
|
|
4
4
|
|
|
@@ -6,5 +6,5 @@ import { register } from "node:module";
|
|
|
6
6
|
register("tsx", import.meta.url, { data: {} });
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
|
-
export { apply,
|
|
9
|
+
export { apply, createWorkspace, deleteWorkspace, generate, generateUserTypes, getMachineUserToken, getOAuth2Client, getWorkflow, getWorkflowExecution, listMachineUsers, listOAuth2Clients, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, remove, resumeWorkflow, show, startWorkflow };
|
|
10
10
|
//# sourceMappingURL=api.mjs.map
|
package/dist/cli/api.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.mjs","names":[],"sources":["../../src/cli/api.ts"],"sourcesContent":["// CLI API exports for programmatic usage\nimport { register } from \"node:module\";\n\n// Register tsx to handle TypeScript files when using CLI API programmatically\nregister(\"tsx\", import.meta.url, { data: {} });\n\nexport { apply } from \"./apply/index\";\nexport type { ApplyOptions } from \"./apply/index\";\nexport { generate } from \"./generator/index\";\nexport type { GenerateOptions } from \"./generator/options\";\nexport { loadConfig } from \"./config-loader\";\nexport { generateUserTypes } from \"./type-generator\";\nexport type {\n CodeGenerator,\n GeneratorInput,\n GeneratorResult,\n} from \"./generator/types\";\nexport type { ParsedTailorDBType as TailorDBType } from \"@/parser/service/tailordb/types\";\nexport type { Resolver } from \"@/parser/service/resolver\";\nexport type { Executor } from \"@/parser/service/executor\";\n\nexport { show, type ShowOptions, type ApplicationInfo } from \"./show\";\nexport { remove, type RemoveOptions } from \"./remove\";\nexport {\n
|
|
1
|
+
{"version":3,"file":"api.mjs","names":[],"sources":["../../src/cli/api.ts"],"sourcesContent":["// CLI API exports for programmatic usage\nimport { register } from \"node:module\";\n\n// Register tsx to handle TypeScript files when using CLI API programmatically\nregister(\"tsx\", import.meta.url, { data: {} });\n\nexport { apply } from \"./apply/index\";\nexport type { ApplyOptions } from \"./apply/index\";\nexport { generate } from \"./generator/index\";\nexport type { GenerateOptions } from \"./generator/options\";\nexport { loadConfig } from \"./config-loader\";\nexport { generateUserTypes } from \"./type-generator\";\nexport type {\n CodeGenerator,\n GeneratorInput,\n GeneratorResult,\n} from \"./generator/types\";\nexport type { ParsedTailorDBType as TailorDBType } from \"@/parser/service/tailordb/types\";\nexport type { Resolver } from \"@/parser/service/resolver\";\nexport type { Executor } from \"@/parser/service/executor\";\n\nexport { show, type ShowOptions, type ApplicationInfo } from \"./show\";\nexport { remove, type RemoveOptions } from \"./remove\";\nexport {\n createWorkspace,\n type CreateWorkspaceOptions,\n} from \"./workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./workspace/list\";\nexport {\n deleteWorkspace,\n type DeleteWorkspaceOptions,\n} from \"./workspace/delete\";\nexport type { WorkspaceInfo } from \"./workspace/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./machineuser/token\";\nexport {\n getOAuth2Client,\n type GetOAuth2ClientOptions,\n} from \"./oauth2client/get\";\nexport {\n listOAuth2Clients,\n type ListOAuth2ClientsOptions,\n} from \"./oauth2client/list\";\nexport type {\n OAuth2ClientInfo,\n OAuth2ClientCredentials,\n} from \"./oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./workflow/list\";\nexport { getWorkflow, type GetWorkflowOptions } from \"./workflow/get\";\nexport {\n startWorkflow,\n type StartWorkflowOptions,\n type StartWorkflowResultWithWait,\n} from \"./workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n} from \"./workflow/executions\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./workflow/transform\";\nexport { loadAccessToken, loadWorkspaceId } from \"./context\";\n"],"mappings":";;;;;AAIA,SAAS,OAAO,OAAO,KAAK,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC"}
|