@eide/uniformgen 0.1.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/README.md +356 -0
- package/dist/auth/credentials.d.ts +58 -0
- package/dist/auth/credentials.d.ts.map +1 -0
- package/dist/auth/credentials.js +107 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +563 -0
- package/dist/commands/init.d.ts +11 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +113 -0
- package/dist/commands/login.d.ts +9 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +158 -0
- package/dist/commands/logout.d.ts +5 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +13 -0
- package/dist/commands/push.d.ts +13 -0
- package/dist/commands/push.d.ts.map +1 -0
- package/dist/commands/push.js +328 -0
- package/dist/commands/scaffold.d.ts +19 -0
- package/dist/commands/scaffold.d.ts.map +1 -0
- package/dist/commands/scaffold.js +366 -0
- package/dist/commands/seed.d.ts +20 -0
- package/dist/commands/seed.d.ts.map +1 -0
- package/dist/commands/seed.js +380 -0
- package/dist/commands/select-project.d.ts +10 -0
- package/dist/commands/select-project.d.ts.map +1 -0
- package/dist/commands/select-project.js +277 -0
- package/dist/commands/setup.d.ts +5 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +51 -0
- package/dist/commands/sync.d.ts +13 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +318 -0
- package/dist/commands/whoami.d.ts +5 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +31 -0
- package/dist/config/load-config.d.ts +6 -0
- package/dist/config/load-config.d.ts.map +1 -0
- package/dist/config/load-config.js +103 -0
- package/dist/config/settings.d.ts +20 -0
- package/dist/config/settings.d.ts.map +1 -0
- package/dist/config/settings.js +64 -0
- package/dist/config/types.d.ts +152 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +94 -0
- package/dist/fetcher/fetch-schemas.d.ts +140 -0
- package/dist/fetcher/fetch-schemas.d.ts.map +1 -0
- package/dist/fetcher/fetch-schemas.js +223 -0
- package/dist/fetcher/fetch-workflows.d.ts +53 -0
- package/dist/fetcher/fetch-workflows.d.ts.map +1 -0
- package/dist/fetcher/fetch-workflows.js +164 -0
- package/dist/generated/hooks/customer-detail.d.ts +74 -0
- package/dist/generated/hooks/customer-detail.d.ts.map +1 -0
- package/dist/generated/hooks/customer-detail.js +113 -0
- package/dist/generated/hooks/design-system.d.ts +74 -0
- package/dist/generated/hooks/design-system.d.ts.map +1 -0
- package/dist/generated/hooks/design-system.js +109 -0
- package/dist/generated/hooks/index.d.ts +16 -0
- package/dist/generated/hooks/index.d.ts.map +1 -0
- package/dist/generated/hooks/index.js +14 -0
- package/dist/generated/hooks/shopify-collection.d.ts +74 -0
- package/dist/generated/hooks/shopify-collection.d.ts.map +1 -0
- package/dist/generated/hooks/shopify-collection.js +113 -0
- package/dist/generated/hooks/shopify-market.d.ts +74 -0
- package/dist/generated/hooks/shopify-market.d.ts.map +1 -0
- package/dist/generated/hooks/shopify-market.js +109 -0
- package/dist/generated/hooks/shopify-product.d.ts +74 -0
- package/dist/generated/hooks/shopify-product.d.ts.map +1 -0
- package/dist/generated/hooks/shopify-product.js +113 -0
- package/dist/generated/hooks/shopify-variant.d.ts +74 -0
- package/dist/generated/hooks/shopify-variant.d.ts.map +1 -0
- package/dist/generated/hooks/shopify-variant.js +113 -0
- package/dist/generated/hooks/template.d.ts +74 -0
- package/dist/generated/hooks/template.d.ts.map +1 -0
- package/dist/generated/hooks/template.js +107 -0
- package/dist/generated/types/config.d.ts +88 -0
- package/dist/generated/types/config.d.ts.map +1 -0
- package/dist/generated/types/config.js +14 -0
- package/dist/generated/types/data-models/index.d.ts +7 -0
- package/dist/generated/types/data-models/index.d.ts.map +1 -0
- package/dist/generated/types/data-models/index.js +6 -0
- package/dist/generated/types/data-models/test.d.ts +29 -0
- package/dist/generated/types/data-models/test.d.ts.map +1 -0
- package/dist/generated/types/data-models/test.js +1 -0
- package/dist/generated/types/data-models/watch.d.ts +26 -0
- package/dist/generated/types/data-models/watch.d.ts.map +1 -0
- package/dist/generated/types/data-models/watch.js +1 -0
- package/dist/generated/types/field-types.d.ts +255 -0
- package/dist/generated/types/field-types.d.ts.map +1 -0
- package/dist/generated/types/field-types.js +35 -0
- package/dist/generated/types/hooks.d.ts +106 -0
- package/dist/generated/types/hooks.d.ts.map +1 -0
- package/dist/generated/types/hooks.js +9 -0
- package/dist/generated/types/index.d.ts +10 -0
- package/dist/generated/types/index.d.ts.map +1 -0
- package/dist/generated/types/index.js +9 -0
- package/dist/generated/types/models/button-variant.d.ts +16 -0
- package/dist/generated/types/models/button-variant.d.ts.map +1 -0
- package/dist/generated/types/models/button-variant.js +1 -0
- package/dist/generated/types/models/color-palette.d.ts +27 -0
- package/dist/generated/types/models/color-palette.d.ts.map +1 -0
- package/dist/generated/types/models/color-palette.js +1 -0
- package/dist/generated/types/models/color-with-scale.d.ts +15 -0
- package/dist/generated/types/models/color-with-scale.d.ts.map +1 -0
- package/dist/generated/types/models/color-with-scale.js +1 -0
- package/dist/generated/types/models/context.d.ts +53 -0
- package/dist/generated/types/models/context.d.ts.map +1 -0
- package/dist/generated/types/models/context.js +51 -0
- package/dist/generated/types/models/customer-detail.d.ts +32 -0
- package/dist/generated/types/models/customer-detail.d.ts.map +1 -0
- package/dist/generated/types/models/customer-detail.js +26 -0
- package/dist/generated/types/models/design-system-badges.d.ts +16 -0
- package/dist/generated/types/models/design-system-badges.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-badges.js +1 -0
- package/dist/generated/types/models/design-system-buttons.d.ts +17 -0
- package/dist/generated/types/models/design-system-buttons.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-buttons.js +1 -0
- package/dist/generated/types/models/design-system-cards.d.ts +16 -0
- package/dist/generated/types/models/design-system-cards.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-cards.js +1 -0
- package/dist/generated/types/models/design-system-colors.d.ts +12 -0
- package/dist/generated/types/models/design-system-colors.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-colors.js +1 -0
- package/dist/generated/types/models/design-system-dark-mode.d.ts +13 -0
- package/dist/generated/types/models/design-system-dark-mode.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-dark-mode.js +1 -0
- package/dist/generated/types/models/design-system-focus-ring.d.ts +14 -0
- package/dist/generated/types/models/design-system-focus-ring.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-focus-ring.js +1 -0
- package/dist/generated/types/models/design-system-grid.d.ts +18 -0
- package/dist/generated/types/models/design-system-grid.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-grid.js +1 -0
- package/dist/generated/types/models/design-system-inputs.d.ts +26 -0
- package/dist/generated/types/models/design-system-inputs.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-inputs.js +1 -0
- package/dist/generated/types/models/design-system-links.d.ts +16 -0
- package/dist/generated/types/models/design-system-links.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-links.js +1 -0
- package/dist/generated/types/models/design-system-shadows.d.ts +20 -0
- package/dist/generated/types/models/design-system-shadows.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-shadows.js +1 -0
- package/dist/generated/types/models/design-system-spacing.d.ts +13 -0
- package/dist/generated/types/models/design-system-spacing.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-spacing.js +1 -0
- package/dist/generated/types/models/design-system-transitions.d.ts +15 -0
- package/dist/generated/types/models/design-system-transitions.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-transitions.js +1 -0
- package/dist/generated/types/models/design-system-typography.d.ts +21 -0
- package/dist/generated/types/models/design-system-typography.d.ts.map +1 -0
- package/dist/generated/types/models/design-system-typography.js +1 -0
- package/dist/generated/types/models/design-system.d.ts +138 -0
- package/dist/generated/types/models/design-system.d.ts.map +1 -0
- package/dist/generated/types/models/design-system.js +64 -0
- package/dist/generated/types/models/experiment.d.ts +57 -0
- package/dist/generated/types/models/experiment.d.ts.map +1 -0
- package/dist/generated/types/models/experiment.js +55 -0
- package/dist/generated/types/models/font-file.d.ts +16 -0
- package/dist/generated/types/models/font-file.d.ts.map +1 -0
- package/dist/generated/types/models/font-file.js +1 -0
- package/dist/generated/types/models/index.d.ts +38 -0
- package/dist/generated/types/models/index.d.ts.map +1 -0
- package/dist/generated/types/models/index.js +12 -0
- package/dist/generated/types/models/integration.d.ts +32 -0
- package/dist/generated/types/models/integration.d.ts.map +1 -0
- package/dist/generated/types/models/integration.js +26 -0
- package/dist/generated/types/models/route-tree.d.ts +43 -0
- package/dist/generated/types/models/route-tree.d.ts.map +1 -0
- package/dist/generated/types/models/route-tree.js +39 -0
- package/dist/generated/types/models/segment.d.ts +57 -0
- package/dist/generated/types/models/segment.d.ts.map +1 -0
- package/dist/generated/types/models/segment.js +55 -0
- package/dist/generated/types/models/shopify-collection.d.ts +32 -0
- package/dist/generated/types/models/shopify-collection.d.ts.map +1 -0
- package/dist/generated/types/models/shopify-collection.js +26 -0
- package/dist/generated/types/models/shopify-market.d.ts +32 -0
- package/dist/generated/types/models/shopify-market.d.ts.map +1 -0
- package/dist/generated/types/models/shopify-market.js +26 -0
- package/dist/generated/types/models/shopify-product.d.ts +32 -0
- package/dist/generated/types/models/shopify-product.d.ts.map +1 -0
- package/dist/generated/types/models/shopify-product.js +26 -0
- package/dist/generated/types/models/shopify-variant.d.ts +32 -0
- package/dist/generated/types/models/shopify-variant.d.ts.map +1 -0
- package/dist/generated/types/models/shopify-variant.js +26 -0
- package/dist/generated/types/models/template.d.ts +53 -0
- package/dist/generated/types/models/template.d.ts.map +1 -0
- package/dist/generated/types/models/template.js +40 -0
- package/dist/generated/types/models/typography-variant.d.ts +15 -0
- package/dist/generated/types/models/typography-variant.d.ts.map +1 -0
- package/dist/generated/types/models/typography-variant.js +1 -0
- package/dist/generated/types/scalars.d.ts +56 -0
- package/dist/generated/types/scalars.d.ts.map +1 -0
- package/dist/generated/types/scalars.js +6 -0
- package/dist/generators/admin/index.d.ts +32 -0
- package/dist/generators/admin/index.d.ts.map +1 -0
- package/dist/generators/admin/index.js +219 -0
- package/dist/generators/admin/mutations.d.ts +23 -0
- package/dist/generators/admin/mutations.d.ts.map +1 -0
- package/dist/generators/admin/mutations.js +424 -0
- package/dist/generators/admin/queries.d.ts +20 -0
- package/dist/generators/admin/queries.d.ts.map +1 -0
- package/dist/generators/admin/queries.js +476 -0
- package/dist/generators/admin/types.d.ts +28 -0
- package/dist/generators/admin/types.d.ts.map +1 -0
- package/dist/generators/admin/types.js +254 -0
- package/dist/generators/cms/index.d.ts +29 -0
- package/dist/generators/cms/index.d.ts.map +1 -0
- package/dist/generators/cms/index.js +126 -0
- package/dist/generators/cms/route.d.ts +27 -0
- package/dist/generators/cms/route.d.ts.map +1 -0
- package/dist/generators/cms/route.js +409 -0
- package/dist/generators/cms/types.d.ts +15 -0
- package/dist/generators/cms/types.d.ts.map +1 -0
- package/dist/generators/cms/types.js +137 -0
- package/dist/generators/contexts/index.d.ts +25 -0
- package/dist/generators/contexts/index.d.ts.map +1 -0
- package/dist/generators/contexts/index.js +591 -0
- package/dist/generators/documents/data-models.d.ts +6 -0
- package/dist/generators/documents/data-models.d.ts.map +1 -0
- package/dist/generators/documents/data-models.js +61 -0
- package/dist/generators/documents/entity-models.d.ts +7 -0
- package/dist/generators/documents/entity-models.d.ts.map +1 -0
- package/dist/generators/documents/entity-models.js +87 -0
- package/dist/generators/documents/workflows.d.ts +11 -0
- package/dist/generators/documents/workflows.d.ts.map +1 -0
- package/dist/generators/documents/workflows.js +101 -0
- package/dist/generators/filters/index.d.ts +16 -0
- package/dist/generators/filters/index.d.ts.map +1 -0
- package/dist/generators/filters/index.js +384 -0
- package/dist/generators/hooks/agnostic.d.ts +16 -0
- package/dist/generators/hooks/agnostic.d.ts.map +1 -0
- package/dist/generators/hooks/agnostic.js +248 -0
- package/dist/generators/hooks/index.d.ts +9 -0
- package/dist/generators/hooks/index.d.ts.map +1 -0
- package/dist/generators/hooks/index.js +8 -0
- package/dist/generators/hooks/react.d.ts +16 -0
- package/dist/generators/hooks/react.d.ts.map +1 -0
- package/dist/generators/hooks/react.js +394 -0
- package/dist/generators/hooks/remix.d.ts +16 -0
- package/dist/generators/hooks/remix.d.ts.map +1 -0
- package/dist/generators/hooks/remix.js +349 -0
- package/dist/generators/hooks/workflows.d.ts +23 -0
- package/dist/generators/hooks/workflows.d.ts.map +1 -0
- package/dist/generators/hooks/workflows.js +312 -0
- package/dist/generators/resolve/index.d.ts +13 -0
- package/dist/generators/resolve/index.d.ts.map +1 -0
- package/dist/generators/resolve/index.js +13 -0
- package/dist/generators/resolve/platform.d.ts +29 -0
- package/dist/generators/resolve/platform.d.ts.map +1 -0
- package/dist/generators/resolve/platform.js +479 -0
- package/dist/generators/types/config.d.ts +7 -0
- package/dist/generators/types/config.d.ts.map +1 -0
- package/dist/generators/types/config.js +113 -0
- package/dist/generators/types/data-models.d.ts +10 -0
- package/dist/generators/types/data-models.d.ts.map +1 -0
- package/dist/generators/types/data-models.js +100 -0
- package/dist/generators/types/entity-models.d.ts +13 -0
- package/dist/generators/types/entity-models.d.ts.map +1 -0
- package/dist/generators/types/entity-models.js +241 -0
- package/dist/generators/types/field-types.d.ts +9 -0
- package/dist/generators/types/field-types.d.ts.map +1 -0
- package/dist/generators/types/field-types.js +651 -0
- package/dist/generators/types/hooks.d.ts +7 -0
- package/dist/generators/types/hooks.d.ts.map +1 -0
- package/dist/generators/types/hooks.js +132 -0
- package/dist/generators/types/scalars.d.ts +6 -0
- package/dist/generators/types/scalars.d.ts.map +1 -0
- package/dist/generators/types/scalars.js +68 -0
- package/dist/generators/types/user-details.d.ts +6 -0
- package/dist/generators/types/user-details.d.ts.map +1 -0
- package/dist/generators/types/user-details.js +60 -0
- package/dist/generators/types/workflows.d.ts +15 -0
- package/dist/generators/types/workflows.d.ts.map +1 -0
- package/dist/generators/types/workflows.js +163 -0
- package/dist/graphql/generated/gql.d.ts +47 -0
- package/dist/graphql/generated/gql.d.ts.map +1 -0
- package/dist/graphql/generated/gql.js +10 -0
- package/dist/graphql/generated/graphql.d.ts +8455 -0
- package/dist/graphql/generated/graphql.d.ts.map +1 -0
- package/dist/graphql/generated/graphql.js +573 -0
- package/dist/graphql/generated/index.d.ts +2 -0
- package/dist/graphql/generated/index.d.ts.map +1 -0
- package/dist/graphql/generated/index.js +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/schema/define-entity-model.d.ts +122 -0
- package/dist/schema/define-entity-model.d.ts.map +1 -0
- package/dist/schema/define-entity-model.js +59 -0
- package/dist/schema/schema-loader.d.ts +10 -0
- package/dist/schema/schema-loader.d.ts.map +1 -0
- package/dist/schema/schema-loader.js +91 -0
- package/dist/utils/field-mapping.d.ts +83 -0
- package/dist/utils/field-mapping.d.ts.map +1 -0
- package/dist/utils/field-mapping.js +334 -0
- package/dist/writer/write-files.d.ts +12 -0
- package/dist/writer/write-files.d.ts.map +1 -0
- package/dist/writer/write-files.js +35 -0
- package/package.json +70 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the hooks.ts file with lifecycle hook type definitions
|
|
3
|
+
*
|
|
4
|
+
* @generated by UniformGen
|
|
5
|
+
*/
|
|
6
|
+
export function generateHooksFile() {
|
|
7
|
+
return `/**
|
|
8
|
+
* Entity Lifecycle Hook Types
|
|
9
|
+
*
|
|
10
|
+
* Hooks allow you to trigger actions when entity records are created,
|
|
11
|
+
* updated, deleted, published, or unpublished.
|
|
12
|
+
*
|
|
13
|
+
* @generated by UniformGen - DO NOT EDIT MANUALLY
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Webhook hook configuration
|
|
18
|
+
* Calls an HTTP endpoint when triggered
|
|
19
|
+
*/
|
|
20
|
+
export interface WebhookHook {
|
|
21
|
+
type: 'webhook';
|
|
22
|
+
/** Target URL (supports \${env.VAR} interpolation) */
|
|
23
|
+
url: string;
|
|
24
|
+
/** HTTP method */
|
|
25
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
26
|
+
/** Custom headers (supports \${var} interpolation) */
|
|
27
|
+
headers?: Record<string, string>;
|
|
28
|
+
/** Additional data merged with automatic payload */
|
|
29
|
+
additionalData?: Record<string, unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* Execution mode:
|
|
32
|
+
* - true: Fire-and-forget (default)
|
|
33
|
+
* - false: Wait for completion with retries
|
|
34
|
+
*/
|
|
35
|
+
async?: boolean;
|
|
36
|
+
/** Request timeout in ms (only for sync webhooks) */
|
|
37
|
+
timeout?: number;
|
|
38
|
+
/** Retry configuration for sync webhooks */
|
|
39
|
+
retryPolicy?: {
|
|
40
|
+
maxRetries: number;
|
|
41
|
+
backoffMs: number;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Queue job hook configuration
|
|
47
|
+
* Adds a job to a processing queue when triggered
|
|
48
|
+
*/
|
|
49
|
+
export interface QueueJobHook {
|
|
50
|
+
type: 'queue-job';
|
|
51
|
+
/** Queue name (e.g., 'routing', 'search', 'cache') */
|
|
52
|
+
queueName: string;
|
|
53
|
+
/** Job type within the queue */
|
|
54
|
+
jobType: string;
|
|
55
|
+
/**
|
|
56
|
+
* Execution mode:
|
|
57
|
+
* - true: Queue and continue (default)
|
|
58
|
+
* - false: Wait for job completion
|
|
59
|
+
*/
|
|
60
|
+
async?: boolean;
|
|
61
|
+
/** Job payload (supports \${var} interpolation) */
|
|
62
|
+
data?: Record<string, unknown>;
|
|
63
|
+
/** Job options */
|
|
64
|
+
options?: {
|
|
65
|
+
/** Delay before execution (ms) */
|
|
66
|
+
delay?: number;
|
|
67
|
+
/** Priority (higher = executes first) */
|
|
68
|
+
priority?: number;
|
|
69
|
+
/** Max retry attempts */
|
|
70
|
+
attempts?: number;
|
|
71
|
+
/** Job timeout (ms) */
|
|
72
|
+
timeout?: number;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Expression hook configuration
|
|
78
|
+
* Conditional execution based on rules
|
|
79
|
+
*/
|
|
80
|
+
export interface ExpressionHook {
|
|
81
|
+
type: 'expression';
|
|
82
|
+
/** Description for debugging */
|
|
83
|
+
description?: string;
|
|
84
|
+
/** Rule expression that must evaluate to true */
|
|
85
|
+
expression: Record<string, unknown>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Union of all hook types
|
|
90
|
+
*/
|
|
91
|
+
export type HookConfig = WebhookHook | QueueJobHook | ExpressionHook;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Entity lifecycle hooks configuration
|
|
95
|
+
*/
|
|
96
|
+
export interface EntityHooks {
|
|
97
|
+
/** Triggered when a record is created */
|
|
98
|
+
onCreate?: HookConfig[];
|
|
99
|
+
/** Triggered when a record is updated */
|
|
100
|
+
onUpdate?: HookConfig[];
|
|
101
|
+
/** Triggered when a record is deleted */
|
|
102
|
+
onDelete?: HookConfig[];
|
|
103
|
+
/** Triggered when a record is published */
|
|
104
|
+
onPublish?: HookConfig[];
|
|
105
|
+
/** Triggered when a record is unpublished */
|
|
106
|
+
onUnpublish?: HookConfig[];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Available variables for hook interpolation
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* // In webhook URL or data:
|
|
114
|
+
* url: '\${env.API_URL}/notify'
|
|
115
|
+
* data: { entityId: '\${record.id}' }
|
|
116
|
+
*/
|
|
117
|
+
export type HookVariable =
|
|
118
|
+
| '\${record.id}'
|
|
119
|
+
| '\${record.naturalKey}'
|
|
120
|
+
| '\${record.status}'
|
|
121
|
+
| '\${entity.id}'
|
|
122
|
+
| '\${entity.key}'
|
|
123
|
+
| '\${entity.name}'
|
|
124
|
+
| '\${context.tenantId}'
|
|
125
|
+
| '\${context.projectId}'
|
|
126
|
+
| '\${context.userId}'
|
|
127
|
+
| '\${user.id}'
|
|
128
|
+
| '\${user.email}'
|
|
129
|
+
| '\${timestamp}'
|
|
130
|
+
| '\${env.VARIABLE_NAME}';
|
|
131
|
+
`;
|
|
132
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalars.d.ts","sourceRoot":"","sources":["../../../src/generators/types/scalars.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,mBAAmB,IAAI,MAAM,CA+D5C"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the scalars.ts file with shared type definitions
|
|
3
|
+
* This file will be imported by other generated types
|
|
4
|
+
*/
|
|
5
|
+
export function generateScalarsFile() {
|
|
6
|
+
return `/**
|
|
7
|
+
* Shared scalar types for EIDE generated types
|
|
8
|
+
*
|
|
9
|
+
* @generated by UniformGen - DO NOT EDIT MANUALLY
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Rich text content (Tiptap JSON or similar)
|
|
14
|
+
*/
|
|
15
|
+
export type RichTextContent = unknown;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Currency value with amount and code
|
|
19
|
+
*/
|
|
20
|
+
export interface CurrencyValue {
|
|
21
|
+
amount: number;
|
|
22
|
+
currency: string; // ISO 4217 code (USD, EUR, etc.)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Image reference with metadata
|
|
27
|
+
*/
|
|
28
|
+
export interface ImageValue {
|
|
29
|
+
id: string;
|
|
30
|
+
url: string;
|
|
31
|
+
alt?: string;
|
|
32
|
+
width?: number;
|
|
33
|
+
height?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Video reference with metadata
|
|
38
|
+
*/
|
|
39
|
+
export interface VideoValue {
|
|
40
|
+
id: string;
|
|
41
|
+
url: string;
|
|
42
|
+
thumbnail?: string;
|
|
43
|
+
duration?: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* File reference with metadata
|
|
48
|
+
*/
|
|
49
|
+
export interface FileValue {
|
|
50
|
+
id: string;
|
|
51
|
+
url: string;
|
|
52
|
+
name: string;
|
|
53
|
+
size: number;
|
|
54
|
+
mimeType: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Address structure
|
|
59
|
+
*/
|
|
60
|
+
export interface AddressValue {
|
|
61
|
+
street?: string;
|
|
62
|
+
city?: string;
|
|
63
|
+
state?: string;
|
|
64
|
+
postalCode?: string;
|
|
65
|
+
country?: string;
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-details.d.ts","sourceRoot":"","sources":["../../../src/generators/types/user-details.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAOxE;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAuE1E"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { getFieldType, getRequiredImports, sanitizeFieldName, } from '../../utils/field-mapping.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generate TypeScript types for user details schema
|
|
4
|
+
*/
|
|
5
|
+
export function generateUserDetailsTypes(schema) {
|
|
6
|
+
const fields = schema.fields || [];
|
|
7
|
+
// Get required imports
|
|
8
|
+
const imports = getRequiredImports(fields);
|
|
9
|
+
const importStatements = imports.size > 0
|
|
10
|
+
? `import type { ${Array.from(imports)
|
|
11
|
+
.map((i) => {
|
|
12
|
+
if (i === 'scalars') {
|
|
13
|
+
return Array.from(new Set(fields.map((f) => getFieldType(f, 'output'))))
|
|
14
|
+
.filter((t) => ![
|
|
15
|
+
'string',
|
|
16
|
+
'number',
|
|
17
|
+
'boolean',
|
|
18
|
+
'Date',
|
|
19
|
+
'unknown',
|
|
20
|
+
].includes(t) && !t.includes('[]'))
|
|
21
|
+
.join(', ');
|
|
22
|
+
}
|
|
23
|
+
return '';
|
|
24
|
+
})
|
|
25
|
+
.filter(Boolean)
|
|
26
|
+
.join(', ')} } from './scalars.js';\n\n`
|
|
27
|
+
: '';
|
|
28
|
+
let interfaceCode = `/**
|
|
29
|
+
* User Details Schema
|
|
30
|
+
*
|
|
31
|
+
* @generated from tenant user details configuration
|
|
32
|
+
*/
|
|
33
|
+
export interface UserDetails {
|
|
34
|
+
userId: string;\n`;
|
|
35
|
+
// Add custom fields
|
|
36
|
+
for (const field of fields) {
|
|
37
|
+
const fieldName = sanitizeFieldName(field.key);
|
|
38
|
+
const fieldType = getFieldType(field, 'output');
|
|
39
|
+
const optional = field.required ? '' : '?';
|
|
40
|
+
const comment = field.helpText ? ` /** ${field.helpText} */\n` : '';
|
|
41
|
+
interfaceCode += comment;
|
|
42
|
+
interfaceCode += ` ${fieldName}${optional}: ${fieldType};\n`;
|
|
43
|
+
}
|
|
44
|
+
// Add system fields
|
|
45
|
+
interfaceCode += `
|
|
46
|
+
// System fields
|
|
47
|
+
createdAt: Date;
|
|
48
|
+
updatedAt: Date;
|
|
49
|
+
}\n\n`;
|
|
50
|
+
// Generate input type
|
|
51
|
+
interfaceCode += `export interface UserDetailsInput {\n`;
|
|
52
|
+
for (const field of fields) {
|
|
53
|
+
const fieldName = sanitizeFieldName(field.key);
|
|
54
|
+
const fieldType = getFieldType(field, 'input');
|
|
55
|
+
const optional = field.required ? '' : '?';
|
|
56
|
+
interfaceCode += ` ${fieldName}${optional}: ${fieldType};\n`;
|
|
57
|
+
}
|
|
58
|
+
interfaceCode += '}\n';
|
|
59
|
+
return importStatements + interfaceCode;
|
|
60
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Type Generator
|
|
3
|
+
*
|
|
4
|
+
* Generates TypeScript interfaces for workflow inputs and outputs.
|
|
5
|
+
*/
|
|
6
|
+
import type { WorkflowDefinition } from '../../fetcher/fetch-workflows.js';
|
|
7
|
+
/**
|
|
8
|
+
* Generate TypeScript types for a single workflow
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateWorkflowTypes(workflow: WorkflowDefinition): string;
|
|
11
|
+
/**
|
|
12
|
+
* Generate index file for all workflow types
|
|
13
|
+
*/
|
|
14
|
+
export declare function generateWorkflowTypesIndex(workflows: WorkflowDefinition[]): string;
|
|
15
|
+
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../src/generators/types/workflows.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAqC,MAAM,kCAAkC,CAAC;AAuG9G;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAoE1E;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,kBAAkB,EAAE,GAC9B,MAAM,CAeR"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Type Generator
|
|
3
|
+
*
|
|
4
|
+
* Generates TypeScript interfaces for workflow inputs and outputs.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Convert string to PascalCase
|
|
8
|
+
*/
|
|
9
|
+
function toPascalCase(str) {
|
|
10
|
+
return str
|
|
11
|
+
.split(/[-_]/)
|
|
12
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
13
|
+
.join('');
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Map workflow form field type to TypeScript type
|
|
17
|
+
*/
|
|
18
|
+
function mapFieldTypeToTS(field) {
|
|
19
|
+
switch (field.type) {
|
|
20
|
+
case 'text':
|
|
21
|
+
case 'textarea':
|
|
22
|
+
case 'email':
|
|
23
|
+
case 'phone':
|
|
24
|
+
case 'url':
|
|
25
|
+
case 'locale-select':
|
|
26
|
+
return 'string';
|
|
27
|
+
case 'richtext':
|
|
28
|
+
return 'RichtextValue';
|
|
29
|
+
case 'number':
|
|
30
|
+
return 'number';
|
|
31
|
+
case 'boolean':
|
|
32
|
+
return 'boolean';
|
|
33
|
+
case 'date':
|
|
34
|
+
return 'Date | string';
|
|
35
|
+
case 'select':
|
|
36
|
+
// If options are provided, create a union type
|
|
37
|
+
if (field.options && field.options.length > 0) {
|
|
38
|
+
const values = field.options.map((o) => typeof o.value === 'string' ? `'${o.value}'` : String(o.value));
|
|
39
|
+
return values.join(' | ');
|
|
40
|
+
}
|
|
41
|
+
return 'string | number';
|
|
42
|
+
case 'multiselect':
|
|
43
|
+
// If options are provided, create an array of union type
|
|
44
|
+
if (field.options && field.options.length > 0) {
|
|
45
|
+
const values = field.options.map((o) => typeof o.value === 'string' ? `'${o.value}'` : String(o.value));
|
|
46
|
+
return `Array<${values.join(' | ')}>`;
|
|
47
|
+
}
|
|
48
|
+
return 'Array<string | number>';
|
|
49
|
+
case 'entity-reference':
|
|
50
|
+
return 'string'; // Entity ID
|
|
51
|
+
case 'json':
|
|
52
|
+
return 'unknown';
|
|
53
|
+
case 'image':
|
|
54
|
+
case 'video':
|
|
55
|
+
case 'file':
|
|
56
|
+
return 'MediaValue';
|
|
57
|
+
default:
|
|
58
|
+
return 'unknown';
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Map workflow output type to TypeScript type
|
|
63
|
+
*/
|
|
64
|
+
function mapOutputTypeToTS(output) {
|
|
65
|
+
switch (output.type) {
|
|
66
|
+
case 'string':
|
|
67
|
+
return 'string';
|
|
68
|
+
case 'number':
|
|
69
|
+
return 'number';
|
|
70
|
+
case 'boolean':
|
|
71
|
+
return 'boolean';
|
|
72
|
+
case 'json':
|
|
73
|
+
default:
|
|
74
|
+
return 'unknown';
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Check if any field needs field-types import
|
|
79
|
+
*/
|
|
80
|
+
function needsFieldTypesImport(fields) {
|
|
81
|
+
return fields.some((f) => f.type === 'richtext' ||
|
|
82
|
+
f.type === 'image' ||
|
|
83
|
+
f.type === 'video' ||
|
|
84
|
+
f.type === 'file');
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Generate TypeScript types for a single workflow
|
|
88
|
+
*/
|
|
89
|
+
export function generateWorkflowTypes(workflow) {
|
|
90
|
+
const typeName = toPascalCase(workflow.key);
|
|
91
|
+
const lines = [];
|
|
92
|
+
const inputFields = workflow.input.schema || [];
|
|
93
|
+
// Build imports
|
|
94
|
+
if (needsFieldTypesImport(inputFields)) {
|
|
95
|
+
lines.push("import type { RichtextValue, MediaValue } from '../field-types.js';");
|
|
96
|
+
lines.push('');
|
|
97
|
+
}
|
|
98
|
+
// JSDoc for input interface
|
|
99
|
+
lines.push('/**');
|
|
100
|
+
lines.push(` * Input for ${workflow.name} workflow`);
|
|
101
|
+
if (workflow.description) {
|
|
102
|
+
lines.push(` * ${workflow.description}`);
|
|
103
|
+
}
|
|
104
|
+
lines.push(` * @generated by UniformGen`);
|
|
105
|
+
lines.push(' */');
|
|
106
|
+
// Generate input interface
|
|
107
|
+
lines.push(`export interface ${typeName}Input {`);
|
|
108
|
+
if (inputFields.length === 0) {
|
|
109
|
+
// If no schema, allow any JSON input
|
|
110
|
+
lines.push(' [key: string]: unknown;');
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
for (const field of inputFields) {
|
|
114
|
+
const tsType = mapFieldTypeToTS(field);
|
|
115
|
+
const optional = field.required ? '' : '?';
|
|
116
|
+
const comment = field.helpText || field.label;
|
|
117
|
+
if (comment) {
|
|
118
|
+
lines.push(` /** ${comment} */`);
|
|
119
|
+
}
|
|
120
|
+
lines.push(` ${field.key}${optional}: ${tsType};`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
lines.push('}');
|
|
124
|
+
lines.push('');
|
|
125
|
+
// JSDoc for output interface
|
|
126
|
+
lines.push('/**');
|
|
127
|
+
lines.push(` * Output from ${workflow.name} workflow`);
|
|
128
|
+
lines.push(` * @generated by UniformGen`);
|
|
129
|
+
lines.push(' */');
|
|
130
|
+
// Generate output interface
|
|
131
|
+
lines.push(`export interface ${typeName}Output {`);
|
|
132
|
+
if (workflow.outputs.length === 0) {
|
|
133
|
+
lines.push(' result?: unknown;');
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
for (const output of workflow.outputs) {
|
|
137
|
+
const tsType = mapOutputTypeToTS(output);
|
|
138
|
+
const comment = output.description;
|
|
139
|
+
if (comment) {
|
|
140
|
+
lines.push(` /** ${comment} */`);
|
|
141
|
+
}
|
|
142
|
+
lines.push(` ${output.key}?: ${tsType};`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
lines.push('}');
|
|
146
|
+
return lines.join('\n');
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Generate index file for all workflow types
|
|
150
|
+
*/
|
|
151
|
+
export function generateWorkflowTypesIndex(workflows) {
|
|
152
|
+
const lines = [];
|
|
153
|
+
lines.push('/**');
|
|
154
|
+
lines.push(' * Workflow Types');
|
|
155
|
+
lines.push(' * @generated by UniformGen - DO NOT EDIT MANUALLY');
|
|
156
|
+
lines.push(' */');
|
|
157
|
+
lines.push('');
|
|
158
|
+
for (const workflow of workflows) {
|
|
159
|
+
const fileName = workflow.key;
|
|
160
|
+
lines.push(`export * from './${fileName}.js';`);
|
|
161
|
+
}
|
|
162
|
+
return lines.join('\n');
|
|
163
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as types from './graphql';
|
|
2
|
+
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
+
/**
|
|
4
|
+
* Map of all GraphQL operations in the project.
|
|
5
|
+
*
|
|
6
|
+
* This map has several performance disadvantages:
|
|
7
|
+
* 1. It is not tree-shakeable, so it will include all operations in the project.
|
|
8
|
+
* 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
|
|
9
|
+
* 3. It does not support dead code elimination, so it will add unused operations.
|
|
10
|
+
*
|
|
11
|
+
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
|
12
|
+
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
|
|
13
|
+
*/
|
|
14
|
+
type Documents = {
|
|
15
|
+
"mutation CreateEntityRecord($input: CreateEntityRecordInput!) {\n createEntityRecord(input: $input) {\n id\n modelKey\n naturalKey\n currentVersionId\n variants(limit: 1) {\n items {\n id\n currentVersionId\n }\n }\n }\n}": typeof types.CreateEntityRecordDocument;
|
|
16
|
+
"mutation PublishEntityRecordVersion($versionId: ID!) {\n publishEntityRecordVersion(versionId: $versionId) {\n id\n publishedVersionId\n }\n}": typeof types.PublishEntityRecordVersionDocument;
|
|
17
|
+
"query GetEntityModels($limit: Int = 500) {\n entityModels(limit: $limit) {\n items {\n id\n key\n metadata {\n name\n pluralName\n description\n category\n }\n schema\n metadataSchema\n modes\n extensions\n hooks\n createdAt\n updatedAt\n }\n }\n}": typeof types.GetEntityModelsDocument;
|
|
18
|
+
};
|
|
19
|
+
declare const documents: Documents;
|
|
20
|
+
/**
|
|
21
|
+
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const query = gql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* The query argument is unknown!
|
|
30
|
+
* Please regenerate the types.
|
|
31
|
+
*/
|
|
32
|
+
export declare function gql(source: string): unknown;
|
|
33
|
+
/**
|
|
34
|
+
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
35
|
+
*/
|
|
36
|
+
export declare function gql(source: "mutation CreateEntityRecord($input: CreateEntityRecordInput!) {\n createEntityRecord(input: $input) {\n id\n modelKey\n naturalKey\n currentVersionId\n variants(limit: 1) {\n items {\n id\n currentVersionId\n }\n }\n }\n}"): (typeof documents)["mutation CreateEntityRecord($input: CreateEntityRecordInput!) {\n createEntityRecord(input: $input) {\n id\n modelKey\n naturalKey\n currentVersionId\n variants(limit: 1) {\n items {\n id\n currentVersionId\n }\n }\n }\n}"];
|
|
37
|
+
/**
|
|
38
|
+
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
39
|
+
*/
|
|
40
|
+
export declare function gql(source: "mutation PublishEntityRecordVersion($versionId: ID!) {\n publishEntityRecordVersion(versionId: $versionId) {\n id\n publishedVersionId\n }\n}"): (typeof documents)["mutation PublishEntityRecordVersion($versionId: ID!) {\n publishEntityRecordVersion(versionId: $versionId) {\n id\n publishedVersionId\n }\n}"];
|
|
41
|
+
/**
|
|
42
|
+
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
43
|
+
*/
|
|
44
|
+
export declare function gql(source: "query GetEntityModels($limit: Int = 500) {\n entityModels(limit: $limit) {\n items {\n id\n key\n metadata {\n name\n pluralName\n description\n category\n }\n schema\n metadataSchema\n modes\n extensions\n hooks\n createdAt\n updatedAt\n }\n }\n}"): (typeof documents)["query GetEntityModels($limit: Int = 500) {\n entityModels(limit: $limit) {\n items {\n id\n key\n metadata {\n name\n pluralName\n description\n category\n }\n schema\n metadataSchema\n modes\n extensions\n hooks\n createdAt\n updatedAt\n }\n }\n}"];
|
|
45
|
+
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=gql.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gql.d.ts","sourceRoot":"","sources":["../../../src/graphql/generated/gql.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,WAAW,CAAC;AACnC,OAAO,KAAK,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAE3F;;;;;;;;;;GAUG;AACH,KAAK,SAAS,GAAG;IACb,2QAA2Q,EAAE,OAAO,KAAK,CAAC,0BAA0B,CAAC;IACrT,uJAAuJ,EAAE,OAAO,KAAK,CAAC,kCAAkC,CAAC;IACzM,oVAAoV,EAAE,OAAO,KAAK,CAAC,uBAAuB,CAAC;CAC9X,CAAC;AACF,QAAA,MAAM,SAAS,EAAE,SAIhB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;AAE7C;;GAEG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,2QAA2Q,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,2QAA2Q,CAAC,CAAC;AAC1kB;;GAEG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,uJAAuJ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,uJAAuJ,CAAC,CAAC;AAClW;;GAEG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,oVAAoV,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,oVAAoV,CAAC,CAAC;AAM5tB,MAAM,MAAM,YAAY,CAAC,aAAa,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,aAAa,SAAS,YAAY,CAAG,MAAM,KAAK,EAAG,GAAG,CAAC,GAAI,KAAK,GAAI,KAAK,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import * as types from './graphql';
|
|
3
|
+
const documents = {
|
|
4
|
+
"mutation CreateEntityRecord($input: CreateEntityRecordInput!) {\n createEntityRecord(input: $input) {\n id\n modelKey\n naturalKey\n currentVersionId\n variants(limit: 1) {\n items {\n id\n currentVersionId\n }\n }\n }\n}": types.CreateEntityRecordDocument,
|
|
5
|
+
"mutation PublishEntityRecordVersion($versionId: ID!) {\n publishEntityRecordVersion(versionId: $versionId) {\n id\n publishedVersionId\n }\n}": types.PublishEntityRecordVersionDocument,
|
|
6
|
+
"query GetEntityModels($limit: Int = 500) {\n entityModels(limit: $limit) {\n items {\n id\n key\n metadata {\n name\n pluralName\n description\n category\n }\n schema\n metadataSchema\n modes\n extensions\n hooks\n createdAt\n updatedAt\n }\n }\n}": types.GetEntityModelsDocument,
|
|
7
|
+
};
|
|
8
|
+
export function gql(source) {
|
|
9
|
+
return documents[source] ?? {};
|
|
10
|
+
}
|