@ankhorage/contracts 1.7.0 → 1.9.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 +12 -0
- package/dist/bindings.d.ts +38 -0
- package/dist/bindings.d.ts.map +1 -0
- package/dist/bindings.js +2 -0
- package/dist/bindings.js.map +1 -0
- package/dist/data/diagnostics.d.ts +22 -0
- package/dist/data/diagnostics.d.ts.map +1 -0
- package/dist/data/diagnostics.js +2 -0
- package/dist/data/diagnostics.js.map +1 -0
- package/dist/data/endpoints.d.ts +18 -0
- package/dist/data/endpoints.d.ts.map +1 -0
- package/dist/data/endpoints.js +2 -0
- package/dist/data/endpoints.js.map +1 -0
- package/dist/data/ids.d.ts +7 -0
- package/dist/data/ids.d.ts.map +1 -0
- package/dist/data/ids.js +2 -0
- package/dist/data/ids.js.map +1 -0
- package/dist/data/index.d.ts +9 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +9 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/operations.d.ts +49 -0
- package/dist/data/operations.d.ts.map +1 -0
- package/dist/data/operations.js +2 -0
- package/dist/data/operations.js.map +1 -0
- package/dist/data/refs.d.ts +18 -0
- package/dist/data/refs.d.ts.map +1 -0
- package/dist/data/refs.js +2 -0
- package/dist/data/refs.js.map +1 -0
- package/dist/data/schemas.d.ts +34 -0
- package/dist/data/schemas.d.ts.map +1 -0
- package/dist/data/schemas.js +2 -0
- package/dist/data/schemas.js.map +1 -0
- package/dist/data/sources.d.ts +57 -0
- package/dist/data/sources.d.ts.map +1 -0
- package/dist/data/sources.js +2 -0
- package/dist/data/sources.js.map +1 -0
- package/dist/data/values.d.ts +5 -0
- package/dist/data/values.d.ts.map +1 -0
- package/dist/data/values.js +2 -0
- package/dist/data/values.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +9 -1
- package/src/bindings.test.ts +96 -0
- package/src/bindings.ts +54 -0
- package/src/data/data.test.ts +305 -0
- package/src/data/diagnostics.ts +41 -0
- package/src/data/endpoints.ts +20 -0
- package/src/data/ids.ts +6 -0
- package/src/data/index.ts +8 -0
- package/src/data/operations.ts +66 -0
- package/src/data/refs.ts +21 -0
- package/src/data/schemas.ts +46 -0
- package/src/data/sources.ts +72 -0
- package/src/data/values.ts +11 -0
- package/src/index.ts +2 -0
- package/src/types.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/contracts
|
|
2
2
|
|
|
3
|
+
## 1.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d1e08cc: Add provider-neutral data-source, endpoint, operation, schema, credential, adapter, and diagnostic contracts.
|
|
8
|
+
|
|
9
|
+
## 1.8.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- e70556e: Add provider-neutral data and state binding contracts for manifest node props and database collection queries.
|
|
14
|
+
|
|
3
15
|
## 1.7.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { DbFilter, DbPage, DbSort } from './db';
|
|
2
|
+
export type BindingValue = string | number | boolean | null | readonly BindingValue[] | {
|
|
3
|
+
readonly [key: string]: BindingValue;
|
|
4
|
+
};
|
|
5
|
+
export type BindingRefreshMode = 'focus' | 'live' | 'poll' | 'static';
|
|
6
|
+
export interface DbCollectionQueryBinding {
|
|
7
|
+
readonly collection: string;
|
|
8
|
+
readonly schema?: string;
|
|
9
|
+
readonly columns?: readonly string[];
|
|
10
|
+
readonly filters?: readonly DbFilter[];
|
|
11
|
+
readonly sort?: readonly DbSort[];
|
|
12
|
+
readonly page?: DbPage;
|
|
13
|
+
readonly refresh?: BindingRefreshMode;
|
|
14
|
+
readonly pollIntervalMs?: number;
|
|
15
|
+
}
|
|
16
|
+
export type BindingValueSource = {
|
|
17
|
+
readonly source: 'context';
|
|
18
|
+
readonly path: string;
|
|
19
|
+
} | {
|
|
20
|
+
readonly source: 'db.collection';
|
|
21
|
+
readonly query: DbCollectionQueryBinding;
|
|
22
|
+
} | {
|
|
23
|
+
readonly source: 'event';
|
|
24
|
+
readonly path: string;
|
|
25
|
+
} | {
|
|
26
|
+
readonly source: 'literal';
|
|
27
|
+
readonly value: BindingValue;
|
|
28
|
+
} | {
|
|
29
|
+
readonly source: 'state';
|
|
30
|
+
readonly path: string;
|
|
31
|
+
};
|
|
32
|
+
export type BindingValueTransform = 'lowercase' | 'trim' | 'uppercase';
|
|
33
|
+
export interface NodePropBinding {
|
|
34
|
+
readonly prop: string;
|
|
35
|
+
readonly valueFrom: BindingValueSource;
|
|
36
|
+
readonly transform?: BindingValueTransform | readonly BindingValueTransform[];
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=bindings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAErD,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,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEtE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CA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ent":["import type { DbFilter, DbPage, DbSort } from './db';\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 BindingRefreshMode = 'focus' | 'live' | 'poll' | 'static';\n\nexport interface DbCollectionQueryBinding {\n readonly collection: string;\n readonly schema?: string;\n readonly columns?: readonly string[];\n readonly filters?: readonly DbFilter[];\n readonly sort?: readonly DbSort[];\n readonly page?: DbPage;\n readonly refresh?: BindingRefreshMode;\n readonly pollIntervalMs?: number;\n}\n\nexport type BindingValueSource =\n | {\n readonly source: 'context';\n readonly path: string;\n }\n | {\n readonly source: 'db.collection';\n readonly query: DbCollectionQueryBinding;\n }\n | {\n readonly source: 'event';\n readonly path: string;\n }\n | {\n readonly source: 'literal';\n readonly value: BindingValue;\n }\n | {\n readonly source: 'state';\n readonly path: string;\n };\n\nexport type BindingValueTransform = 'lowercase' | 'trim' | 'uppercase';\n\nexport interface NodePropBinding {\n readonly prop: string;\n readonly valueFrom: BindingValueSource;\n readonly transform?: BindingValueTransform | readonly BindingValueTransform[];\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DataSourceId, EndpointId, OperationId } from './ids';
|
|
2
|
+
export type DataDiagnosticSeverity = 'error' | 'info' | 'warning';
|
|
3
|
+
export type DataDiagnosticCode = 'ambiguous-server' | 'duplicate-operation-id' | 'invalid-config' | 'missing-adapter' | 'missing-credential' | 'missing-data-source' | 'missing-endpoint' | 'missing-operation' | 'missing-schema' | 'network-error' | 'parse-error' | 'unsupported-auth-scheme' | 'unsupported-schema' | (string & {});
|
|
4
|
+
export interface DataSourceDiagnostic {
|
|
5
|
+
readonly code: DataDiagnosticCode;
|
|
6
|
+
readonly message: string;
|
|
7
|
+
readonly severity: DataDiagnosticSeverity;
|
|
8
|
+
readonly dataSourceId?: DataSourceId;
|
|
9
|
+
readonly endpointId?: EndpointId;
|
|
10
|
+
readonly operationId?: OperationId;
|
|
11
|
+
readonly path?: string;
|
|
12
|
+
readonly hint?: string;
|
|
13
|
+
}
|
|
14
|
+
export type DataSourceDiagnosticResult<TData> = {
|
|
15
|
+
readonly ok: true;
|
|
16
|
+
readonly data: TData;
|
|
17
|
+
readonly diagnostics?: readonly DataSourceDiagnostic[];
|
|
18
|
+
} | {
|
|
19
|
+
readonly ok: false;
|
|
20
|
+
readonly diagnostics: readonly DataSourceDiagnostic[];
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/data/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEnE,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAC1B,kBAAkB,GAClB,wBAAwB,GACxB,gBAAgB,GAChB,iBAAiB,GACjB,oBAAoB,GACpB,qBAAqB,GACrB,kBAAkB,GAClB,mBAAmB,GACnB,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,yBAAyB,GACzB,oBAAoB,GACpB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;IAC1C,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IACrC,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,0BAA0B,CAAC,KAAK,IACxC;IACE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACxD,GACD;IACE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,WAAW,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/data/diagnostics.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataSourceId, EndpointId, OperationId } from './ids';\n\nexport type DataDiagnosticSeverity = 'error' | 'info' | 'warning';\n\nexport type DataDiagnosticCode =\n | 'ambiguous-server'\n | 'duplicate-operation-id'\n | 'invalid-config'\n | 'missing-adapter'\n | 'missing-credential'\n | 'missing-data-source'\n | 'missing-endpoint'\n | 'missing-operation'\n | 'missing-schema'\n | 'network-error'\n | 'parse-error'\n | 'unsupported-auth-scheme'\n | 'unsupported-schema'\n | (string & {});\n\nexport interface DataSourceDiagnostic {\n readonly code: DataDiagnosticCode;\n readonly message: string;\n readonly severity: DataDiagnosticSeverity;\n readonly dataSourceId?: DataSourceId;\n readonly endpointId?: EndpointId;\n readonly operationId?: OperationId;\n readonly path?: string;\n readonly hint?: string;\n}\n\nexport type DataSourceDiagnosticResult<TData> =\n | {\n readonly ok: true;\n readonly data: TData;\n readonly diagnostics?: readonly DataSourceDiagnostic[];\n }\n | {\n readonly ok: false;\n readonly diagnostics: readonly DataSourceDiagnostic[];\n };\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EndpointId, OperationId } from './ids';
|
|
2
|
+
import type { DataOperationConfig } from './operations';
|
|
3
|
+
import type { CredentialRef } from './refs';
|
|
4
|
+
import type { DataContractValue } from './values';
|
|
5
|
+
export type DataEndpointKind = 'database' | 'graphql' | 'http' | (string & {});
|
|
6
|
+
export interface DataEndpointConfig {
|
|
7
|
+
readonly id: EndpointId;
|
|
8
|
+
readonly kind: DataEndpointKind;
|
|
9
|
+
readonly name?: string;
|
|
10
|
+
readonly description?: string;
|
|
11
|
+
readonly baseUrl?: string;
|
|
12
|
+
readonly path?: string;
|
|
13
|
+
readonly credential?: CredentialRef;
|
|
14
|
+
readonly operations: Readonly<Record<OperationId, DataOperationConfig>>;
|
|
15
|
+
readonly metadata?: DataContractValue;
|
|
16
|
+
}
|
|
17
|
+
export type DataEndpointRegistry = Readonly<Record<EndpointId, DataEndpointConfig>>;
|
|
18
|
+
//# sourceMappingURL=endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/data/endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE/E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACxE,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../src/data/endpoints.ts"],"names":[],"mappings":"","sourcesContent":["import type { EndpointId, OperationId } from './ids';\nimport type { DataOperationConfig } from './operations';\nimport type { CredentialRef } from './refs';\nimport type { DataContractValue } from './values';\n\nexport type DataEndpointKind = 'database' | 'graphql' | 'http' | (string & {});\n\nexport interface DataEndpointConfig {\n readonly id: EndpointId;\n readonly kind: DataEndpointKind;\n readonly name?: string;\n readonly description?: string;\n readonly baseUrl?: string;\n readonly path?: string;\n readonly credential?: CredentialRef;\n readonly operations: Readonly<Record<OperationId, DataOperationConfig>>;\n readonly metadata?: DataContractValue;\n}\n\nexport type DataEndpointRegistry = Readonly<Record<EndpointId, DataEndpointConfig>>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/data/ids.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AACjC,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAC9B,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC"}
|
package/dist/data/ids.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/data/ids.ts"],"names":[],"mappings":"","sourcesContent":["export type DataSourceId = string;\nexport type EndpointId = string;\nexport type OperationId = string;\nexport type SchemaId = string;\nexport type CredentialId = string;\nexport type AdapterId = string;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './diagnostics';
|
|
2
|
+
export * from './endpoints';
|
|
3
|
+
export * from './ids';
|
|
4
|
+
export * from './operations';
|
|
5
|
+
export * from './refs';
|
|
6
|
+
export * from './schemas';
|
|
7
|
+
export * from './sources';
|
|
8
|
+
export * from './values';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/data/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './diagnostics';
|
|
2
|
+
export * from './endpoints';
|
|
3
|
+
export * from './ids';
|
|
4
|
+
export * from './operations';
|
|
5
|
+
export * from './refs';
|
|
6
|
+
export * from './schemas';
|
|
7
|
+
export * from './sources';
|
|
8
|
+
export * from './values';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC","sourcesContent":["export * from './diagnostics';\nexport * from './endpoints';\nexport * from './ids';\nexport * from './operations';\nexport * from './refs';\nexport * from './schemas';\nexport * from './sources';\nexport * from './values';\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { EndpointId, OperationId } from './ids';
|
|
2
|
+
import type { CredentialRef } from './refs';
|
|
3
|
+
import type { DataSchemaSlot } from './schemas';
|
|
4
|
+
import type { DataContractValue } from './values';
|
|
5
|
+
export type DataOperationIntent = 'action' | 'create' | 'delete' | 'read' | 'update';
|
|
6
|
+
export type DataOperationMethod = 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | (string & {});
|
|
7
|
+
export type DataOperationProtocol = 'database' | 'graphql' | 'http' | (string & {});
|
|
8
|
+
export type DataOperationParameterLocation = 'body' | 'cookie' | 'header' | 'path' | 'query';
|
|
9
|
+
export interface DataOperationParameter extends DataSchemaSlot {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly location: DataOperationParameterLocation;
|
|
12
|
+
readonly required?: boolean;
|
|
13
|
+
readonly description?: string;
|
|
14
|
+
readonly default?: DataContractValue;
|
|
15
|
+
}
|
|
16
|
+
export interface DataOperationRequest extends DataSchemaSlot {
|
|
17
|
+
readonly parameters?: readonly DataOperationParameter[];
|
|
18
|
+
readonly contentType?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface DataOperationResponse extends DataSchemaSlot {
|
|
21
|
+
readonly status?: number | string;
|
|
22
|
+
readonly contentType?: string;
|
|
23
|
+
readonly description?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface DataOperationPagination {
|
|
26
|
+
readonly kind: 'cursor' | 'limit-offset' | 'page' | 'unknown' | (string & {});
|
|
27
|
+
readonly cursorPath?: string;
|
|
28
|
+
readonly limitParameter?: string;
|
|
29
|
+
readonly offsetParameter?: string;
|
|
30
|
+
readonly pageParameter?: string;
|
|
31
|
+
readonly pageSizeParameter?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface DataOperationConfig {
|
|
34
|
+
readonly id: OperationId;
|
|
35
|
+
readonly endpointId?: EndpointId;
|
|
36
|
+
readonly name?: string;
|
|
37
|
+
readonly description?: string;
|
|
38
|
+
readonly protocol: DataOperationProtocol;
|
|
39
|
+
readonly intent: DataOperationIntent;
|
|
40
|
+
readonly method?: DataOperationMethod;
|
|
41
|
+
readonly path?: string;
|
|
42
|
+
readonly request?: DataOperationRequest;
|
|
43
|
+
readonly response?: DataOperationResponse;
|
|
44
|
+
readonly pagination?: DataOperationPagination;
|
|
45
|
+
readonly credential?: CredentialRef;
|
|
46
|
+
readonly metadata?: DataContractValue;
|
|
47
|
+
}
|
|
48
|
+
export type DataOperationRegistry = Readonly<Record<OperationId, DataOperationConfig>>;
|
|
49
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/data/operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAErF,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,KAAK,GACL,MAAM,GACN,SAAS,GACT,OAAO,GACP,MAAM,GACN,KAAK,GACL,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEpF,MAAM,MAAM,8BAA8B,GAAG,MAAM,GAAG,QAAQ,G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,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IACxC,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,uBAAuB,CAAC;IAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/data/operations.ts"],"names":[],"mappings":"","sourcesContent":["import type { EndpointId, OperationId } from './ids';\nimport type { CredentialRef } from './refs';\nimport type { DataSchemaSlot } from './schemas';\nimport type { DataContractValue } from './values';\n\nexport type DataOperationIntent = 'action' | 'create' | 'delete' | 'read' | 'update';\n\nexport type DataOperationMethod =\n | 'DELETE'\n | 'GET'\n | 'HEAD'\n | 'OPTIONS'\n | 'PATCH'\n | 'POST'\n | 'PUT'\n | (string & {});\n\nexport type DataOperationProtocol = 'database' | 'graphql' | 'http' | (string & {});\n\nexport type DataOperationParameterLocation = 'body' | 'cookie' | 'header' | 'path' | 'query';\n\nexport interface DataOperationParameter extends DataSchemaSlot {\n readonly name: string;\n readonly location: DataOperationParameterLocation;\n readonly required?: boolean;\n readonly description?: string;\n readonly default?: DataContractValue;\n}\n\nexport interface DataOperationRequest extends DataSchemaSlot {\n readonly parameters?: readonly DataOperationParameter[];\n readonly contentType?: string;\n}\n\nexport interface DataOperationResponse extends DataSchemaSlot {\n readonly status?: number | string;\n readonly contentType?: string;\n readonly description?: string;\n}\n\nexport interface DataOperationPagination {\n readonly kind: 'cursor' | 'limit-offset' | 'page' | 'unknown' | (string & {});\n readonly cursorPath?: string;\n readonly limitParameter?: string;\n readonly offsetParameter?: string;\n readonly pageParameter?: string;\n readonly pageSizeParameter?: string;\n}\n\nexport interface DataOperationConfig {\n readonly id: OperationId;\n readonly endpointId?: EndpointId;\n readonly name?: string;\n readonly description?: string;\n readonly protocol: DataOperationProtocol;\n readonly intent: DataOperationIntent;\n readonly method?: DataOperationMethod;\n readonly path?: string;\n readonly request?: DataOperationRequest;\n readonly response?: DataOperationResponse;\n readonly pagination?: DataOperationPagination;\n readonly credential?: CredentialRef;\n readonly metadata?: DataContractValue;\n}\n\nexport type DataOperationRegistry = Readonly<Record<OperationId, DataOperationConfig>>;\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AdapterId, CredentialId } from './ids';
|
|
2
|
+
import type { DataContractValue } from './values';
|
|
3
|
+
export type CredentialKind = 'apiKey' | 'basic' | 'bearer' | 'custom' | 'oauth2';
|
|
4
|
+
export interface CredentialRef {
|
|
5
|
+
readonly id: CredentialId;
|
|
6
|
+
readonly kind: CredentialKind | (string & {});
|
|
7
|
+
readonly label?: string;
|
|
8
|
+
readonly scope?: string;
|
|
9
|
+
}
|
|
10
|
+
export type AdapterKind = 'auth' | 'database' | 'storage' | 'transport' | (string & {});
|
|
11
|
+
export interface AdapterRef {
|
|
12
|
+
readonly id: AdapterId;
|
|
13
|
+
readonly kind: AdapterKind;
|
|
14
|
+
readonly packageName?: string;
|
|
15
|
+
readonly exportName?: string;
|
|
16
|
+
readonly config?: DataContractValue;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=refs.d.ts.map
|
|
@@ -0,0 +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;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,YAAY,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC9C,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"}
|
|
@@ -0,0 +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"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SchemaId } from './ids';
|
|
2
|
+
import type { DataContractValue } from './values';
|
|
3
|
+
export type DataSchemaPrimitiveType = 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string';
|
|
4
|
+
export interface DataSchemaRef {
|
|
5
|
+
readonly id: SchemaId;
|
|
6
|
+
}
|
|
7
|
+
export interface DataSchemaProperty {
|
|
8
|
+
readonly description?: string;
|
|
9
|
+
readonly schema: DataSchema;
|
|
10
|
+
}
|
|
11
|
+
export interface DataSchema {
|
|
12
|
+
readonly type?: DataSchemaPrimitiveType | readonly DataSchemaPrimitiveType[];
|
|
13
|
+
readonly title?: string;
|
|
14
|
+
readonly description?: string;
|
|
15
|
+
readonly enum?: readonly DataContractValue[];
|
|
16
|
+
readonly const?: DataContractValue;
|
|
17
|
+
readonly default?: DataContractValue;
|
|
18
|
+
readonly format?: string;
|
|
19
|
+
readonly nullable?: boolean;
|
|
20
|
+
readonly required?: readonly string[];
|
|
21
|
+
readonly properties?: Readonly<Record<string, DataSchema>>;
|
|
22
|
+
readonly additionalProperties?: boolean | DataSchema;
|
|
23
|
+
readonly items?: DataSchema;
|
|
24
|
+
readonly allOf?: readonly DataSchema[];
|
|
25
|
+
readonly anyOf?: readonly DataSchema[];
|
|
26
|
+
readonly oneOf?: readonly DataSchema[];
|
|
27
|
+
readonly ref?: DataSchemaRef;
|
|
28
|
+
}
|
|
29
|
+
export type DataSchemaRegistry = Readonly<Record<SchemaId, DataSchema>>;
|
|
30
|
+
export interface DataSchemaSlot {
|
|
31
|
+
readonly schema?: DataSchema;
|
|
32
|
+
readonly schemaRef?: DataSchemaRef;
|
|
33
|
+
}
|
|
34
|
+
//# sour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O,GAAG,UAAU,CAAC;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,QAAQ,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AAExE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/data/schemas.ts"],"names":[],"mappings":"","sourcesContent":["import type { SchemaId } from './ids';\nimport type { DataContractValue } from './values';\n\nexport type DataSchemaPrimitiveType =\n | 'array'\n | 'boolean'\n | 'integer'\n | 'null'\n | 'number'\n | 'object'\n | 'string';\n\nexport interface DataSchemaRef {\n readonly id: SchemaId;\n}\n\nexport interface DataSchemaProperty {\n readonly description?: string;\n readonly schema: DataSchema;\n}\n\nexport interface DataSchema {\n readonly type?: DataSchemaPrimitiveType | readonly DataSchemaPrimitiveType[];\n readonly title?: string;\n readonly description?: string;\n readonly enum?: readonly DataContractValue[];\n readonly const?: DataContractValue;\n readonly default?: DataContractValue;\n readonly format?: string;\n readonly nullable?: boolean;\n readonly required?: readonly string[];\n readonly properties?: Readonly<Record<string, DataSchema>>;\n readonly additionalProperties?: boolean | DataSchema;\n readonly items?: DataSchema;\n readonly allOf?: readonly DataSchema[];\n readonly anyOf?: readonly DataSchema[];\n readonly oneOf?: readonly DataSchema[];\n readonly ref?: DataSchemaRef;\n}\n\nexport type DataSchemaRegistry = Readonly<Record<SchemaId, DataSchema>>;\n\nexport interface DataSchemaSlot {\n readonly schema?: DataSchema;\n readonly schemaRef?: DataSchemaRef;\n}\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { DbCollectionDefinition } from '../db';
|
|
2
|
+
import type { DataEndpointRegistry } from './endpoints';
|
|
3
|
+
import type { DataSourceId } from './ids';
|
|
4
|
+
import type { AdapterRef, CredentialRef } from './refs';
|
|
5
|
+
import type { DataSchemaRegistry } from './schemas';
|
|
6
|
+
import type { DataContractValue } from './values';
|
|
7
|
+
export type DataSourceKind = 'database' | 'graphql' | 'managed-api' | 'openapi' | 'rest';
|
|
8
|
+
export interface DataSourceBaseConfig {
|
|
9
|
+
readonly id: DataSourceId;
|
|
10
|
+
readonly kind: DataSourceKind;
|
|
11
|
+
readonly name?: string;
|
|
12
|
+
readonly description?: string;
|
|
13
|
+
readonly credential?: CredentialRef;
|
|
14
|
+
readonly endpoints: DataEndpointRegistry;
|
|
15
|
+
readonly schemas?: DataSchemaRegistry;
|
|
16
|
+
readonly metadata?: DataContractValue;
|
|
17
|
+
}
|
|
18
|
+
export interface RestDataSourceConfig extends DataSourceBaseConfig {
|
|
19
|
+
readonly kind: 'rest';
|
|
20
|
+
readonly baseUrl: string;
|
|
21
|
+
}
|
|
22
|
+
export interface OpenApiImportRef {
|
|
23
|
+
readonly url?: string;
|
|
24
|
+
readonly documentId?: string;
|
|
25
|
+
readonly version?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface OpenApiDataSourceConfig extends DataSourceBaseConfig {
|
|
28
|
+
readonly kind: 'openapi';
|
|
29
|
+
readonly baseUrl?: string;
|
|
30
|
+
readonly import?: OpenApiImportRef;
|
|
31
|
+
}
|
|
32
|
+
export interface GraphQlDataSourceConfig extends DataSourceBaseConfig {
|
|
33
|
+
readonly kind: 'graphql';
|
|
34
|
+
readonly endpointUrl: string;
|
|
35
|
+
readonly introspection?: {
|
|
36
|
+
readonly enabled: boolean;
|
|
37
|
+
readonly schemaVersion?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface DatabaseDataSourceConfig extends DataSourceBaseConfig {
|
|
41
|
+
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[];
|
|
54
|
+
}
|
|
55
|
+
export type DataSourceConfig = DatabaseDataSourceConfig | GraphQlDataSourceConfig | ManagedApiDataSourceConfig | OpenApiDataSourceConfig | RestDataSourceConfig;
|
|
56
|
+
export type DataSourceRegistry = Readonly<Record<DataSourceId, DataSourceConfig>>;
|
|
57
|
+
//# sourceMappingURL=sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../src/data/sources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,cAA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AAa,CAAC,EAAE,MAAM,CAAC;KACjC,CAAC;CACH;AAED,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;CAC9B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAC5C,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC;IACpF,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,SAAS,wBAAwB,EAAE,CAAC;CACzD;AAED,MAAM,MAAM,gBAAgB,GACxB,wBAAwB,GACxB,uBAAuB,GACvB,0BAA0B,GAC1B,uBAAuB,GACvB,oBAAoB,CAAC;AAEzB,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/data/values.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,iBAAiB,EAAE,GAC5B;IACE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAC;CAC3C,CAAC;AAEN,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values.js","sourceRoot":"","sources":["../../src/data/values.ts"],"names":[],"mappings":"","sourcesContent":["export type DataContractValue =\n | string\n | number\n | boolean\n | null\n | readonly DataContractValue[]\n | {\n readonly [key: string]: DataContractValue;\n };\n\nexport type DataPath = string;\n"]}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC","sourcesContent":["export * from './auth';\nexport * from './db';\nexport * from './state';\nexport * from './storage';\nexport * from './types';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC","sourcesContent":["export * from './auth';\nexport * from './bindings';\nexport * from './data';\nexport * from './db';\nexport * from './state';\nexport * from './storage';\nexport * from './types';\n"]}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ColorHarmony } from '@ankhorage/color-theory';
|
|
2
2
|
import type { AuthFlowConfig, AuthIdentifierKind, AuthSignUpField } from './auth';
|
|
3
|
+
import type { NodePropBinding } from './bindings';
|
|
3
4
|
export interface ThemeModeConfig {
|
|
4
5
|
primaryColor: string;
|
|
5
6
|
harmony: ColorHarmony;
|
|
@@ -191,6 +192,7 @@ export interface UiNode {
|
|
|
191
192
|
type: string;
|
|
192
193
|
alias?: string;
|
|
193
194
|
props?: Record<string, unknown>;
|
|
195
|
+
bindings?: readonly NodePropBinding[];
|
|
194
196
|
children?: UiNode[];
|
|
195
197
|
style?: Record<string, number | string>;
|
|
196
198
|
events?: UiNodeEventBindings;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EA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GrE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,UAAU,CAAU,CAAC;AAIpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAU,CAAC;AAGhF,MAAM,CAAC,MAAM,qBAAqB,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","sourcesContent":["import type { ColorHarmony } from '@ankhorage/color-theory';\n\nimport type { AuthFlowConfig, AuthIdentifierKind, AuthSignUpField } from './auth';\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 ActionValue = ManifestValue;\n\nexport type ActionBindingPayload = Record<string, ActionValue>;\n\nexport type ActionConditionSource = 'context' | 'event' | 'state';\n\nexport type ActionConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';\n\nexport interface ActionCondition {\n readonly source: ActionConditionSource;\n readonly path: string;\n readonly operator: ActionConditionOperator;\n readonly value?: ActionValue;\n}\n\nexport type ActionValueSource =\n | {\n readonly source: 'context';\n readonly path: string;\n }\n | {\n readonly source: 'event';\n readonly path: string;\n }\n | {\n readonly source: 'literal';\n readonly value: ActionValue;\n }\n | {\n readonly source: 'state';\n readonly path: string;\n };\n\nexport type ActionValueTransform = 'lowercase' | 'trim' | 'uppercase';\n\nexport interface ActionValueBinding {\n readonly valueFrom: ActionValueSource;\n readonly transform?: ActionValueTransform | readonly ActionValueTransform[];\n}\n\nexport interface ActionBinding<\n TType extends string = string,\n TPayload extends object = ActionBindingPayload,\n> {\n readonly type: TType;\n readonly payload?: TPayload;\n readonly when?: ActionCondition;\n}\n\nexport type DbPersistMode = 'columns' | 'json';\n\nexport interface DbPersistFieldBinding {\n readonly field: string;\n readonly valueFrom: ActionValueSource;\n readonly transform?: ActionValueTransform | readonly ActionValueTransform[];\n}\n\nexport interface DbPersistActionPayload {\n readonly collection: string;\n readonly kind?: string;\n readonly mode?: DbPersistMode;\n readonly jsonField?: string;\n readonly values: readonly DbPersistFieldBinding[];\n}\n\nexport interface DbPersistActionBinding extends ActionBinding<\n 'db.persist',\n DbPersistActionPayload\n> {\n readonly payload: DbPersistActionPayload;\n}\n\nexport interface EmailSendActionPayload {\n readonly to: string;\n readonly subject?: string;\n readonly body?: string;\n readonly bodyFrom?: ActionValueSource;\n}\n\nexport interface EmailSendActionBinding extends ActionBinding<\n 'email.send',\n EmailSendActionPayload\n> {\n readonly payload: EmailSendActionPayload;\n}\n\nexport type KnownActionBinding = DbPersistActionBinding | EmailSendActionBinding;\n\nexport type UiNodeEventBindings = Record<string, readonly ActionBinding<string, object>[]>;\n\nexport interface CommandDto<\n TType extends string = string,\n TPayload extends object = Record<string, ActionValue>,\n> {\n readonly type: TType;\n readonly payload: TPayload;\n}\n\nexport type DbPersistOperation = 'insert';\n\nexport type DbPersistCommandValues = Record<string, ActionValue>;\n\nexport interface DbPersistCommandPayload {\n readonly operation: DbPersistOperation;\n readonly collection: string;\n readonly kind?: string;\n readonly mode?: DbPersistMode;\n readonly jsonField?: string;\n readonly values: DbPersistCommandValues;\n}\n\nexport type DbPersistCommand = CommandDto<'db.persist.command', DbPersistCommandPayload>;\n\nexport type KnownCommandDto = DbPersistCommand;\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 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 interface IconSpec {\n name: string;\n provider?: string;\n size?: number | string;\n color?: string;\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 events?: UiNodeEventBindings;\n}\n\nexport interface ScreenSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n root: UiNode;\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 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 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}\n\nexport interface AuthSpec {\n scope: AuthScope;\n provider: AuthProvider;\n authorization: AuthzSpec;\n flow?: AuthFlowConfig;\n signIn?: AuthSignInSpec;\n signUp?: AuthSignUpSpec;\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 networking?: NetworkingSpec;\n plugins: string[];\n pluginsConfig?: Record<string, unknown>;\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n themeId: string;\n created?: string;\n updated?: string;\n };\n themes: ThemeConfig[];\n activeThemeId: string;\n activeThemeMode?: 'dark' | 'light';\n infra: InfraManifest;\n navigator: NavigatorSpec;\n screens: Record<string, ScreenSpec>;\n settings: {\n apiBaseUrl?: string;\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n authFlow: AuthFlowConfig;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAwPA,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,mBAAmB;IACnB,kBAAkB;IAClB,QAAQ;IACR,iBAAiB;IACjB,SAAS;CACD,CAAC;AAGX,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAAU,CAAU,CAAC;AAIxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAAU,CAAU,CAAC;AAIxD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,CAAU,CAAC;AAGvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAG/D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC;AAGrD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAG3D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAU,CAAC;AAGrE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,UAAU,CAAU,CAAC;AAIpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAU,CAAC;AAGhF,MAAM,CAAC,MAAM,qBAAqB,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","sourcesContent":["import type { ColorHarmony } from '@ankhorage/color-theory';\n\nimport type { AuthFlowConfig, AuthIdentifierKind, AuthSignUpField } from './auth';\nimport type { NodePropBinding } from './bindings';\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 ActionValue = ManifestValue;\n\nexport type ActionBindingPayload = Record<string, ActionValue>;\n\nexport type ActionConditionSource = 'context' | 'event' | 'state';\n\nexport type ActionConditionOperator = 'eq' | 'exists' | 'neq' | 'notExists';\n\nexport interface ActionCondition {\n readonly source: ActionConditionSource;\n readonly path: string;\n readonly operator: ActionConditionOperator;\n readonly value?: ActionValue;\n}\n\nexport type ActionValueSource =\n | {\n readonly source: 'context';\n readonly path: string;\n }\n | {\n readonly source: 'event';\n readonly path: string;\n }\n | {\n readonly source: 'literal';\n readonly value: ActionValue;\n }\n | {\n readonly source: 'state';\n readonly path: string;\n };\n\nexport type ActionValueTransform = 'lowercase' | 'trim' | 'uppercase';\n\nexport interface ActionValueBinding {\n readonly valueFrom: ActionValueSource;\n readonly transform?: ActionValueTransform | readonly ActionValueTransform[];\n}\n\nexport interface ActionBinding<\n TType extends string = string,\n TPayload extends object = ActionBindingPayload,\n> {\n readonly type: TType;\n readonly payload?: TPayload;\n readonly when?: ActionCondition;\n}\n\nexport type DbPersistMode = 'columns' | 'json';\n\nexport interface DbPersistFieldBinding {\n readonly field: string;\n readonly valueFrom: ActionValueSource;\n readonly transform?: ActionValueTransform | readonly ActionValueTransform[];\n}\n\nexport interface DbPersistActionPayload {\n readonly collection: string;\n readonly kind?: string;\n readonly mode?: DbPersistMode;\n readonly jsonField?: string;\n readonly values: readonly DbPersistFieldBinding[];\n}\n\nexport interface DbPersistActionBinding extends ActionBinding<\n 'db.persist',\n DbPersistActionPayload\n> {\n readonly payload: DbPersistActionPayload;\n}\n\nexport interface EmailSendActionPayload {\n readonly to: string;\n readonly subject?: string;\n readonly body?: string;\n readonly bodyFrom?: ActionValueSource;\n}\n\nexport interface EmailSendActionBinding extends ActionBinding<\n 'email.send',\n EmailSendActionPayload\n> {\n readonly payload: EmailSendActionPayload;\n}\n\nexport type KnownActionBinding = DbPersistActionBinding | EmailSendActionBinding;\n\nexport type UiNodeEventBindings = Record<string, readonly ActionBinding<string, object>[]>;\n\nexport interface CommandDto<\n TType extends string = string,\n TPayload extends object = Record<string, ActionValue>,\n> {\n readonly type: TType;\n readonly payload: TPayload;\n}\n\nexport type DbPersistOperation = 'insert';\n\nexport type DbPersistCommandValues = Record<string, ActionValue>;\n\nexport interface DbPersistCommandPayload {\n readonly operation: DbPersistOperation;\n readonly collection: string;\n readonly kind?: string;\n readonly mode?: DbPersistMode;\n readonly jsonField?: string;\n readonly values: DbPersistCommandValues;\n}\n\nexport type DbPersistCommand = CommandDto<'db.persist.command', DbPersistCommandPayload>;\n\nexport type KnownCommandDto = DbPersistCommand;\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 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 interface IconSpec {\n name: string;\n provider?: string;\n size?: number | string;\n color?: string;\n}\n\nexport interface UiNode {\n id: string;\n type: string;\n alias?: string;\n props?: Record<string, unknown>;\n bindings?: readonly NodePropBinding[];\n children?: UiNode[];\n style?: Record<string, number | string>;\n events?: UiNodeEventBindings;\n}\n\nexport interface ScreenSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n root: UiNode;\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 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 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}\n\nexport interface AuthSpec {\n scope: AuthScope;\n provider: AuthProvider;\n authorization: AuthzSpec;\n flow?: AuthFlowConfig;\n signIn?: AuthSignInSpec;\n signUp?: AuthSignUpSpec;\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 networking?: NetworkingSpec;\n plugins: string[];\n pluginsConfig?: Record<string, unknown>;\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n themeId: string;\n created?: string;\n updated?: string;\n };\n themes: ThemeConfig[];\n activeThemeId: string;\n activeThemeMode?: 'dark' | 'light';\n infra: InfraManifest;\n navigator: NavigatorSpec;\n screens: Record<string, ScreenSpec>;\n settings: {\n apiBaseUrl?: string;\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n authFlow: AuthFlowConfig;\n };\n}\n"]}
|