@sphereon/ssi-sdk.data-store 0.23.5-unstable.14 → 0.23.5-unstable.18
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/migrations/postgres/1690925872592-CreateContacts.d.ts.map +1 -1
- package/dist/migrations/postgres/1690925872592-CreateContacts.js +2 -1
- package/dist/migrations/postgres/1690925872592-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts.map +1 -1
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js +2 -1
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/contact.store.test.ts +3 -3
- package/src/migrations/postgres/1690925872592-CreateContacts.ts +4 -1
- package/src/migrations/sqlite/1690925872693-CreateContacts.ts +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1690925872592-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/1690925872592-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAGzD,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"1690925872592-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/1690925872592-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAGzD,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA6F3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI3D"}
|
|
@@ -55,7 +55,8 @@ class CreateContacts1690925872592 {
|
|
|
55
55
|
yield queryRunner.query(`ALTER TABLE "Identity" RENAME CONSTRAINT "UQ_Identity_Alias" TO "UQ_Identity_alias"`);
|
|
56
56
|
yield queryRunner.query(`INSERT INTO "BaseConfig"("id", "identifier", "redirect_url", "session_id", "client_id", "client_secret", "scopes", "issuer", "dangerously_allow_insecure_http_requests", "client_auth_method", "type", "connection_id") SELECT "id", "identifier", "redirect_url", "session_id", "client_id", "client_secret", "scopes", "issuer", "dangerously_allow_insecure_http_requests", "client_auth_method", "type", "connectionId" FROM "BaseConfigEntity"`);
|
|
57
57
|
yield queryRunner.query(`DROP TABLE "BaseConfigEntity"`);
|
|
58
|
-
yield queryRunner.query(`INSERT INTO "PartyType"(id, type, name, description, tenant_id, created_at, last_updated_at) VALUES ('3875c12e-fdaa-4ef6-a340-c936e054b627', 'organization', '
|
|
58
|
+
yield queryRunner.query(`INSERT INTO "PartyType"(id, type, origin, name, description, tenant_id, created_at, last_updated_at) VALUES ('3875c12e-fdaa-4ef6-a340-c936e054b627', 'organization', 'internal' 'Sphereon_default_organization_type', 'sphereon_default_organization', '95e09cfc-c974-4174-86aa-7bf1d5251fb4', now(), now())`);
|
|
59
|
+
yield queryRunner.query(`INSERT INTO "PartyType"(id, type, origin, name, description, tenant_id, created_at, last_updated_at) VALUES ('7d248798-41ca-4fc1-a130-9934b43d532e', 'naturalPerson', 'internal', 'Sphereon_default_natural_person_type', 'sphereon_default_natural_person', '95e09cfc-c974-4174-86aa-7bf1d5251fb4', now(), now())`);
|
|
59
60
|
yield queryRunner.query(`INSERT INTO "Party"(id, uri, created_at, last_updated_at, party_type_id) SELECT id, uri, created_at, last_updated_at, '3875c12e-fdaa-4ef6-a340-c936e054b627' FROM "Contact"`);
|
|
60
61
|
yield queryRunner.query(`INSERT INTO "BaseContact"(id, legal_name, display_name, party_id, created_at, last_updated_at, type) SELECT id, name, alias, id, created_at, last_updated_at, 'Organization' FROM "Contact"`);
|
|
61
62
|
yield queryRunner.query(`DROP TABLE "Contact"`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1690925872592-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1690925872592-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,yDAAoE;AAEpE,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"1690925872592-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1690925872592-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,yDAAoE;AAEpE,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;IAmGtC,CAAC;IAjGc,EAAE,CAAC,WAAwB;;YACtC,MAAM,IAAA,0CAA2B,EAAC,WAAW,CAAC,CAAA;YAC9C,MAAM,WAAW,CAAC,KAAK,CAAC,2FAA2F,CAAC,CAAA;YACpH,MAAM,WAAW,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAA;YAC1G,MAAM,WAAW,CAAC,KAAK,CAAC,gEAAgE,CAAC,CAAA;YACzF,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAA;YAC9F,MAAM,WAAW,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAA;YAC1G,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAA;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,qFAAqF,CAAC,CAAA;YAC9G,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAA;YACvG,MAAM,WAAW,CAAC,KAAK,CACrB,ggBAAggB,CACjgB,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,yFAAyF,CAAC,CAAA;YAClH,MAAM,WAAW,CAAC,KAAK,CACrB,0kBAA0kB,CAC3kB,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAA;YAC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,qFAAqF,CAAC,CAAA;YAC9G,MAAM,WAAW,CAAC,KAAK,CACrB,qbAAqb,CACtb,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;YACxD,MAAM,WAAW,CAAC,KAAK,CACrB,8SAA8S,CAC/S,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,oTAAoT,CACrT,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,6KAA6K,CAC9K,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,6LAA6L,CAC9L,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAA;QACjD,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,kCAAkC;YAClC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;QACnF,CAAC;KAAA;CACF;AApGD,kEAoGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1690925872693-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/sqlite/1690925872693-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"1690925872693-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/sqlite/1690925872693-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAuJ3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI3D"}
|
|
@@ -88,7 +88,8 @@ class CreateContacts1690925872693 {
|
|
|
88
88
|
// migrate existing data
|
|
89
89
|
yield queryRunner.query(`INSERT INTO "BaseConfig"("id", "identifier", "redirect_url", "session_id", "client_id", "client_secret", "scopes", "issuer", "dangerously_allow_insecure_http_requests", "client_auth_method", "type", "connection_id") SELECT "id", "identifier", "redirect_url", "session_id", "client_id", "client_secret", "scopes", "issuer", "dangerously_allow_insecure_http_requests", "client_auth_method", "type", "connectionId" FROM "BaseConfigEntity"`);
|
|
90
90
|
yield queryRunner.query(`DROP TABLE "BaseConfigEntity"`);
|
|
91
|
-
yield queryRunner.query(`INSERT INTO "PartyType"(id, type, name, description, tenant_id, created_at, last_updated_at) VALUES ('3875c12e-fdaa-4ef6-a340-c936e054b627', 'organization', '
|
|
91
|
+
yield queryRunner.query(`INSERT INTO "PartyType"(id, type, origin, name, description, tenant_id, created_at, last_updated_at) VALUES ('3875c12e-fdaa-4ef6-a340-c936e054b627', 'organization', 'internal', 'Sphereon_default_organization_type', 'sphereon_default_organization', '95e09cfc-c974-4174-86aa-7bf1d5251fb4', datetime('now'), datetime('now'))`);
|
|
92
|
+
yield queryRunner.query(`INSERT INTO "PartyType"(id, type, origin, name, description, tenant_id, created_at, last_updated_at) VALUES ('7d248798-41ca-4fc1-a130-9934b43d532e', 'naturalPerson', 'internal', 'Sphereon_default_natural_person_type', 'sphereon_default_natural_person', '95e09cfc-c974-4174-86aa-7bf1d5251fb4', datetime('now'), datetime('now'))`);
|
|
92
93
|
yield queryRunner.query(`INSERT INTO "Party"(id, uri, created_at, last_updated_at, party_type_id) SELECT id, uri, created_at, last_updated_at, '3875c12e-fdaa-4ef6-a340-c936e054b627' FROM "Contact"`);
|
|
93
94
|
yield queryRunner.query(`INSERT INTO "BaseContact"(id, legal_name, display_name, party_id, created_at, last_updated_at, type) SELECT id, name, alias, id, created_at, last_updated_at, 'Organization' FROM "Contact"`);
|
|
94
95
|
yield queryRunner.query(`DROP TABLE "Contact"`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1690925872693-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/sqlite/1690925872693-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"1690925872693-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/sqlite/1690925872693-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;IA6JtC,CAAC;IA3Jc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,6VAA6V,CAC9V,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,8KAA8K,CAC/K,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAA;YAC7D,MAAM,WAAW,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAA;YAC1G,MAAM,WAAW,CAAC,KAAK,CACrB,4TAA4T,CAC7T,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,oMAAoM,CACrM,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;YAChD,MAAM,WAAW,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAA;YAChF,MAAM,WAAW,CAAC,KAAK,CACrB,8OAA8O,CAC/O,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,oHAAoH,CAAC,CAAA;YAC7I,MAAM,WAAW,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAA;YAClD,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAA;YACpF,MAAM,WAAW,CAAC,KAAK,CACrB,+VAA+V,C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IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;QACnF,CAAC;KAAA;CACF;AA9JD,kEA8JC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.data-store",
|
|
3
|
-
"version": "0.23.5-unstable.
|
|
3
|
+
"version": "0.23.5-unstable.18+79d7af15",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"typeorm-postgres:migration:run": "pnpm run typeorm -- migration:run -c migration-postgres"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@sphereon/ssi-sdk.core": "0.23.5-unstable.
|
|
17
|
-
"@sphereon/ssi-types": "0.23.5-unstable.
|
|
16
|
+
"@sphereon/ssi-sdk.core": "0.23.5-unstable.18+79d7af15",
|
|
17
|
+
"@sphereon/ssi-types": "0.23.5-unstable.18+79d7af15",
|
|
18
18
|
"@veramo/core": "4.2.0",
|
|
19
19
|
"@veramo/utils": "4.2.0",
|
|
20
20
|
"class-validator": "^0.14.0",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"PostgreSQL",
|
|
45
45
|
"Contact Store"
|
|
46
46
|
],
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "79d7af1573e83abb99900528136c13653bb809c0"
|
|
48
48
|
}
|
|
@@ -1734,15 +1734,15 @@ describe('Contact store tests', (): void => {
|
|
|
1734
1734
|
expect(resultPartyType).toBeDefined()
|
|
1735
1735
|
|
|
1736
1736
|
const includingMigrationPartyTypes: Array<PartyType> = await contactStore.getPartyTypes()
|
|
1737
|
-
// We are checking for
|
|
1738
|
-
expect(includingMigrationPartyTypes.length).toEqual(
|
|
1737
|
+
// We are checking for 3 types here as we include the ones from the migrations
|
|
1738
|
+
expect(includingMigrationPartyTypes.length).toEqual(3)
|
|
1739
1739
|
|
|
1740
1740
|
await contactStore.removePartyType({ partyTypeId: savedPartyType.id })
|
|
1741
1741
|
|
|
1742
1742
|
const result: Array<PartyType> = await contactStore.getPartyTypes()
|
|
1743
1743
|
|
|
1744
1744
|
expect(result).toBeDefined()
|
|
1745
|
-
expect(result.length).toEqual(
|
|
1745
|
+
expect(result.length).toEqual(2)
|
|
1746
1746
|
})
|
|
1747
1747
|
|
|
1748
1748
|
it('should throw error when removing party type attached to contact', async (): Promise<void> => {
|
|
@@ -83,7 +83,10 @@ export class CreateContacts1690925872592 implements MigrationInterface {
|
|
|
83
83
|
)
|
|
84
84
|
await queryRunner.query(`DROP TABLE "BaseConfigEntity"`)
|
|
85
85
|
await queryRunner.query(
|
|
86
|
-
`INSERT INTO "PartyType"(id, type, name, description, tenant_id, created_at, last_updated_at) VALUES ('3875c12e-fdaa-4ef6-a340-c936e054b627', 'organization', '
|
|
86
|
+
`INSERT INTO "PartyType"(id, type, origin, name, description, tenant_id, created_at, last_updated_at) VALUES ('3875c12e-fdaa-4ef6-a340-c936e054b627', 'organization', 'internal' 'Sphereon_default_organization_type', 'sphereon_default_organization', '95e09cfc-c974-4174-86aa-7bf1d5251fb4', now(), now())`,
|
|
87
|
+
)
|
|
88
|
+
await queryRunner.query(
|
|
89
|
+
`INSERT INTO "PartyType"(id, type, origin, name, description, tenant_id, created_at, last_updated_at) VALUES ('7d248798-41ca-4fc1-a130-9934b43d532e', 'naturalPerson', 'internal', 'Sphereon_default_natural_person_type', 'sphereon_default_natural_person', '95e09cfc-c974-4174-86aa-7bf1d5251fb4', now(), now())`,
|
|
87
90
|
)
|
|
88
91
|
await queryRunner.query(
|
|
89
92
|
`INSERT INTO "Party"(id, uri, created_at, last_updated_at, party_type_id) SELECT id, uri, created_at, last_updated_at, '3875c12e-fdaa-4ef6-a340-c936e054b627' FROM "Contact"`,
|
|
@@ -140,7 +140,10 @@ export class CreateContacts1690925872693 implements MigrationInterface {
|
|
|
140
140
|
)
|
|
141
141
|
await queryRunner.query(`DROP TABLE "BaseConfigEntity"`)
|
|
142
142
|
await queryRunner.query(
|
|
143
|
-
`INSERT INTO "PartyType"(id, type, name, description, tenant_id, created_at, last_updated_at) VALUES ('3875c12e-fdaa-4ef6-a340-c936e054b627', 'organization', '
|
|
143
|
+
`INSERT INTO "PartyType"(id, type, origin, name, description, tenant_id, created_at, last_updated_at) VALUES ('3875c12e-fdaa-4ef6-a340-c936e054b627', 'organization', 'internal', 'Sphereon_default_organization_type', 'sphereon_default_organization', '95e09cfc-c974-4174-86aa-7bf1d5251fb4', datetime('now'), datetime('now'))`,
|
|
144
|
+
)
|
|
145
|
+
await queryRunner.query(
|
|
146
|
+
`INSERT INTO "PartyType"(id, type, origin, name, description, tenant_id, created_at, last_updated_at) VALUES ('7d248798-41ca-4fc1-a130-9934b43d532e', 'naturalPerson', 'internal', 'Sphereon_default_natural_person_type', 'sphereon_default_natural_person', '95e09cfc-c974-4174-86aa-7bf1d5251fb4', datetime('now'), datetime('now'))`,
|
|
144
147
|
)
|
|
145
148
|
await queryRunner.query(
|
|
146
149
|
`INSERT INTO "Party"(id, uri, created_at, last_updated_at, party_type_id) SELECT id, uri, created_at, last_updated_at, '3875c12e-fdaa-4ef6-a340-c936e054b627' FROM "Contact"`,
|