@learncard/learn-cloud-plugin 1.0.6 → 1.1.1
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/helpers.d.ts +3 -3
- package/dist/learn-cloud-plugin.cjs.development.js +386 -447
- package/dist/learn-cloud-plugin.cjs.development.js.map +4 -4
- package/dist/learn-cloud-plugin.cjs.production.min.js +15 -15
- package/dist/learn-cloud-plugin.cjs.production.min.js.map +4 -4
- package/dist/learn-cloud-plugin.esm.js +386 -446
- package/dist/learn-cloud-plugin.esm.js.map +4 -4
- package/dist/plugin.d.ts +1 -1
- package/dist/types.d.ts +15 -4
- package/package.json +7 -6
package/dist/plugin.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export * from './types';
|
|
|
4
4
|
/**
|
|
5
5
|
* @group Plugins
|
|
6
6
|
*/
|
|
7
|
-
export declare const getLearnCloudPlugin: (initialLearnCard: LearnCard<any, 'id', LearnCloudPluginDependentMethods>, url: string, unencryptedFields?: string[]) => Promise<LearnCloudPlugin>;
|
|
7
|
+
export declare const getLearnCloudPlugin: (initialLearnCard: LearnCard<any, 'id', LearnCloudPluginDependentMethods>, url: string, unencryptedFields?: string[], unencryptedCustomFields?: string[]) => Promise<LearnCloudPlugin>;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { DID } from 'dids';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { Filter } from '@learncard/learn-cloud-service';
|
|
3
|
+
import { UnsignedVC, VC, VP, PaginationResponseType, PaginationOptionsType } from '@learncard/types';
|
|
4
|
+
import type { LearnCard, Plugin } from '@learncard/core';
|
|
5
|
+
import type { ProofOptions } from '@learncard/didkit-plugin';
|
|
5
6
|
/** @group LearnCloud Plugin */
|
|
6
7
|
export type LearnCloudPluginDependentMethods = {
|
|
7
8
|
getDIDObject: () => DID;
|
|
@@ -10,7 +11,17 @@ export type LearnCloudPluginDependentMethods = {
|
|
|
10
11
|
crypto: () => Crypto;
|
|
11
12
|
};
|
|
12
13
|
/** @group LearnCloud Plugin */
|
|
13
|
-
export type LearnCloudPluginMethods =
|
|
14
|
+
export type LearnCloudPluginMethods = {
|
|
15
|
+
learnCloudCreate: <Document extends Record<string, any>>(document: Document) => Promise<boolean>;
|
|
16
|
+
learnCloudCreateMany: <Document extends Record<string, any>>(documents: Document[]) => Promise<boolean>;
|
|
17
|
+
learnCloudRead: <Document extends Record<string, any>>(query: Filter<Document>, includeAssociatedDids?: boolean) => Promise<Document[]>;
|
|
18
|
+
learnCloudReadPage: <Document extends Record<string, any>>(query: Filter<Document>, paginationOptions?: Partial<PaginationOptionsType>, includeAssociatedDids?: boolean) => Promise<PaginationResponseType & {
|
|
19
|
+
records: Document[];
|
|
20
|
+
}>;
|
|
21
|
+
learnCloudCount: <Document extends Record<string, any>>(query: Filter<Document>, includeAssociatedDids?: boolean) => Promise<number>;
|
|
22
|
+
learnCloudUpdate: <Document extends Record<string, any>>(query: Filter<Document>, update: Partial<Document>) => Promise<number>;
|
|
23
|
+
learnCloudDelete: <Document extends Record<string, any>>(query: Filter<Document>, includeAssociatedDids?: boolean) => Promise<number | false>;
|
|
24
|
+
};
|
|
14
25
|
/** @group LearnCloud Plugin */
|
|
15
26
|
export type LearnCloudPlugin = Plugin<'LearnCloud', 'index' | 'read' | 'store', LearnCloudPluginMethods, 'id', LearnCloudPluginDependentMethods>;
|
|
16
27
|
/** @group LearnCloud Plugin */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@learncard/learn-cloud-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/learn-cloud-plugin.esm.js",
|
|
@@ -29,17 +29,18 @@
|
|
|
29
29
|
"jest": "^29.3.0",
|
|
30
30
|
"shx": "^0.3.4",
|
|
31
31
|
"ts-jest": "^29.0.3",
|
|
32
|
-
"@learncard/
|
|
32
|
+
"@learncard/learn-cloud-service": "^1.1.1",
|
|
33
|
+
"@learncard/types": "5.3.2"
|
|
33
34
|
},
|
|
34
35
|
"types": "./dist/index.d.ts",
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"json-stringify-deterministic": "^1.0.8",
|
|
37
38
|
"lodash": "^4.17.21",
|
|
38
39
|
"pbkdf2-hmac": "^1.2.1",
|
|
39
|
-
"@learncard/core": "9.0.
|
|
40
|
-
"@learncard/didkit-plugin": "1.0.
|
|
41
|
-
"@learncard/helpers": "^1.0.
|
|
42
|
-
"@learncard/learn-cloud-client": "1.
|
|
40
|
+
"@learncard/core": "9.0.3",
|
|
41
|
+
"@learncard/didkit-plugin": "1.0.5",
|
|
42
|
+
"@learncard/helpers": "^1.0.7",
|
|
43
|
+
"@learncard/learn-cloud-client": "1.1.1"
|
|
43
44
|
},
|
|
44
45
|
"scripts": {
|
|
45
46
|
"build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
|