@entegrasyonapp/lib 1.0.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 +19 -0
- package/dist/common/client.d.ts +12 -0
- package/dist/common/client.d.ts.map +1 -0
- package/dist/common/client.js +9 -0
- package/dist/common/client.js.map +1 -0
- package/dist/common/kv-handler.d.ts +17 -0
- package/dist/common/kv-handler.d.ts.map +1 -0
- package/dist/common/kv-handler.js +24 -0
- package/dist/common/kv-handler.js.map +1 -0
- package/dist/common/request.d.ts +21 -0
- package/dist/common/request.d.ts.map +1 -0
- package/dist/common/request.js +9 -0
- package/dist/common/request.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/boyner/v1/client.d.ts +30 -0
- package/dist/integrations/boyner/v1/client.d.ts.map +1 -0
- package/dist/integrations/boyner/v1/client.js +30 -0
- package/dist/integrations/boyner/v1/client.js.map +1 -0
- package/dist/integrations/boyner/v1/index.d.ts +2 -0
- package/dist/integrations/boyner/v1/index.d.ts.map +1 -0
- package/dist/integrations/boyner/v1/index.js +6 -0
- package/dist/integrations/boyner/v1/index.js.map +1 -0
- package/dist/integrations/boyner/v1/request.d.ts +20 -0
- package/dist/integrations/boyner/v1/request.d.ts.map +1 -0
- package/dist/integrations/boyner/v1/request.js +67 -0
- package/dist/integrations/boyner/v1/request.js.map +1 -0
- package/dist/integrations/ciceksepeti/v1/client.d.ts +33 -0
- package/dist/integrations/ciceksepeti/v1/client.d.ts.map +1 -0
- package/dist/integrations/ciceksepeti/v1/client.js +39 -0
- package/dist/integrations/ciceksepeti/v1/client.js.map +1 -0
- package/dist/integrations/ciceksepeti/v1/index.d.ts +2 -0
- package/dist/integrations/ciceksepeti/v1/index.d.ts.map +1 -0
- package/dist/integrations/ciceksepeti/v1/index.js +7 -0
- package/dist/integrations/ciceksepeti/v1/index.js.map +1 -0
- package/dist/integrations/ciceksepeti/v1/request.d.ts +20 -0
- package/dist/integrations/ciceksepeti/v1/request.d.ts.map +1 -0
- package/dist/integrations/ciceksepeti/v1/request.js +63 -0
- package/dist/integrations/ciceksepeti/v1/request.js.map +1 -0
- package/dist/integrations/hepsiburada/v1/client.d.ts +42 -0
- package/dist/integrations/hepsiburada/v1/client.d.ts.map +1 -0
- package/dist/integrations/hepsiburada/v1/client.js +48 -0
- package/dist/integrations/hepsiburada/v1/client.js.map +1 -0
- package/dist/integrations/hepsiburada/v1/index.d.ts +2 -0
- package/dist/integrations/hepsiburada/v1/index.d.ts.map +1 -0
- package/dist/integrations/hepsiburada/v1/index.js +8 -0
- package/dist/integrations/hepsiburada/v1/index.js.map +1 -0
- package/dist/integrations/hepsiburada/v1/request.d.ts +20 -0
- package/dist/integrations/hepsiburada/v1/request.d.ts.map +1 -0
- package/dist/integrations/hepsiburada/v1/request.js +67 -0
- package/dist/integrations/hepsiburada/v1/request.js.map +1 -0
- package/dist/integrations/lcw/v1/client.d.ts +42 -0
- package/dist/integrations/lcw/v1/client.d.ts.map +1 -0
- package/dist/integrations/lcw/v1/client.js +42 -0
- package/dist/integrations/lcw/v1/client.js.map +1 -0
- package/dist/integrations/lcw/v1/index.d.ts +2 -0
- package/dist/integrations/lcw/v1/index.d.ts.map +1 -0
- package/dist/integrations/lcw/v1/index.js +8 -0
- package/dist/integrations/lcw/v1/index.js.map +1 -0
- package/dist/integrations/lcw/v1/request.d.ts +21 -0
- package/dist/integrations/lcw/v1/request.d.ts.map +1 -0
- package/dist/integrations/lcw/v1/request.js +97 -0
- package/dist/integrations/lcw/v1/request.js.map +1 -0
- package/dist/integrations/n11/v2/client.d.ts +29 -0
- package/dist/integrations/n11/v2/client.d.ts.map +1 -0
- package/dist/integrations/n11/v2/client.js +30 -0
- package/dist/integrations/n11/v2/client.js.map +1 -0
- package/dist/integrations/n11/v2/index.d.ts +2 -0
- package/dist/integrations/n11/v2/index.d.ts.map +1 -0
- package/dist/integrations/n11/v2/index.js +6 -0
- package/dist/integrations/n11/v2/index.js.map +1 -0
- package/dist/integrations/n11/v2/request.d.ts +20 -0
- package/dist/integrations/n11/v2/request.d.ts.map +1 -0
- package/dist/integrations/n11/v2/request.js +65 -0
- package/dist/integrations/n11/v2/request.js.map +1 -0
- package/dist/integrations/ozon/v1/client.d.ts +36 -0
- package/dist/integrations/ozon/v1/client.d.ts.map +1 -0
- package/dist/integrations/ozon/v1/client.js +38 -0
- package/dist/integrations/ozon/v1/client.js.map +1 -0
- package/dist/integrations/ozon/v1/index.d.ts +2 -0
- package/dist/integrations/ozon/v1/index.d.ts.map +1 -0
- package/dist/integrations/ozon/v1/index.js +7 -0
- package/dist/integrations/ozon/v1/index.js.map +1 -0
- package/dist/integrations/ozon/v1/request.d.ts +20 -0
- package/dist/integrations/ozon/v1/request.d.ts.map +1 -0
- package/dist/integrations/ozon/v1/request.js +65 -0
- package/dist/integrations/ozon/v1/request.js.map +1 -0
- package/dist/integrations/pttavm/v1/client.d.ts +30 -0
- package/dist/integrations/pttavm/v1/client.d.ts.map +1 -0
- package/dist/integrations/pttavm/v1/client.js +30 -0
- package/dist/integrations/pttavm/v1/client.js.map +1 -0
- package/dist/integrations/pttavm/v1/index.d.ts +2 -0
- package/dist/integrations/pttavm/v1/index.d.ts.map +1 -0
- package/dist/integrations/pttavm/v1/index.js +6 -0
- package/dist/integrations/pttavm/v1/index.js.map +1 -0
- package/dist/integrations/pttavm/v1/request.d.ts +20 -0
- package/dist/integrations/pttavm/v1/request.d.ts.map +1 -0
- package/dist/integrations/pttavm/v1/request.js +66 -0
- package/dist/integrations/pttavm/v1/request.js.map +1 -0
- package/dist/integrations/trendyol/v1/client.d.ts +35 -0
- package/dist/integrations/trendyol/v1/client.d.ts.map +1 -0
- package/dist/integrations/trendyol/v1/client.js +39 -0
- package/dist/integrations/trendyol/v1/client.js.map +1 -0
- package/dist/integrations/trendyol/v1/index.d.ts +2 -0
- package/dist/integrations/trendyol/v1/index.d.ts.map +1 -0
- package/dist/integrations/trendyol/v1/index.js +7 -0
- package/dist/integrations/trendyol/v1/index.js.map +1 -0
- package/dist/integrations/trendyol/v1/request.d.ts +20 -0
- package/dist/integrations/trendyol/v1/request.d.ts.map +1 -0
- package/dist/integrations/trendyol/v1/request.js +67 -0
- package/dist/integrations/trendyol/v1/request.js.map +1 -0
- package/dist/utils/backoff-request.d.ts +33 -0
- package/dist/utils/backoff-request.d.ts.map +1 -0
- package/dist/utils/backoff-request.js +67 -0
- package/dist/utils/backoff-request.js.map +1 -0
- package/dist/utils/request-id.d.ts +17 -0
- package/dist/utils/request-id.d.ts.map +1 -0
- package/dist/utils/request-id.js +72 -0
- package/dist/utils/request-id.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client module for Hepsiburada
|
|
3
|
+
* @package entegrasyonapp/lib
|
|
4
|
+
* @author Ekin Karadeniz
|
|
5
|
+
* @copyright 2023-2024
|
|
6
|
+
*/
|
|
7
|
+
import { Request } from "./request";
|
|
8
|
+
import { IClient } from "./../../../common/client";
|
|
9
|
+
import { IRequestInput } from "./../../../common/request";
|
|
10
|
+
export interface ICredentials {
|
|
11
|
+
merchantId: string;
|
|
12
|
+
username: string;
|
|
13
|
+
password: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IOptions {
|
|
16
|
+
env: Environment;
|
|
17
|
+
debug: boolean;
|
|
18
|
+
timeout: number;
|
|
19
|
+
proxy: any;
|
|
20
|
+
}
|
|
21
|
+
export declare enum Environment {
|
|
22
|
+
PRODUCTION = 0,
|
|
23
|
+
STAGE = 1
|
|
24
|
+
}
|
|
25
|
+
export declare enum Service {
|
|
26
|
+
Mpop = "mpop",
|
|
27
|
+
ListingExternal = "listing-external",
|
|
28
|
+
ShippingExternal = "shipping-external",
|
|
29
|
+
OmsExternal = "oms-external"
|
|
30
|
+
}
|
|
31
|
+
export interface IClientParams {
|
|
32
|
+
service: Service;
|
|
33
|
+
credentials: ICredentials;
|
|
34
|
+
options?: Partial<IOptions>;
|
|
35
|
+
}
|
|
36
|
+
export declare class Client implements IClient {
|
|
37
|
+
params: IClientParams;
|
|
38
|
+
constructor(params: IClientParams);
|
|
39
|
+
getBaseURL(): string;
|
|
40
|
+
request(request: Partial<IRequestInput>): Request;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/integrations/hepsiburada/v1/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,WAAW,YAAY;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACrB,GAAG,EAAE,WAAW,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,GAAG,CAAC;CACd;AAED,oBAAY,WAAW;IACnB,UAAU,IAAA;IACV,KAAK,IAAA;CACR;AAED,oBAAY,OAAO;IACf,IAAI,SAAS;IACb,eAAe,qBAAqB;IACpC,gBAAgB,sBAAsB;IACtC,WAAW,iBAAiB;CAC/B;AAED,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC/B;AAED,qBAAa,MAAO,YAAW,OAAO;IACf,MAAM,EAAE,aAAa;gBAArB,MAAM,EAAE,aAAa;IAUxC,UAAU,IAAI,MAAM;IASpB,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO;CAGpD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Client module for Hepsiburada
|
|
4
|
+
* @package entegrasyonapp/lib
|
|
5
|
+
* @author Ekin Karadeniz
|
|
6
|
+
* @copyright 2023-2024
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Client = exports.Service = exports.Environment = void 0;
|
|
10
|
+
const request_1 = require("./request");
|
|
11
|
+
var Environment;
|
|
12
|
+
(function (Environment) {
|
|
13
|
+
Environment[Environment["PRODUCTION"] = 0] = "PRODUCTION";
|
|
14
|
+
Environment[Environment["STAGE"] = 1] = "STAGE";
|
|
15
|
+
})(Environment || (exports.Environment = Environment = {}));
|
|
16
|
+
var Service;
|
|
17
|
+
(function (Service) {
|
|
18
|
+
Service["Mpop"] = "mpop";
|
|
19
|
+
Service["ListingExternal"] = "listing-external";
|
|
20
|
+
Service["ShippingExternal"] = "shipping-external";
|
|
21
|
+
Service["OmsExternal"] = "oms-external";
|
|
22
|
+
})(Service || (exports.Service = Service = {}));
|
|
23
|
+
class Client {
|
|
24
|
+
params;
|
|
25
|
+
constructor(params) {
|
|
26
|
+
this.params = params;
|
|
27
|
+
const defaultOptions = {
|
|
28
|
+
env: Environment.PRODUCTION,
|
|
29
|
+
debug: false,
|
|
30
|
+
timeout: 0, // no timeout
|
|
31
|
+
proxy: undefined
|
|
32
|
+
};
|
|
33
|
+
this.params.options = { ...defaultOptions, ...this.params.options }; // {...{foo:'bar'}, ...undefined} == {foo:'bar'}
|
|
34
|
+
}
|
|
35
|
+
getBaseURL() {
|
|
36
|
+
let baseUrl = `https://${this.params.service}`;
|
|
37
|
+
if (this.params.options?.env == Environment.STAGE) {
|
|
38
|
+
baseUrl += '-sit';
|
|
39
|
+
}
|
|
40
|
+
baseUrl += '.hepsiburada.com';
|
|
41
|
+
return baseUrl;
|
|
42
|
+
}
|
|
43
|
+
request(request) {
|
|
44
|
+
return new request_1.Request(this, request);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.Client = Client;
|
|
48
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/integrations/hepsiburada/v1/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAiBpC,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,yDAAU,CAAA;IACV,+CAAK,CAAA;AACT,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,OAKX;AALD,WAAY,OAAO;IACf,wBAAa,CAAA;IACb,+CAAoC,CAAA;IACpC,iDAAsC,CAAA;IACtC,uCAA4B,CAAA;AAChC,CAAC,EALW,OAAO,uBAAP,OAAO,QAKlB;AAQD,MAAa,MAAM;IACI;IAAnB,YAAmB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QACpC,MAAM,cAAc,GAAa;YAC7B,GAAG,EAAE,WAAW,CAAC,UAAU;YAC3B,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,CAAC,EAAE,aAAa;YACzB,KAAK,EAAE,SAAS;SACnB,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,gDAAgD;IACzH,CAAC;IAED,UAAU;QACN,IAAI,OAAO,GAAG,WAAW,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAC/C,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;YAChD,OAAO,IAAI,MAAM,CAAC;QACtB,CAAC;QACD,OAAO,IAAI,kBAAkB,CAAC;QAC9B,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,OAAO,CAAC,OAA+B;QACnC,OAAO,IAAI,iBAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACJ;AAvBD,wBAuBC","sourcesContent":["/**\n * Client module for Hepsiburada\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2023-2024\n */\n\nimport { Request } from \"./request\";\nimport { IClient } from \"./../../../common/client\";\nimport { IRequestInput } from \"./../../../common/request\";\n\nexport interface ICredentials {\n merchantId: string;\n username: string;\n password: string;\n}\n\nexport interface IOptions {\n env: Environment;\n debug: boolean;\n timeout: number; // milliseconds\n proxy: any;\n}\n\nexport enum Environment {\n PRODUCTION,\n STAGE\n}\n\nexport enum Service {\n Mpop = 'mpop',\n ListingExternal = 'listing-external',\n ShippingExternal = 'shipping-external',\n OmsExternal = 'oms-external',\n}\n\nexport interface IClientParams {\n service: Service;\n credentials: ICredentials;\n options?: Partial<IOptions>;\n}\n\nexport class Client implements IClient {\n constructor(public params: IClientParams) {\n const defaultOptions: IOptions = {\n env: Environment.PRODUCTION,\n debug: false,\n timeout: 0, // no timeout\n proxy: undefined\n };\n this.params.options = { ...defaultOptions, ...this.params.options }; // {...{foo:'bar'}, ...undefined} == {foo:'bar'}\n }\n\n getBaseURL(): string {\n let baseUrl = `https://${this.params.service}`;\n if (this.params.options?.env == Environment.STAGE) {\n baseUrl += '-sit';\n }\n baseUrl += '.hepsiburada.com';\n return baseUrl;\n }\n\n request(request: Partial<IRequestInput>): Request {\n return new Request(this, request);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/hepsiburada/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Service = exports.Environment = exports.Client = void 0;
|
|
4
|
+
var client_1 = require("./client");
|
|
5
|
+
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return client_1.Client; } });
|
|
6
|
+
Object.defineProperty(exports, "Environment", { enumerable: true, get: function () { return client_1.Environment; } });
|
|
7
|
+
Object.defineProperty(exports, "Service", { enumerable: true, get: function () { return client_1.Service; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/integrations/hepsiburada/v1/index.ts"],"names":[],"mappings":";;;AAAA,mCAAwD;AAA/C,gGAAA,MAAM,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAE,iGAAA,OAAO,OAAA","sourcesContent":["export { Client, Environment, Service } from \"./client\";\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request module for Hepsiburada
|
|
3
|
+
* @package entegrasyonapp/lib
|
|
4
|
+
* @author Ekin Karadeniz
|
|
5
|
+
* @copyright 2023-2024
|
|
6
|
+
*/
|
|
7
|
+
import { AxiosResponse } from "axios";
|
|
8
|
+
import { Client } from "./client";
|
|
9
|
+
import { IRequest, IRequestInput } from "./../../../common/request";
|
|
10
|
+
export declare class Request implements IRequest {
|
|
11
|
+
private client;
|
|
12
|
+
private request;
|
|
13
|
+
private axiosConfig;
|
|
14
|
+
private axiosMockCallback?;
|
|
15
|
+
constructor(client: Client, request: Partial<IRequestInput>);
|
|
16
|
+
setAxiosMock(callback: Function): void;
|
|
17
|
+
getRequestId(): string;
|
|
18
|
+
send(): Promise<AxiosResponse>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/integrations/hepsiburada/v1/request.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EAAsB,aAAa,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGpE,qBAAa,OAAQ,YAAW,QAAQ;IAIxB,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,OAAO;IAHnD,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,iBAAiB,CAAC,CAAW;gBAEjB,MAAM,EAAE,MAAM,EAAU,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC;IA+B3E,YAAY,CAAC,QAAQ,EAAE,QAAQ;IAI/B,YAAY,IAAI,MAAM;IAIhB,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC;CAUvC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Request module for Hepsiburada
|
|
4
|
+
* @package entegrasyonapp/lib
|
|
5
|
+
* @author Ekin Karadeniz
|
|
6
|
+
* @copyright 2023-2024
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Request = void 0;
|
|
13
|
+
const axios_1 = __importDefault(require("axios"));
|
|
14
|
+
const axios_mock_adapter_1 = __importDefault(require("axios-mock-adapter"));
|
|
15
|
+
const request_id_1 = require("../../../utils/request-id");
|
|
16
|
+
class Request {
|
|
17
|
+
client;
|
|
18
|
+
request;
|
|
19
|
+
axiosConfig;
|
|
20
|
+
axiosMockCallback;
|
|
21
|
+
constructor(client, request) {
|
|
22
|
+
this.client = client;
|
|
23
|
+
this.request = request;
|
|
24
|
+
if (this.request.headers == undefined) {
|
|
25
|
+
this.request.headers = {};
|
|
26
|
+
}
|
|
27
|
+
this.request.headers['Accept'] = this.request.headers?.['Accept'] ?? 'application/json';
|
|
28
|
+
this.request.headers['User-Agent'] = this.client.params.credentials.username;
|
|
29
|
+
if (this.request.body) {
|
|
30
|
+
this.request.headers['Content-Type'] = this.request.headers?.['Content-Type'] ?? 'application/json';
|
|
31
|
+
}
|
|
32
|
+
this.axiosConfig = {
|
|
33
|
+
baseURL: this.client.getBaseURL(),
|
|
34
|
+
timeout: this.client.params.options?.timeout,
|
|
35
|
+
proxy: this.client.params.options?.proxy,
|
|
36
|
+
method: this.request.method,
|
|
37
|
+
url: this.request.path,
|
|
38
|
+
params: this.request.params,
|
|
39
|
+
data: this.request.body,
|
|
40
|
+
headers: this.request.headers,
|
|
41
|
+
responseType: 'json',
|
|
42
|
+
validateStatus: (status) => {
|
|
43
|
+
return ![401, 403, 404, 500].includes(status);
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
this.axiosConfig.auth = {
|
|
47
|
+
username: this.client.params.credentials.merchantId,
|
|
48
|
+
password: this.client.params.credentials.password
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
setAxiosMock(callback) {
|
|
52
|
+
this.axiosMockCallback = callback;
|
|
53
|
+
}
|
|
54
|
+
getRequestId() {
|
|
55
|
+
return (0, request_id_1.generateRequestId)(this.axiosConfig, 'hepsiburada-v1');
|
|
56
|
+
}
|
|
57
|
+
async send() {
|
|
58
|
+
// mocks will be used during the tests
|
|
59
|
+
if (this.axiosMockCallback != undefined) {
|
|
60
|
+
const mock = new axios_mock_adapter_1.default(axios_1.default);
|
|
61
|
+
this.axiosMockCallback(mock);
|
|
62
|
+
}
|
|
63
|
+
return (0, axios_1.default)(this.axiosConfig);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.Request = Request;
|
|
67
|
+
//# sourceMappingURL=request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/integrations/hepsiburada/v1/request.ts"],"names":[],"mappings":";A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,OAAO,CAAC,IAAI;YACvB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO;YAC7B,YAAY,EAAE,MAAM;YACpB,cAAc,EAAE,CAAC,MAAc,EAAE,EAAE;gBAC/B,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAClD,CAAC;SACJ,CAAC;QAEF,IAAI,CAAC,WAAW,CAAC,IAAI,GAAG;YACpB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU;YACnD,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ;SACpD,CAAC;IACN,CAAC;IAED,YAAY,CAAC,QAAkB;QAC3B,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC;IACtC,CAAC;IAED,YAAY;QACR,OAAO,IAAA,8BAAiB,EAAC,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,IAAI;QAEN,sCAAsC;QACtC,IAAI,IAAI,CAAC,iBAAiB,IAAI,SAAS,EAAE,CAAC;YACtC,MAAM,IAAI,GAAG,IAAI,4BAAW,CAAC,eAAK,CAAC,CAAC;YACpC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QAED,OAAO,IAAA,eAAK,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;CACJ;AArDD,0BAqDC","sourcesContent":["/**\n * Request module for Hepsiburada\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2023-2024\n */\n\nimport axios, { AxiosRequestConfig, AxiosResponse } from \"axios\";\nimport { Client } from \"./client\";\nimport MockAdapter from \"axios-mock-adapter\";\nimport { IRequest, IRequestInput } from \"./../../../common/request\";\nimport { generateRequestId } from \"../../../utils/request-id\";\n\nexport class Request implements IRequest {\n private axiosConfig: Partial<AxiosRequestConfig>;\n private axiosMockCallback?: Function;\n\n constructor(private client: Client, private request: Partial<IRequestInput>) {\n if (this.request.headers == undefined) {\n this.request.headers = {};\n }\n this.request.headers['Accept'] = this.request.headers?.['Accept'] ?? 'application/json';\n this.request.headers['User-Agent'] = this.client.params.credentials.username;\n if (this.request.body) {\n this.request.headers['Content-Type'] = this.request.headers?.['Content-Type'] ?? 'application/json';\n }\n\n this.axiosConfig = {\n baseURL: this.client.getBaseURL(),\n timeout: this.client.params.options?.timeout,\n proxy: this.client.params.options?.proxy,\n method: this.request.method,\n url: this.request.path,\n params: this.request.params,\n data: this.request.body,\n headers: this.request.headers,\n responseType: 'json',\n validateStatus: (status: number) => {\n return ![401, 403, 404, 500].includes(status);\n },\n };\n\n this.axiosConfig.auth = {\n username: this.client.params.credentials.merchantId,\n password: this.client.params.credentials.password\n };\n }\n\n setAxiosMock(callback: Function) {\n this.axiosMockCallback = callback;\n }\n\n getRequestId(): string {\n return generateRequestId(this.axiosConfig, 'hepsiburada-v1');\n }\n\n async send(): Promise<AxiosResponse> {\n\n // mocks will be used during the tests\n if (this.axiosMockCallback != undefined) {\n const mock = new MockAdapter(axios);\n this.axiosMockCallback(mock);\n }\n\n return axios(this.axiosConfig);\n }\n}"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client module for LCW Marketplace
|
|
3
|
+
* @package entegrasyonapp/lib
|
|
4
|
+
* @author Ekin Karadeniz
|
|
5
|
+
* @copyright 2023-2024
|
|
6
|
+
*/
|
|
7
|
+
import { Request } from "./request";
|
|
8
|
+
import { IClient } from "./../../../common/client";
|
|
9
|
+
import { IRequestInput } from "./../../../common/request";
|
|
10
|
+
import { IKVHandler } from "../../../common/kv-handler";
|
|
11
|
+
export interface ICredentials {
|
|
12
|
+
supplierId: string;
|
|
13
|
+
username: string;
|
|
14
|
+
password: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IOptions {
|
|
17
|
+
env: Environment;
|
|
18
|
+
debug: boolean;
|
|
19
|
+
timeout: number;
|
|
20
|
+
proxy: any;
|
|
21
|
+
}
|
|
22
|
+
export declare enum Environment {
|
|
23
|
+
PRODUCTION = "live",
|
|
24
|
+
STAGE = "preprod"
|
|
25
|
+
}
|
|
26
|
+
export declare enum Service {
|
|
27
|
+
Integrator = "integrator",
|
|
28
|
+
ProductIntegration = "product-integration"
|
|
29
|
+
}
|
|
30
|
+
export interface IClientParams {
|
|
31
|
+
service: Service;
|
|
32
|
+
credentials: ICredentials;
|
|
33
|
+
kvHandler: IKVHandler;
|
|
34
|
+
options?: Partial<IOptions>;
|
|
35
|
+
}
|
|
36
|
+
export declare class Client implements IClient {
|
|
37
|
+
params: IClientParams;
|
|
38
|
+
constructor(params: IClientParams);
|
|
39
|
+
getBaseURL(): string;
|
|
40
|
+
request(request: Partial<IRequestInput>): Request;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/integrations/lcw/v1/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,WAAW,YAAY;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACrB,GAAG,EAAE,WAAW,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,GAAG,CAAC;CACd;AAED,oBAAY,WAAW;IACnB,UAAU,SAAS;IACnB,KAAK,YAAY;CACpB;AAED,oBAAY,OAAO;IACf,UAAU,eAAe;IACzB,kBAAkB,wBAAwB;CAC7C;AAED,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,YAAY,CAAC;IAC1B,SAAS,EAAE,UAAU,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC/B;AAED,qBAAa,MAAO,YAAW,OAAO;IACf,MAAM,EAAE,aAAa;gBAArB,MAAM,EAAE,aAAa;IAUxC,UAAU,IAAI,MAAM;IAKpB,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO;CAGpD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Client module for LCW Marketplace
|
|
4
|
+
* @package entegrasyonapp/lib
|
|
5
|
+
* @author Ekin Karadeniz
|
|
6
|
+
* @copyright 2023-2024
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Client = exports.Service = exports.Environment = void 0;
|
|
10
|
+
const request_1 = require("./request");
|
|
11
|
+
var Environment;
|
|
12
|
+
(function (Environment) {
|
|
13
|
+
Environment["PRODUCTION"] = "live";
|
|
14
|
+
Environment["STAGE"] = "preprod";
|
|
15
|
+
})(Environment || (exports.Environment = Environment = {}));
|
|
16
|
+
var Service;
|
|
17
|
+
(function (Service) {
|
|
18
|
+
Service["Integrator"] = "integrator";
|
|
19
|
+
Service["ProductIntegration"] = "product-integration";
|
|
20
|
+
})(Service || (exports.Service = Service = {}));
|
|
21
|
+
class Client {
|
|
22
|
+
params;
|
|
23
|
+
constructor(params) {
|
|
24
|
+
this.params = params;
|
|
25
|
+
const defaultOptions = {
|
|
26
|
+
env: Environment.PRODUCTION,
|
|
27
|
+
debug: false,
|
|
28
|
+
timeout: 0, // no timeout
|
|
29
|
+
proxy: undefined
|
|
30
|
+
};
|
|
31
|
+
this.params.options = { ...defaultOptions, ...this.params.options }; // {...{foo:'bar'}, ...undefined} == {foo:'bar'}
|
|
32
|
+
}
|
|
33
|
+
getBaseURL() {
|
|
34
|
+
const env = this.params.options?.env || 'live';
|
|
35
|
+
return `https://mym-api.lcwaikiki.com/lcw/${env}/${this.params.service}/service/api/`;
|
|
36
|
+
}
|
|
37
|
+
request(request) {
|
|
38
|
+
return new request_1.Request(this, request);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.Client = Client;
|
|
42
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/integrations/lcw/v1/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAkBpC,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;AACrB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,OAGX;AAHD,WAAY,OAAO;IACf,oCAAyB,CAAA;IACzB,qDAA0C,CAAA;AAC9C,CAAC,EAHW,OAAO,uBAAP,OAAO,QAGlB;AASD,MAAa,MAAM;IACI;IAAnB,YAAmB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QACpC,MAAM,cAAc,GAAa;YAC7B,GAAG,EAAE,WAAW,CAAC,UAAU;YAC3B,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,CAAC,EAAE,aAAa;YACzB,KAAK,EAAE,SAAS;SACnB,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,gDAAgD;IACzH,CAAC;IAED,UAAU;QACN,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,MAAM,CAAC;QAC/C,OAAO,qCAAqC,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC;IAC1F,CAAC;IAED,OAAO,CAAC,OAA+B;QACnC,OAAO,IAAI,iBAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACJ;AAnBD,wBAmBC","sourcesContent":["/**\n * Client module for LCW Marketplace\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2023-2024\n */\n\nimport { Request } from \"./request\";\nimport { IClient } from \"./../../../common/client\";\nimport { IRequestInput } from \"./../../../common/request\";\nimport { IKVHandler } from \"../../../common/kv-handler\";\n\nexport interface ICredentials {\n supplierId: string;\n username: string;\n password: string;\n}\n\nexport interface IOptions {\n env: Environment;\n debug: boolean;\n timeout: number; // milliseconds\n proxy: any;\n}\n\nexport enum Environment {\n PRODUCTION = 'live',\n STAGE = 'preprod',\n}\n\nexport enum Service {\n Integrator = 'integrator',\n ProductIntegration = 'product-integration',\n}\n\nexport interface IClientParams {\n service: Service;\n credentials: ICredentials;\n kvHandler: IKVHandler;\n options?: Partial<IOptions>;\n}\n\nexport class Client implements IClient {\n constructor(public params: IClientParams) {\n const defaultOptions: IOptions = {\n env: Environment.PRODUCTION,\n debug: false,\n timeout: 0, // no timeout\n proxy: undefined\n };\n this.params.options = { ...defaultOptions, ...this.params.options }; // {...{foo:'bar'}, ...undefined} == {foo:'bar'}\n }\n\n getBaseURL(): string {\n const env = this.params.options?.env || 'live';\n return `https://mym-api.lcwaikiki.com/lcw/${env}/${this.params.service}/service/api/`;\n }\n\n request(request: Partial<IRequestInput>): Request {\n return new Request(this, request);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/lcw/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Service = exports.Environment = exports.Client = void 0;
|
|
4
|
+
var client_1 = require("./client");
|
|
5
|
+
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return client_1.Client; } });
|
|
6
|
+
Object.defineProperty(exports, "Environment", { enumerable: true, get: function () { return client_1.Environment; } });
|
|
7
|
+
Object.defineProperty(exports, "Service", { enumerable: true, get: function () { return client_1.Service; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/integrations/lcw/v1/index.ts"],"names":[],"mappings":";;;AAAA,mCAAwD;AAA/C,gGAAA,MAAM,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAE,iGAAA,OAAO,OAAA","sourcesContent":["export { Client, Environment, Service } from \"./client\";\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request module for LCW Marketplace
|
|
3
|
+
* @package entegrasyonapp/lib
|
|
4
|
+
* @author Ekin Karadeniz
|
|
5
|
+
* @copyright 2023-2024
|
|
6
|
+
*/
|
|
7
|
+
import { AxiosResponse } from 'axios';
|
|
8
|
+
import { Client } from './client';
|
|
9
|
+
import { IRequest, IRequestInput } from './../../../common/request';
|
|
10
|
+
export declare class Request implements IRequest {
|
|
11
|
+
private client;
|
|
12
|
+
private request;
|
|
13
|
+
private axiosConfig;
|
|
14
|
+
private axiosMockCallback?;
|
|
15
|
+
constructor(client: Client, request: Partial<IRequestInput>);
|
|
16
|
+
setAxiosMock(callback: Function): void;
|
|
17
|
+
getRequestId(): string;
|
|
18
|
+
send(): Promise<AxiosResponse>;
|
|
19
|
+
getAccessToken(): Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/integrations/lcw/v1/request.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EAAsB,aAAa,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGpE,qBAAa,OAAQ,YAAW,QAAQ;IAIxB,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,OAAO;IAHnD,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,iBAAiB,CAAC,CAAW;gBAEjB,MAAM,EAAE,MAAM,EAAU,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC;IA0B3E,YAAY,CAAC,QAAQ,EAAE,QAAQ;IAI/B,YAAY,IAAI,MAAM;IAIhB,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC;IAa9B,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;CAkC1C"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Request module for LCW Marketplace
|
|
4
|
+
* @package entegrasyonapp/lib
|
|
5
|
+
* @author Ekin Karadeniz
|
|
6
|
+
* @copyright 2023-2024
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Request = void 0;
|
|
13
|
+
const axios_1 = __importDefault(require("axios"));
|
|
14
|
+
const axios_mock_adapter_1 = __importDefault(require("axios-mock-adapter"));
|
|
15
|
+
const request_id_1 = require("../../../utils/request-id");
|
|
16
|
+
class Request {
|
|
17
|
+
client;
|
|
18
|
+
request;
|
|
19
|
+
axiosConfig;
|
|
20
|
+
axiosMockCallback;
|
|
21
|
+
constructor(client, request) {
|
|
22
|
+
this.client = client;
|
|
23
|
+
this.request = request;
|
|
24
|
+
if (this.request.headers == undefined) {
|
|
25
|
+
this.request.headers = {};
|
|
26
|
+
}
|
|
27
|
+
this.request.headers['Accept'] = this.request.headers?.['Accept'] ?? 'application/json';
|
|
28
|
+
this.request.headers['User-Agent'] = this.request.headers?.['User-Agent'] ?? 'Entegrasyon.app/1.0';
|
|
29
|
+
if (this.request.body) {
|
|
30
|
+
this.request.headers['Content-Type'] = this.request.headers?.['Content-Type'] ?? 'application/json';
|
|
31
|
+
}
|
|
32
|
+
this.axiosConfig = {
|
|
33
|
+
baseURL: this.client.getBaseURL(),
|
|
34
|
+
timeout: this.client.params.options?.timeout,
|
|
35
|
+
proxy: this.client.params.options?.proxy,
|
|
36
|
+
method: this.request.method,
|
|
37
|
+
url: this.request.path,
|
|
38
|
+
params: this.request.params,
|
|
39
|
+
data: this.request.body,
|
|
40
|
+
headers: this.request.headers,
|
|
41
|
+
responseType: 'json',
|
|
42
|
+
validateStatus: (status) => {
|
|
43
|
+
return ![401, 403, 404, 500].includes(status);
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
setAxiosMock(callback) {
|
|
48
|
+
this.axiosMockCallback = callback;
|
|
49
|
+
}
|
|
50
|
+
getRequestId() {
|
|
51
|
+
return (0, request_id_1.generateRequestId)(this.axiosConfig, 'lcw-v1');
|
|
52
|
+
}
|
|
53
|
+
async send() {
|
|
54
|
+
// mocks will be used during the tests
|
|
55
|
+
if (this.axiosMockCallback != undefined) {
|
|
56
|
+
const mock = new axios_mock_adapter_1.default(axios_1.default);
|
|
57
|
+
this.axiosMockCallback(mock);
|
|
58
|
+
this.request.headers['Authorization'] = 'Bearer test';
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
this.request.headers['Authorization'] = 'Bearer ' + (await this.getAccessToken());
|
|
62
|
+
}
|
|
63
|
+
return (0, axios_1.default)(this.axiosConfig);
|
|
64
|
+
}
|
|
65
|
+
async getAccessToken() {
|
|
66
|
+
const cached = await this.client.params.kvHandler.get(`lcw-${this.client.params.credentials.username}-access-token`);
|
|
67
|
+
if (cached) {
|
|
68
|
+
return cached;
|
|
69
|
+
}
|
|
70
|
+
const data = new URLSearchParams();
|
|
71
|
+
data.append('client_id', 'LCWSellerEntegrator');
|
|
72
|
+
data.append('username', this.client.params.credentials.username);
|
|
73
|
+
data.append('password', this.client.params.credentials.password);
|
|
74
|
+
data.append('grant_type', 'password');
|
|
75
|
+
data.append('client_secret', 'D51C3FADCA8A40118A88F3CD6C197EEA');
|
|
76
|
+
data.append('scope', 'openid');
|
|
77
|
+
return (0, axios_1.default)({
|
|
78
|
+
method: 'POST',
|
|
79
|
+
url: 'https://pars.lcwaikiki.com/sts/issue/oidc/token',
|
|
80
|
+
data: data.toString(),
|
|
81
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
82
|
+
})
|
|
83
|
+
.then((response) => {
|
|
84
|
+
if (typeof response.data?.access_token !== 'string') {
|
|
85
|
+
throw new Error('Unexpected error: No access token found!');
|
|
86
|
+
}
|
|
87
|
+
// store it on the cache
|
|
88
|
+
this.client.params.kvHandler.set(`lcw-${this.client.params.credentials.username}-access-token`, response.data.access_token, 600);
|
|
89
|
+
return Promise.resolve(response.data.access_token);
|
|
90
|
+
})
|
|
91
|
+
.catch((error) => {
|
|
92
|
+
return Promise.reject(error);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.Request = Request;
|
|
97
|
+
//# sourceMappingURL=request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/integrations/lcw/v1/request.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,kDAAiE;AAEjE,4EAA6C;AAE7C,0DAA8D;AAE9D,MAAa,OAAO;IAII;IAAwB;IAHpC,WAAW,CAA8B;IACzC,iBAAiB,CAAY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n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2023-2024\n */\n\nimport axios, { AxiosRequestConfig, AxiosResponse } from 'axios';\nimport { Client } from './client';\nimport MockAdapter from 'axios-mock-adapter';\nimport { IRequest, IRequestInput } from './../../../common/request';\nimport { generateRequestId } from '../../../utils/request-id';\n\nexport class Request implements IRequest {\n private axiosConfig: Partial<AxiosRequestConfig>;\n private axiosMockCallback?: Function;\n\n constructor(private client: Client, private request: Partial<IRequestInput>) {\n if (this.request.headers == undefined) {\n this.request.headers = {};\n }\n this.request.headers['Accept'] = this.request.headers?.['Accept'] ?? 'application/json';\n this.request.headers['User-Agent'] = this.request.headers?.['User-Agent'] ?? 'Entegrasyon.app/1.0';\n if (this.request.body) {\n this.request.headers['Content-Type'] = this.request.headers?.['Content-Type'] ?? 'application/json';\n }\n\n this.axiosConfig = {\n baseURL: this.client.getBaseURL(),\n timeout: this.client.params.options?.timeout,\n proxy: this.client.params.options?.proxy,\n method: this.request.method,\n url: this.request.path,\n params: this.request.params,\n data: this.request.body,\n headers: this.request.headers,\n responseType: 'json',\n validateStatus: (status: number) => {\n return ![401, 403, 404, 500].includes(status);\n },\n };\n }\n\n setAxiosMock(callback: Function) {\n this.axiosMockCallback = callback;\n }\n\n getRequestId(): string {\n return generateRequestId(this.axiosConfig, 'lcw-v1');\n }\n\n async send(): Promise<AxiosResponse> {\n // mocks will be used during the tests\n if (this.axiosMockCallback != undefined) {\n const mock = new MockAdapter(axios);\n this.axiosMockCallback(mock);\n this.request.headers['Authorization'] = 'Bearer test';\n } else {\n this.request.headers['Authorization'] = 'Bearer ' + (await this.getAccessToken());\n }\n\n return axios(this.axiosConfig);\n }\n\n async getAccessToken(): Promise<string> {\n const cached = await this.client.params.kvHandler.get(`lcw-${this.client.params.credentials.username}-access-token`);\n if (cached) {\n return cached;\n }\n\n const data = new URLSearchParams();\n data.append('client_id', 'LCWSellerEntegrator');\n data.append('username', this.client.params.credentials.username);\n data.append('password', this.client.params.credentials.password);\n data.append('grant_type', 'password');\n data.append('client_secret', 'D51C3FADCA8A40118A88F3CD6C197EEA');\n data.append('scope', 'openid');\n\n return axios({\n method: 'POST',\n url: 'https://pars.lcwaikiki.com/sts/issue/oidc/token',\n data: data.toString(),\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n })\n .then((response) => {\n if (typeof response.data?.access_token !== 'string') {\n throw new Error('Unexpected error: No access token found!');\n }\n\n // store it on the cache\n this.client.params.kvHandler.set(`lcw-${this.client.params.credentials.username}-access-token`, response.data.access_token, 600);\n\n return Promise.resolve(response.data.access_token);\n })\n .catch((error) => {\n return Promise.reject(error);\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client module for N11
|
|
3
|
+
* @package entegrasyonapp/lib
|
|
4
|
+
* @author Ekin Karadeniz
|
|
5
|
+
* @copyright 2023-2024
|
|
6
|
+
*/
|
|
7
|
+
import { Request } from "./request";
|
|
8
|
+
import { IClient } from "./../../../common/client";
|
|
9
|
+
import { IRequestInput } from "./../../../common/request";
|
|
10
|
+
export interface ICredentials {
|
|
11
|
+
apiKey: string;
|
|
12
|
+
apiSecret: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IOptions {
|
|
15
|
+
debug: boolean;
|
|
16
|
+
timeout: number;
|
|
17
|
+
proxy: any;
|
|
18
|
+
}
|
|
19
|
+
export interface IClientParams {
|
|
20
|
+
credentials: ICredentials;
|
|
21
|
+
options?: Partial<IOptions>;
|
|
22
|
+
}
|
|
23
|
+
export declare class Client implements IClient {
|
|
24
|
+
params: IClientParams;
|
|
25
|
+
constructor(params: IClientParams);
|
|
26
|
+
getBaseURL(): string;
|
|
27
|
+
request(request: Partial<IRequestInput>): Request;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/integrations/n11/v2/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC1B,WAAW,EAAE,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC/B;AAED,qBAAa,MAAO,YAAW,OAAO;IACf,MAAM,EAAE,aAAa;gBAArB,MAAM,EAAE,aAAa;IASxC,UAAU,IAAI,MAAM;IAIpB,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO;CAGpD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Client module for N11
|
|
4
|
+
* @package entegrasyonapp/lib
|
|
5
|
+
* @author Ekin Karadeniz
|
|
6
|
+
* @copyright 2023-2024
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Client = void 0;
|
|
10
|
+
const request_1 = require("./request");
|
|
11
|
+
class Client {
|
|
12
|
+
params;
|
|
13
|
+
constructor(params) {
|
|
14
|
+
this.params = params;
|
|
15
|
+
const defaultOptions = {
|
|
16
|
+
debug: false,
|
|
17
|
+
timeout: 0, // no timeout
|
|
18
|
+
proxy: undefined
|
|
19
|
+
};
|
|
20
|
+
this.params.options = { ...defaultOptions, ...this.params.options }; // {...{foo:'bar'}, ...undefined} == {foo:'bar'}
|
|
21
|
+
}
|
|
22
|
+
getBaseURL() {
|
|
23
|
+
return `https://api.n11.com/`;
|
|
24
|
+
}
|
|
25
|
+
request(request) {
|
|
26
|
+
return new request_1.Request(this, request);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.Client = Client;
|
|
30
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/integrations/n11/v2/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAoBpC,MAAa,MAAM;IACI;IAAnB,YAAmB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QACpC,MAAM,cAAc,GAAa;YAC7B,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,CAAC,EAAE,aAAa;YACzB,KAAK,EAAE,SAAS;SACnB,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,gDAAgD;IACzH,CAAC;IAED,UAAU;QACN,OAAO,sBAAsB,CAAC;IAClC,CAAC;IAED,OAAO,CAAC,OAA+B;QACnC,OAAO,IAAI,iBAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACJ;AAjBD,wBAiBC","sourcesContent":["/**\n * Client module for N11\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2023-2024\n */\n\nimport { Request } from \"./request\";\nimport { IClient } from \"./../../../common/client\";\nimport { IRequestInput } from \"./../../../common/request\";\n\nexport interface ICredentials {\n apiKey: string;\n apiSecret: string;\n}\n\nexport interface IOptions {\n debug: boolean;\n timeout: number; // milliseconds\n proxy: any;\n}\n\nexport interface IClientParams {\n credentials: ICredentials;\n options?: Partial<IOptions>;\n}\n\nexport class Client implements IClient {\n constructor(public params: IClientParams) {\n const defaultOptions: IOptions = {\n debug: false,\n timeout: 0, // no timeout\n proxy: undefined\n };\n this.params.options = { ...defaultOptions, ...this.params.options }; // {...{foo:'bar'}, ...undefined} == {foo:'bar'}\n }\n\n getBaseURL(): string {\n return `https://api.n11.com/`;\n }\n\n request(request: Partial<IRequestInput>): Request {\n return new Request(this, request);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/n11/v2/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Client = void 0;
|
|
4
|
+
var client_1 = require("./client");
|
|
5
|
+
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return client_1.Client; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/integrations/n11/v2/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA","sourcesContent":["export { Client } from \"./client\";\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request module for N11
|
|
3
|
+
* @package entegrasyonapp/lib
|
|
4
|
+
* @author Ekin Karadeniz
|
|
5
|
+
* @copyright 2023-2024
|
|
6
|
+
*/
|
|
7
|
+
import { AxiosResponse } from "axios";
|
|
8
|
+
import { Client } from "./client";
|
|
9
|
+
import { IRequest, IRequestInput } from "./../../../common/request";
|
|
10
|
+
export declare class Request implements IRequest {
|
|
11
|
+
private client;
|
|
12
|
+
private request;
|
|
13
|
+
private axiosConfig;
|
|
14
|
+
private axiosMockCallback?;
|
|
15
|
+
constructor(client: Client, request: Partial<IRequestInput>);
|
|
16
|
+
setAxiosMock(callback: Function): void;
|
|
17
|
+
getRequestId(): string;
|
|
18
|
+
send(): Promise<AxiosResponse>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/integrations/n11/v2/request.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EAAsB,aAAa,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGpE,qBAAa,OAAQ,YAAW,QAAQ;IAIxB,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,OAAO;IAHnD,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,iBAAiB,CAAC,CAAW;gBAEjB,MAAM,EAAE,MAAM,EAAU,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC;IA4B3E,YAAY,CAAC,QAAQ,EAAE,QAAQ;IAI/B,YAAY,IAAI,MAAM;IAIhB,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC;CAUvC"}
|