@oddington/sdk 0.1.37 → 0.1.38
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 +69 -92
- package/dist/browser.js +45 -68
- package/dist/index.js +4 -4
- package/dist/types/packages/sdk/src/public.d.ts +22 -18
- package/dist/types/packages/sdk/src/routine-definition-types.d.ts +2 -2
- package/dist/types/shared/app-routine-contract.d.ts +1 -1
- package/dist/types/shared/inbox-member-contract.d.ts +1 -1
- package/dist/types/shared/inbox-member-types.d.ts +0 -6
- package/package.json +1 -1
- package/dist/types/shared/delimited-text.d.ts +0 -2
- package/dist/types/shared/inbox-files.d.ts +0 -12
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { AskInput, DigestInput,
|
|
2
|
-
import type { FileAddOptions } from '../../../shared/inbox-files.js';
|
|
1
|
+
import type { AskInput, DigestInput, PublicationRequest, PublishedAsk, PublishedDigest, ResolutionInput } from '../../../shared/inbox-contract.js';
|
|
3
2
|
export type { RoutineSchema, RoutineSchemaValue, RoutineDefinition, RoutineInput, RoutineRuntime, RoutineAccess, RoutineCapabilities, RoutineStep, RoutineSteps, RoutineStepInput, RoutineStepResult, RoutineStepOutput, RoutineArtifactInput, RoutineArtifact, RoutineAI } from './routine-definition-types.js';
|
|
4
3
|
export declare const defineRoutine: import('./routine-definition-types.js').DefineRoutine;
|
|
5
4
|
export declare const schema: import('./routine-definition-types.js').RoutineSchemaBuilders;
|
|
@@ -9,7 +8,6 @@ export type { RoutineAIOutputIssue } from '../../../shared/routine-ai-output-det
|
|
|
9
8
|
export { InboxContractError, asksBlock, continueAsk, defineHandler, fileBlock, question, recordBlock, recordsBlock, resolveAsk, respond, richTextBlock, selection, } from '../../../shared/inbox-contract.js';
|
|
10
9
|
export type { AskInput, AuthoredSource, CapturedRecords, DigestInput, Handler, HandlerReference, HandlerRuntime, HandlerTransition, InboxBlock, InboxFile, JsonObject, JsonValue, PresentedField, PresentedRecord, PresentedRecordSummary, PublishedAsk, PublishedDigest, PublishedView, PublicationRequest, Question, QuestionInput, QuestionResponse, RecordCreate, RecordDelete, RecordReference, RecordSource, RecordUpdate, RepositoryCapabilities, RepositoryReceipt, Resolution, ResolutionInput, ResponseDefinition, } from '../../../shared/inbox-contract.js';
|
|
11
10
|
export type { CapturedRecordTableInput, RecordField, RecordTableInput, RecordValue, RecordViewInput, TableColumn, ViewRecord, } from '../../../shared/inbox-views.js';
|
|
12
|
-
export type { FileAddOptions } from '../../../shared/inbox-files.js';
|
|
13
11
|
export { AirtableOperationError } from '../../../shared/airtable-contract.js';
|
|
14
12
|
export type { AirtableField, AirtableTable, AirtableRecord, AirtableListInput, AirtableGetInput, AirtableCreateInput, AirtableUpdateInput, AirtableDeleteInput, AirtableReceipt, AirtableWriteResult, AirtableClient } from '../../../shared/airtable-contract.js';
|
|
15
13
|
export type { GmailRuntimeConnection, AirtableRuntimeConnection, DropboxRuntimeConnection, OutlookRuntimeConnection, SharePointRuntimeConnection, RuntimeConnection, RuntimeConnectionFor } from '../../../shared/connection-runtime.js';
|
|
@@ -41,7 +39,6 @@ export type { File, FileInput, FileStorage, FileCreateInput, FileCreateOptions,
|
|
|
41
39
|
export declare const files: {
|
|
42
40
|
create(input: import('../../../shared/files-contract.js').FileCreateInput, options?: import('../../../shared/files-contract.js').FileCreateOptions): Promise<import('../../../shared/files-contract.js').File>;
|
|
43
41
|
get(id: string): Promise<import('../../../shared/files-contract.js').File>;
|
|
44
|
-
delete(id: string): Promise<void>;
|
|
45
42
|
upload(id: string): Promise<import('../../../shared/files-contract.js').File>;
|
|
46
43
|
enrich(input: import('../../../shared/files-contract.js').FileEnrichOptions): Promise<import('../../../shared/files-contract.js').FileEnrichResult>;
|
|
47
44
|
read(id: string): Promise<Response>;
|
|
@@ -125,15 +122,27 @@ export type AppRoutineHandle<Result, Steps> = {
|
|
|
125
122
|
summary?: unknown;
|
|
126
123
|
data?: unknown;
|
|
127
124
|
})>;
|
|
128
|
-
publish(): Promise<Omit<RunSummary, 'result'> & {
|
|
129
|
-
result?: Result;
|
|
130
|
-
}>;
|
|
131
125
|
};
|
|
132
|
-
export type
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
126
|
+
export type LocalRunActivity = {
|
|
127
|
+
data: Array<{
|
|
128
|
+
repository: string;
|
|
129
|
+
created: string[];
|
|
130
|
+
updated: string[];
|
|
131
|
+
deleted: string[];
|
|
132
|
+
failures?: string[];
|
|
133
|
+
}>;
|
|
134
|
+
effects: Array<{
|
|
135
|
+
capability: 'files' | 'inbox' | 'ai';
|
|
136
|
+
operation: string;
|
|
137
|
+
status: 'completed' | 'failed';
|
|
138
|
+
reference?: string;
|
|
139
|
+
summary?: unknown;
|
|
140
|
+
}>;
|
|
141
|
+
git?: {
|
|
142
|
+
branch?: string;
|
|
143
|
+
commit?: string;
|
|
144
|
+
dirty: boolean;
|
|
145
|
+
};
|
|
137
146
|
};
|
|
138
147
|
export type StepDetail = {
|
|
139
148
|
id: string;
|
|
@@ -159,13 +168,12 @@ export type RunSummary = {
|
|
|
159
168
|
failure?: {
|
|
160
169
|
message: string;
|
|
161
170
|
};
|
|
162
|
-
|
|
171
|
+
local?: LocalRunActivity;
|
|
163
172
|
};
|
|
164
173
|
export type RunHandle = {
|
|
165
174
|
current(): Promise<RunSummary>;
|
|
166
175
|
watch(): AsyncIterable<RunSummary>;
|
|
167
176
|
step(id: string): Promise<StepDetail>;
|
|
168
|
-
publish(): Promise<RunSummary>;
|
|
169
177
|
};
|
|
170
178
|
export type RoutineReadiness = {
|
|
171
179
|
state: 'ready';
|
|
@@ -209,7 +217,6 @@ export type RoutinePublicationClientOptions = {
|
|
|
209
217
|
workspace?: string;
|
|
210
218
|
capability?: string;
|
|
211
219
|
request?: InboxRequester;
|
|
212
|
-
workingRoot?: string;
|
|
213
220
|
};
|
|
214
221
|
export type RoutinePublicationClient = {
|
|
215
222
|
publishAsk(value: AskInput, options: {
|
|
@@ -219,9 +226,6 @@ export type RoutinePublicationClient = {
|
|
|
219
226
|
requestKey: string;
|
|
220
227
|
}): Promise<PublishedDigest>;
|
|
221
228
|
publishResolution(askId: string, value: ResolutionInput): Promise<void>;
|
|
222
|
-
files: {
|
|
223
|
-
add(value: FileAddOptions): Promise<InboxFile>;
|
|
224
|
-
};
|
|
225
229
|
check(body: PublicationRequest): Promise<void>;
|
|
226
230
|
};
|
|
227
231
|
export declare function routinePublicationClient(options?: RoutinePublicationClientOptions): RoutinePublicationClient;
|
|
@@ -110,8 +110,8 @@ export type RoutineSchemaBuilders = {
|
|
|
110
110
|
object<const Properties extends Record<string, RoutineSchema<unknown>>>(properties: Properties): RoutineSchema<{
|
|
111
111
|
[Key in keyof Properties]: RoutineSchemaValue<Properties[Key]>;
|
|
112
112
|
}, false>;
|
|
113
|
-
array<Item extends RoutineSchema<unknown>>(items: Item, options
|
|
114
|
-
maxItems
|
|
113
|
+
array<Item extends RoutineSchema<unknown>>(items: Item, options?: {
|
|
114
|
+
maxItems?: number;
|
|
115
115
|
}): RoutineSchema<RoutineSchemaValue<Item>[], false>;
|
|
116
116
|
string(options?: {
|
|
117
117
|
maxLength?: number;
|
|
@@ -9,7 +9,7 @@ export declare const INBOX_INPUT_BYTES = 8192;
|
|
|
9
9
|
/** Includes the exact declaration only on the private CLI-authenticated ingress. */
|
|
10
10
|
export declare const INBOX_LOCAL_INPUT_BYTES: number;
|
|
11
11
|
export declare const INBOX_UUID: RegExp;
|
|
12
|
-
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'
|
|
12
|
+
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';
|
|
13
13
|
export declare function isAppQuestionOperation(operation: InboxOperation): boolean;
|
|
14
14
|
/** Closed wire vocabulary; both placements require an explicit relevance filter. */
|
|
15
15
|
export declare function parseInboxRequest(value: unknown): {
|
|
@@ -201,11 +201,5 @@ export interface InboxMember {
|
|
|
201
201
|
answer(input: InboxAnswerInput): Promise<ResponseAcceptance>;
|
|
202
202
|
searchRecords(input: InboxSearchInput): Promise<RecordSelectionResult>;
|
|
203
203
|
};
|
|
204
|
-
files: {
|
|
205
|
-
read(input: {
|
|
206
|
-
itemId: string;
|
|
207
|
-
fileId: string;
|
|
208
|
-
}): Promise<Response>;
|
|
209
|
-
};
|
|
210
204
|
}
|
|
211
205
|
export {};
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type InboxFile } from './inbox-contract.js';
|
|
2
|
-
export type FileAddOptions = {
|
|
3
|
-
path: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function validateFileAddOptions(value: unknown): FileAddOptions;
|
|
7
|
-
/** Consumer interpretation only: no parsing facts become File metadata. */
|
|
8
|
-
export declare function previewCsvRows(bytes: Uint8Array): string[][];
|
|
9
|
-
export declare function deriveInboxFile(bytes: Uint8Array, name: string): Promise<Omit<InboxFile, 'id'>>;
|
|
10
|
-
/** Original integrity is independent of consumer format interpretation. */
|
|
11
|
-
export declare function verifyInboxFile(bytes: Uint8Array, value: unknown): Promise<InboxFile>;
|
|
12
|
-
export declare function publicationFiles(body?: import('./inbox-contract.js').InboxBlock[]): InboxFile[];
|