@marianmeres/collection-types 1.40.0 → 2.0.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/dist/adapter.d.ts CHANGED
@@ -36,8 +36,8 @@ export interface AdapterOptions {
36
36
  postInitSql: string;
37
37
  /** Custom SQL for userland initialization */
38
38
  customPreInitSql: string;
39
- /** Foreign key constraint to project table */
40
- projectIdFk: null | {
39
+ /** Foreign key constraint to the tenant table */
40
+ tenantIdFk: null | {
41
41
  table: string;
42
42
  column: string;
43
43
  };
@@ -9,7 +9,7 @@
9
9
  * - Level 2: Page (shown as items within expanded group)
10
10
  * - Level 3: Tab (optional, within a page)
11
11
  *
12
- * URL Pattern: #/p/{projectId}/{areaId}/{groupId}/{pageId}?/{tabPath}?
12
+ * URL Pattern: #/t/{tenantId}/{areaId}/{groupId}/{pageId}?/{tabPath}?
13
13
  *
14
14
  * @module area-pages/types
15
15
  */
@@ -21,7 +21,7 @@ import type { MaybeLocalized } from "./utils.js";
21
21
  export interface AreaPageTab {
22
22
  /**
23
23
  * Unique path segment for this tab.
24
- * Used in URL: #/p/{projectId}/{area}/{groupId}/{pageId}/{path}
24
+ * Used in URL: #/t/{tenantId}/{area}/{groupId}/{pageId}/{path}
25
25
  */
26
26
  path: string;
27
27
  /**
@@ -56,7 +56,7 @@ export interface AreaPageTab {
56
56
  export interface AreaPageDef {
57
57
  /**
58
58
  * Unique identifier for this page within the group.
59
- * Used in URL: #/p/{projectId}/{area}/{groupId}/{id}
59
+ * Used in URL: #/t/{tenantId}/{area}/{groupId}/{id}
60
60
  * Must match directory name: src/routes/{area}/pages/{groupId}/{id}/
61
61
  */
62
62
  id: string;
@@ -123,7 +123,7 @@ export interface AreaPageGroupNavMeta {
123
123
  export interface AreaPageGroupDef {
124
124
  /**
125
125
  * Unique identifier for this group.
126
- * Used in URL: #/p/{projectId}/{area}/{id}
126
+ * Used in URL: #/t/{tenantId}/{area}/{id}
127
127
  * Must match directory name: src/routes/{area}/pages/{id}/
128
128
  */
129
129
  id: string;
@@ -9,7 +9,7 @@
9
9
  * - Level 2: Page (shown as items within expanded group)
10
10
  * - Level 3: Tab (optional, within a page)
11
11
  *
12
- * URL Pattern: #/p/{projectId}/{areaId}/{groupId}/{pageId}?/{tabPath}?
12
+ * URL Pattern: #/t/{tenantId}/{areaId}/{groupId}/{pageId}?/{tabPath}?
13
13
  *
14
14
  * @module area-pages/types
15
15
  */
@@ -70,8 +70,8 @@ export interface CollectionDTOIn {
70
70
  export interface CollectionDTOOut extends CollectionDTOIn {
71
71
  /** Unique collection identifier */
72
72
  collection_id: UUID;
73
- /** Project this collection belongs to */
74
- project_id: UUID;
73
+ /** Tenant this collection belongs to */
74
+ tenant_id: string;
75
75
  /** Unique path identifier (ltree format) */
76
76
  path: LtreePath;
77
77
  /** Maximum number of models allowed (-1 for unlimited, default -1) */
@@ -55,8 +55,16 @@ export interface AddressData {
55
55
  city: string;
56
56
  /** Postal/ZIP code */
57
57
  postal_code: string;
58
- /** Country code or name (legacy/fallback) */
58
+ /** Country code (ISO alpha-2 from the stuic ≥ 3.85 picker; legacy rows
59
+ * may still hold free-text values like "United States"). */
59
60
  country: string;
61
+ /**
62
+ * State / region / province. Optional at the schema level; the checkout
63
+ * flow enforces it for US addresses (substantive for tax + shipping
64
+ * carrier). Free text — no enum today; see plan for future US-state
65
+ * dropdown follow-up.
66
+ */
67
+ state_or_region?: string;
60
68
  /** Contact phone */
61
69
  phone?: string;
62
70
  /** Whether this is the default address for its type */
@@ -17,8 +17,8 @@ import type { UUID, ISODateString, UserData } from "./utils.js";
17
17
  * ```
18
18
  */
19
19
  export interface RelationTypeDTOIn {
20
- /** Project identifier */
21
- project_id?: UUID;
20
+ /** Tenant identifier */
21
+ tenant_id?: string;
22
22
  /** Unique relation type name (business key) */
23
23
  relation_type?: string;
24
24
  /** Collection ID of the "from" models */
package/dist/schema.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { MaybeLocalized } from "./utils.js";
6
6
  /** HTML field type for UI rendering */
7
- export type SchemaHtmlType = "text" | "textarea" | "wysiwyg" | "number" | "boolean" | "checkbox" | "parent" | "object" | "select" | "multiselect" | "date" | "datetime" | "time" | "color" | "relation" | "asset" | "json" | "code" | "keyvalues" | "password";
7
+ export type SchemaHtmlType = "text" | "textarea" | "wysiwyg" | "markdown" | "number" | "boolean" | "checkbox" | "parent" | "object" | "select" | "multiselect" | "date" | "datetime" | "time" | "color" | "relation" | "asset" | "json" | "code" | "keyvalues" | "password";
8
8
  /** Configuration for relation-type fields in schema */
9
9
  export interface RelationTypeConfig {
10
10
  relation_type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/collection-types",
3
- "version": "1.40.0",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "main": "dist/mod.js",
6
6
  "types": "dist/mod.d.ts",