@or-sdk/payments 1.0.1-beta.2402.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/README.md +1 -0
- package/dist/cjs/Payments.js +34 -0
- package/dist/cjs/Payments.js.map +1 -0
- package/dist/cjs/constants.js +5 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/index.js +21 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/esm/Payments.js +13 -0
- package/dist/esm/Payments.js.map +1 -0
- package/dist/esm/constants.js +2 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/types/Payments.d.ts +6 -0
- package/dist/types/Payments.d.ts.map +1 -0
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types.d.ts +6 -0
- package/dist/types/types.d.ts.map +1 -0
- package/package.json +29 -0
- package/src/Payments.ts +28 -0
- package/src/constants.ts +1 -0
- package/src/index.ts +2 -0
- package/src/types.ts +12 -0
- package/tsconfig.dev.json +8 -0
- package/tsconfig.esm.json +12 -0
- package/tsconfig.json +7 -0
- package/tsconfig.types.json +10 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Installation:
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
exports.Payments = void 0;
|
|
19
|
+
var base_1 = require("@or-sdk/base");
|
|
20
|
+
var constants_1 = require("./constants");
|
|
21
|
+
var Payments = (function (_super) {
|
|
22
|
+
__extends(Payments, _super);
|
|
23
|
+
function Payments(params) {
|
|
24
|
+
var token = params.token, discoveryUrl = params.discoveryUrl;
|
|
25
|
+
return _super.call(this, {
|
|
26
|
+
token: token,
|
|
27
|
+
discoveryUrl: discoveryUrl,
|
|
28
|
+
serviceKey: constants_1.SERVICE_KEY,
|
|
29
|
+
}) || this;
|
|
30
|
+
}
|
|
31
|
+
return Payments;
|
|
32
|
+
}(base_1.Base));
|
|
33
|
+
exports.Payments = Payments;
|
|
34
|
+
//# sourceMappingURL=Payments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Payments.js","sourceRoot":"","sources":["../../src/Payments.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAEpC,yCAA0C;AAS1C;IAA8B,4BAAI;IAOhC,kBAAY,MAAsB;QACxB,IAAA,KAAK,GAAmB,MAAM,MAAzB,EAAE,YAAY,GAAK,MAAM,aAAX,CAAY;eAEvC,kBAAM;YACJ,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,UAAU,EAAE,uBAAW;SACxB,CAAC;IACJ,CAAC;IACH,eAAC;AAAD,CAAC,AAhBD,CAA8B,WAAI,GAgBjC;AAhBY,4BAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Payments = void 0;
|
|
18
|
+
var Payments_1 = require("./Payments");
|
|
19
|
+
Object.defineProperty(exports, "Payments", { enumerable: true, get: function () { return Payments_1.Payments; } });
|
|
20
|
+
__exportStar(require("./types"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,0CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Base } from '@or-sdk/base';
|
|
2
|
+
import { SERVICE_KEY } from './constants';
|
|
3
|
+
export class Payments extends Base {
|
|
4
|
+
constructor(params) {
|
|
5
|
+
const { token, discoveryUrl } = params;
|
|
6
|
+
super({
|
|
7
|
+
token,
|
|
8
|
+
discoveryUrl,
|
|
9
|
+
serviceKey: SERVICE_KEY,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Payments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Payments.js","sourceRoot":"","sources":["../../src/Payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAS1C,MAAM,OAAO,QAAS,SAAQ,IAAI;IAOhC,YAAY,MAAsB;QAChC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAEvC,KAAK,CAAC;YACJ,KAAK;YACL,YAAY;YACZ,UAAU,EAAE,WAAW;SACxB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Payments.d.ts","sourceRoot":"","sources":["../../src/Payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAUzC,qBAAa,QAAS,SAAQ,IAAI;gBAOpB,MAAM,EAAE,cAAc;CASnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,MAAM,MAAM,cAAc,GAAG;IAI3B,KAAK,EAAE,KAAK,CAAC;IAIb,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.1-beta.2402.0",
|
|
3
|
+
"name": "@or-sdk/payments",
|
|
4
|
+
"main": "dist/cjs/index.js",
|
|
5
|
+
"module": "dist/esm/index.js",
|
|
6
|
+
"types": "dist/types/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "pnpm clean && pnpm build:esm && pnpm build:cjs",
|
|
9
|
+
"build:cjs": "tsc --project tsconfig.json",
|
|
10
|
+
"build:esm": "tsc --project tsconfig.esm.json",
|
|
11
|
+
"build:types": "tsc --project tsconfig.types.json",
|
|
12
|
+
"build:watch": "concurrently -r --hide 1,2 \"pnpm build:watch:cjs\" \"pnpm build:watch:esm\" \"pnpm build:watch:types\"",
|
|
13
|
+
"build:watch:cjs": "tsc --project tsconfig.json -w",
|
|
14
|
+
"build:watch:esm": "tsc --project tsconfig.esm.json -w",
|
|
15
|
+
"build:watch:types": "tsc --project tsconfig.types.json -w",
|
|
16
|
+
"clean": "rm -rf ./dist",
|
|
17
|
+
"dev": "pnpm build:watch:esm"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"concurrently": "^6.4.0",
|
|
21
|
+
"typescript": "^4.4.4"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@or-sdk/base": "^0.32.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/src/Payments.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Base } from '@or-sdk/base';
|
|
2
|
+
import { PaymentsConfig } from './types';
|
|
3
|
+
import { SERVICE_KEY } from './constants';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* OneReach Payments service client
|
|
7
|
+
* ## Installation:
|
|
8
|
+
* ```
|
|
9
|
+
* $ npm i @or-sdk/payments
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export class Payments extends Base {
|
|
13
|
+
/**
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { Payments } from '@or-sdk/payments'
|
|
16
|
+
* const payments = new Payments({token: 'my-account-token-string', discoveryUrl: 'http://example.tables/endpoint'});
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
constructor(params: PaymentsConfig) {
|
|
20
|
+
const { token, discoveryUrl } = params;
|
|
21
|
+
|
|
22
|
+
super({
|
|
23
|
+
token,
|
|
24
|
+
discoveryUrl,
|
|
25
|
+
serviceKey: SERVICE_KEY,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
package/src/constants.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SERVICE_KEY = 'REPLACE_ME';
|
package/src/index.ts
ADDED
package/src/types.ts
ADDED
package/tsconfig.json
ADDED