@learncard/types 2.0.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/LICENSE +21 -0
- package/README.md +31 -0
- package/dist/index.js +7 -0
- package/dist/types.cjs.development.js +30 -0
- package/dist/types.cjs.development.js.map +7 -0
- package/dist/types.cjs.production.min.js +1 -0
- package/dist/types.cjs.production.min.js.map +7 -0
- package/dist/types.d.ts +75 -0
- package/dist/types.esm.js +10 -0
- package/dist/types.esm.js.map +7 -0
- package/package.json +60 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2022 Taylor Beeston <beeston.taylor@gmail.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# learn-card-types
|
2
|
+
|
3
|
+
> Shared types for learn card
|
4
|
+
|
5
|
+
[](https://www.npmjs.com/package/learn-card-types)
|
6
|
+
[](https://www.npmjs.com/package/learn-card-types)
|
7
|
+
[](https://www.npmjs.com/package/learn-card-types)
|
8
|
+
|
9
|
+
## Install
|
10
|
+
|
11
|
+
```bash
|
12
|
+
npm install learn-card-types
|
13
|
+
```
|
14
|
+
|
15
|
+
Or
|
16
|
+
|
17
|
+
```bash
|
18
|
+
yarn add learn-card-types
|
19
|
+
```
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
```js
|
24
|
+
import { ... } from "learn-card-types";
|
25
|
+
```
|
26
|
+
|
27
|
+
## License
|
28
|
+
|
29
|
+
MIT © [Taylor Beeston <beeston.taylor@gmail.com>](https://github.com/TaylorBeeston)
|
30
|
+
|
31
|
+
[Created with aqu 🌊](https://github.com/ArtiomTr/aqu#readme)
|
package/dist/index.js
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
|
19
|
+
// src/index.ts
|
20
|
+
var src_exports = {};
|
21
|
+
__export(src_exports, {
|
22
|
+
VerificationStatus: () => VerificationStatus
|
23
|
+
});
|
24
|
+
module.exports = __toCommonJS(src_exports);
|
25
|
+
var VerificationStatus = /* @__PURE__ */ ((VerificationStatus2) => {
|
26
|
+
VerificationStatus2["Success"] = "Success";
|
27
|
+
VerificationStatus2["Failed"] = "Failed";
|
28
|
+
VerificationStatus2["Error"] = "Error";
|
29
|
+
return VerificationStatus2;
|
30
|
+
})(VerificationStatus || {});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/index.ts"],
|
4
|
+
"sourcesContent": ["export enum VerificationStatus {\n Success = 'Success',\n Failed = 'Failed',\n Error = 'Error',\n}\n\nexport type VerificationItem = {\n check: string;\n status: VerificationStatus;\n message?: string;\n details?: string;\n};\n\nexport type AchievementCriteria = {\n type?: string;\n narrative?: string;\n};\n\nexport type CredentialSubjectAchievement = {\n type?: string;\n name?: string;\n description?: string;\n criteria?: AchievementCriteria;\n image?: string;\n};\n\nexport type CredentialSubject = {\n type?: string;\n id?: string;\n achievement?: CredentialSubjectAchievement;\n};\n\nexport type Issuer =\n | string\n | { type?: string; id?: string; name?: string; url?: string; image?: string };\n\nexport type CredentialInfo = {\n title?: string;\n createdAt?: string;\n issuer?: Issuer;\n issuee?: Issuer;\n credentialSubject?: CredentialSubject;\n};\n\nexport type Proof = {\n type: string;\n proofPurpose: string;\n verificationMethod: string;\n jws: string;\n created: string;\n};\n\nexport type UnsignedVC = {\n [key: string]: any;\n '@context': string | string[];\n credentialSubject: CredentialSubject;\n id: string;\n issuanceDate: string;\n expirationDate?: string;\n issuer: Issuer;\n type: string[];\n};\n\nexport type VC = UnsignedVC & { proof: Proof };\n\nexport type UnsignedVP = {\n [key: string]: any;\n '@context': string | string[];\n holder: string;\n type: string[];\n verifiableCredential: VC;\n};\n\nexport type VP = UnsignedVP & { proof: Proof };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAK,qBAAL,kBAAK,wBAAL;AACH,mCAAU;AACV,kCAAS;AACT,iCAAQ;AAHA;AAAA;",
|
6
|
+
"names": []
|
7
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
var s=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var n in e)s(t,n,{get:e[n],enumerable:!0})},d=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of o(e))!a.call(t,i)&&i!==n&&s(t,i,{get:()=>e[i],enumerable:!(r=p(e,i))||r.enumerable});return t};var y=t=>d(s({},"__esModule",{value:!0}),t);var u={};c(u,{VerificationStatus:()=>g});module.exports=y(u);var g=(r=>(r.Success="Success",r.Failed="Failed",r.Error="Error",r))(g||{});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/index.ts"],
|
4
|
+
"sourcesContent": ["export enum VerificationStatus {\n Success = 'Success',\n Failed = 'Failed',\n Error = 'Error',\n}\n\nexport type VerificationItem = {\n check: string;\n status: VerificationStatus;\n message?: string;\n details?: string;\n};\n\nexport type AchievementCriteria = {\n type?: string;\n narrative?: string;\n};\n\nexport type CredentialSubjectAchievement = {\n type?: string;\n name?: string;\n description?: string;\n criteria?: AchievementCriteria;\n image?: string;\n};\n\nexport type CredentialSubject = {\n type?: string;\n id?: string;\n achievement?: CredentialSubjectAchievement;\n};\n\nexport type Issuer =\n | string\n | { type?: string; id?: string; name?: string; url?: string; image?: string };\n\nexport type CredentialInfo = {\n title?: string;\n createdAt?: string;\n issuer?: Issuer;\n issuee?: Issuer;\n credentialSubject?: CredentialSubject;\n};\n\nexport type Proof = {\n type: string;\n proofPurpose: string;\n verificationMethod: string;\n jws: string;\n created: string;\n};\n\nexport type UnsignedVC = {\n [key: string]: any;\n '@context': string | string[];\n credentialSubject: CredentialSubject;\n id: string;\n issuanceDate: string;\n expirationDate?: string;\n issuer: Issuer;\n type: string[];\n};\n\nexport type VC = UnsignedVC & { proof: Proof };\n\nexport type UnsignedVP = {\n [key: string]: any;\n '@context': string | string[];\n holder: string;\n type: string[];\n verifiableCredential: VC;\n};\n\nexport type VP = UnsignedVP & { proof: Proof };\n"],
|
5
|
+
"mappings": "4ZAAA,6DAAO,GAAK,GAAL,CAAK,GACR,WAAU,UACV,SAAS,SACT,QAAQ,QAHA",
|
6
|
+
"names": []
|
7
|
+
}
|
package/dist/types.d.ts
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
// Generated by dts-bundle-generator v5.9.0
|
2
|
+
|
3
|
+
export declare enum VerificationStatus {
|
4
|
+
Success = "Success",
|
5
|
+
Failed = "Failed",
|
6
|
+
Error = "Error"
|
7
|
+
}
|
8
|
+
export declare type VerificationItem = {
|
9
|
+
check: string;
|
10
|
+
status: VerificationStatus;
|
11
|
+
message?: string;
|
12
|
+
details?: string;
|
13
|
+
};
|
14
|
+
export declare type AchievementCriteria = {
|
15
|
+
type?: string;
|
16
|
+
narrative?: string;
|
17
|
+
};
|
18
|
+
export declare type CredentialSubjectAchievement = {
|
19
|
+
type?: string;
|
20
|
+
name?: string;
|
21
|
+
description?: string;
|
22
|
+
criteria?: AchievementCriteria;
|
23
|
+
image?: string;
|
24
|
+
};
|
25
|
+
export declare type CredentialSubject = {
|
26
|
+
type?: string;
|
27
|
+
id?: string;
|
28
|
+
achievement?: CredentialSubjectAchievement;
|
29
|
+
};
|
30
|
+
export declare type Issuer = string | {
|
31
|
+
type?: string;
|
32
|
+
id?: string;
|
33
|
+
name?: string;
|
34
|
+
url?: string;
|
35
|
+
image?: string;
|
36
|
+
};
|
37
|
+
export declare type CredentialInfo = {
|
38
|
+
title?: string;
|
39
|
+
createdAt?: string;
|
40
|
+
issuer?: Issuer;
|
41
|
+
issuee?: Issuer;
|
42
|
+
credentialSubject?: CredentialSubject;
|
43
|
+
};
|
44
|
+
export declare type Proof = {
|
45
|
+
type: string;
|
46
|
+
proofPurpose: string;
|
47
|
+
verificationMethod: string;
|
48
|
+
jws: string;
|
49
|
+
created: string;
|
50
|
+
};
|
51
|
+
export declare type UnsignedVC = {
|
52
|
+
[key: string]: any;
|
53
|
+
"@context": string | string[];
|
54
|
+
credentialSubject: CredentialSubject;
|
55
|
+
id: string;
|
56
|
+
issuanceDate: string;
|
57
|
+
expirationDate?: string;
|
58
|
+
issuer: Issuer;
|
59
|
+
type: string[];
|
60
|
+
};
|
61
|
+
export declare type VC = UnsignedVC & {
|
62
|
+
proof: Proof;
|
63
|
+
};
|
64
|
+
export declare type UnsignedVP = {
|
65
|
+
[key: string]: any;
|
66
|
+
"@context": string | string[];
|
67
|
+
holder: string;
|
68
|
+
type: string[];
|
69
|
+
verifiableCredential: VC;
|
70
|
+
};
|
71
|
+
export declare type VP = UnsignedVP & {
|
72
|
+
proof: Proof;
|
73
|
+
};
|
74
|
+
|
75
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
// src/index.ts
|
2
|
+
var VerificationStatus = /* @__PURE__ */ ((VerificationStatus2) => {
|
3
|
+
VerificationStatus2["Success"] = "Success";
|
4
|
+
VerificationStatus2["Failed"] = "Failed";
|
5
|
+
VerificationStatus2["Error"] = "Error";
|
6
|
+
return VerificationStatus2;
|
7
|
+
})(VerificationStatus || {});
|
8
|
+
export {
|
9
|
+
VerificationStatus
|
10
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/index.ts"],
|
4
|
+
"sourcesContent": ["export enum VerificationStatus {\n Success = 'Success',\n Failed = 'Failed',\n Error = 'Error',\n}\n\nexport type VerificationItem = {\n check: string;\n status: VerificationStatus;\n message?: string;\n details?: string;\n};\n\nexport type AchievementCriteria = {\n type?: string;\n narrative?: string;\n};\n\nexport type CredentialSubjectAchievement = {\n type?: string;\n name?: string;\n description?: string;\n criteria?: AchievementCriteria;\n image?: string;\n};\n\nexport type CredentialSubject = {\n type?: string;\n id?: string;\n achievement?: CredentialSubjectAchievement;\n};\n\nexport type Issuer =\n | string\n | { type?: string; id?: string; name?: string; url?: string; image?: string };\n\nexport type CredentialInfo = {\n title?: string;\n createdAt?: string;\n issuer?: Issuer;\n issuee?: Issuer;\n credentialSubject?: CredentialSubject;\n};\n\nexport type Proof = {\n type: string;\n proofPurpose: string;\n verificationMethod: string;\n jws: string;\n created: string;\n};\n\nexport type UnsignedVC = {\n [key: string]: any;\n '@context': string | string[];\n credentialSubject: CredentialSubject;\n id: string;\n issuanceDate: string;\n expirationDate?: string;\n issuer: Issuer;\n type: string[];\n};\n\nexport type VC = UnsignedVC & { proof: Proof };\n\nexport type UnsignedVP = {\n [key: string]: any;\n '@context': string | string[];\n holder: string;\n type: string[];\n verifiableCredential: VC;\n};\n\nexport type VP = UnsignedVP & { proof: Proof };\n"],
|
5
|
+
"mappings": ";AAAO,IAAK,qBAAL,kBAAK,wBAAL;AACH,mCAAU;AACV,kCAAS;AACT,iCAAQ;AAHA;AAAA;",
|
6
|
+
"names": []
|
7
|
+
}
|
package/package.json
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
{
|
2
|
+
"name": "@learncard/types",
|
3
|
+
"version": "2.0.0",
|
4
|
+
"description": "Shared types for learn card",
|
5
|
+
"main": "./dist/index.js",
|
6
|
+
"module": "./dist/types.esm.js",
|
7
|
+
"files": [
|
8
|
+
"dist"
|
9
|
+
],
|
10
|
+
"size-limit": [
|
11
|
+
{
|
12
|
+
"path": "dist/types.cjs.production.min.js",
|
13
|
+
"limit": "10 KB"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"path": "dist/types.esm.js",
|
17
|
+
"limit": "10 KB"
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"husky": {
|
21
|
+
"hooks": {
|
22
|
+
"pre-commit": "lint-staged"
|
23
|
+
}
|
24
|
+
},
|
25
|
+
"lint-staged": {
|
26
|
+
"**/*.{js,jsx,ts,tsx,json}": "npm run lint:fix"
|
27
|
+
},
|
28
|
+
"author": "Taylor Beeston <beeston.taylor@gmail.com>",
|
29
|
+
"license": "MIT",
|
30
|
+
"homepage": "https://github.com/WeLibraryOS/LearnCard#readme",
|
31
|
+
"repository": {
|
32
|
+
"type": "git",
|
33
|
+
"url": "git+https://github.com/WeLibraryOS/LearnCard.git"
|
34
|
+
},
|
35
|
+
"bugs": {
|
36
|
+
"url": "https://github.com/WeLibraryOS/LearnCard/issues"
|
37
|
+
},
|
38
|
+
"devDependencies": {
|
39
|
+
"aqu": "0.3.2",
|
40
|
+
"np": "^7.6.1",
|
41
|
+
"lint-staged": "^13.0.0",
|
42
|
+
"husky": "^8.0.1",
|
43
|
+
"size-limit": "^7.0.8",
|
44
|
+
"@size-limit/preset-small-lib": "^7.0.8",
|
45
|
+
"typescript": "^4.7.2",
|
46
|
+
"@types/node": "^17.0.38"
|
47
|
+
},
|
48
|
+
"types": "./dist/types.d.ts",
|
49
|
+
"scripts": {
|
50
|
+
"build": "aqu build",
|
51
|
+
"start": "aqu watch",
|
52
|
+
"lint": "aqu lint",
|
53
|
+
"lint:fix": "aqu lint --fix",
|
54
|
+
"test": "aqu test --passWithNoTests",
|
55
|
+
"test:watch": "aqu test --passWithNoTests --watch",
|
56
|
+
"test:coverage": "aqu test --silent --ci --coverage --coverageReporters=\"text\" --coverageReporters=\"text-summary\"",
|
57
|
+
"size": "size-limit",
|
58
|
+
"size:why": "size-limit --why"
|
59
|
+
}
|
60
|
+
}
|