@requestnetwork/types 0.35.1-next.1753 → 0.35.1-next.1754
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.
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { PnReferenceBased } from '../extension-types';
|
|
2
2
|
export { ACTION, IAddPaymentAddressParameters, IAddRefundAddressParameters, } from './pn-any-reference-based-types';
|
|
3
3
|
/** Parameters for the creation action */
|
|
4
|
-
export
|
|
4
|
+
export declare type ICreationParameters = IMasterRequestCreationParameters | ISubsequentRequestCreationParameters;
|
|
5
|
+
/** Parameters for the creation action of the first request of a series */
|
|
6
|
+
export interface IMasterRequestCreationParameters extends PnReferenceBased.ICreationParameters {
|
|
5
7
|
expectedFlowRate: string;
|
|
6
8
|
expectedStartDate: string;
|
|
7
9
|
}
|
|
10
|
+
/** Parameters for the creation action of other requests of a series */
|
|
11
|
+
export interface ISubsequentRequestCreationParameters extends Partial<PnReferenceBased.ICreationParameters> {
|
|
12
|
+
previousRequestId: string;
|
|
13
|
+
masterRequestId: string;
|
|
14
|
+
recurrenceNumber: number;
|
|
15
|
+
}
|
|
8
16
|
//# sourceMappingURL=pn-any-stream-reference-based-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pn-any-stream-reference-based-types.d.ts","sourceRoot":"","sources":["../../src/extensions/pn-any-stream-reference-based-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,MAAM,EACN,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,gCAAgC,CAAC;AAExC,yCAAyC;AACzC,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"pn-any-stream-reference-based-types.d.ts","sourceRoot":"","sources":["../../src/extensions/pn-any-stream-reference-based-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,MAAM,EACN,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,gCAAgC,CAAC;AAExC,yCAAyC;AACzC,oBAAY,mBAAmB,GAC3B,gCAAgC,GAChC,oCAAoC,CAAC;AAEzC,0EAA0E;AAC1E,MAAM,WAAW,gCAAiC,SAAQ,gBAAgB,CAAC,mBAAmB;IAC5F,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,uEAAuE;AACvE,MAAM,WAAW,oCACf,SAAQ,OAAO,CAAC,gBAAgB,CAAC,mBAAmB,CAAC;IAErD,iBAAiB,EAAE,MAAM,CAAC;IAE1B,eAAe,EAAE,MAAM,CAAC;IAExB,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { PaymentTypes } from '.';
|
|
2
|
+
import { ICreationParameters, IMasterRequestCreationParameters, ISubsequentRequestCreationParameters } from './extensions/pn-any-stream-reference-based-types';
|
|
2
3
|
/**
|
|
3
4
|
* Types a value like ExtensionType into a paymentNetworkID enum element if possible
|
|
4
5
|
* @param value Example: ExtensionTypes.ID.PAYMENT_NETWORK_ERC20_PROXY_CONTRACT
|
|
5
6
|
*/
|
|
6
7
|
export declare function isPaymentNetworkId(value: any): value is PaymentTypes.PAYMENT_NETWORK_ID;
|
|
8
|
+
/**
|
|
9
|
+
* Types the creation parameters as IMasterRequestCreationParameters if it satisfies the condition
|
|
10
|
+
* @param parameters to test
|
|
11
|
+
*/
|
|
12
|
+
export declare const isMasterRequestCreationParameters: (parameters: ICreationParameters) => parameters is IMasterRequestCreationParameters;
|
|
13
|
+
/**
|
|
14
|
+
* Types the creation parameters as ISubsequentRequestCreationParameters if it satisfies the condition
|
|
15
|
+
* @param parameters to test
|
|
16
|
+
*/
|
|
17
|
+
export declare const isSubsequentRequestCreationParameters: (parameters: ICreationParameters) => parameters is ISubsequentRequestCreationParameters;
|
|
7
18
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,gCAAgC,EAChC,oCAAoC,EACrC,MAAM,kDAAkD,CAAC;AAE1D;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,YAAY,CAAC,kBAAkB,CAQvF;AAED;;;GAGG;AACH,eAAO,MAAM,iCAAiC,eAChC,mBAAmB,mDAGhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qCAAqC,eACpC,mBAAmB,uDAGhC,CAAC"}
|
package/dist/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPaymentNetworkId = void 0;
|
|
3
|
+
exports.isSubsequentRequestCreationParameters = exports.isMasterRequestCreationParameters = exports.isPaymentNetworkId = void 0;
|
|
4
4
|
const _1 = require(".");
|
|
5
5
|
/**
|
|
6
6
|
* Types a value like ExtensionType into a paymentNetworkID enum element if possible
|
|
@@ -15,4 +15,20 @@ function isPaymentNetworkId(value) {
|
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
exports.isPaymentNetworkId = isPaymentNetworkId;
|
|
18
|
+
/**
|
|
19
|
+
* Types the creation parameters as IMasterRequestCreationParameters if it satisfies the condition
|
|
20
|
+
* @param parameters to test
|
|
21
|
+
*/
|
|
22
|
+
const isMasterRequestCreationParameters = (parameters) => {
|
|
23
|
+
return Object.keys(parameters).includes('expectedFlowRate');
|
|
24
|
+
};
|
|
25
|
+
exports.isMasterRequestCreationParameters = isMasterRequestCreationParameters;
|
|
26
|
+
/**
|
|
27
|
+
* Types the creation parameters as ISubsequentRequestCreationParameters if it satisfies the condition
|
|
28
|
+
* @param parameters to test
|
|
29
|
+
*/
|
|
30
|
+
const isSubsequentRequestCreationParameters = (parameters) => {
|
|
31
|
+
return Object.keys(parameters).includes('masterRequestId');
|
|
32
|
+
};
|
|
33
|
+
exports.isSubsequentRequestCreationParameters = isSubsequentRequestCreationParameters;
|
|
18
34
|
//# sourceMappingURL=utils.js.map
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,wBAAiC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,wBAAiC;AAOjC;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,KAAU;IAC3C,KAAK,MAAM,EAAE,IAAI,eAAY,CAAC,kBAAkB,EAAE;QAChD,IAAI,eAAY,CAAC,kBAAkB,CAAC,EAAE,CAAC,KAAK,KAAK,EAAE;YACjD,OAAO,IAAI,CAAC;SACb;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AARD,gDAQC;AAED;;;GAGG;AACI,MAAM,iCAAiC,GAAG,CAC/C,UAA+B,EACiB,EAAE;IAClD,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAC9D,CAAC,CAAC;AAJW,QAAA,iCAAiC,qCAI5C;AAEF;;;GAGG;AACI,MAAM,qCAAqC,GAAG,CACnD,UAA+B,EACqB,EAAE;IACtD,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAC7D,CAAC,CAAC;AAJW,QAAA,qCAAqC,yCAIhD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@requestnetwork/types",
|
|
3
|
-
"version": "0.35.1-next.
|
|
3
|
+
"version": "0.35.1-next.1754+43adccff",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"ts-node": "9.0.0",
|
|
48
48
|
"typescript": "4.4.4"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "43adccff2b99e3268ea21e1a23b3a7f3cbdf3461"
|
|
51
51
|
}
|