@tailor-platform/sdk 1.34.0 → 1.35.0
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 +8 -0
- package/dist/{application-CluuzA0-.mjs → application-BnJRroGX.mjs} +2 -2
- package/dist/{application-CluuzA0-.mjs.map → application-BnJRroGX.mjs.map} +1 -1
- package/dist/application-mGasp_EX.mjs +4 -0
- package/dist/cli/index.mjs +2 -2
- package/dist/cli/lib.d.mts +6 -6
- package/dist/cli/lib.mjs +3 -3
- package/dist/configure/index.d.mts +4 -3
- package/dist/env-MSlwZt8l.d.mts +30 -0
- package/dist/{index-DTJkkO-t.d.mts → index-B1Fgxi8D.d.mts} +2 -2
- package/dist/{index-niQ9Qblw.d.mts → index-BBlE_vQF.d.mts} +2 -2
- package/dist/{index-D4pBPp65.d.mts → index-BG7YCyXF.d.mts} +2 -2
- package/dist/{index-qVqjEYnr.d.mts → index-D-tMAFVp.d.mts} +2 -2
- package/dist/{index--9iVDOXn.d.mts → index-wCoQup4y.d.mts} +4 -3
- package/dist/kysely/index.d.mts +2 -1
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/{kysely-type-BwMqaL3z.mjs → kysely-type-DtnNdHn3.mjs} +5 -2
- package/dist/kysely-type-DtnNdHn3.mjs.map +1 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/index.d.mts +2 -1
- package/dist/{plugin-D8hKE6rZ.d.mts → plugin-CZaJ3_QR.d.mts} +2 -27
- package/dist/{runtime-8G74KN_M.mjs → runtime-D4O-RfcH.mjs} +3 -3
- package/dist/{runtime-8G74KN_M.mjs.map → runtime-D4O-RfcH.mjs.map} +1 -1
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/{workflow.generated-DMt8PNVd.d.mts → workflow.generated-IZ3kLjC_.d.mts} +2 -2
- package/package.json +1 -1
- package/dist/application-CLKuNo-l.mjs +0 -4
- package/dist/kysely-type-BwMqaL3z.mjs.map +0 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { D as FunctionExecution_Type, P as AuthInvokerSchema, V as PATScope, i as fetchAll, l as initOAuth2Client, m as userAgent, n as closeConnectionPool, o as fetchPlatformMachineUserToken, s as fetchUserInfo, u as initOperatorClient } from "../client-CA2NM_4R.mjs";
|
|
4
4
|
import { n as logger, r as styles } from "../logger-qz-Y4sBV.mjs";
|
|
5
|
-
import { At as functionExecutionStatusToString, B as updateCommand$3, Ct as startCommand, D as resumeCommand, Dt as executionsCommand, E as healthCommand, Ft as executeScript, I as showCommand, J as updateCommand$2, Jt as formatMigrationNumber, K as getCommand$4, L as logBetaWarning, M as truncateCommand, Mt as getCommand$1, P as generateCommand$1, Pt as apply, Q as getCommand$3, Qt as getMigrationFiles, Rt as parseMigrationLabelNumber, Tt as getCommand$5, U as treeCommand, W as listCommand$10, X as listCommand$9, Zt as getMigrationFilePath, _ as getCommand$6, _n as isVerbose, _t as listCommand$6, a as updateCommand$4, bt as jobsCommand, cn as sdkNameLabelKey, d as inviteCommand, en as isValidMigrationNumber, et as deleteCommand$3, fn as apiCommand, ft as generate, gn as deploymentArgs, h as listCommand$14, hn as confirmationArgs, ht as triggerCommand, i as isCLIError, it as listCommand$8, jt as formatKeyValueTable, k as listCommand$11, l as listCommand$13, ln as trnPrefix, lt as tokenCommand, mn as commonArgs, mt as webhookCommand, nt as createCommand$3, on as getNamespacesWithMigrations, ot as getCommand$2, p as restoreCommand, pn as defineAppCommand, r as queryCommand, s as removeCommand, sn as prompt, t as isNativeTypeScriptRuntime, tn as loadDiff, ut as listCommand$7, vn as workspaceArgs, w as listCommand$12, x as createCommand$4, y as deleteCommand$4, z as removeCommand$1 } from "../runtime-
|
|
5
|
+
import { At as functionExecutionStatusToString, B as updateCommand$3, Ct as startCommand, D as resumeCommand, Dt as executionsCommand, E as healthCommand, Ft as executeScript, I as showCommand, J as updateCommand$2, Jt as formatMigrationNumber, K as getCommand$4, L as logBetaWarning, M as truncateCommand, Mt as getCommand$1, P as generateCommand$1, Pt as apply, Q as getCommand$3, Qt as getMigrationFiles, Rt as parseMigrationLabelNumber, Tt as getCommand$5, U as treeCommand, W as listCommand$10, X as listCommand$9, Zt as getMigrationFilePath, _ as getCommand$6, _n as isVerbose, _t as listCommand$6, a as updateCommand$4, bt as jobsCommand, cn as sdkNameLabelKey, d as inviteCommand, en as isValidMigrationNumber, et as deleteCommand$3, fn as apiCommand, ft as generate, gn as deploymentArgs, h as listCommand$14, hn as confirmationArgs, ht as triggerCommand, i as isCLIError, it as listCommand$8, jt as formatKeyValueTable, k as listCommand$11, l as listCommand$13, ln as trnPrefix, lt as tokenCommand, mn as commonArgs, mt as webhookCommand, nt as createCommand$3, on as getNamespacesWithMigrations, ot as getCommand$2, p as restoreCommand, pn as defineAppCommand, r as queryCommand, s as removeCommand, sn as prompt, t as isNativeTypeScriptRuntime, tn as loadDiff, ut as listCommand$7, vn as workspaceArgs, w as listCommand$12, x as createCommand$4, y as deleteCommand$4, z as removeCommand$1 } from "../runtime-D4O-RfcH.mjs";
|
|
6
6
|
import { t as readPackageJson } from "../package-json-CfUqjJaQ.mjs";
|
|
7
|
-
import { C as resolveTokens, S as readPlatformConfig, T as writePlatformConfig, a as loadConfig, b as loadAccessToken, g as getDistDir, i as resolveInlineSourcemap, l as ExecutorSchema, o as WorkflowJobSchema, s as ResolverSchema, v as deleteUserTokens, w as saveUserTokens, x as loadWorkspaceId, y as fetchLatestToken } from "../application-
|
|
7
|
+
import { C as resolveTokens, S as readPlatformConfig, T as writePlatformConfig, a as loadConfig, b as loadAccessToken, g as getDistDir, i as resolveInlineSourcemap, l as ExecutorSchema, o as WorkflowJobSchema, s as ResolverSchema, v as deleteUserTokens, w as saveUserTokens, x as loadWorkspaceId, y as fetchLatestToken } from "../application-BnJRroGX.mjs";
|
|
8
8
|
import { a as JSON_FOOTER_MARKER, i as CRASH_LOG_EXTENSION, o as parseCrashReportConfig, r as sendCrashReport, t as initCrashReporting } from "../crash-report-CPkI2-cp.mjs";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import { arg, defineCommand, runCommand, runMain } from "politty";
|
package/dist/cli/lib.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { C as TailorDBType,
|
|
3
|
-
import { n as AppConfig } from "../workflow.generated-
|
|
4
|
-
import { n as kyselyTypePlugin } from "../index-
|
|
5
|
-
import { n as enumConstantsPlugin } from "../index-
|
|
6
|
-
import { n as fileUtilsPlugin } from "../index-
|
|
7
|
-
import { n as seedPlugin } from "../index-
|
|
2
|
+
import { C as TailorDBType, Et as IncomingWebhookTrigger, Ft as IdProvider, It as OAuth2ClientInput, Ot as ScheduleTriggerInput, _t as Resolver, n as Plugin, r as PluginAttachment, w as TypeSourceInfoEntry, xt as Executor } from "../plugin-CZaJ3_QR.mjs";
|
|
3
|
+
import { n as AppConfig } from "../workflow.generated-IZ3kLjC_.mjs";
|
|
4
|
+
import { n as kyselyTypePlugin } from "../index-B1Fgxi8D.mjs";
|
|
5
|
+
import { n as enumConstantsPlugin } from "../index-BBlE_vQF.mjs";
|
|
6
|
+
import { n as fileUtilsPlugin } from "../index-BG7YCyXF.mjs";
|
|
7
|
+
import { n as seedPlugin } from "../index-D-tMAFVp.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { OAuth2Client } from "@badgateway/oauth2-client";
|
|
10
10
|
import { Duration, FieldMask, Timestamp, Value } from "@bufbuild/protobuf/wkt";
|
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import { u as initOperatorClient } from "../client-CA2NM_4R.mjs";
|
|
3
|
-
import { $ as getFolder, $t as getNextMigrationNumber, A as listWorkflows, Bt as DB_TYPES_FILE_NAME, C as listApps, Et as getWorkflow, F as show, Ft as executeScript, G as listOrganizations, Gt as compareLocalTypesWithSnapshot, H as organizationTree, Ht as INITIAL_SCHEMA_NUMBER, It as waitForExecution, Kt as compareSnapshots, Lt as MIGRATION_LABEL_KEY, N as generate$1, Nt as getExecutor, O as resumeWorkflow, Ot as getWorkflowExecution, Pt as apply, Qt as getMigrationFiles, R as remove, S as createWorkspace, St as watchExecutorJob, T as getAppHealth, Ut as MIGRATE_FILE_NAME, V as updateOrganization, Vt as DIFF_FILE_NAME, Wt as SCHEMA_FILE_NAME, Xt as getMigrationDirPath, Y as updateFolder, Yt as getLatestMigrationNumber, Z as listFolders, Zt as getMigrationFilePath, an as hasChanges, at as listOAuth2Clients, b as deleteWorkspace, c as removeUser, ct as getMachineUserToken, dn as apiCall, dt as listMachineUsers, f as inviteUser, ft as generate, g as listWorkspaces, gt as triggerExecutor, in as formatMigrationDiff, j as truncate, kt as listWorkflowExecutions, m as restoreWorkspace, n as query, nn as reconstructSnapshotFromMigrations, o as updateUser, on as getNamespacesWithMigrations, pt as listWebhookExecutors, q as getOrganization, qt as createSnapshotFromLocalTypes, rn as formatDiffSummary, rt as createFolder, st as getOAuth2Client, t as isNativeTypeScriptRuntime, tt as deleteFolder, u as listUsers, un as generateUserTypes, v as getWorkspace, vt as listExecutors, wt as startWorkflow, xt as listExecutorJobs, yt as getExecutorJob, zt as bundleMigrationScript } from "../runtime-
|
|
4
|
-
import { a as loadConfig, b as loadAccessToken, g as getDistDir, x as loadWorkspaceId } from "../application-
|
|
3
|
+
import { $ as getFolder, $t as getNextMigrationNumber, A as listWorkflows, Bt as DB_TYPES_FILE_NAME, C as listApps, Et as getWorkflow, F as show, Ft as executeScript, G as listOrganizations, Gt as compareLocalTypesWithSnapshot, H as organizationTree, Ht as INITIAL_SCHEMA_NUMBER, It as waitForExecution, Kt as compareSnapshots, Lt as MIGRATION_LABEL_KEY, N as generate$1, Nt as getExecutor, O as resumeWorkflow, Ot as getWorkflowExecution, Pt as apply, Qt as getMigrationFiles, R as remove, S as createWorkspace, St as watchExecutorJob, T as getAppHealth, Ut as MIGRATE_FILE_NAME, V as updateOrganization, Vt as DIFF_FILE_NAME, Wt as SCHEMA_FILE_NAME, Xt as getMigrationDirPath, Y as updateFolder, Yt as getLatestMigrationNumber, Z as listFolders, Zt as getMigrationFilePath, an as hasChanges, at as listOAuth2Clients, b as deleteWorkspace, c as removeUser, ct as getMachineUserToken, dn as apiCall, dt as listMachineUsers, f as inviteUser, ft as generate, g as listWorkspaces, gt as triggerExecutor, in as formatMigrationDiff, j as truncate, kt as listWorkflowExecutions, m as restoreWorkspace, n as query, nn as reconstructSnapshotFromMigrations, o as updateUser, on as getNamespacesWithMigrations, pt as listWebhookExecutors, q as getOrganization, qt as createSnapshotFromLocalTypes, rn as formatDiffSummary, rt as createFolder, st as getOAuth2Client, t as isNativeTypeScriptRuntime, tt as deleteFolder, u as listUsers, un as generateUserTypes, v as getWorkspace, vt as listExecutors, wt as startWorkflow, xt as listExecutorJobs, yt as getExecutorJob, zt as bundleMigrationScript } from "../runtime-D4O-RfcH.mjs";
|
|
4
|
+
import { a as loadConfig, b as loadAccessToken, g as getDistDir, x as loadWorkspaceId } from "../application-BnJRroGX.mjs";
|
|
5
5
|
import { n as seedPlugin } from "../seed-BZIFDG27.mjs";
|
|
6
6
|
import { n as enumConstantsPlugin } from "../enum-constants-DI85-fPE.mjs";
|
|
7
7
|
import { n as fileUtilsPlugin } from "../file-utils-C4rXlOVt.mjs";
|
|
8
|
-
import { n as kyselyTypePlugin } from "../kysely-type-
|
|
8
|
+
import { n as kyselyTypePlugin } from "../kysely-type-DtnNdHn3.mjs";
|
|
9
9
|
import * as fs from "node:fs";
|
|
10
10
|
import * as path from "pathe";
|
|
11
11
|
import { resolveTSConfig } from "pkg-types";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { A as BeforeLoginHookArgs, B as TailorAnyDBType, Bt as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { A as BeforeLoginHookArgs, B as TailorAnyDBType, Bt as SCIMAttributeMapping, D as AuthExternalConfig, E as AuthConnectionTokenResult, F as UserAttributeListKey, Ft as IdProvider, G as PermissionCondition, H as TailorDBInstance, Ht as SCIMConfig, I as UserAttributeMap, It as OAuth2ClientInput, J as unsafeAllowAllGqlPermission, K as TailorTypeGqlPermission, L as UsernameFieldKey, Lt as OIDC, M as OAuth2ClientGrantType, N as SCIMAttributeType, Nt as BuiltinIdP, O as AuthOwnConfig, P as UserAttributeKey, Pt as IDToken, R as ValueOperand, Rt as SAML, T as AuthConfig, U as TailorDBType, Ut as SCIMResource, V as TailorDBField, Vt as SCIMAuthorization, W as db, Wt as TenantProvider, Y as unsafeAllowAllTypePermission, _ as GeneratorResult, _t as Resolver, a as PluginExecutorContext, b as TailorDBNamespaceData, c as PluginGeneratedExecutorWithFile, ct as AttributeMap, d as PluginNamespaceProcessContext, dt as TailorUser, f as PluginOutput, ft as unauthenticatedTailorUser, g as ExecutorReadyContext, gt as AuthConnectionOAuth2Config, h as TypePluginOutput, ht as AuthConnectionConfig, i as PluginConfigs, j as DefinedAuth, k as AuthServiceInput, l as PluginGeneratedResolver, m as TailorDBTypeForPlugin, n as Plugin, o as PluginExecutorContextBase, p as PluginProcessContext, q as TailorTypePermission, r as PluginAttachment, rt as TailorField, s as PluginGeneratedExecutor, st as AttributeList, t as NamespacePluginOutput, u as PluginGeneratedType, v as ResolverNamespaceData, x as TailorDBReadyContext, y as ResolverReadyContext, z as TailorAnyDBField, zt as SCIMAttribute } from "../plugin-CZaJ3_QR.mjs";
|
|
3
|
+
import { t as Env } from "../env-MSlwZt8l.mjs";
|
|
4
|
+
import { _ as IdPEmailConfig, a as ResolverExternalConfig, c as WorkflowServiceConfig, d as defineStaticWebSite, f as SecretsConfig, h as IdPExternalConfig, i as ExecutorServiceInput, l as WorkflowServiceInput, m as IdPConfig, o as ResolverServiceConfig, p as defineSecretManager, r as ExecutorServiceConfig, s as ResolverServiceInput, t as RetryPolicy, u as StaticWebsiteConfig, v as IdPGqlOperations, y as IdPGqlOperationsInput } from "../workflow.generated-IZ3kLjC_.mjs";
|
|
5
|
+
import { $ as createWorkflow, A as ResolverExecutedArgs, B as idpUserUpdatedTrigger, C as IdpUserCreatedArgs, D as RecordCreatedArgs, E as IdpUserUpdatedArgs, F as authAccessTokenRevokedTrigger, G as resolverExecutedTrigger, H as recordDeletedTrigger, I as authAccessTokenTrigger, J as Operation, K as FunctionOperation, L as idpUserCreatedTrigger, M as TailorDBTrigger, N as authAccessTokenIssuedTrigger, O as RecordDeletedArgs, P as authAccessTokenRefreshedTrigger, Q as WorkflowConfig, R as idpUserDeletedTrigger, S as IdpUserArgs, T as IdpUserTrigger, U as recordTrigger, V as recordCreatedTrigger, W as recordUpdatedTrigger, X as WorkflowOperation, Y as WebhookOperation, Z as Workflow, _ as AuthAccessTokenArgs, a as defineGenerators, at as createWorkflowJob, b as AuthAccessTokenRevokedArgs, c as createExecutor, ct as AuthInvoker, d as IncomingWebhookRequest, et as WORKFLOW_TEST_ENV_KEY, f as IncomingWebhookTrigger, g as scheduleTrigger, h as ScheduleTrigger, i as defineConfig, it as WorkflowJobOutput, j as ResolverExecutedTrigger, k as RecordUpdatedArgs, l as Trigger, lt as defineAuth, m as ScheduleArgs, n as output, nt as WorkflowJobContext, o as definePlugins, ot as QueryType, p as incomingWebhookTrigger, q as GqlOperation, r as t, rt as WorkflowJobInput, s as defineIdp, st as createResolver, t as __Infer, tt as WorkflowJob, u as IncomingWebhookArgs, v as AuthAccessTokenIssuedArgs, w as IdpUserDeletedArgs, x as AuthAccessTokenTrigger, y as AuthAccessTokenRefreshedArgs, z as idpUserTrigger } from "../index-wCoQup4y.mjs";
|
|
5
6
|
export { AttributeList, AttributeMap, AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, AuthConfig, AuthConnectionConfig, AuthConnectionOAuth2Config, AuthConnectionTokenResult, AuthExternalConfig, AuthInvoker, AuthOwnConfig, AuthServiceInput, BeforeLoginHookArgs, BuiltinIdP, DefinedAuth, Env, ExecutorReadyContext, ExecutorServiceConfig, ExecutorServiceInput, FunctionOperation, GeneratorResult, GqlOperation, IDToken, IdPConfig, IdPEmailConfig, IdPExternalConfig, IdPGqlOperations, IdPGqlOperationsInput as IdPGqlOperationsConfig, IdProvider as IdProviderConfig, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookTrigger, NamespacePluginOutput, OAuth2ClientInput as OAuth2Client, OAuth2ClientGrantType, OIDC, Operation, PermissionCondition, Plugin, PluginAttachment, PluginConfigs, PluginExecutorContext, PluginExecutorContextBase, PluginGeneratedExecutor, PluginGeneratedExecutorWithFile, PluginGeneratedResolver, PluginGeneratedType, PluginNamespaceProcessContext, PluginOutput, PluginProcessContext, QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, ResolverExternalConfig, ResolverNamespaceData, ResolverReadyContext, ResolverServiceConfig, ResolverServiceInput, RetryPolicy, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAttributeType, SCIMAuthorization, SCIMConfig, SCIMResource, ScheduleArgs, ScheduleTrigger, SecretsConfig, StaticWebsiteConfig, TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBNamespaceData, TailorDBReadyContext, TailorDBTrigger, TailorDBType, TailorDBTypeForPlugin, TailorField, TailorTypeGqlPermission, TailorTypePermission, TailorUser, TenantProvider as TenantProviderConfig, Trigger, TypePluginOutput, UserAttributeKey, UserAttributeListKey, UserAttributeMap, UsernameFieldKey, ValueOperand, WORKFLOW_TEST_ENV_KEY, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowJobInput, WorkflowJobOutput, WorkflowOperation, WorkflowServiceConfig, WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
+
import { lt as InferredAttributeList, ut as InferredAttributeMap } from "./plugin-CZaJ3_QR.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/configure/types/actor.d.ts
|
|
5
|
+
/** User type enum values from the Tailor Platform server. */
|
|
6
|
+
type TailorActorType = "USER_TYPE_USER" | "USER_TYPE_MACHINE_USER" | "USER_TYPE_UNSPECIFIED";
|
|
7
|
+
/** Represents an actor in event triggers. */
|
|
8
|
+
type TailorActor = {
|
|
9
|
+
/** The ID of the workspace the user belongs to. */workspaceId: string; /** The ID of the user. */
|
|
10
|
+
userId: string;
|
|
11
|
+
/**
|
|
12
|
+
* A map of the user's attributes.
|
|
13
|
+
* Maps from server's `attributeMap` field.
|
|
14
|
+
*/
|
|
15
|
+
attributes: InferredAttributeMap | null;
|
|
16
|
+
/**
|
|
17
|
+
* A list of the user's attributes.
|
|
18
|
+
* Maps from server's `attributes` field.
|
|
19
|
+
*/
|
|
20
|
+
attributeList: InferredAttributeList; /** The type of the user. */
|
|
21
|
+
userType: TailorActorType;
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/configure/types/env.d.ts
|
|
25
|
+
interface Env {}
|
|
26
|
+
/** Represents environment variables in the Tailor platform. */
|
|
27
|
+
type TailorEnv = keyof Env extends never ? Record<string, string> : Env;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { TailorEnv as n, TailorActor as r, Env as t };
|
|
30
|
+
//# sourceMappingURL=env-MSlwZt8l.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as Plugin } from "./plugin-
|
|
2
|
+
import { n as Plugin } from "./plugin-CZaJ3_QR.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/builtin/kysely-type/index.d.ts
|
|
5
5
|
/** Unique identifier for the Kysely type generator plugin. */
|
|
@@ -16,4 +16,4 @@ type KyselyTypePluginOptions = {
|
|
|
16
16
|
declare function kyselyTypePlugin(options: KyselyTypePluginOptions): Plugin<unknown, KyselyTypePluginOptions>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { kyselyTypePlugin as n, KyselyGeneratorID as t };
|
|
19
|
-
//# sourceMappingURL=index-
|
|
19
|
+
//# sourceMappingURL=index-B1Fgxi8D.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as Plugin } from "./plugin-
|
|
2
|
+
import { n as Plugin } from "./plugin-CZaJ3_QR.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/builtin/enum-constants/index.d.ts
|
|
5
5
|
/** Unique identifier for the enum constants generator plugin. */
|
|
@@ -16,4 +16,4 @@ type EnumConstantsPluginOptions = {
|
|
|
16
16
|
declare function enumConstantsPlugin(options: EnumConstantsPluginOptions): Plugin<unknown, EnumConstantsPluginOptions>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { enumConstantsPlugin as n, EnumConstantsGeneratorID as t };
|
|
19
|
-
//# sourceMappingURL=index-
|
|
19
|
+
//# sourceMappingURL=index-BBlE_vQF.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as Plugin } from "./plugin-
|
|
2
|
+
import { n as Plugin } from "./plugin-CZaJ3_QR.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/builtin/file-utils/index.d.ts
|
|
5
5
|
/** Unique identifier for the file utilities generator plugin. */
|
|
@@ -16,4 +16,4 @@ type FileUtilsPluginOptions = {
|
|
|
16
16
|
declare function fileUtilsPlugin(options: FileUtilsPluginOptions): Plugin<unknown, FileUtilsPluginOptions>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { fileUtilsPlugin as n, FileUtilsGeneratorID as t };
|
|
19
|
-
//# sourceMappingURL=index-
|
|
19
|
+
//# sourceMappingURL=index-BG7YCyXF.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as Plugin } from "./plugin-
|
|
2
|
+
import { n as Plugin } from "./plugin-CZaJ3_QR.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/builtin/seed/index.d.ts
|
|
5
5
|
/** Unique identifier for the seed generator plugin. */
|
|
@@ -18,4 +18,4 @@ type SeedPluginOptions = {
|
|
|
18
18
|
declare function seedPlugin(options: SeedPluginOptions): Plugin<unknown, SeedPluginOptions>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { seedPlugin as n, SeedGeneratorID as t };
|
|
21
|
-
//# sourceMappingURL=index-
|
|
21
|
+
//# sourceMappingURL=index-D-tMAFVp.d.mts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { $ as FieldOptions, At as
|
|
3
|
-
import {
|
|
2
|
+
import { $ as FieldOptions, At as WebhookOperation$1, Ct as FunctionOperation$1, Dt as ResolverExecutedTrigger$1, Et as IncomingWebhookTrigger$1, F as UserAttributeListKey, H as TailorDBInstance, I as UserAttributeMap, Mt as AuthInvoker$1, Ot as ScheduleTriggerInput, Q as FieldMetadata, St as ExecutorInput, Tt as IdpUserTrigger$1, U as TailorDBType, X as ArrayFieldOutput, Z as DefinedFieldMetadata, _t as Resolver, at as JsonCompatible, bt as AuthAccessTokenTrigger$1, dt as TailorUser, et as FieldOutput, it as InferFieldsOutput, j as DefinedAuth, jt as WorkflowOperation$1, k as AuthServiceInput, kt as TailorDBTrigger$1, mt as AllowedValuesOutput, n as Plugin, nt as TailorAnyField, ot as output$1, pt as AllowedValues, rt as TailorField, tt as TailorFieldType, vt as ResolverInput, wt as GqlOperation$1, yt as GeneratorConfig } from "./plugin-CZaJ3_QR.mjs";
|
|
3
|
+
import { n as TailorEnv, r as TailorActor } from "./env-MSlwZt8l.mjs";
|
|
4
|
+
import { b as IdPInput, g as IdpDefinitionBrand, n as AppConfig, t as RetryPolicy } from "./workflow.generated-IZ3kLjC_.mjs";
|
|
4
5
|
import * as _$zod from "zod";
|
|
5
6
|
import { JsonPrimitive, Jsonifiable, Jsonify } from "type-fest";
|
|
6
7
|
import { Client } from "@urql/core";
|
|
@@ -870,4 +871,4 @@ declare namespace t {
|
|
|
870
871
|
}
|
|
871
872
|
//#endregion
|
|
872
873
|
export { createWorkflow as $, ResolverExecutedArgs as A, idpUserUpdatedTrigger as B, IdpUserCreatedArgs as C, RecordCreatedArgs as D, IdpUserUpdatedArgs as E, authAccessTokenRevokedTrigger as F, resolverExecutedTrigger as G, recordDeletedTrigger as H, authAccessTokenTrigger as I, Operation as J, FunctionOperation as K, idpUserCreatedTrigger as L, TailorDBTrigger as M, authAccessTokenIssuedTrigger as N, RecordDeletedArgs as O, authAccessTokenRefreshedTrigger as P, WorkflowConfig as Q, idpUserDeletedTrigger as R, IdpUserArgs as S, IdpUserTrigger as T, recordTrigger as U, recordCreatedTrigger as V, recordUpdatedTrigger as W, WorkflowOperation as X, WebhookOperation as Y, Workflow as Z, AuthAccessTokenArgs as _, defineGenerators as a, createWorkflowJob as at, AuthAccessTokenRevokedArgs as b, createExecutor as c, AuthInvoker as ct, IncomingWebhookRequest as d, WORKFLOW_TEST_ENV_KEY as et, IncomingWebhookTrigger as f, scheduleTrigger as g, ScheduleTrigger as h, defineConfig as i, WorkflowJobOutput as it, ResolverExecutedTrigger as j, RecordUpdatedArgs as k, Trigger as l, defineAuth as lt, ScheduleArgs as m, output as n, WorkflowJobContext as nt, definePlugins as o, QueryType as ot, incomingWebhookTrigger as p, GqlOperation as q, t as r, WorkflowJobInput as rt, defineIdp as s, createResolver as st, infer as t, WorkflowJob as tt, IncomingWebhookArgs as u, AuthAccessTokenIssuedArgs as v, IdpUserDeletedArgs as w, AuthAccessTokenTrigger as x, AuthAccessTokenRefreshedArgs as y, idpUserTrigger as z };
|
|
873
|
-
//# sourceMappingURL=index
|
|
874
|
+
//# sourceMappingURL=index-wCoQup4y.d.mts.map
|
package/dist/kysely/index.d.mts
CHANGED
|
@@ -8,6 +8,7 @@ type ResolveSelect<T> = T extends ColumnType$1<infer S, unknown, unknown> ? S :
|
|
|
8
8
|
type ResolveInsert<T> = T extends ColumnType$1<unknown, infer I, unknown> ? I : T;
|
|
9
9
|
type ResolveUpdate<T> = T extends ColumnType$1<unknown, unknown, infer U> ? U : T;
|
|
10
10
|
type ObjectColumnType<T> = ColumnType$1<{ [K in keyof T]-?: Exclude<ResolveSelect<T[K]>, undefined> }, { [K in keyof T]: ResolveInsert<T[K]> }, { [K in keyof T]: ResolveUpdate<T[K]> }>;
|
|
11
|
+
type ArrayColumnType<T> = ColumnType$1<ResolveSelect<T>[], ResolveInsert<T>[], ResolveUpdate<T>[]>;
|
|
11
12
|
type Generated<T> = T extends ColumnType$1<infer S, infer I, infer U> ? ColumnType$1<S, I | undefined, U> : ColumnType$1<T, T | undefined, T>;
|
|
12
13
|
type Serial<T = string | number> = ColumnType$1<T, never, never>;
|
|
13
14
|
type TailordbKysely<DB> = Kysely$1<DB>;
|
|
@@ -24,5 +25,5 @@ type NamespaceInsertable<NS, T extends NamespaceTableName<NS>> = Insertable$1<Na
|
|
|
24
25
|
type NamespaceSelectable<NS, T extends NamespaceTableName<NS>> = Selectable$1<NamespaceTable<NS, T>>;
|
|
25
26
|
type NamespaceUpdateable<NS, T extends NamespaceTableName<NS>> = Updateable$1<NamespaceTable<NS, T>>;
|
|
26
27
|
//#endregion
|
|
27
|
-
export { type ColumnType, Generated, type Insertable, Kysely, type KyselyConfig, NamespaceDB, NamespaceInsertable, NamespaceSelectable, NamespaceTable, NamespaceTableName, NamespaceTransaction, NamespaceUpdateable, ObjectColumnType, type Selectable, Serial, TailordbDialect, TailordbKysely, Timestamp, type Transaction, type Updateable, createGetDB, sql };
|
|
28
|
+
export { ArrayColumnType, type ColumnType, Generated, type Insertable, Kysely, type KyselyConfig, NamespaceDB, NamespaceInsertable, NamespaceSelectable, NamespaceTable, NamespaceTableName, NamespaceTransaction, NamespaceUpdateable, ObjectColumnType, type Selectable, Serial, TailordbDialect, TailordbKysely, Timestamp, type Transaction, type Updateable, createGetDB, sql };
|
|
28
29
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Kysely","TailordbDialect"],"sources":["../../src/kysely/index.ts"],"sourcesContent":["/**\n * Kysely integration module for generated TailorDB code.\n *\n * Re-exports kysely and function-kysely-tailordb types through a single import path\n * to avoid phantom dependency issues with pnpm, and provides namespace-aware\n * utility types and factory functions used by the code generator.\n */\n\nimport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\nimport {\n type ColumnType,\n Kysely,\n type Insertable,\n type KyselyConfig,\n type Selectable,\n sql,\n type Transaction as KyselyTransaction,\n type Updateable,\n} from \"kysely\";\n\nexport {\n type ColumnType,\n Kysely,\n type KyselyConfig,\n type Transaction,\n type Insertable,\n type Selectable,\n sql,\n type Updateable,\n} from \"kysely\";\n\nexport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\n\nexport type Timestamp = ColumnType<Date, Date | string, Date | string>;\ntype ResolveSelect<T> = T extends ColumnType<infer S, unknown, unknown> ? S : T;\ntype ResolveInsert<T> = T extends ColumnType<unknown, infer I, unknown> ? I : T;\ntype ResolveUpdate<T> = T extends ColumnType<unknown, unknown, infer U> ? U : T;\nexport type ObjectColumnType<T> = ColumnType<\n { [K in keyof T]-?: Exclude<ResolveSelect<T[K]>, undefined> },\n { [K in keyof T]: ResolveInsert<T[K]> },\n { [K in keyof T]: ResolveUpdate<T[K]> }\n>;\nexport type Generated<T> =\n T extends ColumnType<infer S, infer I, infer U>\n ? ColumnType<S, I | undefined, U>\n : ColumnType<T, T | undefined, T>;\nexport type Serial<T = string | number> = ColumnType<T, never, never>;\n\nexport type TailordbKysely<DB> = Kysely<DB>;\nexport type NamespaceDB<NS, N extends keyof NS = keyof NS> = TailordbKysely<NS[N]>;\n\n/**\n * Create a namespace-aware getDB function for generated code.\n * @returns A getDB function that creates Kysely instances for specific namespaces\n */\nexport function createGetDB<NS>() {\n return function getDB<const N extends keyof NS & string>(\n namespace: N,\n config?: Omit<KyselyConfig, \"dialect\">,\n ): TailordbKysely<NS[N]> {\n const client = new tailordb.Client({ namespace });\n return new Kysely<NS[N]>({\n dialect: new TailordbDialect(client),\n ...config,\n });\n };\n}\n\nexport type NamespaceTransaction<NS, K extends keyof NS | TailordbKysely<NS[keyof NS]> = keyof NS> =\n K extends TailordbKysely<infer DB>\n ? KyselyTransaction<DB>\n : K extends keyof NS\n ? KyselyTransaction<NS[K]>\n : never;\n\nexport type NamespaceTableName<NS> = {\n [N in keyof NS]: keyof NS[N];\n}[keyof NS];\n\nexport type NamespaceTable<NS, T extends NamespaceTableName<NS>> = {\n [N in keyof NS]: T extends keyof NS[N] ? NS[N][T] : never;\n}[keyof NS];\n\nexport type NamespaceInsertable<NS, T extends NamespaceTableName<NS>> = Insertable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceSelectable<NS, T extends NamespaceTableName<NS>> = Selectable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceUpdateable<NS, T extends NamespaceTableName<NS>> = Updateable<\n NamespaceTable<NS, T>\n>;\n"],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Kysely","TailordbDialect"],"sources":["../../src/kysely/index.ts"],"sourcesContent":["/**\n * Kysely integration module for generated TailorDB code.\n *\n * Re-exports kysely and function-kysely-tailordb types through a single import path\n * to avoid phantom dependency issues with pnpm, and provides namespace-aware\n * utility types and factory functions used by the code generator.\n */\n\nimport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\nimport {\n type ColumnType,\n Kysely,\n type Insertable,\n type KyselyConfig,\n type Selectable,\n sql,\n type Transaction as KyselyTransaction,\n type Updateable,\n} from \"kysely\";\n\nexport {\n type ColumnType,\n Kysely,\n type KyselyConfig,\n type Transaction,\n type Insertable,\n type Selectable,\n sql,\n type Updateable,\n} from \"kysely\";\n\nexport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\n\nexport type Timestamp = ColumnType<Date, Date | string, Date | string>;\ntype ResolveSelect<T> = T extends ColumnType<infer S, unknown, unknown> ? S : T;\ntype ResolveInsert<T> = T extends ColumnType<unknown, infer I, unknown> ? I : T;\ntype ResolveUpdate<T> = T extends ColumnType<unknown, unknown, infer U> ? U : T;\nexport type ObjectColumnType<T> = ColumnType<\n { [K in keyof T]-?: Exclude<ResolveSelect<T[K]>, undefined> },\n { [K in keyof T]: ResolveInsert<T[K]> },\n { [K in keyof T]: ResolveUpdate<T[K]> }\n>;\nexport type ArrayColumnType<T> = ColumnType<\n ResolveSelect<T>[],\n ResolveInsert<T>[],\n ResolveUpdate<T>[]\n>;\nexport type Generated<T> =\n T extends ColumnType<infer S, infer I, infer U>\n ? ColumnType<S, I | undefined, U>\n : ColumnType<T, T | undefined, T>;\nexport type Serial<T = string | number> = ColumnType<T, never, never>;\n\nexport type TailordbKysely<DB> = Kysely<DB>;\nexport type NamespaceDB<NS, N extends keyof NS = keyof NS> = TailordbKysely<NS[N]>;\n\n/**\n * Create a namespace-aware getDB function for generated code.\n * @returns A getDB function that creates Kysely instances for specific namespaces\n */\nexport function createGetDB<NS>() {\n return function getDB<const N extends keyof NS & string>(\n namespace: N,\n config?: Omit<KyselyConfig, \"dialect\">,\n ): TailordbKysely<NS[N]> {\n const client = new tailordb.Client({ namespace });\n return new Kysely<NS[N]>({\n dialect: new TailordbDialect(client),\n ...config,\n });\n };\n}\n\nexport type NamespaceTransaction<NS, K extends keyof NS | TailordbKysely<NS[keyof NS]> = keyof NS> =\n K extends TailordbKysely<infer DB>\n ? KyselyTransaction<DB>\n : K extends keyof NS\n ? KyselyTransaction<NS[K]>\n : never;\n\nexport type NamespaceTableName<NS> = {\n [N in keyof NS]: keyof NS[N];\n}[keyof NS];\n\nexport type NamespaceTable<NS, T extends NamespaceTableName<NS>> = {\n [N in keyof NS]: T extends keyof NS[N] ? NS[N][T] : never;\n}[keyof NS];\n\nexport type NamespaceInsertable<NS, T extends NamespaceTableName<NS>> = Insertable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceSelectable<NS, T extends NamespaceTableName<NS>> = Selectable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceUpdateable<NS, T extends NamespaceTableName<NS>> = Updateable<\n NamespaceTable<NS, T>\n>;\n"],"mappings":";;;;;;;;;;;;;;;;AA4DA,SAAgB,cAAkB;AAChC,QAAO,SAAS,MACd,WACA,QACuB;AAEvB,SAAO,IAAIA,SAAc;GACvB,SAAS,IAAIC,kBAFA,IAAI,SAAS,OAAO,EAAE,WAAW,CAAC,CAEX;GACpC,GAAG;GACJ,CAAC"}
|
|
@@ -108,8 +108,10 @@ function generateFieldType(fieldConfig) {
|
|
|
108
108
|
const usedUtilityTypes = { ...baseTypeResult.usedUtilityTypes };
|
|
109
109
|
const isArray = fieldConfig.array === true;
|
|
110
110
|
const isNullable = fieldConfig.required !== true;
|
|
111
|
+
const isColumnTypeBase = new Set(["Timestamp"]).has(baseTypeResult.type);
|
|
111
112
|
let finalType = baseTypeResult.type;
|
|
112
|
-
if (isArray)
|
|
113
|
+
if (isArray) if (isColumnTypeBase || finalType.startsWith("ObjectColumnType<")) finalType = `ArrayColumnType<${baseTypeResult.type}>`;
|
|
114
|
+
else finalType = fieldConfig.type === "enum" ? `(${baseTypeResult.type})[]` : `${baseTypeResult.type}[]`;
|
|
113
115
|
if (isNullable) finalType = `${finalType} | null`;
|
|
114
116
|
if (fieldConfig.serial) {
|
|
115
117
|
usedUtilityTypes.Serial = true;
|
|
@@ -178,6 +180,7 @@ function generateUnifiedKyselyTypes(namespaceData) {
|
|
|
178
180
|
const utilityTypeImports = ["type Generated"];
|
|
179
181
|
if (globalUsedUtilityTypes.Timestamp) utilityTypeImports.push("type Timestamp");
|
|
180
182
|
if (namespaceData.some((ns) => ns.types.some((t) => t.typeDef.includes("ObjectColumnType<")))) utilityTypeImports.push("type ObjectColumnType");
|
|
183
|
+
if (namespaceData.some((ns) => ns.types.some((t) => t.typeDef.includes("ArrayColumnType<")))) utilityTypeImports.push("type ArrayColumnType");
|
|
181
184
|
if (globalUsedUtilityTypes.Serial) utilityTypeImports.push("type Serial");
|
|
182
185
|
return [
|
|
183
186
|
ml`
|
|
@@ -269,4 +272,4 @@ function kyselyTypePlugin(options) {
|
|
|
269
272
|
|
|
270
273
|
//#endregion
|
|
271
274
|
export { kyselyTypePlugin as n, KyselyGeneratorID as t };
|
|
272
|
-
//# sourceMappingURL=kysely-type-
|
|
275
|
+
//# sourceMappingURL=kysely-type-DtnNdHn3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kysely-type-DtnNdHn3.mjs","names":[],"sources":["../src/plugin/builtin/kysely-type/type-processor.ts","../src/plugin/builtin/kysely-type/index.ts"],"sourcesContent":["import multiline from \"multiline-ts\";\nimport { type KyselyNamespaceMetadata, type KyselyTypeMetadata } from \"./types\";\nimport type { OperatorFieldConfig, TailorDBType } from \"@/types/tailordb\";\n\ntype UsedUtilityTypes = { Timestamp: boolean; Serial: boolean };\n\ntype FieldTypeResult = {\n type: string;\n usedUtilityTypes: UsedUtilityTypes;\n};\n\n/**\n * Get the enum type definition.\n * @param fieldConfig - The field configuration\n * @returns The enum type as a string union\n */\nfunction getEnumType(fieldConfig: OperatorFieldConfig): string {\n const allowedValues = fieldConfig.allowedValues;\n\n if (allowedValues && Array.isArray(allowedValues)) {\n return allowedValues\n .map((v: string | { value: string }) => {\n const value = typeof v === \"string\" ? v : v.value;\n return `\"${value}\"`;\n })\n .join(\" | \");\n }\n return \"string\";\n}\n\n/**\n * Get the nested object type definition.\n * @param fieldConfig - The field configuration\n * @returns The nested type with used utility types\n */\nfunction getNestedType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fields = fieldConfig.fields;\n if (!fields || typeof fields !== \"object\") {\n return {\n type: \"string\",\n usedUtilityTypes: { Timestamp: false, Serial: false },\n };\n }\n\n const fieldResults = Object.entries(fields).map(([fieldName, config]) => {\n const result = generateFieldType(config);\n const optional = config.required !== true ? \"?\" : \"\";\n return {\n fieldType: `${fieldName}${optional}: ${result.type}`,\n usedUtilityTypes: result.usedUtilityTypes,\n };\n });\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const fieldTypes = fieldResults.map((r) => r.fieldType);\n const obj = `{\\n ${fieldTypes.join(\";\\n \")}${fieldTypes.length > 0 ? \";\" : \"\"}\\n}`;\n\n const hasOptionalFields = Object.values(fields).some((config) => config.required !== true);\n if (aggregatedUtilityTypes.Timestamp || hasOptionalFields) {\n return { type: `ObjectColumnType<${obj}>`, usedUtilityTypes: aggregatedUtilityTypes };\n }\n return { type: obj, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Get the base Kysely type for a field (without array/null modifiers).\n * @param fieldConfig - The field configuration\n * @returns The base type with used utility types\n */\nfunction getBaseType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fieldType = fieldConfig.type;\n const usedUtilityTypes = { Timestamp: false, Serial: false };\n\n let type: string;\n switch (fieldType) {\n case \"uuid\":\n case \"string\":\n case \"decimal\":\n type = \"string\";\n break;\n case \"integer\":\n case \"float\":\n type = \"number\";\n break;\n case \"date\":\n case \"datetime\":\n usedUtilityTypes.Timestamp = true;\n type = \"Timestamp\";\n break;\n case \"bool\":\n case \"boolean\":\n type = \"boolean\";\n break;\n case \"enum\":\n type = getEnumType(fieldConfig);\n break;\n case \"nested\": {\n const nestedResult = getNestedType(fieldConfig);\n return nestedResult;\n }\n default:\n type = \"string\";\n break;\n }\n\n return { type, usedUtilityTypes };\n}\n\n/**\n * Generate the complete field type including array and null modifiers.\n * @param fieldConfig - The field configuration\n * @returns The complete field type with used utility types\n */\nfunction generateFieldType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const baseTypeResult = getBaseType(fieldConfig);\n const usedUtilityTypes = { ...baseTypeResult.usedUtilityTypes };\n\n const isArray = fieldConfig.array === true;\n const isNullable = fieldConfig.required !== true;\n\n // Types that use ColumnType internally (Timestamp, ObjectColumnType) cannot be\n // directly wrapped with [] for arrays, because Kysely only resolves ColumnType at\n // the top-level table property. Use ArrayColumnType/ObjectArrayColumnType to keep\n // the ColumnType at the top level with arrays inside.\n const columnTypeBaseTypes = new Set([\"Timestamp\"]);\n const isColumnTypeBase = columnTypeBaseTypes.has(baseTypeResult.type);\n\n let finalType = baseTypeResult.type;\n if (isArray) {\n if (isColumnTypeBase || finalType.startsWith(\"ObjectColumnType<\")) {\n finalType = `ArrayColumnType<${baseTypeResult.type}>`;\n } else {\n const needsParens = fieldConfig.type === \"enum\";\n finalType = needsParens ? `(${baseTypeResult.type})[]` : `${baseTypeResult.type}[]`;\n }\n }\n if (isNullable) {\n finalType = `${finalType} | null`;\n }\n\n if (fieldConfig.serial) {\n usedUtilityTypes.Serial = true;\n finalType = `Serial<${finalType}>`;\n }\n if (fieldConfig.hooks?.create) {\n finalType = `Generated<${finalType}>`;\n }\n\n return { type: finalType, usedUtilityTypes };\n}\n\n/**\n * Generate the table interface.\n * @param type - The parsed TailorDB type\n * @returns The type definition and used utility types\n */\nfunction generateTableInterface(type: TailorDBType): {\n typeDef: string;\n usedUtilityTypes: UsedUtilityTypes;\n} {\n const fieldEntries = Object.entries(type.fields).filter(([fieldName]) => fieldName !== \"id\");\n\n const fieldResults = fieldEntries.map(([fieldName, parsedField]) => ({\n fieldName,\n ...generateFieldType(parsedField.config),\n }));\n\n const fields = [\n \"id: Generated<string>;\",\n ...fieldResults.map((result) => `${result.fieldName}: ${result.type};`),\n ];\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const typeDef = multiline /* ts */ `\n ${type.name}: {\n ${fields.join(\"\\n\")}\n }\n `;\n\n return { typeDef, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Convert a TailorDBType into KyselyTypeMetadata.\n * @param type - Parsed TailorDB type\n * @returns Generated Kysely type metadata\n */\nexport async function processKyselyType(type: TailorDBType): Promise<KyselyTypeMetadata> {\n const result = generateTableInterface(type);\n\n return {\n name: type.name,\n typeDef: result.typeDef,\n usedUtilityTypes: result.usedUtilityTypes,\n };\n}\n\n/**\n * Generate unified types file from multiple namespaces.\n * @param namespaceData - Namespace metadata\n * @returns Generated types file contents\n */\nexport function generateUnifiedKyselyTypes(namespaceData: KyselyNamespaceMetadata[]): string {\n if (namespaceData.length === 0) {\n return \"\";\n }\n\n // Aggregate used utility types from all namespaces\n const globalUsedUtilityTypes = namespaceData.reduce(\n (acc, ns) => ({\n Timestamp: acc.Timestamp || ns.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || ns.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const utilityTypeImports: string[] = [\"type Generated\"];\n if (globalUsedUtilityTypes.Timestamp) {\n utilityTypeImports.push(\"type Timestamp\");\n }\n const hasObjectColumnType = namespaceData.some((ns) =>\n ns.types.some((t) => t.typeDef.includes(\"ObjectColumnType<\")),\n );\n if (hasObjectColumnType) {\n utilityTypeImports.push(\"type ObjectColumnType\");\n }\n const hasArrayColumnType = namespaceData.some((ns) =>\n ns.types.some((t) => t.typeDef.includes(\"ArrayColumnType<\")),\n );\n if (hasArrayColumnType) {\n utilityTypeImports.push(\"type ArrayColumnType\");\n }\n if (globalUsedUtilityTypes.Serial) {\n utilityTypeImports.push(\"type Serial\");\n }\n\n const importsSection = multiline /* ts */ `\n import {\n createGetDB,\n ${utilityTypeImports.join(\",\\n\")},\n type NamespaceDB,\n type NamespaceInsertable,\n type NamespaceSelectable,\n type NamespaceTable,\n type NamespaceTableName,\n type NamespaceTransaction,\n type NamespaceUpdateable,\n } from \"@tailor-platform/sdk/kysely\";\n `;\n\n // Generate Namespace interface with multiple namespaces\n const namespaceInterfaces = namespaceData\n .map(({ namespace, types }) => {\n const typeDefsWithIndent = types\n .map((type) => {\n return type.typeDef\n .split(\"\\n\")\n .map((line) => (line.trim() ? ` ${line}` : \"\"))\n .join(\"\\n\");\n })\n .join(\"\\n\\n\");\n\n return ` \"${namespace}\": {\\n${typeDefsWithIndent}\\n }`;\n })\n .join(\",\\n\");\n\n const namespaceInterface = `export interface Namespace {\\n${namespaceInterfaces}\\n}`;\n\n const getDBFunction = multiline /* ts */ `\n export const getDB = createGetDB<Namespace>();\n\n export type DB<N extends keyof Namespace = keyof Namespace> = NamespaceDB<Namespace, N>;\n `;\n\n const utilityTypeExports = multiline /* ts */ `\n export type Transaction<K extends keyof Namespace | DB = keyof Namespace> =\n NamespaceTransaction<Namespace, K>;\n\n type TableName = NamespaceTableName<Namespace>;\n export type Table<T extends TableName> = NamespaceTable<Namespace, T>;\n\n export type Insertable<T extends TableName> = NamespaceInsertable<Namespace, T>;\n export type Selectable<T extends TableName> = NamespaceSelectable<Namespace, T>;\n export type Updateable<T extends TableName> = NamespaceUpdateable<Namespace, T>;\n `;\n\n return (\n [importsSection, namespaceInterface, getDBFunction, utilityTypeExports].join(\"\\n\\n\") + \"\\n\"\n );\n}\n","import { processKyselyType, generateUnifiedKyselyTypes } from \"./type-processor\";\nimport type { KyselyTypeMetadata, KyselyNamespaceMetadata } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\n/** Unique identifier for the Kysely type generator plugin. */\nexport const KyselyGeneratorID = \"@tailor-platform/kysely-type\";\n\ntype KyselyTypePluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates Kysely type definitions for TailorDB types.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated types\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function kyselyTypePlugin(\n options: KyselyTypePluginOptions,\n): Plugin<unknown, KyselyTypePluginOptions> {\n return {\n id: KyselyGeneratorID,\n description: \"Generates Kysely type definitions for TailorDB types\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<KyselyTypePluginOptions>,\n ): Promise<GeneratorResult> {\n const allNamespaceData: KyselyNamespaceMetadata[] = [];\n\n for (const ns of ctx.tailordb) {\n const typeMetadataList: KyselyTypeMetadata[] = [];\n\n for (const type of Object.values(ns.types)) {\n const metadata = await processKyselyType(type);\n typeMetadataList.push(metadata);\n }\n\n if (typeMetadataList.length === 0) continue;\n\n const usedUtilityTypes = typeMetadataList.reduce(\n (acc, type) => ({\n Timestamp: acc.Timestamp || type.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || type.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n allNamespaceData.push({\n namespace: ns.namespace,\n types: typeMetadataList,\n usedUtilityTypes,\n });\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (allNamespaceData.length > 0) {\n const content = generateUnifiedKyselyTypes(allNamespaceData);\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n\n return { files };\n },\n };\n}\n"],"mappings":"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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-
|
|
2
|
+
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-BBlE_vQF.mjs";
|
|
3
3
|
export { EnumConstantsGeneratorID, enumConstantsPlugin };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-
|
|
2
|
+
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-BG7YCyXF.mjs";
|
|
3
3
|
export { FileUtilsGeneratorID, fileUtilsPlugin };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-
|
|
2
|
+
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-B1Fgxi8D.mjs";
|
|
3
3
|
export { KyselyGeneratorID, kyselyTypePlugin };
|
package/dist/plugin/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { B as TailorAnyDBType
|
|
2
|
+
import { B as TailorAnyDBType } from "../plugin-CZaJ3_QR.mjs";
|
|
3
|
+
import { n as TailorEnv, r as TailorActor } from "../env-MSlwZt8l.mjs";
|
|
3
4
|
|
|
4
5
|
//#region src/plugin/with-context.d.ts
|
|
5
6
|
/**
|
|
@@ -437,31 +437,6 @@ type TailorUser = {
|
|
|
437
437
|
/** Represents an unauthenticated user in the Tailor platform. */
|
|
438
438
|
declare const unauthenticatedTailorUser: TailorUser;
|
|
439
439
|
//#endregion
|
|
440
|
-
//#region src/configure/types/actor.d.ts
|
|
441
|
-
/** User type enum values from the Tailor Platform server. */
|
|
442
|
-
type TailorActorType = "USER_TYPE_USER" | "USER_TYPE_MACHINE_USER" | "USER_TYPE_UNSPECIFIED";
|
|
443
|
-
/** Represents an actor in event triggers. */
|
|
444
|
-
type TailorActor = {
|
|
445
|
-
/** The ID of the workspace the user belongs to. */workspaceId: string; /** The ID of the user. */
|
|
446
|
-
userId: string;
|
|
447
|
-
/**
|
|
448
|
-
* A map of the user's attributes.
|
|
449
|
-
* Maps from server's `attributeMap` field.
|
|
450
|
-
*/
|
|
451
|
-
attributes: InferredAttributeMap | null;
|
|
452
|
-
/**
|
|
453
|
-
* A list of the user's attributes.
|
|
454
|
-
* Maps from server's `attributes` field.
|
|
455
|
-
*/
|
|
456
|
-
attributeList: InferredAttributeList; /** The type of the user. */
|
|
457
|
-
userType: TailorActorType;
|
|
458
|
-
};
|
|
459
|
-
//#endregion
|
|
460
|
-
//#region src/configure/types/env.d.ts
|
|
461
|
-
interface Env {}
|
|
462
|
-
/** Represents environment variables in the Tailor platform. */
|
|
463
|
-
type TailorEnv = keyof Env extends never ? Record<string, string> : Env;
|
|
464
|
-
//#endregion
|
|
465
440
|
//#region src/configure/types/helpers.d.ts
|
|
466
441
|
type Prettify<T> = { [K in keyof T as string extends K ? never : K]: T[K] } & {};
|
|
467
442
|
type DeepWritable<T> = T extends Date | RegExp | Function ? T : T extends object ? { -readonly [P in keyof T]: DeepWritable<T[P]> } & {} : T;
|
|
@@ -2093,5 +2068,5 @@ interface Plugin<TypeConfig = unknown, PluginConfig = unknown> {
|
|
|
2093
2068
|
onExecutorReady?(context: ExecutorReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
|
|
2094
2069
|
}
|
|
2095
2070
|
//#endregion
|
|
2096
|
-
export { FieldOptions as $, BeforeLoginHookArgs as A,
|
|
2097
|
-
//# sourceMappingURL=plugin-
|
|
2071
|
+
export { FieldOptions as $, BeforeLoginHookArgs as A, WebhookOperation as At, TailorAnyDBType as B, SCIMAttributeMapping as Bt, TailorDBType as C, FunctionOperation as Ct, AuthExternalConfig as D, ResolverExecutedTrigger as Dt, AuthConnectionTokenResult as E, IncomingWebhookTrigger as Et, UserAttributeListKey as F, IdProvider as Ft, PermissionCondition as G, TailorDBInstance as H, SCIMConfig as Ht, UserAttributeMap as I, OAuth2ClientInput as It, unsafeAllowAllGqlPermission as J, TailorTypeGqlPermission as K, UsernameFieldKey as L, OIDC as Lt, OAuth2ClientGrantType as M, AuthInvoker as Mt, SCIMAttributeType as N, BuiltinIdP as Nt, AuthOwnConfig as O, ScheduleTriggerInput as Ot, UserAttributeKey as P, IDToken as Pt, FieldMetadata as Q, ValueOperand as R, SAML as Rt, TailorDBServiceInput as S, ExecutorInput as St, AuthConfig as T, IdpUserTrigger as Tt, TailorDBType$1 as U, SCIMResource as Ut, TailorDBField as V, SCIMAuthorization as Vt, db as W, TenantProvider as Wt, ArrayFieldOutput as X, unsafeAllowAllTypePermission as Y, DefinedFieldMetadata as Z, GeneratorResult as _, Resolver as _t, PluginExecutorContext as a, JsonCompatible as at, TailorDBNamespaceData as b, AuthAccessTokenTrigger as bt, PluginGeneratedExecutorWithFile as c, AttributeMap as ct, PluginNamespaceProcessContext as d, TailorUser as dt, FieldOutput$1 as et, PluginOutput as f, unauthenticatedTailorUser as ft, ExecutorReadyContext as g, AuthConnectionOAuth2Config as gt, TypePluginOutput as h, AuthConnectionConfig as ht, PluginConfigs as i, InferFieldsOutput as it, DefinedAuth as j, WorkflowOperation as jt, AuthServiceInput as k, TailorDBTrigger as kt, PluginGeneratedResolver as l, InferredAttributeList as lt, TailorDBTypeForPlugin as m, AllowedValuesOutput as mt, Plugin as n, TailorAnyField as nt, PluginExecutorContextBase as o, output as ot, PluginProcessContext as p, AllowedValues as pt, TailorTypePermission as q, PluginAttachment as r, TailorField as rt, PluginGeneratedExecutor as s, AttributeList as st, NamespacePluginOutput as t, TailorFieldType as tt, PluginGeneratedType as u, InferredAttributeMap as ut, ResolverNamespaceData as v, ResolverInput as vt, TypeSourceInfoEntry as w, GqlOperation as wt, TailorDBReadyContext as x, Executor as xt, ResolverReadyContext as y, GeneratorConfig as yt, TailorAnyDBField as z, SCIMAttribute as zt };
|
|
2072
|
+
//# sourceMappingURL=plugin-CZaJ3_QR.d.mts.map
|
|
@@ -3,7 +3,7 @@ import { A as ExecutorTriggerType, B as AuthSCIMConfig_AuthorizationType, C as T
|
|
|
3
3
|
import { t as db } from "./schema-D27cW0Ca.mjs";
|
|
4
4
|
import { i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-qz-Y4sBV.mjs";
|
|
5
5
|
import { t as readPackageJson } from "./package-json-CfUqjJaQ.mjs";
|
|
6
|
-
import { S as readPlatformConfig, T as writePlatformConfig, _ as hashFile, a as loadConfig, b as loadAccessToken, c as createExecutorService, d as TailorDBTypeSchema, f as stringifyFunction, g as getDistDir, h as createBundleCache, m as loadFilesWithIgnores, n as generatePluginFilesIfNeeded, p as tailorUserMap, r as loadApplication, t as defineApplication, u as OAuth2ClientSchema, x as loadWorkspaceId } from "./application-
|
|
6
|
+
import { S as readPlatformConfig, T as writePlatformConfig, _ as hashFile, a as loadConfig, b as loadAccessToken, c as createExecutorService, d as TailorDBTypeSchema, f as stringifyFunction, g as getDistDir, h as createBundleCache, m as loadFilesWithIgnores, n as generatePluginFilesIfNeeded, p as tailorUserMap, r as loadApplication, t as defineApplication, u as OAuth2ClientSchema, x as loadWorkspaceId } from "./application-BnJRroGX.mjs";
|
|
7
7
|
import { r as withSpan } from "./telemetry-CREcGK8y.mjs";
|
|
8
8
|
import { arg, createDefineCommand, defineCommand, runCommand } from "politty";
|
|
9
9
|
import { z } from "zod";
|
|
@@ -11925,7 +11925,7 @@ async function generate(options) {
|
|
|
11925
11925
|
if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
|
|
11926
11926
|
let pluginManager;
|
|
11927
11927
|
if (plugins.length > 0) pluginManager = new PluginManager(plugins);
|
|
11928
|
-
const { defineApplication } = await import("./application-
|
|
11928
|
+
const { defineApplication } = await import("./application-mGasp_EX.mjs");
|
|
11929
11929
|
const application = defineApplication({
|
|
11930
11930
|
config,
|
|
11931
11931
|
pluginManager
|
|
@@ -14128,4 +14128,4 @@ function isDeno() {
|
|
|
14128
14128
|
|
|
14129
14129
|
//#endregion
|
|
14130
14130
|
export { getFolder as $, getNextMigrationNumber as $t, listWorkflows as A, functionExecutionStatusToString as At, updateCommand$1 as B, DB_TYPES_FILE_NAME as Bt, listApps as C, startCommand as Ct, resumeCommand as D, executionsCommand as Dt, healthCommand as E, getWorkflow as Et, show as F, executeScript as Ft, listOrganizations as G, compareLocalTypesWithSnapshot as Gt, organizationTree as H, INITIAL_SCHEMA_NUMBER as Ht, showCommand as I, waitForExecution$1 as It, updateCommand$2 as J, formatMigrationNumber as Jt, getCommand$1 as K, compareSnapshots as Kt, logBetaWarning as L, MIGRATION_LABEL_KEY as Lt, truncateCommand as M, getCommand$5 as Mt, generate as N, getExecutor as Nt, resumeWorkflow as O, getWorkflowExecution as Ot, generateCommand as P, apply as Pt, getCommand$2 as Q, getMigrationFiles as Qt, remove as R, parseMigrationLabelNumber as Rt, createWorkspace as S, watchExecutorJob as St, getAppHealth as T, getCommand$4 as Tt, treeCommand as U, MIGRATE_FILE_NAME as Ut, updateOrganization as V, DIFF_FILE_NAME as Vt, listCommand$4 as W, SCHEMA_FILE_NAME as Wt, listCommand$5 as X, getMigrationDirPath as Xt, updateFolder as Y, getLatestMigrationNumber as Yt, listFolders as Z, getMigrationFilePath as Zt, getCommand as _, isVerbose as _n, listCommand$8 as _t, updateCommand as a, hasChanges as an, listOAuth2Clients as at, deleteWorkspace as b, jobsCommand as bt, removeUser as c, sdkNameLabelKey as cn, getMachineUserToken as ct, inviteCommand as d, apiCall as dn, listMachineUsers as dt, isValidMigrationNumber as en, deleteCommand$1 as et, inviteUser as f, apiCommand as fn, generate$1 as ft, listWorkspaces as g, deploymentArgs as gn, triggerExecutor as gt, listCommand$1 as h, confirmationArgs as hn, triggerCommand as ht, isCLIError as i, formatMigrationDiff as in, listCommand$6 as it, truncate as j, formatKeyValueTable as jt, listCommand$3 as k, listWorkflowExecutions as kt, listCommand as l, trnPrefix as ln, tokenCommand as lt, restoreWorkspace as m, commonArgs as mn, webhookCommand as mt, query as n, reconstructSnapshotFromMigrations as nn, createCommand$1 as nt, updateUser as o, getNamespacesWithMigrations as on, getCommand$3 as ot, restoreCommand as p, defineAppCommand as pn, listWebhookExecutors as pt, getOrganization as q, createSnapshotFromLocalTypes as qt, queryCommand as r, formatDiffSummary as rn, createFolder as rt, removeCommand as s, prompt as sn, getOAuth2Client as st, isNativeTypeScriptRuntime as t, loadDiff as tn, deleteFolder as tt, listUsers as u, generateUserTypes as un, listCommand$7 as ut, getWorkspace as v, workspaceArgs as vn, listExecutors as vt, listCommand$2 as w, startWorkflow as wt, createCommand as x, listExecutorJobs as xt, deleteCommand as y, getExecutorJob as yt, removeCommand$1 as z, bundleMigrationScript as zt };
|
|
14131
|
-
//# sourceMappingURL=runtime-
|
|
14131
|
+
//# sourceMappingURL=runtime-D4O-RfcH.mjs.map
|