@tailor-platform/sdk 1.55.1 → 1.55.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/application-D6znmyMd.mjs +4 -0
  3. package/dist/{application-DzUlASfA.mjs → application-MY7YJJ-C.mjs} +13 -17
  4. package/dist/application-MY7YJJ-C.mjs.map +1 -0
  5. package/dist/cli/index.mjs +2 -2
  6. package/dist/cli/lib.d.mts +10 -10
  7. package/dist/cli/lib.mjs +2 -2
  8. package/dist/configure/index.d.mts +3 -3
  9. package/dist/configure/index.mjs +2 -8
  10. package/dist/configure/index.mjs.map +1 -1
  11. package/dist/{index-BLsnrEtc.d.mts → index-1APcOP9X.d.mts} +3 -3
  12. package/dist/{index-BE-fpxIo.d.mts → index-CPRnOjjt.d.mts} +2 -2
  13. package/dist/{index-S6-FtUpA.d.mts → index-CQZVJ5SX.d.mts} +2 -2
  14. package/dist/{index-D9xG-a6Y.d.mts → index-CfRFkXIO.d.mts} +2 -2
  15. package/dist/{index-cHqh66cF.d.mts → index-DUupuPhZ.d.mts} +2 -2
  16. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  17. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  18. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  19. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  20. package/dist/{plugin-BuE5ZOnW.d.mts → plugin-C_FyVSdl.d.mts} +3 -3
  21. package/dist/{runtime-CgGeIoxi.mjs → runtime-DH5F_z8A.mjs} +70 -30
  22. package/dist/runtime-DH5F_z8A.mjs.map +1 -0
  23. package/dist/utils/test/index.d.mts +2 -2
  24. package/dist/{workflow.generated-CQg1_Ami.d.mts → workflow.generated-BGLDYJOq.d.mts} +2 -2
  25. package/docs/services/auth.md +11 -0
  26. package/package.json +1 -1
  27. package/dist/application-DM8q9GDI.mjs +0 -4
  28. package/dist/application-DzUlASfA.mjs.map +0 -1
  29. package/dist/runtime-CgGeIoxi.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { M as TailorInvoker } from "../../tailordb-BlBGmQK-.mjs";
2
- import { W as TailorDBType } from "../../workflow.generated-CQg1_Ami.mjs";
3
- import { At as TailorField, bt as WORKFLOW_TEST_ENV_KEY, n as output } from "../../index-BLsnrEtc.mjs";
2
+ import { W as TailorDBType } from "../../workflow.generated-BGLDYJOq.mjs";
3
+ import { At as TailorField, bt as WORKFLOW_TEST_ENV_KEY, n as output } from "../../index-1APcOP9X.mjs";
4
4
  import { StandardSchemaV1 } from "@standard-schema/spec";
5
5
 
6
6
  //#region src/utils/test/mock.d.ts
@@ -1,5 +1,5 @@
1
1
  import { C as FieldOutput$1, D as Validators, E as FieldValidateInput, F as InferFieldsOutput, N as TailorUser, R as Prettify, S as FieldOptions, T as TailorToTs, b as EnumValue, d as TailorDBType$1, f as DBFieldMetadata, g as TailorField, h as SerialConfig, j as InferredAttributeMap, l as TailorDBField$1, m as GqlOperationsConfig, n as RelationType, o as ValueOperand, p as DefinedDBFieldMetadata, r as TailorDBServiceInput, s as TailorAnyDBField$1, t as IndexDef, u as TailorDBInstance$1, v as ArrayFieldOutput, w as TailorFieldType, x as FieldMetadata, y as DefinedFieldMetadata, z as output } from "./tailordb-BlBGmQK-.mjs";
2
- import { B as IdProvider, G as SCIMAttribute, H as OAuth2ClientInput, J as SCIMConfig, L as AuthInvoker, R as BuiltinIdP, V as OAuth2Client, X as TenantProvider, r as PluginConfigs } from "./plugin-BuE5ZOnW.mjs";
2
+ import { B as IdProvider, G as SCIMAttribute, H as OAuth2ClientInput, J as SCIMConfig, L as AuthInvoker, R as BuiltinIdP, V as OAuth2Client, X as TenantProvider, r as PluginConfigs } from "./plugin-C_FyVSdl.mjs";
3
3
  import { n as TailorEnv } from "./env-B-g-qgE4.mjs";
