@decaf-ts/for-fabric 0.15.0 → 0.16.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/client/FabricClientAdapter.cjs +4 -1
- package/lib/cjs/client/FabricClientAdapter.cjs.map +1 -1
- package/lib/cjs/client/FabricClientRepository.cjs +5 -0
- package/lib/cjs/client/FabricClientRepository.cjs.map +1 -1
- package/lib/cjs/client/FabricClientStatement.cjs +1 -22
- package/lib/cjs/client/FabricClientStatement.cjs.map +1 -1
- package/lib/cjs/contracts/ContractAdapter.cjs +5 -2
- package/lib/cjs/contracts/ContractAdapter.cjs.map +1 -1
- package/lib/cjs/contracts/crud/crud-contract.cjs +4 -2
- package/lib/cjs/contracts/crud/crud-contract.cjs.map +1 -1
- package/lib/cjs/shared/decorators.cjs +22 -13
- package/lib/cjs/shared/decorators.cjs.map +1 -1
- package/lib/cjs/version.cjs +3 -3
- package/lib/esm/client/FabricClientAdapter.js +4 -1
- package/lib/esm/client/FabricClientAdapter.js.map +1 -1
- package/lib/esm/client/FabricClientRepository.js +5 -0
- package/lib/esm/client/FabricClientRepository.js.map +1 -1
- package/lib/esm/client/FabricClientStatement.js +1 -22
- package/lib/esm/client/FabricClientStatement.js.map +1 -1
- package/lib/esm/contracts/ContractAdapter.js +5 -2
- package/lib/esm/contracts/ContractAdapter.js.map +1 -1
- package/lib/esm/contracts/crud/crud-contract.js +4 -2
- package/lib/esm/contracts/crud/crud-contract.js.map +1 -1
- package/lib/esm/shared/decorators.js +22 -13
- package/lib/esm/shared/decorators.js.map +1 -1
- package/lib/esm/version.js +3 -3
- package/lib/types/client/FabricClientAdapter.d.cts +1 -0
- package/lib/types/client/FabricClientAdapter.d.mts +1 -0
- package/lib/types/contracts/ContractAdapter.d.cts +1 -0
- package/lib/types/contracts/ContractAdapter.d.mts +1 -0
- package/lib/types/shared/decorators.d.cts +3 -1
- package/lib/types/shared/decorators.d.mts +3 -1
- package/lib/types/version.d.cts +3 -3
- package/lib/types/version.d.mts +3 -3
- package/package.json +1 -1
package/lib/esm/version.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Metadata } from "@decaf-ts/decoration";
|
|
2
|
-
export const VERSION = "0.
|
|
2
|
+
export const VERSION = "0.15.1";
|
|
3
3
|
/**
|
|
4
4
|
* @description Represents the current commit hash of the module build.
|
|
5
5
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
6
6
|
* the placeholder with the actual commit hash at publish time.
|
|
7
7
|
* @const COMMIT
|
|
8
8
|
*/
|
|
9
|
-
export const COMMIT = "
|
|
9
|
+
export const COMMIT = "b2417b8";
|
|
10
10
|
/**
|
|
11
11
|
* @description Represents the full version string of the module.
|
|
12
12
|
* @summary Stores the semver version and commit hash for the package.
|
|
13
13
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
14
14
|
* @const FULL_VERSION
|
|
15
15
|
*/
|
|
16
|
-
export const FULL_VERSION = "0.
|
|
16
|
+
export const FULL_VERSION = "0.15.1-b2417b8";
|
|
17
17
|
export const PACKAGE_NAME = "@decaf-ts/for-fabric";
|
|
18
18
|
Metadata.registerLibrary(PACKAGE_NAME, VERSION);
|
|
19
19
|
//# sourceMappingURL=version.js.map
|
|
@@ -44,8 +44,10 @@ export declare function ownedBy(): (target: any, propertyKey?: any, descriptor?:
|
|
|
44
44
|
export declare function transactionIdOnCreate<M extends Model<boolean>, R extends Repo<M>, V>(this: R, context: ContextOf<R>, data: V, key: keyof M, model: M): Promise<void>;
|
|
45
45
|
export declare function transactionId(): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
46
46
|
export type MirrorCondition = (msp: string) => boolean;
|
|
47
|
+
export type MirrorAllowFunction = (context: Context<FabricContractFlags>) => boolean;
|
|
47
48
|
export type MirrorMetadata = {
|
|
48
49
|
condition?: MirrorCondition;
|
|
50
|
+
allow?: MirrorAllowFunction;
|
|
49
51
|
resolver: CollectionResolver | string;
|
|
50
52
|
mspId: string;
|
|
51
53
|
};
|
|
@@ -55,7 +57,7 @@ export declare function updateMirrorHandler<M extends Model, R extends Repositor
|
|
|
55
57
|
export declare function deleteMirrorHandler<M extends Model, R extends Repository<M, any>>(this: R, context: Context<FabricContractFlags>, data: MirrorMetadata, key: keyof M, model: M): Promise<void>;
|
|
56
58
|
export declare function mirrorWriteGuard<M extends Model, R extends Repository<M, any>>(this: R, context: Context<FabricContractFlags>, data: MirrorMetadata, key: keyof M, model: M): Promise<void>;
|
|
57
59
|
export declare function readMirrorHandler<M extends Model, R extends Repository<M, any>>(this: R, context: Context<FabricContractFlags>, data: MirrorMetadata, key: keyof M, model: M): Promise<void>;
|
|
58
|
-
export declare function mirror(collection: CollectionResolver | string, mspIdOrCondition?: string | MirrorCondition,
|
|
60
|
+
export declare function mirror(collection: CollectionResolver | string, mspIdOrCondition?: string | MirrorCondition, conditionOrAllow?: MirrorCondition | MirrorAllowFunction, allow?: MirrorAllowFunction): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
59
61
|
export type CollectionResolver = <M extends Model>(model: M | Constructor<M>, msp?: string, ...args: any[]) => string;
|
|
60
62
|
export declare const ModelCollection: CollectionResolver;
|
|
61
63
|
export declare function NamespaceCollection(namespace: string): CollectionResolver;
|
|
@@ -44,8 +44,10 @@ export declare function ownedBy(): (target: any, propertyKey?: any, descriptor?:
|
|
|
44
44
|
export declare function transactionIdOnCreate<M extends Model<boolean>, R extends Repo<M>, V>(this: R, context: ContextOf<R>, data: V, key: keyof M, model: M): Promise<void>;
|
|
45
45
|
export declare function transactionId(): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
46
46
|
export type MirrorCondition = (msp: string) => boolean;
|
|
47
|
+
export type MirrorAllowFunction = (context: Context<FabricContractFlags>) => boolean;
|
|
47
48
|
export type MirrorMetadata = {
|
|
48
49
|
condition?: MirrorCondition;
|
|
50
|
+
allow?: MirrorAllowFunction;
|
|
49
51
|
resolver: CollectionResolver | string;
|
|
50
52
|
mspId: string;
|
|
51
53
|
};
|
|
@@ -55,7 +57,7 @@ export declare function updateMirrorHandler<M extends Model, R extends Repositor
|
|
|
55
57
|
export declare function deleteMirrorHandler<M extends Model, R extends Repository<M, any>>(this: R, context: Context<FabricContractFlags>, data: MirrorMetadata, key: keyof M, model: M): Promise<void>;
|
|
56
58
|
export declare function mirrorWriteGuard<M extends Model, R extends Repository<M, any>>(this: R, context: Context<FabricContractFlags>, data: MirrorMetadata, key: keyof M, model: M): Promise<void>;
|
|
57
59
|
export declare function readMirrorHandler<M extends Model, R extends Repository<M, any>>(this: R, context: Context<FabricContractFlags>, data: MirrorMetadata, key: keyof M, model: M): Promise<void>;
|
|
58
|
-
export declare function mirror(collection: CollectionResolver | string, mspIdOrCondition?: string | MirrorCondition,
|
|
60
|
+
export declare function mirror(collection: CollectionResolver | string, mspIdOrCondition?: string | MirrorCondition, conditionOrAllow?: MirrorCondition | MirrorAllowFunction, allow?: MirrorAllowFunction): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
59
61
|
export type CollectionResolver = <M extends Model>(model: M | Constructor<M>, msp?: string, ...args: any[]) => string;
|
|
60
62
|
export declare const ModelCollection: CollectionResolver;
|
|
61
63
|
export declare function NamespaceCollection(namespace: string): CollectionResolver;
|
package/lib/types/version.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.15.1";
|
|
2
2
|
/**
|
|
3
3
|
* @description Represents the current commit hash of the module build.
|
|
4
4
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
5
5
|
* the placeholder with the actual commit hash at publish time.
|
|
6
6
|
* @const COMMIT
|
|
7
7
|
*/
|
|
8
|
-
export declare const COMMIT = "
|
|
8
|
+
export declare const COMMIT = "b2417b8";
|
|
9
9
|
/**
|
|
10
10
|
* @description Represents the full version string of the module.
|
|
11
11
|
* @summary Stores the semver version and commit hash for the package.
|
|
12
12
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
13
13
|
* @const FULL_VERSION
|
|
14
14
|
*/
|
|
15
|
-
export declare const FULL_VERSION = "0.
|
|
15
|
+
export declare const FULL_VERSION = "0.15.1-b2417b8";
|
|
16
16
|
export declare const PACKAGE_NAME = "@decaf-ts/for-fabric";
|
package/lib/types/version.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.15.1";
|
|
2
2
|
/**
|
|
3
3
|
* @description Represents the current commit hash of the module build.
|
|
4
4
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
5
5
|
* the placeholder with the actual commit hash at publish time.
|
|
6
6
|
* @const COMMIT
|
|
7
7
|
*/
|
|
8
|
-
export declare const COMMIT = "
|
|
8
|
+
export declare const COMMIT = "b2417b8";
|
|
9
9
|
/**
|
|
10
10
|
* @description Represents the full version string of the module.
|
|
11
11
|
* @summary Stores the semver version and commit hash for the package.
|
|
12
12
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
13
13
|
* @const FULL_VERSION
|
|
14
14
|
*/
|
|
15
|
-
export declare const FULL_VERSION = "0.
|
|
15
|
+
export declare const FULL_VERSION = "0.15.1-b2417b8";
|
|
16
16
|
export declare const PACKAGE_NAME = "@decaf-ts/for-fabric";
|