@entegrasyonapp/lib 1.3.0 → 1.5.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.
Files changed (87) hide show
  1. package/README.md +0 -18
  2. package/dist/common/client.d.ts +1 -1
  3. package/dist/common/client.js +1 -1
  4. package/dist/common/client.js.map +1 -1
  5. package/dist/common/kv-handler.d.ts +1 -1
  6. package/dist/common/kv-handler.js +1 -1
  7. package/dist/common/kv-handler.js.map +1 -1
  8. package/dist/common/request.d.ts +1 -1
  9. package/dist/common/request.js +1 -1
  10. package/dist/common/request.js.map +1 -1
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +2 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/integrations/boyner/v1/client.d.ts +1 -1
  16. package/dist/integrations/boyner/v1/client.js +1 -1
  17. package/dist/integrations/boyner/v1/client.js.map +1 -1
  18. package/dist/integrations/boyner/v1/request.d.ts +1 -1
  19. package/dist/integrations/boyner/v1/request.js +1 -1
  20. package/dist/integrations/boyner/v1/request.js.map +1 -1
  21. package/dist/integrations/ciceksepeti/v1/client.d.ts +1 -1
  22. package/dist/integrations/ciceksepeti/v1/client.js +1 -1
  23. package/dist/integrations/ciceksepeti/v1/client.js.map +1 -1
  24. package/dist/integrations/ciceksepeti/v1/request.d.ts +1 -1
  25. package/dist/integrations/ciceksepeti/v1/request.js +1 -1
  26. package/dist/integrations/ciceksepeti/v1/request.js.map +1 -1
  27. package/dist/integrations/hepsiburada/v1/client.d.ts +1 -1
  28. package/dist/integrations/hepsiburada/v1/client.js +1 -1
  29. package/dist/integrations/hepsiburada/v1/client.js.map +1 -1
  30. package/dist/integrations/hepsiburada/v1/request.d.ts +1 -1
  31. package/dist/integrations/hepsiburada/v1/request.js +1 -1
  32. package/dist/integrations/hepsiburada/v1/request.js.map +1 -1
  33. package/dist/integrations/lcw/v1/client.d.ts +1 -1
  34. package/dist/integrations/lcw/v1/client.js +1 -1
  35. package/dist/integrations/lcw/v1/client.js.map +1 -1
  36. package/dist/integrations/lcw/v1/request.d.ts +1 -1
  37. package/dist/integrations/lcw/v1/request.js +1 -1
  38. package/dist/integrations/lcw/v1/request.js.map +1 -1
  39. package/dist/integrations/modanisa/v1/client.d.ts +34 -0
  40. package/dist/integrations/modanisa/v1/client.d.ts.map +1 -0
  41. package/dist/integrations/modanisa/v1/client.js +39 -0
  42. package/dist/integrations/modanisa/v1/client.js.map +1 -0
  43. package/dist/integrations/modanisa/v1/index.d.ts +2 -0
  44. package/dist/integrations/modanisa/v1/index.d.ts.map +1 -0
  45. package/dist/integrations/modanisa/v1/index.js +7 -0
  46. package/dist/integrations/modanisa/v1/index.js.map +1 -0
  47. package/dist/integrations/modanisa/v1/request.d.ts +20 -0
  48. package/dist/integrations/modanisa/v1/request.d.ts.map +1 -0
  49. package/dist/integrations/modanisa/v1/request.js +67 -0
  50. package/dist/integrations/modanisa/v1/request.js.map +1 -0
  51. package/dist/integrations/n11/v2/client.d.ts +1 -1
  52. package/dist/integrations/n11/v2/client.js +1 -1
  53. package/dist/integrations/n11/v2/client.js.map +1 -1
  54. package/dist/integrations/n11/v2/request.d.ts +1 -1
  55. package/dist/integrations/n11/v2/request.js +1 -1
  56. package/dist/integrations/n11/v2/request.js.map +1 -1
  57. package/dist/integrations/ozon/v1/client.d.ts +1 -1
  58. package/dist/integrations/ozon/v1/client.js +1 -1
  59. package/dist/integrations/ozon/v1/client.js.map +1 -1
  60. package/dist/integrations/ozon/v1/request.d.ts +1 -1
  61. package/dist/integrations/ozon/v1/request.js +1 -1
  62. package/dist/integrations/ozon/v1/request.js.map +1 -1
  63. package/dist/integrations/pttavm/v1/client.d.ts +1 -1
  64. package/dist/integrations/pttavm/v1/client.js +1 -1
  65. package/dist/integrations/pttavm/v1/client.js.map +1 -1
  66. package/dist/integrations/pttavm/v1/request.d.ts +1 -1
  67. package/dist/integrations/pttavm/v1/request.js +1 -1
  68. package/dist/integrations/pttavm/v1/request.js.map +1 -1
  69. package/dist/integrations/temu/v1/client.d.ts +1 -1
  70. package/dist/integrations/temu/v1/client.js +1 -1
  71. package/dist/integrations/temu/v1/client.js.map +1 -1
  72. package/dist/integrations/temu/v1/request.d.ts +1 -1
  73. package/dist/integrations/temu/v1/request.js +1 -1
  74. package/dist/integrations/temu/v1/request.js.map +1 -1
  75. package/dist/integrations/trendyol/v1/client.d.ts +1 -1
  76. package/dist/integrations/trendyol/v1/client.js +1 -1
  77. package/dist/integrations/trendyol/v1/client.js.map +1 -1
  78. package/dist/integrations/trendyol/v1/request.d.ts +1 -1
  79. package/dist/integrations/trendyol/v1/request.js +1 -1
  80. package/dist/integrations/trendyol/v1/request.js.map +1 -1
  81. package/dist/utils/backoff-request.d.ts +1 -1
  82. package/dist/utils/backoff-request.js +1 -1
  83. package/dist/utils/backoff-request.js.map +1 -1
  84. package/dist/utils/request-id.d.ts +1 -1
  85. package/dist/utils/request-id.js +1 -1
  86. package/dist/utils/request-id.js.map +1 -1
  87. package/package.json +12 -6
