@corsa-labs/sdk 4.20.0 → 4.21.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/ComplianceClient.d.ts +2 -0
- package/dist/ComplianceClient.js +3 -0
- package/dist/ComplianceClient.js.map +1 -1
- package/dist/models/CreateDepositOperationDto.d.ts +5 -0
- package/dist/models/CreateSessionDto.d.ts +23 -0
- package/dist/models/CreateSessionDto.js +3 -0
- package/dist/models/CreateSessionDto.js.map +1 -0
- package/dist/models/CreateTradeOperationDto.d.ts +5 -0
- package/dist/models/CreateTradeOperationDto.js.map +1 -1
- package/dist/models/CreateWithdrawalOperationDto.d.ts +5 -0
- package/dist/models/DeviceDto.d.ts +53 -0
- package/dist/models/DeviceDto.js +17 -0
- package/dist/models/DeviceDto.js.map +1 -0
- package/dist/models/DeviceResponseDto.d.ts +57 -0
- package/dist/models/DeviceResponseDto.js +17 -0
- package/dist/models/DeviceResponseDto.js.map +1 -0
- package/dist/models/SessionDto.d.ts +83 -0
- package/dist/models/SessionDto.js +3 -0
- package/dist/models/SessionDto.js.map +1 -0
- package/dist/models/SessionReferenceDto.d.ts +11 -0
- package/dist/models/SessionReferenceDto.js +3 -0
- package/dist/models/SessionReferenceDto.js.map +1 -0
- package/dist/models/SessionSummaryDto.d.ts +29 -0
- package/dist/models/SessionSummaryDto.js +3 -0
- package/dist/models/SessionSummaryDto.js.map +1 -0
- package/dist/models/TransactionDto.d.ts +5 -0
- package/dist/models/TransactionDto.js.map +1 -1
- package/dist/models/UpdateSessionDto.d.ts +6 -0
- package/dist/models/UpdateSessionDto.js +3 -0
- package/dist/models/UpdateSessionDto.js.map +1 -0
- package/dist/services/SessionsService.d.ts +38 -0
- package/dist/services/SessionsService.js +73 -0
- package/dist/services/SessionsService.js.map +1 -0
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ import { MembersService } from './services/MembersService';
|
|
|
13
13
|
import { PlatformService } from './services/PlatformService';
|
|
14
14
|
import { RulesService } from './services/RulesService';
|
|
15
15
|
import { RuleTemplatesService } from './services/RuleTemplatesService';
|
|
16
|
+
import { SessionsService } from './services/SessionsService';
|
|
16
17
|
import { TradesService } from './services/TradesService';
|
|
17
18
|
import { TransactionsService } from './services/TransactionsService';
|
|
18
19
|
import { WithdrawalsService } from './services/WithdrawalsService';
|
|
@@ -31,6 +32,7 @@ export declare class ComplianceClient {
|
|
|
31
32
|
readonly platform: PlatformService;
|
|
32
33
|
readonly rules: RulesService;
|
|
33
34
|
readonly ruleTemplates: RuleTemplatesService;
|
|
35
|
+
readonly sessions: SessionsService;
|
|
34
36
|
readonly trades: TradesService;
|
|
35
37
|
readonly transactions: TransactionsService;
|
|
36
38
|
readonly withdrawals: WithdrawalsService;
|
package/dist/ComplianceClient.js
CHANGED
|
@@ -15,6 +15,7 @@ const MembersService_1 = require("./services/MembersService");
|
|
|
15
15
|
const PlatformService_1 = require("./services/PlatformService");
|
|
16
16
|
const RulesService_1 = require("./services/RulesService");
|
|
17
17
|
const RuleTemplatesService_1 = require("./services/RuleTemplatesService");
|
|
18
|
+
const SessionsService_1 = require("./services/SessionsService");
|
|
18
19
|
const TradesService_1 = require("./services/TradesService");
|
|
19
20
|
const TransactionsService_1 = require("./services/TransactionsService");
|
|
20
21
|
const WithdrawalsService_1 = require("./services/WithdrawalsService");
|
|
@@ -32,6 +33,7 @@ class ComplianceClient {
|
|
|
32
33
|
platform;
|
|
33
34
|
rules;
|
|
34
35
|
ruleTemplates;
|
|
36
|
+
sessions;
|
|
35
37
|
trades;
|
|
36
38
|
transactions;
|
|
37
39
|
withdrawals;
|
|
@@ -61,6 +63,7 @@ class ComplianceClient {
|
|
|
61
63
|
this.platform = new PlatformService_1.PlatformService(this.request);
|
|
62
64
|
this.rules = new RulesService_1.RulesService(this.request);
|
|
63
65
|
this.ruleTemplates = new RuleTemplatesService_1.RuleTemplatesService(this.request);
|
|
66
|
+
this.sessions = new SessionsService_1.SessionsService(this.request);
|
|
64
67
|
this.trades = new TradesService_1.TradesService(this.request);
|
|
65
68
|
this.transactions = new TransactionsService_1.TransactionsService(this.request);
|
|
66
69
|
this.withdrawals = new WithdrawalsService_1.WithdrawalsService(this.request);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComplianceClient.js","sourceRoot":"","sources":["../ComplianceClient.ts"],"names":[],"mappings":";;;AAMA,8DAA2D;AAC3D,4DAAyD;AACzD,sEAAmE;AACnE,wEAAqE;AACrE,kFAA+E;AAC/E,0DAAuD;AACvD,oEAAiE;AACjE,8DAA2D;AAC3D,gEAA6D;AAC7D,oEAAiE;AACjE,8DAA2D;AAC3D,gEAA6D;AAC7D,0DAAuD;AACvD,0EAAuE;AACvE,4DAAyD;AACzD,wEAAqE;AACrE,sEAAmE;AAEnE,MAAa,gBAAgB;IACT,MAAM,CAAgB;IACtB,WAAW,CAAqB;IAChC,YAAY,CAAsB;IAClC,iBAAiB,CAA2B;IAC5C,KAAK,CAAe;IACpB,UAAU,CAAoB;IAC9B,OAAO,CAAiB;IACxB,QAAQ,CAAkB;IAC1B,UAAU,CAAoB;IAC9B,OAAO,CAAiB;IACxB,QAAQ,CAAkB;IAC1B,KAAK,CAAe;IACpB,aAAa,CAAuB;IACpC,MAAM,CAAgB;IACtB,YAAY,CAAsB;IAClC,WAAW,CAAqB;IAChC,OAAO,CAAkB;IACzC,YAAY,MAA+B,EAAE,cAAsC,mCAAgB;QAC/F,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC;YAC3B,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE;YACxB,OAAO,EAAE,MAAM,EAAE,OAAO,IAAI,OAAO;YACnC,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,IAAI,KAAK;YACnD,WAAW,EAAE,MAAM,EAAE,WAAW,IAAI,SAAS;YAC7C,KAAK,EAAE,MAAM,EAAE,KAAK;YACpB,QAAQ,EAAE,MAAM,EAAE,QAAQ;YAC1B,QAAQ,EAAE,MAAM,EA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AAI,CAAC,QAAQ,GAAG,IAAI,iCAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,GAAG,IAAI,6BAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,CAAC,YAAY,GAAG,IAAI,yCAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1D,IAAI,CAAC,WAAW,GAAG,IAAI,uCAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5D,CAAC;CACJ;AAjDD,4CAiDC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CreateTransactionDto } from './CreateTransactionDto';
|
|
2
|
+
import type { SessionReferenceDto } from './SessionReferenceDto';
|
|
2
3
|
export type CreateDepositOperationDto = {
|
|
3
4
|
/**
|
|
4
5
|
* External reference ID for the deposit operation
|
|
@@ -16,4 +17,8 @@ export type CreateDepositOperationDto = {
|
|
|
16
17
|
* Transaction details for the deposit
|
|
17
18
|
*/
|
|
18
19
|
depositTransaction: CreateTransactionDto;
|
|
20
|
+
/**
|
|
21
|
+
* Session tracking data. Provide either a sessionId to link an existing session, or inlineSession to create one.
|
|
22
|
+
*/
|
|
23
|
+
session?: SessionReferenceDto;
|
|
19
24
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DeviceDto } from './DeviceDto';
|
|
2
|
+
export type CreateSessionDto = {
|
|
3
|
+
/**
|
|
4
|
+
* ID or referenceId of the client who owns this session
|
|
5
|
+
*/
|
|
6
|
+
clientId: string;
|
|
7
|
+
/**
|
|
8
|
+
* External session reference ID from platform client
|
|
9
|
+
*/
|
|
10
|
+
referenceId?: string;
|
|
11
|
+
/**
|
|
12
|
+
* IP address of the session (IPv4 or IPv6)
|
|
13
|
+
*/
|
|
14
|
+
ipAddress: string;
|
|
15
|
+
/**
|
|
16
|
+
* Device information for this session
|
|
17
|
+
*/
|
|
18
|
+
device: DeviceDto;
|
|
19
|
+
/**
|
|
20
|
+
* Session start time. Defaults to current time if not provided
|
|
21
|
+
*/
|
|
22
|
+
startedAt?: string;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateSessionDto.js","sourceRoot":"","sources":["../../models/CreateSessionDto.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CreateTransactionDto } from './CreateTransactionDto';
|
|
2
|
+
import type { SessionReferenceDto } from './SessionReferenceDto';
|
|
2
3
|
export type CreateTradeOperationDto = {
|
|
3
4
|
/**
|
|
4
5
|
* string of the client who initiated this trade
|
|
@@ -40,6 +41,10 @@ export type CreateTradeOperationDto = {
|
|
|
40
41
|
* Status of the trade
|
|
41
42
|
*/
|
|
42
43
|
status?: CreateTradeOperationDto.status;
|
|
44
|
+
/**
|
|
45
|
+
* Session tracking data. Provide either a sessionId to link an existing session, or inlineSession to create one.
|
|
46
|
+
*/
|
|
47
|
+
session?: SessionReferenceDto;
|
|
43
48
|
};
|
|
44
49
|
export declare namespace CreateTradeOperationDto {
|
|
45
50
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateTradeOperationDto.js","sourceRoot":"","sources":["../../models/CreateTradeOperationDto.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"CreateTradeOperationDto.js","sourceRoot":"","sources":["../../models/CreateTradeOperationDto.ts"],"names":[],"mappings":";;;AAoDA,IAAiB,uBAAuB,CAkBvC;AAlBD,WAAiB,uBAAuB;IACpC;;OAEG;IACH,IAAY,SAGX;IAHD,WAAY,SAAS;QACjB,wBAAW,CAAA;QACX,0BAAa,CAAA;IACjB,CAAC,EAHW,SAAS,GAAT,iCAAS,KAAT,iCAAS,QAGpB;IACD;;OAEG;IACH,IAAY,MAMX;IAND,WAAY,MAAM;QACd,6BAAmB,CAAA;QACnB,6BAAmB,CAAA;QACnB,2BAAiB,CAAA;QACjB,6BAAmB,CAAA;QACnB,+BAAqB,CAAA;IACzB,CAAC,EANW,MAAM,GAAN,8BAAM,KAAN,8BAAM,QAMjB;AACL,CAAC,EAlBgB,uBAAuB,uCAAvB,uBAAuB,QAkBvC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CreateTransactionDto } from './CreateTransactionDto';
|
|
2
|
+
import type { SessionReferenceDto } from './SessionReferenceDto';
|
|
2
3
|
export type CreateWithdrawalOperationDto = {
|
|
3
4
|
/**
|
|
4
5
|
* External reference ID for the withdrawal operation
|
|
@@ -16,4 +17,8 @@ export type CreateWithdrawalOperationDto = {
|
|
|
16
17
|
* Transaction details
|
|
17
18
|
*/
|
|
18
19
|
withdrawTransaction: CreateTransactionDto;
|
|
20
|
+
/**
|
|
21
|
+
* Session tracking data. Provide either a sessionId to link an existing session, or inlineSession to create one.
|
|
22
|
+
*/
|
|
23
|
+
session?: SessionReferenceDto;
|
|
19
24
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type DeviceDto = {
|
|
2
|
+
/**
|
|
3
|
+
* Unique device fingerprint hash
|
|
4
|
+
*/
|
|
5
|
+
fingerprint: string;
|
|
6
|
+
/**
|
|
7
|
+
* Full user agent string
|
|
8
|
+
*/
|
|
9
|
+
userAgent?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Browser name
|
|
12
|
+
*/
|
|
13
|
+
browser?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Browser version
|
|
16
|
+
*/
|
|
17
|
+
browserVersion?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Operating system name
|
|
20
|
+
*/
|
|
21
|
+
os?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Operating system version
|
|
24
|
+
*/
|
|
25
|
+
osVersion?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Type of device
|
|
28
|
+
*/
|
|
29
|
+
deviceType?: DeviceDto.deviceType;
|
|
30
|
+
/**
|
|
31
|
+
* Screen resolution
|
|
32
|
+
*/
|
|
33
|
+
screenResolution?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Browser language
|
|
36
|
+
*/
|
|
37
|
+
language?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Timezone of the device
|
|
40
|
+
*/
|
|
41
|
+
timezone?: string;
|
|
42
|
+
};
|
|
43
|
+
export declare namespace DeviceDto {
|
|
44
|
+
/**
|
|
45
|
+
* Type of device
|
|
46
|
+
*/
|
|
47
|
+
enum deviceType {
|
|
48
|
+
DESKTOP = "DESKTOP",
|
|
49
|
+
MOBILE = "MOBILE",
|
|
50
|
+
TABLET = "TABLET",
|
|
51
|
+
UNKNOWN = "UNKNOWN"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceDto = void 0;
|
|
4
|
+
var DeviceDto;
|
|
5
|
+
(function (DeviceDto) {
|
|
6
|
+
/**
|
|
7
|
+
* Type of device
|
|
8
|
+
*/
|
|
9
|
+
let deviceType;
|
|
10
|
+
(function (deviceType) {
|
|
11
|
+
deviceType["DESKTOP"] = "DESKTOP";
|
|
12
|
+
deviceType["MOBILE"] = "MOBILE";
|
|
13
|
+
deviceType["TABLET"] = "TABLET";
|
|
14
|
+
deviceType["UNKNOWN"] = "UNKNOWN";
|
|
15
|
+
})(deviceType = DeviceDto.deviceType || (DeviceDto.deviceType = {}));
|
|
16
|
+
})(DeviceDto || (exports.DeviceDto = DeviceDto = {}));
|
|
17
|
+
//# sourceMappingURL=DeviceDto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceDto.js","sourceRoot":"","sources":["../../models/DeviceDto.ts"],"names":[],"mappings":";;;AA8CA,IAAiB,SAAS,CAUzB;AAVD,WAAiB,SAAS;IACtB;;OAEG;IACH,IAAY,UAKX;IALD,WAAY,UAAU;QAClB,iCAAmB,CAAA;QACnB,+BAAiB,CAAA;QACjB,+BAAiB,CAAA;QACjB,iCAAmB,CAAA;IACvB,CAAC,EALW,UAAU,GAAV,oBAAU,KAAV,oBAAU,QAKrB;AACL,CAAC,EAVgB,SAAS,yBAAT,SAAS,QAUzB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type DeviceResponseDto = {
|
|
2
|
+
/**
|
|
3
|
+
* Unique device fingerprint hash
|
|
4
|
+
*/
|
|
5
|
+
fingerprint: string;
|
|
6
|
+
/**
|
|
7
|
+
* Full user agent string
|
|
8
|
+
*/
|
|
9
|
+
userAgent?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Browser name
|
|
12
|
+
*/
|
|
13
|
+
browser?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Browser version
|
|
16
|
+
*/
|
|
17
|
+
browserVersion?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Operating system name
|
|
20
|
+
*/
|
|
21
|
+
os?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Operating system version
|
|
24
|
+
*/
|
|
25
|
+
osVersion?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Type of device
|
|
28
|
+
*/
|
|
29
|
+
deviceType?: DeviceResponseDto.deviceType;
|
|
30
|
+
/**
|
|
31
|
+
* Screen resolution
|
|
32
|
+
*/
|
|
33
|
+
screenResolution?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Browser language
|
|
36
|
+
*/
|
|
37
|
+
language?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Timezone of the device
|
|
40
|
+
*/
|
|
41
|
+
timezone?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Unique identifier of the device
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
export declare namespace DeviceResponseDto {
|
|
48
|
+
/**
|
|
49
|
+
* Type of device
|
|
50
|
+
*/
|
|
51
|
+
enum deviceType {
|
|
52
|
+
DESKTOP = "DESKTOP",
|
|
53
|
+
MOBILE = "MOBILE",
|
|
54
|
+
TABLET = "TABLET",
|
|
55
|
+
UNKNOWN = "UNKNOWN"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceResponseDto = void 0;
|
|
4
|
+
var DeviceResponseDto;
|
|
5
|
+
(function (DeviceResponseDto) {
|
|
6
|
+
/**
|
|
7
|
+
* Type of device
|
|
8
|
+
*/
|
|
9
|
+
let deviceType;
|
|
10
|
+
(function (deviceType) {
|
|
11
|
+
deviceType["DESKTOP"] = "DESKTOP";
|
|
12
|
+
deviceType["MOBILE"] = "MOBILE";
|
|
13
|
+
deviceType["TABLET"] = "TABLET";
|
|
14
|
+
deviceType["UNKNOWN"] = "UNKNOWN";
|
|
15
|
+
})(deviceType = DeviceResponseDto.deviceType || (DeviceResponseDto.deviceType = {}));
|
|
16
|
+
})(DeviceResponseDto || (exports.DeviceResponseDto = DeviceResponseDto = {}));
|
|
17
|
+
//# sourceMappingURL=DeviceResponseDto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceResponseDto.js","sourceRoot":"","sources":["../../models/DeviceResponseDto.ts"],"names":[],"mappings":";;;AAkDA,IAAiB,iBAAiB,CAUjC;AAVD,WAAiB,iBAAiB;IAC9B;;OAEG;IACH,IAAY,UAKX;IALD,WAAY,UAAU;QAClB,iCAAmB,CAAA;QACnB,+BAAiB,CAAA;QACjB,+BAAiB,CAAA;QACjB,iCAAmB,CAAA;IACvB,CAAC,EALW,UAAU,GAAV,4BAAU,KAAV,4BAAU,QAKrB;AACL,CAAC,EAVgB,iBAAiB,iCAAjB,iBAAiB,QAUjC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { DeviceResponseDto } from './DeviceResponseDto';
|
|
2
|
+
export type SessionDto = {
|
|
3
|
+
/**
|
|
4
|
+
* Unique identifier of the session
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* External session reference ID
|
|
9
|
+
*/
|
|
10
|
+
referenceId?: string;
|
|
11
|
+
/**
|
|
12
|
+
* IP address of the session
|
|
13
|
+
*/
|
|
14
|
+
ipAddress: string;
|
|
15
|
+
/**
|
|
16
|
+
* Geo-resolved country name
|
|
17
|
+
*/
|
|
18
|
+
geoCountry?: string;
|
|
19
|
+
/**
|
|
20
|
+
* ISO country code
|
|
21
|
+
*/
|
|
22
|
+
geoCountryCode?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Geo-resolved city
|
|
25
|
+
*/
|
|
26
|
+
geoCity?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Geo-resolved region/state
|
|
29
|
+
*/
|
|
30
|
+
geoRegion?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Latitude
|
|
33
|
+
*/
|
|
34
|
+
geoLatitude?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Longitude
|
|
37
|
+
*/
|
|
38
|
+
geoLongitude?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Timezone
|
|
41
|
+
*/
|
|
42
|
+
geoTimezone?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Internet service provider
|
|
45
|
+
*/
|
|
46
|
+
ispName?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the IP is a VPN
|
|
49
|
+
*/
|
|
50
|
+
isVpn?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the IP is a proxy
|
|
53
|
+
*/
|
|
54
|
+
isProxy?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the IP is a Tor exit node
|
|
57
|
+
*/
|
|
58
|
+
isTor?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the IP is from a datacenter
|
|
61
|
+
*/
|
|
62
|
+
isDatacenter?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Session start time
|
|
65
|
+
*/
|
|
66
|
+
startedAt: string;
|
|
67
|
+
/**
|
|
68
|
+
* Session end time
|
|
69
|
+
*/
|
|
70
|
+
endedAt?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Timestamp when the session was created
|
|
73
|
+
*/
|
|
74
|
+
createdAt: string;
|
|
75
|
+
/**
|
|
76
|
+
* Timestamp when the session was last updated
|
|
77
|
+
*/
|
|
78
|
+
updatedAt: string;
|
|
79
|
+
/**
|
|
80
|
+
* Device used in this session
|
|
81
|
+
*/
|
|
82
|
+
device?: DeviceResponseDto;
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionDto.js","sourceRoot":"","sources":["../../models/SessionDto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CreateSessionDto } from './CreateSessionDto';
|
|
2
|
+
export type SessionReferenceDto = {
|
|
3
|
+
/**
|
|
4
|
+
* ID of an existing session to link to this operation
|
|
5
|
+
*/
|
|
6
|
+
sessionId?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Inline session data to create a new session and link to this operation
|
|
9
|
+
*/
|
|
10
|
+
inlineSession?: CreateSessionDto;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionReferenceDto.js","sourceRoot":"","sources":["../../models/SessionReferenceDto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type SessionSummaryDto = {
|
|
2
|
+
/**
|
|
3
|
+
* Session ID
|
|
4
|
+
*/
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* IP address
|
|
8
|
+
*/
|
|
9
|
+
ipAddress: string;
|
|
10
|
+
/**
|
|
11
|
+
* Geo country code
|
|
12
|
+
*/
|
|
13
|
+
geoCountryCode?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Geo city
|
|
16
|
+
*/
|
|
17
|
+
geoCity?: string;
|
|
18
|
+
isVpn?: boolean;
|
|
19
|
+
isTor?: boolean;
|
|
20
|
+
isProxy?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Device fingerprint
|
|
23
|
+
*/
|
|
24
|
+
deviceFingerprint?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Device type
|
|
27
|
+
*/
|
|
28
|
+
deviceType?: string;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionSummaryDto.js","sourceRoot":"","sources":["../../models/SessionSummaryDto.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SessionSummaryDto } from './SessionSummaryDto';
|
|
1
2
|
import type { TransactionAmountDto } from './TransactionAmountDto';
|
|
2
3
|
import type { TransactionCustomFieldDto } from './TransactionCustomFieldDto';
|
|
3
4
|
import type { TransactionIntegrationsDto } from './TransactionIntegrationsDto';
|
|
@@ -72,6 +73,10 @@ export type TransactionDto = {
|
|
|
72
73
|
* Integrations data for the transaction
|
|
73
74
|
*/
|
|
74
75
|
integrations?: TransactionIntegrationsDto;
|
|
76
|
+
/**
|
|
77
|
+
* Session data associated with this transaction (IP, device, geo-location)
|
|
78
|
+
*/
|
|
79
|
+
session?: SessionSummaryDto;
|
|
75
80
|
};
|
|
76
81
|
export declare namespace TransactionDto {
|
|
77
82
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionDto.js","sourceRoot":"","sources":["../../models/TransactionDto.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"TransactionDto.js","sourceRoot":"","sources":["../../models/TransactionDto.ts"],"names":[],"mappings":";;;AAoFA,IAAiB,cAAc,CAgB9B;AAhBD,WAAiB,cAAc;IAC3B;;OAEG;IACH,IAAY,IAIX;IAJD,WAAY,IAAI;QACZ,2BAAmB,CAAA;QACnB,6BAAqB,CAAA;QACrB,uBAAe,CAAA;IACnB,CAAC,EAJW,IAAI,GAAJ,mBAAI,KAAJ,mBAAI,QAIf;IACD;;OAEG;IACH,IAAY,WAGX;IAHD,WAAY,WAAW;QACnB,0BAAW,CAAA;QACX,4BAAa,CAAA;IACjB,CAAC,EAHW,WAAW,GAAX,0BAAW,KAAX,0BAAW,QAGtB;AACL,CAAC,EAhBgB,cAAc,8BAAd,cAAc,QAgB9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateSessionDto.js","sourceRoot":"","sources":["../../models/UpdateSessionDto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CreateSessionDto } from '../models/CreateSessionDto';
|
|
2
|
+
import type { SessionDto } from '../models/SessionDto';
|
|
3
|
+
import type { UpdateSessionDto } from '../models/UpdateSessionDto';
|
|
4
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
5
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
6
|
+
export declare class SessionsService {
|
|
7
|
+
readonly httpRequest: BaseHttpRequest;
|
|
8
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
9
|
+
/**
|
|
10
|
+
* Create a new client session with device fingerprint and IP address. The server resolves IP to geo-location automatically.
|
|
11
|
+
* @param requestBody
|
|
12
|
+
* @returns SessionDto
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
createSession(requestBody: CreateSessionDto): CancelablePromise<SessionDto>;
|
|
16
|
+
/**
|
|
17
|
+
* Get a session by ID or referenceId
|
|
18
|
+
* @param id
|
|
19
|
+
* @returns SessionDto
|
|
20
|
+
* @throws ApiError
|
|
21
|
+
*/
|
|
22
|
+
getSession(id: string): CancelablePromise<SessionDto>;
|
|
23
|
+
/**
|
|
24
|
+
* Update session properties such as setting the endedAt timestamp
|
|
25
|
+
* @param id
|
|
26
|
+
* @param requestBody
|
|
27
|
+
* @returns SessionDto
|
|
28
|
+
* @throws ApiError
|
|
29
|
+
*/
|
|
30
|
+
updateSession(id: string, requestBody: UpdateSessionDto): CancelablePromise<SessionDto>;
|
|
31
|
+
/**
|
|
32
|
+
* List the most recent sessions for a given client
|
|
33
|
+
* @param clientId
|
|
34
|
+
* @returns SessionDto
|
|
35
|
+
* @throws ApiError
|
|
36
|
+
*/
|
|
37
|
+
getClientSessions(clientId: string): CancelablePromise<Array<SessionDto>>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SessionsService = void 0;
|
|
4
|
+
class SessionsService {
|
|
5
|
+
httpRequest;
|
|
6
|
+
constructor(httpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Create a new client session with device fingerprint and IP address. The server resolves IP to geo-location automatically.
|
|
11
|
+
* @param requestBody
|
|
12
|
+
* @returns SessionDto
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
createSession(requestBody) {
|
|
16
|
+
return this.httpRequest.request({
|
|
17
|
+
method: 'POST',
|
|
18
|
+
url: '/v1/sessions',
|
|
19
|
+
body: requestBody,
|
|
20
|
+
mediaType: 'application/json',
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get a session by ID or referenceId
|
|
25
|
+
* @param id
|
|
26
|
+
* @returns SessionDto
|
|
27
|
+
* @throws ApiError
|
|
28
|
+
*/
|
|
29
|
+
getSession(id) {
|
|
30
|
+
return this.httpRequest.request({
|
|
31
|
+
method: 'GET',
|
|
32
|
+
url: '/v1/sessions/{id}',
|
|
33
|
+
path: {
|
|
34
|
+
'id': id,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Update session properties such as setting the endedAt timestamp
|
|
40
|
+
* @param id
|
|
41
|
+
* @param requestBody
|
|
42
|
+
* @returns SessionDto
|
|
43
|
+
* @throws ApiError
|
|
44
|
+
*/
|
|
45
|
+
updateSession(id, requestBody) {
|
|
46
|
+
return this.httpRequest.request({
|
|
47
|
+
method: 'PUT',
|
|
48
|
+
url: '/v1/sessions/{id}',
|
|
49
|
+
path: {
|
|
50
|
+
'id': id,
|
|
51
|
+
},
|
|
52
|
+
body: requestBody,
|
|
53
|
+
mediaType: 'application/json',
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* List the most recent sessions for a given client
|
|
58
|
+
* @param clientId
|
|
59
|
+
* @returns SessionDto
|
|
60
|
+
* @throws ApiError
|
|
61
|
+
*/
|
|
62
|
+
getClientSessions(clientId) {
|
|
63
|
+
return this.httpRequest.request({
|
|
64
|
+
method: 'GET',
|
|
65
|
+
url: '/v1/clients/{clientId}/sessions',
|
|
66
|
+
path: {
|
|
67
|
+
'clientId': clientId,
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.SessionsService = SessionsService;
|
|
73
|
+
//# sourceMappingURL=SessionsService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionsService.js","sourceRoot":"","sources":["../../services/SessionsService.ts"],"names":[],"mappings":";;;AASA,MAAa,eAAe;IACI;IAA5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;OAKG;IACI,aAAa,CAChB,WAA6B;QAE7B,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;OAKG;IACI,UAAU,CACb,EAAU;QAEV,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mBAAmB;YACxB,IAAI,EAAE;gBACF,IAAI,EAAE,EAAE;aACX;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,aAAa,CAChB,EAAU,EACV,WAA6B;QAE7B,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mBAAmB;YACxB,IAAI,EAAE;gBACF,IAAI,EAAE,EAAE;aACX;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;OAKG;IACI,iBAAiB,CACpB,QAAgB;QAEhB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,iCAAiC;YACtC,IAAI,EAAE;gBACF,UAAU,EAAE,QAAQ;aACvB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AAzED,0CAyEC"}
|