@ankhorage/contracts 4.0.1 → 5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @ankhorage/contracts
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 671bbcb: Replace the tab-specific route visibility field with `showInPrimaryNavigation`. Omitted routes remain visible by default, while `false` hides a route from Tabs and Drawer primary navigation without removing its navigability.
8
+ - b125e14: Replace the mixed REST, OpenAPI, GraphQL, and managed-API data-source kinds with an orthogonal API/database model. APIs now declare external/generated origin and REST/GraphQL protocol, while OpenAPI is optional REST description metadata. Preserve generated REST/CRUD desired state in a dedicated manifest registry and keep its normalized runtime data-source projection separate, with no speculative API-server generator adapter.
9
+
10
+ ### Patch Changes
11
+
12
+ - a804711: Release trigger
13
+
3
14
  ## 4.0.1
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # CONTRACTS
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v4.0.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v4.0.2](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Serializable app, action, theme, auth, and secret-store contracts for Ankhorage.
9
9
 
@@ -65,20 +65,13 @@ export type BindingInputValue = {
65
65
  readonly transforms?: readonly BindingValueTransform[];
66
66
  };
67
67
  export type BindingInputMap = Readonly<Record<string, BindingInputValue>>;
68
- export interface ApiScreenDataLoaderDefinition {
69
- readonly kind: 'api';
70
- readonly apiId: string;
71
- readonly mode: 'byId' | 'list' | 'one' | 'random';
72
- readonly targetPath: string;
73
- readonly id?: string | number;
74
- }
75
68
  export interface OperationScreenDataLoaderDefinition {
76
69
  readonly kind: 'operation';
77
70
  readonly id?: string;
78
71
  readonly operation: BindingOperationRef;
79
72
  readonly input?: BindingInputMap;
80
73
  }
81
- export type ScreenDataLoaderDefinition = ApiScreenDataLoaderDefinition | OperationScreenDataLoaderDefinition;
74
+ export type ScreenDataLoaderDefinition = OperationScreenDataLoaderDefinition;
82
75
  export type BindingConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';
83
76
  export interface BindingCondition {
84
77
  readonly source: BindingValueSource;
@@ -1 +1 @@
1
- {"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,YAAY,EAAE,GACvB;IACE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CACtC,CAAC;AAEN,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;AAEvE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;I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AAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC,CAAC,CAAC;CACrE;AAED,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CACjD,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAClD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bindings.js","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataSourceId, EndpointId, OperationId } from './data';\n\nexport type ComponentInstanceId = string;\nexport type ComponentTypeId = string;\n\nexport type BindingValue =\n | string\n | number\n | boolean\n | null\n | readonly BindingValue[]\n | {\n readonly [key: string]: BindingValue;\n };\n\nexport type BindingDataPath = string;\n\nexport type BindingValueTransform = 'lowercase' | 'trim' | 'uppercase';\n\nexport interface BindingOperationRef {\n readonly dataSourceId: DataSourceId;\n readonly operationId: OperationId;\n readonly endpointId?: EndpointId;\n}\n\nexport type BindingValueSource =\n | {\n readonly kind: 'context';\n readonly path: BindingDataPath;\n }\n | {\n readonly kind: 'event';\n readonly path: BindingDataPath;\n }\n | {\n readonly kind: 'literal';\n readonly value: BindingValue;\n }\n | {\n readonly kind: 'operation';\n readonly operation: BindingOperationRef;\n readonly path?: BindingDataPath;\n }\n | {\n readonly kind: 'state';\n readonly path: BindingDataPath;\n };\n\nexport interface BindingValueExpression {\n readonly source: BindingValueSource;\n readonly transforms?: readonly BindingValueTransform[];\n}\n\nexport interface BindingFallback {\n readonly value?: BindingValue;\n readonly source?: BindingValueSource;\n}\n\nexport type BindingLifecycleState = 'empty' | 'error' | 'loading';\n\nexport interface BindingLifecycleBehavior {\n readonly state: BindingLifecycleState;\n readonly fallback?: BindingFallback;\n readonly message?: string;\n}\n\nexport interface PropBinding {\n readonly source: BindingValueSource;\n readonly fallback?: BindingFallback;\n readonly loading?: BindingLifecycleBehavior;\n readonly error?: BindingLifecycleBehavior;\n readonly empty?: BindingLifecycleBehavior;\n readonly transforms?: readonly BindingValueTransform[];\n}\n\nexport type BindingInputValue =\n | {\n readonly kind: 'array';\n readonly items: readonly BindingInputValue[];\n }\n | {\n readonly kind: 'literal';\n readonly value: BindingValue;\n }\n | {\n readonly kind: 'object';\n readonly fields: Readonly<Record<string, BindingInputValue>>;\n }\n | {\n readonly kind: 'source';\n readonly source: BindingValueSource;\n readonly transforms?: readonly BindingValueTransform[];\n };\n\nexport type BindingInputMap = Readonly<Record<string, BindingInputValue>>;\n\nexport interface ApiScreenDataLoaderDefinition {\n readonly kind: 'api';\n readonly apiId: string;\n readonly mode: 'byId' | 'list' | 'one' | 'random';\n readonly targetPath: string;\n readonly id?: string | number;\n}\n\nexport interface OperationScreenDataLoaderDefinition {\n readonly kind: 'operation';\n readonly id?: string;\n readonly operation: BindingOperationRef;\n readonly input?: BindingInputMap;\n}\n\nexport type ScreenDataLoaderDefinition =\n | ApiScreenDataLoaderDefinition\n | OperationScreenDataLoaderDefinition;\n\nexport type BindingConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';\n\nexport interface BindingCondition {\n readonly source: BindingValueSource;\n readonly operator: BindingConditionOperator;\n readonly value?: BindingValue;\n}\n\nexport type EventBindingTarget =\n | {\n readonly kind: 'action';\n readonly type: string;\n }\n | {\n readonly kind: 'operation';\n readonly operation: BindingOperationRef;\n };\n\nexport interface EventBinding {\n readonly target: EventBindingTarget;\n readonly input?: BindingInputMap;\n readonly when?: BindingCondition;\n}\n\nexport interface ComponentDataBinding {\n readonly componentId: ComponentInstanceId;\n readonly componentType?: ComponentTypeId;\n readonly props?: Readonly<Record<string, PropBinding>>;\n readonly events?: Readonly<Record<string, readonly EventBinding[]>>;\n}\n\nexport type ComponentDataBindingRegistry = Readonly<\n Record<ComponentInstanceId, ComponentDataBinding>\n>;\n"]}
1
+ {"version":3,"file":"bindings.js","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataSourceId, EndpointId, OperationId } from './data';\n\nexport type ComponentInstanceId = string;\nexport type ComponentTypeId = string;\n\nexport type BindingValue =\n | string\n | number\n | boolean\n | null\n | readonly BindingValue[]\n | {\n readonly [key: string]: BindingValue;\n };\n\nexport type BindingDataPath = string;\n\nexport type BindingValueTransform = 'lowercase' | 'trim' | 'uppercase';\n\nexport interface BindingOperationRef {\n readonly dataSourceId: DataSourceId;\n readonly operationId: OperationId;\n readonly endpointId?: EndpointId;\n}\n\nexport type BindingValueSource =\n | {\n readonly kind: 'context';\n readonly path: BindingDataPath;\n }\n | {\n readonly kind: 'event';\n readonly path: BindingDataPath;\n }\n | {\n readonly kind: 'literal';\n readonly value: BindingValue;\n }\n | {\n readonly kind: 'operation';\n readonly operation: BindingOperationRef;\n readonly path?: BindingDataPath;\n }\n | {\n readonly kind: 'state';\n readonly path: BindingDataPath;\n };\n\nexport interface BindingValueExpression {\n readonly source: BindingValueSource;\n readonly transforms?: readonly BindingValueTransform[];\n}\n\nexport interface BindingFallback {\n readonly value?: BindingValue;\n readonly source?: BindingValueSource;\n}\n\nexport type BindingLifecycleState = 'empty' | 'error' | 'loading';\n\nexport interface BindingLifecycleBehavior {\n readonly state: BindingLifecycleState;\n readonly fallback?: BindingFallback;\n readonly message?: string;\n}\n\nexport interface PropBinding {\n readonly source: BindingValueSource;\n readonly fallback?: BindingFallback;\n readonly loading?: BindingLifecycleBehavior;\n readonly error?: BindingLifecycleBehavior;\n readonly empty?: BindingLifecycleBehavior;\n readonly transforms?: readonly BindingValueTransform[];\n}\n\nexport type BindingInputValue =\n | {\n readonly kind: 'array';\n readonly items: readonly BindingInputValue[];\n }\n | {\n readonly kind: 'literal';\n readonly value: BindingValue;\n }\n | {\n readonly kind: 'object';\n readonly fields: Readonly<Record<string, BindingInputValue>>;\n }\n | {\n readonly kind: 'source';\n readonly source: BindingValueSource;\n readonly transforms?: readonly BindingValueTransform[];\n };\n\nexport type BindingInputMap = Readonly<Record<string, BindingInputValue>>;\n\nexport interface OperationScreenDataLoaderDefinition {\n readonly kind: 'operation';\n readonly id?: string;\n readonly operation: BindingOperationRef;\n readonly input?: BindingInputMap;\n}\n\nexport type ScreenDataLoaderDefinition = OperationScreenDataLoaderDefinition;\n\nexport type BindingConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';\n\nexport interface BindingCondition {\n readonly source: BindingValueSource;\n readonly operator: BindingConditionOperator;\n readonly value?: BindingValue;\n}\n\nexport type EventBindingTarget =\n | {\n readonly kind: 'action';\n readonly type: string;\n }\n | {\n readonly kind: 'operation';\n readonly operation: BindingOperationRef;\n };\n\nexport interface EventBinding {\n readonly target: EventBindingTarget;\n readonly input?: BindingInputMap;\n readonly when?: BindingCondition;\n}\n\nexport interface ComponentDataBinding {\n readonly componentId: ComponentInstanceId;\n readonly componentType?: ComponentTypeId;\n readonly props?: Readonly<Record<string, PropBinding>>;\n readonly events?: Readonly<Record<string, readonly EventBinding[]>>;\n}\n\nexport type ComponentDataBindingRegistry = Readonly<\n Record<ComponentInstanceId, ComponentDataBinding>\n>;\n"]}
@@ -1,76 +1,50 @@
1
1
  import type { DbCollectionDefinition } from '../db';