4
4
  import { IsAny, JsonObject, NonEmptyObject } from "type-fest";
5
5
  import { StandardSchemaV1 } from "@standard-schema/spec";
@@ -1393,4 +1393,4 @@ type ConcurrencyPolicy = {
1393
1393
  };
1394
1394
  //#endregion
1395
1395
  export { BeforeLoginHookArgs as A, TailorAnyDBField as B, IdPGqlOperationsInput as C, AuthExternalConfig as D, AuthConnectionTokenResult as E, UserAttributeListKey as F, db as G, TailorDBField as H, UserAttributeMap as I, TailorTypePermission as J, PermissionCondition as K, UsernameFieldKey as L, OAuth2ClientGrantType as M, SCIMAttributeType as N, AuthOwnConfig as O, UserAttributeKey as P, AllowedValuesOutput as Q, AuthConnectionConfig as R, IdPGqlOperations as S, AuthConfig as T, TailorDBInstance as U, TailorAnyDBType as V, TailorDBType as W, unsafeAllowAllTypePermission as X, unsafeAllowAllGqlPermission as Y, AllowedValues as Z, IdPConfig as _, ExecutorServiceConfig as a, IdpDefinitionBrand as b, ResolverServiceConfig as c, WorkflowServiceInput as d, StaticWebsiteConfig as f, SecretsDefinitionBrand as g, SecretsConfig as h, AppConfig as i, DefinedAuth as j, AuthServiceInput as k, ResolverServiceInput as l, StaticWebsiteInput as m, RetryPolicy as n, ExecutorServiceInput as o, StaticWebsiteDefinitionBrand as p, TailorTypeGqlPermission as q, HttpAdapterConfigInput as r, ResolverExternalConfig as s, ConcurrencyPolicy as t, WorkflowServiceConfig as u, IdPExternalConfig as v, IdPInput as w, IdPEmailConfig as x, IdPUserField as y, AuthConnectionOAuth2Config as z };
1396
- //# sourceMappingURL=workflow.generated-CQg1_Ami.d.mts.map
1396
+ //# sourceMappingURL=workflow.generated-BGLDYJOq.d.mts.map
@@ -22,6 +22,7 @@ Configure Auth service using `defineAuth()`:
22
22
 
23
23
  - **One auth per application**: Each application can have exactly one Auth service
24
24
  - **Configuration location**: Define in `tailor.config.ts` using `defineAuth()` and reference directly in the config's `auth` field
25
+ - **`userProfile` and `machineUserAttributes` are mutually exclusive**: Specifying both fails at deploy/generate time with ``Specify either `userProfile` or `machineUserAttributes`, not both.``
25
26
 
26
27
  ```typescript
27
28
  import { defineAuth } from "@tailor-platform/sdk";
@@ -94,6 +95,16 @@ export const user = db.type("User", {
94
95
 
95
96
  **type**: The TailorDB type that stores user records.
96
97
 
98
+ **namespace** (optional): The TailorDB namespace where the user type is defined. Usually auto-resolved from your `db` configuration, so you don't need to specify it. Required only when multiple TailorDB namespaces exist and the type lives in an external TailorDB:
99
+
100
+ ```typescript
101
+ userProfile: {
102
+ namespace: "external-ns", // Explicitly specify the namespace
103
+ type: user,
104
+ usernameField: "email",
105
+ },
106
+ ```
107
+
97
108
  **usernameField**: The field in the TailorDB type used as the username. This field must have a unique constraint (`.unique()`) since it is used to uniquely identify users.
98
109
 
99
110
  **attributes**: Specifies which fields from the TailorDB type are used as user attributes. Set to `true` to enable a field. Enabled attributes must be assigned values in all machine user definitions. Only fields with ValueOperand types (string, boolean, string[], boolean[]) can be used as attributes. The `id` field and datetime/date/time types are excluded.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "1.55.1",
3
+ "version": "1.55.2",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,4 +0,0 @@
1
-
2
- import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-DzUlASfA.mjs";
3
-
4
- export { defineApplication };