@oddington/sdk 0.1.83 → 0.1.84
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.
|
@@ -98,6 +98,9 @@ type RefField = {
|
|
|
98
98
|
many: false;
|
|
99
99
|
nullable: false;
|
|
100
100
|
};
|
|
101
|
+
type LinkRefCondition = string | {
|
|
102
|
+
$in: string[];
|
|
103
|
+
};
|
|
101
104
|
type Options<Schema extends Collection, Mode> = {
|
|
102
105
|
fields?: Array<Fields<Schema>['name'] | '$ref' | '$version'>;
|
|
103
106
|
timeline?: true;
|
|
@@ -120,7 +123,7 @@ type ExactUnion<Actual, Allowed> = Allowed extends unknown ? Exact<Actual, Allow
|
|
|
120
123
|
type CheckWhere<Schema extends Collection, Actual> = {
|
|
121
124
|
[Key in keyof Actual]: Key extends '$signals' ? {
|
|
122
125
|
[Signal in keyof Actual[Key]]: ExactUnion<Actual[Key][Signal], SignalCondition>;
|
|
123
|
-
} : Key extends (FilterField<Schema> | RefField)['name'] ? Actual[Key] extends object ? ExactUnion<Actual[Key], Condition<Extract<FilterField<Schema> | RefField, {
|
|
126
|
+
} : Key extends `${string}.$ref` ? Actual[Key] extends object ? ExactUnion<Actual[Key], LinkRefCondition> : unknown : Key extends (FilterField<Schema> | RefField)['name'] ? Actual[Key] extends object ? ExactUnion<Actual[Key], Condition<Extract<FilterField<Schema> | RefField, {
|
|
124
127
|
name: Key;
|
|
125
128
|
}>>> : unknown : never;
|
|
126
129
|
};
|
|
@@ -24,7 +24,7 @@ export type { XeroRuntimeConnection, GmailRuntimeConnection, AirtableRuntimeConn
|
|
|
24
24
|
export type { Connections } from '../../../shared/airtable-contract.js';
|
|
25
25
|
export declare const connections: import('../../../shared/airtable-contract.js').Connections;
|
|
26
26
|
export { DataOperationError } from '../../../shared/data-contract.js';
|
|
27
|
-
export type { RecordSignal, TimelineEntry, SignalRelated, SignalRelatedInput, SignalInput, TimelineInput, SignalCondition, DataRepository, DataErrorCode, DataValidationDetail, DataFieldExpectation, PublicValueDefinition, PublicField, CollectionSummary, RecordDisplay, CollectionSchema, QueryScalar, SelectionOptions, RecordSelection, RecordsQuery, DataValue, SelectedRecord, SelectionMetadata, SnapshotChange, RecordsResult, RecordsReadInput, RecordsReadResult, RecordsSearchOptions, RecordsSearchResult, RecordIdentity, RecordCreation, RecordUpdateSet, AppliedChanges, PublishedChanges, DataChangeOptions, DataChangeSet, DataEffect, DataFailureDetail, DataPublicationDetail, DataFailureCauseCode, LocalDataFileAction } from '../../../shared/data-contract.js';
|
|
27
|
+
export type { RecordSignal, TimelineEntry, SignalRelated, SignalRelatedInput, SignalInput, TimelineInput, SignalCondition, DataRepository, DataErrorCode, DataValidationDetail, DataFieldExpectation, PublicValueDefinition, PublicField, CollectionSummary, RecordDisplay, CollectionSchema, QueryScalar, SelectionOptions, RecordSelection, RecordsQuery, DataValue, SelectedRecord, SelectionMetadata, SnapshotChange, RecordsResult, RecordsReadInput, RecordsReadResult, RecordsBacklinksOptions, BacklinkRecord, RecordsBacklinksResult, RecordsSearchOptions, RecordsSearchResult, RecordIdentity, RecordCreation, RecordUpdateSet, AppliedChanges, PublishedChanges, DataChangeOptions, DataChangeSet, DataEffect, DataFailureDetail, DataPublicationDetail, DataFailureCauseCode, LocalDataFileAction } from '../../../shared/data-contract.js';
|
|
28
28
|
declare global {
|
|
29
29
|
namespace __OddingtonOS {
|
|
30
30
|
/** Import-free OS-generated metadata; no runtime namespace is created. */
|
|
@@ -151,6 +151,20 @@ export type RecordsReadResult = {
|
|
|
151
151
|
};
|
|
152
152
|
records: Array<SelectedRecord | null>;
|
|
153
153
|
};
|
|
154
|
+
export type RecordsBacklinksOptions = {
|
|
155
|
+
limit?: number;
|
|
156
|
+
after?: string;
|
|
157
|
+
};
|
|
158
|
+
export type BacklinkRecord = SelectedRecord & {
|
|
159
|
+
$backlinks: string[];
|
|
160
|
+
};
|
|
161
|
+
export type RecordsBacklinksResult = {
|
|
162
|
+
$meta: {
|
|
163
|
+
version: string;
|
|
164
|
+
next?: string;
|
|
165
|
+
};
|
|
166
|
+
records: BacklinkRecord[];
|
|
167
|
+
};
|
|
154
168
|
export type RecordsSearchOptions = {
|
|
155
169
|
collections?: string[];
|
|
156
170
|
limit?: number;
|
|
@@ -215,6 +229,7 @@ export interface DataRepository {
|
|
|
215
229
|
read(ref: string, options?: RecordsReadOptions): Promise<SelectedRecord | null>;
|
|
216
230
|
read(refs: readonly string[], options?: RecordsReadOptions): Promise<RecordsReadResult>;
|
|
217
231
|
read(input: RecordsReadInput, options?: RecordsReadOptions): Promise<SelectedRecord | null | RecordsReadResult>;
|
|
232
|
+
backlinks(ref: string, options?: RecordsBacklinksOptions): Promise<RecordsBacklinksResult>;
|
|
218
233
|
search(query: string, options?: RecordsSearchOptions): Promise<RecordsSearchResult>;
|
|
219
234
|
};
|
|
220
235
|
changes(options?: DataChangeOptions): DataChangeSet;
|