@tailor-platform/sdk 2.13.1 → 2.14.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 +40 -0
- package/dist/application-BWOMdL3D.mjs +1 -0
- package/dist/{application-D3HlhR3i.mjs → application-CfevPO-k.mjs} +21 -17
- package/dist/application-CfevPO-k.mjs.map +1 -0
- package/dist/cli/commands/api/api-call.d.mts +4 -5
- package/dist/cli/commands/deploy/config-id-injector.d.mts +3 -4
- package/dist/cli/commands/deploy/deploy.d.mts +3 -4
- package/dist/cli/commands/deploy/function-registry-types.d.mts +2 -3
- package/dist/cli/commands/executor/get.d.mts +3 -4
- package/dist/cli/commands/executor/jobs.d.mts +10 -11
- package/dist/cli/commands/executor/list.d.mts +3 -4
- package/dist/cli/commands/executor/transform.d.mts +6 -7
- package/dist/cli/commands/executor/trigger.d.mts +4 -5
- package/dist/cli/commands/executor/webhook.d.mts +4 -5
- package/dist/cli/commands/function/get.d.mts +3 -4
- package/dist/cli/commands/function/list.d.mts +3 -4
- package/dist/cli/commands/function/transform.d.mts +2 -3
- package/dist/cli/commands/generate/options.d.mts +2 -3
- package/dist/cli/commands/generate/seed/bundler.d.mts +3 -4
- package/dist/cli/commands/generate/service.d.mts +2 -3
- package/dist/cli/commands/machineuser/list.d.mts +4 -5
- package/dist/cli/commands/machineuser/token.d.mts +4 -5
- package/dist/cli/commands/oauth2client/get.d.mts +3 -4
- package/dist/cli/commands/oauth2client/list.d.mts +3 -4
- package/dist/cli/commands/oauth2client/transform.d.mts +3 -4
- package/dist/cli/commands/organization/folder/create.d.mts +3 -4
- package/dist/cli/commands/organization/folder/delete.d.mts +3 -4
- package/dist/cli/commands/organization/folder/get.d.mts +3 -4
- package/dist/cli/commands/organization/folder/list.d.mts +3 -4
- package/dist/cli/commands/organization/folder/update.d.mts +3 -4
- package/dist/cli/commands/organization/get.d.mts +3 -4
- package/dist/cli/commands/organization/list.d.mts +3 -4
- package/dist/cli/commands/organization/transform.d.mts +5 -6
- package/dist/cli/commands/organization/tree.d.mts +3 -4
- package/dist/cli/commands/organization/update.d.mts +3 -4
- package/dist/cli/commands/remove.d.mts +3 -4
- package/dist/cli/commands/show.d.mts +6 -7
- package/dist/cli/commands/staticwebsite/deploy.d.mts +3 -4
- package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -4
- package/dist/cli/commands/tailordb/migrate/config.d.mts +3 -4
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +35 -35
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +3 -4
- package/dist/cli/commands/tailordb/migrate/rename-detection.d.mts +3 -4
- package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +4 -5
- package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +13 -14
- package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +2 -3
- package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +2 -3
- package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +21 -22
- package/dist/cli/commands/tailordb/migrate/types.d.mts +2 -3
- package/dist/cli/commands/tailordb/truncate.d.mts +3 -4
- package/dist/cli/commands/workflow/executions.d.mts +8 -9
- package/dist/cli/commands/workflow/get.d.mts +3 -4
- package/dist/cli/commands/workflow/list.d.mts +3 -4
- package/dist/cli/commands/workflow/resume.d.mts +4 -5
- package/dist/cli/commands/workflow/start.d.mts +5 -6
- package/dist/cli/commands/workflow/status.d.mts +3 -4
- package/dist/cli/commands/workflow/transform.d.mts +5 -6
- package/dist/cli/commands/workflow/wait.d.mts +3 -4
- package/dist/cli/commands/workflow/waiter.d.mts +3 -4
- package/dist/cli/commands/workspace/app/health.d.mts +3 -4
- package/dist/cli/commands/workspace/app/list.d.mts +3 -4
- package/dist/cli/commands/workspace/app/transform.d.mts +3 -4
- package/dist/cli/commands/workspace/create.d.mts +3 -4
- package/dist/cli/commands/workspace/delete.d.mts +3 -4
- package/dist/cli/commands/workspace/get.d.mts +3 -4
- package/dist/cli/commands/workspace/list.d.mts +3 -4
- package/dist/cli/commands/workspace/restore.d.mts +3 -4
- package/dist/cli/commands/workspace/transform.d.mts +3 -4
- package/dist/cli/commands/workspace/user/invite.d.mts +3 -4
- package/dist/cli/commands/workspace/user/list.d.mts +3 -4
- package/dist/cli/commands/workspace/user/remove.d.mts +3 -4
- package/dist/cli/commands/workspace/user/transform.d.mts +2 -3
- package/dist/cli/commands/workspace/user/update.d.mts +3 -4
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.d.mts +2 -3
- package/dist/cli/main.mjs +43 -41
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/query/index.d.mts +2 -3
- package/dist/cli/shared/args.d.mts +11 -12
- package/dist/cli/shared/beta.d.mts +2 -3
- package/dist/cli/shared/client.d.mts +4 -5
- package/dist/cli/shared/command.d.mts +2 -3
- package/dist/cli/shared/config-loader.d.mts +5 -6
- package/dist/cli/shared/config.d.mts +2 -3
- package/dist/cli/shared/context.d.mts +3 -4
- package/dist/cli/shared/error-json.d.mts +4 -5
- package/dist/cli/shared/logger.d.mts +7 -8
- package/dist/cli/shared/prompt.d.mts +7 -8
- package/dist/cli/shared/readonly-guard.d.mts +2 -3
- package/dist/cli/shared/script-executor.d.mts +7 -8
- package/dist/cli/shared/seed-chunker.d.mts +5 -6
- package/dist/cli/shared/seed-context.d.mts +5 -5
- package/dist/cli/shared/tailordb-namespaces.d.mts +5 -6
- package/dist/cli/shared/type-generator.d.mts +2 -3
- package/dist/cli/shared/workspace-name.d.mts +2 -3
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/configure/config/index.d.mts +3 -4
- package/dist/configure/config/types.d.mts +14 -15
- package/dist/configure/index.d.mts +10 -10
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/aigateway/index.d.mts +2 -2
- package/dist/configure/services/aigateway/types.d.mts +4 -5
- package/dist/configure/services/auth/index.d.mts +3 -3
- package/dist/configure/services/auth/types.d.mts +24 -25
- package/dist/configure/services/executor/executor.d.mts +3 -4
- package/dist/configure/services/executor/operation.d.mts +6 -7
- package/dist/configure/services/executor/trigger/event.d.mts +56 -57
- package/dist/configure/services/executor/trigger/index.d.mts +2 -2
- package/dist/configure/services/executor/trigger/schedule.d.mts +4 -5
- package/dist/configure/services/executor/trigger/webhook.d.mts +8 -9
- package/dist/configure/services/http-adapter/http-adapter.d.mts +12 -13
- package/dist/configure/services/idp/index.d.mts +2 -2
- package/dist/configure/services/idp/permission.d.mts +4 -5
- package/dist/configure/services/idp/types.d.mts +5 -6
- package/dist/configure/services/resolver/permission.d.mts +4 -5
- package/dist/configure/services/resolver/resolver.d.mts +3 -4
- package/dist/configure/services/resolver/types.d.mts +2 -3
- package/dist/configure/services/secrets/index.d.mts +3 -3
- package/dist/configure/services/secrets/types.d.mts +3 -4
- package/dist/configure/services/staticwebsite/index.d.mts +2 -2
- package/dist/configure/services/staticwebsite/types.d.mts +3 -4
- package/dist/configure/services/tailordb/permission.d.mts +6 -7
- package/dist/configure/services/tailordb/schema.d.mts +8 -9
- package/dist/configure/services/tailordb/types.d.mts +25 -26
- package/dist/configure/services/workflow/execution-policy.d.mts +3 -3
- package/dist/configure/services/workflow/execution-policy.types.d.mts +8 -9
- package/dist/configure/services/workflow/job.d.mts +4 -5
- package/dist/configure/services/workflow/wait-point.d.mts +5 -6
- package/dist/configure/services/workflow/workflow.d.mts +4 -4
- package/dist/configure/types/aigateway-name.d.mts +3 -4
- package/dist/configure/types/auth-namespace-name.d.mts +3 -4
- package/dist/configure/types/connection-name.d.mts +3 -4
- package/dist/configure/types/field.d.mts +3 -4
- package/dist/configure/types/field.types.d.mts +18 -12
- package/dist/configure/types/idp-name.d.mts +3 -4
- package/dist/configure/types/permission-operand.types.d.mts +7 -8
- package/dist/configure/types/type.d.mts +3 -4
- package/dist/date-DrUO8rOJ.mjs +2 -0
- package/dist/date-DrUO8rOJ.mjs.map +1 -0
- package/dist/kysely/index.d.mts +18 -18
- package/dist/parser/service/idp/types.d.mts +2 -3
- package/dist/parser/service/tailordb/type-source.d.mts +2 -3
- package/dist/parser/service/tailordb/types.d.mts +13 -14
- package/dist/plugin/builtin/enum-constants/index.d.mts +3 -4
- package/dist/plugin/builtin/file-utils/index.d.mts +3 -4
- package/dist/plugin/builtin/kysely-type/index.d.mts +4 -5
- package/dist/plugin/builtin/seed/index.d.mts +4 -5
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +2 -3
- package/dist/plugin/get-generated-table.d.mts +2 -3
- package/dist/plugin/index.mjs +1 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/types.d.mts +29 -29
- package/dist/plugin/with-context.d.mts +9 -10
- package/dist/register-ts-hook-DZ1Kpt4s.mjs +642 -0
- package/dist/register-ts-hook-DZ1Kpt4s.mjs.map +1 -0
- package/dist/runtime/aigateway.d.mts +4 -5
- package/dist/runtime/authconnection.d.mts +3 -4
- package/dist/runtime/context.d.mts +6 -7
- package/dist/runtime/date.d.mts +16 -0
- package/dist/runtime/field-parse.d.mts +2 -3
- package/dist/runtime/file.d.mts +14 -15
- package/dist/runtime/globals.d.mts +2 -1
- package/dist/runtime/iconv.d.mts +5 -6
- package/dist/runtime/idp.d.mts +14 -15
- package/dist/runtime/index.d.mts +8 -7
- package/dist/runtime/index.mjs +1 -1
- package/dist/runtime/logger.d.mts +10 -11
- package/dist/runtime/secretmanager.d.mts +3 -4
- package/dist/runtime/types.d.mts +7 -8
- package/dist/runtime/workflow.d.mts +7 -8
- package/dist/schema-DMlLMsWA.mjs +2 -0
- package/dist/schema-DMlLMsWA.mjs.map +1 -0
- package/dist/seed/index.d.mts +3 -3
- package/dist/service-7SCy2bhm.mjs +7 -0
- package/dist/service-7SCy2bhm.mjs.map +1 -0
- package/dist/service-CWFQ8EVo.mjs +1 -0
- package/dist/shared/src/color.d.mts +2 -3
- package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +21 -22
- package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +2 -3
- package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +35 -36
- package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +6 -7
- package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +229 -230
- package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +40 -41
- package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +9 -10
- package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +3 -4
- package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +45 -46
- package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +24 -25
- package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +17 -18
- package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +29 -30
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +8 -9
- package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +2 -3
- package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +37 -38
- package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +13 -14
- package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +19 -20
- package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +2 -3
- package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +25 -26
- package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +59 -60
- package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +10 -11
- package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +7 -8
- package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +37 -38
- package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +4 -5
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +6 -7
- package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +21 -22
- package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +3 -4
- package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +50 -51
- package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +4 -5
- package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +74 -75
- package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +35 -36
- package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +41 -42
- package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +11 -12
- package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +97 -98
- package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +11 -12
- package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +209 -210
- package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +24 -25
- package/dist/types/aigateway.generated.d.mts +3 -4
- package/dist/types/app-config.generated.d.mts +2 -3
- package/dist/types/auth-connection.generated.d.mts +3 -4
- package/dist/types/auth.generated.d.mts +15 -16
- package/dist/types/executor.generated.d.mts +26 -27
- package/dist/types/helpers.d.mts +15 -13
- package/dist/types/http-adapter.generated.d.mts +2 -3
- package/dist/types/idp.generated.d.mts +7 -8
- package/dist/types/resolver.generated.d.mts +6 -5
- package/dist/types/secrets.generated.d.mts +3 -4
- package/dist/types/staticwebsite.generated.d.mts +3 -4
- package/dist/types/tailordb.generated.d.mts +7 -8
- package/dist/types/workflow.generated.d.mts +3 -4
- package/dist/utils/test/index.d.mts +3 -4
- package/dist/vitest/index.d.mts +2 -2
- package/dist/vitest/mock-kysely.d.mts +4 -5
- package/dist/vitest/mocks/aigateway.d.mts +3 -4
- package/dist/vitest/mocks/authconnection.d.mts +3 -4
- package/dist/vitest/mocks/file.d.mts +3 -4
- package/dist/vitest/mocks/iconv.d.mts +3 -4
- package/dist/vitest/mocks/idp.d.mts +3 -4
- package/dist/vitest/mocks/logger.d.mts +3 -4
- package/dist/vitest/mocks/secretmanager.d.mts +3 -4
- package/dist/vitest/mocks/tailordb-pglite.d.mts +4 -5
- package/dist/vitest/mocks/tailordb.d.mts +6 -7
- package/dist/vitest/mocks/workflow.d.mts +2 -3
- package/dist/vitest/pglite-kysely.d.mts +5 -6
- package/dist/vitest/setup.d.mts +6 -7
- package/dist/vitest/workflow-local.d.mts +5 -6
- package/docs/services/idp.md +6 -3
- package/docs/services/resolver.md +21 -0
- package/docs/services/tailordb-migration.md +25 -3
- package/docs/services/tailordb.md +2 -0
- package/package.json +13 -13
- package/dist/application-BFTkaW6X.mjs +0 -1
- package/dist/application-D3HlhR3i.mjs.map +0 -1
- package/dist/register-ts-hook-BJmGCQAA.mjs +0 -642
- package/dist/register-ts-hook-BJmGCQAA.mjs.map +0 -1
- package/dist/schema-6d_OHyZf.mjs +0 -2
- package/dist/schema-6d_OHyZf.mjs.map +0 -1
- package/dist/service-BzsSm2f6.mjs +0 -7
- package/dist/service-BzsSm2f6.mjs.map +0 -1
- package/dist/service-CmwD9bwv.mjs +0 -1
|
@@ -6,10 +6,10 @@ import { AIGatewayConfig, AIGatewayDefinitionBrand, AIGatewayServiceInput } from
|
|
|
6
6
|
* @param config - AI Gateway configuration
|
|
7
7
|
* @returns Defined AI Gateway
|
|
8
8
|
*/
|
|
9
|
-
declare function defineAIGateway(name: string, config: Omit<AIGatewayServiceInput, "name">): {
|
|
9
|
+
export declare function defineAIGateway(name: string, config: Omit<AIGatewayServiceInput, "name">): {
|
|
10
10
|
readonly name: string;
|
|
11
11
|
readonly cors?: string[] | undefined;
|
|
12
12
|
readonly authNamespace?: import("@tailor-platform/sdk").AuthNamespaceName;
|
|
13
13
|
} & AIGatewayDefinitionBrand;
|
|
14
14
|
//#endregion
|
|
15
|
-
export {
|
|
15
|
+
export type { AIGatewayConfig };
|
|
@@ -2,14 +2,13 @@ import { AuthNamespaceName } from "../../types/auth-namespace-name.mjs";
|
|
|
2
2
|
import { AIGatewayInput } from "../../../types/aigateway.generated.mjs";
|
|
3
3
|
//#region src/configure/services/aigateway/types.d.ts
|
|
4
4
|
declare const aiGatewayDefinitionBrand: unique symbol;
|
|
5
|
-
type AIGatewayDefinitionBrand = {
|
|
5
|
+
export type AIGatewayDefinitionBrand = {
|
|
6
6
|
readonly [aiGatewayDefinitionBrand]: true;
|
|
7
7
|
};
|
|
8
8
|
/** AI Gateway configuration accepted by `defineAIGateway()`. */
|
|
9
|
-
type AIGatewayServiceInput = Omit<AIGatewayInput, "authNamespace"> & {
|
|
9
|
+
export type AIGatewayServiceInput = Omit<AIGatewayInput, "authNamespace"> & {
|
|
10
10
|
authNamespace?: AuthNamespaceName;
|
|
11
11
|
};
|
|
12
12
|
/** Type accepted by `AppConfig.aiGateways`. Only values returned by `defineAIGateway()` satisfy this. */
|
|
13
|
-
type AIGatewayConfig = AIGatewayInput & AIGatewayDefinitionBrand;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { AIGatewayConfig, AIGatewayDefinitionBrand, AIGatewayServiceInput };
|
|
13
|
+
export type AIGatewayConfig = AIGatewayInput & AIGatewayDefinitionBrand;
|
|
14
|
+
//#endregion
|
|
@@ -27,7 +27,7 @@ type MachineUserOnlyAuthInput<MachineUserNames extends string, MachineUserAttrib
|
|
|
27
27
|
* @param config - Auth service configuration
|
|
28
28
|
* @returns Defined auth service
|
|
29
29
|
*/
|
|
30
|
-
declare function defineAuth<const Name extends string, const User extends TailorDBInstance, const Attributes extends UserAttributes<User>, const AttributeList extends UserAttributeListKey<User>[], const MachineUserNames extends string, const ConnectionNames extends string = string>(name: Name, config: UserProfileAuthInput<User, Attributes, AttributeList, MachineUserNames, ConnectionNames>): DefinedAuth<Name, UserProfileAuthInput<User, Attributes, AttributeList, MachineUserNames, ConnectionNames>>;
|
|
31
|
-
declare function defineAuth<const Name extends string, const MachineUserAttributes extends MachineUserAttributeFields, const MachineUserNames extends string, const ConnectionNames extends string = string>(name: Name, config: MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes, ConnectionNames>): DefinedAuth<Name, MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes, ConnectionNames>>;
|
|
30
|
+
export declare function defineAuth<const Name extends string, const User extends TailorDBInstance, const Attributes extends UserAttributes<User>, const AttributeList extends UserAttributeListKey<User>[], const MachineUserNames extends string, const ConnectionNames extends string = string>(name: Name, config: UserProfileAuthInput<User, Attributes, AttributeList, MachineUserNames, ConnectionNames>): DefinedAuth<Name, UserProfileAuthInput<User, Attributes, AttributeList, MachineUserNames, ConnectionNames>>;
|
|
31
|
+
export declare function defineAuth<const Name extends string, const MachineUserAttributes extends MachineUserAttributeFields, const MachineUserNames extends string, const ConnectionNames extends string = string>(name: Name, config: MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes, ConnectionNames>): DefinedAuth<Name, MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes, ConnectionNames>>;
|
|
32
32
|
//#endregion
|
|
33
|
-
export {
|
|
33
|
+
export type { AuthConfig, AuthConnectionConfig, AuthConnectionOAuth2Config, AuthConnectionTokenResult, AuthExternalConfig, AuthOwnConfig, AuthServiceInput, BeforeLoginClaims, BeforeLoginHookArgs, BuiltinIdP, DefinedAuth, FederatedIdentity, FederatedIdentityClaims, FederatedIdentityProvider, IDToken, IdProvider as IdProviderConfig, OAuth2ClientInput as OAuth2Client, OAuth2ClientGrantType, OIDC, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAttributeType, SCIMAuthorization, SCIMConfig, SCIMResource, TenantProvider as TenantProviderConfig, UserAttributeKey, UserAttributeListKey, UserAttributes, UsernameFieldKey, ValueOperand };
|
|
@@ -6,9 +6,9 @@ import { AuthConnectionConfig } from "../../../types/auth-connection.generated.m
|
|
|
6
6
|
import { IdProvider, OAuth2Client, OAuth2ClientInput, SCIMAttribute, SCIMConfig, TenantProvider } from "../../../types/auth.generated.mjs";
|
|
7
7
|
import { IsAny, JsonObject, JsonValue } from "type-fest";
|
|
8
8
|
//#region src/configure/services/auth/types.d.ts
|
|
9
|
-
type OAuth2ClientGrantType = OAuth2Client["grantTypes"][number];
|
|
10
|
-
type SCIMAttributeType = SCIMAttribute["type"];
|
|
11
|
-
interface MachineUserNameRegistry {}
|
|
9
|
+
export type OAuth2ClientGrantType = OAuth2Client["grantTypes"][number];
|
|
10
|
+
export type SCIMAttributeType = SCIMAttribute["type"];
|
|
11
|
+
export interface MachineUserNameRegistry {}
|
|
12
12
|
/**
|
|
13
13
|
* Machine user name.
|
|
14
14
|
*
|
|
@@ -16,13 +16,13 @@ interface MachineUserNameRegistry {}
|
|
|
16
16
|
* to the union of defined machine user names. When no machine users are registered yet,
|
|
17
17
|
* falls back to `string` to avoid blocking editing before the first generate run.
|
|
18
18
|
*/
|
|
19
|
-
type MachineUserName = keyof MachineUserNameRegistry extends never ? string : keyof MachineUserNameRegistry & string;
|
|
19
|
+
export type MachineUserName = keyof MachineUserNameRegistry extends never ? string : keyof MachineUserNameRegistry & string;
|
|
20
20
|
/** Result of retrieving a connection token at runtime. */
|
|
21
|
-
type AuthConnectionTokenResult = {
|
|
21
|
+
export type AuthConnectionTokenResult = {
|
|
22
22
|
access_token: string;
|
|
23
23
|
};
|
|
24
|
-
type ValueOperand = string | boolean | string[] | boolean[];
|
|
25
|
-
type AuthAttributeValue = ValueOperand | null | undefined;
|
|
24
|
+
export type ValueOperand = string | boolean | string[] | boolean[];
|
|
25
|
+
export type AuthAttributeValue = ValueOperand | null | undefined;
|
|
26
26
|
type UserFieldKeys<User extends TailorDBInstance> = keyof output<User> & string;
|
|
27
27
|
type FieldDefined<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = User["fields"][Key] extends {
|
|
28
28
|
_defined: infer Defined;
|
|
@@ -39,10 +39,10 @@ type FieldIsUnique<User extends TailorDBInstance, Key extends UserFieldKeys<User
|
|
|
39
39
|
unique: true;
|
|
40
40
|
} ? true : false;
|
|
41
41
|
type FieldSupportsValueOperand<User extends TailorDBInstance, Key extends UserFieldKeys<User>> = FieldOutput<User, Key> extends ValueOperand | null | undefined ? true : false;
|
|
42
|
-
type UsernameFieldKey<User extends TailorDBInstance> = IsAny<User> extends true ? string : { [K in UserFieldKeys<User>]: FieldIsRequired<User, K> extends true ? FieldIsOfType<User, K, "string"> extends true ? FieldIsArray<User, K> extends true ? never : FieldIsUnique<User, K> extends true ? K : never : never : never; }[UserFieldKeys<User>];
|
|
43
|
-
type UserAttributeKey<User extends TailorDBInstance> = { [K in UserFieldKeys<User>]: K extends "id" ? never : FieldSupportsValueOperand<User, K> extends true ? FieldIsOfType<User, K, "datetime" | "date" | "time"> extends true ? never : K : never; }[UserFieldKeys<User>];
|
|
44
|
-
type UserAttributeListKey<User extends TailorDBInstance> = { [K in UserFieldKeys<User>]: K extends "id" ? never : FieldIsOfType<User, K, "uuid"> extends true ? FieldIsArray<User, K> extends true ? never : K : never; }[UserFieldKeys<User>];
|
|
45
|
-
type UserAttributes<User extends TailorDBInstance> = { [K in UserAttributeKey<User>]?: true; };
|
|
42
|
+
export type UsernameFieldKey<User extends TailorDBInstance> = IsAny<User> extends true ? string : { [K in UserFieldKeys<User>]: FieldIsRequired<User, K> extends true ? FieldIsOfType<User, K, "string"> extends true ? FieldIsArray<User, K> extends true ? never : FieldIsUnique<User, K> extends true ? K : never : never : never; }[UserFieldKeys<User>];
|
|
43
|
+
export type UserAttributeKey<User extends TailorDBInstance> = { [K in UserFieldKeys<User>]: K extends "id" ? never : FieldSupportsValueOperand<User, K> extends true ? FieldIsOfType<User, K, "datetime" | "date" | "time"> extends true ? never : K : never; }[UserFieldKeys<User>];
|
|
44
|
+
export type UserAttributeListKey<User extends TailorDBInstance> = { [K in UserFieldKeys<User>]: K extends "id" ? never : FieldIsOfType<User, K, "uuid"> extends true ? FieldIsArray<User, K> extends true ? never : K : never; }[UserFieldKeys<User>];
|
|
45
|
+
export type UserAttributes<User extends TailorDBInstance> = { [K in UserAttributeKey<User>]?: true; };
|
|
46
46
|
type DisallowExtraKeys<T, Allowed extends PropertyKey> = T & { [K in Exclude<keyof T, Allowed>]: never; };
|
|
47
47
|
type AttributeListValue<User extends TailorDBInstance, Key extends UserAttributeListKey<User>> = Key extends keyof output<User> ? output<User>[Key] : never;
|
|
48
48
|
type AttributeListToTuple<User extends TailorDBInstance, AttributeList extends readonly UserAttributeListKey<User>[]> = { [Index in keyof AttributeList]: AttributeList[Index] extends UserAttributeListKey<User> ? AttributeListValue<User, AttributeList[Index]> : never; };
|
|
@@ -89,7 +89,7 @@ type MachineUser<User extends TailorDBInstance, Attributes extends UserAttribute
|
|
|
89
89
|
attributeList?: string[];
|
|
90
90
|
} : MachineUserFromUserProfile<User, Attributes, AttributeList>;
|
|
91
91
|
/** Upstream OAuth provider that federated a login through the Built-in IdP. */
|
|
92
|
-
type FederatedIdentityProvider = "google" | "microsoft";
|
|
92
|
+
export type FederatedIdentityProvider = "google" | "microsoft";
|
|
93
93
|
/**
|
|
94
94
|
* Profile claims forwarded from the upstream OAuth provider's ID token.
|
|
95
95
|
*
|
|
@@ -97,7 +97,7 @@ type FederatedIdentityProvider = "google" | "microsoft";
|
|
|
97
97
|
* forwarded as-is and reachable through the index signature. Availability
|
|
98
98
|
* varies by provider (e.g. Microsoft does not issue `picture`).
|
|
99
99
|
*/
|
|
100
|
-
type FederatedIdentityClaims = {
|
|
100
|
+
export type FederatedIdentityClaims = {
|
|
101
101
|
name?: string;
|
|
102
102
|
given_name?: string;
|
|
103
103
|
family_name?: string;
|
|
@@ -112,7 +112,7 @@ type FederatedIdentityClaims = {
|
|
|
112
112
|
* Available on {@link BeforeLoginClaims.federated_identity}; `undefined` for
|
|
113
113
|
* password logins.
|
|
114
114
|
*/
|
|
115
|
-
type FederatedIdentity = {
|
|
115
|
+
export type FederatedIdentity = {
|
|
116
116
|
provider: FederatedIdentityProvider;
|
|
117
117
|
claims: FederatedIdentityClaims;
|
|
118
118
|
};
|
|
@@ -121,24 +121,24 @@ type FederatedIdentity = {
|
|
|
121
121
|
* own claims (e.g. `sub`, `email`) plus, for federated logins, the upstream
|
|
122
122
|
* provider's profile under {@link BeforeLoginClaims.federated_identity}.
|
|
123
123
|
*/
|
|
124
|
-
type BeforeLoginClaims = JsonObject & {
|
|
124
|
+
export type BeforeLoginClaims = JsonObject & {
|
|
125
125
|
/** Present only for federated (Google/Microsoft) logins; `undefined` for password logins. */
|
|
126
126
|
federated_identity?: FederatedIdentity;
|
|
127
127
|
};
|
|
128
|
-
type BeforeLoginHookArgs = {
|
|
128
|
+
export type BeforeLoginHookArgs = {
|
|
129
129
|
claims: BeforeLoginClaims;
|
|
130
130
|
idpConfigName: string;
|
|
131
131
|
/** Environment variables defined in `defineConfig({ env })`. */
|
|
132
132
|
env: TailorEnv;
|
|
133
133
|
};
|
|
134
|
-
type BeforeLoginHook<MachineUserNames extends string> = {
|
|
134
|
+
export type BeforeLoginHook<MachineUserNames extends string> = {
|
|
135
135
|
handler(args: BeforeLoginHookArgs): Promise<void>;
|
|
136
136
|
invoker: NoInfer<MachineUserNames>;
|
|
137
137
|
};
|
|
138
138
|
type AuthHooks<MachineUserNames extends string> = {
|
|
139
139
|
beforeLogin?: BeforeLoginHook<MachineUserNames>;
|
|
140
140
|
};
|
|
141
|
-
type AuthServiceInput<User extends TailorDBInstance, Attributes extends UserAttributes<User>, AttributeList extends UserAttributeListKey<User>[], MachineUserNames extends string, MachineUserAttributes extends MachineUserAttributeFields | undefined = MachineUserAttributeFields | undefined, ConnectionNames extends string = string> = {
|
|
141
|
+
export type AuthServiceInput<User extends TailorDBInstance, Attributes extends UserAttributes<User>, AttributeList extends UserAttributeListKey<User>[], MachineUserNames extends string, MachineUserAttributes extends MachineUserAttributeFields | undefined = MachineUserAttributeFields | undefined, ConnectionNames extends string = string> = {
|
|
142
142
|
hooks?: AuthHooks<MachineUserNames>;
|
|
143
143
|
userProfile?: UserProfile<User, Attributes, AttributeList>;
|
|
144
144
|
machineUserAttributes?: MachineUserAttributes;
|
|
@@ -151,18 +151,17 @@ type AuthServiceInput<User extends TailorDBInstance, Attributes extends UserAttr
|
|
|
151
151
|
publishSessionEvents?: boolean;
|
|
152
152
|
};
|
|
153
153
|
declare const authDefinitionBrand: unique symbol;
|
|
154
|
-
type AuthDefinitionBrand = {
|
|
154
|
+
export type AuthDefinitionBrand = {
|
|
155
155
|
readonly [authDefinitionBrand]: true;
|
|
156
156
|
};
|
|
157
|
-
type DefinedAuth<Name extends string, Config> = Config & {
|
|
157
|
+
export type DefinedAuth<Name extends string, Config> = Config & {
|
|
158
158
|
name: Name;
|
|
159
159
|
} & AuthDefinitionBrand;
|
|
160
|
-
type AuthExternalConfig = {
|
|
160
|
+
export type AuthExternalConfig = {
|
|
161
161
|
name: string;
|
|
162
162
|
external: true;
|
|
163
163
|
};
|
|
164
164
|
type AuthServiceInputLoose = AuthServiceInput<any, any, any, string, any>;
|
|
165
|
-
type AuthOwnConfig = DefinedAuth<string, AuthServiceInputLoose>;
|
|
166
|
-
type AuthConfig = AuthOwnConfig | AuthExternalConfig;
|
|
167
|
-
//#endregion
|
|
168
|
-
export { AuthAttributeValue, AuthConfig, AuthConnectionTokenResult, AuthDefinitionBrand, AuthExternalConfig, AuthOwnConfig, AuthServiceInput, BeforeLoginClaims, BeforeLoginHook, BeforeLoginHookArgs, DefinedAuth, FederatedIdentity, FederatedIdentityClaims, FederatedIdentityProvider, MachineUserName, MachineUserNameRegistry, OAuth2ClientGrantType, SCIMAttributeType, UserAttributeKey, UserAttributeListKey, UserAttributes, UsernameFieldKey, ValueOperand };
|
|
165
|
+
export type AuthOwnConfig = DefinedAuth<string, AuthServiceInputLoose>;
|
|
166
|
+
export type AuthConfig = AuthOwnConfig | AuthExternalConfig;
|
|
167
|
+
//#endregion
|
|
@@ -49,7 +49,7 @@ type Executor<T extends Trigger<unknown>, O> = O extends {
|
|
|
49
49
|
* },
|
|
50
50
|
* });
|
|
51
51
|
*/
|
|
52
|
-
declare function createExecutor<T extends Trigger<unknown>, O extends Operation<TriggerArgs<T>> | {
|
|
52
|
+
export declare function createExecutor<T extends Trigger<unknown>, O extends Operation<TriggerArgs<T>> | {
|
|
53
53
|
kind: "workflow";
|
|
54
54
|
workflow: Workflow;
|
|
55
55
|
}>(config: Executor<T, O>): Executor<T, O>;
|
|
@@ -62,9 +62,8 @@ declare function createExecutor<T extends Trigger<unknown>, O extends Operation<
|
|
|
62
62
|
* @param config - Executor configuration
|
|
63
63
|
* @returns The same executor configuration
|
|
64
64
|
*/
|
|
65
|
-
declare function createExecutor<Args, O extends Operation<Args> | {
|
|
65
|
+
export declare function createExecutor<Args, O extends Operation<Args> | {
|
|
66
66
|
kind: "workflow";
|
|
67
67
|
workflow: Workflow;
|
|
68
68
|
}>(config: Executor<Trigger<Args>, O>): Executor<Trigger<Args>, O>;
|
|
69
|
-
//#endregion
|
|
70
|
-
export { createExecutor };
|
|
69
|
+
//#endregion
|
|
@@ -6,7 +6,7 @@ import { Workflow } from "../workflow/workflow.mjs";
|
|
|
6
6
|
import { Client } from "@urql/core";
|
|
7
7
|
//#region src/configure/services/executor/operation.d.ts
|
|
8
8
|
/** Function-based executor operation. The body receives the trigger args and the `invoker`. */
|
|
9
|
-
type FunctionOperation<Args> = Omit<FunctionOperation$1, "body" | "invoker"> & {
|
|
9
|
+
export type FunctionOperation<Args> = Omit<FunctionOperation$1, "body" | "invoker"> & {
|
|
10
10
|
body: (args: Args & {
|
|
11
11
|
invoker: TailorPrincipal | null;
|
|
12
12
|
}) => void | Promise<void>;
|
|
@@ -14,14 +14,14 @@ type FunctionOperation<Args> = Omit<FunctionOperation$1, "body" | "invoker"> & {
|
|
|
14
14
|
};
|
|
15
15
|
type UrqlOperationArgs = Parameters<Client["query"] | Client["mutation"]>;
|
|
16
16
|
/** GraphQL-based executor operation. Executes a GraphQL query or mutation. */
|
|
17
|
-
type GqlOperation<Args> = Omit<GqlOperation$1, "query" | "variables" | "invoker"> & {
|
|
17
|
+
export type GqlOperation<Args> = Omit<GqlOperation$1, "query" | "variables" | "invoker"> & {
|
|
18
18
|
query: UrqlOperationArgs[0];
|
|
19
19
|
variables?: (args: Args) => UrqlOperationArgs[1];
|
|
20
20
|
invoker?: MachineUserName;
|
|
21
21
|
};
|
|
22
22
|
type RequestHeader = "A-IM" | "Accept" | "Accept-Additions" | "Accept-CH" | "Accept-Charset" | "Accept-Datetime" | "Accept-Encoding" | "Accept-Features" | "Accept-Language" | "Accept-Patch" | "Accept-Post" | "Accept-Ranges" | "Accept-Signature" | "Access-Control" | "Access-Control-Allow-Credentials" | "Access-Control-Allow-Headers" | "Access-Control-Allow-Methods" | "Access-Control-Allow-Origin" | "Access-Control-Expose-Headers" | "Access-Control-Max-Age" | "Access-Control-Request-Headers" | "Access-Control-Request-Method" | "Age" | "Allow" | "ALPN" | "Alt-Svc" | "Alt-Used" | "Alternates" | "AMP-Cache-Transform" | "Apply-To-Redirect-Ref" | "Authentication-Control" | "Authentication-Info" | "Authorization" | "Available-Dictionary" | "C-Ext" | "C-Man" | "C-Opt" | "C-PEP" | "C-PEP-Info" | "Cache-Control" | "Cache-Status" | "Cal-Managed-ID" | "CalDAV-Timezones" | "Capsule-Protocol" | "CDN-Cache-Control" | "CDN-Loop" | "Cert-Not-After" | "Cert-Not-Before" | "Clear-Site-Data" | "Client-Cert" | "Client-Cert-Chain" | "Close" | "CMCD-Object" | "CMCD-Request" | "CMCD-Session" | "CMCD-Status" | "CMSD-Dynamic" | "CMSD-Static" | "Concealed-Auth-Export" | "Configuration-Context" | "Connection" | "Content-Base" | "Content-Digest" | "Content-Disposition" | "Content-Encoding" | "Content-ID" | "Content-Language" | "Content-Length" | "Content-Location" | "Content-MD5" | "Content-Range" | "Content-Script-Type" | "Content-Security-Policy" | "Content-Security-Policy-Report-Only" | "Content-Style-Type" | "Content-Type" | "Content-Version" | "Cookie" | "Cookie2" | "Cross-Origin-Embedder-Policy" | "Cross-Origin-Embedder-Policy-Report-Only" | "Cross-Origin-Opener-Policy" | "Cross-Origin-Opener-Policy-Report-Only" | "Cross-Origin-Resource-Policy" | "CTA-Common-Access-Token" | "DASL" | "Date" | "DAV" | "Default-Style" | "Delta-Base" | "Deprecation" | "Depth" | "Derived-From" | "Destination" | "Differential-ID" | "Dictionary-ID" | "Digest" | "DPoP" | "DPoP-Nonce" | "Early-Data" | "EDIINT-Features" | "ETag" | "Expect" | "Expect-CT" | "Expires" | "Ext" | "Forwarded" | "From" | "GetProfile" | "Hobareg" | "Host" | "HTTP2-Settings" | "If" | "If-Match" | "If-Modified-Since" | "If-None-Match" | "If-Range" | "If-Schedule-Tag-Match" | "If-Unmodified-Since" | "IM" | "Include-Referred-Token-Binding-ID" | "Isolation" | "Keep-Alive" | "Label" | "Last-Event-ID" | "Last-Modified" | "Link" | "Link-Template" | "Location" | "Lock-Token" | "Man" | "Max-Forwards" | "Memento-Datetime" | "Meter" | "Method-Check" | "Method-Check-Expires" | "MIME-Version" | "Negotiate" | "NEL" | "OData-EntityId" | "OData-Isolation" | "OData-MaxVersion" | "OData-Version" | "Opt" | "Optional-WWW-Authenticate" | "Ordering-Type" | "Origin" | "Origin-Agent-Cluster" | "OSCORE" | "OSLC-Core-Version" | "Overwrite" | "P3P" | "PEP" | "PEP-Info" | "Permissions-Policy" | "PICS-Label" | "Ping-From" | "Ping-To" | "Position" | "Pragma" | "Prefer" | "Preference-Applied" | "Priority" | "ProfileObject" | "Protocol" | "Protocol-Info" | "Protocol-Query" | "Protocol-Request" | "Proxy-Authenticate" | "Proxy-Authentication-Info" | "Proxy-Authorization" | "Proxy-Features" | "Proxy-Instruction" | "Proxy-Status" | "Public" | "Public-Key-Pins" | "Public-Key-Pins-Report-Only" | "Range" | "Redirect-Ref" | "Referer" | "Referer-Root" | "Referrer-Policy" | "Refresh" | "Repeatability-Client-ID" | "Repeatability-First-Sent" | "Repeatability-Request-ID" | "Repeatability-Result" | "Replay-Nonce" | "Reporting-Endpoints" | "Repr-Digest" | "Retry-After" | "Safe" | "Schedule-Reply" | "Schedule-Tag" | "Sec-GPC" | "Sec-Purpose" | "Sec-Token-Binding" | "Sec-WebSocket-Accept" | "Sec-WebSocket-Extensions" | "Sec-WebSocket-Key" | "Sec-WebSocket-Protocol" | "Sec-WebSocket-Version" | "Security-Scheme" | "Server" | "Server-Timing" | "Set-Cookie" | "Set-Cookie2" | "SetProfile" | "Signature" | "Signature-Input" | "SLUG" | "SoapAction" | "Status-URI" | "Strict-Transport-Security" | "Sunset" | "Surrogate-Capability" | "Surrogate-Control" | "TCN" | "TE" | "Timeout" | "Timing-Allow-Origin" | "Topic" | "Traceparent" | "Tracestate" | "Trailer" | "Transfer-Encoding" | "TTL" | "Upgrade" | "Urgency" | "URI" | "Use-As-Dictionary" | "User-Agent" | "Variant-Vary" | "Vary" | "Via" | "Want-Content-Digest" | "Want-Digest" | "Want-Repr-Digest" | "Warning" | "WWW-Authenticate" | "X-Content-Type-Options" | "X-Frame-Options" | (string & {});
|
|
23
23
|
/** Outbound webhook executor operation. Sends HTTP requests to external URLs. */
|
|
24
|
-
type WebhookOperation<Args> = Omit<WebhookOperation$1, "url" | "requestBody" | "headers"> & {
|
|
24
|
+
export type WebhookOperation<Args> = Omit<WebhookOperation$1, "url" | "requestBody" | "headers"> & {
|
|
25
25
|
url: (args: Args) => string;
|
|
26
26
|
requestBody?: (args: Args) => Record<string, unknown>;
|
|
27
27
|
headers?: { [key in RequestHeader]?: string | {
|
|
@@ -41,10 +41,9 @@ type WorkflowArgsProperty<Args, W extends Workflow> = undefined extends Workflow
|
|
|
41
41
|
args: WorkflowArgs<Args, W>;
|
|
42
42
|
};
|
|
43
43
|
/** Workflow-triggering executor operation. Triggers a workflow in response to an event. */
|
|
44
|
-
type WorkflowOperation<Args, W extends Workflow = Workflow> = Omit<WorkflowOperation$1, "workflowName" | "args" | "invoker"> & {
|
|
44
|
+
export type WorkflowOperation<Args, W extends Workflow = Workflow> = Omit<WorkflowOperation$1, "workflowName" | "args" | "invoker"> & {
|
|
45
45
|
workflow: W;
|
|
46
46
|
invoker?: MachineUserName;
|
|
47
47
|
} & WorkflowArgsProperty<Args, W>;
|
|
48
|
-
type Operation<Args> = FunctionOperation<Args> | GqlOperation<Args> | WebhookOperation<Args> | WorkflowOperation<Args>;
|
|
49
|
-
//#endregion
|
|
50
|
-
export { FunctionOperation, GqlOperation, Operation, WebhookOperation, WorkflowOperation };
|
|
48
|
+
export type Operation<Args> = FunctionOperation<Args> | GqlOperation<Args> | WebhookOperation<Args> | WorkflowOperation<Args>;
|
|
49
|
+
//#endregion
|