@pixelpay/sdk-core 1.0.0-beta.0 → 2.0.0-beta.2
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/.vscode/launch.json +25 -0
- package/babel.config.js +6 -0
- package/index.html +454 -0
- package/jest.config.js +5 -0
- package/lib/base/Helpers.d.ts +17 -0
- package/lib/base/Helpers.js +43 -4
- package/lib/base/Helpers.js.map +1 -1
- package/lib/base/RequestBehaviour.d.ts +1 -1
- package/lib/base/RequestBehaviour.js +16 -0
- package/lib/base/RequestBehaviour.js.map +1 -1
- package/lib/base/Response.d.ts +1 -1
- package/lib/base/Response.js +20 -0
- package/lib/base/Response.js.map +1 -1
- package/lib/base/ServiceBehaviour.d.ts +16 -42
- package/lib/base/ServiceBehaviour.js +64 -73
- package/lib/base/ServiceBehaviour.js.map +1 -1
- package/lib/browser/index.js +18 -0
- package/lib/entities/CardResult.d.ts +74 -0
- package/lib/entities/CardResult.js +90 -0
- package/lib/entities/CardResult.js.map +1 -0
- package/lib/entities/TransactionResult.d.ts +97 -0
- package/lib/entities/TransactionResult.js +120 -0
- package/lib/entities/TransactionResult.js.map +1 -0
- package/lib/index.d.ts +41 -27
- package/lib/index.js +40 -28
- package/lib/index.js.map +1 -1
- package/lib/libraries/CardinalManager.d.ts +47 -0
- package/lib/libraries/CardinalManager.js +254 -0
- package/lib/libraries/CardinalManager.js.map +1 -0
- package/lib/libraries/PayloadManager.d.ts +26 -0
- package/lib/libraries/PayloadManager.js +106 -0
- package/lib/libraries/PayloadManager.js.map +1 -0
- package/lib/libraries/PixelPayLoading.d.ts +7 -0
- package/lib/libraries/PixelPayLoading.js +44 -0
- package/lib/libraries/PixelPayLoading.js.map +1 -0
- package/lib/libraries/PixelPayModal.d.ts +12 -0
- package/lib/libraries/PixelPayModal.js +72 -0
- package/lib/libraries/PixelPayModal.js.map +1 -0
- package/lib/models/Billing.js +24 -0
- package/lib/models/Billing.js.map +1 -1
- package/lib/models/Card.js +23 -0
- package/lib/models/Card.js.map +1 -1
- package/lib/models/Item.js +24 -0
- package/lib/models/Item.js.map +1 -1
- package/lib/models/Order.js +47 -0
- package/lib/models/Order.js.map +1 -1
- package/lib/models/Settings.d.ts +65 -0
- package/lib/models/Settings.js +90 -0
- package/lib/models/Settings.js.map +1 -0
- package/lib/requests/AuthTransaction.d.ts +3 -0
- package/lib/{mappings/VoidTransaction.js → requests/AuthTransaction.js} +7 -7
- package/lib/requests/AuthTransaction.js.map +1 -0
- package/lib/{mappings → requests}/CaptureTransaction.d.ts +2 -2
- package/lib/{mappings → requests}/CaptureTransaction.js +12 -3
- package/lib/requests/CaptureTransaction.js.map +1 -0
- package/lib/{mappings → requests}/CardTokenization.d.ts +0 -4
- package/lib/{mappings → requests}/CardTokenization.js +51 -2
- package/lib/requests/CardTokenization.js.map +1 -0
- package/lib/requests/LookupContinueTransaction.d.ts +11 -0
- package/lib/{mappings/CustomerTokenization.js → requests/LookupContinueTransaction.js} +18 -9
- package/lib/requests/LookupContinueTransaction.js.map +1 -0
- package/lib/requests/LookupTransaction.d.ts +68 -0
- package/lib/requests/LookupTransaction.js +107 -0
- package/lib/requests/LookupTransaction.js.map +1 -0
- package/lib/{mappings/AuthTransaction.d.ts → requests/PaymentTransaction.d.ts} +20 -5
- package/lib/requests/PaymentTransaction.js +190 -0
- package/lib/requests/PaymentTransaction.js.map +1 -0
- package/lib/requests/SaleTransaction.d.ts +3 -0
- package/lib/{mappings → requests}/SaleTransaction.js +2 -2
- package/lib/requests/SaleTransaction.js.map +1 -0
- package/lib/requests/StatusTransaction.d.ts +7 -0
- package/lib/{mappings → requests}/StatusTransaction.js +8 -3
- package/lib/requests/StatusTransaction.js.map +1 -0
- package/lib/{mappings → requests}/VoidTransaction.d.ts +2 -2
- package/lib/{base/PaymentTransaction.js → requests/VoidTransaction.js} +17 -8
- package/lib/requests/VoidTransaction.js.map +1 -0
- package/lib/resources/Environment.d.ts +6 -0
- package/lib/resources/Environment.js +13 -0
- package/lib/resources/Environment.js.map +1 -0
- package/lib/resources/Locations.d.ts +16 -0
- package/lib/resources/Locations.js +27 -0
- package/lib/resources/Locations.js.map +1 -0
- package/lib/{resources → responses}/ErrorResponse.d.ts +0 -0
- package/lib/{resources → responses}/ErrorResponse.js +0 -0
- package/lib/{resources → responses}/ErrorResponse.js.map +1 -1
- package/lib/{resources → responses}/FailureResponse.d.ts +0 -0
- package/lib/{resources → responses}/FailureResponse.js +0 -0
- package/lib/{resources → responses}/FailureResponse.js.map +1 -1
- package/lib/{resources → responses}/InputErrorResponse.d.ts +0 -0
- package/lib/{resources → responses}/InputErrorResponse.js +0 -0
- package/lib/{resources → responses}/InputErrorResponse.js.map +1 -1
- package/lib/{resources → responses}/NetworkFailureResponse.d.ts +0 -0
- package/lib/{resources → responses}/NetworkFailureResponse.js +0 -0
- package/lib/{resources → responses}/NetworkFailureResponse.js.map +1 -1
- package/lib/{resources → responses}/NoAccessResponse.d.ts +0 -0
- package/lib/{resources → responses}/NoAccessResponse.js +0 -0
- package/lib/{resources → responses}/NoAccessResponse.js.map +1 -1
- package/lib/{resources → responses}/NotFoundResponse.d.ts +0 -0
- package/lib/{resources → responses}/NotFoundResponse.js +0 -0
- package/lib/{resources → responses}/NotFoundResponse.js.map +1 -1
- package/lib/{resources → responses}/PayloadResponse.d.ts +0 -0
- package/lib/{resources → responses}/PayloadResponse.js +0 -0
- package/lib/{resources → responses}/PayloadResponse.js.map +1 -1
- package/lib/{resources → responses}/PaymentDeclinedResponse.d.ts +0 -0
- package/lib/{resources → responses}/PaymentDeclinedResponse.js +0 -0
- package/lib/{resources → responses}/PaymentDeclinedResponse.js.map +1 -1
- package/lib/{resources → responses}/PreconditionalResponse.d.ts +0 -0
- package/lib/{resources → responses}/PreconditionalResponse.js +0 -0
- package/lib/{resources → responses}/PreconditionalResponse.js.map +1 -1
- package/lib/{resources → responses}/SuccessResponse.d.ts +0 -0
- package/lib/{resources → responses}/SuccessResponse.js +0 -0
- package/lib/{resources → responses}/SuccessResponse.js.map +1 -1
- package/lib/responses/TimeoutResponse.d.ts +3 -0
- package/lib/responses/TimeoutResponse.js +27 -0
- package/lib/responses/TimeoutResponse.js.map +1 -0
- package/lib/services/CardinalAuthentication.d.ts +19 -0
- package/lib/services/CardinalAuthentication.js +56 -0
- package/lib/services/CardinalAuthentication.js.map +1 -0
- package/lib/services/Tokenization.d.ts +5 -14
- package/lib/services/Tokenization.js +87 -20
- package/lib/services/Tokenization.js.map +1 -1
- package/lib/services/Transaction.d.ts +54 -5
- package/lib/services/Transaction.js +193 -25
- package/lib/services/Transaction.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/web.d.ts +28 -0
- package/package.json +16 -5
- package/{test.js → test-node.js} +0 -0
- package/tests/Locations.test.ts +9 -0
- package/tests/Models/Card.test.ts +33 -0
- package/tests/Models/Order.test.ts +64 -0
- package/tests/Models/Settings.test.ts +65 -0
- package/tests/Tokenization.test.ts +229 -0
- package/tests/Transaction.test.ts +342 -0
- package/webpack.mix.js +12 -0
- package/lib/base/PaymentTransaction.d.ts +0 -3
- package/lib/base/PaymentTransaction.js.map +0 -1
- package/lib/mappings/AuthTransaction.js +0 -78
- package/lib/mappings/AuthTransaction.js.map +0 -1
- package/lib/mappings/CaptureTransaction.js.map +0 -1
- package/lib/mappings/CardTokenization.js.map +0 -1
- package/lib/mappings/CustomerTokenization.d.ts +0 -7
- package/lib/mappings/CustomerTokenization.js.map +0 -1
- package/lib/mappings/SaleTransaction.d.ts +0 -3
- package/lib/mappings/SaleTransaction.js.map +0 -1
- package/lib/mappings/StatusTransaction.d.ts +0 -7
- package/lib/mappings/StatusTransaction.js.map +0 -1
- package/lib/mappings/VoidTransaction.js.map +0 -1
- package/lib/models/CardToken.d.ts +0 -14
- package/lib/models/CardToken.js +0 -9
- package/lib/models/CardToken.js.map +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var ServiceBehaviour_1 = require("../base/ServiceBehaviour");
|
|
19
|
+
var SaleTransaction_1 = require("../requests/SaleTransaction");
|
|
20
|
+
var AuthTransaction_1 = require("../requests/AuthTransaction");
|
|
21
|
+
var InvalidTransactionTypeException_1 = require("../exceptions/InvalidTransactionTypeException");
|
|
22
|
+
var CardinalAuthentication = /** @class */ (function (_super) {
|
|
23
|
+
__extends(CardinalAuthentication, _super);
|
|
24
|
+
function CardinalAuthentication() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Send an authentication lookup transaction
|
|
29
|
+
*/
|
|
30
|
+
CardinalAuthentication.prototype.authenticationLookup = function (transaction) {
|
|
31
|
+
return this.post("api/v2/cardinal/authentication/lookup", transaction);
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Send and validate authentication continue transaction
|
|
35
|
+
*/
|
|
36
|
+
CardinalAuthentication.prototype.authenticationContinue = function (transaction) {
|
|
37
|
+
return this.post("api/v2/cardinal/authentication/continue", transaction);
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Send payment transaction by type (Sale/Auth)
|
|
41
|
+
*/
|
|
42
|
+
CardinalAuthentication.prototype.retryTransaction = function (transaction) {
|
|
43
|
+
if (transaction instanceof SaleTransaction_1.default) {
|
|
44
|
+
return this.post("api/v2/transaction/sale", transaction);
|
|
45
|
+
}
|
|
46
|
+
else if (transaction instanceof AuthTransaction_1.default) {
|
|
47
|
+
return this.post("api/v2/transaction/auth", transaction);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
throw new InvalidTransactionTypeException_1.default("The request payment type is invalid.");
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return CardinalAuthentication;
|
|
54
|
+
}(ServiceBehaviour_1.default));
|
|
55
|
+
exports.default = CardinalAuthentication;
|
|
56
|
+
//# sourceMappingURL=CardinalAuthentication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardinalAuthentication.js","sourceRoot":"","sources":["../../src/services/CardinalAuthentication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,6DAAwD;AAIxD,+DAA0D;AAC1D,+DAA0D;AAC1D,iGAA4F;AAE5F;IAAoD,0CAAgB;IAApE;;IA2BA,CAAC;IA1BA;;OAEG;IACH,qDAAoB,GAApB,UAAqB,WAA8B;QAClD,OAAO,IAAI,CAAC,IAAI,CAAC,uCAAuC,EAAE,WAAW,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,uDAAsB,GAAtB,UAAuB,WAAsC;QAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,yCAAyC,EAAE,WAAW,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,iDAAgB,GAAhB,UAAiB,WAA+B;QAC/C,IAAI,WAAW,YAAY,yBAAe,EAAE;YAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAC;SACzD;aAAM,IAAI,WAAW,YAAY,yBAAe,EAAE;YAClD,OAAO,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAC;SACzD;aAAM;YACN,MAAM,IAAI,yCAA+B,CAAC,sCAAsC,CAAC,CAAC;SAClF;IACF,CAAC;IACF,6BAAC;AAAD,CAAC,AA3BD,CAAoD,0BAAgB,GA2BnE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Response from "../base/Response";
|
|
2
2
|
import ServiceBehaviour from "../base/ServiceBehaviour";
|
|
3
|
-
import CardTokenization from '../
|
|
4
|
-
import CustomerTokenization from "../mappings/CustomerTokenization";
|
|
3
|
+
import CardTokenization from '../requests/CardTokenization';
|
|
5
4
|
export default class Tokenization extends ServiceBehaviour {
|
|
6
5
|
/**
|
|
7
6
|
* Vault credit/debit card and obtain a token card identifier (T-* format)
|
|
@@ -29,27 +28,19 @@ export default class Tokenization extends ServiceBehaviour {
|
|
|
29
28
|
*/
|
|
30
29
|
showCard(token: string): Promise<Response>;
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
31
|
+
* Show credit/debit card metadata by token card identifier
|
|
33
32
|
*
|
|
34
33
|
* @param token
|
|
35
34
|
* @return
|
|
36
35
|
* @throws InvalidCredentialsException
|
|
37
36
|
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Create a new customer by E-mail and obtain a token customer identifier (C-* format)
|
|
41
|
-
*
|
|
42
|
-
* @param email
|
|
43
|
-
* @return
|
|
44
|
-
* @throws InvalidCredentialsException
|
|
45
|
-
*/
|
|
46
|
-
createCustomer(customer: CustomerTokenization): Promise<Response>;
|
|
37
|
+
showCards(tokens: string[]): Promise<Response>;
|
|
47
38
|
/**
|
|
48
|
-
*
|
|
39
|
+
* Delete credit/debit card metadata by token card identifier
|
|
49
40
|
*
|
|
50
41
|
* @param token
|
|
51
42
|
* @return
|
|
52
43
|
* @throws InvalidCredentialsException
|
|
53
44
|
*/
|
|
54
|
-
|
|
45
|
+
deleteCard(token: string): Promise<Response>;
|
|
55
46
|
}
|
|
@@ -14,10 +14,47 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
17
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var RequestBehaviour_1 = require("../base/RequestBehaviour");
|
|
18
55
|
var ServiceBehaviour_1 = require("../base/ServiceBehaviour");
|
|
56
|
+
var PixelPayLoading_1 = require("../libraries/PixelPayLoading");
|
|
19
57
|
var BASE_CARD_PATH = "api/v2/tokenization/card";
|
|
20
|
-
var BASE_CUSTOMER_PATH = "api/v2/tokenization/customer";
|
|
21
58
|
var Tokenization = /** @class */ (function (_super) {
|
|
22
59
|
__extends(Tokenization, _super);
|
|
23
60
|
function Tokenization() {
|
|
@@ -31,7 +68,20 @@ var Tokenization = /** @class */ (function (_super) {
|
|
|
31
68
|
* @throws InvalidCredentialsException
|
|
32
69
|
*/
|
|
33
70
|
Tokenization.prototype.vaultCard = function (card) {
|
|
34
|
-
return this
|
|
71
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
+
var response;
|
|
73
|
+
return __generator(this, function (_a) {
|
|
74
|
+
switch (_a.label) {
|
|
75
|
+
case 0:
|
|
76
|
+
PixelPayLoading_1.default.show();
|
|
77
|
+
return [4 /*yield*/, this.post(BASE_CARD_PATH, card)];
|
|
78
|
+
case 1:
|
|
79
|
+
response = _a.sent();
|
|
80
|
+
PixelPayLoading_1.default.hide();
|
|
81
|
+
return [2 /*return*/, response];
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
});
|
|
35
85
|
};
|
|
36
86
|
/**
|
|
37
87
|
* Update credit/debit card by token card identifier
|
|
@@ -42,7 +92,20 @@ var Tokenization = /** @class */ (function (_super) {
|
|
|
42
92
|
* @throws InvalidCredentialsException
|
|
43
93
|
*/
|
|
44
94
|
Tokenization.prototype.updateCard = function (token, card) {
|
|
45
|
-
return this
|
|
95
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
+
var response;
|
|
97
|
+
return __generator(this, function (_a) {
|
|
98
|
+
switch (_a.label) {
|
|
99
|
+
case 0:
|
|
100
|
+
PixelPayLoading_1.default.show();
|
|
101
|
+
return [4 /*yield*/, this.put(BASE_CARD_PATH + "/" + token, card)];
|
|
102
|
+
case 1:
|
|
103
|
+
response = _a.sent();
|
|
104
|
+
PixelPayLoading_1.default.hide();
|
|
105
|
+
return [2 /*return*/, response];
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
});
|
|
46
109
|
};
|
|
47
110
|
/**
|
|
48
111
|
* Show credit/debit card metadata by token card identifier
|
|
@@ -52,37 +115,41 @@ var Tokenization = /** @class */ (function (_super) {
|
|
|
52
115
|
* @throws InvalidCredentialsException
|
|
53
116
|
*/
|
|
54
117
|
Tokenization.prototype.showCard = function (token) {
|
|
55
|
-
return this.get(BASE_CARD_PATH + "/" + token);
|
|
118
|
+
return this.get(BASE_CARD_PATH + "/" + token, new RequestBehaviour_1.default());
|
|
56
119
|
};
|
|
57
120
|
/**
|
|
58
|
-
*
|
|
121
|
+
* Show credit/debit card metadata by token card identifier
|
|
59
122
|
*
|
|
60
123
|
* @param token
|
|
61
124
|
* @return
|
|
62
125
|
* @throws InvalidCredentialsException
|
|
63
126
|
*/
|
|
64
|
-
Tokenization.prototype.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Create a new customer by E-mail and obtain a token customer identifier (C-* format)
|
|
69
|
-
*
|
|
70
|
-
* @param email
|
|
71
|
-
* @return
|
|
72
|
-
* @throws InvalidCredentialsException
|
|
73
|
-
*/
|
|
74
|
-
Tokenization.prototype.createCustomer = function (customer) {
|
|
75
|
-
return this.post(BASE_CUSTOMER_PATH, customer);
|
|
127
|
+
Tokenization.prototype.showCards = function (tokens) {
|
|
128
|
+
var str = tokens.join(':');
|
|
129
|
+
return this.get(BASE_CARD_PATH + "/" + str.split(' ').join(''), new RequestBehaviour_1.default());
|
|
76
130
|
};
|
|
77
131
|
/**
|
|
78
|
-
*
|
|
132
|
+
* Delete credit/debit card metadata by token card identifier
|
|
79
133
|
*
|
|
80
134
|
* @param token
|
|
81
135
|
* @return
|
|
82
136
|
* @throws InvalidCredentialsException
|
|
83
137
|
*/
|
|
84
|
-
Tokenization.prototype.
|
|
85
|
-
return this
|
|
138
|
+
Tokenization.prototype.deleteCard = function (token) {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
140
|
+
var response;
|
|
141
|
+
return __generator(this, function (_a) {
|
|
142
|
+
switch (_a.label) {
|
|
143
|
+
case 0:
|
|
144
|
+
PixelPayLoading_1.default.show();
|
|
145
|
+
return [4 /*yield*/, this.delete(BASE_CARD_PATH + "/" + token, new RequestBehaviour_1.default())];
|
|
146
|
+
case 1:
|
|
147
|
+
response = _a.sent();
|
|
148
|
+
PixelPayLoading_1.default.hide();
|
|
149
|
+
return [2 /*return*/, response];
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
});
|
|
86
153
|
};
|
|
87
154
|
return Tokenization;
|
|
88
155
|
}(ServiceBehaviour_1.default));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tokenization.js","sourceRoot":"","sources":["../../src/services/Tokenization.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tokenization.js","sourceRoot":"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,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;OAMG;IACG,iCAAU,GAAhB,UAAiB,KAAa;;;;;;wBAC7B,yBAAO,CAAC,IAAI,EAAE,CAAC;wBACE,qBAAM,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,GAAG,GAAG,KAAK,EAAE,IAAI,0BAAgB,EAAE,CAAC,EAAA;;wBAAlF,QAAQ,GAAG,SAAuE;wBACxF,yBAAO,CAAC,IAAI,EAAE,CAAC;wBAEf,sBAAO,QAAQ,EAAC;;;;KAChB;IACF,mBAAC;AAAD,CAAC,AArED,CAA0C,0BAAgB,GAqEzD"}
|
|
@@ -1,14 +1,63 @@
|
|
|
1
|
-
import PaymentTransaction from "../base/PaymentTransaction";
|
|
2
|
-
import ServiceBehaviour from '../base/ServiceBehaviour';
|
|
3
1
|
import Response from "../base/Response";
|
|
2
|
+
import ServiceBehaviour from '../base/ServiceBehaviour';
|
|
3
|
+
import SaleTransaction from '../requests/SaleTransaction';
|
|
4
|
+
import AuthTransaction from '../requests/AuthTransaction';
|
|
5
|
+
import CaptureTransaction from '../requests/CaptureTransaction';
|
|
6
|
+
import VoidTransaction from '../requests/VoidTransaction';
|
|
7
|
+
import StatusTransaction from '../requests/StatusTransaction';
|
|
8
|
+
import Settings from '../models/Settings';
|
|
4
9
|
export default class Transaction extends ServiceBehaviour {
|
|
5
10
|
/**
|
|
6
|
-
*
|
|
11
|
+
* Initialize service
|
|
12
|
+
*/
|
|
13
|
+
constructor(settings: Settings);
|
|
14
|
+
/**
|
|
15
|
+
* Send and proccesing SALE transaction
|
|
16
|
+
*
|
|
17
|
+
* @param transaction
|
|
18
|
+
* @return
|
|
19
|
+
* @throws InvalidCredentialsException
|
|
20
|
+
*/
|
|
21
|
+
doSale(transaction: SaleTransaction): Promise<Response>;
|
|
22
|
+
/**
|
|
23
|
+
* Send and proccesing AUTH transaction
|
|
24
|
+
*
|
|
25
|
+
* @param transaction
|
|
26
|
+
* @return
|
|
27
|
+
* @throws InvalidCredentialsException
|
|
28
|
+
*/
|
|
29
|
+
doAuth(transaction: AuthTransaction): Promise<Response>;
|
|
30
|
+
/**
|
|
31
|
+
* Send and proccesing CAPTURE transaction
|
|
7
32
|
*
|
|
8
33
|
* @param transaction
|
|
9
34
|
* @return
|
|
10
35
|
* @throws InvalidCredentialsException
|
|
11
|
-
* @throws InvalidTransactionTypeException
|
|
12
36
|
*/
|
|
13
|
-
|
|
37
|
+
doCapture(transaction: CaptureTransaction): Promise<Response>;
|
|
38
|
+
/**
|
|
39
|
+
* Send and proccesing VOID transaction
|
|
40
|
+
*
|
|
41
|
+
* @param transaction
|
|
42
|
+
* @return
|
|
43
|
+
* @throws InvalidCredentialsException
|
|
44
|
+
*/
|
|
45
|
+
doVoid(transaction: VoidTransaction): Promise<Response>;
|
|
46
|
+
/**
|
|
47
|
+
* Send and proccesing SALE transaction
|
|
48
|
+
*
|
|
49
|
+
* @param transaction
|
|
50
|
+
* @return
|
|
51
|
+
* @throws InvalidCredentialsException
|
|
52
|
+
*/
|
|
53
|
+
getStatus(transaction: StatusTransaction): Promise<Response>;
|
|
54
|
+
/**
|
|
55
|
+
* Verify a payment hash and returns true if payment response is not modified
|
|
56
|
+
*
|
|
57
|
+
* @param hash
|
|
58
|
+
* @param order_id
|
|
59
|
+
* @param secret
|
|
60
|
+
* @return
|
|
61
|
+
*/
|
|
62
|
+
verifyPaymentHash(hash: string, order_id: string, secret: string): boolean;
|
|
14
63
|
}
|
|
@@ -14,44 +14,212 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
17
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
var
|
|
19
|
-
var AuthTransaction_1 = require("../mappings/AuthTransaction");
|
|
20
|
-
var CaptureTransaction_1 = require("../mappings/CaptureTransaction");
|
|
21
|
-
var StatusTransaction_1 = require("../mappings/StatusTransaction");
|
|
22
|
-
var VoidTransaction_1 = require("../mappings/VoidTransaction");
|
|
54
|
+
var Helpers_1 = require("../base/Helpers");
|
|
23
55
|
var ServiceBehaviour_1 = require("../base/ServiceBehaviour");
|
|
24
56
|
var InvalidTransactionTypeException_1 = require("../exceptions/InvalidTransactionTypeException");
|
|
57
|
+
var PixelPayLoading_1 = require("../libraries/PixelPayLoading");
|
|
58
|
+
var PayloadResponse_1 = require("../responses/PayloadResponse");
|
|
59
|
+
var CardinalManager_1 = require("../libraries/CardinalManager");
|
|
60
|
+
var PayloadManager_1 = require("../libraries/PayloadManager");
|
|
25
61
|
var Transaction = /** @class */ (function (_super) {
|
|
26
62
|
__extends(Transaction, _super);
|
|
27
|
-
|
|
28
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Initialize service
|
|
65
|
+
*/
|
|
66
|
+
function Transaction(settings) {
|
|
67
|
+
return _super.call(this, settings) || this;
|
|
29
68
|
}
|
|
30
69
|
/**
|
|
31
|
-
* Send and
|
|
70
|
+
* Send and proccesing SALE transaction
|
|
32
71
|
*
|
|
33
72
|
* @param transaction
|
|
34
73
|
* @return
|
|
35
74
|
* @throws InvalidCredentialsException
|
|
36
|
-
* @throws InvalidTransactionTypeException
|
|
37
75
|
*/
|
|
38
|
-
Transaction.prototype.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
76
|
+
Transaction.prototype.doSale = function (transaction) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
+
var response, err_1;
|
|
79
|
+
return __generator(this, function (_a) {
|
|
80
|
+
switch (_a.label) {
|
|
81
|
+
case 0:
|
|
82
|
+
if (transaction.authentication_request && !Helpers_1.default.checkIsBrowser()) {
|
|
83
|
+
throw new InvalidTransactionTypeException_1.default("This platform not support 3DS transactions");
|
|
84
|
+
}
|
|
85
|
+
_a.label = 1;
|
|
86
|
+
case 1:
|
|
87
|
+
_a.trys.push([1, 7, , 8]);
|
|
88
|
+
PixelPayLoading_1.default.show();
|
|
89
|
+
return [4 /*yield*/, this.post("api/v2/transaction/sale", transaction)];
|
|
90
|
+
case 2:
|
|
91
|
+
response = _a.sent();
|
|
92
|
+
if (!(response instanceof PayloadResponse_1.default && response.data.transaction_type == 'songbird')) return [3 /*break*/, 4];
|
|
93
|
+
return [4 /*yield*/, (new CardinalManager_1.default(this.settings, transaction)).init(response.data.payload)];
|
|
94
|
+
case 3: return [2 /*return*/, _a.sent()];
|
|
95
|
+
case 4:
|
|
96
|
+
if (!(response instanceof PayloadResponse_1.default && response.data.transaction_type == 'payload')) return [3 /*break*/, 6];
|
|
97
|
+
return [4 /*yield*/, (new PayloadManager_1.default(this.settings)).loadPayload(response.data.payload)];
|
|
98
|
+
case 5: return [2 /*return*/, _a.sent()];
|
|
99
|
+
case 6:
|
|
100
|
+
CardinalManager_1.default.clearAllEvents();
|
|
101
|
+
return [2 /*return*/, response];
|
|
102
|
+
case 7:
|
|
103
|
+
err_1 = _a.sent();
|
|
104
|
+
CardinalManager_1.default.clearAllEvents();
|
|
105
|
+
throw err_1;
|
|
106
|
+
case 8: return [2 /*return*/];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Send and proccesing AUTH transaction
|
|
113
|
+
*
|
|
114
|
+
* @param transaction
|
|
115
|
+
* @return
|
|
116
|
+
* @throws InvalidCredentialsException
|
|
117
|
+
*/
|
|
118
|
+
Transaction.prototype.doAuth = function (transaction) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
120
|
+
var response, err_2;
|
|
121
|
+
return __generator(this, function (_a) {
|
|
122
|
+
switch (_a.label) {
|
|
123
|
+
case 0:
|
|
124
|
+
if (transaction.authentication_request && !Helpers_1.default.checkIsBrowser()) {
|
|
125
|
+
throw new InvalidTransactionTypeException_1.default("This platform not support 3DS transactions");
|
|
126
|
+
}
|
|
127
|
+
_a.label = 1;
|
|
128
|
+
case 1:
|
|
129
|
+
_a.trys.push([1, 7, , 8]);
|
|
130
|
+
PixelPayLoading_1.default.show();
|
|
131
|
+
return [4 /*yield*/, this.post("api/v2/transaction/auth", transaction)];
|
|
132
|
+
case 2:
|
|
133
|
+
response = _a.sent();
|
|
134
|
+
if (!(response instanceof PayloadResponse_1.default && response.data.transaction_type == 'songbird')) return [3 /*break*/, 4];
|
|
135
|
+
return [4 /*yield*/, (new CardinalManager_1.default(this.settings, transaction)).init(response.data.payload)];
|
|
136
|
+
case 3: return [2 /*return*/, _a.sent()];
|
|
137
|
+
case 4:
|
|
138
|
+
if (!(response instanceof PayloadResponse_1.default && response.data.transaction_type == 'payload')) return [3 /*break*/, 6];
|
|
139
|
+
return [4 /*yield*/, (new PayloadManager_1.default(this.settings)).loadPayload(response.data.payload)];
|
|
140
|
+
case 5: return [2 /*return*/, _a.sent()];
|
|
141
|
+
case 6:
|
|
142
|
+
CardinalManager_1.default.clearAllEvents();
|
|
143
|
+
return [2 /*return*/, response];
|
|
144
|
+
case 7:
|
|
145
|
+
err_2 = _a.sent();
|
|
146
|
+
CardinalManager_1.default.clearAllEvents();
|
|
147
|
+
throw err_2;
|
|
148
|
+
case 8: return [2 /*return*/];
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Send and proccesing CAPTURE transaction
|
|
155
|
+
*
|
|
156
|
+
* @param transaction
|
|
157
|
+
* @return
|
|
158
|
+
* @throws InvalidCredentialsException
|
|
159
|
+
*/
|
|
160
|
+
Transaction.prototype.doCapture = function (transaction) {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
162
|
+
var response;
|
|
163
|
+
return __generator(this, function (_a) {
|
|
164
|
+
switch (_a.label) {
|
|
165
|
+
case 0:
|
|
166
|
+
PixelPayLoading_1.default.show();
|
|
167
|
+
return [4 /*yield*/, this.post("api/v2/transaction/capture", transaction)];
|
|
168
|
+
case 1:
|
|
169
|
+
response = _a.sent();
|
|
170
|
+
PixelPayLoading_1.default.hide();
|
|
171
|
+
return [2 /*return*/, response];
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Send and proccesing VOID transaction
|
|
178
|
+
*
|
|
179
|
+
* @param transaction
|
|
180
|
+
* @return
|
|
181
|
+
* @throws InvalidCredentialsException
|
|
182
|
+
*/
|
|
183
|
+
Transaction.prototype.doVoid = function (transaction) {
|
|
184
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
185
|
+
var response;
|
|
186
|
+
return __generator(this, function (_a) {
|
|
187
|
+
switch (_a.label) {
|
|
188
|
+
case 0:
|
|
189
|
+
PixelPayLoading_1.default.show();
|
|
190
|
+
return [4 /*yield*/, this.post("api/v2/transaction/void", transaction)];
|
|
191
|
+
case 1:
|
|
192
|
+
response = _a.sent();
|
|
193
|
+
PixelPayLoading_1.default.hide();
|
|
194
|
+
return [2 /*return*/, response];
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Send and proccesing SALE transaction
|
|
201
|
+
*
|
|
202
|
+
* @param transaction
|
|
203
|
+
* @return
|
|
204
|
+
* @throws InvalidCredentialsException
|
|
205
|
+
*/
|
|
206
|
+
Transaction.prototype.getStatus = function (transaction) {
|
|
207
|
+
return this.post("api/v2/transaction/status", transaction);
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Verify a payment hash and returns true if payment response is not modified
|
|
211
|
+
*
|
|
212
|
+
* @param hash
|
|
213
|
+
* @param order_id
|
|
214
|
+
* @param secret
|
|
215
|
+
* @return
|
|
216
|
+
*/
|
|
217
|
+
Transaction.prototype.verifyPaymentHash = function (hash, order_id, secret) {
|
|
218
|
+
if (Helpers_1.default.checkIsBrowser()) {
|
|
219
|
+
throw new InvalidTransactionTypeException_1.default("This platform not support hash validations in browser/frontend");
|
|
53
220
|
}
|
|
54
|
-
|
|
221
|
+
var chain = [order_id, this.settings.auth_key, secret].join("|");
|
|
222
|
+
return chain === Helpers_1.default.hash("MD5", chain);
|
|
55
223
|
};
|
|
56
224
|
return Transaction;
|
|
57
225
|
}(ServiceBehaviour_1.default));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../src/services/Transaction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../src/services/Transaction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAsC;AAEtC,6DAAwD;AACxD,iGAA4F;AAO5F,gEAAmD;AACnD,gEAA2D;AAC3D,gEAA2D;AAC3D,8DAAyD;AAEzD;IAAyC,+BAAgB;IACxD;;OAEG;IACH,qBAAY,QAAkB;eAC7B,kBAAM,QAAQ,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACG,4BAAM,GAAZ,UAAa,WAA4B;;;;;;wBACxC,IAAI,WAAW,CAAC,sBAAsB,IAAI,CAAC,iBAAO,CAAC,cAAc,EAAE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O,QAAQ,EAAC;;;;KAChB;IAED;;;;;;OAMG;IACH,+BAAS,GAAT,UAAU,WAA8B;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;OAOG;IACH,uCAAiB,GAAjB,UAAkB,IAAY,EAAE,QAAgB,EAAE,MAAc;QAC/D,IAAI,iBAAO,CAAC,cAAc,EAAE,EAAE;YAC7B,MAAM,IAAI,yCAA+B,CAAC,gEAAgE,CAAC,CAAC;SAC5G;QAED,IAAM,KAAK,GAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE3E,OAAO,KAAK,KAAK,iBAAO,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC;IACF,kBAAC;AAAD,CAAC,AAlID,CAAyC,0BAAgB,GAkIxD"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "
|
|
1
|
+
declare const _default: "2.0.0-beta.2";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/lib/web.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const UI: {
|
|
2
|
+
PixelPayLoading: {
|
|
3
|
+
_container: () => Element;
|
|
4
|
+
show: () => void;
|
|
5
|
+
hide: () => void;
|
|
6
|
+
};
|
|
7
|
+
Helpers: {
|
|
8
|
+
objectToJson(value: any): string;
|
|
9
|
+
hash(algorith: string, value: string): string;
|
|
10
|
+
trimValue(value: string): string;
|
|
11
|
+
cleanString(value: string): string;
|
|
12
|
+
parseAmount(amount: number): string;
|
|
13
|
+
checkIsBrowser(): boolean;
|
|
14
|
+
addScriptToWebsite(src: string): Promise<any>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
declare global {
|
|
18
|
+
interface Window {
|
|
19
|
+
Entities: any;
|
|
20
|
+
Exceptions: any;
|
|
21
|
+
Models: any;
|
|
22
|
+
Requests: any;
|
|
23
|
+
Resources: any;
|
|
24
|
+
Responses: any;
|
|
25
|
+
Services: any;
|
|
26
|
+
UI: any;
|
|
27
|
+
}
|
|
28
|
+
}
|