@nexia/sdk 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-availability.d.ts +18 -0
- package/dist/app-availability.js +29 -0
- package/dist/approval.d.ts +180 -0
- package/dist/approval.js +9 -0
- package/dist/context.d.ts +49 -0
- package/dist/context.js +1 -0
- package/dist/data-migration.d.ts +123 -0
- package/dist/data-migration.js +70 -0
- package/dist/fixtures/approval-contract-negative.d.ts +1 -0
- package/dist/fixtures/approval-contract-negative.js +8 -0
- package/dist/handoff-result.d.ts +6 -0
- package/dist/handoff-result.js +17 -0
- package/dist/host.d.ts +602 -0
- package/dist/host.js +803 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +21 -0
- package/dist/number.d.ts +2 -0
- package/dist/number.js +9 -0
- package/dist/organization-target.d.ts +101 -0
- package/dist/organization-target.js +105 -0
- package/dist/permissions.d.ts +3 -0
- package/dist/permissions.js +12 -0
- package/dist/platform.d.ts +378 -0
- package/dist/platform.js +114 -0
- package/dist/process.d.ts +98 -0
- package/dist/process.js +10 -0
- package/dist/resource-composition.d.ts +104 -0
- package/dist/resource-composition.js +576 -0
- package/dist/resource-create-destination.d.ts +17 -0
- package/dist/resource-create-destination.js +1 -0
- package/dist/resource-reference.d.ts +122 -0
- package/dist/resource-reference.js +203 -0
- package/dist/resources/resource-information.d.ts +128 -0
- package/dist/resources/resource-information.js +12 -0
- package/dist/resources/resource-list.d.ts +23 -0
- package/dist/resources/resource-list.js +1 -0
- package/dist/resources/resource-projections.d.ts +311 -0
- package/dist/resources/resource-projections.js +1 -0
- package/dist/resources/resource-transfer.d.ts +208 -0
- package/dist/resources/resource-transfer.js +1 -0
- package/dist/shell.d.ts +1297 -0
- package/dist/shell.js +1 -0
- package/dist/signature.d.ts +489 -0
- package/dist/signature.js +171 -0
- package/dist/spreadsheet.d.ts +42 -0
- package/dist/spreadsheet.js +15 -0
- package/dist/testing.d.ts +16 -0
- package/dist/testing.js +17 -0
- package/package.json +53 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
interface CompositionSpecBody {
|
|
2
|
+
readonly sources: readonly {
|
|
3
|
+
readonly alias: string;
|
|
4
|
+
readonly resource_key: string;
|
|
5
|
+
}[];
|
|
6
|
+
readonly fields: readonly {
|
|
7
|
+
readonly source: string;
|
|
8
|
+
readonly field: string;
|
|
9
|
+
}[];
|
|
10
|
+
readonly filters: readonly {
|
|
11
|
+
readonly source: string;
|
|
12
|
+
readonly field: string;
|
|
13
|
+
readonly operator: 'eq' | 'in';
|
|
14
|
+
readonly value: string | number | boolean | readonly (string | number | boolean)[];
|
|
15
|
+
}[];
|
|
16
|
+
readonly dimensions: readonly {
|
|
17
|
+
readonly source: string;
|
|
18
|
+
readonly field: string;
|
|
19
|
+
readonly bucket: 'day' | 'week' | 'month' | null;
|
|
20
|
+
}[];
|
|
21
|
+
readonly measures: readonly {
|
|
22
|
+
readonly alias: string;
|
|
23
|
+
readonly source: string;
|
|
24
|
+
readonly field: string | null;
|
|
25
|
+
readonly operation: 'count' | 'distinct_count' | 'sum' | 'avg';
|
|
26
|
+
readonly result_type: 'integer' | 'decimal';
|
|
27
|
+
readonly null_behavior: 'zero' | 'null_if_empty';
|
|
28
|
+
readonly unit: string;
|
|
29
|
+
}[];
|
|
30
|
+
readonly result: {
|
|
31
|
+
readonly shape: 'rows' | 'aggregate';
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** Strict, presentation-free intent for one bounded read-only Resource composition. */
|
|
35
|
+
export interface CompositionSpecV1 extends CompositionSpecBody {
|
|
36
|
+
readonly schema_version: 1;
|
|
37
|
+
readonly relationship: {
|
|
38
|
+
readonly key: string;
|
|
39
|
+
} | null;
|
|
40
|
+
readonly relationships?: never;
|
|
41
|
+
}
|
|
42
|
+
export interface CompositionSpecV2 extends CompositionSpecBody {
|
|
43
|
+
readonly schema_version: 2;
|
|
44
|
+
readonly relationship?: never;
|
|
45
|
+
readonly relationships: readonly [{
|
|
46
|
+
readonly key: string;
|
|
47
|
+
}, {
|
|
48
|
+
readonly key: string;
|
|
49
|
+
}];
|
|
50
|
+
}
|
|
51
|
+
export interface CompositionSpecV3 extends CompositionSpecBody {
|
|
52
|
+
readonly schema_version: 3;
|
|
53
|
+
readonly relationship?: never;
|
|
54
|
+
readonly relationships: readonly {
|
|
55
|
+
readonly key: string;
|
|
56
|
+
readonly source: string;
|
|
57
|
+
readonly target: string;
|
|
58
|
+
}[];
|
|
59
|
+
}
|
|
60
|
+
/** Advanced reports retain one strict CompositionSpec wire; Core gates live capabilities. */
|
|
61
|
+
export interface CompositionSpecV4 {
|
|
62
|
+
readonly schema_version: 4;
|
|
63
|
+
readonly sources: CompositionSpecBody['sources'];
|
|
64
|
+
readonly relationships: readonly {
|
|
65
|
+
readonly key: string;
|
|
66
|
+
readonly source: string;
|
|
67
|
+
readonly target: string;
|
|
68
|
+
}[];
|
|
69
|
+
readonly fields: readonly ({
|
|
70
|
+
readonly source: string;
|
|
71
|
+
readonly field: string;
|
|
72
|
+
} | {
|
|
73
|
+
readonly derived: string;
|
|
74
|
+
})[];
|
|
75
|
+
readonly timezone: string;
|
|
76
|
+
readonly where: Record<string, unknown>;
|
|
77
|
+
readonly dimensions: readonly {
|
|
78
|
+
readonly target: Record<string, unknown>;
|
|
79
|
+
readonly bucket: 'day' | 'week' | 'month' | 'quarter' | 'year' | null;
|
|
80
|
+
}[];
|
|
81
|
+
readonly measures: readonly Record<string, unknown>[];
|
|
82
|
+
readonly having: Record<string, unknown>;
|
|
83
|
+
readonly derived: readonly Record<string, unknown>[];
|
|
84
|
+
readonly comparison: Record<string, unknown> | null;
|
|
85
|
+
readonly sort: readonly Record<string, unknown>[];
|
|
86
|
+
readonly limit: {
|
|
87
|
+
readonly count: number;
|
|
88
|
+
} | null;
|
|
89
|
+
readonly result: {
|
|
90
|
+
readonly shape: 'rows' | 'aggregate';
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export type CompositionSpec = CompositionSpecV1 | CompositionSpecV2 | CompositionSpecV3 | CompositionSpecV4;
|
|
94
|
+
export declare class CompositionSpecValidationError extends Error {
|
|
95
|
+
readonly code: 'invalid_shape' | 'unsupported_schema_version' | 'unknown_key' | 'invalid_identifier' | 'duplicate_identifier' | 'invalid_source_count' | 'unknown_source_alias' | 'relationship_required' | 'relationship_not_allowed' | 'invalid_filter_value' | 'invalid_measure' | 'result_shape_mismatch';
|
|
96
|
+
readonly path: string;
|
|
97
|
+
constructor(code: 'invalid_shape' | 'unsupported_schema_version' | 'unknown_key' | 'invalid_identifier' | 'duplicate_identifier' | 'invalid_source_count' | 'unknown_source_alias' | 'relationship_required' | 'relationship_not_allowed' | 'invalid_filter_value' | 'invalid_measure' | 'result_shape_mismatch', path: string, message: string);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Parses the stable wire shape. Resource, field, operator, relationship, grain,
|
|
101
|
+
* and authorization semantics remain live host-catalog decisions.
|
|
102
|
+
*/
|
|
103
|
+
export declare function parseCompositionSpec(value: unknown): CompositionSpec;
|
|
104
|
+
export {};
|