@sphereon/ssi-sdk.data-store 0.11.1-unstable.150 → 0.11.1-unstable.151
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/package.json +3 -3
- package/dist/contact/AbstractContactStore.d.ts +0 -27
- package/dist/contact/AbstractContactStore.d.ts.map +0 -1
- package/dist/contact/AbstractContactStore.js +0 -6
- package/dist/contact/AbstractContactStore.js.map +0 -1
- package/dist/contact/ContactStore.d.ts +0 -42
- package/dist/contact/ContactStore.d.ts.map +0 -1
- package/dist/contact/ContactStore.js +0 -347
- package/dist/contact/ContactStore.js.map +0 -1
- package/dist/entities/contact/BaseConfigEntity.d.ts +0 -5
- package/dist/entities/contact/BaseConfigEntity.d.ts.map +0 -1
- package/dist/entities/contact/BaseConfigEntity.js +0 -31
- package/dist/entities/contact/BaseConfigEntity.js.map +0 -1
- package/dist/entities/contact/ConnectionEntity.d.ts +0 -12
- package/dist/entities/contact/ConnectionEntity.d.ts.map +0 -1
- package/dist/entities/contact/ConnectionEntity.js +0 -87
- package/dist/entities/contact/ConnectionEntity.js.map +0 -1
- package/dist/entities/contact/ContactEntity.d.ts +0 -16
- package/dist/entities/contact/ContactEntity.d.ts.map +0 -1
- package/dist/entities/contact/ContactEntity.js +0 -164
- package/dist/entities/contact/ContactEntity.js.map +0 -1
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +0 -12
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts.map +0 -1
- package/dist/entities/contact/CorrelationIdentifierEntity.js +0 -123
- package/dist/entities/contact/CorrelationIdentifierEntity.js.map +0 -1
- package/dist/entities/contact/DidAuthConfigEntity.d.ts +0 -11
- package/dist/entities/contact/DidAuthConfigEntity.d.ts.map +0 -1
- package/dist/entities/contact/DidAuthConfigEntity.js +0 -68
- package/dist/entities/contact/DidAuthConfigEntity.js.map +0 -1
- package/dist/entities/contact/IdentityEntity.d.ts +0 -22
- package/dist/entities/contact/IdentityEntity.d.ts.map +0 -1
- package/dist/entities/contact/IdentityEntity.js +0 -217
- package/dist/entities/contact/IdentityEntity.js.map +0 -1
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +0 -12
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts.map +0 -1
- package/dist/entities/contact/IdentityMetadataItemEntity.js +0 -120
- package/dist/entities/contact/IdentityMetadataItemEntity.js.map +0 -1
- package/dist/entities/contact/OpenIdConfigEntity.d.ts +0 -15
- package/dist/entities/contact/OpenIdConfigEntity.d.ts.map +0 -1
- package/dist/entities/contact/OpenIdConfigEntity.js +0 -97
- package/dist/entities/contact/OpenIdConfigEntity.js.map +0 -1
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts +0 -11
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts.map +0 -1
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +0 -113
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js.map +0 -1
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts +0 -18
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts.map +0 -1
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +0 -192
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js.map +0 -1
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts +0 -15
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts.map +0 -1
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +0 -171
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js.map +0 -1
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts +0 -9
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts.map +0 -1
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +0 -71
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js.map +0 -1
- package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts +0 -14
- package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts.map +0 -1
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js +0 -146
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js.map +0 -1
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts +0 -9
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts.map +0 -1
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +0 -44
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js.map +0 -1
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts +0 -14
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts.map +0 -1
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +0 -156
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js.map +0 -1
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts +0 -9
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts.map +0 -1
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +0 -71
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js.map +0 -1
- package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts +0 -9
- package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts.map +0 -1
- package/dist/entities/issuanceBranding/TextAttributesEntity.js +0 -96
- package/dist/entities/issuanceBranding/TextAttributesEntity.js.map +0 -1
- package/dist/entities/validators/index.d.ts +0 -7
- package/dist/entities/validators/index.d.ts.map +0 -1
- package/dist/entities/validators/index.js +0 -33
- package/dist/entities/validators/index.js.map +0 -1
- package/dist/index.d.ts +0 -67
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -334
- package/dist/index.js.map +0 -1
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts +0 -41
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts.map +0 -1
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +0 -6
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js.map +0 -1
- package/dist/issuanceBranding/IssuanceBrandingStore.d.ts +0 -52
- package/dist/issuanceBranding/IssuanceBrandingStore.d.ts.map +0 -1
- package/dist/issuanceBranding/IssuanceBrandingStore.js +0 -529
- package/dist/issuanceBranding/IssuanceBrandingStore.js.map +0 -1
- package/dist/migrations/generic/1-CreateContacts.d.ts +0 -7
- package/dist/migrations/generic/1-CreateContacts.d.ts.map +0 -1
- package/dist/migrations/generic/1-CreateContacts.js +0 -96
- package/dist/migrations/generic/1-CreateContacts.js.map +0 -1
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts +0 -7
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +0 -1
- package/dist/migrations/generic/1-CreateIssuanceBranding.js +0 -96
- package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +0 -1
- package/dist/migrations/generic/index.d.ts +0 -10
- package/dist/migrations/generic/index.d.ts.map +0 -1
- package/dist/migrations/generic/index.js +0 -14
- package/dist/migrations/generic/index.js.map +0 -1
- package/dist/migrations/index.d.ts +0 -2
- package/dist/migrations/index.d.ts.map +0 -1
- package/dist/migrations/index.js +0 -11
- package/dist/migrations/index.js.map +0 -1
- package/dist/migrations/internal-migrations-ormconfig.d.ts +0 -6
- package/dist/migrations/internal-migrations-ormconfig.d.ts.map +0 -1
- package/dist/migrations/internal-migrations-ormconfig.js +0 -29
- package/dist/migrations/internal-migrations-ormconfig.js.map +0 -1
- package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts +0 -7
- package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts.map +0 -1
- package/dist/migrations/postgres/1659463079428-CreateContacts.js +0 -99
- package/dist/migrations/postgres/1659463079428-CreateContacts.js.map +0 -1
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts +0 -7
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts.map +0 -1
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +0 -121
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js.map +0 -1
- package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts +0 -7
- package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts.map +0 -1
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js +0 -145
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js.map +0 -1
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts +0 -7
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts.map +0 -1
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +0 -159
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js.map +0 -1
- package/dist/types/contact/IAbstractContactStore.d.ts +0 -41
- package/dist/types/contact/IAbstractContactStore.d.ts.map +0 -1
- package/dist/types/contact/IAbstractContactStore.js +0 -3
- package/dist/types/contact/IAbstractContactStore.js.map +0 -1
- package/dist/types/contact/contact.d.ts +0 -91
- package/dist/types/contact/contact.d.ts.map +0 -1
- package/dist/types/contact/contact.js +0 -21
- package/dist/types/contact/contact.js.map +0 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -32
- package/dist/types/index.js.map +0 -1
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts +0 -69
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts.map +0 -1
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +0 -3
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js.map +0 -1
- package/dist/types/issuanceBranding/issuanceBranding.d.ts +0 -109
- package/dist/types/issuanceBranding/issuanceBranding.d.ts.map +0 -1
- package/dist/types/issuanceBranding/issuanceBranding.js +0 -3
- package/dist/types/issuanceBranding/issuanceBranding.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.data-store",
|
|
3
|
-
"version": "0.11.1-unstable.
|
|
3
|
+
"version": "0.11.1-unstable.151+5f89d1a",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"typeorm-postgres:migration:run": "pnpm run typeorm -- migration:run -c migration-postgres"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@sphereon/ssi-types": "0.11.1-unstable.
|
|
16
|
+
"@sphereon/ssi-types": "0.11.1-unstable.151+5f89d1a",
|
|
17
17
|
"@veramo/core": "4.2.0",
|
|
18
18
|
"class-validator": "^0.14.0",
|
|
19
19
|
"debug": "^4.3.4",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"PostgreSQL",
|
|
42
42
|
"Contact Store"
|
|
43
43
|
],
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "5f89d1a73bc8cc2102c2def36821bea2c88ee350"
|
|
45
45
|
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IContact,
|
|
3
|
-
IIdentity,
|
|
4
|
-
IAddIdentityArgs,
|
|
5
|
-
IGetIdentityArgs,
|
|
6
|
-
IGetIdentitiesArgs,
|
|
7
|
-
IGetContactArgs,
|
|
8
|
-
IRemoveIdentityArgs,
|
|
9
|
-
IUpdateIdentityArgs,
|
|
10
|
-
IAddContactArgs,
|
|
11
|
-
IGetContactsArgs,
|
|
12
|
-
IRemoveContactArgs,
|
|
13
|
-
IUpdateContactArgs,
|
|
14
|
-
} from '../types'
|
|
15
|
-
export declare abstract class AbstractContactStore {
|
|
16
|
-
abstract getContact(args: IGetContactArgs): Promise<IContact>
|
|
17
|
-
abstract getContacts(args?: IGetContactsArgs): Promise<Array<IContact>>
|
|
18
|
-
abstract addContact(args: IAddContactArgs): Promise<IContact>
|
|
19
|
-
abstract updateContact(args: IUpdateContactArgs): Promise<IContact>
|
|
20
|
-
abstract removeContact(args: IRemoveContactArgs): Promise<void>
|
|
21
|
-
abstract getIdentity(args: IGetIdentityArgs): Promise<IIdentity>
|
|
22
|
-
abstract getIdentities(args: IGetIdentitiesArgs): Promise<Array<IIdentity>>
|
|
23
|
-
abstract addIdentity(args: IAddIdentityArgs): Promise<IIdentity>
|
|
24
|
-
abstract updateIdentity(args: IUpdateIdentityArgs): Promise<IIdentity>
|
|
25
|
-
abstract removeIdentity(args: IRemoveIdentityArgs): Promise<void>
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=AbstractContactStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractContactStore.d.ts","sourceRoot":"","sources":["../../src/contact/AbstractContactStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAEjB,8BAAsB,oBAAoB;IACxC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAC7D,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvE,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAC7D,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC;IACnE,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAC/D,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC;IAChE,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC3E,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC;IAChE,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,SAAS,CAAC;IACtE,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAClE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractContactStore.js","sourceRoot":"","sources":["../../src/contact/AbstractContactStore.ts"],"names":[],"mappings":";;;AAeA,MAAsB,oBAAoB;CAWzC;AAXD,oDAWC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { OrPromise } from '@sphereon/ssi-types'
|
|
2
|
-
import { AbstractContactStore } from './AbstractContactStore'
|
|
3
|
-
import {
|
|
4
|
-
IAddIdentityArgs,
|
|
5
|
-
IGetIdentityArgs,
|
|
6
|
-
IGetIdentitiesArgs,
|
|
7
|
-
IGetContactArgs,
|
|
8
|
-
IRemoveIdentityArgs,
|
|
9
|
-
IUpdateIdentityArgs,
|
|
10
|
-
IGetContactsArgs,
|
|
11
|
-
IAddContactArgs,
|
|
12
|
-
IUpdateContactArgs,
|
|
13
|
-
IRemoveContactArgs,
|
|
14
|
-
IContact,
|
|
15
|
-
IIdentity,
|
|
16
|
-
} from '../types'
|
|
17
|
-
import { DataSource } from 'typeorm'
|
|
18
|
-
export declare class ContactStore extends AbstractContactStore {
|
|
19
|
-
private readonly dbConnection
|
|
20
|
-
constructor(dbConnection: OrPromise<DataSource>)
|
|
21
|
-
getContact: ({ contactId }: IGetContactArgs) => Promise<IContact>
|
|
22
|
-
getContacts: (args?: IGetContactsArgs) => Promise<Array<IContact>>
|
|
23
|
-
addContact: (args: IAddContactArgs) => Promise<IContact>
|
|
24
|
-
updateContact: ({ contact }: IUpdateContactArgs) => Promise<IContact>
|
|
25
|
-
removeContact: ({ contactId }: IRemoveContactArgs) => Promise<void>
|
|
26
|
-
private deleteIdentities
|
|
27
|
-
getIdentity: ({ identityId }: IGetIdentityArgs) => Promise<IIdentity>
|
|
28
|
-
getIdentities: (args?: IGetIdentitiesArgs) => Promise<Array<IIdentity>>
|
|
29
|
-
addIdentity: ({ identity, contactId }: IAddIdentityArgs) => Promise<IIdentity>
|
|
30
|
-
updateIdentity: ({ identity }: IUpdateIdentityArgs) => Promise<IIdentity>
|
|
31
|
-
removeIdentity: ({ identityId }: IRemoveIdentityArgs) => Promise<void>
|
|
32
|
-
private contactFrom
|
|
33
|
-
private identityFrom
|
|
34
|
-
private correlationIdentifierFrom
|
|
35
|
-
private metadataItemFrom
|
|
36
|
-
private connectionFrom
|
|
37
|
-
private configFrom
|
|
38
|
-
private hasCorrectConfig
|
|
39
|
-
private isOpenIdConfig
|
|
40
|
-
private isDidAuthConfig
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=ContactStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContactStore.d.ts","sourceRoot":"","sources":["../../src/contact/ContactStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAMlB,QAAQ,EAGR,SAAS,EAGV,MAAM,UAAU,CAAA;AASjB,OAAO,EAAE,UAAU,EAAM,MAAM,SAAS,CAAA;AAIxC,qBAAa,YAAa,SAAQ,oBAAoB;IACpD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAuB;gBAExC,YAAY,EAAE,SAAS,CAAC,UAAU,CAAC;IAK/C,UAAU,kBAAyB,eAAe,KAAG,QAAQ,QAAQ,CAAC,CAUrE;IAED,WAAW,UAAiB,gBAAgB,KAAG,QAAQ,MAAM,QAAQ,CAAC,CAAC,CAYtE;IAED,UAAU,SAAgB,eAAe,KAAG,QAAQ,QAAQ,CAAC,CA4B5D;IAED,aAAa,gBAAuB,kBAAkB,KAAG,QAAQ,QAAQ,CAAC,CAkBzE;IAED,aAAa,kBAAyB,kBAAkB,KAAG,QAAQ,IAAI,CAAC,CAoBvE;YAEa,gBAAgB;IAwC9B,WAAW,mBAA0B,gBAAgB,KAAG,QAAQ,SAAS,CAAC,CAUzE;IAED,aAAa,UAAiB,kBAAkB,KAAG,QAAQ,MAAM,SAAS,CAAC,CAAC,CAY3E;IAED,WAAW,4BAAmC,gBAAgB,KAAG,QAAQ,SAAS,CAAC,CA2BlF;IAED,cAAc,iBAAwB,mBAAmB,KAAG,QAAQ,SAAS,CAAC,CAuB7E;IAED,cAAc,mBAA0B,mBAAmB,KAAG,QAAQ,IAAI,CAAC,CAY1E;IAED,OAAO,CAAC,WAAW,CAWlB;IAED,OAAO,CAAC,YAAY,CAWnB;IAED,OAAO,CAAC,yBAAyB,CAMhC;IAED,OAAO,CAAC,gBAAgB,CAMvB;IAED,OAAO,CAAC,cAAc,CAMrB;IAED,OAAO,CAAC,UAAU,CAwBjB;IAED,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,cAAc,CACqD;IAE3E,OAAO,CAAC,eAAe,CACqD;CAC7E"}
|
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
var __awaiter =
|
|
3
|
-
(this && this.__awaiter) ||
|
|
4
|
-
function (thisArg, _arguments, P, generator) {
|
|
5
|
-
function adopt(value) {
|
|
6
|
-
return value instanceof P
|
|
7
|
-
? value
|
|
8
|
-
: new P(function (resolve) {
|
|
9
|
-
resolve(value)
|
|
10
|
-
})
|
|
11
|
-
}
|
|
12
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13
|
-
function fulfilled(value) {
|
|
14
|
-
try {
|
|
15
|
-
step(generator.next(value))
|
|
16
|
-
} catch (e) {
|
|
17
|
-
reject(e)
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function rejected(value) {
|
|
21
|
-
try {
|
|
22
|
-
step(generator['throw'](value))
|
|
23
|
-
} catch (e) {
|
|
24
|
-
reject(e)
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function step(result) {
|
|
28
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected)
|
|
29
|
-
}
|
|
30
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next())
|
|
31
|
-
})
|
|
32
|
-
}
|
|
33
|
-
var __importDefault =
|
|
34
|
-
(this && this.__importDefault) ||
|
|
35
|
-
function (mod) {
|
|
36
|
-
return mod && mod.__esModule ? mod : { default: mod }
|
|
37
|
-
}
|
|
38
|
-
Object.defineProperty(exports, '__esModule', { value: true })
|
|
39
|
-
exports.ContactStore = void 0
|
|
40
|
-
const debug_1 = __importDefault(require('debug'))
|
|
41
|
-
const AbstractContactStore_1 = require('./AbstractContactStore')
|
|
42
|
-
const types_1 = require('../types')
|
|
43
|
-
const ContactEntity_1 = require('../entities/contact/ContactEntity')
|
|
44
|
-
const IdentityEntity_1 = require('../entities/contact/IdentityEntity')
|
|
45
|
-
const IdentityMetadataItemEntity_1 = require('../entities/contact/IdentityMetadataItemEntity')
|
|
46
|
-
const CorrelationIdentifierEntity_1 = require('../entities/contact/CorrelationIdentifierEntity')
|
|
47
|
-
const ConnectionEntity_1 = require('../entities/contact/ConnectionEntity')
|
|
48
|
-
const BaseConfigEntity_1 = require('../entities/contact/BaseConfigEntity')
|
|
49
|
-
const typeorm_1 = require('typeorm')
|
|
50
|
-
const debug = (0, debug_1.default)('sphereon:ssi-sdk:contact-store')
|
|
51
|
-
class ContactStore extends AbstractContactStore_1.AbstractContactStore {
|
|
52
|
-
constructor(dbConnection) {
|
|
53
|
-
super()
|
|
54
|
-
this.getContact = ({ contactId }) =>
|
|
55
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const result = yield (yield this.dbConnection).getRepository(ContactEntity_1.ContactEntity).findOne({
|
|
57
|
-
where: { id: contactId },
|
|
58
|
-
})
|
|
59
|
-
if (!result) {
|
|
60
|
-
return Promise.reject(Error(`No contact found for id: ${contactId}`))
|
|
61
|
-
}
|
|
62
|
-
return this.contactFrom(result)
|
|
63
|
-
})
|
|
64
|
-
this.getContacts = (args) =>
|
|
65
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const initialResult = yield (yield this.dbConnection)
|
|
67
|
-
.getRepository(ContactEntity_1.ContactEntity)
|
|
68
|
-
.find(
|
|
69
|
-
Object.assign(
|
|
70
|
-
{},
|
|
71
|
-
(args === null || args === void 0 ? void 0 : args.filter) && { where: args === null || args === void 0 ? void 0 : args.filter }
|
|
72
|
-
)
|
|
73
|
-
)
|
|
74
|
-
const result = yield (yield this.dbConnection).getRepository(ContactEntity_1.ContactEntity).find({
|
|
75
|
-
where: {
|
|
76
|
-
id: (0, typeorm_1.In)(initialResult.map((contact) => contact.id)),
|
|
77
|
-
},
|
|
78
|
-
})
|
|
79
|
-
return result.map((contact) => this.contactFrom(contact))
|
|
80
|
-
})
|
|
81
|
-
this.addContact = (args) =>
|
|
82
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
const { name, alias, uri, identities } = args
|
|
84
|
-
const result = yield (yield this.dbConnection).getRepository(ContactEntity_1.ContactEntity).findOne({
|
|
85
|
-
where: [{ name }, { alias }],
|
|
86
|
-
})
|
|
87
|
-
if (result) {
|
|
88
|
-
return Promise.reject(Error(`Duplicate names or aliases are not allowed. Name: ${name}, Alias: ${alias}`))
|
|
89
|
-
}
|
|
90
|
-
for (const identity of identities !== null && identities !== void 0 ? identities : []) {
|
|
91
|
-
if (identity.identifier.type === types_1.CorrelationIdentifierEnum.URL) {
|
|
92
|
-
if (!identity.connection) {
|
|
93
|
-
return Promise.reject(Error(`Identity with correlation type ${types_1.CorrelationIdentifierEnum.URL} should contain a connection`))
|
|
94
|
-
}
|
|
95
|
-
if (!this.hasCorrectConfig(identity.connection.type, identity.connection.config)) {
|
|
96
|
-
return Promise.reject(Error(`Connection type ${identity.connection.type}, does not match for provided config`))
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
const contactEntity = (0, ContactEntity_1.contactEntityFrom)({ name, alias, uri, identities })
|
|
101
|
-
debug('Adding contact', name)
|
|
102
|
-
const createdResult = yield (yield this.dbConnection).getRepository(ContactEntity_1.ContactEntity).save(contactEntity)
|
|
103
|
-
return this.contactFrom(createdResult)
|
|
104
|
-
})
|
|
105
|
-
this.updateContact = ({ contact }) =>
|
|
106
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
const result = yield (yield this.dbConnection).getRepository(ContactEntity_1.ContactEntity).findOne({
|
|
108
|
-
where: { id: contact.id },
|
|
109
|
-
})
|
|
110
|
-
if (!result) {
|
|
111
|
-
return Promise.reject(Error(`No contact found for id: ${contact.id}`))
|
|
112
|
-
}
|
|
113
|
-
const updatedContact = Object.assign(Object.assign({}, contact), { identities: result.identities })
|
|
114
|
-
debug('Updating contact', contact)
|
|
115
|
-
const updatedResult = yield (yield this.dbConnection).getRepository(ContactEntity_1.ContactEntity).save(updatedContact, { transaction: true })
|
|
116
|
-
return this.contactFrom(updatedResult)
|
|
117
|
-
})
|
|
118
|
-
this.removeContact = ({ contactId }) =>
|
|
119
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
debug('Removing contact', contactId)
|
|
121
|
-
;(yield this.dbConnection)
|
|
122
|
-
.getRepository(ContactEntity_1.ContactEntity)
|
|
123
|
-
.findOneById(contactId)
|
|
124
|
-
.then((contact) =>
|
|
125
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
126
|
-
if (!contact) {
|
|
127
|
-
yield Promise.reject(Error(`Unable to find the contact with id to remove: ${contactId}`))
|
|
128
|
-
} else {
|
|
129
|
-
yield this.deleteIdentities(contact.identities)
|
|
130
|
-
yield (yield this.dbConnection)
|
|
131
|
-
.getRepository(ContactEntity_1.ContactEntity)
|
|
132
|
-
.delete({ id: contactId })
|
|
133
|
-
.catch((error) => Promise.reject(Error(`Unable to remove contact with id: ${contactId}. ${error}`)))
|
|
134
|
-
}
|
|
135
|
-
})
|
|
136
|
-
)
|
|
137
|
-
.catch((error) => Promise.reject(Error(`Unable to remove contact with id: ${contactId}. ${error}`)))
|
|
138
|
-
})
|
|
139
|
-
this.getIdentity = ({ identityId }) =>
|
|
140
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
141
|
-
const result = yield (yield this.dbConnection).getRepository(IdentityEntity_1.IdentityEntity).findOne({
|
|
142
|
-
where: { id: identityId },
|
|
143
|
-
})
|
|
144
|
-
if (!result) {
|
|
145
|
-
return Promise.reject(Error(`No identity found for id: ${identityId}`))
|
|
146
|
-
}
|
|
147
|
-
return this.identityFrom(result)
|
|
148
|
-
})
|
|
149
|
-
this.getIdentities = (args) =>
|
|
150
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
151
|
-
const initialResult = yield (yield this.dbConnection)
|
|
152
|
-
.getRepository(IdentityEntity_1.IdentityEntity)
|
|
153
|
-
.find(
|
|
154
|
-
Object.assign(
|
|
155
|
-
{},
|
|
156
|
-
(args === null || args === void 0 ? void 0 : args.filter) && { where: args === null || args === void 0 ? void 0 : args.filter }
|
|
157
|
-
)
|
|
158
|
-
)
|
|
159
|
-
const result = yield (yield this.dbConnection).getRepository(IdentityEntity_1.IdentityEntity).find({
|
|
160
|
-
where: {
|
|
161
|
-
id: (0, typeorm_1.In)(initialResult.map((identity) => identity.id)),
|
|
162
|
-
},
|
|
163
|
-
})
|
|
164
|
-
return result.map((identity) => this.identityFrom(identity))
|
|
165
|
-
})
|
|
166
|
-
this.addIdentity = ({ identity, contactId }) =>
|
|
167
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
const contact = yield (yield this.dbConnection).getRepository(ContactEntity_1.ContactEntity).findOne({
|
|
169
|
-
where: { id: contactId },
|
|
170
|
-
})
|
|
171
|
-
if (!contact) {
|
|
172
|
-
return Promise.reject(Error(`No contact found for id: ${contactId}`))
|
|
173
|
-
}
|
|
174
|
-
if (identity.identifier.type === types_1.CorrelationIdentifierEnum.URL) {
|
|
175
|
-
if (!identity.connection) {
|
|
176
|
-
return Promise.reject(Error(`Identity with correlation type ${types_1.CorrelationIdentifierEnum.URL} should contain a connection`))
|
|
177
|
-
}
|
|
178
|
-
if (!this.hasCorrectConfig(identity.connection.type, identity.connection.config)) {
|
|
179
|
-
return Promise.reject(Error(`Connection type ${identity.connection.type}, does not match for provided config`))
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
const identityEntity = (0, IdentityEntity_1.identityEntityFrom)(identity)
|
|
183
|
-
identityEntity.contact = contact
|
|
184
|
-
debug('Adding identity', identity)
|
|
185
|
-
const result = yield (yield this.dbConnection).getRepository(IdentityEntity_1.IdentityEntity).save(identityEntity, {
|
|
186
|
-
transaction: true,
|
|
187
|
-
})
|
|
188
|
-
return this.identityFrom(result)
|
|
189
|
-
})
|
|
190
|
-
this.updateIdentity = ({ identity }) =>
|
|
191
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
192
|
-
const result = yield (yield this.dbConnection).getRepository(IdentityEntity_1.IdentityEntity).findOne({
|
|
193
|
-
where: { id: identity.id },
|
|
194
|
-
})
|
|
195
|
-
if (!result) {
|
|
196
|
-
return Promise.reject(Error(`No identity found for id: ${identity.id}`))
|
|
197
|
-
}
|
|
198
|
-
if (identity.identifier.type === types_1.CorrelationIdentifierEnum.URL) {
|
|
199
|
-
if (!identity.connection) {
|
|
200
|
-
return Promise.reject(Error(`Identity with correlation type ${types_1.CorrelationIdentifierEnum.URL} should contain a connection`))
|
|
201
|
-
}
|
|
202
|
-
if (!this.hasCorrectConfig(identity.connection.type, identity.connection.config)) {
|
|
203
|
-
return Promise.reject(Error(`Connection type ${identity.connection.type}, does not match for provided config`))
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
debug('Updating identity', identity)
|
|
207
|
-
const updatedResult = yield (yield this.dbConnection).getRepository(IdentityEntity_1.IdentityEntity).save(identity, { transaction: true })
|
|
208
|
-
return this.identityFrom(updatedResult)
|
|
209
|
-
})
|
|
210
|
-
this.removeIdentity = ({ identityId }) =>
|
|
211
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
212
|
-
const identity = yield (yield this.dbConnection).getRepository(IdentityEntity_1.IdentityEntity).findOne({
|
|
213
|
-
where: { id: identityId },
|
|
214
|
-
})
|
|
215
|
-
if (!identity) {
|
|
216
|
-
return Promise.reject(Error(`No identity found for id: ${identityId}`))
|
|
217
|
-
}
|
|
218
|
-
debug('Removing identity', identityId)
|
|
219
|
-
yield this.deleteIdentities([identity])
|
|
220
|
-
})
|
|
221
|
-
this.contactFrom = (contact) => {
|
|
222
|
-
var _a, _b
|
|
223
|
-
return {
|
|
224
|
-
id: contact.id,
|
|
225
|
-
name: contact.name,
|
|
226
|
-
alias: contact.alias,
|
|
227
|
-
uri: contact.uri,
|
|
228
|
-
roles:
|
|
229
|
-
(_b = [...new Set((_a = contact.identities) === null || _a === void 0 ? void 0 : _a.flatMap((identity) => identity.roles))]) !== null &&
|
|
230
|
-
_b !== void 0
|
|
231
|
-
? _b
|
|
232
|
-
: [],
|
|
233
|
-
identities: contact.identities ? contact.identities.map((identity) => this.identityFrom(identity)) : [],
|
|
234
|
-
createdAt: contact.createdAt,
|
|
235
|
-
lastUpdatedAt: contact.lastUpdatedAt,
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
this.identityFrom = (identity) => {
|
|
239
|
-
return Object.assign(
|
|
240
|
-
Object.assign(
|
|
241
|
-
{ id: identity.id, alias: identity.alias, roles: identity.roles, identifier: this.correlationIdentifierFrom(identity.identifier) },
|
|
242
|
-
identity.connection && { connection: this.connectionFrom(identity.connection) }
|
|
243
|
-
),
|
|
244
|
-
{
|
|
245
|
-
metadata: identity.metadata ? identity.metadata.map((item) => this.metadataItemFrom(item)) : [],
|
|
246
|
-
createdAt: identity.createdAt,
|
|
247
|
-
lastUpdatedAt: identity.createdAt,
|
|
248
|
-
}
|
|
249
|
-
)
|
|
250
|
-
}
|
|
251
|
-
this.correlationIdentifierFrom = (identifier) => {
|
|
252
|
-
return {
|
|
253
|
-
id: identifier.id,
|
|
254
|
-
type: identifier.type,
|
|
255
|
-
correlationId: identifier.correlationId,
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
this.metadataItemFrom = (item) => {
|
|
259
|
-
return {
|
|
260
|
-
id: item.id,
|
|
261
|
-
label: item.label,
|
|
262
|
-
value: item.value,
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
this.connectionFrom = (connection) => {
|
|
266
|
-
return {
|
|
267
|
-
id: connection.id,
|
|
268
|
-
type: connection.type,
|
|
269
|
-
config: this.configFrom(connection.type, connection.config),
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
this.configFrom = (type, config) => {
|
|
273
|
-
switch (type) {
|
|
274
|
-
case types_1.ConnectionTypeEnum.OPENID_CONNECT:
|
|
275
|
-
return {
|
|
276
|
-
id: config.id,
|
|
277
|
-
clientId: config.clientId,
|
|
278
|
-
clientSecret: config.clientSecret,
|
|
279
|
-
scopes: config.scopes,
|
|
280
|
-
issuer: config.issuer,
|
|
281
|
-
redirectUrl: config.redirectUrl,
|
|
282
|
-
dangerouslyAllowInsecureHttpRequests: config.dangerouslyAllowInsecureHttpRequests,
|
|
283
|
-
clientAuthMethod: config.clientAuthMethod,
|
|
284
|
-
}
|
|
285
|
-
case types_1.ConnectionTypeEnum.SIOPv2:
|
|
286
|
-
return {
|
|
287
|
-
id: config.id,
|
|
288
|
-
identifier: { did: config.identifier, provider: '', keys: [], services: [] },
|
|
289
|
-
stateId: '',
|
|
290
|
-
redirectUrl: config.redirectUrl,
|
|
291
|
-
sessionId: config.sessionId,
|
|
292
|
-
}
|
|
293
|
-
default:
|
|
294
|
-
throw new Error('Connection type not supported')
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
this.isOpenIdConfig = (config) => 'clientSecret' in config && 'issuer' in config && 'redirectUrl' in config
|
|
298
|
-
this.isDidAuthConfig = (config) => 'identifier' in config && 'redirectUrl' in config && 'sessionId' in config
|
|
299
|
-
this.dbConnection = dbConnection
|
|
300
|
-
}
|
|
301
|
-
deleteIdentities(identities) {
|
|
302
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
-
debug('Removing identities', identities)
|
|
304
|
-
identities.map((identity) =>
|
|
305
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
306
|
-
yield (yield this.dbConnection)
|
|
307
|
-
.getRepository(CorrelationIdentifierEntity_1.CorrelationIdentifierEntity)
|
|
308
|
-
.delete(identity.identifier.id)
|
|
309
|
-
.catch((error) => Promise.reject(Error(`Unable to remove identity.identifier with id: ${identity.identifier.id}. ${error}`)))
|
|
310
|
-
if (identity.connection) {
|
|
311
|
-
yield (yield this.dbConnection).getRepository(BaseConfigEntity_1.BaseConfigEntity).delete(identity.connection.config.id)
|
|
312
|
-
yield (yield this.dbConnection)
|
|
313
|
-
.getRepository(ConnectionEntity_1.ConnectionEntity)
|
|
314
|
-
.delete(identity.connection.id)
|
|
315
|
-
.catch((error) => Promise.reject(Error(`Unable to remove identity.connection with id. ${error}`)))
|
|
316
|
-
}
|
|
317
|
-
if (identity.metadata) {
|
|
318
|
-
identity.metadata.map((metadataItem) =>
|
|
319
|
-
__awaiter(this, void 0, void 0, function* () {
|
|
320
|
-
yield (yield this.dbConnection)
|
|
321
|
-
.getRepository(IdentityMetadataItemEntity_1.IdentityMetadataItemEntity)
|
|
322
|
-
.delete(metadataItem.id)
|
|
323
|
-
.catch((error) => Promise.reject(Error(`Unable to remove metadataItem.id with id ${metadataItem.id}. ${error}`)))
|
|
324
|
-
})
|
|
325
|
-
)
|
|
326
|
-
}
|
|
327
|
-
;(yield this.dbConnection)
|
|
328
|
-
.getRepository(IdentityEntity_1.IdentityEntity)
|
|
329
|
-
.delete(identity.id)
|
|
330
|
-
.catch((error) => Promise.reject(Error(`Unable to remove metadataItem.id with id ${identity.id}. ${error}`)))
|
|
331
|
-
})
|
|
332
|
-
)
|
|
333
|
-
})
|
|
334
|
-
}
|
|
335
|
-
hasCorrectConfig(type, config) {
|
|
336
|
-
switch (type) {
|
|
337
|
-
case types_1.ConnectionTypeEnum.OPENID_CONNECT:
|
|
338
|
-
return this.isOpenIdConfig(config)
|
|
339
|
-
case types_1.ConnectionTypeEnum.SIOPv2:
|
|
340
|
-
return this.isDidAuthConfig(config)
|
|
341
|
-
default:
|
|
342
|
-
throw new Error('Connection type not supported')
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
exports.ContactStore = ContactStore
|
|
347
|
-
//# sourceMappingURL=ContactStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContactStore.js","sourceRoot":"","sources":["../../src/contact/ContactStore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAAyB;AAEzB,iEAA6D;AAC7D,oCAsBiB;AACjB,qEAAoF;AACpF,uEAAuF;AACvF,+FAA2F;AAC3F,iGAA6F;AAC7F,2EAAuE;AACvE,2EAAuE;AAGvE,qCAAwC;AAExC,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,gCAAgC,CAAC,CAAA;AAErD,MAAa,YAAa,SAAQ,2CAAoB;IAGpD,YAAY,YAAmC;QAC7C,KAAK,EAAE,CAAA;QAIT,eAAU,GAAG,CAAO,EAAE,SAAS,EAAmB,EAAqB,EAAE;YACvE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,6BAAa,CAAC,CAAC,OAAO,CAAC;gBAClF,K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names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAoD,MAAM,SAAS,CAAA;AAEtF,8BAEsB,gBAAiB,SAAQ,UAAU;IAEvD,EAAE,EAAG,MAAM,CAAA;CACZ"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
var __decorate =
|
|
3
|
-
(this && this.__decorate) ||
|
|
4
|
-
function (decorators, target, key, desc) {
|
|
5
|
-
var c = arguments.length,
|
|
6
|
-
r = c < 3 ? target : desc === null ? (desc = Object.getOwnPropertyDescriptor(target, key)) : desc,
|
|
7
|
-
d
|
|
8
|
-
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc)
|
|
9
|
-
else
|
|
10
|
-
for (var i = decorators.length - 1; i >= 0; i--) if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r
|
|
11
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r
|
|
12
|
-
}
|
|
13
|
-
var __metadata =
|
|
14
|
-
(this && this.__metadata) ||
|
|
15
|
-
function (k, v) {
|
|
16
|
-
if (typeof Reflect === 'object' && typeof Reflect.metadata === 'function') return Reflect.metadata(k, v)
|
|
17
|
-
}
|
|
18
|
-
Object.defineProperty(exports, '__esModule', { value: true })
|
|
19
|
-
exports.BaseConfigEntity = void 0
|
|
20
|
-
const typeorm_1 = require('typeorm')
|
|
21
|
-
let BaseConfigEntity = class BaseConfigEntity extends typeorm_1.BaseEntity {}
|
|
22
|
-
__decorate([(0, typeorm_1.PrimaryGeneratedColumn)('uuid'), __metadata('design:type', String)], BaseConfigEntity.prototype, 'id', void 0)
|
|
23
|
-
BaseConfigEntity = __decorate(
|
|
24
|
-
[
|
|
25
|
-
(0, typeorm_1.Entity)('BaseConfigEntity'), // FIXME rename it to 'BaseConfig'
|
|
26
|
-
(0, typeorm_1.TableInheritance)({ column: { type: 'varchar', name: 'type' } }),
|
|
27
|
-
],
|
|
28
|
-
BaseConfigEntity
|
|
29
|
-
)
|
|
30
|
-
exports.BaseConfigEntity = BaseConfigEntity
|
|
31
|
-
//# sourceMappingURL=BaseConfigEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseConfigEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/BaseConfigEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAsF;AAI/E,IAAe,gBAAgB,GAA/B,MAAe,gBAAiB,SAAQ,oBAAU;CAGxD,CAAA;AAFC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;4CACpB;AAFS,gBAAgB;IAFrC,IAAA,gBAAM,EAAC,kBAAkB,CAAC,CAAC,kCAAkC;;IAC7D,IAAA,0BAAgB,EAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;GAC1C,gBAAgB,CAGrC;AAHqB,4CAAgB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm'
|
|
2
|
-
import { BaseConfigEntity } from './BaseConfigEntity'
|
|
3
|
-
import { ConnectionTypeEnum, IBasicConnection } from '../../types'
|
|
4
|
-
import { IdentityEntity } from './IdentityEntity'
|
|
5
|
-
export declare class ConnectionEntity extends BaseEntity {
|
|
6
|
-
id: string
|
|
7
|
-
type: ConnectionTypeEnum
|
|
8
|
-
config: BaseConfigEntity
|
|
9
|
-
identity: IdentityEntity
|
|
10
|
-
}
|
|
11
|
-
export declare const connectionEntityFrom: (connection: IBasicConnection) => ConnectionEntity
|
|
12
|
-
//# sourceMappingURL=ConnectionEntity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/contact/ConnectionEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgE,UAAU,EAAE,MAAM,SAAS,CAAA;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAyB,kBAAkB,EAAE,gBAAgB,EAAiC,MAAM,aAAa,CAAA;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAIjD,qBACa,gBAAiB,SAAQ,UAAU;IAE9C,EAAE,EAAG,MAAM,CAAA;IAGX,IAAI,EAAG,kBAAkB,CAAA;IAQzB,MAAM,EAAG,gBAAgB,CAAA;IAMzB,QAAQ,EAAG,cAAc,CAAA;CAC1B;AAED,eAAO,MAAM,oBAAoB,eAAgB,gBAAgB,KAAG,gBAMnE,CAAA"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
var __decorate =
|
|
3
|
-
(this && this.__decorate) ||
|
|
4
|
-
function (decorators, target, key, desc) {
|
|
5
|
-
var c = arguments.length,
|
|
6
|
-
r = c < 3 ? target : desc === null ? (desc = Object.getOwnPropertyDescriptor(target, key)) : desc,
|
|
7
|
-
d
|
|
8
|
-
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc)
|
|
9
|
-
else
|
|
10
|
-
for (var i = decorators.length - 1; i >= 0; i--) if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r
|
|
11
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r
|
|
12
|
-
}
|
|
13
|
-
var __metadata =
|
|
14
|
-
(this && this.__metadata) ||
|
|
15
|
-
function (k, v) {
|
|
16
|
-
if (typeof Reflect === 'object' && typeof Reflect.metadata === 'function') return Reflect.metadata(k, v)
|
|
17
|
-
}
|
|
18
|
-
Object.defineProperty(exports, '__esModule', { value: true })
|
|
19
|
-
exports.connectionEntityFrom = exports.ConnectionEntity = void 0
|
|
20
|
-
const typeorm_1 = require('typeorm')
|
|
21
|
-
const BaseConfigEntity_1 = require('./BaseConfigEntity')
|
|
22
|
-
const types_1 = require('../../types')
|
|
23
|
-
const IdentityEntity_1 = require('./IdentityEntity')
|
|
24
|
-
const OpenIdConfigEntity_1 = require('./OpenIdConfigEntity')
|
|
25
|
-
const DidAuthConfigEntity_1 = require('./DidAuthConfigEntity')
|
|
26
|
-
let ConnectionEntity = class ConnectionEntity extends typeorm_1.BaseEntity {}
|
|
27
|
-
__decorate([(0, typeorm_1.PrimaryGeneratedColumn)('uuid'), __metadata('design:type', String)], ConnectionEntity.prototype, 'id', void 0)
|
|
28
|
-
__decorate(
|
|
29
|
-
[(0, typeorm_1.Column)('simple-enum', { name: 'type', enum: types_1.ConnectionTypeEnum, nullable: false }), __metadata('design:type', String)],
|
|
30
|
-
ConnectionEntity.prototype,
|
|
31
|
-
'type',
|
|
32
|
-
void 0
|
|
33
|
-
)
|
|
34
|
-
__decorate(
|
|
35
|
-
[
|
|
36
|
-
(0, typeorm_1.OneToOne)(
|
|
37
|
-
() => BaseConfigEntity_1.BaseConfigEntity,
|
|
38
|
-
(config) => config.connection,
|
|
39
|
-
{
|
|
40
|
-
cascade: true,
|
|
41
|
-
onDelete: 'CASCADE',
|
|
42
|
-
eager: true,
|
|
43
|
-
nullable: false,
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
__metadata('design:type', BaseConfigEntity_1.BaseConfigEntity),
|
|
47
|
-
],
|
|
48
|
-
ConnectionEntity.prototype,
|
|
49
|
-
'config',
|
|
50
|
-
void 0
|
|
51
|
-
)
|
|
52
|
-
__decorate(
|
|
53
|
-
[
|
|
54
|
-
(0, typeorm_1.OneToOne)(
|
|
55
|
-
() => IdentityEntity_1.IdentityEntity,
|
|
56
|
-
(identity) => identity.connection,
|
|
57
|
-
{
|
|
58
|
-
onDelete: 'CASCADE',
|
|
59
|
-
}
|
|
60
|
-
),
|
|
61
|
-
(0, typeorm_1.JoinColumn)({ name: 'identityId' }),
|
|
62
|
-
__metadata('design:type', IdentityEntity_1.IdentityEntity),
|
|
63
|
-
],
|
|
64
|
-
ConnectionEntity.prototype,
|
|
65
|
-
'identity',
|
|
66
|
-
void 0
|
|
67
|
-
)
|
|
68
|
-
ConnectionEntity = __decorate([(0, typeorm_1.Entity)('Connection')], ConnectionEntity)
|
|
69
|
-
exports.ConnectionEntity = ConnectionEntity
|
|
70
|
-
const connectionEntityFrom = (connection) => {
|
|
71
|
-
const connectionEntity = new ConnectionEntity()
|
|
72
|
-
connectionEntity.type = connection.type
|
|
73
|
-
connectionEntity.config = configEntityFrom(connection.type, connection.config)
|
|
74
|
-
return connectionEntity
|
|
75
|
-
}
|
|
76
|
-
exports.connectionEntityFrom = connectionEntityFrom
|
|
77
|
-
const configEntityFrom = (type, config) => {
|
|
78
|
-
switch (type) {
|
|
79
|
-
case types_1.ConnectionTypeEnum.OPENID_CONNECT:
|
|
80
|
-
return (0, OpenIdConfigEntity_1.openIdConfigEntityFrom)(config)
|
|
81
|
-
case types_1.ConnectionTypeEnum.SIOPv2:
|
|
82
|
-
return (0, DidAuthConfigEntity_1.didAuthConfigEntityFrom)(config)
|
|
83
|
-
default:
|
|
84
|
-
throw new Error('Connection type not supported')
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=ConnectionEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/ConnectionEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAkG;AAClG,yDAAqD;AACrD,uCAAwH;AACxH,qDAAiD;AACjD,6DAAiF;AACjF,+DAAoF;AAG7E,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,oBAAU;CAoB/C,CAAA;AAnBC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;4CACpB;AAEX;IAAC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,0BAAkB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;8CAC1D;AAEzB;IAAC,IAAA,k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