@haverstack/record-adapter-sqlite 0.20.0 → 0.22.0

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { TokenSession, StackRecord, RecordVersion, ActorOptions, Permission, TypeId, StackQuery, QueryResult, FileId, StackType, Association } from '@haverstack/core';
1
+ import { TokenSession, StackRecord, RecordChanges, RecordVersion, ActorOptions, TypeId, StackQuery, QueryResult, FileId, StackType, Association } from '@haverstack/core';
2
2
  import { StackRecordAdapter, AdapterCapabilities } from '@haverstack/core/adapter';
3
3
  import { StackTokenStore, TokenInfo } from '@haverstack/core/wire';
4
4
 
@@ -114,7 +114,7 @@ declare class NativeSQLiteRecordAdapter implements StackRecordAdapter {
114
114
  static open(opts: NativeRecordOpenOptions): Promise<NativeSQLiteRecordAdapter>;
115
115
  createRecord(record: StackRecord): Promise<StackRecord>;
116
116
  getRecord(id: string): Promise<StackRecord | null>;
117
- patchContent(id: string, patch: Record<string, unknown | null>, opts?: {
117
+ mutateRecord(id: string, changes: RecordChanges, opts?: {
118
118
  expectedVersion?: number;
119
119
  snapshot?: RecordVersion;
120
120
  } & ActorOptions): Promise<StackRecord>;
@@ -127,21 +127,11 @@ declare class NativeSQLiteRecordAdapter implements StackRecordAdapter {
127
127
  expectedVersion?: number;
128
128
  snapshot?: RecordVersion;
129
129
  } & ActorOptions): Promise<StackRecord>;
130
- setPermissions(id: string, permissions: Permission[], opts?: {
131
- expectedVersion?: number;
132
- snapshot?: RecordVersion;
133
- } & ActorOptions): Promise<StackRecord>;
134
- setUnlisted(id: string, unlisted: boolean, opts?: {
135
- expectedVersion?: number;
136
- snapshot?: RecordVersion;
137
- } & ActorOptions): Promise<StackRecord>;
138
- setParent(id: string, parentId: string | null, opts?: {
139
- expectedVersion?: number;
140
- snapshot?: RecordVersion;
141
- } & ActorOptions): Promise<StackRecord>;
142
130
  restoreVersion(id: string, version: number, opts?: {
143
131
  expectedVersion?: number;
144
132
  snapshot?: RecordVersion;
133
+ } & {
134
+ restoreAssociations?: boolean;
145
135
  } & ActorOptions): Promise<StackRecord>;
146
136
  commitMigration(id: string, toTypeId: TypeId, content: Record<string, unknown>, opts?: {
147
137
  expectedVersion?: number;