@alviere/core 0.18.2 → 0.18.3
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/interfaces/cryptor.interface.d.ts +5 -2
- package/dist/entities/interfaces/cryptor.interface.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -37
- package/dist/index.mjs.map +1 -1
- package/dist/infrastructure/gateways/alcore-base.gateway.d.ts +7 -1
- package/dist/infrastructure/gateways/alcore-base.gateway.d.ts.map +1 -1
- package/dist/infrastructure/gateways/auth.gateway.d.ts.map +1 -1
- package/dist/infrastructure/gateways/payment-instruments.gateway.d.ts.map +1 -1
- package/dist/infrastructure/security/cryptor.service.d.ts +6 -6
- package/dist/infrastructure/security/cryptor.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -21,6 +21,11 @@ export declare abstract class AlcoreBase {
|
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
23
|
private endpoint;
|
|
24
|
+
/**
|
|
25
|
+
* Nonce used to encrypt the request that produced each Response, so the paired
|
|
26
|
+
* decrypt() call uses the matching IV instead of shared, racy instance state.
|
|
27
|
+
*/
|
|
28
|
+
private responseNonces;
|
|
24
29
|
/**
|
|
25
30
|
*
|
|
26
31
|
*/
|
|
@@ -39,7 +44,8 @@ export declare abstract class AlcoreBase {
|
|
|
39
44
|
/**
|
|
40
45
|
*
|
|
41
46
|
* @param data
|
|
47
|
+
* @param response the Response returned by the send() call this data came from
|
|
42
48
|
*/
|
|
43
|
-
protected decrypt(data: EncryptedResponse): Promise<object>;
|
|
49
|
+
protected decrypt(data: EncryptedResponse, response: Response): Promise<object>;
|
|
44
50
|
}
|
|
45
51
|
//# sourceMappingURL=alcore-base.gateway.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alcore-base.gateway.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/gateways/alcore-base.gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"alcore-base.gateway.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/gateways/alcore-base.gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAG7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAUpE;;GAEG;AACH,8BAAsB,UAAU;IAC9B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAE7B;;OAEG;IACH,OAAO,CAAC,OAAO,CAAmB;IAElC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAS;IAEvB;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAa;IAE7B;;;OAGG;IACH,OAAO,CAAC,cAAc,CAAuC;IAE7D;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC;IAElC;;;;;OAKG;IACH,SAAS,aAAa,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe;IAQrF;;OAEG;cACa,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IA4E1F;;;;OAIG;cACa,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;CAStF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.gateway.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/gateways/auth.gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE;;;GAGG;AACH,qBAAa,WAAY,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"auth.gateway.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/gateways/auth.gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE;;;GAGG;AACH,qBAAa,WAAY,SAAQ,UAAU;gBAC7B,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe;IAK3E;;;;;;;;;;OAUG;IACG,mBAAmB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAiB1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-instruments.gateway.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/gateways/payment-instruments.gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"payment-instruments.gateway.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/gateways/payment-instruments.gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,kCAAkC,EAClC,cAAc,EACf,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAI7E,qBAAa,yBACX,SAAQ,UACR,YAAW,kCAAkC;gBAEjC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe;IAIrE,uBAAuB,CAC3B,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,yBAAyB,CAAC;IAQ/B,oBAAoB,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAQvF,uBAAuB,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKrE,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAQhE,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAazF"}
|
|
@@ -14,10 +14,6 @@ export declare class Cryptor implements CryptorInterface {
|
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
16
|
private key;
|
|
17
|
-
/**
|
|
18
|
-
* Holds the nonce used in the most recent encrypt() call; updated before each encryption.
|
|
19
|
-
*/
|
|
20
|
-
private nonce;
|
|
21
17
|
/**
|
|
22
18
|
*
|
|
23
19
|
*/
|
|
@@ -31,13 +27,17 @@ export declare class Cryptor implements CryptorInterface {
|
|
|
31
27
|
* @param data
|
|
32
28
|
* @returns
|
|
33
29
|
*/
|
|
34
|
-
encrypt(data: object): Promise<
|
|
30
|
+
encrypt(data: object): Promise<{
|
|
31
|
+
request: EncryptedRequest;
|
|
32
|
+
nonce: Uint8Array;
|
|
33
|
+
}>;
|
|
35
34
|
/**
|
|
36
35
|
*
|
|
37
36
|
* @param data
|
|
37
|
+
* @param nonce the nonce returned by the encrypt() call this response corresponds to
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
|
-
decrypt(data: EncryptedResponse): Promise<object>;
|
|
40
|
+
decrypt(data: EncryptedResponse, nonce: Uint8Array): Promise<object>;
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
43
|
* @returns
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cryptor.service.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/security/cryptor.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAE7E;;GAEG;AACH,qBAAa,OAAQ,YAAW,gBAAgB;IAC9C;;OAEG;IACH,OAAO,CAAC,OAAO,CAAS;IAExB;;OAEG;IACH,OAAO,CAAC,GAAG,CAA0B;IAErC;;OAEG;IACH,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"cryptor.service.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/security/cryptor.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAE7E;;GAEG;AACH,qBAAa,OAAQ,YAAW,gBAAgB;IAC9C;;OAEG;IACH,OAAO,CAAC,OAAO,CAAS;IAExB;;OAEG;IACH,OAAO,CAAC,GAAG,CAA0B;IAErC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,CAAkB;IAEjC;;OAEG;gBACS,MAAM,CAAC,EAAE,eAAe;IAOpC;;;;OAIG;IACG,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,gBAAgB,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAE,CAAC;IA4BtF;;;;;OAKG;IACG,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAW1E;;;OAGG;IACH,OAAO,CAAC,YAAY;IAIpB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAItB;;;OAGG;YACW,UAAU;IAOxB;;;OAGG;IACH,OAAO,CAAC,WAAW;CAKpB"}
|