package/README.md CHANGED
@@ -1,19 +1 @@
1
1
  # entegrasyonapp/lib
2
-
3
- ## How to?
4
-
5
- ### Run tests
6
-
7
- ```bash
8
- npm run test
9
- ```
10
-
11
- ### Build
12
-
13
- ```bash
14
- npm run build
15
- ```
16
-
17
- ## Examples
18
-
19
- Example usages are in the `examples/` folder.
@@ -2,7 +2,7 @@
2
2
  * Common client interfaces
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  import { IRequest, IRequestInput } from "./request";
8
8
  export interface IClient {
@@ -3,7 +3,7 @@
3
3
  * Common client interfaces
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/common/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG","sourcesContent":["/**\n * Common client interfaces\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2023-2024\n */\n\nimport { IRequest, IRequestInput } from \"./request\";\n\nexport interface IClient {\n getBaseURL(): string;\n request(request: Partial<IRequestInput>): IRequest;\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/common/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG","sourcesContent":["/**\n * Common client interfaces\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2026\n */\n\nimport { IRequest, IRequestInput } from \"./request\";\n\nexport interface IClient {\n getBaseURL(): string;\n request(request: Partial<IRequestInput>): IRequest;\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * Common key-value handler interface
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  export interface IKVHandler {
8
8
  set(key: string, value: string, expiry?: number): Promise<void>;
@@ -3,7 +3,7 @@
3
3
  * Common key-value handler interface
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ExampleKVHandler = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"kv-handler.js","sourceRoot":"","sources":["../../src/common/kv-handler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAOH,MAAa,gBAAgB;IACL;IAApB,YAAoB,OAA4B,IAAI,GAAG,EAAE;QAArC,SAAI,GAAJ,IAAI,CAAiC;IAAG,CAAC;IAE7D,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,MAA2B;QACvD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC1B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,GAAG,CAAC,GAAW;QACX,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/C,CAAC;CACJ;AAXD,4CAWC","sourcesContent":["/**\n * Common key-value handler interface\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2023-2024\n */\n\nexport interface IKVHandler {\n set(key: string, value: string, expiry?: number): Promise<void>;\n get(key: string): Promise<string | null | undefined>;\n}\n\nexport class ExampleKVHandler implements IKVHandler {\n constructor(private keys: Map<string, string> = new Map()) {}\n\n set(key: string, value: string, expiry?: number | undefined): Promise<void> {\n this.keys.set(key, value);\n return Promise.resolve();\n }\n\n get(key: string): Promise<string | null | undefined> {\n return Promise.resolve(this.keys.get(key));\n }\n}\n"]}
1
+ {"version":3,"file":"kv-handler.js","sourceRoot":"","sources":["../../src/common/kv-handler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAOH,MAAa,gBAAgB;IACL;IAApB,YAAoB,OAA4B,IAAI,GAAG,EAAE;QAArC,SAAI,GAAJ,IAAI,CAAiC;IAAG,CAAC;IAE7D,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,MAA2B;QACvD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC1B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,GAAG,CAAC,GAAW;QACX,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/C,CAAC;CACJ;AAXD,4CAWC","sourcesContent":["/**\n * Common key-value handler interface\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2026\n */\n\nexport interface IKVHandler {\n set(key: string, value: string, expiry?: number): Promise<void>;\n get(key: string): Promise<string | null | undefined>;\n}\n\nexport class ExampleKVHandler implements IKVHandler {\n constructor(private keys: Map<string, string> = new Map()) {}\n\n set(key: string, value: string, expiry?: number | undefined): Promise<void> {\n this.keys.set(key, value);\n return Promise.resolve();\n }\n\n get(key: string): Promise<string | null | undefined> {\n return Promise.resolve(this.keys.get(key));\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * Common request interfaces
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  import { AxiosResponse } from "axios";
8
8
  export interface IRequest {
@@ -3,7 +3,7 @@
3
3
  * Common request interfaces
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  //# sourceMappingURL=request.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/common/request.ts"],"names":[],"mappings":";AAAA;;;;;GAKG","sourcesContent":["/**\n * Common request interfaces\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2023-2024\n */\n\nimport { AxiosResponse } from \"axios\";\n\nexport interface IRequest {\n setAxiosMock(callback: Function): void;\n getRequestId(): string;\n send(): Promise<AxiosResponse>;\n}\n\nexport interface IRequestInput {\n method: string;\n path: string;\n params: any;\n body: any;\n headers: any;\n soapAction: string;\n}\n"]}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/common/request.ts"],"names":[],"mappings":";AAAA;;;;;GAKG","sourcesContent":["/**\n * Common request interfaces\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2026\n */\n\nimport { AxiosResponse } from \"axios\";\n\nexport interface IRequest {\n setAxiosMock(callback: Function): void;\n getRequestId(): string;\n send(): Promise<AxiosResponse>;\n}\n\nexport interface IRequestInput {\n method: string;\n path: string;\n params: any;\n body: any;\n headers: any;\n soapAction: string;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * as PttAvm from './integrations/pttavm/v1';
7
7
  export * as LCW from './integrations/lcw/v1';
8
8
  export * as Ozon from './integrations/ozon/v1';
9
9
  export * as Temu from './integrations/temu/v1';
10
+ export * as Modanisa from './integrations/modanisa/v1';
10
11
  export { generateRequestId } from './utils/request-id';
11
12
  export { backoffRequest, defaultBackoffRequestOptions } from './utils/backoff-request';
12
13
  export type { IBackoffRequestOptions } from './utils/backoff-request';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAG/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvF,YAAY,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAGtE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAC/C,OAAO,KAAK,QAAQ,MAAM,4BAA4B,CAAC;AAGvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvF,YAAY,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAGtE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.defaultBackoffRequestOptions = exports.backoffRequest = exports.generateRequestId = exports.Temu = exports.Ozon = exports.LCW = exports.PttAvm = exports.N11 = exports.Boyner = exports.Ciceksepeti = exports.Trendyol = exports.Hepsiburada = void 0;
36
+ exports.defaultBackoffRequestOptions = exports.backoffRequest = exports.generateRequestId = exports.Modanisa = exports.Temu = exports.Ozon = exports.LCW = exports.PttAvm = exports.N11 = exports.Boyner = exports.Ciceksepeti = exports.Trendyol = exports.Hepsiburada = void 0;
37
37
  // Integrations
38
38
  exports.Hepsiburada = __importStar(require("./integrations/hepsiburada/v1"));
39
39
  exports.Trendyol = __importStar(require("./integrations/trendyol/v1"));
@@ -44,6 +44,7 @@ exports.PttAvm = __importStar(require("./integrations/pttavm/v1"));
44
44
  exports.LCW = __importStar(require("./integrations/lcw/v1"));
45
45
  exports.Ozon = __importStar(require("./integrations/ozon/v1"));
46
46
  exports.Temu = __importStar(require("./integrations/temu/v1"));
47
+ exports.Modanisa = __importStar(require("./integrations/modanisa/v1"));
47
48
  // Utils
48
49
  var request_id_1 = require("./utils/request-id");
49
50
  Object.defineProperty(exports, "generateRequestId", { enumerable: true, get: function () { return request_id_1.generateRequestId; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,eAAe;AACf,6EAA6D;AAC7D,uEAAuD;AACvD,6EAA6D;AAC7D,mEAAmD;AACnD,6DAA6C;AAC7C,mEAAmD;AACnD,6DAA6C;AAC7C,+DAA+C;AAC/C,+DAA+C;AAE/C,QAAQ;AACR,iDAAuD;AAA9C,+GAAA,iBAAiB,OAAA;AAC1B,2DAAuF;AAA9E,iHAAA,cAAc,OAAA;AAAE,+HAAA,4BAA4B,OAAA","sourcesContent":["// Integrations\nexport * as Hepsiburada from './integrations/hepsiburada/v1';\nexport * as Trendyol from './integrations/trendyol/v1';\nexport * as Ciceksepeti from './integrations/ciceksepeti/v1';\nexport * as Boyner from './integrations/boyner/v1';\nexport * as N11 from './integrations/n11/v2';\nexport * as PttAvm from './integrations/pttavm/v1';\nexport * as LCW from './integrations/lcw/v1';\nexport * as Ozon from './integrations/ozon/v1';\nexport * as Temu from './integrations/temu/v1';\n\n// Utils\nexport { generateRequestId } from './utils/request-id';\nexport { backoffRequest, defaultBackoffRequestOptions } from './utils/backoff-request';\nexport type { IBackoffRequestOptions } from './utils/backoff-request';\n\n// Common\nexport type { IClient } from './common/client';\nexport type { IRequest, IRequestInput } from './common/request';\nexport type { IKVHandler } from './common/kv-handler';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,eAAe;AACf,6EAA6D;AAC7D,uEAAuD;AACvD,6EAA6D;AAC7D,mEAAmD;AACnD,6DAA6C;AAC7C,mEAAmD;AACnD,6DAA6C;AAC7C,+DAA+C;AAC/C,+DAA+C;AAC/C,uEAAuD;AAEvD,QAAQ;AACR,iDAAuD;AAA9C,+GAAA,iBAAiB,OAAA;AAC1B,2DAAuF;AAA9E,iHAAA,cAAc,OAAA;AAAE,+HAAA,4BAA4B,OAAA","sourcesContent":["// Integrations\nexport * as Hepsiburada from './integrations/hepsiburada/v1';\nexport * as Trendyol from './integrations/trendyol/v1';\nexport * as Ciceksepeti from './integrations/ciceksepeti/v1';\nexport * as Boyner from './integrations/boyner/v1';\nexport * as N11 from './integrations/n11/v2';\nexport * as PttAvm from './integrations/pttavm/v1';\nexport * as LCW from './integrations/lcw/v1';\nexport * as Ozon from './integrations/ozon/v1';\nexport * as Temu from './integrations/temu/v1';\nexport * as Modanisa from './integrations/modanisa/v1';\n\n// Utils\nexport { generateRequestId } from './utils/request-id';\nexport { backoffRequest, defaultBackoffRequestOptions } from './utils/backoff-request';\nexport type { IBackoffRequestOptions } from './utils/backoff-request';\n\n// Common\nexport type { IClient } from './common/client';\nexport type { IRequest, IRequestInput } from './common/request';\nexport type { IKVHandler } from './common/kv-handler';\n"]}
@@ -2,7 +2,7 @@
2
2
  * Client module for Boyner
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  import { Request } from "./request";
8
8
  import { IClient } from "./../../../common/client";
@@ -3,7 +3,7 @@
3
3
  * Client module for Boyner
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.Client = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/integrations/boyner/v1/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAqBpC,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,2CAA2C,CAAC;IACvD,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 Boyner\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 supplierId: string;\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://merchantapi.boyner.com.tr/sapigw/';\n }\n\n request(request: Partial<IRequestInput>): Request {\n return new Request(this, request);\n }\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/integrations/boyner/v1/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAqBpC,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,2CAA2C,CAAC;IACvD,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 Boyner\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2026\n */\n\nimport { Request } from \"./request\";\nimport { IClient } from \"./../../../common/client\";\nimport { IRequestInput } from \"./../../../common/request\";\n\nexport interface ICredentials {\n supplierId: string;\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://merchantapi.boyner.com.tr/sapigw/';\n }\n\n request(request: Partial<IRequestInput>): Request {\n return new Request(this, request);\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * Request module for Boyner
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  import { AxiosResponse } from "axios";
8
8
  import { Client } from "./client";
@@ -3,7 +3,7 @@
3
3
  * Request module for Boyner
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/integrations/boyner/v1/request.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,kDAAiE;AAEjE,4EAA6C;AAE7C,0DAA8D;AAE9D,MAAa,OAAO;IAII;IAAwB;IAHpC,WAAW,CAA8B;IACzC,iBAAiB,CAAY;IAErC,YAAoB,MAAc,EAAU,OAA+B;QAAvD,WAAM,GAAN,MAAM,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAwB;QACvE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;YACpC,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;QAC9B,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC;QACxF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,oBAAoB,CAAC;QAC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E,WAAW,CAAC,CAAC;IAC5D,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 Boyner\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'] ?? `${this.client.params.credentials.supplierId} - Entegrasyon.app`;\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.apiKey,\n password: this.client.params.credentials.apiSecret\n };\n }\n\n setAxiosMock(callback: Function) {\n this.axiosMockCallback = callback;\n }\n\n getRequestId(): string {\n return generateRequestId(this.axiosConfig, 'boyner-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}"]}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/integrations/boyner/v1/request.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,kDAAiE;AAEjE,4EAA6C;AAE7C,0DAA8D;AAE9D,MAAa,OAAO;IAII;IAAwB;IAHpC,WAAW,CAA8B;IACzC,iBAAiB,CAAY;IAErC,YAAoB,MAAc,EAAU,OAA+B;QAAvD,WAAM,GAAN,MAAM,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAwB;QACvE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;YACpC,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;QAC9B,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC;QACxF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,oBAAoB,CAAC;QAC9I,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,cAAc,CAAC,IAAI,kBAAkB,CAAC;QACxG,CAAC;QAED,IAAI,CAAC,WAAW,GAAG;YACf,OAAO,EA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ACjC,CAAC;QAED,OAAO,IAAA,eAAK,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;CACJ;AArDD,0BAqDC","sourcesContent":["/**\n * Request module for Boyner\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2026\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'] ?? `${this.client.params.credentials.supplierId} - Entegrasyon.app`;\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.apiKey,\n password: this.client.params.credentials.apiSecret\n };\n }\n\n setAxiosMock(callback: Function) {\n this.axiosMockCallback = callback;\n }\n\n getRequestId(): string {\n return generateRequestId(this.axiosConfig, 'boyner-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}"]}
@@ -2,7 +2,7 @@
2
2
  * Client module for Çiçeksepeti
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  import { Request } from "./request";
8
8
  import { IClient } from "./../../../common/client";
@@ -3,7 +3,7 @@
3
3
  * Client module for Çiçeksepeti
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.Client = exports.Environment = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/integrations/ciceksepeti/v1/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAepC,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,yDAAU,CAAA;IACV,+CAAK,CAAA;AACT,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAOD,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,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;YAChD,OAAO,8CAA8C,CAAC;QAC1D,CAAC;QACD,OAAO,sCAAsC,CAAC;IAClD,CAAC;IAED,OAAO,CAAC,OAA+B;QACnC,OAAO,IAAI,iBAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACJ;AArBD,wBAqBC","sourcesContent":["/**\n * Client module for Çiçeksepeti\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}\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 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 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 if (this.params.options?.env == Environment.STAGE) {\n return 'https://sandbox-apis.ciceksepeti.com/api/v1/';\n }\n return 'https://apis.ciceksepeti.com/api/v1/';\n }\n\n request(request: Partial<IRequestInput>): Request {\n return new Request(this, request);\n }\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/integrations/ciceksepeti/v1/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAepC,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,yDAAU,CAAA;IACV,+CAAK,CAAA;AACT,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAOD,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,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;YAChD,OAAO,8CAA8C,CAAC;QAC1D,CAAC;QACD,OAAO,sCAAsC,CAAC;IAClD,CAAC;IAED,OAAO,CAAC,OAA+B;QACnC,OAAO,IAAI,iBAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACJ;AArBD,wBAqBC","sourcesContent":["/**\n * Client module for Çiçeksepeti\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2026\n */\n\nimport { Request } from \"./request\";\nimport { IClient } from \"./../../../common/client\";\nimport { IRequestInput } from \"./../../../common/request\";\n\nexport interface ICredentials {\n apiKey: 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 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 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 if (this.params.options?.env == Environment.STAGE) {\n return 'https://sandbox-apis.ciceksepeti.com/api/v1/';\n }\n return 'https://apis.ciceksepeti.com/api/v1/';\n }\n\n request(request: Partial<IRequestInput>): Request {\n return new Request(this, request);\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * Request module for Çiçeksepeti
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  import { AxiosResponse } from "axios";
8
8
  import { Client } from "./client";
@@ -3,7 +3,7 @@
3
3
  * Request module for Çiçeksepeti
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/integrations/ciceksepeti/v1/request.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,kDAAiE;AAEjE,4EAA6C;AAE7C,0DAA8D;AAE9D,MAAa,OAAO;IAII;IAAwB;IAHpC,WAAW,CAA8B;IACzC,iBAAiB,CAAY;IAErC,YAAoB,MAAc,EAAU,OAA+B;QAAvD,WAAM,GAAN,MAAM,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAwB;QACvE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;YACpC,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;QAC9B,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC;QACxF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;QAC1E,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,cAAc,CAAC,IAAI,kBAAkB,CAAC;QACxG,CAAC;QAED,IAAI,CAAC,WAAW,GAAG;YACf,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACjC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO;YAC5C,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK;YACxC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;YAC3B,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;YACtB,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;YAC3B,IAAI,EAAE,IAAI,CAAC,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;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;AAhDD,0BAgDC","sourcesContent":["/**\n * Request module for Çiçeksepeti\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['x-api-key'] = this.client.params.credentials.apiKey;\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, 'ciceksepeti-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}"]}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/integrations/ciceksepeti/v1/request.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,kDAAiE;AAEjE,4EAA6C;AAE7C,0DAA8D;AAE9D,MAAa,OAAO;IAII;IAAwB;IAHpC,WAAW,CAA8B;IACzC,iBAAiB,CAAY;IAErC,YAAoB,MAAc,EAAU,OAA+B;QAAvD,WAAM,GAAN,MAAM,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAwB;QACvE,IAAI,IA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,CAAC;SACJ,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;AAhDD,0BAgDC","sourcesContent":["/**\n * Request module for Çiçeksepeti\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2026\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['x-api-key'] = this.client.params.credentials.apiKey;\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, 'ciceksepeti-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}"]}
@@ -2,7 +2,7 @@
2
2
  * Client module for Hepsiburada
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  import { Request } from "./request";
8
8
  import { IClient } from "./../../../common/client";
@@ -3,7 +3,7 @@
3
3
  * Client module for Hepsiburada
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.Client = exports.Service = exports.Environment = void 0;
@@ -1 +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"]}
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 2026\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"]}
@@ -2,7 +2,7 @@
2
2
  * Request module for Hepsiburada
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  import { AxiosResponse } from "axios";
8
8
  import { Client } from "./client";
@@ -3,7 +3,7 @@
3
3
  * Request module for Hepsiburada
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/integrations/hepsiburada/v1/request.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEH,kDAAiE;AAEjE,4EAA6C;AAE7C,0DAA8D;AAE9D,MAAa,OAAO;IAII;IAAwB;IAHpC,WAAW,CAA8B;IACzC,iBAAiB,CAAY;IAErC,YAAoB,MAAc,EAAU,OAA+B;QAAvD,WAAM,GAAN,MAAM,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAwB;QACvE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;YACpC,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;QAC9B,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC;QACxF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC;QAC7E,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,cAAc,CAAC,IAAI,kBAAkB,CAAC;QACxG,CAAC;QAED,IAAI,CAAC,WAAW,GAAG;YACf,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACjC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO;YAC5C,KAAK,EAAE,IAAI,CAAC,MAAM,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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}"]}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/integrations/hepsiburada/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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C/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 2026\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}"]}
@@ -2,7 +2,7 @@
2
2
  * Client module for LCW Marketplace
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  import { Request } from "./request";
8
8
  import { IClient } from "./../../../common/client";
@@ -3,7 +3,7 @@
3
3
  * Client module for LCW Marketplace
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.Client = exports.Service = exports.Environment = void 0;
@@ -1 +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"]}
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 2026\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"]}
@@ -2,7 +2,7 @@
2
2
  * Request module for LCW Marketplace
3
3
  * @package entegrasyonapp/lib
4
4
  * @author Ekin Karadeniz
5
- * @copyright 2023-2024
5
+ * @copyright 2026
6
6
  */
7
7
  import { AxiosResponse } from 'axios';
8
8
  import { Client } from './client';
@@ -3,7 +3,7 @@
3
3
  * Request module for LCW Marketplace
4
4
  * @package entegrasyonapp/lib
5
5
  * @author Ekin Karadeniz
6
- * @copyright 2023-2024
6
+ * @copyright 2026
7
7
  */
8
8
  var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -1 +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;IAErC,YAAoB,MAAc,EAAU,OAA+B;QAAvD,WAAM,GAAN,MAAM,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAwB;QACvE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;YACpC,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;QAC9B,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC;QACxF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,qBAAqB,CAAC;QACnG,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,cAAc,CAAC,IAAI,kBAAkB,CAAC;QACxG,CAAC;QAED,IAAI,CAAC,WAAW,GAAG;YACf,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACjC,OAAO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AAC,SAAS,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,eAAe,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;YAEjI,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACvD,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YACb,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACX,CAAC;CACJ;AArFD,0BAqFC","sourcesContent":["/**\n * Request module for LCW Marketplace\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"]}
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;IAErC,YAAoB,MAAc,EAAU,OAA+B;QAAvD,WAAM,GAAN,MAAM,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAwB;QACvE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;YAC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AAW,CAAC,QAAQ,CAAC,CAAC;QACjE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,kCAAkC,CAAC,CAAC;QACjE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAE/B,OAAO,IAAA,eAAK,EAAC;YACT,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,iDAAiD;YACtD,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE;YACrB,OAAO,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE;SACnE,CAAC;aACG,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACf,IAAI,OAAO,QAAQ,CAAC,IAAI,EAAE,YAAY,KAAK,QAAQ,EAAE,CAAC;gBAClD,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;YAChE,CAAC;YAED,wBAAwB;YACxB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,eAAe,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;YAEjI,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACvD,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YACb,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACX,CAAC;CACJ;AArFD,0BAqFC","sourcesContent":["/**\n * Request module for LCW Marketplace\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2026\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,34 @@
1
+ /**
2
+ * Client module for Modanisa
3
+ * @package entegrasyonapp/lib
4
+ * @author Ekin Karadeniz
5
+ * @copyright 2026
6
+ */
7
+ import { Request } from "./request";
8
+ import { IClient } from "./../../../common/client";
9
+ import { IRequestInput } from "./../../../common/request";
10
+ export interface ICredentials {
11
+ username: string;
12
+ password: string;
13
+ }
14
+ export interface IOptions {
15
+ env: Environment;
16
+ debug: boolean;
17
+ timeout: number;
18
+ proxy: any;
19
+ }
20
+ export declare enum Environment {
21
+ PRODUCTION = 0,
22
+ STAGE = 1
23
+ }
24
+ export interface IClientParams {
25
+ credentials: ICredentials;
26
+ options?: Partial<IOptions>;
27
+ }
28
+ export declare class Client implements IClient {
29
+ params: IClientParams;
30
+ constructor(params: IClientParams);
31
+ getBaseURL(): string;
32
+ request(request: Partial<IRequestInput>): Request;
33
+ }
34
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/integrations/modanisa/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,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,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;IAUxC,UAAU,IAAI,MAAM;IAOpB,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO;CAGpD"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ /**
3
+ * Client module for Modanisa
4
+ * @package entegrasyonapp/lib
5
+ * @author Ekin Karadeniz
6
+ * @copyright 2026
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.Client = 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
+ class Client {
17
+ params;
18
+ constructor(params) {
19
+ this.params = params;
20
+ const defaultOptions = {
21
+ env: Environment.PRODUCTION,
22
+ debug: false,
23
+ timeout: 0, // no timeout
24
+ proxy: undefined
25
+ };
26
+ this.params.options = { ...defaultOptions, ...this.params.options }; // {...{foo:'bar'}, ...undefined} == {foo:'bar'}
27
+ }
28
+ getBaseURL() {
29
+ if (this.params.options?.env == Environment.STAGE) {
30
+ return 'https://marketplace-stg.modanisa.com/api/marketplace/';
31
+ }
32
+ return 'https://marketplace.modanisa.com/api/marketplace/';
33
+ }
34
+ request(request) {
35
+ return new request_1.Request(this, request);
36
+ }
37
+ }
38
+ exports.Client = Client;
39
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/integrations/modanisa/v1/client.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAgBpC,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,yDAAU,CAAA;IACV,+CAAK,CAAA;AACT,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAOD,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,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;YAChD,OAAO,uDAAuD,CAAC;QACnE,CAAC;QACD,OAAO,mDAAmD,CAAC;IAC/D,CAAC;IAED,OAAO,CAAC,OAA+B;QACnC,OAAO,IAAI,iBAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACJ;AArBD,wBAqBC","sourcesContent":["/**\n * Client module for Modanisa\n * @package entegrasyonapp/lib\n * @author Ekin Karadeniz\n * @copyright 2026\n */\n\nimport { Request } from \"./request\";\nimport { IClient } from \"./../../../common/client\";\nimport { IRequestInput } from \"./../../../common/request\";\n\nexport interface ICredentials {\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 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 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 if (this.params.options?.env == Environment.STAGE) {\n return 'https://marketplace-stg.modanisa.com/api/marketplace/';\n }\n return 'https://marketplace.modanisa.com/api/marketplace/';\n }\n\n request(request: Partial<IRequestInput>): Request {\n return new Request(this, request);\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { Client, Environment } from "./client";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/modanisa/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ 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
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/integrations/modanisa/v1/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+C;AAAtC,gGAAA,MAAM,OAAA;AAAE,qGAAA,WAAW,OAAA","sourcesContent":["export { Client, Environment } from \"./client\";\n"]}