@decaf-ts/for-fabric 0.12.8 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/for-fabric.cjs +1 -1
- package/dist/for-fabric.cjs.map +1 -1
- package/dist/for-fabric.js +1 -1
- package/dist/for-fabric.js.map +1 -1
- package/lib/cjs/cli-module.cjs +109 -4
- package/lib/cjs/cli-module.cjs.map +1 -1
- package/lib/cjs/client/FabricClientAdapter.cjs +134 -63
- package/lib/cjs/client/FabricClientAdapter.cjs.map +1 -1
- package/lib/cjs/client/FabricClientContext.cjs +30 -0
- package/lib/cjs/client/FabricClientContext.cjs.map +1 -0
- package/lib/cjs/client/FabricClientDispatch.cjs +1 -1
- package/lib/cjs/client/FabricClientDispatch.cjs.map +1 -1
- package/lib/cjs/client/FabricClientRepository.cjs +1 -1
- package/lib/cjs/client/FabricClientRepository.cjs.map +1 -1
- package/lib/cjs/client/FabricClientStatement.cjs +3 -2
- package/lib/cjs/client/FabricClientStatement.cjs.map +1 -1
- package/lib/cjs/client/constants.cjs +1 -0
- package/lib/cjs/client/constants.cjs.map +1 -1
- package/lib/cjs/client/index.cjs +1 -0
- package/lib/cjs/client/index.cjs.map +1 -1
- package/lib/cjs/client/indexes/generation.cjs +1 -13
- package/lib/cjs/client/indexes/generation.cjs.map +1 -1
- package/lib/cjs/contract/models/Audit.cjs +1 -3
- package/lib/cjs/contract/models/Audit.cjs.map +1 -1
- package/lib/cjs/contract/models/History.cjs +2 -76
- package/lib/cjs/contract/models/History.cjs.map +1 -1
- package/lib/cjs/contract/models/OtherBatchShared.cjs +3 -238
- package/lib/cjs/contract/models/OtherBatchShared.cjs.map +1 -1
- package/lib/cjs/contract/models/OtherLeaflet.cjs +5 -117
- package/lib/cjs/contract/models/OtherLeaflet.cjs.map +1 -1
- package/lib/cjs/contract/models/OtherLeafletFile.cjs +2 -66
- package/lib/cjs/contract/models/OtherLeafletFile.cjs.map +1 -1
- package/lib/cjs/contract/models/OtherMarket.cjs +2 -85
- package/lib/cjs/contract/models/OtherMarket.cjs.map +1 -1
- package/lib/cjs/contract/models/OtherProduct.cjs +2 -78
- package/lib/cjs/contract/models/OtherProduct.cjs.map +1 -1
- package/lib/cjs/contract/models/OtherProductImage.cjs +2 -60
- package/lib/cjs/contract/models/OtherProductImage.cjs.map +1 -1
- package/lib/cjs/contract/models/OtherProductShared.cjs +2 -100
- package/lib/cjs/contract/models/OtherProductShared.cjs.map +1 -1
- package/lib/cjs/contract/models/OtherProductStrength.cjs +2 -86
- package/lib/cjs/contract/models/OtherProductStrength.cjs.map +1 -1
- package/lib/cjs/contract/models/ProductStrength.cjs.map +1 -1
- package/lib/cjs/contract/models/SegregatedDocument.cjs +0 -4
- package/lib/cjs/contract/models/SegregatedDocument.cjs.map +1 -1
- package/lib/cjs/contract/models/decorators.cjs +0 -3
- package/lib/cjs/contract/models/decorators.cjs.map +1 -1
- package/lib/cjs/contract/trackedModels/OtherBatchShared.cjs +129 -0
- package/lib/cjs/contract/trackedModels/OtherBatchShared.cjs.map +1 -0
- package/lib/cjs/contract/trackedModels/OtherProduct.cjs +1 -1
- package/lib/cjs/contract/trackedModels/OtherProduct.cjs.map +1 -1
- package/lib/cjs/contracts/ContractAdapter.cjs +39 -7
- package/lib/cjs/contracts/ContractAdapter.cjs.map +1 -1
- package/lib/cjs/contracts/MigrationContract.cjs +4 -5
- package/lib/cjs/contracts/MigrationContract.cjs.map +1 -1
- package/lib/cjs/contracts/crud/crud-contract.cjs +25 -21
- package/lib/cjs/contracts/crud/crud-contract.cjs.map +1 -1
- package/lib/cjs/shared/constants.cjs +4 -0
- package/lib/cjs/shared/constants.cjs.map +1 -1
- package/lib/cjs/shared/decorators.cjs +22 -1
- package/lib/cjs/shared/decorators.cjs.map +1 -1
- package/lib/cjs/shared/overrides/overrides.cjs +34 -0
- package/lib/cjs/shared/overrides/overrides.cjs.map +1 -1
- package/lib/cjs/version.cjs +16 -2
- package/lib/cjs/version.cjs.map +1 -1
- package/lib/esm/cli-module.js +109 -4
- package/lib/esm/cli-module.js.map +1 -1
- package/lib/esm/client/FabricClientAdapter.js +135 -64
- package/lib/esm/client/FabricClientAdapter.js.map +1 -1
- package/lib/esm/client/FabricClientContext.js +25 -0
- package/lib/esm/client/FabricClientContext.js.map +1 -0
- package/lib/esm/client/FabricClientDispatch.js +1 -1
- package/lib/esm/client/FabricClientDispatch.js.map +1 -1
- package/lib/esm/client/FabricClientRepository.js +1 -1
- package/lib/esm/client/FabricClientRepository.js.map +1 -1
- package/lib/esm/client/FabricClientStatement.js +3 -2
- package/lib/esm/client/FabricClientStatement.js.map +1 -1
- package/lib/esm/client/constants.js +1 -0
- package/lib/esm/client/constants.js.map +1 -1
- package/lib/esm/client/index.js +1 -0
- package/lib/esm/client/index.js.map +1 -1
- package/lib/esm/client/indexes/generation.js +1 -13
- package/lib/esm/client/indexes/generation.js.map +1 -1
- package/lib/esm/contract/index.js.map +1 -1
- package/lib/esm/contract/models/Audit.js +2 -4
- package/lib/esm/contract/models/Audit.js.map +1 -1
- package/lib/esm/contract/models/History.js +1 -71
- package/lib/esm/contract/models/History.js.map +1 -1
- package/lib/esm/contract/models/OtherBatchShared.js +1 -231
- package/lib/esm/contract/models/OtherBatchShared.js.map +1 -1
- package/lib/esm/contract/models/OtherLeaflet.js +2 -111
- package/lib/esm/contract/models/OtherLeaflet.js.map +1 -1
- package/lib/esm/contract/models/OtherLeafletFile.js +1 -61
- package/lib/esm/contract/models/OtherLeafletFile.js.map +1 -1
- package/lib/esm/contract/models/OtherMarket.js +1 -80
- package/lib/esm/contract/models/OtherMarket.js.map +1 -1
- package/lib/esm/contract/models/OtherProduct.js +1 -73
- package/lib/esm/contract/models/OtherProduct.js.map +1 -1
- package/lib/esm/contract/models/OtherProductImage.js +1 -55
- package/lib/esm/contract/models/OtherProductImage.js.map +1 -1
- package/lib/esm/contract/models/OtherProductShared.js +1 -95
- package/lib/esm/contract/models/OtherProductShared.js.map +1 -1
- package/lib/esm/contract/models/OtherProductStrength.js +1 -81
- package/lib/esm/contract/models/OtherProductStrength.js.map +1 -1
- package/lib/esm/contract/models/ProductStrength.js +1 -1
- package/lib/esm/contract/models/ProductStrength.js.map +1 -1
- package/lib/esm/contract/models/SegregatedDocument.js +1 -5
- package/lib/esm/contract/models/SegregatedDocument.js.map +1 -1
- package/lib/esm/contract/models/decorators.js +0 -3
- package/lib/esm/contract/models/decorators.js.map +1 -1
- package/lib/esm/contract/trackedModels/OtherBatchShared.js +120 -0
- package/lib/esm/contract/trackedModels/OtherBatchShared.js.map +1 -0
- package/lib/esm/contract/trackedModels/OtherProduct.js +2 -2
- package/lib/esm/contract/trackedModels/OtherProduct.js.map +1 -1
- package/lib/esm/contract/trackedModels/OtherProductStrength.js.map +1 -1
- package/lib/esm/contracts/ContractAdapter.js +40 -8
- package/lib/esm/contracts/ContractAdapter.js.map +1 -1
- package/lib/esm/contracts/FabricContractStatement.js.map +1 -1
- package/lib/esm/contracts/MigrationContract.js +4 -5
- package/lib/esm/contracts/MigrationContract.js.map +1 -1
- package/lib/esm/contracts/crud/crud-contract.js +27 -23
- package/lib/esm/contracts/crud/crud-contract.js.map +1 -1
- package/lib/esm/shared/constants.js +4 -0
- package/lib/esm/shared/constants.js.map +1 -1
- package/lib/esm/shared/decorators.js +17 -0
- package/lib/esm/shared/decorators.js.map +1 -1
- package/lib/esm/shared/overrides/overrides.js +35 -1
- package/lib/esm/shared/overrides/overrides.js.map +1 -1
- package/lib/esm/version.js +15 -1
- package/lib/esm/version.js.map +1 -1
- package/lib/types/client/FabricClientAdapter.d.cts +42 -33
- package/lib/types/client/FabricClientAdapter.d.mts +42 -33
- package/lib/types/client/FabricClientContext.d.cts +11 -0
- package/lib/types/client/FabricClientContext.d.mts +11 -0
- package/lib/types/client/FabricClientDispatch.d.cts +5 -5
- package/lib/types/client/FabricClientDispatch.d.mts +5 -5
- package/lib/types/client/FabricClientStatement.d.cts +6 -6
- package/lib/types/client/FabricClientStatement.d.mts +6 -6
- package/lib/types/client/index.d.cts +1 -0
- package/lib/types/client/index.d.mts +1 -0
- package/lib/types/client/types.d.cts +2 -0
- package/lib/types/client/types.d.mts +2 -0
- package/lib/types/contract/models/History.d.cts +1 -9
- package/lib/types/contract/models/History.d.mts +1 -9
- package/lib/types/contract/models/OtherBatchShared.d.cts +1 -55
- package/lib/types/contract/models/OtherBatchShared.d.mts +1 -55
- package/lib/types/contract/models/OtherLeaflet.d.cts +2 -16
- package/lib/types/contract/models/OtherLeaflet.d.mts +2 -16
- package/lib/types/contract/models/OtherLeafletFile.d.cts +1 -10
- package/lib/types/contract/models/OtherLeafletFile.d.mts +1 -10
- package/lib/types/contract/models/OtherMarket.d.cts +1 -13
- package/lib/types/contract/models/OtherMarket.d.mts +1 -13
- package/lib/types/contract/models/OtherProduct.d.cts +1 -12
- package/lib/types/contract/models/OtherProduct.d.mts +1 -12
- package/lib/types/contract/models/OtherProductImage.d.cts +1 -9
- package/lib/types/contract/models/OtherProductImage.d.mts +1 -9
- package/lib/types/contract/models/OtherProductShared.d.cts +1 -18
- package/lib/types/contract/models/OtherProductShared.d.mts +1 -18
- package/lib/types/contract/models/OtherProductStrength.d.cts +1 -12
- package/lib/types/contract/models/OtherProductStrength.d.mts +1 -12
- package/lib/types/contract/trackedModels/OtherBatchShared.d.cts +19 -0
- package/lib/types/contract/trackedModels/OtherBatchShared.d.mts +19 -0
- package/lib/types/contracts/ContractAdapter.d.cts +1 -0
- package/lib/types/contracts/ContractAdapter.d.mts +1 -0
- package/lib/types/contracts/FabricContractStatement.d.cts +2 -3
- package/lib/types/contracts/FabricContractStatement.d.mts +2 -3
- package/lib/types/contracts/MigrationContract.d.cts +1 -1
- package/lib/types/contracts/MigrationContract.d.mts +1 -1
- package/lib/types/contracts/crud/crud-contract.d.cts +3 -1
- package/lib/types/contracts/crud/crud-contract.d.mts +3 -1
- package/lib/types/contracts/types.d.cts +1 -0
- package/lib/types/contracts/types.d.mts +1 -0
- package/lib/types/shared/constants.d.cts +5 -1
- package/lib/types/shared/constants.d.mts +5 -1
- package/lib/types/shared/decorators.d.cts +9 -1
- package/lib/types/shared/decorators.d.mts +9 -1
- package/lib/types/shared/overrides/Model.d.cts +4 -0
- package/lib/types/shared/overrides/Model.d.mts +4 -0
- package/lib/types/version.d.cts +15 -1
- package/lib/types/version.d.mts +15 -1
- package/package.json +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Audit.js","sourceRoot":"","sources":["../../../../src/contract/models/Audit.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,KAAK,EAEL,QAAQ,EACR,IAAI,GACL,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,QAAQ,EACR,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,KAAK,EACL,EAAE,EACF,SAAS,EACT,MAAM,EACN,cAAc,EACd,KAAK,EACL,IAAI,GAEL,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,uBAAoB;AACxC,OAAO,EAAE,eAAe,EAAE,uBAAoB;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"Audit.js","sourceRoot":"","sources":["../../../../src/contract/models/Audit.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,KAAK,EAEL,QAAQ,EACR,IAAI,GACL,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,QAAQ,EACR,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,KAAK,EACL,EAAE,EACF,SAAS,EACT,MAAM,EACN,cAAc,EACd,KAAK,EACL,IAAI,GAEL,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,uBAAoB;AACxC,OAAO,EAAE,eAAe,EAAE,uBAAoB;AAC9C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,gCAA2B;AAElE,6DAA6D;AAC7D,SAAS,QAAQ,CAAC,CAAQ,EAAE,GAAG,IAAyB;IACtD,IAAI,CAAC;QACH,OAAO,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;IACtF,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QACpB,MAAM,IAAI,aAAa,CAAC,0CAA0C,CAAC,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC;AAWM,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,SAAS;IAkDlC,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;CACF,CAAA;AAhDC;IAJC,EAAE,EAAE;IACJ,IAAI,CAAC,QAAQ,CAAC;IACf,wCAAwC;;IACvC,WAAW,CAAC,wCAAwC,CAAC;;iCAC1C;AAMZ;IAJC,MAAM,EAAE;IACR,SAAS,EAAE;IACX,KAAK,CAAC,CAAC,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC/C,WAAW,CAAC,kDAAkD,CAAC;;qCAChD;AAOhB;IALC,MAAM,EAAE;IACR,QAAQ,EAAE;IACV,QAAQ,EAAE;IACV,KAAK,CAAC,CAAC,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC/C,WAAW,CAAC,qDAAqD,CAAC;;wCAChD;AAOnB;IALC,MAAM,EAAE;IACR,QAAQ,EAAE;IACV,QAAQ,EAAE;IACV,KAAK,CAAC,CAAC,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC/C,WAAW,CAAC,qCAAqC,CAAC;;oCACpC;AAOf;IALC,MAAM,EAAE;IACR,QAAQ,EAAE;IACV,QAAQ,EAAE;IACV,aAAa,EAAE;IACf,WAAW,CAAC,iDAAiD,CAAC;;0CAC1C;AAQrB;IANC,MAAM,EAAE;IACR,QAAQ,EAAE;IACV,QAAQ,EAAE;IACV,IAAI,CAAC,MAAM,CAAC;IACZ,KAAK,CAAC,CAAC,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC/C,WAAW,CAAC,uCAAuC,CAAC;;qCAC5B;AAQzB;IANC,MAAM,EAAE;IACR,QAAQ,EAAE;IACV,QAAQ,EAAE;IACV,SAAS,EAAE;IACX,IAAI,CAAC,MAAM,CAAC;IACZ,WAAW,CAAC,2BAA2B,CAAC;;oCACb;AAhDjB,KAAK;IATjB,WAAW,CAAC,2CAA2C,CAAC;IACxD,eAAe,CAAC;QACf,wBAAwB;QACxB,aAAa,CAAC,MAAM;QACpB,aAAa,CAAC,MAAM;KACrB,CAAC;IACD,IAAI,CAAC,aAAa,CAAC;IACnB,KAAK,CAAC,OAAO,CAAC;IACd,KAAK,EAAE;;GACK,KAAK,CAqDjB"}
|
|
@@ -1,72 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { Model, model, required, } from "@decaf-ts/decorator-validation";
|
|
11
|
-
import { column, index, OrderDirection, pk, table } from "@decaf-ts/core";
|
|
12
|
-
import { BlockOperations, composed, OperationKeys, readonly, } from "@decaf-ts/db-decorators";
|
|
13
|
-
import { description, uses } from "@decaf-ts/decoration";
|
|
14
|
-
import { FabricFlavour, mirror, NamespaceCollection, sharedData, } from "./../../shared/index.js";
|
|
15
|
-
let History = class History extends Model {
|
|
16
|
-
constructor(model) {
|
|
17
|
-
super(model);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
__decorate([
|
|
21
|
-
pk(),
|
|
22
|
-
mirror("ptp-history-mirror", "PharmaledgerassocMSP"),
|
|
23
|
-
composed(["table", "key", "version"], ":"),
|
|
24
|
-
description("Unique identifier of the history record."),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], History.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
column(),
|
|
29
|
-
readonly(),
|
|
30
|
-
readonly(),
|
|
31
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
32
|
-
description("table this history object refers to"),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], History.prototype, "table", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
column(),
|
|
37
|
-
required(),
|
|
38
|
-
readonly(),
|
|
39
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
40
|
-
description("id of the original object"),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], History.prototype, "key", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
column(),
|
|
45
|
-
required(),
|
|
46
|
-
readonly(),
|
|
47
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
48
|
-
description("the version of the original object"),
|
|
49
|
-
__metadata("design:type", Number)
|
|
50
|
-
], History.prototype, "version", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
column(),
|
|
53
|
-
required(),
|
|
54
|
-
readonly(),
|
|
55
|
-
description("the object to keep history of"),
|
|
56
|
-
__metadata("design:type", Object)
|
|
57
|
-
], History.prototype, "record", void 0);
|
|
58
|
-
History = __decorate([
|
|
59
|
-
description("Logs user activity for auditing purposes."),
|
|
60
|
-
uses(FabricFlavour),
|
|
61
|
-
BlockOperations([
|
|
62
|
-
OperationKeys.CREATE,
|
|
63
|
-
OperationKeys.UPDATE,
|
|
64
|
-
OperationKeys.DELETE,
|
|
65
|
-
]),
|
|
66
|
-
table("history"),
|
|
67
|
-
sharedData(NamespaceCollection("ptp-history")),
|
|
68
|
-
model(),
|
|
69
|
-
__metadata("design:paramtypes", [Object])
|
|
70
|
-
], History);
|
|
71
|
-
export { History };
|
|
1
|
+
export { History } from "./../trackedModels/History.js";
|
|
72
2
|
//# sourceMappingURL=History.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"History.js","sourceRoot":"","sources":["../../../../src/contract/models/History.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"History.js","sourceRoot":"","sources":["../../../../src/contract/models/History.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,sCAAiC"}
|
|
@@ -1,232 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { date, JSONSerializer, list, minlength, Model, model, ModelKeys, pattern, required, } from "@decaf-ts/decorator-validation";
|
|
11
|
-
import { column, Condition, defaultQueryAttr, index, OrderDirection, pk, table, } from "@decaf-ts/core";
|
|
12
|
-
import { BatchPattern, DatePattern } from "./constants.js";
|
|
13
|
-
import { BlockOperations, composed, OperationKeys, readonly, serialize, version, } from "@decaf-ts/db-decorators";
|
|
14
|
-
import { description, Metadata, uses } from "@decaf-ts/decoration";
|
|
15
|
-
import { BaseIdentifiedModel } from "./BaseIdentifiedModel.js";
|
|
16
|
-
import { audit } from "./decorators-private.js";
|
|
17
|
-
import { gtin } from "./gtin.js";
|
|
18
|
-
import { FabricFlavour, mirror, NamespaceCollection, ownedBy, sharedData, } from "./../../shared/index.js";
|
|
19
|
-
import { historyDec } from "./history-dec.js";
|
|
20
|
-
// import { historyDec } from "./history-dec";
|
|
21
|
-
export class ArraySerializer extends JSONSerializer {
|
|
22
|
-
constructor() {
|
|
23
|
-
super();
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @summary prepares the model for serialization
|
|
27
|
-
* @description returns a shallow copy of the object, containing an enumerable {@link ModelKeys#ANCHOR} property
|
|
28
|
-
* so the object can be recognized upon deserialization
|
|
29
|
-
*
|
|
30
|
-
* @param {any} value
|
|
31
|
-
* @protected
|
|
32
|
-
*/
|
|
33
|
-
preSerialize(value, ...args) {
|
|
34
|
-
return this.serializeValue(value, ...args);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @summary Rebuilds a model from a serialization
|
|
38
|
-
* @param {string} str
|
|
39
|
-
*
|
|
40
|
-
* @throws {Error} If it fails to parse the string, or to build the model
|
|
41
|
-
*/
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
43
|
-
deserialize(str, ...args) {
|
|
44
|
-
const deserialization = JSON.parse(str);
|
|
45
|
-
return this.rebuildValue(deserialization);
|
|
46
|
-
}
|
|
47
|
-
serializeValue(value, ...args) {
|
|
48
|
-
if (value === undefined || value === null)
|
|
49
|
-
return value;
|
|
50
|
-
if (typeof value !== "object")
|
|
51
|
-
return value;
|
|
52
|
-
if (value instanceof Date)
|
|
53
|
-
return value.toISOString();
|
|
54
|
-
if (Array.isArray(value)) {
|
|
55
|
-
return value.map((item) => this.serializeValue(item, ...args));
|
|
56
|
-
}
|
|
57
|
-
if (Model.isModel(value)) {
|
|
58
|
-
return this.serializeModel(value, ...args);
|
|
59
|
-
}
|
|
60
|
-
return this.serializePlain(value, ...args);
|
|
61
|
-
}
|
|
62
|
-
serializeModel(value, ...args) {
|
|
63
|
-
const serialized = this.serializePlain(value, ...args);
|
|
64
|
-
const metadata = this.getMetadata(value.constructor) ??
|
|
65
|
-
value.constructor?.name;
|
|
66
|
-
if (metadata)
|
|
67
|
-
serialized[ModelKeys.ANCHOR] = metadata;
|
|
68
|
-
return serialized;
|
|
69
|
-
}
|
|
70
|
-
serializePlain(value, ...args) {
|
|
71
|
-
const result = {};
|
|
72
|
-
for (const [key, child] of Object.entries(value)) {
|
|
73
|
-
result[key] = this.serializeValue(child, ...args);
|
|
74
|
-
}
|
|
75
|
-
return result;
|
|
76
|
-
}
|
|
77
|
-
getMetadata(constructor) {
|
|
78
|
-
try {
|
|
79
|
-
return Metadata.modelName(constructor);
|
|
80
|
-
}
|
|
81
|
-
catch {
|
|
82
|
-
return undefined;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
rebuildValue(value) {
|
|
86
|
-
if (value === null || typeof value !== "object")
|
|
87
|
-
return value;
|
|
88
|
-
if (Array.isArray(value)) {
|
|
89
|
-
return value.map((item) => this.rebuildValue(item));
|
|
90
|
-
}
|
|
91
|
-
const anchor = value[ModelKeys.ANCHOR];
|
|
92
|
-
const rebuilt = this.rebuildObject(value);
|
|
93
|
-
if (!anchor)
|
|
94
|
-
return rebuilt;
|
|
95
|
-
if (anchor === "??condition")
|
|
96
|
-
return Condition.from(rebuilt);
|
|
97
|
-
return Model.build(rebuilt, anchor);
|
|
98
|
-
}
|
|
99
|
-
rebuildObject(value) {
|
|
100
|
-
const result = {};
|
|
101
|
-
for (const [key, child] of Object.entries(value)) {
|
|
102
|
-
if (key === ModelKeys.ANCHOR)
|
|
103
|
-
continue;
|
|
104
|
-
result[key] = this.rebuildValue(child);
|
|
105
|
-
}
|
|
106
|
-
return result;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* @summary Serializes a model
|
|
110
|
-
* @param {T} model
|
|
111
|
-
*
|
|
112
|
-
* @throws {Error} if fails to serialize
|
|
113
|
-
*/
|
|
114
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
115
|
-
serialize(model, ...args) {
|
|
116
|
-
return JSON.stringify(this.preSerialize(model));
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
let ManufacturerAddress = class ManufacturerAddress extends Model {
|
|
120
|
-
constructor(arg) {
|
|
121
|
-
super(arg);
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
__decorate([
|
|
125
|
-
minlength(2),
|
|
126
|
-
__metadata("design:type", String)
|
|
127
|
-
], ManufacturerAddress.prototype, "address", void 0);
|
|
128
|
-
ManufacturerAddress = __decorate([
|
|
129
|
-
model(),
|
|
130
|
-
__metadata("design:paramtypes", [Object])
|
|
131
|
-
], ManufacturerAddress);
|
|
132
|
-
let OtherBatchShared = class OtherBatchShared extends BaseIdentifiedModel {
|
|
133
|
-
constructor(model) {
|
|
134
|
-
super(model);
|
|
135
|
-
this.batchRecall = false;
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
__decorate([
|
|
139
|
-
pk(),
|
|
140
|
-
audit(OtherBatchShared),
|
|
141
|
-
historyDec(),
|
|
142
|
-
mirror("mirror-collection", "PharmaledgerassocMSP"),
|
|
143
|
-
composed(["productCode", "batchNumber"], ":"),
|
|
144
|
-
description("Unique identifier composed of product code and batch number."),
|
|
145
|
-
__metadata("design:type", String)
|
|
146
|
-
], OtherBatchShared.prototype, "id", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
gtin(),
|
|
149
|
-
readonly()
|
|
150
|
-
// @manyToOne(
|
|
151
|
-
// () => Product,
|
|
152
|
-
// { update: Cascade.NONE, delete: Cascade.NONE },
|
|
153
|
-
// false
|
|
154
|
-
// )
|
|
155
|
-
,
|
|
156
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
157
|
-
description("Code of the product associated with this batch."),
|
|
158
|
-
defaultQueryAttr(),
|
|
159
|
-
__metadata("design:type", String)
|
|
160
|
-
], OtherBatchShared.prototype, "productCode", void 0);
|
|
161
|
-
__decorate([
|
|
162
|
-
column(),
|
|
163
|
-
readonly(),
|
|
164
|
-
pattern(BatchPattern),
|
|
165
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
166
|
-
description("Batch number assigned to the product."),
|
|
167
|
-
defaultQueryAttr(),
|
|
168
|
-
__metadata("design:type", String)
|
|
169
|
-
], OtherBatchShared.prototype, "batchNumber", void 0);
|
|
170
|
-
__decorate([
|
|
171
|
-
required(),
|
|
172
|
-
column(),
|
|
173
|
-
date("yyyy-MM-dd HH:mm:ss"),
|
|
174
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
175
|
-
description("Date when the batch expires."),
|
|
176
|
-
__metadata("design:type", Date)
|
|
177
|
-
], OtherBatchShared.prototype, "expiryDate", void 0);
|
|
178
|
-
__decorate([
|
|
179
|
-
column(),
|
|
180
|
-
description("Import license number for this batch."),
|
|
181
|
-
__metadata("design:type", String)
|
|
182
|
-
], OtherBatchShared.prototype, "importLicenseNumber", void 0);
|
|
183
|
-
__decorate([
|
|
184
|
-
column(),
|
|
185
|
-
description("Date when the batch was manufactured."),
|
|
186
|
-
date(DatePattern),
|
|
187
|
-
__metadata("design:type", Date)
|
|
188
|
-
], OtherBatchShared.prototype, "dateOfManufacturing", void 0);
|
|
189
|
-
__decorate([
|
|
190
|
-
column(),
|
|
191
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
192
|
-
description("Name of the product manufacturer."),
|
|
193
|
-
__metadata("design:type", String)
|
|
194
|
-
], OtherBatchShared.prototype, "manufacturerName", void 0);
|
|
195
|
-
__decorate([
|
|
196
|
-
serialize(ArraySerializer),
|
|
197
|
-
column(),
|
|
198
|
-
list(ManufacturerAddress),
|
|
199
|
-
description("Manufacturer address"),
|
|
200
|
-
__metadata("design:type", Array)
|
|
201
|
-
], OtherBatchShared.prototype, "manufacturerAddress", void 0);
|
|
202
|
-
__decorate([
|
|
203
|
-
column(),
|
|
204
|
-
description("Name of the site where the product was packaged."),
|
|
205
|
-
__metadata("design:type", String)
|
|
206
|
-
], OtherBatchShared.prototype, "packagingSiteName", void 0);
|
|
207
|
-
__decorate([
|
|
208
|
-
column(),
|
|
209
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
210
|
-
description("Indicates whether this batch has been recalled."),
|
|
211
|
-
__metadata("design:type", Boolean)
|
|
212
|
-
], OtherBatchShared.prototype, "batchRecall", void 0);
|
|
213
|
-
__decorate([
|
|
214
|
-
ownedBy(),
|
|
215
|
-
description("the owner (msp) of the batch"),
|
|
216
|
-
__metadata("design:type", String)
|
|
217
|
-
], OtherBatchShared.prototype, "owner", void 0);
|
|
218
|
-
__decorate([
|
|
219
|
-
version(),
|
|
220
|
-
__metadata("design:type", Number)
|
|
221
|
-
], OtherBatchShared.prototype, "version", void 0);
|
|
222
|
-
OtherBatchShared = __decorate([
|
|
223
|
-
sharedData(NamespaceCollection("decaf-namespace")),
|
|
224
|
-
description("Represents a product batch"),
|
|
225
|
-
uses(FabricFlavour),
|
|
226
|
-
BlockOperations([OperationKeys.DELETE]),
|
|
227
|
-
table("other_batch_shared"),
|
|
228
|
-
model(),
|
|
229
|
-
__metadata("design:paramtypes", [Object])
|
|
230
|
-
], OtherBatchShared);
|
|
231
|
-
export { OtherBatchShared };
|
|
1
|
+
export { OtherBatchShared } from "./../trackedModels/OtherBatchShared.js";
|
|
232
2
|
//# sourceMappingURL=OtherBatchShared.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtherBatchShared.js","sourceRoot":"","sources":["../../../../src/contract/models/OtherBatchShared.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OtherBatchShared.js","sourceRoot":"","sources":["../../../../src/contract/models/OtherBatchShared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+CAA0C"}
|
|
@@ -1,112 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { model, required } from "@decaf-ts/decorator-validation";
|
|
11
|
-
import { Cascade, column, defaultQueryAttr, index, oneToMany, oneToOne, OrderDirection, pk, table, } from "@decaf-ts/core";
|
|
12
|
-
import { composed, readonly } from "@decaf-ts/db-decorators";
|
|
13
|
-
import { description, uses } from "@decaf-ts/decoration";
|
|
14
|
-
import { BaseIdentifiedModel } from "./BaseIdentifiedModel.js";
|
|
15
|
-
import { FabricFlavour, mirror, NamespaceCollection, ownedBy, sharedData, } from "./../../shared/index.js";
|
|
16
|
-
import { audit } from "./decorators-private.js";
|
|
17
|
-
import { historyDec } from "./history-dec.js";
|
|
18
|
-
import { gtin } from "./gtin.js";
|
|
19
|
-
import { OtherLeafletFile } from "./OtherLeafletFile.js";
|
|
20
|
-
let Leaflet = class Leaflet extends BaseIdentifiedModel {
|
|
21
|
-
constructor(model) {
|
|
22
|
-
super(model);
|
|
23
|
-
this.leafletType = "leaflet";
|
|
24
|
-
}
|
|
25
|
-
compare(other, ...exceptions) {
|
|
26
|
-
return super.compare(other, ...[
|
|
27
|
-
...new Set([
|
|
28
|
-
exceptions,
|
|
29
|
-
"updatedAt",
|
|
30
|
-
"updatedBy",
|
|
31
|
-
"otherFilesContent",
|
|
32
|
-
"xmlFileContent",
|
|
33
|
-
]).values(),
|
|
34
|
-
]);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
__decorate([
|
|
38
|
-
pk(),
|
|
39
|
-
historyDec(),
|
|
40
|
-
mirror("mirror-collection", "PharmaledgerassocMSP"),
|
|
41
|
-
audit(Leaflet),
|
|
42
|
-
composed(["productCode", "batchNumber", "leafletType", "lang", "epiMarket"], ":", ["batchNumber", "epiMarket"]),
|
|
43
|
-
description("Unique identifier composed of product code, batch number, and language."),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], Leaflet.prototype, "id", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
gtin(),
|
|
48
|
-
column(),
|
|
49
|
-
required(),
|
|
50
|
-
readonly(),
|
|
51
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
52
|
-
description("GTIN code of the product associated with this leaflet."),
|
|
53
|
-
defaultQueryAttr(),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], Leaflet.prototype, "productCode", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
column(),
|
|
58
|
-
readonly(),
|
|
59
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
60
|
-
description("Batch number linked to the product, if applicable."),
|
|
61
|
-
defaultQueryAttr(),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], Leaflet.prototype, "batchNumber", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
column(),
|
|
66
|
-
required(),
|
|
67
|
-
readonly(),
|
|
68
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
69
|
-
description("Type category the leaflet belongs to."),
|
|
70
|
-
__metadata("design:type", String)
|
|
71
|
-
], Leaflet.prototype, "leafletType", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
column(),
|
|
74
|
-
required(),
|
|
75
|
-
readonly(),
|
|
76
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
77
|
-
description("Language code of the leaflet (e.g., 'en', 'pt', 'es')."),
|
|
78
|
-
__metadata("design:type", String)
|
|
79
|
-
], Leaflet.prototype, "lang", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
column(),
|
|
82
|
-
readonly(),
|
|
83
|
-
__metadata("design:type", String)
|
|
84
|
-
], Leaflet.prototype, "epiMarket", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
column(),
|
|
87
|
-
required(),
|
|
88
|
-
description("Main XML content of the electronic leaflet."),
|
|
89
|
-
oneToOne(() => OtherLeafletFile, { update: Cascade.CASCADE, delete: Cascade.CASCADE }, false),
|
|
90
|
-
description("file with the xml content of the leaflet"),
|
|
91
|
-
__metadata("design:type", Object)
|
|
92
|
-
], Leaflet.prototype, "xmlFileContent", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
oneToMany(() => OtherLeafletFile, { update: Cascade.CASCADE, delete: Cascade.CASCADE }, false),
|
|
95
|
-
description("List of additional files linked to the leaflet, such as PDFs or images."),
|
|
96
|
-
__metadata("design:type", Array)
|
|
97
|
-
], Leaflet.prototype, "otherFilesContent", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
ownedBy(),
|
|
100
|
-
description("the owner (msp) of the leaflet"),
|
|
101
|
-
__metadata("design:type", String)
|
|
102
|
-
], Leaflet.prototype, "owner", void 0);
|
|
103
|
-
Leaflet = __decorate([
|
|
104
|
-
description("Represents the ePI leaflet linked to a specific product, batch, and language."),
|
|
105
|
-
uses(FabricFlavour),
|
|
106
|
-
table("other_leaflet"),
|
|
107
|
-
sharedData(NamespaceCollection("decaf-namespace")),
|
|
108
|
-
model(),
|
|
109
|
-
__metadata("design:paramtypes", [Object])
|
|
110
|
-
], Leaflet);
|
|
111
|
-
export { Leaflet };
|
|
1
|
+
export { Leaflet } from "./../trackedModels/OtherLeaflet.js";
|
|
2
|
+
export { Leaflet as OtherLeaflet } from "./../trackedModels/OtherLeaflet.js";
|
|
112
3
|
//# sourceMappingURL=OtherLeaflet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtherLeaflet.js","sourceRoot":"","sources":["../../../../src/contract/models/OtherLeaflet.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OtherLeaflet.js","sourceRoot":"","sources":["../../../../src/contract/models/OtherLeaflet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,2CAAsC;AACxD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,2CAAsC"}
|
|
@@ -1,62 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { model, required } from "@decaf-ts/decorator-validation";
|
|
11
|
-
import { column, index, OrderDirection, pk, table } from "@decaf-ts/core";
|
|
12
|
-
import { description, uses } from "@decaf-ts/decoration";
|
|
13
|
-
import { composed } from "@decaf-ts/db-decorators";
|
|
14
|
-
import { BaseIdentifiedModel } from "./BaseIdentifiedModel.js";
|
|
15
|
-
import { FabricFlavour, mirror, NamespaceCollection, ownedBy, sharedData, } from "./../../shared/index.js";
|
|
16
|
-
let OtherLeafletFile = class OtherLeafletFile extends BaseIdentifiedModel {
|
|
17
|
-
constructor(model) {
|
|
18
|
-
super(model);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
__decorate([
|
|
22
|
-
pk(),
|
|
23
|
-
mirror("mirror-collection", "PharmaledgerassocMSP"),
|
|
24
|
-
composed(["leafletId", "fileName"], ":"),
|
|
25
|
-
description("Unique identifier of the leaflet file."),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], OtherLeafletFile.prototype, "id", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
column(),
|
|
30
|
-
required(),
|
|
31
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
32
|
-
description("Identifier of the leaflet this file belongs to."),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], OtherLeafletFile.prototype, "leafletId", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
column(),
|
|
37
|
-
required(),
|
|
38
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
39
|
-
description("Name of the file, including its extension."),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], OtherLeafletFile.prototype, "fileName", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
column(),
|
|
44
|
-
required(),
|
|
45
|
-
description("Base64-encoded content of the file."),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], OtherLeafletFile.prototype, "fileContent", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
ownedBy(),
|
|
50
|
-
description("the owner (msp) of the leaflet"),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], OtherLeafletFile.prototype, "owner", void 0);
|
|
53
|
-
OtherLeafletFile = __decorate([
|
|
54
|
-
description("Represents an additional file associated with a leaflet, such as a PDF or image."),
|
|
55
|
-
uses(FabricFlavour),
|
|
56
|
-
table("other_leaflet_file"),
|
|
57
|
-
sharedData(NamespaceCollection("decaf-namespace")),
|
|
58
|
-
model(),
|
|
59
|
-
__metadata("design:paramtypes", [Object])
|
|
60
|
-
], OtherLeafletFile);
|
|
61
|
-
export { OtherLeafletFile };
|
|
1
|
+
export { OtherLeafletFile } from "./../trackedModels/OtherLeafletFile.js";
|
|
62
2
|
//# sourceMappingURL=OtherLeafletFile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtherLeafletFile.js","sourceRoot":"","sources":["../../../../src/contract/models/OtherLeafletFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OtherLeafletFile.js","sourceRoot":"","sources":["../../../../src/contract/models/OtherLeafletFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+CAA0C"}
|
|
@@ -1,81 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { maxlength, minlength, model, required, } from "@decaf-ts/decorator-validation";
|
|
11
|
-
import { column, defaultQueryAttr, index, OrderDirection, pk, table, } from "@decaf-ts/core";
|
|
12
|
-
import { composed, version } from "@decaf-ts/db-decorators";
|
|
13
|
-
import { description, uses } from "@decaf-ts/decoration";
|
|
14
|
-
import { BaseIdentifiedModel } from "./BaseIdentifiedModel.js";
|
|
15
|
-
import { gtin } from "./gtin.js";
|
|
16
|
-
import { FabricFlavour, mirror, NamespaceCollection, sharedData, } from "./../../shared/index.js";
|
|
17
|
-
import { historyDec } from "./history-dec.js";
|
|
18
|
-
let OtherMarket = class OtherMarket extends BaseIdentifiedModel {
|
|
19
|
-
constructor(model) {
|
|
20
|
-
super(model);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
__decorate([
|
|
24
|
-
pk({ type: String, generated: false }),
|
|
25
|
-
historyDec(),
|
|
26
|
-
mirror("mirror-collection", "PharmaledgerassocMSP"),
|
|
27
|
-
composed(["productCode", "marketId"], ":", true),
|
|
28
|
-
description("Unique identifier composed of product code and market ID."),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], OtherMarket.prototype, "id", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
column(),
|
|
33
|
-
required(),
|
|
34
|
-
defaultQueryAttr(),
|
|
35
|
-
index([OrderDirection.ASC, OrderDirection.DSC]),
|
|
36
|
-
description("Identifier of the market where the product is registered or sold."),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], OtherMarket.prototype, "marketId", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
column(),
|
|
41
|
-
gtin(),
|
|
42
|
-
required(),
|
|
43
|
-
defaultQueryAttr(),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], OtherMarket.prototype, "productCode", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
column(),
|
|
48
|
-
minlength(2),
|
|
49
|
-
maxlength(2),
|
|
50
|
-
description("Two-letter national code (ISO format) representing the market's country."),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], OtherMarket.prototype, "nationalCode", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
column(),
|
|
55
|
-
description("Name of the Marketing Authorization Holder (MAH)."),
|
|
56
|
-
__metadata("design:type", String)
|
|
57
|
-
], OtherMarket.prototype, "mahName", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
column(),
|
|
60
|
-
description("Name of the legal entity responsible for the product in this market."),
|
|
61
|
-
__metadata("design:type", String)
|
|
62
|
-
], OtherMarket.prototype, "legalEntityName", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
column(),
|
|
65
|
-
description("Address of the Marketing Authorization Holder or responsible legal entity."),
|
|
66
|
-
__metadata("design:type", String)
|
|
67
|
-
], OtherMarket.prototype, "mahAddress", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
version(),
|
|
70
|
-
__metadata("design:type", Number)
|
|
71
|
-
], OtherMarket.prototype, "counter", void 0);
|
|
72
|
-
OtherMarket = __decorate([
|
|
73
|
-
sharedData(NamespaceCollection("decaf-namespace")),
|
|
74
|
-
description("Links a product to a specific market."),
|
|
75
|
-
uses(FabricFlavour),
|
|
76
|
-
table("other_market"),
|
|
77
|
-
model(),
|
|
78
|
-
__metadata("design:paramtypes", [Object])
|
|
79
|
-
], OtherMarket);
|
|
80
|
-
export { OtherMarket };
|
|
1
|
+
export { OtherMarket } from "./../trackedModels/OtherMarket.js";
|
|
81
2
|
//# sourceMappingURL=OtherMarket.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OtherMarket.js","sourceRoot":"","sources":["../../../../src/contract/models/OtherMarket.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OtherMarket.js","sourceRoot":"","sources":["../../../../src/contract/models/OtherMarket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0CAAqC"}
|