@oddington/sdk 0.1.47 → 0.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -36
- package/dist/browser.js +127 -226
- package/dist/index.js +3 -3
- package/dist/types/packages/sdk/src/public.d.ts +7 -4
- package/dist/types/shared/data-contract.d.ts +12 -48
- package/dist/types/shared/inbox-contract.d.ts +6 -36
- package/dist/types/shared/inbox-member-contract.d.ts +3 -5
- package/dist/types/shared/inbox-member-types.d.ts +7 -2
- package/dist/types/shared/inbox-records.d.ts +19 -0
- package/dist/types/shared/inbox-views.d.ts +6 -91
- package/dist/types/shared/record-selection.d.ts +0 -1
- package/package.json +1 -1
|
@@ -6,16 +6,15 @@ export declare const file: import('./routine-definition-types.js').RoutineFileSc
|
|
|
6
6
|
export { AIError, RoutineAIError } from '../../../shared/routine-ai-contract.js';
|
|
7
7
|
export type { RoutineAIOutputIssue } from '../../../shared/routine-ai-output-detail.js';
|
|
8
8
|
export type { RoutineAIErrorDetail } from '../../../shared/routine-ai-error-detail.js';
|
|
9
|
-
export { InboxContractError, asksBlock, continueAsk, defineHandler, fileBlock, question, recordBlock, recordsBlock,
|
|
10
|
-
export type { AskInput, AuthoredSource, CapturedRecords, DigestInput, Handler, HandlerReference, HandlerRuntime, HandlerTransition, InboxBlock, InboxFile, JsonObject, JsonValue,
|
|
11
|
-
export type { CapturedRecordTableInput, RecordField, RecordTableInput, RecordValue, RecordViewInput, TableColumn, ViewRecord, } from '../../../shared/inbox-views.js';
|
|
9
|
+
export { InboxContractError, asksBlock, continueAsk, defineHandler, fileBlock, question, recordBlock, recordsBlock, resolveAsk, respond, richTextBlock, selection, } from '../../../shared/inbox-contract.js';
|
|
10
|
+
export type { AskInput, AuthoredSource, CapturedRecords, DigestInput, Handler, HandlerReference, HandlerRuntime, HandlerTransition, InboxBlock, InboxFile, JsonObject, JsonValue, QualifiedRecordRef, PublishedAsk, PublishedDigest, PublishedView, PublicationRequest, Question, QuestionInput, QuestionResponse, RecordCreate, RecordDelete, RecordReference, RecordSource, RecordUpdate, RepositoryCapabilities, RepositoryReceipt, Resolution, ResolutionInput, ResponseDefinition, } from '../../../shared/inbox-contract.js';
|
|
12
11
|
export { AirtableOperationError } from '../../../shared/airtable-contract.js';
|
|
13
12
|
export type { AirtableField, AirtableTable, AirtableRecord, AirtableListInput, AirtableGetInput, AirtableCreateInput, AirtableUpdateInput, AirtableDeleteInput, AirtableReceipt, AirtableWriteResult, AirtableClient } from '../../../shared/airtable-contract.js';
|
|
14
13
|
export type { GmailRuntimeConnection, AirtableRuntimeConnection, DropboxRuntimeConnection, OutlookRuntimeConnection, SharePointRuntimeConnection, RuntimeConnection, RuntimeConnectionFor } from '../../../shared/connection-runtime.js';
|
|
15
14
|
export type { Connections } from '../../../shared/airtable-contract.js';
|
|
16
15
|
export declare const connections: import('../../../shared/airtable-contract.js').Connections;
|
|
17
16
|
export { DataOperationError } from '../../../shared/data-contract.js';
|
|
18
|
-
export type { DataRepository, DataErrorCode, DataValidationDetail, DataFieldExpectation, PublicValueDefinition, PublicField, CollectionSummary, CollectionSchema, QueryScalar, SelectionOptions, RecordSelection, RecordsQuery, DataValue, SelectedRecord, SelectionMetadata, RecordsResult, RecordsReadInput, RecordsReadResult, RecordsSearchOptions, RecordsSearchResult,
|
|
17
|
+
export type { DataRepository, DataErrorCode, DataValidationDetail, DataFieldExpectation, PublicValueDefinition, PublicField, CollectionSummary, CollectionSchema, QueryScalar, SelectionOptions, RecordSelection, RecordsQuery, DataValue, SelectedRecord, SelectionMetadata, RecordsResult, RecordsReadInput, RecordsReadResult, RecordsSearchOptions, RecordsSearchResult, RecordIdentity, RecordCreation, RecordUpdateSet, AppliedChanges, PublishedChanges, DataChangeSet, DataEffect, DataFailureDetail, DataPublicationDetail, DataFailureCauseCode, LocalDataFileAction } from '../../../shared/data-contract.js';
|
|
19
18
|
declare global {
|
|
20
19
|
namespace __OddingtonOS {
|
|
21
20
|
/** Import-free OS-generated metadata; no runtime namespace is created. */
|
|
@@ -131,6 +130,10 @@ export type LocalRunActivity = {
|
|
|
131
130
|
updated: string[];
|
|
132
131
|
deleted: string[];
|
|
133
132
|
failures?: string[];
|
|
133
|
+
publications?: Array<{
|
|
134
|
+
state: 'files' | 'commit' | 'published';
|
|
135
|
+
commit?: string;
|
|
136
|
+
}>;
|
|
134
137
|
failure?: import('../../../shared/data-contract.js').DataFailureDetail;
|
|
135
138
|
}>;
|
|
136
139
|
effects: Array<{
|
|
@@ -160,48 +160,8 @@ export type AppliedChanges = {
|
|
|
160
160
|
updated: RecordIdentity[];
|
|
161
161
|
deleted: RecordIdentity[];
|
|
162
162
|
};
|
|
163
|
-
export type
|
|
164
|
-
|
|
165
|
-
before?: string;
|
|
166
|
-
};
|
|
167
|
-
export type HistoryChangesOptions = {
|
|
168
|
-
collections?: string[];
|
|
169
|
-
refs?: string[];
|
|
170
|
-
from?: string;
|
|
171
|
-
through?: string;
|
|
172
|
-
limit?: number;
|
|
173
|
-
after?: string;
|
|
174
|
-
};
|
|
175
|
-
export type HistoryEntry = {
|
|
176
|
-
version: string;
|
|
177
|
-
publishedAt: string;
|
|
178
|
-
author: {
|
|
179
|
-
name: string;
|
|
180
|
-
email: string;
|
|
181
|
-
};
|
|
182
|
-
authoredAt: string;
|
|
183
|
-
committer: {
|
|
184
|
-
name: string;
|
|
185
|
-
email: string;
|
|
186
|
-
};
|
|
187
|
-
committedAt: string;
|
|
188
|
-
message: string;
|
|
189
|
-
created: string[];
|
|
190
|
-
updated: string[];
|
|
191
|
-
deleted: string[];
|
|
192
|
-
};
|
|
193
|
-
export type HistoryChange = Omit<HistoryEntry, 'created' | 'updated' | 'deleted'> & {
|
|
194
|
-
$ref: string;
|
|
195
|
-
change: 'created' | 'updated' | 'deleted';
|
|
196
|
-
before: SelectedRecord | null;
|
|
197
|
-
after: SelectedRecord | null;
|
|
198
|
-
};
|
|
199
|
-
export type HistoryChangesResult = {
|
|
200
|
-
$meta: {
|
|
201
|
-
through: string;
|
|
202
|
-
next?: string;
|
|
203
|
-
};
|
|
204
|
-
changes: HistoryChange[];
|
|
163
|
+
export type PublishedChanges = AppliedChanges & {
|
|
164
|
+
commit: string;
|
|
205
165
|
};
|
|
206
166
|
export interface DataChangeSet {
|
|
207
167
|
create(record: RecordCreation): void;
|
|
@@ -209,6 +169,7 @@ export interface DataChangeSet {
|
|
|
209
169
|
delete(record: RecordIdentity): void;
|
|
210
170
|
validate(): Promise<void>;
|
|
211
171
|
apply(): Promise<AppliedChanges>;
|
|
172
|
+
publish(): Promise<PublishedChanges>;
|
|
212
173
|
}
|
|
213
174
|
export interface DataRepository {
|
|
214
175
|
collections: {
|
|
@@ -226,11 +187,6 @@ export interface DataRepository {
|
|
|
226
187
|
read(input: RecordsReadInput, options?: RecordsReadOptions): Promise<SelectedRecord | null | RecordsReadResult>;
|
|
227
188
|
search(query: string, options?: RecordsSearchOptions): Promise<RecordsSearchResult>;
|
|
228
189
|
};
|
|
229
|
-
history: {
|
|
230
|
-
list(options?: HistoryListOptions): Promise<HistoryEntry[]>;
|
|
231
|
-
at(instant: string): Promise<HistoryEntry | null>;
|
|
232
|
-
changes(options?: HistoryChangesOptions): Promise<HistoryChangesResult>;
|
|
233
|
-
};
|
|
234
190
|
changes(): DataChangeSet;
|
|
235
191
|
}
|
|
236
192
|
export type DataErrorCode = 'context_unavailable' | 'unauthenticated' | 'access_denied' | 'invalid_query' | 'request_too_large' | 'capacity' | 'unavailable' | 'invalid_change' | 'conflict' | 'apply_pending';
|
|
@@ -279,7 +235,15 @@ export type DataRecordLimitDetail = {
|
|
|
279
235
|
maxRecords: number;
|
|
280
236
|
collections: string[];
|
|
281
237
|
};
|
|
282
|
-
export type
|
|
238
|
+
export type DataPublicationDetail = {
|
|
239
|
+
code: 'local_data_publication_failed';
|
|
240
|
+
repository: string;
|
|
241
|
+
state: 'unapplied' | 'files' | 'commit';
|
|
242
|
+
commit?: string;
|
|
243
|
+
preflight?: 'dirty_repository';
|
|
244
|
+
};
|
|
245
|
+
export declare function dataPublicationFailureMessage(detail: DataPublicationDetail): string;
|
|
246
|
+
export type DataOperationDetail = DataPublicationDetail | DataFailureDetail | DataRecordLimitDetail | DataValidationDetail;
|
|
283
247
|
/** Parse the only local checkout detail allowed to cross the private SDK and
|
|
284
248
|
* retained-Run boundary. It contains no values, raw exceptions or host paths. */
|
|
285
249
|
export declare function parseDataFailureDetail(value: unknown): DataFailureDetail;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/** The bounded ask/digest contract. Authorization and durable effects belong to
|
|
2
|
-
* the server; constructing a value here grants no publication authority. */
|
|
3
1
|
import { type File } from './files-contract.js';
|
|
4
|
-
import type { RecordIdentity } from './data-contract.js';
|
|
5
2
|
export type JsonValue = null | boolean | number | string | JsonValue[] | JsonObject;
|
|
6
3
|
export type JsonObject = {
|
|
7
4
|
[key: string]: JsonValue;
|
|
@@ -55,13 +52,6 @@ export type HandlerReference = {
|
|
|
55
52
|
id: string;
|
|
56
53
|
input: JsonValue;
|
|
57
54
|
};
|
|
58
|
-
export type RecordRequirements = {
|
|
59
|
-
repository: string;
|
|
60
|
-
records: Array<{
|
|
61
|
-
ref: string;
|
|
62
|
-
version: string;
|
|
63
|
-
}>;
|
|
64
|
-
};
|
|
65
55
|
export type Question = {
|
|
66
56
|
id: string;
|
|
67
57
|
to: string;
|
|
@@ -70,7 +60,6 @@ export type Question = {
|
|
|
70
60
|
instructions?: string;
|
|
71
61
|
response: ResponseDefinition;
|
|
72
62
|
handler?: HandlerReference;
|
|
73
|
-
requirements?: RecordRequirements;
|
|
74
63
|
};
|
|
75
64
|
export type QuestionInput = Omit<Question, 'allowedResponders'> & {
|
|
76
65
|
allowedResponders?: string[];
|
|
@@ -80,22 +69,7 @@ export type PublishedView = {
|
|
|
80
69
|
view: string;
|
|
81
70
|
input: JsonValue;
|
|
82
71
|
};
|
|
83
|
-
export type
|
|
84
|
-
label: string;
|
|
85
|
-
value: string;
|
|
86
|
-
};
|
|
87
|
-
export type PresentedRecord = {
|
|
88
|
-
ref: string;
|
|
89
|
-
title: string;
|
|
90
|
-
fields: PresentedField[];
|
|
91
|
-
};
|
|
92
|
-
export type PresentedRecordSummary = {
|
|
93
|
-
ref: string;
|
|
94
|
-
title: string;
|
|
95
|
-
description?: string;
|
|
96
|
-
facts?: PresentedField[];
|
|
97
|
-
view?: string;
|
|
98
|
-
};
|
|
72
|
+
export type QualifiedRecordRef = RecordReference;
|
|
99
73
|
export type InboxFile = {
|
|
100
74
|
id: string;
|
|
101
75
|
name: string;
|
|
@@ -109,14 +83,12 @@ export type InboxBlock = {
|
|
|
109
83
|
} | {
|
|
110
84
|
kind: 'record';
|
|
111
85
|
label: string;
|
|
112
|
-
record:
|
|
113
|
-
view?: string;
|
|
86
|
+
record: QualifiedRecordRef;
|
|
114
87
|
initiallyExpanded?: boolean;
|
|
115
88
|
} | {
|
|
116
89
|
kind: 'records';
|
|
117
90
|
label: string;
|
|
118
|
-
records:
|
|
119
|
-
view?: string;
|
|
91
|
+
records: QualifiedRecordRef[];
|
|
120
92
|
initiallyExpanded?: boolean;
|
|
121
93
|
} | {
|
|
122
94
|
kind: 'files';
|
|
@@ -160,7 +132,7 @@ export type DigestPublication = DigestInput & {
|
|
|
160
132
|
};
|
|
161
133
|
export type Publication = AskPublication | DigestPublication;
|
|
162
134
|
export type RecipientPublication = DigestPublication | (Omit<AskPublication, 'questions'> & {
|
|
163
|
-
questions: Array<Omit<Question, 'handler'
|
|
135
|
+
questions: Array<Omit<Question, 'handler'>>;
|
|
164
136
|
});
|
|
165
137
|
/** These values are supplied by the verified launch/storage path, never by an
|
|
166
138
|
* authored item. They are separate from recipient-facing presentation. */
|
|
@@ -177,7 +149,7 @@ export type RetainedPublication = {
|
|
|
177
149
|
id: string;
|
|
178
150
|
revision: 1;
|
|
179
151
|
publisher: PublisherProvenance;
|
|
180
|
-
/** Internal retained definition, including private handler input
|
|
152
|
+
/** Internal retained definition, including private handler input.
|
|
181
153
|
* Never send this directly to a recipient; use recipientPresentation. */
|
|
182
154
|
presentation: Publication;
|
|
183
155
|
resolvedViews: Array<{
|
|
@@ -293,6 +265,7 @@ export declare function enforcePublicationSize(value: Publication): Publication;
|
|
|
293
265
|
* erase undefined/functions or convert dates, sparse arrays, or nonfinite numbers. */
|
|
294
266
|
export declare function serializable(value: unknown, ancestors?: Set<object>): JsonValue;
|
|
295
267
|
export declare function validateInboxFile(value: unknown): InboxFile;
|
|
268
|
+
export declare function validateQualifiedRecordRef(value: unknown): QualifiedRecordRef;
|
|
296
269
|
export declare function validateBlock(value: unknown): InboxBlock;
|
|
297
270
|
export declare function richTextBlock(value: Omit<Extract<InboxBlock, {
|
|
298
271
|
kind: 'rich-text';
|
|
@@ -334,9 +307,6 @@ export declare function defineHandler<Input extends JsonValue, const Id extends
|
|
|
334
307
|
id: Id;
|
|
335
308
|
};
|
|
336
309
|
export declare function respond<Input extends JsonValue>(handler: Handler<Input>, input: Input): HandlerReference;
|
|
337
|
-
/** Declare private exact-version guards from ordinary Data results. No Record
|
|
338
|
-
* content or repository snapshot is copied, and this grants no Data authority. */
|
|
339
|
-
export declare function requireRecords(repository: string, records: readonly RecordIdentity[]): RecordRequirements;
|
|
340
310
|
export declare function question(value: QuestionInput): Question;
|
|
341
311
|
/** Structural validation is shared. Registered view/handler availability,
|
|
342
312
|
* people, repository/file access, and provenance MUST be checked by publication too. */
|
|
@@ -2,8 +2,7 @@ import type { InboxCurrent, InboxItem, AnswerableQuestion, ResponseAcceptance, Q
|
|
|
2
2
|
export declare class InboxOperationError extends Error {
|
|
3
3
|
readonly status: number;
|
|
4
4
|
readonly reason: 'invalid_input' | 'access_denied' | 'authority_unavailable' | 'conflict' | 'unavailable' | QuestionUnavailableReason;
|
|
5
|
-
|
|
6
|
-
constructor(status: number, reason: 'invalid_input' | 'access_denied' | 'authority_unavailable' | 'conflict' | 'unavailable' | QuestionUnavailableReason, requirementsRepository?: string | undefined);
|
|
5
|
+
constructor(status: number, reason: 'invalid_input' | 'access_denied' | 'authority_unavailable' | 'conflict' | 'unavailable' | QuestionUnavailableReason);
|
|
7
6
|
}
|
|
8
7
|
/** Closed recipient-safe state shared by snapshots and refusal transports. */
|
|
9
8
|
export declare function parseQuestionAvailability(value: unknown, available?: boolean): QuestionAvailability;
|
|
@@ -12,15 +11,14 @@ export declare function questionAvailability(value: QuestionAvailability, availa
|
|
|
12
11
|
export declare function parseInboxUnavailableFailure(value: unknown, status: number): InboxOperationError | undefined;
|
|
13
12
|
export declare function inboxErrorBody(error: InboxOperationError): {
|
|
14
13
|
error: string;
|
|
15
|
-
unavailableReason?: "
|
|
16
|
-
requirementsRepository?: string | undefined;
|
|
14
|
+
unavailableReason?: "handler_unavailable" | undefined;
|
|
17
15
|
};
|
|
18
16
|
export declare const INBOX_RESULT_BYTES: number;
|
|
19
17
|
export declare const INBOX_INPUT_BYTES = 8192;
|
|
20
18
|
/** Includes the exact declaration only on the private CLI-authenticated ingress. */
|
|
21
19
|
export declare const INBOX_LOCAL_INPUT_BYTES: number;
|
|
22
20
|
export declare const INBOX_UUID: RegExp;
|
|
23
|
-
export type InboxOperation = 'current' | 'items.list' | 'items.read' | 'items.see' | 'items.markDigestRead' | 'items.rename' | 'items.setLifecycle' | 'items.listRecipientCandidates' | 'items.addRecipient' | 'questions.list' | 'questions.answer' | 'questions.searchRecords';
|
|
21
|
+
export type InboxOperation = 'current' | 'items.list' | 'items.read' | 'items.readRecords' | 'items.see' | 'items.markDigestRead' | 'items.rename' | 'items.setLifecycle' | 'items.listRecipientCandidates' | 'items.addRecipient' | 'questions.list' | 'questions.answer' | 'questions.searchRecords';
|
|
24
22
|
export declare function isAppQuestionOperation(operation: InboxOperation): boolean;
|
|
25
23
|
/** Closed wire vocabulary; both placements require an explicit relevance filter. */
|
|
26
24
|
export declare function parseInboxRequest(value: unknown): {
|
|
@@ -23,10 +23,9 @@ export interface ResponseConsequence {
|
|
|
23
23
|
needsReconciliation: boolean;
|
|
24
24
|
reason: string | null;
|
|
25
25
|
}
|
|
26
|
-
export type QuestionUnavailableReason = 'handler_unavailable'
|
|
26
|
+
export type QuestionUnavailableReason = 'handler_unavailable';
|
|
27
27
|
export interface QuestionAvailability {
|
|
28
28
|
unavailableReason?: QuestionUnavailableReason;
|
|
29
|
-
requirementsRepository?: string;
|
|
30
29
|
}
|
|
31
30
|
export interface QuestionSnapshot extends QuestionAvailability {
|
|
32
31
|
id: string;
|
|
@@ -172,6 +171,8 @@ export type ItemRevision = {
|
|
|
172
171
|
export type InboxAnswerInput = ItemRevision & {
|
|
173
172
|
questionId: string;
|
|
174
173
|
response: QuestionResponse;
|
|
174
|
+
/** Picker name for display only; the Record reference is the answer. */
|
|
175
|
+
label?: string;
|
|
175
176
|
};
|
|
176
177
|
export type InboxSearchInput = ItemRevision & {
|
|
177
178
|
questionId: string;
|
|
@@ -187,6 +188,10 @@ export interface InboxMember {
|
|
|
187
188
|
items: {
|
|
188
189
|
list(): Promise<InboxItem[]>;
|
|
189
190
|
read(itemId: string): Promise<InboxItem>;
|
|
191
|
+
readRecords(input: {
|
|
192
|
+
itemId: string;
|
|
193
|
+
records: RecordReference[];
|
|
194
|
+
}): Promise<import('./inbox-records.js').InboxRecords>;
|
|
190
195
|
see(itemId: string): Promise<void>;
|
|
191
196
|
markDigestRead(itemId: string): Promise<DigestReadConfirmation>;
|
|
192
197
|
rename(input: ItemRevision & {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type QualifiedRecordRef } from './inbox-contract.js';
|
|
2
|
+
import type { CollectionSchema, SelectedRecord } from './data-contract.js';
|
|
3
|
+
export type InboxRecord = QualifiedRecordRef & {
|
|
4
|
+
record: SelectedRecord | null;
|
|
5
|
+
schema: CollectionSchema | null;
|
|
6
|
+
};
|
|
7
|
+
export type InboxRecords = {
|
|
8
|
+
records: InboxRecord[];
|
|
9
|
+
};
|
|
10
|
+
export type ReadInboxRecords = (workspace: string, repository: string, refs: string[], authorization: string) => Promise<InboxRecords>;
|
|
11
|
+
export type InboxRecordsOutcome = {
|
|
12
|
+
status: 200;
|
|
13
|
+
result: InboxRecords;
|
|
14
|
+
} | {
|
|
15
|
+
status: 403 | 503;
|
|
16
|
+
};
|
|
17
|
+
export declare function parseInboxRecordRefs(value: unknown): QualifiedRecordRef[];
|
|
18
|
+
export declare const recordKey: ({ repository, ref }: QualifiedRecordRef) => string;
|
|
19
|
+
export declare function parseInboxRecords(value: unknown): InboxRecords;
|
|
@@ -1,97 +1,12 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export type TableColumn = {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
type: 'string' | 'date' | 'integer' | 'number' | 'boolean' | 'enum' | 'nullable-enum' | 'link';
|
|
6
|
-
unit?: string;
|
|
7
|
-
values?: string[];
|
|
8
|
-
missing: 'reject';
|
|
9
|
-
missingLabel?: string;
|
|
10
|
-
};
|
|
11
|
-
export type RecordTableInput = {
|
|
12
|
-
repository?: string;
|
|
13
|
-
commit?: string;
|
|
14
|
-
columns: TableColumn[];
|
|
15
|
-
rows: Array<{
|
|
16
|
-
ref: string;
|
|
17
|
-
version?: string;
|
|
18
|
-
values: JsonObject;
|
|
19
|
-
}>;
|
|
20
|
-
/** Routine-owned evidence (such as batch relationships), never interpreted by the host. */
|
|
21
|
-
metadata?: JsonObject;
|
|
22
|
-
};
|
|
23
|
-
export type CapturedRecordTableInput = Omit<RecordTableInput, 'repository' | 'commit' | 'rows'> & {
|
|
24
|
-
repository: string;
|
|
25
|
-
commit: string;
|
|
26
|
-
rows: Array<{
|
|
27
|
-
ref: string;
|
|
28
|
-
version: string;
|
|
29
|
-
values: JsonObject;
|
|
30
|
-
}>;
|
|
31
|
-
};
|
|
32
|
-
export declare function validateCapturedRecordTableInput(value: unknown): CapturedRecordTableInput;
|
|
1
|
+
import { type JsonValue, type PublishedView } from './inbox-contract.js';
|
|
33
2
|
export type ResolvedView = PublishedView & {
|
|
34
3
|
implementation: string;
|
|
35
4
|
};
|
|
36
|
-
export type
|
|
37
|
-
kind: 'text';
|
|
38
|
-
text: string;
|
|
39
|
-
} | {
|
|
40
|
-
kind: 'missing';
|
|
41
|
-
label: string;
|
|
42
|
-
} | {
|
|
43
|
-
kind: 'record';
|
|
44
|
-
ref: string;
|
|
45
|
-
label: string;
|
|
46
|
-
recordType?: string;
|
|
47
|
-
} | {
|
|
48
|
-
kind: 'list';
|
|
49
|
-
items: RecordValue[];
|
|
50
|
-
remaining?: number;
|
|
51
|
-
} | {
|
|
52
|
-
kind: 'object';
|
|
53
|
-
fields: RecordField[];
|
|
54
|
-
};
|
|
55
|
-
export type RecordField = {
|
|
56
|
-
label: string;
|
|
57
|
-
value: RecordValue;
|
|
58
|
-
};
|
|
59
|
-
export type ViewRecord = {
|
|
60
|
-
ref: string;
|
|
61
|
-
title: string;
|
|
62
|
-
recordType?: string;
|
|
63
|
-
fields: RecordField[];
|
|
64
|
-
body?: {
|
|
65
|
-
label: string;
|
|
66
|
-
markdown: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
export type RecordViewInput = {
|
|
70
|
-
record: ViewRecord;
|
|
71
|
-
related?: ViewRecord[];
|
|
72
|
-
};
|
|
73
|
-
export declare const commonViews: ({
|
|
5
|
+
export type ViewContract = {
|
|
74
6
|
name: string;
|
|
75
7
|
implementation: string;
|
|
76
|
-
workspaces: '*';
|
|
77
|
-
validate:
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
implementation: string;
|
|
81
|
-
workspaces: '*';
|
|
82
|
-
validate: typeof validateRecordTableInput;
|
|
83
|
-
})[];
|
|
84
|
-
export declare function validateRecordViewInput(value: unknown): RecordViewInput;
|
|
85
|
-
export declare function validateRecordTableInput(value: unknown): RecordTableInput;
|
|
86
|
-
export declare const registeredViews: ({
|
|
87
|
-
name: string;
|
|
88
|
-
implementation: string;
|
|
89
|
-
workspaces: '*';
|
|
90
|
-
validate: typeof validateRecordViewInput;
|
|
91
|
-
} | {
|
|
92
|
-
name: string;
|
|
93
|
-
implementation: string;
|
|
94
|
-
workspaces: '*';
|
|
95
|
-
validate: typeof validateRecordTableInput;
|
|
96
|
-
})[];
|
|
8
|
+
workspaces: '*' | readonly string[];
|
|
9
|
+
validate(value: unknown): JsonValue;
|
|
10
|
+
};
|
|
11
|
+
export declare const registeredViews: ViewContract[];
|
|
97
12
|
export declare function resolveInboxView(view: PublishedView, workspace: string): ResolvedView;
|