@sphereon/ssi-sdk.data-store 0.19.1-next.24 → 0.19.1-unstable.65
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/entities/xstate/StateEntity.d.ts +14 -0
- package/dist/entities/xstate/StateEntity.d.ts.map +1 -0
- package/dist/entities/xstate/StateEntity.js +60 -0
- package/dist/entities/xstate/StateEntity.js.map +1 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/migrations/generic/7-CreateXStateStore.d.ts +7 -0
- package/dist/migrations/generic/7-CreateXStateStore.d.ts.map +1 -0
- package/dist/migrations/generic/7-CreateXStateStore.js +78 -0
- package/dist/migrations/generic/7-CreateXStateStore.js.map +1 -0
- package/dist/migrations/generic/index.d.ts +2 -0
- package/dist/migrations/generic/index.d.ts.map +1 -1
- package/dist/migrations/generic/index.js +4 -1
- package/dist/migrations/generic/index.js.map +1 -1
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +2 -1
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/postgres/1708797018115-CreateXStateStore.d.ts +7 -0
- package/dist/migrations/postgres/1708797018115-CreateXStateStore.d.ts.map +1 -0
- package/dist/migrations/postgres/1708797018115-CreateXStateStore.js +45 -0
- package/dist/migrations/postgres/1708797018115-CreateXStateStore.js.map +1 -0
- package/dist/migrations/sqlite/1708796002272-CreateXStateStore.d.ts +7 -0
- package/dist/migrations/sqlite/1708796002272-CreateXStateStore.d.ts.map +1 -0
- package/dist/migrations/sqlite/1708796002272-CreateXStateStore.js +42 -0
- package/dist/migrations/sqlite/1708796002272-CreateXStateStore.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/xstate/IAbstractXStateStore.d.ts +38 -0
- package/dist/types/xstate/IAbstractXStateStore.d.ts.map +1 -0
- package/dist/types/xstate/IAbstractXStateStore.js +3 -0
- package/dist/types/xstate/IAbstractXStateStore.js.map +1 -0
- package/dist/xstate/IAbstractXStateStore.d.ts +9 -0
- package/dist/xstate/IAbstractXStateStore.d.ts.map +1 -0
- package/dist/xstate/IAbstractXStateStore.js +7 -0
- package/dist/xstate/IAbstractXStateStore.js.map +1 -0
- package/dist/xstate/XStateStore.d.ts +17 -0
- package/dist/xstate/XStateStore.d.ts.map +1 -0
- package/dist/xstate/XStateStore.js +110 -0
- package/dist/xstate/XStateStore.js.map +1 -0
- package/package.json +4 -4
- package/src/__tests__/xstate.entities.test.ts +47 -0
- package/src/__tests__/xstate.store.test.ts +158 -0
- package/src/entities/xstate/StateEntity.ts +34 -0
- package/src/index.ts +9 -0
- package/src/migrations/generic/7-CreateXStateStore.ts +66 -0
- package/src/migrations/generic/index.ts +3 -0
- package/src/migrations/index.ts +1 -0
- package/src/migrations/postgres/1708797018115-CreateXStateStore.ts +29 -0
- package/src/migrations/sqlite/1708796002272-CreateXStateStore.ts +26 -0
- package/src/types/index.ts +1 -0
- package/src/types/xstate/IAbstractXStateStore.ts +39 -0
- package/src/xstate/IAbstractXStateStore.ts +9 -0
- package/src/xstate/XStateStore.ts +107 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
export declare class StateEntity extends BaseEntity {
|
|
3
|
+
id: string;
|
|
4
|
+
stateName: string;
|
|
5
|
+
machineType: string;
|
|
6
|
+
xStateEventType: string;
|
|
7
|
+
state: string;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt: Date;
|
|
10
|
+
expiresAt?: Date;
|
|
11
|
+
completedAt?: Date;
|
|
12
|
+
tenantId?: string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=StateEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/xstate/StateEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA8E,MAAM,SAAS,CAAA;AAEhH,qBACa,WAAY,SAAQ,UAAU;IAEzC,EAAE,EAAG,MAAM,CAAA;IAGX,SAAS,EAAG,MAAM,CAAA;IAGlB,WAAW,EAAG,MAAM,CAAA;IAGpB,eAAe,EAAG,MAAM,CAAA;IAGxB,KAAK,EAAG,MAAM,CAAA;IAGd,SAAS,EAAG,IAAI,CAAA;IAGhB,SAAS,EAAG,IAAI,CAAA;IAGhB,SAAS,CAAC,EAAE,IAAI,CAAA;IAGhB,WAAW,CAAC,EAAE,IAAI,CAAA;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else 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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StateEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let StateEntity = class StateEntity extends typeorm_1.BaseEntity {
|
|
15
|
+
};
|
|
16
|
+
__decorate([
|
|
17
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid', { name: 'id' }),
|
|
18
|
+
__metadata("design:type", String)
|
|
19
|
+
], StateEntity.prototype, "id", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.Column)({ name: 'state_name', nullable: false }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], StateEntity.prototype, "stateName", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ name: 'machine_type', nullable: false }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], StateEntity.prototype, "machineType", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ name: 'xstate_event_type', nullable: false }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], StateEntity.prototype, "xStateEventType", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ name: 'state', nullable: false }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], StateEntity.prototype, "state", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
38
|
+
__metadata("design:type", Date)
|
|
39
|
+
], StateEntity.prototype, "createdAt", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', nullable: false }),
|
|
42
|
+
__metadata("design:type", Date)
|
|
43
|
+
], StateEntity.prototype, "updatedAt", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ name: 'expires_at', type: 'datetime', nullable: true }),
|
|
46
|
+
__metadata("design:type", Date)
|
|
47
|
+
], StateEntity.prototype, "expiresAt", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ name: 'completed_at', type: 'datetime', nullable: true }),
|
|
50
|
+
__metadata("design:type", Date)
|
|
51
|
+
], StateEntity.prototype, "completedAt", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ name: 'tenant_id', type: 'varchar', nullable: true }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], StateEntity.prototype, "tenantId", void 0);
|
|
56
|
+
StateEntity = __decorate([
|
|
57
|
+
(0, typeorm_1.Entity)('StateEntity')
|
|
58
|
+
], StateEntity);
|
|
59
|
+
exports.StateEntity = StateEntity;
|
|
60
|
+
//# sourceMappingURL=StateEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateEntity.js","sourceRoot":"","sources":["../../../src/entities/xstate/StateEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgH;AAGzG,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,oBAAU;CA8B1C,CAAA;AA7BC;IAAC,IAAA,gCAAsB,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;uCACpC;AAEX;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;8CAC9B;AAElB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;gDAC9B;AAEpB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;oDAC/B;AAExB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;0CAC7B;AAEd;IAAC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC9C,IAAI;8CAAA;AAEhB;IAAC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC9C,IAAI;8CAAA;AAEhB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACrD,IAAI;8CAAA;AAEhB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACrD,IAAI;gDAAA;AAElB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC9C;AA7BN,WAAW;IADvB,IAAA,gBAAM,EAAC,aAAa,CAAC;GACT,WAAW,CA8BvB;AA9BY,kCAAW"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { IssuerBrandingEntity, issuerBrandingEntityFrom } from './entities/issua
|
|
|
18
18
|
import { TextAttributesEntity, textAttributesEntityFrom } from './entities/issuanceBranding/TextAttributesEntity';
|
|
19
19
|
import { StatusListEntity } from './entities/statusList2021/StatusList2021Entity';
|
|
20
20
|
import { StatusListEntryEntity } from './entities/statusList2021/StatusList2021EntryEntity';
|
|
21
|
+
import { StateEntity } from './entities/xstate/StateEntity';
|
|
21
22
|
import { IStatusListEntity, IStatusListEntryEntity } from './types';
|
|
22
23
|
import { PartyRelationshipEntity } from './entities/contact/PartyRelationshipEntity';
|
|
23
24
|
import { PartyTypeEntity } from './entities/contact/PartyTypeEntity';
|
|
@@ -33,7 +34,9 @@ import { DigitalCredentialEntity } from './entities/digitalCredential/DigitalCre
|
|
|
33
34
|
import { digitalCredentialFrom, digitalCredentialsFrom, nonPersistedDigitalCredentialEntityFromAddArgs } from './utils/digitalCredential/MappingUtils';
|
|
34
35
|
export { AbstractEventLoggerStore } from './eventLogger/AbstractEventLoggerStore';
|
|
35
36
|
export { EventLoggerStore } from './eventLogger/EventLoggerStore';
|
|
36
|
-
export {
|
|
37
|
+
export { IAbstractXStateStore } from './xstate/IAbstractXStateStore';
|
|
38
|
+
export { XStateStore } from './xstate/XStateStore';
|
|
39
|
+
export { DataStoreMigrations, DataStoreEventLoggerMigrations, DataStoreContactMigrations, DataStoreIssuanceBrandingMigrations, DataStoreStatusListMigrations, DataStoreXStateStoreMigrations, } from './migrations';
|
|
37
40
|
export * from './types';
|
|
38
41
|
export * from './utils/contact/MappingUtils';
|
|
39
42
|
export declare const DataStoreContactEntities: (typeof CorrelationIdentifierEntity | typeof IdentityMetadataItemEntity | typeof PartyTypeEntity | typeof PartyEntity | typeof BaseContactEntity | typeof PartyRelationshipEntity | typeof ConnectionEntity | typeof BaseConfigEntity)[];
|
|
@@ -41,6 +44,7 @@ export declare const DataStoreIssuanceBrandingEntities: (typeof ImageDimensionsE
|
|
|
41
44
|
export declare const DataStoreStatusListEntities: (typeof StatusListEntryEntity | typeof StatusListEntity)[];
|
|
42
45
|
export declare const DataStoreEventLoggerEntities: (typeof AuditEventEntity)[];
|
|
43
46
|
export declare const DataStoreDigitalCredentialEntities: (typeof DigitalCredentialEntity)[];
|
|
44
|
-
export declare const
|
|
45
|
-
export
|
|
47
|
+
export declare const DataStoreXStateStoreEntities: (typeof StateEntity)[];
|
|
48
|
+
export declare const DataStoreEntities: (typeof StatusListEntryEntity | typeof StatusListEntity | typeof CorrelationIdentifierEntity | typeof IdentityMetadataItemEntity | typeof PartyTypeEntity | typeof PartyEntity | typeof BaseContactEntity | typeof PartyRelationshipEntity | typeof ConnectionEntity | typeof BaseConfigEntity | typeof ImageDimensionsEntity | typeof ImageAttributesEntity | typeof TextAttributesEntity | typeof BaseLocaleBrandingEntity | typeof CredentialBrandingEntity | typeof IssuerBrandingEntity | typeof StateEntity | typeof AuditEventEntity | typeof DigitalCredentialEntity)[];
|
|
49
|
+
export { BaseConfigEntity, ConnectionEntity, PartyEntity, CorrelationIdentifierEntity, DidAuthConfigEntity, IdentityEntity, IdentityMetadataItemEntity, OpenIdConfigEntity, BackgroundAttributesEntity, CredentialBrandingEntity, ImageAttributesEntity, ImageDimensionsEntity, BaseLocaleBrandingEntity, IssuerBrandingEntity, TextAttributesEntity, CredentialLocaleBrandingEntity, IssuerLocaleBrandingEntity, ElectronicAddressEntity, PhysicalAddressEntity, backgroundAttributesEntityFrom, credentialBrandingEntityFrom, imageAttributesEntityFrom, imageDimensionsEntityFrom, issuerBrandingEntityFrom, textAttributesEntityFrom, issuerLocaleBrandingEntityFrom, credentialLocaleBrandingEntityFrom, IStatusListEntity, IStatusListEntryEntity, StatusListEntity, StatusListEntryEntity, AuditEventEntity, auditEventEntityFrom, DigitalCredentialEntity, digitalCredentialFrom, digitalCredentialsFrom, nonPersistedDigitalCredentialEntityFromAddArgs, StateEntity, };
|
|
46
50
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAA;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAA;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAA;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAC1E,OAAO,EAAE,0BAA0B,EAAE,8BAA8B,EAAE,MAAM,wDAAwD,CAAA;AACnI,OAAO,EAAE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CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,EACnC,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,cAAc,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,8BAA8B,CAAA;AAE5C,eAAO,MAAM,wBAAwB,0OAgBpC,CAAA;AAED,eAAO,MAAM,iCAAiC,iMAU7C,CAAA;AAED,eAAO,MAAM,2BAA2B,4DAA4C,CAAA;AAEpF,eAAO,MAAM,4BAA4B,6BAAqB,CAAA;AAE9D,eAAO,MAAM,kCAAkC,oCAA4B,CAAA;AAE3E,eAAO,MAAM,4BAA4B,wBAAgB,CAAA;AAGzD,eAAO,MAAM,iBAAiB,ijBAO7B,CAAA;AAED,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,2BAA2B,EAC3B,mBAAmB,EACnB,cAAc,EACd,0BAA0B,EAC1B,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,8BAA8B,EAC9B,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,8BAA8B,EAC9B,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,8CAA8C,EAC9C,WAAW,GACZ,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.nonPersistedDigitalCredentialEntityFromAddArgs = exports.digitalCredentialsFrom = exports.digitalCredentialFrom = void 0;
|
|
17
|
+
exports.StatusListEntity = exports.credentialLocaleBrandingEntityFrom = exports.issuerLocaleBrandingEntityFrom = exports.textAttributesEntityFrom = exports.issuerBrandingEntityFrom = exports.imageDimensionsEntityFrom = exports.imageAttributesEntityFrom = exports.credentialBrandingEntityFrom = exports.backgroundAttributesEntityFrom = exports.PhysicalAddressEntity = exports.ElectronicAddressEntity = exports.IssuerLocaleBrandingEntity = exports.CredentialLocaleBrandingEntity = exports.TextAttributesEntity = exports.IssuerBrandingEntity = exports.BaseLocaleBrandingEntity = exports.ImageDimensionsEntity = exports.ImageAttributesEntity = exports.CredentialBrandingEntity = exports.BackgroundAttributesEntity = exports.OpenIdConfigEntity = exports.IdentityMetadataItemEntity = exports.IdentityEntity = exports.DidAuthConfigEntity = exports.CorrelationIdentifierEntity = exports.PartyEntity = exports.ConnectionEntity = exports.BaseConfigEntity = exports.DataStoreEntities = exports.DataStoreXStateStoreEntities = exports.DataStoreDigitalCredentialEntities = exports.DataStoreEventLoggerEntities = exports.DataStoreStatusListEntities = exports.DataStoreIssuanceBrandingEntities = exports.DataStoreContactEntities = exports.DataStoreXStateStoreMigrations = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreMigrations = exports.XStateStore = exports.IAbstractXStateStore = exports.EventLoggerStore = exports.AbstractEventLoggerStore = exports.StatusListStore = exports.IssuanceBrandingStore = exports.AbstractIssuanceBrandingStore = exports.AbstractContactStore = exports.ContactStore = void 0;
|
|
18
|
+
exports.StateEntity = exports.nonPersistedDigitalCredentialEntityFromAddArgs = exports.digitalCredentialsFrom = exports.digitalCredentialFrom = exports.DigitalCredentialEntity = exports.auditEventEntityFrom = exports.AuditEventEntity = exports.StatusListEntryEntity = void 0;
|
|
19
19
|
const BaseConfigEntity_1 = require("./entities/contact/BaseConfigEntity");
|
|
20
20
|
Object.defineProperty(exports, "BaseConfigEntity", { enumerable: true, get: function () { return BaseConfigEntity_1.BaseConfigEntity; } });
|
|
21
21
|
const BaseLocaleBrandingEntity_1 = require("./entities/issuanceBranding/BaseLocaleBrandingEntity");
|
|
@@ -63,6 +63,8 @@ const StatusList2021Entity_1 = require("./entities/statusList2021/StatusList2021
|
|
|
63
63
|
Object.defineProperty(exports, "StatusListEntity", { enumerable: true, get: function () { return StatusList2021Entity_1.StatusListEntity; } });
|
|
64
64
|
const StatusList2021EntryEntity_1 = require("./entities/statusList2021/StatusList2021EntryEntity");
|
|
65
65
|
Object.defineProperty(exports, "StatusListEntryEntity", { enumerable: true, get: function () { return StatusList2021EntryEntity_1.StatusListEntryEntity; } });
|
|
66
|
+
const StateEntity_1 = require("./entities/xstate/StateEntity");
|
|
67
|
+
Object.defineProperty(exports, "StateEntity", { enumerable: true, get: function () { return StateEntity_1.StateEntity; } });
|
|
66
68
|
const PartyRelationshipEntity_1 = require("./entities/contact/PartyRelationshipEntity");
|
|
67
69
|
const PartyTypeEntity_1 = require("./entities/contact/PartyTypeEntity");
|
|
68
70
|
const OrganizationEntity_1 = require("./entities/contact/OrganizationEntity");
|
|
@@ -94,12 +96,17 @@ var AbstractEventLoggerStore_1 = require("./eventLogger/AbstractEventLoggerStore
|
|
|
94
96
|
Object.defineProperty(exports, "AbstractEventLoggerStore", { enumerable: true, get: function () { return AbstractEventLoggerStore_1.AbstractEventLoggerStore; } });
|
|
95
97
|
var EventLoggerStore_1 = require("./eventLogger/EventLoggerStore");
|
|
96
98
|
Object.defineProperty(exports, "EventLoggerStore", { enumerable: true, get: function () { return EventLoggerStore_1.EventLoggerStore; } });
|
|
99
|
+
var IAbstractXStateStore_1 = require("./xstate/IAbstractXStateStore");
|
|
100
|
+
Object.defineProperty(exports, "IAbstractXStateStore", { enumerable: true, get: function () { return IAbstractXStateStore_1.IAbstractXStateStore; } });
|
|
101
|
+
var XStateStore_1 = require("./xstate/XStateStore");
|
|
102
|
+
Object.defineProperty(exports, "XStateStore", { enumerable: true, get: function () { return XStateStore_1.XStateStore; } });
|
|
97
103
|
var migrations_1 = require("./migrations");
|
|
98
104
|
Object.defineProperty(exports, "DataStoreMigrations", { enumerable: true, get: function () { return migrations_1.DataStoreMigrations; } });
|
|
99
105
|
Object.defineProperty(exports, "DataStoreEventLoggerMigrations", { enumerable: true, get: function () { return migrations_1.DataStoreEventLoggerMigrations; } });
|
|
100
106
|
Object.defineProperty(exports, "DataStoreContactMigrations", { enumerable: true, get: function () { return migrations_1.DataStoreContactMigrations; } });
|
|
101
107
|
Object.defineProperty(exports, "DataStoreIssuanceBrandingMigrations", { enumerable: true, get: function () { return migrations_1.DataStoreIssuanceBrandingMigrations; } });
|
|
102
108
|
Object.defineProperty(exports, "DataStoreStatusListMigrations", { enumerable: true, get: function () { return migrations_1.DataStoreStatusListMigrations; } });
|
|
109
|
+
Object.defineProperty(exports, "DataStoreXStateStoreMigrations", { enumerable: true, get: function () { return migrations_1.DataStoreXStateStoreMigrations; } });
|
|
103
110
|
__exportStar(require("./types"), exports);
|
|
104
111
|
__exportStar(require("./utils/contact/MappingUtils"), exports);
|
|
105
112
|
exports.DataStoreContactEntities = [
|
|
@@ -133,6 +140,7 @@ exports.DataStoreIssuanceBrandingEntities = [
|
|
|
133
140
|
exports.DataStoreStatusListEntities = [StatusList2021Entity_1.StatusListEntity, StatusList2021EntryEntity_1.StatusListEntryEntity];
|
|
134
141
|
exports.DataStoreEventLoggerEntities = [AuditEventEntity_1.AuditEventEntity];
|
|
135
142
|
exports.DataStoreDigitalCredentialEntities = [DigitalCredentialEntity_1.DigitalCredentialEntity];
|
|
143
|
+
exports.DataStoreXStateStoreEntities = [StateEntity_1.StateEntity];
|
|
136
144
|
// All entities combined if a party wants to enable them all at once
|
|
137
145
|
exports.DataStoreEntities = [
|
|
138
146
|
...exports.DataStoreContactEntities,
|
|
@@ -140,5 +148,6 @@ exports.DataStoreEntities = [
|
|
|
140
148
|
...exports.DataStoreStatusListEntities,
|
|
141
149
|
...exports.DataStoreEventLoggerEntities,
|
|
142
150
|
...exports.DataStoreDigitalCredentialEntities,
|
|
151
|
+
...exports.DataStoreXStateStoreEntities,
|
|
143
152
|
];
|
|
144
153
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0EAAsE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0EAAsE;AAqGpE,iGArGO,mCAAgB,OAqGP;AApGlB,mGAA+F;AAgH7F,yGAhHO,mDAAwB,OAgHP;AA/G1B,4EAAwE;AACxE,0EAAsE;AAmGpE,iGAnGO,mCAAgB,OAmGP;AAlGlB,gEAA4D;AAmG1D,4FAnGO,yBAAW,OAmGP;AAlGb,gGAA4F;AAmG1F,4GAnGO,yDAA2B,OAmGP;AAlG7B,gFAA4E;AAmG1E,oGAnGO,yCAAmB,OAmGP;AAlGrB,sEAAkE;AAmGhE,+FAnGO,+BAAc,OAmGP;AAlGhB,8FAA0F;AAmGxF,2GAnGO,uDAA0B,OAmGP;AAlG5B,8EAA0E;AAmGxE,mGAnGO,uCAAkB,OAmGP;AAlGpB,uGAAmI;AAmGjI,2GAnGO,uDAA0B,OAmGP;AAW1B,+GA9GmC,2DAA8B,OA8GnC;AA7GhC,mGAA6H;AAmG3H,yGAnGO,mDAAwB,OAmGP;AAWxB,6GA9GiC,uDAA4B,OA8GjC;AA7G9B,+GAA+I;AAwG7I,+GAxGO,+DAA8B,OAwGP;AAW9B,mHAnHuC,mEAAkC,OAmHvC;AAlH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
|
|
2
|
+
export declare class CreateXStateStore1708098041262 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=7-CreateXStateStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"7-CreateXStateStore.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/7-CreateXStateStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOvE,qBAAa,8BAA+B,YAAW,kBAAkB;IACvE,IAAI,SAAmC;IAE1B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA4B3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CA2B3D"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CreateXStateStore1708098041262 = void 0;
|
|
16
|
+
const debug_1 = __importDefault(require("debug"));
|
|
17
|
+
const _1708797018115_CreateXStateStore_1 = require("../postgres/1708797018115-CreateXStateStore");
|
|
18
|
+
const _1708796002272_CreateXStateStore_1 = require("../sqlite/1708796002272-CreateXStateStore");
|
|
19
|
+
const debug = (0, debug_1.default)('sphereon:ssi-sdk:migrations');
|
|
20
|
+
class CreateXStateStore1708098041262 {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.name = 'CreateXStateStore1708098041262';
|
|
23
|
+
}
|
|
24
|
+
up(queryRunner) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
debug('migration: creating contacts tables');
|
|
27
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
28
|
+
switch (dbType) {
|
|
29
|
+
case 'postgres': {
|
|
30
|
+
debug('using postgres migration file');
|
|
31
|
+
const mig = new _1708797018115_CreateXStateStore_1.CreateXStateStore1708797018115();
|
|
32
|
+
yield mig.up(queryRunner);
|
|
33
|
+
debug('Migration statements executed');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
case 'sqlite':
|
|
37
|
+
case 'expo':
|
|
38
|
+
case 'react-native': {
|
|
39
|
+
debug('using sqlite/react-native migration file');
|
|
40
|
+
const mig = new _1708796002272_CreateXStateStore_1.CreateXStateStore1708796002272();
|
|
41
|
+
yield mig.up(queryRunner);
|
|
42
|
+
debug('Migration statements executed');
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
default:
|
|
46
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
down(queryRunner) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
debug('migration: reverting contacts tables');
|
|
53
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
54
|
+
switch (dbType) {
|
|
55
|
+
case 'postgres': {
|
|
56
|
+
debug('using postgres migration file');
|
|
57
|
+
const mig = new _1708797018115_CreateXStateStore_1.CreateXStateStore1708797018115();
|
|
58
|
+
yield mig.down(queryRunner);
|
|
59
|
+
debug('Migration statements executed');
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
case 'sqlite':
|
|
63
|
+
case 'expo':
|
|
64
|
+
case 'react-native': {
|
|
65
|
+
debug('using sqlite/react-native migration file');
|
|
66
|
+
const mig = new _1708796002272_CreateXStateStore_1.CreateXStateStore1708796002272();
|
|
67
|
+
yield mig.down(queryRunner);
|
|
68
|
+
debug('Migration statements executed');
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
default:
|
|
72
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.CreateXStateStore1708098041262 = CreateXStateStore1708098041262;
|
|
78
|
+
//# sourceMappingURL=7-CreateXStateStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"7-CreateXStateStore.js","sourceRoot":"","sources":["../../../src/migrations/generic/7-CreateXStateStore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,kGAA4F;AAC5F,gGAA0F;AAE1F,MAAM,KAAK,GAAmB,IAAA,eAAK,EAAC,6BAA6B,CAAC,CAAA;AAElE,MAAa,8BAA8B;IAA3C;QACE,SAAI,GAAG,gCAAgC,CAAA;IAyDzC,CAAC;IAvDc,EAAE,CAAC,WAAwB;;YACtC,KAAK,CAAC,qCAAqC,CAAC,CAAA;YAC5C,MAAM,MAAM,GAAiB,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA;YAEvE,QAAQ,MAAM,EAAE;gBACd,KAA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,CAAC,WAAW,CAAC,CAAA;oBAC3B,KAAK,CAAC,+BAA+B,CAAC,CAAA;oBACtC,OAAM;iBACP;gBACD;oBACE,OAAO,OAAO,CAAC,MAAM,CACnB,4FAA4F,MAAM,+GAA+G,CAClN,CAAA;aACJ;QACH,CAAC;KAAA;CACF;AA1DD,wEA0DC"}
|
|
@@ -3,6 +3,7 @@ import { CreateIssuanceBranding1659463079429 } from './2-CreateIssuanceBranding'
|
|
|
3
3
|
import { CreateStatusList1693866470000 } from './4-CreateStatusList';
|
|
4
4
|
import { CreateAuditEvents1701635835330 } from './5-CreateAuditEvents';
|
|
5
5
|
import { CreateDigitalCredential1708525189000 } from './6-CreateDigitalCredential';
|
|
6
|
+
import { CreateXStateStore1708098041262 } from './7-CreateXStateStore';
|
|
6
7
|
/**
|
|
7
8
|
* The migrations array that SHOULD be used when initializing a TypeORM database connection.
|
|
8
9
|
*
|
|
@@ -15,5 +16,6 @@ export declare const DataStoreIssuanceBrandingMigrations: (typeof CreateIssuance
|
|
|
15
16
|
export declare const DataStoreStatusListMigrations: (typeof CreateStatusList1693866470000)[];
|
|
16
17
|
export declare const DataStoreEventLoggerMigrations: (typeof CreateAuditEvents1701635835330)[];
|
|
17
18
|
export declare const DataStoreDigitalCredentialMigrations: (typeof CreateDigitalCredential1708525189000)[];
|
|
19
|
+
export declare const DataStoreXStateStoreMigrations: (typeof CreateXStateStore1708098041262)[];
|
|
18
20
|
export declare const DataStoreMigrations: (typeof CreateContacts1659463079429)[];
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAA;AAEhF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAA;AAEhF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAA;AAClF,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAA;AAEtE;;;;;;GAMG;AAGH,eAAO,MAAM,0BAA0B,wCAA6D,CAAA;AACpG,eAAO,MAAM,mCAAmC,gDAAwC,CAAA;AACxF,eAAO,MAAM,6BAA6B,0CAAkC,CAAA;AAC5E,eAAO,MAAM,8BAA8B,2CAAmC,CAAA;AAC9E,eAAO,MAAM,oCAAoC,iDAAyC,CAAA;AAC1F,eAAO,MAAM,8BAA8B,2CAAmC,CAAA;AAG9E,eAAO,MAAM,mBAAmB,wCAO/B,CAAA"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataStoreMigrations = exports.DataStoreDigitalCredentialMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = void 0;
|
|
3
|
+
exports.DataStoreMigrations = exports.DataStoreXStateStoreMigrations = exports.DataStoreDigitalCredentialMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = void 0;
|
|
4
4
|
const _1_CreateContacts_1 = require("./1-CreateContacts");
|
|
5
5
|
const _2_CreateIssuanceBranding_1 = require("./2-CreateIssuanceBranding");
|
|
6
6
|
const _3_CreateContacts_1 = require("./3-CreateContacts");
|
|
7
7
|
const _4_CreateStatusList_1 = require("./4-CreateStatusList");
|
|
8
8
|
const _5_CreateAuditEvents_1 = require("./5-CreateAuditEvents");
|
|
9
9
|
const _6_CreateDigitalCredential_1 = require("./6-CreateDigitalCredential");
|
|
10
|
+
const _7_CreateXStateStore_1 = require("./7-CreateXStateStore");
|
|
10
11
|
/**
|
|
11
12
|
* The migrations array that SHOULD be used when initializing a TypeORM database connection.
|
|
12
13
|
*
|
|
@@ -20,6 +21,7 @@ exports.DataStoreIssuanceBrandingMigrations = [_2_CreateIssuanceBranding_1.Creat
|
|
|
20
21
|
exports.DataStoreStatusListMigrations = [_4_CreateStatusList_1.CreateStatusList1693866470000];
|
|
21
22
|
exports.DataStoreEventLoggerMigrations = [_5_CreateAuditEvents_1.CreateAuditEvents1701635835330];
|
|
22
23
|
exports.DataStoreDigitalCredentialMigrations = [_6_CreateDigitalCredential_1.CreateDigitalCredential1708525189000];
|
|
24
|
+
exports.DataStoreXStateStoreMigrations = [_7_CreateXStateStore_1.CreateXStateStore1708098041262];
|
|
23
25
|
// All migrations together
|
|
24
26
|
exports.DataStoreMigrations = [
|
|
25
27
|
...exports.DataStoreContactMigrations,
|
|
@@ -27,5 +29,6 @@ exports.DataStoreMigrations = [
|
|
|
27
29
|
...exports.DataStoreStatusListMigrations,
|
|
28
30
|
...exports.DataStoreEventLoggerMigrations,
|
|
29
31
|
...exports.DataStoreDigitalCredentialMigrations,
|
|
32
|
+
...exports.DataStoreXStateStoreMigrations,
|
|
30
33
|
];
|
|
31
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgE;AAChE,0EAAgF;AAChF,0DAAgE;AAChE,8DAAoE;AACpE,gEAAsE;AACtE,4EAAkF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgE;AAChE,0EAAgF;AAChF,0DAAgE;AAChE,8DAAoE;AACpE,gEAAsE;AACtE,4EAAkF;AAClF,gEAAsE;AAEtE;;;;;;GAMG;AAEH,yJAAyJ;AAC5I,QAAA,0BAA0B,GAAG,CAAC,+CAA2B,EAAE,+CAA2B,CAAC,CAAA;AACvF,QAAA,mCAAmC,GAAG,CAAC,+DAAmC,CAAC,CAAA;AAC3E,QAAA,6BAA6B,GAAG,CAAC,mDAA6B,CAAC,CAAA;AAC/D,QAAA,8BAA8B,GAAG,CAAC,qDAA8B,CAAC,CAAA;AACjE,QAAA,oCAAoC,GAAG,CAAC,iEAAoC,CAAC,CAAA;AAC7E,QAAA,8BAA8B,GAAG,CAAC,qDAA8B,CAAC,CAAA;AAE9E,0BAA0B;AACb,QAAA,mBAAmB,GAAG;IACjC,GAAG,kCAA0B;IAC7B,GAAG,2CAAmC;IACtC,GAAG,qCAA6B;IAChC,GAAG,sCAA8B;IACjC,GAAG,4CAAoC;IACvC,GAAG,sCAA8B;CAClC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DataStoreMigrations, DataStoreEventLoggerMigrations, DataStoreContactMigrations, DataStoreIssuanceBrandingMigrations, DataStoreStatusListMigrations, DataStoreDigitalCredentialMigrations, } from './generic';
|
|
1
|
+
export { DataStoreMigrations, DataStoreEventLoggerMigrations, DataStoreContactMigrations, DataStoreIssuanceBrandingMigrations, DataStoreStatusListMigrations, DataStoreDigitalCredentialMigrations, DataStoreXStateStoreMigrations, } from './generic';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,EACnC,6BAA6B,EAC7B,oCAAoC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,EACnC,6BAA6B,EAC7B,oCAAoC,EACpC,8BAA8B,GAC/B,MAAM,WAAW,CAAA"}
|
package/dist/migrations/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataStoreDigitalCredentialMigrations = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreMigrations = void 0;
|
|
3
|
+
exports.DataStoreXStateStoreMigrations = exports.DataStoreDigitalCredentialMigrations = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreMigrations = void 0;
|
|
4
4
|
var generic_1 = require("./generic");
|
|
5
5
|
Object.defineProperty(exports, "DataStoreMigrations", { enumerable: true, get: function () { return generic_1.DataStoreMigrations; } });
|
|
6
6
|
Object.defineProperty(exports, "DataStoreEventLoggerMigrations", { enumerable: true, get: function () { return generic_1.DataStoreEventLoggerMigrations; } });
|
|
@@ -8,4 +8,5 @@ Object.defineProperty(exports, "DataStoreContactMigrations", { enumerable: true,
|
|
|
8
8
|
Object.defineProperty(exports, "DataStoreIssuanceBrandingMigrations", { enumerable: true, get: function () { return generic_1.DataStoreIssuanceBrandingMigrations; } });
|
|
9
9
|
Object.defineProperty(exports, "DataStoreStatusListMigrations", { enumerable: true, get: function () { return generic_1.DataStoreStatusListMigrations; } });
|
|
10
10
|
Object.defineProperty(exports, "DataStoreDigitalCredentialMigrations", { enumerable: true, get: function () { return generic_1.DataStoreDigitalCredentialMigrations; } });
|
|
11
|
+
Object.defineProperty(exports, "DataStoreXStateStoreMigrations", { enumerable: true, get: function () { return generic_1.DataStoreXStateStoreMigrations; } });
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,qCAQkB;AAPhB,8GAAA,mBAAmB,OAAA;AACnB,yHAAA,8BAA8B,OAAA;AAC9B,qHAAA,0BAA0B,OAAA;AAC1B,8HAAA,mCAAmC,OAAA;AACnC,wHAAA,6BAA6B,OAAA;AAC7B,+HAAA,oCAAoC,OAAA;AACpC,yHAAA,8BAA8B,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateXStateStore1708797018115 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1708797018115-CreateXStateStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1708797018115-CreateXStateStore.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/1708797018115-CreateXStateStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,8BAA+B,YAAW,kBAAkB;IACvE,IAAI,SAAmC;IAE1B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateXStateStore1708797018115 = void 0;
|
|
13
|
+
const ssi_sdk_core_1 = require("@sphereon/ssi-sdk.core");
|
|
14
|
+
class CreateXStateStore1708797018115 {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.name = 'CreateXStateStore1708797018115';
|
|
17
|
+
}
|
|
18
|
+
up(queryRunner) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
yield (0, ssi_sdk_core_1.enablePostgresUuidExtension)(queryRunner);
|
|
21
|
+
yield queryRunner.query(`
|
|
22
|
+
CREATE TABLE "StateEntity" (
|
|
23
|
+
"id" uuid NOT NULL DEFAULT uuid_generate_v4(),
|
|
24
|
+
"state_name" character varying NOT NULL,
|
|
25
|
+
"machine_type" character varying NOT NULL,
|
|
26
|
+
"xstate_event_type" character varying NOT NULL,
|
|
27
|
+
"state" text NOT NULL,
|
|
28
|
+
"created_at" TIMESTAMP NOT NULL DEFAULT now(),
|
|
29
|
+
"updated_at" TIMESTAMP NOT NULL DEFAULT now(),
|
|
30
|
+
"expires_at" TIMESTAMP,
|
|
31
|
+
"completed_at" TIMESTAMP,
|
|
32
|
+
"tenant_id" character varying,
|
|
33
|
+
CONSTRAINT "PK_StateEntity_id" PRIMARY KEY ("id")
|
|
34
|
+
)
|
|
35
|
+
`);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
down(queryRunner) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
yield queryRunner.query(`DROP TABLE "StateEntity"`);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.CreateXStateStore1708797018115 = CreateXStateStore1708797018115;
|
|
45
|
+
//# sourceMappingURL=1708797018115-CreateXStateStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1708797018115-CreateXStateStore.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1708797018115-CreateXStateStore.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAoE;AAGpE,MAAa,8BAA8B;IAA3C;QACE,SAAI,GAAG,gCAAgC,CAAA;IAwBzC,CAAC;IAtBc,EAAE,CAAC,WAAwB;;YACtC,MAAM,IAAA,0CAA2B,EAAC,WAAW,CAAC,CAAA;YAC9C,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;;SAcnB,CAAC,CAAA;QACR,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,MAAM,WAAW,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAA;QACrD,CAAC;KAAA;CACF;AAzBD,wEAyBC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateXStateStore1708796002272 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1708796002272-CreateXStateStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1708796002272-CreateXStateStore.d.ts","sourceRoot":"","sources":["../../../src/migrations/sqlite/1708796002272-CreateXStateStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,8BAA+B,YAAW,kBAAkB;IACvE,IAAI,SAAmC;IAE1B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateXStateStore1708796002272 = void 0;
|
|
13
|
+
class CreateXStateStore1708796002272 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'CreateXStateStore1708796002272';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`
|
|
20
|
+
CREATE TABLE "StateEntity" (
|
|
21
|
+
"id" varchar PRIMARY KEY NOT NULL,
|
|
22
|
+
"state_name" varchar NOT NULL,
|
|
23
|
+
"machine_type" varchar NOT NULL,
|
|
24
|
+
"xstate_event_type" varchar NOT NULL,
|
|
25
|
+
"state" text NOT NULL,
|
|
26
|
+
"created_at" datetime NOT NULL DEFAULT (datetime('now')),
|
|
27
|
+
"updated_at" datetime NOT NULL DEFAULT (datetime('now')),
|
|
28
|
+
"expires_at" datetime,
|
|
29
|
+
"completed_at" datetime,
|
|
30
|
+
"tenant_id" varchar
|
|
31
|
+
)
|
|
32
|
+
`);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
down(queryRunner) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
yield queryRunner.query(`DROP TABLE "StateEntity"`);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.CreateXStateStore1708796002272 = CreateXStateStore1708796002272;
|
|
42
|
+
//# sourceMappingURL=1708796002272-CreateXStateStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1708796002272-CreateXStateStore.js","sourceRoot":"","sources":["../../../src/migrations/sqlite/1708796002272-CreateXStateStore.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,8BAA8B;IAA3C;QACE,SAAI,GAAG,gCAAgC,CAAA;IAsBzC,CAAC;IApBc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;SAanB,CAAC,CAAA;QACR,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,MAAM,WAAW,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAA;QACrD,CAAC;KAAA;CACF;AAvBD,wEAuBC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export * from './statusList/statusList';
|
|
|
7
7
|
export * from './statusList/IAbstractStatusListStore';
|
|
8
8
|
export * from './eventLogger/IAbstractEventLoggerStore';
|
|
9
9
|
export * from './eventLogger/eventLogger';
|
|
10
|
+
export * from './xstate/IAbstractXStateStore';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,mDAAmD,CAAA;AACjE,cAAc,mBAAmB,CAAA;AACjC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,uCAAuC,CAAA;AACrD,cAAc,yCAAyC,CAAA;AACvD,cAAc,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,mDAAmD,CAAA;AACjE,cAAc,mBAAmB,CAAA;AACjC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,uCAAuC,CAAA;AACrD,cAAc,yCAAyC,CAAA;AACvD,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA"}
|
package/dist/types/index.js
CHANGED
|
@@ -23,4 +23,5 @@ __exportStar(require("./statusList/statusList"), exports);
|
|
|
23
23
|
__exportStar(require("./statusList/IAbstractStatusListStore"), exports);
|
|
24
24
|
__exportStar(require("./eventLogger/IAbstractEventLoggerStore"), exports);
|
|
25
25
|
__exportStar(require("./eventLogger/eventLogger"), exports);
|
|
26
|
+
__exportStar(require("./xstate/IAbstractXStateStore"), exports);
|
|
26
27
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAmD;AACnD,oFAAiE;AACjE,oDAAiC;AACjC,kEAA+C;AAC/C,0DAAuC;AACvC,0DAAuC;AACvC,wEAAqD;AACrD,0EAAuD;AACvD,4DAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAmD;AACnD,oFAAiE;AACjE,oDAAiC;AACjC,kEAA+C;AAC/C,0DAAuC;AACvC,0DAAuC;AACvC,wEAAqD;AACrD,0EAAuD;AACvD,4DAAyC;AACzC,gEAA6C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type SaveStateArgs = Omit<State, 'id' | 'createdAt' | 'updatedAt'>;
|
|
2
|
+
export type GetActiveStateArgs = Pick<State, 'machineType' | 'tenantId'>;
|
|
3
|
+
export type FindStatesArgs = Array<Partial<Omit<State, 'state'>>>;
|
|
4
|
+
export type GetStatesArgs = {
|
|
5
|
+
filter: FindStatesArgs;
|
|
6
|
+
};
|
|
7
|
+
export type NonPersistedXStateStoreEvent = SaveStateArgs;
|
|
8
|
+
export type DeleteStateArgs = {
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
export type DeleteExpiredStateArgs = {
|
|
12
|
+
machineType?: string;
|
|
13
|
+
};
|
|
14
|
+
export type State = {
|
|
15
|
+
id: string;
|
|
16
|
+
/**
|
|
17
|
+
* value of the state's name. top level of event type. examples: acceptAgreement, enterPersonalDetails
|
|
18
|
+
*/
|
|
19
|
+
stateName: string;
|
|
20
|
+
/**
|
|
21
|
+
* Machine type/id
|
|
22
|
+
*/
|
|
23
|
+
machineType: string;
|
|
24
|
+
/**
|
|
25
|
+
* event types like SET_TOC, SET_FIRSTNAME, ...
|
|
26
|
+
*/
|
|
27
|
+
xStateEventType: string;
|
|
28
|
+
/**
|
|
29
|
+
* state of the machine in this snapshot
|
|
30
|
+
*/
|
|
31
|
+
state: unknown;
|
|
32
|
+
createdAt: Date;
|
|
33
|
+
expiresAt?: Date;
|
|
34
|
+
updatedAt: Date;
|
|
35
|
+
completedAt?: Date;
|
|
36
|
+
tenantId?: string;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=IAbstractXStateStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAbstractXStateStore.d.ts","sourceRoot":"","sources":["../../../src/types/xstate/IAbstractXStateStore.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,CAAC,CAAA;AAEzE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAAC,CAAA;AAExE,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;AAEjE,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,cAAc,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,aAAa,CAAA;AAExD,MAAM,MAAM,eAAe,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAC5C,MAAM,MAAM,sBAAsB,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7D,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,IAAI,CAAA;IACf,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,SAAS,EAAE,IAAI,CAAA;IACf,WAAW,CAAC,EAAE,IAAI,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
|