@corsa-labs/sdk 4.18.0 → 4.20.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.
@@ -1,4 +1,5 @@
1
1
  import type { AggregationFilterDto } from './AggregationFilterDto';
2
+ import type { FactPathDto } from './FactPathDto';
2
3
  export type ConditionDto = {
3
4
  /**
4
5
  * Label for this condition or condition group
@@ -45,9 +46,13 @@ export type ConditionDto = {
45
46
  */
46
47
  aggregation?: Record<string, any>;
47
48
  /**
48
- * Fact name to evaluate
49
+ * Fact name/ID (generated by backend - internal use only)
49
50
  */
50
51
  fact?: string;
52
+ /**
53
+ * Fact path object (optional - backend can build from entity/property/relationship)
54
+ */
55
+ factPath?: FactPathDto;
51
56
  /**
52
57
  * Comparison operator
53
58
  */
@@ -75,7 +80,9 @@ export declare namespace ConditionDto {
75
80
  */
76
81
  enum entity {
77
82
  TRANSACTION = "transaction",
78
- CLIENT = "client"
83
+ CLIENT = "client",
84
+ WALLET = "wallet",
85
+ BANK_ACCOUNT = "bankAccount"
79
86
  }
80
87
  /**
81
88
  * The client's relationship to the transaction (sender, receiver, or both)
@@ -93,7 +100,11 @@ export declare namespace ConditionDto {
93
100
  COUNT = "count",
94
101
  AVG = "avg",
95
102
  MIN = "min",
96
- MAX = "max"
103
+ MAX = "max",
104
+ MEDIAN = "median",
105
+ STDDEV = "stddev",
106
+ PERCENTILE = "percentile",
107
+ COUNT_DISTINCT = "countDistinct"
97
108
  }
98
109
  /**
99
110
  * Aggregation time window type
@@ -109,6 +120,8 @@ export declare namespace ConditionDto {
109
120
  * Aggregation time period (when using IN_THE_LAST)
110
121
  */
111
122
  enum aggregationTimePeriod {
123
+ MINUTES = "minutes",
124
+ HOURS = "hours",
112
125
  DAYS = "days",
113
126
  WEEKS = "weeks",
114
127
  MONTHS = "months",
@@ -10,6 +10,8 @@ var ConditionDto;
10
10
  (function (entity) {
11
11
  entity["TRANSACTION"] = "transaction";
12
12
  entity["CLIENT"] = "client";
13
+ entity["WALLET"] = "wallet";
14
+ entity["BANK_ACCOUNT"] = "bankAccount";
13
15
  })(entity = ConditionDto.entity || (ConditionDto.entity = {}));
14
16
  /**
15
17
  * The client's relationship to the transaction (sender, receiver, or both)
@@ -30,6 +32,10 @@ var ConditionDto;
30
32
  aggregationOperator["AVG"] = "avg";
31
33
  aggregationOperator["MIN"] = "min";
32
34
  aggregationOperator["MAX"] = "max";
35
+ aggregationOperator["MEDIAN"] = "median";
36
+ aggregationOperator["STDDEV"] = "stddev";
37
+ aggregationOperator["PERCENTILE"] = "percentile";
38
+ aggregationOperator["COUNT_DISTINCT"] = "countDistinct";
33
39
  })(aggregationOperator = ConditionDto.aggregationOperator || (ConditionDto.aggregationOperator = {}));
34
40
  /**
35
41
  * Aggregation time window type
@@ -47,6 +53,8 @@ var ConditionDto;
47
53
  */
48
54
  let aggregationTimePeriod;
49
55
  (function (aggregationTimePeriod) {
56
+ aggregationTimePeriod["MINUTES"] = "minutes";
57
+ aggregationTimePeriod["HOURS"] = "hours";
50
58
  aggregationTimePeriod["DAYS"] = "days";
51
59
  aggregationTimePeriod["WEEKS"] = "weeks";
52
60
  aggregationTimePeriod["MONTHS"] = "months";
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionDto.js","sourceRoot":"","sources":["../../models/ConditionDto.ts"],"names":[],"mappings":";;;AA2EA,IAAiB,YAAY,CA6D5B;AA7DD,WAAiB,YAAY;IACzB;;OAEG;IACH,IAAY,MAGX;IAHD,WAAY,MAAM;QACd,qCAA2B,CAAA;QAC3B,2BAAiB,CAAA;IACrB,CAAC,EAHW,MAAM,GAAN,mBAAM,KAAN,mBAAM,QAGjB;IACD;;OAEG;IACH,IAAY,kBAIX;IAJD,WAAY,kBAAkB;QAC1B,iCAAW,CAAA;QACX,uCAAiB,CAAA;QACjB,2CAAqB,CAAA;IACzB,CAAC,EAJW,kBAAkB,GAAlB,+BAAkB,KAAlB,+BAAkB,QAI7B;IACD;;OAEG;IACH,IAAY,mBAMX;IAND,WAAY,mBAAmB;QAC3B,kCAAW,CAAA;QACX,sCAAe,CAAA;QACf,kCAAW,CAAA;QACX,kCAAW,CAAA;QACX,kCAAW,CAAA;IACf,CAAC,EANW,mBAAmB,GAAnB,gCAAmB,KAAnB,gCAAmB,QAM9B;IACD;;OAEG;IACH,IAAY,mBAMX;IAND,WAAY,mBAAmB;QAC3B,4CAAqB,CAAA;QACrB,kDAA2B,CAAA;QAC3B,sCAAe,CAAA;QACf,wCAAiB,CAAA;QACjB,0CAAmB,CAAA;IACvB,CAAC,EANW,mBAAmB,GAAnB,gCAAmB,KAAnB,gCAAmB,QAM9B;IACD;;OAEG;IACH,IAAY,qBAKX;IALD,WAAY,qBAAqB;QAC7B,sCAAa,CAAA;QACb,wCAAe,CAAA;QACf,0CAAiB,CAAA;QACjB,wCAAe,CAAA;IACnB,CAAC,EALW,qBAAqB,GAArB,kCAAqB,KAArB,kCAAqB,QAKhC;IACD;;OAEG;IACH,IAAY,QAYX;IAZD,WAAY,QAAQ;QAChB,2BAAe,CAAA;QACf,kCAAsB,CAAA;QACtB,wCAA4B,CAAA;QAC5B,2DAA+C,CAAA;QAC/C,kCAAsB,CAAA;QACtB,qDAAyC,CAAA;QACzC,qBAAS,CAAA;QACT,4BAAgB,CAAA;QAChB,iCAAqB,CAAA;QACrB,+CAAmC,CAAA;QACnC,+BAAmB,CAAA;IACvB,CAAC,EAZW,QAAQ,GAAR,qBAAQ,KAAR,qBAAQ,QAYnB;AACL,CAAC,EA7DgB,YAAY,4BAAZ,YAAY,QA6D5B"}
1
+ {"version":3,"file":"ConditionDto.js","sourceRoot":"","sources":["../../models/ConditionDto.ts"],"names":[],"mappings":";;;AAgFA,IAAiB,YAAY,CAqE5B;AArED,WAAiB,YAAY;IACzB;;OAEG;IACH,IAAY,MAKX;IALD,WAAY,MAAM;QACd,qCAA2B,CAAA;QAC3B,2BAAiB,CAAA;QACjB,2BAAiB,CAAA;QACjB,sCAA4B,CAAA;IAChC,CAAC,EAL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,EAZW,QAAQ,GAAR,qBAAQ,KAAR,qBAAQ,QAYnB;AACL,CAAC,EArEgB,YAAY,4BAAZ,YAAY,QAqE5B"}
@@ -0,0 +1,26 @@
1
+ import type { ParticipantDto } from './ParticipantDto';
2
+ export type FactPathDto = {
3
+ /**
4
+ * Root entity type
5
+ */
6
+ entity: FactPathDto.entity;
7
+ /**
8
+ * Property name
9
+ */
10
+ property: string;
11
+ /**
12
+ * Optional participant (for relationship-based facts)
13
+ */
14
+ participant?: ParticipantDto;
15
+ };
16
+ export declare namespace FactPathDto {
17
+ /**
18
+ * Root entity type
19
+ */
20
+ enum entity {
21
+ TXN = "txn",
22
+ CUSTOMER = "customer",
23
+ WALLET = "wallet",
24
+ BANK_ACCOUNT = "bankAccount"
25
+ }
26
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FactPathDto = void 0;
4
+ var FactPathDto;
5
+ (function (FactPathDto) {
6
+ /**
7
+ * Root entity type
8
+ */
9
+ let entity;
10
+ (function (entity) {
11
+ entity["TXN"] = "txn";
12
+ entity["CUSTOMER"] = "customer";
13
+ entity["WALLET"] = "wallet";
14
+ entity["BANK_ACCOUNT"] = "bankAccount";
15
+ })(entity = FactPathDto.entity || (FactPathDto.entity = {}));
16
+ })(FactPathDto || (exports.FactPathDto = FactPathDto = {}));
17
+ //# sourceMappingURL=FactPathDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FactPathDto.js","sourceRoot":"","sources":["../../models/FactPathDto.ts"],"names":[],"mappings":";;;AAmBA,IAAiB,WAAW,CAU3B;AAVD,WAAiB,WAAW;IACxB;;OAEG;IACH,IAAY,MAKX;IALD,WAAY,MAAM;QACd,qBAAW,CAAA;QACX,+BAAqB,CAAA;QACrB,2BAAiB,CAAA;QACjB,sCAA4B,CAAA;IAChC,CAAC,EALW,MAAM,GAAN,kBAAM,KAAN,kBAAM,QAKjB;AACL,CAAC,EAVgB,WAAW,2BAAX,WAAW,QAU3B"}
@@ -0,0 +1,28 @@
1
+ export type ParticipantDto = {
2
+ /**
3
+ * Participant role in transaction
4
+ */
5
+ role: ParticipantDto.role;
6
+ /**
7
+ * Type of participant
8
+ */
9
+ kind: ParticipantDto.kind;
10
+ };
11
+ export declare namespace ParticipantDto {
12
+ /**
13
+ * Participant role in transaction
14
+ */
15
+ enum role {
16
+ SOURCE = "source",
17
+ DESTINATION = "destination",
18
+ ANY = "any"
19
+ }
20
+ /**
21
+ * Type of participant
22
+ */
23
+ enum kind {
24
+ CLIENT = "Client",
25
+ WALLET = "Wallet",
26
+ BANK_ACCOUNT = "BankAccount"
27
+ }
28
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ParticipantDto = void 0;
4
+ var ParticipantDto;
5
+ (function (ParticipantDto) {
6
+ /**
7
+ * Participant role in transaction
8
+ */
9
+ let role;
10
+ (function (role) {
11
+ role["SOURCE"] = "source";
12
+ role["DESTINATION"] = "destination";
13
+ role["ANY"] = "any";
14
+ })(role = ParticipantDto.role || (ParticipantDto.role = {}));
15
+ /**
16
+ * Type of participant
17
+ */
18
+ let kind;
19
+ (function (kind) {
20
+ kind["CLIENT"] = "Client";
21
+ kind["WALLET"] = "Wallet";
22
+ kind["BANK_ACCOUNT"] = "BankAccount";
23
+ })(kind = ParticipantDto.kind || (ParticipantDto.kind = {}));
24
+ })(ParticipantDto || (exports.ParticipantDto = ParticipantDto = {}));
25
+ //# sourceMappingURL=ParticipantDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParticipantDto.js","sourceRoot":"","sources":["../../models/ParticipantDto.ts"],"names":[],"mappings":";;;AAcA,IAAiB,cAAc,CAiB9B;AAjBD,WAAiB,cAAc;IAC3B;;OAEG;IACH,IAAY,IAIX;IAJD,WAAY,IAAI;QACZ,yBAAiB,CAAA;QACjB,mCAA2B,CAAA;QAC3B,mBAAW,CAAA;IACf,CAAC,EAJW,IAAI,GAAJ,mBAAI,KAAJ,mBAAI,QAIf;IACD;;OAEG;IACH,IAAY,IAIX;IAJD,WAAY,IAAI;QACZ,yBAAiB,CAAA;QACjB,yBAAiB,CAAA;QACjB,oCAA4B,CAAA;IAChC,CAAC,EAJW,IAAI,GAAJ,mBAAI,KAAJ,mBAAI,QAIf;AACL,CAAC,EAjBgB,cAAc,8BAAd,cAAc,QAiB9B"}
@@ -72,10 +72,10 @@ export declare class RuleTemplatesService {
72
72
  *
73
73
  *
74
74
  *
75
- * **Example:** filter.products=$contains:John Doe
75
+ * **Example:** filter.products=$ilike:John Doe
76
76
  *
77
77
  * **Available Operations**
78
- * - $contains
78
+ * - $ilike
79
79
  *
80
80
  * - $and
81
81
  *
@@ -86,10 +86,10 @@ export declare class RuleTemplatesService {
86
86
  *
87
87
  *
88
88
  *
89
- * **Example:** filter.typologies=$contains:John Doe
89
+ * **Example:** filter.typologies=$ilike:John Doe
90
90
  *
91
91
  * **Available Operations**
92
- * - $contains
92
+ * - $ilike
93
93
  *
94
94
  * - $and
95
95
  *
@@ -73,10 +73,10 @@ class RuleTemplatesService {
73
73
  *
74
74
  *
75
75
  *
76
- * **Example:** filter.products=$contains:John Doe
76
+ * **Example:** filter.products=$ilike:John Doe
77
77
  *
78
78
  * **Available Operations**
79
- * - $contains
79
+ * - $ilike
80
80
  *
81
81
  * - $and
82
82
  *
@@ -87,10 +87,10 @@ class RuleTemplatesService {
87
87
  *
88
88
  *
89
89
  *
90
- * **Example:** filter.typologies=$contains:John Doe
90
+ * **Example:** filter.typologies=$ilike:John Doe
91
91
  *
92
92
  * **Available Operations**
93
- * - $contains
93
+ * - $ilike
94
94
  *
95
95
  * - $and
96
96
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corsa-labs/sdk",
3
- "version": "4.18.0",
3
+ "version": "4.20.0",
4
4
  "description": "SDK for Corsa API",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",