@oddington/sdk 0.1.14 → 0.1.15

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.
@@ -2,7 +2,7 @@ import type { AskInput, CapturedRecords, DigestInput, InboxFile, PublicationRequ
2
2
  import type { FileAddOptions } from '../../../shared/inbox-files.js';
3
3
  import type { RecordReadInput } from '../../../shared/record-capture.js';
4
4
  import type { RecordDeleteRequest, RecordUpdateRequest, RecordWriteRequest } from '../../../shared/record-write.js';
5
- export type { RoutineSchema, RoutineSchemaValue, RoutineDefinition, RoutineInput, RoutineRuntime } from './routine-definition-types.js';
5
+ export type { RoutineSchema, RoutineSchemaValue, RoutineDefinition, RoutineInput, RoutineRuntime, RoutineArtifactInput, RoutineArtifact } from './routine-definition-types.js';
6
6
  export declare const defineRoutine: import('./routine-definition-types.js').DefineRoutine;
7
7
  export declare const schema: import('./routine-definition-types.js').RoutineSchemaBuilders;
8
8
  export declare const file: import('./routine-definition-types.js').RoutineFileSchema;
@@ -13,6 +13,22 @@ export type RoutineSteps = Record<string, RoutineSchema<unknown> | null>;
13
13
  export type RoutineInput<Value> = Value extends object ? {
14
14
  readonly [Key in keyof Value]: RoutineInput<Value[Key]>;
15
15
  } : Value;
16
+ export type RoutineArtifactInput = Readonly<{
17
+ requestKey: string;
18
+ name: string;
19
+ mediaType: string;
20
+ size: number;
21
+ sha256: string;
22
+ content: Uint8Array | Blob | ReadableStream<Uint8Array>;
23
+ }>;
24
+ export type RoutineArtifact = Readonly<{
25
+ id: string;
26
+ attempt: string;
27
+ name: string;
28
+ mediaType: string;
29
+ size: number;
30
+ sha256: string;
31
+ }>;
16
32
  export type RoutineRuntime<Steps extends RoutineSteps> = {
17
33
  readonly run: {
18
34
  readonly id: string;
@@ -23,6 +39,7 @@ export type RoutineRuntime<Steps extends RoutineSteps> = {
23
39
  readonly files: typeof files;
24
40
  readonly connections: Connections;
25
41
  readonly inbox: RoutinePublicationClient;
42
+ artifact(input: RoutineArtifactInput): Promise<RoutineArtifact>;
26
43
  step<Key extends Extract<keyof Steps, string>>(id: Key, ...summary: Steps[Key] extends null ? [] : [summary: RoutineSchemaValue<Steps[Key]>]): Promise<void>;
27
44
  };
28
45
  export type RoutineDefinition<Input extends RoutineSchema<unknown> | undefined, Steps extends RoutineSteps, Result extends RoutineSchema<unknown> | undefined> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oddington/sdk",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Oddington routine and response-handler SDK",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",