2
- import type { DataOperationRequest, DataOperationResponse } from './operations';
2
+ import type { DatabaseAdapterRef } from './refs';
3
3
  import type { DataContractValue } from './values';
4
- export declare const APP_API_KINDS: readonly ["external", "generated"];
5
- export type AppApiKind = (typeof APP_API_KINDS)[number];
6
- export declare const APP_API_GENERATED_PRESETS: readonly ["crud"];
7
- export type AppApiGeneratedPreset = (typeof APP_API_GENERATED_PRESETS)[number];
8
- export declare const APP_API_ENDPOINT_METHODS: readonly ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"];
9
- export type AppApiEndpointMethod = (typeof APP_API_ENDPOINT_METHODS)[number];
10
- export declare const APP_API_ENDPOINT_INTENTS: readonly ["create", "custom", "delete", "list", "read", "update"];
11
- export type AppApiEndpointIntent = (typeof APP_API_ENDPOINT_INTENTS)[number];
12
- export type AppApiId = string;
13
- export type AppApiEndpointId = string;
14
- export type AppApiSeedRecord = Readonly<Record<string, DataContractValue>>;
15
- export interface AppApiAuthRequirement {
4
+ export declare const GENERATED_API_CRUD_OPERATIONS: readonly ["list", "read", "create", "update", "delete"];
5
+ export type GeneratedApiCrudOperation = (typeof GENERATED_API_CRUD_OPERATIONS)[number];
6
+ export type GeneratedApiId = string;
7
+ export type GeneratedApiResourceId = string;
8
+ export type GeneratedApiSeedRecord = Readonly<Record<string, DataContractValue>>;
9
+ export interface GeneratedApiAuthRequirement {
16
10
  readonly required?: boolean;
17
11
  readonly roles?: readonly string[];
18
12
  readonly permissions?: readonly string[];
19
13
  readonly policy?: string;
20
14
  readonly metadata?: DataContractValue;
21
15
  }
22
- export interface AppApiCollectionResourceDefinition {
23
- readonly kind: 'collection';
24
- readonly collection: DbCollectionDefinition;
25
- readonly seed?: readonly AppApiSeedRecord[];
26
- readonly metadata?: DataContractValue;
16
+ export interface GeneratedApiOperationPolicyRef {
17
+ readonly id: string;
18
+ readonly operation?: GeneratedApiCrudOperation;
27
19
  }
28
- export type AppApiResourceDefinition = AppApiCollectionResourceDefinition;
29
- export interface AppApiEndpointDefinition {
30
- readonly id: AppApiEndpointId;
31
- readonly label?: string;
20
+ export interface GeneratedApiResourceDefinition {
21
+ readonly id: GeneratedApiResourceId;
22
+ readonly name?: string;
32
23
  readonly description?: string;
33
- readonly method: AppApiEndpointMethod;
34
- /**
35
- * Path relative to the API base path. Use `/` for the base collection endpoint.
36
- */
37
24
  readonly path: string;
38
- readonly intent?: AppApiEndpointIntent;
39
- readonly request?: DataOperationRequest;
40
- readonly response?: DataOperationResponse;
41
- readonly auth?: AppApiAuthRequirement;
25
+ readonly collection: DbCollectionDefinition;
26
+ readonly operations: readonly GeneratedApiCrudOperation[];
27
+ readonly seed?: readonly GeneratedApiSeedRecord[];
28
+ readonly policies?: readonly GeneratedApiOperationPolicyRef[];
42
29
  readonly metadata?: DataContractValue;
43
30
  }
44
- interface AppApiDefinitionBase {
45
- readonly id: AppApiId;
46
- readonly kind: AppApiKind;
47
- readonly label?: string;
31
+ /**
32
+ * Canonical desired state for an API authored and generated by Ankhorage.
33
+ *
34
+ * The initial supported generated implementation is REST/CRUD backed by an
35
+ * existing database adapter. Runtime and binding consumers use the normalized
36
+ * generated API data-source projection instead of reading this definition.
37
+ */
38
+ export interface GeneratedApiDefinition {
39
+ readonly id: GeneratedApiId;
40
+ readonly protocol: 'rest';
41
+ readonly name?: string;
48
42
  readonly description?: string;
49
43
  readonly basePath: string;
50
- readonly endpoints: readonly AppApiEndpointDefinition[];
51
- readonly auth?: AppApiAuthRequirement;
44
+ readonly database: DatabaseAdapterRef;
45
+ readonly resources: readonly GeneratedApiResourceDefinition[];
46
+ readonly auth?: GeneratedApiAuthRequirement;
52
47
  readonly metadata?: DataContractValue;
53
48
  }
54
- export interface AppGeneratedApiDefinition extends AppApiDefinitionBase {
55
- readonly kind: 'generated';
56
- /**
57
- * Preset used by authoring tools to seed standard endpoints. The resulting
58
- * serialized API still stores concrete `endpoints[]` so custom endpoints can
59
- * live next to generated CRUD operations.
60
- */
61
- readonly preset?: AppApiGeneratedPreset;
62
- readonly resource?: AppApiResourceDefinition;
63
- }
64
- export interface AppExternalApiDefinition extends AppApiDefinitionBase {
65
- readonly kind: 'external';
66
- readonly baseUrl?: string;
67
- readonly openApiUrl?: string;
68
- }
69
- export type AppApiDefinition = AppExternalApiDefinition | AppGeneratedApiDefinition;
70
- export type AppApiRegistry = Readonly<Record<AppApiId, AppApiDefinition>>;
71
- export interface AppDataManifest {
72
- readonly apis?: AppApiRegistry;
73
- }
74
- export type AppApiManifest = AppDataManifest;
75
- export {};
49
+ export type GeneratedApiRegistry = Readonly<Record<GeneratedApiId, GeneratedApiDefinition>>;
76
50
  //# sourceMappingURL=apis.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apis.d.ts","sourceRoot":"","sources":["../../src/data/apis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,eAAO,MAAM,aAAa,oCAAqC,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,eAAO,MAAM,yBAAyB,mBAAoB,CAAC;AAC3D,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E,eAAO,MAAM,wBAAwB,uEAQ3B,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E,eAAO,MAAM,wBAAwB,mEAO3B,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAC9B,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AACtC,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAE3E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,CA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;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,SAAS,8BAA8B,EAAE,CAAC;IAC9D,QAAQ,CAAC,IAAI,CAAC,EAAE,2BAA2B,CAAC;IAC5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,sBAAsB,CAAC,CAAC,CAAC"}
package/dist/data/apis.js CHANGED
@@ -1,20 +1,8 @@
1
- export const APP_API_KINDS = ['external', 'generated'];
2
- export const APP_API_GENERATED_PRESETS = ['crud'];
3
- export const APP_API_ENDPOINT_METHODS = [
4
- 'DELETE',
5
- 'GET',
6
- 'HEAD',
7
- 'OPTIONS',
8
- 'PATCH',
9
- 'POST',
10
- 'PUT',
11
- ];
12
- export const APP_API_ENDPOINT_INTENTS = [
13
- 'create',
14
- 'custom',
15
- 'delete',
1
+ export const GENERATED_API_CRUD_OPERATIONS = [
16
2
  'list',
17
3
  'read',
4
+ 'create',
18
5
  'update',
6
+ 'delete',
19
7
  ];
20
8
  //# sourceMappingURL=apis.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"apis.js","sourceRoot":"","sources":["../../src/data/apis.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,WAAW,CAAU,CAAC;AAGhE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,MAAM,CAAU,CAAC;AAG3D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,QAAQ;IACR,KAAK;IACL,MAAM;IACN,SAAS;IACT,OAAO;IACP,MAAM;IACN,KAAK;CACG,CAAC;AAGX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,MAAM;IACN,QAAQ;CACA,CAAC","sourcesContent":["import type { DbCollectionDefinition } from '../db';\nimport type { DataOperationRequest, DataOperationResponse } from './operations';\nimport type { DataContractValue } from './values';\n\nexport const APP_API_KINDS = ['external', 'generated'] as const;\nexport type AppApiKind = (typeof APP_API_KINDS)[number];\n\nexport const APP_API_GENERATED_PRESETS = ['crud'] as const;\nexport type AppApiGeneratedPreset = (typeof APP_API_GENERATED_PRESETS)[number];\n\nexport const APP_API_ENDPOINT_METHODS = [\n 'DELETE',\n 'GET',\n 'HEAD',\n 'OPTIONS',\n 'PATCH',\n 'POST',\n 'PUT',\n] as const;\nexport type AppApiEndpointMethod = (typeof APP_API_ENDPOINT_METHODS)[number];\n\nexport const APP_API_ENDPOINT_INTENTS = [\n 'create',\n 'custom',\n 'delete',\n 'list',\n 'read',\n 'update',\n] as const;\nexport type AppApiEndpointIntent = (typeof APP_API_ENDPOINT_INTENTS)[number];\n\nexport type AppApiId = string;\nexport type AppApiEndpointId = string;\nexport type AppApiSeedRecord = Readonly<Record<string, DataContractValue>>;\n\nexport interface AppApiAuthRequirement {\n readonly required?: boolean;\n readonly roles?: readonly string[];\n readonly permissions?: readonly string[];\n readonly policy?: string;\n readonly metadata?: DataContractValue;\n}\n\nexport interface AppApiCollectionResourceDefinition {\n readonly kind: 'collection';\n readonly collection: DbCollectionDefinition;\n readonly seed?: readonly AppApiSeedRecord[];\n readonly metadata?: DataContractValue;\n}\n\nexport type AppApiResourceDefinition = AppApiCollectionResourceDefinition;\n\nexport interface AppApiEndpointDefinition {\n readonly id: AppApiEndpointId;\n readonly label?: string;\n readonly description?: string;\n readonly method: AppApiEndpointMethod;\n /**\n * Path relative to the API base path. Use `/` for the base collection endpoint.\n */\n readonly path: string;\n readonly intent?: AppApiEndpointIntent;\n readonly request?: DataOperationRequest;\n readonly response?: DataOperationResponse;\n readonly auth?: AppApiAuthRequirement;\n readonly metadata?: DataContractValue;\n}\n\ninterface AppApiDefinitionBase {\n readonly id: AppApiId;\n readonly kind: AppApiKind;\n readonly label?: string;\n readonly description?: string;\n readonly basePath: string;\n readonly endpoints: readonly AppApiEndpointDefinition[];\n readonly auth?: AppApiAuthRequirement;\n readonly metadata?: DataContractValue;\n}\n\nexport interface AppGeneratedApiDefinition extends AppApiDefinitionBase {\n readonly kind: 'generated';\n /**\n * Preset used by authoring tools to seed standard endpoints. The resulting\n * serialized API still stores concrete `endpoints[]` so custom endpoints can\n * live next to generated CRUD operations.\n */\n readonly preset?: AppApiGeneratedPreset;\n readonly resource?: AppApiResourceDefinition;\n}\n\nexport interface AppExternalApiDefinition extends AppApiDefinitionBase {\n readonly kind: 'external';\n readonly baseUrl?: string;\n readonly openApiUrl?: string;\n}\n\nexport type AppApiDefinition = AppExternalApiDefinition | AppGeneratedApiDefinition;\n\nexport type AppApiRegistry = Readonly<Record<AppApiId, AppApiDefinition>>;\n\nexport interface AppDataManifest {\n readonly apis?: AppApiRegistry;\n}\n\nexport type AppApiManifest = AppDataManifest;\n"]}
1
+ {"version":3,"file":"apis.js","sourceRoot":"","sources":["../../src/data/apis.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,MAAM;IACN,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,QAAQ;CACA,CAAC","sourcesContent":["import type { DbCollectionDefinition } from '../db';\nimport type { DatabaseAdapterRef } from './refs';\nimport type { DataContractValue } from './values';\n\nexport const GENERATED_API_CRUD_OPERATIONS = [\n 'list',\n 'read',\n 'create',\n 'update',\n 'delete',\n] as const;\nexport type GeneratedApiCrudOperation = (typeof GENERATED_API_CRUD_OPERATIONS)[number];\n\nexport type GeneratedApiId = string;\nexport type GeneratedApiResourceId = string;\nexport type GeneratedApiSeedRecord = Readonly<Record<string, DataContractValue>>;\n\nexport interface GeneratedApiAuthRequirement {\n readonly required?: boolean;\n readonly roles?: readonly string[];\n readonly permissions?: readonly string[];\n readonly policy?: string;\n readonly metadata?: DataContractValue;\n}\n\nexport interface GeneratedApiOperationPolicyRef {\n readonly id: string;\n readonly operation?: GeneratedApiCrudOperation;\n}\n\nexport interface GeneratedApiResourceDefinition {\n readonly id: GeneratedApiResourceId;\n readonly name?: string;\n readonly description?: string;\n readonly path: string;\n readonly collection: DbCollectionDefinition;\n readonly operations: readonly GeneratedApiCrudOperation[];\n readonly seed?: readonly GeneratedApiSeedRecord[];\n readonly policies?: readonly GeneratedApiOperationPolicyRef[];\n readonly metadata?: DataContractValue;\n}\n\n/**\n * Canonical desired state for an API authored and generated by Ankhorage.\n *\n * The initial supported generated implementation is REST/CRUD backed by an\n * existing database adapter. Runtime and binding consumers use the normalized\n * generated API data-source projection instead of reading this definition.\n */\nexport interface GeneratedApiDefinition {\n readonly id: GeneratedApiId;\n readonly protocol: 'rest';\n readonly name?: string;\n readonly description?: string;\n readonly basePath: string;\n readonly database: DatabaseAdapterRef;\n readonly resources: readonly GeneratedApiResourceDefinition[];\n readonly auth?: GeneratedApiAuthRequirement;\n readonly metadata?: DataContractValue;\n}\n\nexport type GeneratedApiRegistry = Readonly<Record<GeneratedApiId, GeneratedApiDefinition>>;\n"]}
@@ -15,4 +15,7 @@ export interface AdapterRef {
15
15
  readonly exportName?: string;
16
16
  readonly config?: DataContractValue;
17
17
  }
18
+ export interface DatabaseAdapterRef extends AdapterRef {
19
+ readonly kind: 'database';
20
+ }
18
21
  //# sourceMappingURL=refs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../src/data/refs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC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AC9C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAExF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CACrC;AAED,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"refs.js","sourceRoot":"","sources":["../../src/data/refs.ts"],"names":[],"mappings":"","sourcesContent":["import type { AdapterId, CredentialId } from './ids';\nimport type { DataContractValue } from './values';\n\nexport type CredentialKind = 'apiKey' | 'basic' | 'bearer' | 'custom' | 'oauth2';\n\nexport interface CredentialRef {\n readonly id: CredentialId;\n readonly kind: CredentialKind | (string & {});\n readonly label?: string;\n readonly scope?: string;\n}\n\nexport type AdapterKind = 'auth' | 'database' | 'storage' | 'transport' | (string & {});\n\nexport interface AdapterRef {\n readonly id: AdapterId;\n readonly kind: AdapterKind;\n readonly packageName?: string;\n readonly exportName?: string;\n readonly config?: DataContractValue;\n}\n"]}
1
+ {"version":3,"file":"refs.js","sourceRoot":"","sources":["../../src/data/refs.ts"],"names":[],"mappings":"","sourcesContent":["import type { AdapterId, CredentialId } from './ids';\nimport type { DataContractValue } from './values';\n\nexport type CredentialKind = 'apiKey' | 'basic' | 'bearer' | 'custom' | 'oauth2';\n\nexport interface CredentialRef {\n readonly id: CredentialId;\n readonly kind: CredentialKind | (string & {});\n readonly label?: string;\n readonly scope?: string;\n}\n\nexport type AdapterKind = 'auth' | 'database' | 'storage' | 'transport' | (string & {});\n\nexport interface AdapterRef {\n readonly id: AdapterId;\n readonly kind: AdapterKind;\n readonly packageName?: string;\n readonly exportName?: string;\n readonly config?: DataContractValue;\n}\n\nexport interface DatabaseAdapterRef extends AdapterRef {\n readonly kind: 'database';\n}\n"]}
@@ -1,10 +1,11 @@
1
- import type { DbCollectionDefinition } from '../db';
2
1
  import type { DataEndpointRegistry } from './endpoints';
3
2
  import type { DataSourceId } from './ids';
4
- import type { AdapterRef, CredentialRef } from './refs';
3
+ import type { CredentialRef, DatabaseAdapterRef } from './refs';
5
4
  import type { DataSchemaRegistry } from './schemas';
6
5
  import type { DataContractValue } from './values';
7
- export type DataSourceKind = 'database' | 'graphql' | 'managed-api' | 'openapi' | 'rest';
6
+ export type DataSourceKind = 'api' | 'database';
7
+ export type ApiOrigin = 'external' | 'generated';
8
+ export type ApiProtocol = 'graphql' | 'rest';
8
9
  export interface DataSourceBaseConfig {
9
10
  readonly id: DataSourceId;
10
11
  readonly kind: DataSourceKind;
@@ -15,43 +16,42 @@ export interface DataSourceBaseConfig {
15
16
  readonly schemas?: DataSchemaRegistry;
16
17
  readonly metadata?: DataContractValue;
17
18
  }
18
- export interface RestDataSourceConfig extends DataSourceBaseConfig {
19
- readonly kind: 'rest';
20
- readonly baseUrl: string;
19
+ export interface ApiDataSourceBaseConfig extends DataSourceBaseConfig {
20
+ readonly kind: 'api';
21
+ readonly origin: ApiOrigin;
22
+ readonly protocol: ApiProtocol;
21
23
  }
22
- export interface OpenApiImportRef {
24
+ export interface OpenApiDocumentRef {
23
25
  readonly url?: string;
24
26
  readonly documentId?: string;
25
27
  readonly version?: string;
26
28
  }
27
- export interface OpenApiDataSourceConfig extends DataSourceBaseConfig {
28
- readonly kind: 'openapi';
29
- readonly baseUrl?: string;
30
- readonly import?: OpenApiImportRef;
29
+ export interface ExternalRestApiDataSourceConfig extends ApiDataSourceBaseConfig {
30
+ readonly origin: 'external';
31
+ readonly protocol: 'rest';
32
+ readonly baseUrl: string;
33
+ readonly openApi?: OpenApiDocumentRef;
31
34
  }
32
- export interface GraphQlDataSourceConfig extends DataSourceBaseConfig {
33
- readonly kind: 'graphql';
35
+ export interface ExternalGraphQlApiDataSourceConfig extends ApiDataSourceBaseConfig {
36
+ readonly origin: 'external';
37
+ readonly protocol: 'graphql';
34
38
  readonly endpointUrl: string;
35
39
  readonly introspection?: {
36
40
  readonly enabled: boolean;
37
41
  readonly schemaVersion?: string;
38
42
  };
39
43
  }
44
+ export interface GeneratedRestApiDataSourceConfig extends ApiDataSourceBaseConfig {
45
+ readonly origin: 'generated';
46
+ readonly protocol: 'rest';
47
+ readonly generatedApiId: string;
48
+ readonly adapter: DatabaseAdapterRef;
49
+ }
50
+ export type ApiDataSourceConfig = ExternalGraphQlApiDataSourceConfig | ExternalRestApiDataSourceConfig | GeneratedRestApiDataSourceConfig;
40
51
  export interface DatabaseDataSourceConfig extends DataSourceBaseConfig {
41
52
  readonly kind: 'database';
42
- readonly adapter: AdapterRef;
43
- }
44
- export interface ManagedApiResourceConfig {
45
- readonly name: string;
46
- readonly collection: DbCollectionDefinition;
47
- readonly operations?: readonly ('create' | 'delete' | 'list' | 'read' | 'update')[];
48
- readonly metadata?: DataContractValue;
49
- }
50
- export interface ManagedApiDataSourceConfig extends DataSourceBaseConfig {
51
- readonly kind: 'managed-api';
52
- readonly adapter: AdapterRef;
53
- readonly resources: readonly ManagedApiResourceConfig[];
53
+ readonly adapter: DatabaseAdapterRef;
54
54
  }
55
- export type DataSourceConfig = DatabaseDataSourceConfig | GraphQlDataSourceConfig | ManagedApiDataSourceConfig | OpenApiDataSourceConfig | RestDataSourceConfig;
55
+ export type DataSourceConfig = ApiDataSourceConfig | DatabaseDataSourceConfig;
56
56
  export type DataSourceRegistry = Readonly<Record<DataSourceId, DataSourceConfig>>;
57
57
  //# sourceMappingURL=sources.d.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,wBAAwB,CAAC;AAE9E,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sources.js","sourceRoot":"","sources":["../../src/data/sources.ts"],"names":[],"mappings":"","sourcesContent":["import type { DbCollectionDefinition } from '../db';\nimport type { DataEndpointRegistry } from './endpoints';\nimport type { DataSourceId } from './ids';\nimport type { AdapterRef, CredentialRef } from './refs';\nimport type { DataSchemaRegistry } from './schemas';\nimport type { DataContractValue } from './values';\n\nexport type DataSourceKind = 'database' | 'graphql' | 'managed-api' | 'openapi' | 'rest';\n\nexport interface DataSourceBaseConfig {\n readonly id: DataSourceId;\n readonly kind: DataSourceKind;\n readonly name?: string;\n readonly description?: string;\n readonly credential?: CredentialRef;\n readonly endpoints: DataEndpointRegistry;\n readonly schemas?: DataSchemaRegistry;\n readonly metadata?: DataContractValue;\n}\n\nexport interface RestDataSourceConfig extends DataSourceBaseConfig {\n readonly kind: 'rest';\n readonly baseUrl: string;\n}\n\nexport interface OpenApiImportRef {\n readonly url?: string;\n readonly documentId?: string;\n readonly version?: string;\n}\n\nexport interface OpenApiDataSourceConfig extends DataSourceBaseConfig {\n readonly kind: 'openapi';\n readonly baseUrl?: string;\n readonly import?: OpenApiImportRef;\n}\n\nexport interface GraphQlDataSourceConfig extends DataSourceBaseConfig {\n readonly kind: 'graphql';\n readonly endpointUrl: string;\n readonly introspection?: {\n readonly enabled: boolean;\n readonly schemaVersion?: string;\n };\n}\n\nexport interface DatabaseDataSourceConfig extends DataSourceBaseConfig {\n readonly kind: 'database';\n readonly adapter: AdapterRef;\n}\n\nexport interface ManagedApiResourceConfig {\n readonly name: string;\n readonly collection: DbCollectionDefinition;\n readonly operations?: readonly ('create' | 'delete' | 'list' | 'read' | 'update')[];\n readonly metadata?: DataContractValue;\n}\n\nexport interface ManagedApiDataSourceConfig extends DataSourceBaseConfig {\n readonly kind: 'managed-api';\n readonly adapter: AdapterRef;\n readonly resources: readonly ManagedApiResourceConfig[];\n}\n\nexport type DataSourceConfig =\n | DatabaseDataSourceConfig\n | GraphQlDataSourceConfig\n | ManagedApiDataSourceConfig\n | OpenApiDataSourceConfig\n | RestDataSourceConfig;\n\nexport type DataSourceRegistry = Readonly<Record<DataSourceId, DataSourceConfig>>;\n"]}
1
+ {"version":3,"file":"sources.js","sourceRoot":"","sources":["../../src/data/sources.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataEndpointRegistry } from './endpoints';\nimport type { DataSourceId } from './ids';\nimport type { CredentialRef, DatabaseAdapterRef } from './refs';\nimport type { DataSchemaRegistry } from './schemas';\nimport type { DataContractValue } from './values';\n\nexport type DataSourceKind = 'api' | 'database';\nexport type ApiOrigin = 'external' | 'generated';\nexport type ApiProtocol = 'graphql' | 'rest';\n\nexport interface DataSourceBaseConfig {\n readonly id: DataSourceId;\n readonly kind: DataSourceKind;\n readonly name?: string;\n readonly description?: string;\n readonly credential?: CredentialRef;\n readonly endpoints: DataEndpointRegistry;\n readonly schemas?: DataSchemaRegistry;\n readonly metadata?: DataContractValue;\n}\n\nexport interface ApiDataSourceBaseConfig extends DataSourceBaseConfig {\n readonly kind: 'api';\n readonly origin: ApiOrigin;\n readonly protocol: ApiProtocol;\n}\n\nexport interface OpenApiDocumentRef {\n readonly url?: string;\n readonly documentId?: string;\n readonly version?: string;\n}\n\nexport interface ExternalRestApiDataSourceConfig extends ApiDataSourceBaseConfig {\n readonly origin: 'external';\n readonly protocol: 'rest';\n readonly baseUrl: string;\n readonly openApi?: OpenApiDocumentRef;\n}\n\nexport interface ExternalGraphQlApiDataSourceConfig extends ApiDataSourceBaseConfig {\n readonly origin: 'external';\n readonly protocol: 'graphql';\n readonly endpointUrl: string;\n readonly introspection?: {\n readonly enabled: boolean;\n readonly schemaVersion?: string;\n };\n}\n\nexport interface GeneratedRestApiDataSourceConfig extends ApiDataSourceBaseConfig {\n readonly origin: 'generated';\n readonly protocol: 'rest';\n readonly generatedApiId: string;\n readonly adapter: DatabaseAdapterRef;\n}\n\nexport type ApiDataSourceConfig =\n | ExternalGraphQlApiDataSourceConfig\n | ExternalRestApiDataSourceConfig\n | GeneratedRestApiDataSourceConfig;\n\nexport interface DatabaseDataSourceConfig extends DataSourceBaseConfig {\n readonly kind: 'database';\n readonly adapter: DatabaseAdapterRef;\n}\n\nexport type DataSourceConfig = ApiDataSourceConfig | DatabaseDataSourceConfig;\n\nexport type DataSourceRegistry = Readonly<Record<DataSourceId, DataSourceConfig>>;\n"]}
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { ColorHarmony } from '@ankhorage/color-theory';
2
2
  import type { AuthFlowConfig, AuthIdentifierKind, AuthOAuthConfig, AuthSignUpField } from './auth';
3
3
  import type { BindingValueSource, ComponentDataBindingRegistry, ScreenDataLoaderDefinition } from './bindings';
4
- import type { AppDataManifest, DataSourceRegistry } from './data';
4
+ import type { DataSourceRegistry, GeneratedApiRegistry } from './data';
5
5
  import type { ScreenRequirements } from './requirements';
6
6
  export interface ThemeModeConfig {
7
7
  primaryColor: string;
@@ -159,7 +159,14 @@ export interface RouteDefinition {
159
159
  path?: string;
160
160
  label?: string;
161
161
  icon?: IconSpec;
162
- hideInTabBar?: boolean;
162
+ /**
163
+ * Whether this route appears in Tabs and Drawer primary navigation.
164
+ *
165
+ * Omitted routes are visible by default. Setting this to `false` hides the
166
+ * route from primary navigation without making it unnavigable. Stack
167
+ * navigators preserve the value but do not present primary navigation.
168
+ */
169
+ showInPrimaryNavigation?: boolean;
163
170
  guards?: string[];
164
171
  screenId?: string;
165
172
  navigator?: NavigatorSpec;
@@ -259,7 +266,7 @@ export interface AppManifest {
259
266
  infra: InfraManifest;
260
267
  navigator: NavigatorSpec;
261
268
  screens: Record<string, ScreenSpec>;
262
- data?: AppDataManifest;
269
+ generatedApis?: GeneratedApiRegistry;
263
270
  dataSources?: DataSourceRegistry;
264
271
  dataBindings?: ComponentDataBindingRegistry;
265
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AAa,EAAE,MAAM,CAAC;QACtB,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,WAAW,CAAC;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACnC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,aAAa,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,YAAY,CAAC,EAAE,4BAA4B,CAAC;IAC5C,QAAQ,EAAE,WAAW,CAAC;CACvB"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA2IA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAGpE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,eAAe;IACf,uBAAuB;IACvB,iBAAiB;IACjB,oBAAoB;IACpB,qBAAqB;IACrB,eAAe;IACf,YAAY;IACZ,OAAO;IACP,iBAAiB;IACjB,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,SAAS;IACT,aAAa;IACb,mBAAmB;IACnB,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,mB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KAAK,CAAU,CAAC;AAGjF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAC","sourcesContent":["import type { ColorHarmony } from '@ankhorage/color-theory';\n\nimport type { AuthFlowConfig, AuthIdentifierKind, AuthOAuthConfig, AuthSignUpField } from './auth';\nimport type {\n BindingValueSource,\n ComponentDataBindingRegistry,\n ScreenDataLoaderDefinition,\n} from './bindings';\nimport type { AppDataManifest, DataSourceRegistry } from './data';\nimport type { ScreenRequirements } from './requirements';\n\nexport interface ThemeModeConfig {\n primaryColor: string;\n harmony: ColorHarmony;\n}\n\nexport interface ThemeConfig {\n id: string;\n name: string;\n light: ThemeModeConfig;\n dark: ThemeModeConfig;\n}\n\nexport type ActionType =\n | 'navigate'\n | 'alert'\n | 'console'\n | 'toggleDarkMode'\n | 'setLanguage'\n | 'search'\n | 'filter';\n\nexport interface NavigateAction {\n type: 'navigate';\n payload: {\n route: string;\n params?: Record<string, number | string>;\n };\n}\n\nexport interface AlertAction {\n type: 'alert';\n payload?: {\n message?: string;\n };\n}\n\nexport interface ConsoleAction {\n type: 'console';\n payload?: Record<string, unknown>;\n}\n\nexport interface ToggleDarkModeAction {\n type: 'toggleDarkMode';\n payload?: never;\n}\n\nexport interface SetLanguageAction {\n type: 'setLanguage';\n payload: {\n locale: string;\n };\n}\n\nexport interface SearchAction {\n type: 'search';\n payload: {\n query: string;\n scope?: string;\n };\n}\n\nexport interface FilterAction {\n type: 'filter';\n payload: {\n filterKey: string;\n filterValue: string;\n };\n}\n\nexport type Action =\n | AlertAction\n | ConsoleAction\n | FilterAction\n | NavigateAction\n | SearchAction\n | SetLanguageAction\n | ToggleDarkModeAction;\n\nexport type ManifestValue =\n | string\n | number\n | boolean\n | null\n | readonly ManifestValue[]\n | { readonly [key: string]: ManifestValue };\n\nexport type ComponentEventPayloadValue = ManifestValue;\n\nexport interface ComponentEventDto<\n TType extends string = string,\n TPayload extends object = Record<string, ComponentEventPayloadValue>,\n> {\n readonly type: TType;\n readonly sourceNodeId: string;\n readonly payload: TPayload;\n}\n\nexport type FormSubmitValues = Record<string, ComponentEventPayloadValue>;\n\nexport type FormSubmitEventDto = ComponentEventDto<\n 'form.submit',\n {\n readonly values: FormSubmitValues;\n }\n>;\n\nexport type ButtonPressEventDto = ComponentEventDto<'button.press', Record<string, never>>;\n\nexport interface CollectionItemPressPayload {\n readonly itemId: string | number;\n readonly item: Record<string, ComponentEventPayloadValue>;\n}\n\nexport type CollectionItemPressEventDto = ComponentEventDto<\n 'collection.itemPress',\n CollectionItemPressPayload\n>;\n\nexport type ComponentEventDtoKind =\n | ButtonPressEventDto['type']\n | CollectionItemPressEventDto['type']\n | FormSubmitEventDto['type'];\n\nexport type KnownComponentEventDto =\n | ButtonPressEventDto\n | CollectionItemPressEventDto\n | FormSubmitEventDto;\n\nexport const NAVIGATOR_TYPES = ['stack', 'tabs', 'drawer'] as const;\nexport type NavigatorType = (typeof NAVIGATOR_TYPES)[number];\n\nexport const APP_CATEGORIES = [\n 'books_reading',\n 'business_productivity',\n 'developer_tools',\n 'education_learning',\n 'entertainment_media',\n 'finance_money',\n 'food_drink',\n 'games',\n 'graphics_design',\n 'health_fitness',\n 'kids_family',\n 'lifestyle',\n 'medical',\n 'music_audio',\n 'navigation_travel',\n 'news_magazines',\n 'photo_video',\n 'reference',\n 'shopping_commerce',\n 'social_community',\n 'sports',\n 'utilities_tools',\n 'weather',\n] as const;\nexport type AppCategory = (typeof APP_CATEGORIES)[number];\n\nexport const DEPLOYMENT_TARGETS = ['minikube'] as const;\nexport type KnownDeploymentTarget = (typeof DEPLOYMENT_TARGETS)[number];\nexport type DeploymentTarget = KnownDeploymentTarget | (string & {});\n\nexport const DATABASE_PROVIDERS = ['supabase'] as const;\nexport type KnownDatabaseProvider = (typeof DATABASE_PROVIDERS)[number];\nexport type DatabaseProvider = KnownDatabaseProvider | (string & {});\n\nexport const DATABASE_TIERS = ['dev', 'prod'] as const;\nexport type DatabaseTier = (typeof DATABASE_TIERS)[number];\n\nexport const STORAGE_PROVIDERS = ['auto', 's3', 'r2'] as const;\nexport type StorageProvider = (typeof STORAGE_PROVIDERS)[number];\n\nexport const STATE_PROVIDERS = ['legend'] as const;\nexport type KnownStateProvider = (typeof STATE_PROVIDERS)[number];\nexport type StateProvider = KnownStateProvider | (string & {});\n\nexport const STATE_PERSISTENCE_MODES = ['none', 'local', 'secure', 'database'] as const;\nexport type StatePersistenceMode = (typeof STATE_PERSISTENCE_MODES)[number];\n\nexport const AUTHZ_KINDS = ['RBAC', 'ABAC'] as const;\nexport type AuthzKind = (typeof AUTHZ_KINDS)[number];\n\nexport const AUTHZ_ENGINES = ['cerbos', 'native'] as const;\nexport type AuthzEngine = (typeof AUTHZ_ENGINES)[number];\n\nexport const AUTH_SCOPES = ['global', 'none', 'integrated'] as const;\nexport type AuthScope = (typeof AUTH_SCOPES)[number];\n\nexport const AUTH_PROVIDERS = ['supabase'] as const;\nexport type KnownAuthProvider = (typeof AUTH_PROVIDERS)[number];\nexport type AuthProvider = KnownAuthProvider | (string & {});\n\nexport const AUTH_SIGN_IN_IDENTIFIERS = ['email', 'username', 'phone'] as const;\nexport type AuthSignInIdentifier = AuthIdentifierKind;\n\nexport const AUTH_SIGN_UP_POLICIES = ['autoSignIn', 'requireVerification'] as const;\nexport type AuthSignUpPolicy = (typeof AUTH_SIGN_UP_POLICIES)[number];\n\nexport const AUTH_PROFILE_FIELDS = [\n ...AUTH_SIGN_IN_IDENTIFIERS,\n 'firstName',\n 'lastName',\n 'displayName',\n 'avatarUrl',\n] as const;\nexport type KnownAuthProfileField = (typeof AUTH_PROFILE_FIELDS)[number];\nexport type AuthProfileField = KnownAuthProfileField | (string & {});\n\nexport const AUTH_PROFILE_PRIMARY_KEY_STRATEGIES = ['authUserId'] as const;\nexport type AuthProfilePrimaryKeyStrategy = (typeof AUTH_PROFILE_PRIMARY_KEY_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_CREATE_STRATEGIES = ['trigger', 'api', 'app'] as const;\nexport type AuthProfileCreateStrategy = (typeof AUTH_PROFILE_CREATE_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_UPDATE_STRATEGIES = ['api', 'app'] as const;\nexport type AuthProfileUpdateStrategy = (typeof AUTH_PROFILE_UPDATE_STRATEGIES)[number];\n\nexport interface IconSpec {\n name: string;\n provider?: string;\n size?: number | string;\n color?: string;\n}\n\nexport interface UiNodeRepeatSpec {\n source: BindingValueSource;\n itemAlias?: string;\n keyPath?: string;\n empty?: readonly UiNode[];\n}\n\nexport interface UiNode {\n id: string;\n type: string;\n alias?: string;\n props?: Record<string, unknown>;\n children?: UiNode[];\n style?: Record<string, number | string>;\n repeat?: UiNodeRepeatSpec;\n}\n\nexport interface ScreenSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n root: UiNode;\n dataLoaders?: readonly ScreenDataLoaderDefinition[];\n requires?: ScreenRequirements;\n}\n\nexport interface NavigatorSpec {\n type: NavigatorType;\n initialRouteName?: string;\n routes: RouteDefinition[];\n options?: Record<string, unknown>;\n}\n\nexport interface RouteDefinition {\n name: string;\n path?: string;\n label?: string;\n icon?: IconSpec;\n hideInTabBar?: boolean;\n guards?: string[];\n screenId?: string;\n navigator?: NavigatorSpec;\n}\n\nexport type SplashScreenResizeMode = 'contain' | 'cover' | 'native';\n\nexport interface SplashScreenAssetSpec {\n readonly image?: string;\n readonly imageWidth?: number;\n readonly resizeMode?: SplashScreenResizeMode;\n}\n\nexport interface SplashScreenModeSpec extends SplashScreenAssetSpec {\n readonly backgroundColor?: string;\n}\n\nexport interface SplashScreenSpec extends SplashScreenModeSpec {\n readonly dark?: SplashScreenModeSpec;\n}\n\nexport interface DeploymentSpec {\n target: DeploymentTarget;\n monitoring: boolean;\n}\n\nexport interface DatabaseSpec {\n provider: DatabaseProvider;\n tier: DatabaseTier;\n}\n\nexport interface StorageSpec {\n provider: StorageProvider;\n buckets: string[];\n}\n\nexport interface StateSpec {\n readonly provider: StateProvider;\n readonly persistence?: StatePersistenceMode;\n}\n\nexport interface AuthzSpec {\n kind: AuthzKind;\n engine: AuthzEngine;\n}\n\nexport interface AuthSignInSpec {\n identifiers: AuthSignInIdentifier[];\n}\n\nexport interface AuthSignUpSpec {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n signUpPolicy?: AuthSignUpPolicy;\n}\n\nexport interface AuthProfileSpec {\n fields: AuthProfileField[];\n table?: string;\n primaryKey?: AuthProfilePrimaryKeyStrategy;\n createStrategy?: AuthProfileCreateStrategy;\n updateStrategy?: AuthProfileUpdateStrategy;\n}\n\nexport interface AuthSpec {\n scope: AuthScope;\n provider: AuthProvider;\n authorization?: AuthzSpec;\n flow?: AuthFlowConfig;\n signIn?: AuthSignInSpec;\n signUp?: AuthSignUpSpec;\n oauth?: AuthOAuthConfig;\n profile?: AuthProfileSpec;\n}\n\nexport interface NetworkingSpec {\n domain?: string;\n cdn: boolean;\n}\n\nexport interface InfraManifest {\n deployment?: DeploymentSpec;\n auth?: AuthSpec;\n database?: DatabaseSpec;\n storage?: StorageSpec;\n state?: StateSpec;\n networking?: NetworkingSpec;\n plugins: string[];\n pluginsConfig?: Record<string, unknown>;\n}\n\nexport interface AppSettings {\n apiBaseUrl?: string;\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n category: AppCategory;\n themeId: string;\n created?: string;\n updated?: string;\n };\n themes: ThemeConfig[];\n activeThemeId: string;\n activeThemeMode?: 'dark' | 'light';\n splashScreen?: SplashScreenSpec;\n infra: InfraManifest;\n navigator: NavigatorSpec;\n screens: Record<string, ScreenSpec>;\n data?: AppDataManifest;\n dataSources?: DataSourceRegistry;\n dataBindings?: ComponentDataBindingRegistry;\n settings: AppSettings;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA2IA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,MAA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AAqB,GAAG,CAAC,YAAY,EAAE,qBAAqB,CAAU,CAAC;AAGpF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,wBAAwB;IAC3B,WAAW;IACX,UAAU;IACV,aAAa;IACb,WAAW;CACH,CAAC;AAIX,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,YAAY,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAGjF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAC","sourcesContent":["import type { ColorHarmony } from '@ankhorage/color-theory';\n\nimport type { AuthFlowConfig, AuthIdentifierKind, AuthOAuthConfig, AuthSignUpField } from './auth';\nimport type {\n BindingValueSource,\n ComponentDataBindingRegistry,\n ScreenDataLoaderDefinition,\n} from './bindings';\nimport type { DataSourceRegistry, GeneratedApiRegistry } from './data';\nimport type { ScreenRequirements } from './requirements';\n\nexport interface ThemeModeConfig {\n primaryColor: string;\n harmony: ColorHarmony;\n}\n\nexport interface ThemeConfig {\n id: string;\n name: string;\n light: ThemeModeConfig;\n dark: ThemeModeConfig;\n}\n\nexport type ActionType =\n | 'navigate'\n | 'alert'\n | 'console'\n | 'toggleDarkMode'\n | 'setLanguage'\n | 'search'\n | 'filter';\n\nexport interface NavigateAction {\n type: 'navigate';\n payload: {\n route: string;\n params?: Record<string, number | string>;\n };\n}\n\nexport interface AlertAction {\n type: 'alert';\n payload?: {\n message?: string;\n };\n}\n\nexport interface ConsoleAction {\n type: 'console';\n payload?: Record<string, unknown>;\n}\n\nexport interface ToggleDarkModeAction {\n type: 'toggleDarkMode';\n payload?: never;\n}\n\nexport interface SetLanguageAction {\n type: 'setLanguage';\n payload: {\n locale: string;\n };\n}\n\nexport interface SearchAction {\n type: 'search';\n payload: {\n query: string;\n scope?: string;\n };\n}\n\nexport interface FilterAction {\n type: 'filter';\n payload: {\n filterKey: string;\n filterValue: string;\n };\n}\n\nexport type Action =\n | AlertAction\n | ConsoleAction\n | FilterAction\n | NavigateAction\n | SearchAction\n | SetLanguageAction\n | ToggleDarkModeAction;\n\nexport type ManifestValue =\n | string\n | number\n | boolean\n | null\n | readonly ManifestValue[]\n | { readonly [key: string]: ManifestValue };\n\nexport type ComponentEventPayloadValue = ManifestValue;\n\nexport interface ComponentEventDto<\n TType extends string = string,\n TPayload extends object = Record<string, ComponentEventPayloadValue>,\n> {\n readonly type: TType;\n readonly sourceNodeId: string;\n readonly payload: TPayload;\n}\n\nexport type FormSubmitValues = Record<string, ComponentEventPayloadValue>;\n\nexport type FormSubmitEventDto = ComponentEventDto<\n 'form.submit',\n {\n readonly values: FormSubmitValues;\n }\n>;\n\nexport type ButtonPressEventDto = ComponentEventDto<'button.press', Record<string, never>>;\n\nexport interface CollectionItemPressPayload {\n readonly itemId: string | number;\n readonly item: Record<string, ComponentEventPayloadValue>;\n}\n\nexport type CollectionItemPressEventDto = ComponentEventDto<\n 'collection.itemPress',\n CollectionItemPressPayload\n>;\n\nexport type ComponentEventDtoKind =\n | ButtonPressEventDto['type']\n | CollectionItemPressEventDto['type']\n | FormSubmitEventDto['type'];\n\nexport type KnownComponentEventDto =\n | ButtonPressEventDto\n | CollectionItemPressEventDto\n | FormSubmitEventDto;\n\nexport const NAVIGATOR_TYPES = ['stack', 'tabs', 'drawer'] as const;\nexport type NavigatorType = (typeof NAVIGATOR_TYPES)[number];\n\nexport const APP_CATEGORIES = [\n 'books_reading',\n 'business_productivity',\n 'developer_tools',\n 'education_learning',\n 'entertainment_media',\n 'finance_money',\n 'food_drink',\n 'games',\n 'graphics_design',\n 'health_fitness',\n 'kids_family',\n 'lifestyle',\n 'medical',\n 'music_audio',\n 'navigation_travel',\n 'news_magazines',\n 'photo_video',\n 'reference',\n 'shopping_commerce',\n 'social_community',\n 'sports',\n 'utilities_tools',\n 'weather',\n] as const;\nexport type AppCategory = (typeof APP_CATEGORIES)[number];\n\nexport const DEPLOYMENT_TARGETS = ['minikube'] as const;\nexport type KnownDeploymentTarget = (typeof DEPLOYMENT_TARGETS)[number];\nexport type DeploymentTarget = KnownDeploymentTarget | (string & {});\n\nexport const DATABASE_PROVIDERS = ['supabase'] as const;\nexport type KnownDatabaseProvider = (typeof DATABASE_PROVIDERS)[number];\nexport type DatabaseProvider = KnownDatabaseProvider | (string & {});\n\nexport const DATABASE_TIERS = ['dev', 'prod'] as const;\nexport type DatabaseTier = (typeof DATABASE_TIERS)[number];\n\nexport const STORAGE_PROVIDERS = ['auto', 's3', 'r2'] as const;\nexport type StorageProvider = (typeof STORAGE_PROVIDERS)[number];\n\nexport const STATE_PROVIDERS = ['legend'] as const;\nexport type KnownStateProvider = (typeof STATE_PROVIDERS)[number];\nexport type StateProvider = KnownStateProvider | (string & {});\n\nexport const STATE_PERSISTENCE_MODES = ['none', 'local', 'secure', 'database'] as const;\nexport type StatePersistenceMode = (typeof STATE_PERSISTENCE_MODES)[number];\n\nexport const AUTHZ_KINDS = ['RBAC', 'ABAC'] as const;\nexport type AuthzKind = (typeof AUTHZ_KINDS)[number];\n\nexport const AUTHZ_ENGINES = ['cerbos', 'native'] as const;\nexport type AuthzEngine = (typeof AUTHZ_ENGINES)[number];\n\nexport const AUTH_SCOPES = ['global', 'none', 'integrated'] as const;\nexport type AuthScope = (typeof AUTH_SCOPES)[number];\n\nexport const AUTH_PROVIDERS = ['supabase'] as const;\nexport type KnownAuthProvider = (typeof AUTH_PROVIDERS)[number];\nexport type AuthProvider = KnownAuthProvider | (string & {});\n\nexport const AUTH_SIGN_IN_IDENTIFIERS = ['email', 'username', 'phone'] as const;\nexport type AuthSignInIdentifier = AuthIdentifierKind;\n\nexport const AUTH_SIGN_UP_POLICIES = ['autoSignIn', 'requireVerification'] as const;\nexport type AuthSignUpPolicy = (typeof AUTH_SIGN_UP_POLICIES)[number];\n\nexport const AUTH_PROFILE_FIELDS = [\n ...AUTH_SIGN_IN_IDENTIFIERS,\n 'firstName',\n 'lastName',\n 'displayName',\n 'avatarUrl',\n] as const;\nexport type KnownAuthProfileField = (typeof AUTH_PROFILE_FIELDS)[number];\nexport type AuthProfileField = KnownAuthProfileField | (string & {});\n\nexport const AUTH_PROFILE_PRIMARY_KEY_STRATEGIES = ['authUserId'] as const;\nexport type AuthProfilePrimaryKeyStrategy = (typeof AUTH_PROFILE_PRIMARY_KEY_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_CREATE_STRATEGIES = ['trigger', 'api', 'app'] as const;\nexport type AuthProfileCreateStrategy = (typeof AUTH_PROFILE_CREATE_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_UPDATE_STRATEGIES = ['api', 'app'] as const;\nexport type AuthProfileUpdateStrategy = (typeof AUTH_PROFILE_UPDATE_STRATEGIES)[number];\n\nexport interface IconSpec {\n name: string;\n provider?: string;\n size?: number | string;\n color?: string;\n}\n\nexport interface UiNodeRepeatSpec {\n source: BindingValueSource;\n itemAlias?: string;\n keyPath?: string;\n empty?: readonly UiNode[];\n}\n\nexport interface UiNode {\n id: string;\n type: string;\n alias?: string;\n props?: Record<string, unknown>;\n children?: UiNode[];\n style?: Record<string, number | string>;\n repeat?: UiNodeRepeatSpec;\n}\n\nexport interface ScreenSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n root: UiNode;\n dataLoaders?: readonly ScreenDataLoaderDefinition[];\n requires?: ScreenRequirements;\n}\n\nexport interface NavigatorSpec {\n type: NavigatorType;\n initialRouteName?: string;\n routes: RouteDefinition[];\n options?: Record<string, unknown>;\n}\n\nexport interface RouteDefinition {\n name: string;\n path?: string;\n label?: string;\n icon?: IconSpec;\n /**\n * Whether this route appears in Tabs and Drawer primary navigation.\n *\n * Omitted routes are visible by default. Setting this to `false` hides the\n * route from primary navigation without making it unnavigable. Stack\n * navigators preserve the value but do not present primary navigation.\n */\n showInPrimaryNavigation?: boolean;\n guards?: string[];\n screenId?: string;\n navigator?: NavigatorSpec;\n}\n\nexport type SplashScreenResizeMode = 'contain' | 'cover' | 'native';\n\nexport interface SplashScreenAssetSpec {\n readonly image?: string;\n readonly imageWidth?: number;\n readonly resizeMode?: SplashScreenResizeMode;\n}\n\nexport interface SplashScreenModeSpec extends SplashScreenAssetSpec {\n readonly backgroundColor?: string;\n}\n\nexport interface SplashScreenSpec extends SplashScreenModeSpec {\n readonly dark?: SplashScreenModeSpec;\n}\n\nexport interface DeploymentSpec {\n target: DeploymentTarget;\n monitoring: boolean;\n}\n\nexport interface DatabaseSpec {\n provider: DatabaseProvider;\n tier: DatabaseTier;\n}\n\nexport interface StorageSpec {\n provider: StorageProvider;\n buckets: string[];\n}\n\nexport interface StateSpec {\n readonly provider: StateProvider;\n readonly persistence?: StatePersistenceMode;\n}\n\nexport interface AuthzSpec {\n kind: AuthzKind;\n engine: AuthzEngine;\n}\n\nexport interface AuthSignInSpec {\n identifiers: AuthSignInIdentifier[];\n}\n\nexport interface AuthSignUpSpec {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n signUpPolicy?: AuthSignUpPolicy;\n}\n\nexport interface AuthProfileSpec {\n fields: AuthProfileField[];\n table?: string;\n primaryKey?: AuthProfilePrimaryKeyStrategy;\n createStrategy?: AuthProfileCreateStrategy;\n updateStrategy?: AuthProfileUpdateStrategy;\n}\n\nexport interface AuthSpec {\n scope: AuthScope;\n provider: AuthProvider;\n authorization?: AuthzSpec;\n flow?: AuthFlowConfig;\n signIn?: AuthSignInSpec;\n signUp?: AuthSignUpSpec;\n oauth?: AuthOAuthConfig;\n profile?: AuthProfileSpec;\n}\n\nexport interface NetworkingSpec {\n domain?: string;\n cdn: boolean;\n}\n\nexport interface InfraManifest {\n deployment?: DeploymentSpec;\n auth?: AuthSpec;\n database?: DatabaseSpec;\n storage?: StorageSpec;\n state?: StateSpec;\n networking?: NetworkingSpec;\n plugins: string[];\n pluginsConfig?: Record<string, unknown>;\n}\n\nexport interface AppSettings {\n apiBaseUrl?: string;\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n category: AppCategory;\n themeId: string;\n created?: string;\n updated?: string;\n };\n themes: ThemeConfig[];\n activeThemeId: string;\n activeThemeMode?: 'dark' | 'light';\n splashScreen?: SplashScreenSpec;\n infra: InfraManifest;\n navigator: NavigatorSpec;\n screens: Record<string, ScreenSpec>;\n generatedApis?: GeneratedApiRegistry;\n dataSources?: DataSourceRegistry;\n dataBindings?: ComponentDataBindingRegistry;\n settings: AppSettings;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/contracts",
3
- "version": "4.0.1",
3
+ "version": "5.0.0",
4
4
  "main": "./dist/index.js",
5
5
  "ankh": {
6
6
  "category": "contracts",