@oddington/sdk 0.1.8 → 0.1.10

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.
@@ -13,7 +13,7 @@ export { AirtableOperationError } from '../../../shared/airtable-contract.js';
13
13
  export type { AirtableField, AirtableTable, AirtableRecord, AirtableListInput, AirtableGetInput, AirtableCreateInput, AirtableUpdateInput, AirtableDeleteInput, AirtableReceipt, AirtableWriteResult, AirtableClient, Connections } from '../../../shared/airtable-contract.js';
14
14
  export declare const connections: import('../../../shared/airtable-contract.js').Connections;
15
15
  export { DataOperationError } from '../../../shared/data-contract.js';
16
- export type { DataRepository, DataErrorCode, PublicValueDefinition, PublicField, CollectionSummary, CollectionSchema, QueryScalar, SelectionOptions, RecordSelection, RecordsQuery, DataValue, SelectedRecord, SelectionMetadata, RecordsResult, RecordsSearchOptions, RecordsSearchResult, RecordIdentity, RecordCreation, RecordUpdateSet, DataPublication, DataChangeSet, DataEffect } from '../../../shared/data-contract.js';
16
+ export type { DataRepository, DataErrorCode, PublicValueDefinition, PublicField, CollectionSummary, CollectionSchema, QueryScalar, SelectionOptions, RecordSelection, RecordsQuery, DataValue, SelectedRecord, SelectionMetadata, RecordsResult, RecordsSearchOptions, RecordsSearchResult, HistoryListOptions, HistoryEntry, RecordIdentity, RecordCreation, RecordUpdateSet, DataPublication, DataChangeSet, DataEffect } from '../../../shared/data-contract.js';
17
17
  export declare const data: {
18
18
  repository(name: string): import('../../../shared/data-contract.js').DataRepository;
19
19
  };
@@ -134,6 +134,28 @@ export type DataPublication = {
134
134
  updated: RecordIdentity[];
135
135
  deleted: RecordIdentity[];
136
136
  };
137
+ export type HistoryListOptions = {
138
+ limit?: number;
139
+ before?: string;
140
+ };
141
+ export type HistoryEntry = {
142
+ version: string;
143
+ publishedAt: string;
144
+ author: {
145
+ name: string;
146
+ email: string;
147
+ };
148
+ authoredAt: string;
149
+ committer: {
150
+ name: string;
151
+ email: string;
152
+ };
153
+ committedAt: string;
154
+ message: string;
155
+ created: string[];
156
+ updated: string[];
157
+ deleted: string[];
158
+ };
137
159
  export interface DataChangeSet {
138
160
  create(record: RecordCreation): void;
139
161
  update(record: RecordIdentity, set: RecordUpdateSet): void;
@@ -150,6 +172,10 @@ export interface DataRepository {
150
172
  select(query: RecordsQuery): Promise<RecordsResult>;
151
173
  search(query: string, options?: RecordsSearchOptions): Promise<RecordsSearchResult>;
152
174
  };
175
+ history: {
176
+ list(options?: HistoryListOptions): Promise<HistoryEntry[]>;
177
+ at(instant: string): Promise<HistoryEntry | null>;
178
+ };
153
179
  changes(): DataChangeSet;
154
180
  }
155
181
  export type DataErrorCode = 'context_unavailable' | 'unauthenticated' | 'access_denied' | 'invalid_query' | 'request_too_large' | 'capacity' | 'unavailable' | 'invalid_change' | 'conflict' | 'publication_pending';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oddington/sdk",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Oddington routine and response-handler SDK",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",