@aws-amplify/datastore
Advanced tools
Comparing version 1.0.5-unstable.17 to 1.0.5-unstable.20
@@ -10,4 +10,5 @@ import Observable from 'zen-observable-ts'; | ||
declare function clear(): Promise<void>; | ||
declare const dataStore: { | ||
query: { | ||
declare class DataStore { | ||
static getModuleName(): string; | ||
static query: { | ||
<T extends Readonly<{ | ||
@@ -20,34 +21,34 @@ id: string; | ||
}; | ||
save: <T_2 extends Readonly<{ | ||
static save: <T extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(model: T_2, condition?: ProducerModelPredicate<T_2>) => Promise<T_2[]>; | ||
delete: { | ||
<T_3 extends Readonly<{ | ||
} & Record<string, any>>>(model: T, condition?: ProducerModelPredicate<T>) => Promise<T[]>; | ||
static delete: { | ||
<T extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(model: T_3, condition?: ProducerModelPredicate<T_3>): Promise<T_3>; | ||
<T_4 extends Readonly<{ | ||
} & Record<string, any>>>(model: T, condition?: ProducerModelPredicate<T>): Promise<T>; | ||
<T_1 extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_4>, id: string): Promise<T_4>; | ||
<T_5 extends Readonly<{ | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_1>, id: string): Promise<T_1>; | ||
<T_2 extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_5>, condition: ProducerModelPredicate<T_5>): Promise<T_5[]>; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_2>, condition: ProducerModelPredicate<T_2>): Promise<T_2[]>; | ||
}; | ||
observe: { | ||
static observe: { | ||
(): Observable<SubscriptionMessage<any>>; | ||
<T_6 extends Readonly<{ | ||
<T extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(obj: T_6): Observable<SubscriptionMessage<T_6>>; | ||
<T_7 extends Readonly<{ | ||
} & Record<string, any>>>(obj: T): Observable<SubscriptionMessage<T>>; | ||
<T_1 extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_7>, id: string): Observable<SubscriptionMessage<T_7>>; | ||
<T_8 extends Readonly<{ | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_1>, id: string): Observable<SubscriptionMessage<T_1>>; | ||
<T_2 extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_8>): Observable<SubscriptionMessage<T_8>>; | ||
<T_9 extends Readonly<{ | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_2>): Observable<SubscriptionMessage<T_2>>; | ||
<T_3 extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_9>, criteria: ProducerModelPredicate<T_9>): Observable<SubscriptionMessage<T_9>>; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_3>, criteria: ProducerModelPredicate<T_3>): Observable<SubscriptionMessage<T_3>>; | ||
}; | ||
configure: typeof configure; | ||
clear: typeof clear; | ||
}; | ||
export { initSchema, dataStore }; | ||
static configure: typeof configure; | ||
static clear: typeof clear; | ||
} | ||
export { initSchema, DataStore }; |
@@ -593,11 +593,17 @@ var __assign = (this && this.__assign) || function () { | ||
} | ||
var dataStore = { | ||
query: query, | ||
save: save, | ||
delete: remove, | ||
observe: observe, | ||
configure: configure, | ||
clear: clear, | ||
}; | ||
export { initSchema, dataStore }; | ||
var DataStore = /** @class */ (function () { | ||
function DataStore() { | ||
} | ||
DataStore.getModuleName = function () { | ||
return 'DataStore'; | ||
}; | ||
DataStore.query = query; | ||
DataStore.save = save; | ||
DataStore.delete = remove; | ||
DataStore.observe = observe; | ||
DataStore.configure = configure; | ||
DataStore.clear = clear; | ||
return DataStore; | ||
}()); | ||
export { initSchema, DataStore }; | ||
//# sourceMappingURL=datastore.js.map |
@@ -1,4 +0,4 @@ | ||
import { dataStore as DataStore, initSchema } from './datastore/datastore'; | ||
import { DataStore, initSchema } from './datastore/datastore'; | ||
import { Predicates } from './predicates'; | ||
export * from './types'; | ||
export { DataStore, initSchema, Predicates }; |
import Amplify from '@aws-amplify/core'; | ||
import { dataStore as DataStore, initSchema } from './datastore/datastore'; | ||
import { DataStore, initSchema } from './datastore/datastore'; | ||
import { Predicates } from './predicates'; | ||
export * from './types'; | ||
export { DataStore, initSchema, Predicates }; | ||
var datastore = { configure: DataStore.configure, getModuleName: getModuleName }; | ||
function getModuleName() { | ||
return 'DataStore'; | ||
} | ||
Amplify.register(datastore); | ||
Amplify.register(DataStore); | ||
//# sourceMappingURL=index.js.map |
@@ -10,4 +10,5 @@ import Observable from 'zen-observable-ts'; | ||
declare function clear(): Promise<void>; | ||
declare const dataStore: { | ||
query: { | ||
declare class DataStore { | ||
static getModuleName(): string; | ||
static query: { | ||
<T extends Readonly<{ | ||
@@ -20,34 +21,34 @@ id: string; | ||
}; | ||
save: <T_2 extends Readonly<{ | ||
static save: <T extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(model: T_2, condition?: ProducerModelPredicate<T_2>) => Promise<T_2[]>; | ||
delete: { | ||
<T_3 extends Readonly<{ | ||
} & Record<string, any>>>(model: T, condition?: ProducerModelPredicate<T>) => Promise<T[]>; | ||
static delete: { | ||
<T extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(model: T_3, condition?: ProducerModelPredicate<T_3>): Promise<T_3>; | ||
<T_4 extends Readonly<{ | ||
} & Record<string, any>>>(model: T, condition?: ProducerModelPredicate<T>): Promise<T>; | ||
<T_1 extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_4>, id: string): Promise<T_4>; | ||
<T_5 extends Readonly<{ | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_1>, id: string): Promise<T_1>; | ||
<T_2 extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_5>, condition: ProducerModelPredicate<T_5>): Promise<T_5[]>; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_2>, condition: ProducerModelPredicate<T_2>): Promise<T_2[]>; | ||
}; | ||
observe: { | ||
static observe: { | ||
(): Observable<SubscriptionMessage<any>>; | ||
<T_6 extends Readonly<{ | ||
<T extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(obj: T_6): Observable<SubscriptionMessage<T_6>>; | ||
<T_7 extends Readonly<{ | ||
} & Record<string, any>>>(obj: T): Observable<SubscriptionMessage<T>>; | ||
<T_1 extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_7>, id: string): Observable<SubscriptionMessage<T_7>>; | ||
<T_8 extends Readonly<{ | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_1>, id: string): Observable<SubscriptionMessage<T_1>>; | ||
<T_2 extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_8>): Observable<SubscriptionMessage<T_8>>; | ||
<T_9 extends Readonly<{ | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_2>): Observable<SubscriptionMessage<T_2>>; | ||
<T_3 extends Readonly<{ | ||
id: string; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_9>, criteria: ProducerModelPredicate<T_9>): Observable<SubscriptionMessage<T_9>>; | ||
} & Record<string, any>>>(modelConstructor: PersistentModelConstructor<T_3>, criteria: ProducerModelPredicate<T_3>): Observable<SubscriptionMessage<T_3>>; | ||
}; | ||
configure: typeof configure; | ||
clear: typeof clear; | ||
}; | ||
export { initSchema, dataStore }; | ||
static configure: typeof configure; | ||
static clear: typeof clear; | ||
} | ||
export { initSchema, DataStore }; |
@@ -596,11 +596,17 @@ "use strict"; | ||
} | ||
var dataStore = { | ||
query: query, | ||
save: save, | ||
delete: remove, | ||
observe: observe, | ||
configure: configure, | ||
clear: clear, | ||
}; | ||
exports.dataStore = dataStore; | ||
var DataStore = /** @class */ (function () { | ||
function DataStore() { | ||
} | ||
DataStore.getModuleName = function () { | ||
return 'DataStore'; | ||
}; | ||
DataStore.query = query; | ||
DataStore.save = save; | ||
DataStore.delete = remove; | ||
DataStore.observe = observe; | ||
DataStore.configure = configure; | ||
DataStore.clear = clear; | ||
return DataStore; | ||
}()); | ||
exports.DataStore = DataStore; | ||
//# sourceMappingURL=datastore.js.map |
@@ -1,4 +0,4 @@ | ||
import { dataStore as DataStore, initSchema } from './datastore/datastore'; | ||
import { DataStore, initSchema } from './datastore/datastore'; | ||
import { Predicates } from './predicates'; | ||
export * from './types'; | ||
export { DataStore, initSchema, Predicates }; |
@@ -8,3 +8,3 @@ "use strict"; | ||
var datastore_1 = require("./datastore/datastore"); | ||
exports.DataStore = datastore_1.dataStore; | ||
exports.DataStore = datastore_1.DataStore; | ||
exports.initSchema = datastore_1.initSchema; | ||
@@ -14,7 +14,3 @@ var predicates_1 = require("./predicates"); | ||
__export(require("./types")); | ||
var datastore = { configure: datastore_1.dataStore.configure, getModuleName: getModuleName }; | ||
function getModuleName() { | ||
return 'DataStore'; | ||
} | ||
core_1.default.register(datastore); | ||
core_1.default.register(datastore_1.DataStore); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@aws-amplify/datastore", | ||
"version": "1.0.5-unstable.17+a15730cc", | ||
"version": "1.0.5-unstable.20+a047ce73", | ||
"description": "AppSyncLocal support for aws-amplify", | ||
@@ -38,5 +38,5 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@aws-amplify/api": "2.1.4-unstable.17+a15730cc", | ||
"@aws-amplify/core": "2.2.3-unstable.17+a15730cc", | ||
"@aws-amplify/pubsub": "2.1.4-unstable.17+a15730cc", | ||
"@aws-amplify/api": "2.1.4-unstable.20+a047ce73", | ||
"@aws-amplify/core": "2.2.3-unstable.20+a047ce73", | ||
"@aws-amplify/pubsub": "2.1.4-unstable.20+a047ce73", | ||
"idb": "4.0.4", | ||
@@ -93,3 +93,3 @@ "immer": "3.1.3", | ||
}, | ||
"gitHead": "a15730cc50692d9d31a0f586c3544b3dcdbea659" | ||
"gitHead": "a047ce73abe98c3bf82e888c3afb4d2f911805f3" | ||
} |
@@ -795,11 +795,14 @@ import { ConsoleLogger as Logger } from '@aws-amplify/core'; | ||
const dataStore = { | ||
query, | ||
save, | ||
delete: remove, | ||
observe, | ||
configure, | ||
clear, | ||
}; | ||
class DataStore { | ||
static getModuleName() { | ||
return 'DataStore'; | ||
} | ||
static query = query; | ||
static save = save; | ||
static delete = remove; | ||
static observe = observe; | ||
static configure = configure; | ||
static clear = clear; | ||
} | ||
export { initSchema, dataStore }; | ||
export { initSchema, DataStore }; |
import Amplify from '@aws-amplify/core'; | ||
import { dataStore as DataStore, initSchema } from './datastore/datastore'; | ||
import { DataStore, initSchema } from './datastore/datastore'; | ||
import { Predicates } from './predicates'; | ||
@@ -8,8 +8,2 @@ | ||
const datastore = { configure: DataStore.configure, getModuleName }; | ||
function getModuleName() { | ||
return 'DataStore'; | ||
} | ||
Amplify.register(datastore); | ||
Amplify.register(DataStore); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
8369346
73770