@or-sdk/ccp 2.2.2-beta.3541.0 → 2.2.2-beta.3545.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 (126) hide show
  1. package/dist/cjs/Ccp.js +0 -4
  2. package/dist/cjs/Ccp.js.map +1 -1
  3. package/dist/cjs/api/index.js +2 -10
  4. package/dist/cjs/api/index.js.map +1 -1
  5. package/dist/cjs/api/{reportingApi.js → reporting-api/reportingApi.js} +19 -3
  6. package/dist/cjs/api/reporting-api/reportingApi.js.map +1 -0
  7. package/dist/cjs/api/reporting-api/types.js.map +1 -0
  8. package/dist/cjs/{utils.js → api/reporting-api/utils/adaptParams.js} +1 -1
  9. package/dist/cjs/api/reporting-api/utils/adaptParams.js.map +1 -0
  10. package/dist/cjs/constants.js +0 -16
  11. package/dist/cjs/constants.js.map +1 -1
  12. package/dist/cjs/index.js +0 -1
  13. package/dist/cjs/index.js.map +1 -1
  14. package/dist/cjs/types.js +1 -4
  15. package/dist/cjs/types.js.map +1 -1
  16. package/dist/esm/Ccp.js +1 -5
  17. package/dist/esm/Ccp.js.map +1 -1
  18. package/dist/esm/api/index.js +1 -5
  19. package/dist/esm/api/index.js.map +1 -1
  20. package/dist/esm/api/{reportingApi.js → reporting-api/reportingApi.js} +12 -2
  21. package/dist/esm/api/reporting-api/reportingApi.js.map +1 -0
  22. package/dist/esm/api/reporting-api/types.js.map +1 -0
  23. package/dist/esm/{utils.js → api/reporting-api/utils/adaptParams.js} +1 -1
  24. package/dist/esm/api/reporting-api/utils/adaptParams.js.map +1 -0
  25. package/dist/esm/constants.js +0 -2
  26. package/dist/esm/constants.js.map +1 -1
  27. package/dist/esm/index.js +0 -1
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/esm/types.js +1 -4
  30. package/dist/esm/types.js.map +1 -1
  31. package/dist/types/Ccp.d.ts +1 -5
  32. package/dist/types/Ccp.d.ts.map +1 -1
  33. package/dist/types/api/index.d.ts +1 -5
  34. package/dist/types/api/index.d.ts.map +1 -1
  35. package/dist/types/api/reporting-api/reportingApi.d.ts +9 -0
  36. package/dist/types/api/reporting-api/reportingApi.d.ts.map +1 -0
  37. package/dist/types/api/reporting-api/types.d.ts +46 -0
  38. package/dist/types/api/reporting-api/types.d.ts.map +1 -0
  39. package/dist/types/{utils.d.ts → api/reporting-api/utils/adaptParams.d.ts} +1 -1
  40. package/dist/types/api/reporting-api/utils/adaptParams.d.ts.map +1 -0
  41. package/dist/types/constants.d.ts +0 -2
  42. package/dist/types/constants.d.ts.map +1 -1
  43. package/dist/types/index.d.ts +0 -1
  44. package/dist/types/index.d.ts.map +1 -1
  45. package/dist/types/types.d.ts +1 -23
  46. package/dist/types/types.d.ts.map +1 -1
  47. package/package.json +1 -1
  48. package/src/Ccp.ts +0 -12
  49. package/src/api/index.ts +1 -5
  50. package/src/api/reporting-api/reportingApi.ts +61 -0
  51. package/src/api/reporting-api/types.ts +49 -0
  52. package/src/constants.ts +0 -3
  53. package/src/index.ts +0 -1
  54. package/src/types.ts +1 -26
  55. package/dist/cjs/api/contracts-api/contractsApi.js +0 -136
  56. package/dist/cjs/api/contracts-api/contractsApi.js.map +0 -1
  57. package/dist/cjs/api/contracts-api/types.js.map +0 -1
  58. package/dist/cjs/api/custom-skus-api/customSkusApi.js +0 -92
  59. package/dist/cjs/api/custom-skus-api/customSkusApi.js.map +0 -1
  60. package/dist/cjs/api/custom-skus-api/types.js +0 -3
  61. package/dist/cjs/api/custom-skus-api/types.js.map +0 -1
  62. package/dist/cjs/api/patterns-api/constants.js +0 -9
  63. package/dist/cjs/api/patterns-api/constants.js.map +0 -1
  64. package/dist/cjs/api/patterns-api/patternsApi.js +0 -107
  65. package/dist/cjs/api/patterns-api/patternsApi.js.map +0 -1
  66. package/dist/cjs/api/patterns-api/types.js +0 -3
  67. package/dist/cjs/api/patterns-api/types.js.map +0 -1
  68. package/dist/cjs/api/reportingApi.js.map +0 -1
  69. package/dist/cjs/api/tiers-api/tiersApi.js +0 -78
  70. package/dist/cjs/api/tiers-api/tiersApi.js.map +0 -1
  71. package/dist/cjs/api/tiers-api/types.js +0 -3
  72. package/dist/cjs/api/tiers-api/types.js.map +0 -1
  73. package/dist/cjs/utils.js.map +0 -1
  74. package/dist/esm/api/contracts-api/contractsApi.js +0 -62
  75. package/dist/esm/api/contracts-api/contractsApi.js.map +0 -1
  76. package/dist/esm/api/contracts-api/types.js.map +0 -1
  77. package/dist/esm/api/custom-skus-api/customSkusApi.js +0 -34
  78. package/dist/esm/api/custom-skus-api/customSkusApi.js.map +0 -1
  79. package/dist/esm/api/custom-skus-api/types.js +0 -2
  80. package/dist/esm/api/custom-skus-api/types.js.map +0 -1
  81. package/dist/esm/api/patterns-api/constants.js +0 -6
  82. package/dist/esm/api/patterns-api/constants.js.map +0 -1
  83. package/dist/esm/api/patterns-api/patternsApi.js +0 -44
  84. package/dist/esm/api/patterns-api/patternsApi.js.map +0 -1
  85. package/dist/esm/api/patterns-api/types.js +0 -2
  86. package/dist/esm/api/patterns-api/types.js.map +0 -1
  87. package/dist/esm/api/reportingApi.js.map +0 -1
  88. package/dist/esm/api/tiers-api/tiersApi.js +0 -25
  89. package/dist/esm/api/tiers-api/tiersApi.js.map +0 -1
  90. package/dist/esm/api/tiers-api/types.js +0 -2
  91. package/dist/esm/api/tiers-api/types.js.map +0 -1
  92. package/dist/esm/utils.js.map +0 -1
  93. package/dist/types/api/contracts-api/contractsApi.d.ts +0 -12
  94. package/dist/types/api/contracts-api/contractsApi.d.ts.map +0 -1
  95. package/dist/types/api/contracts-api/types.d.ts +0 -112
  96. package/dist/types/api/contracts-api/types.d.ts.map +0 -1
  97. package/dist/types/api/custom-skus-api/customSkusApi.d.ts +0 -8
  98. package/dist/types/api/custom-skus-api/customSkusApi.d.ts.map +0 -1
  99. package/dist/types/api/custom-skus-api/types.d.ts +0 -14
  100. package/dist/types/api/custom-skus-api/types.d.ts.map +0 -1
  101. package/dist/types/api/patterns-api/constants.d.ts +0 -5
  102. package/dist/types/api/patterns-api/constants.d.ts.map +0 -1
  103. package/dist/types/api/patterns-api/patternsApi.d.ts +0 -9
  104. package/dist/types/api/patterns-api/patternsApi.d.ts.map +0 -1
  105. package/dist/types/api/patterns-api/types.d.ts +0 -26
  106. package/dist/types/api/patterns-api/types.d.ts.map +0 -1
  107. package/dist/types/api/reportingApi.d.ts +0 -7
  108. package/dist/types/api/reportingApi.d.ts.map +0 -1
  109. package/dist/types/api/tiers-api/tiersApi.d.ts +0 -7
  110. package/dist/types/api/tiers-api/tiersApi.d.ts.map +0 -1
  111. package/dist/types/api/tiers-api/types.d.ts +0 -13
  112. package/dist/types/api/tiers-api/types.d.ts.map +0 -1
  113. package/dist/types/utils.d.ts.map +0 -1
  114. package/src/api/contracts-api/contractsApi.ts +0 -67
  115. package/src/api/contracts-api/types.ts +0 -121
  116. package/src/api/custom-skus-api/customSkusApi.ts +0 -29
  117. package/src/api/custom-skus-api/types.ts +0 -15
  118. package/src/api/patterns-api/constants.ts +0 -4
  119. package/src/api/patterns-api/patternsApi.ts +0 -44
  120. package/src/api/patterns-api/types.ts +0 -30
  121. package/src/api/reportingApi.ts +0 -27
  122. package/src/api/tiers-api/tiersApi.ts +0 -17
  123. package/src/api/tiers-api/types.ts +0 -12
  124. /package/dist/cjs/api/{contracts-api → reporting-api}/types.js +0 -0
  125. /package/dist/esm/api/{contracts-api → reporting-api}/types.js +0 -0
  126. /package/src/{utils.ts → api/reporting-api/utils/adaptParams.ts} +0 -0
@@ -0,0 +1,61 @@
1
+ import { Usage, OptionalParams, PaginatedResponse } from '../../types';
2
+ import { BaseApi } from '../baseApi';
3
+
4
+ import { FindUsageTrafficDto, UsageRequestParams, UsageTrafficDto } from './types';
5
+ import { adaptParams } from './utils/adaptParams';
6
+
7
+ export default class ReportingApi extends BaseApi {
8
+ private readonly apiBasePath = 'api/v1';
9
+
10
+ /**
11
+ * Fetches usage data based on the provided parameters.
12
+ *
13
+ * @param {UsageRequestParams} params - The parameters to filter usage data.
14
+ * @param {string} params.clientId - Unique identifier for the client.
15
+ * @param {Date} params.dateFrom - The start date for the usage data query.
16
+ * @param {Date} params.dateTo - The end date for the usage data query.
17
+ * @param {boolean} [params.tiers] - Optional filter to include tier information.
18
+ * @param {string[]} [params.environments] - Optional filter to specify environments.
19
+ * @param {string[]} [params.accounts] - Optional filter to specify accounts.
20
+ * @param {string[]} [params.categories] - Optional filter to specify categories.
21
+ * @param {OptionalParams} [options.signal={}] - Optional parameters.
22
+ * @param {AbortSignal} [options.signal] - An abort signal to cancel the request if needed.
23
+ * @returns {Promise<Usage[]>} - A promise that resolves to an array of Usage data.
24
+ */
25
+ public async getUsage(params: UsageRequestParams, { signal }: OptionalParams = {}): Promise<Usage[]> {
26
+ return await this.apiCall({
27
+ method: 'GET',
28
+ route: `${this.apiBasePath}/usage`,
29
+ params: adaptParams<UsageRequestParams>(params),
30
+ signal,
31
+ });
32
+ }
33
+
34
+ /**
35
+ * Retrieves usage traffic based on specified filters.
36
+ *
37
+ * @param {FindUsageTrafficDto} filters - The filters to apply for retrieving usage traffic.
38
+ * @param {string} filters.clientId - Unique identifier for the client.
39
+ * @param {Date} filters.dateFrom - The start date for the traffic data query.
40
+ * @param {Date} filters.dateTo - The end date for the traffic data query.
41
+ * @param {string} [filters.environmentId] - Optional filter to specify the environment ID.
42
+ * @param {string} [filters.accountId] - Optional filter to specify the account ID.
43
+ * @param {string} [filters.category] - Optional filter to specify the category.
44
+ * @param {string} [filters.sku] - Optional filter to specify the SKU.
45
+ * @param {string} [filters.flowId] - Optional filter to specify the flow ID.
46
+ * @param {OptionalParams} [options={}] - Optional parameters.
47
+ * @param {AbortSignal} [options.signal] - An abort signal to cancel the request if needed.
48
+ * @returns {Promise<PaginatedResponse<UsageTrafficDto>>} - A promise that resolves to an array of UsageTrafficDto data.
49
+ */
50
+ public async retriveUsageTraffic(
51
+ filters: FindUsageTrafficDto,
52
+ { signal }: OptionalParams = {}
53
+ ): Promise<PaginatedResponse<UsageTrafficDto>> {
54
+ return await this.apiCall({
55
+ method: 'GET',
56
+ route: `${this.apiBasePath}/usage-traffic`,
57
+ params: filters,
58
+ signal,
59
+ });
60
+ }
61
+ }
@@ -0,0 +1,49 @@
1
+ import { ApiParamsRequestDto, ApiRequestClientId } from '../../types';
2
+
3
+ export type UsageRequestParams = ApiRequestClientId & {
4
+ dateFrom: Date;
5
+ dateTo: Date;
6
+ tiers?: boolean;
7
+ environments?: string[];
8
+ accounts?: string[];
9
+ categories?: string[];
10
+ };
11
+
12
+ export type Usage = {
13
+ date: Date;
14
+ sku: string;
15
+ units: number;
16
+ rate: number;
17
+ cost: number;
18
+ account_id: string;
19
+ environment_id: string;
20
+ flow_id: string;
21
+ };
22
+
23
+ export type FindUsageTrafficDto = ApiRequestClientId & {
24
+ dateFrom: Date;
25
+ dateTo: Date;
26
+ environmentId?: string;
27
+ accountId?: string;
28
+ category?: string;
29
+ sku?: string;
30
+ flowId?: string;
31
+ } & ApiParamsRequestDto;
32
+
33
+ export type UsageTrafficDto = {
34
+ id: string;
35
+ environmentId?: string;
36
+ accountId?: string;
37
+ customerId?: string;
38
+ sourceProvider: string;
39
+ sourceId: string;
40
+ dateFrom: Date;
41
+ dateTo: Date;
42
+ category: string;
43
+ sku: string;
44
+ amount: number;
45
+ rate: number;
46
+ sum: number;
47
+ flowEvents: Array<object>;
48
+ meta: object;
49
+ };
package/src/constants.ts CHANGED
@@ -1,6 +1,3 @@
1
- export * from './api/patterns-api/constants';
2
- export * from './api/customers-api/constants';
3
-
4
1
  export const SERVICE_KEY = 'customer-portal-api';
5
2
 
6
3
  export enum SortOrder {
package/src/index.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export { Ccp } from './Ccp';
2
2
  export * from './types';
3
- export * from './constants';
package/src/types.ts CHANGED
@@ -3,11 +3,7 @@ import { OrderDirection, Token } from '@or-sdk/base';
3
3
  import { SortOrder } from './constants';
4
4
 
5
5
  export * from './api/customers-api/types';
6
- export * from './api/contracts-api/types';
7
- export * from './api/tiers-api/types';
8
- export * from './api/custom-skus-api/types';
9
- export * from './api/patterns-api/types';
10
-
6
+ export * from './api/reporting-api/types';
11
7
 
12
8
  export type CcpConfig = {
13
9
  /**
@@ -108,7 +104,6 @@ export interface Mapping {
108
104
  export type Sku = {
109
105
  id: string;
110
106
  category?: string;
111
- listRate?: string;
112
107
  friendlyName?: string;
113
108
  unit?: string;
114
109
  sku: string;
@@ -129,26 +124,6 @@ export interface Flow {
129
124
  url?: string;
130
125
  }
131
126
 
132
- export type UsageRequestParams = ApiRequestClientId & {
133
- dateFrom: Date;
134
- dateTo: Date;
135
- tiers?: boolean;
136
- environments?: string[];
137
- accounts?: string[];
138
- categories?: string[];
139
- };
140
-
141
- export interface Usage {
142
- date: Date;
143
- sku: string;
144
- units: number;
145
- rate: number;
146
- cost: number;
147
- account_id: string;
148
- environment_id: string;
149
- flow_id: string;
150
- }
151
-
152
127
  export type ListPaymentProviderParams = {
153
128
  id?: string;
154
129
  name?: string;
@@ -1,136 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
28
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
- Object.defineProperty(exports, "__esModule", { value: true });
54
- var baseApi_1 = require("../baseApi");
55
- var ContractsApi = (function (_super) {
56
- __extends(ContractsApi, _super);
57
- function ContractsApi() {
58
- var _this = _super !== null && _super.apply(this, arguments) || this;
59
- _this.apiBasePath = 'api/v1/contracts';
60
- return _this;
61
- }
62
- ContractsApi.prototype.getContracts = function () {
63
- return __awaiter(this, arguments, void 0, function (params) {
64
- if (params === void 0) { params = {}; }
65
- return __generator(this, function (_a) {
66
- switch (_a.label) {
67
- case 0: return [4, this.apiCall({
68
- method: 'GET',
69
- route: "".concat(this.apiBasePath),
70
- params: params,
71
- })];
72
- case 1: return [2, _a.sent()];
73
- }
74
- });
75
- });
76
- };
77
- ContractsApi.prototype.updateContract = function (id, data) {
78
- return __awaiter(this, void 0, void 0, function () {
79
- return __generator(this, function (_a) {
80
- switch (_a.label) {
81
- case 0: return [4, this.apiCall({
82
- method: 'PUT',
83
- route: "".concat(this.apiBasePath),
84
- params: { id: id },
85
- data: data,
86
- })];
87
- case 1: return [2, _a.sent()];
88
- }
89
- });
90
- });
91
- };
92
- ContractsApi.prototype.createContract = function (data) {
93
- return __awaiter(this, void 0, void 0, function () {
94
- return __generator(this, function (_a) {
95
- switch (_a.label) {
96
- case 0: return [4, this.apiCall({
97
- method: 'POST',
98
- route: "".concat(this.apiBasePath),
99
- data: data,
100
- })];
101
- case 1: return [2, _a.sent()];
102
- }
103
- });
104
- });
105
- };
106
- ContractsApi.prototype.deleteContract = function (id) {
107
- return __awaiter(this, void 0, void 0, function () {
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
110
- case 0: return [4, this.apiCall({
111
- method: 'DELETE',
112
- route: "".concat(this.apiBasePath),
113
- params: { id: id },
114
- })];
115
- case 1: return [2, _a.sent()];
116
- }
117
- });
118
- });
119
- };
120
- ContractsApi.prototype.listOfAllContracts = function () {
121
- return __awaiter(this, void 0, void 0, function () {
122
- return __generator(this, function (_a) {
123
- switch (_a.label) {
124
- case 0: return [4, this.apiCall({
125
- method: 'GET',
126
- route: "".concat(this.apiBasePath, "/list"),
127
- })];
128
- case 1: return [2, _a.sent()];
129
- }
130
- });
131
- });
132
- };
133
- return ContractsApi;
134
- }(baseApi_1.BaseApi));
135
- exports.default = ContractsApi;
136
- //# sourceMappingURL=contractsApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contractsApi.js","sourceRoot":"","sources":["../../../../src/api/contracts-api/contractsApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sCAAqC;AAIrC;IAA0C,gCAAO;IAAjD;;QACmB,iBAAW,GAAG,kBAAkB,CAAC;;IA4DpD,CAAC;IAvDc,mCAAY,GAAzB;4DAA0B,MAAiC;YAAjC,uBAAA,EAAA,WAAiC;;;4BAClD,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM,QAAA;yBACP,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IAOK,qCAAc,GAApB,UAAqB,EAAU,EAAE,IAAuB;;;;4BAC/C,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM,EAAE,EAAE,EAAE,IAAA,EAAE;4BACd,IAAI,MAAA;yBACL,CAAC,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IAMK,qCAAc,GAApB,UAAqB,IAAuB;;;;4BACnC,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,MAAM;4BACd,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,IAAI,MAAA;yBACL,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IAMK,qCAAc,GAApB,UAAqB,EAAU;;;;4BACtB,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,QAAQ;4BAChB,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM,EAAE,EAAE,EAAE,IAAA,EAAE;yBACf,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IAKY,yCAAkB,GAA/B;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,UAAO;yBAClC,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IACH,mBAAC;AAAD,CAAC,AA7DD,CAA0C,iBAAO,GA6DhD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/contracts-api/types.ts"],"names":[],"mappings":""}
@@ -1,92 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
28
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
- Object.defineProperty(exports, "__esModule", { value: true });
54
- var baseApi_1 = require("../baseApi");
55
- var CustomSkusApi = (function (_super) {
56
- __extends(CustomSkusApi, _super);
57
- function CustomSkusApi() {
58
- var _this = _super !== null && _super.apply(this, arguments) || this;
59
- _this.apiBasePath = 'api/v1/custom-skus';
60
- return _this;
61
- }
62
- CustomSkusApi.prototype.listOfCustomSkus = function () {
63
- return __awaiter(this, void 0, void 0, function () {
64
- return __generator(this, function (_a) {
65
- switch (_a.label) {
66
- case 0: return [4, this.apiCall({
67
- method: 'GET',
68
- route: "".concat(this.apiBasePath, "/list"),
69
- })];
70
- case 1: return [2, _a.sent()];
71
- }
72
- });
73
- });
74
- };
75
- CustomSkusApi.prototype.updateCustomSkus = function (data) {
76
- return __awaiter(this, void 0, void 0, function () {
77
- return __generator(this, function (_a) {
78
- switch (_a.label) {
79
- case 0: return [4, this.apiCall({
80
- method: 'POST',
81
- route: "".concat(this.apiBasePath),
82
- data: data,
83
- })];
84
- case 1: return [2, _a.sent()];
85
- }
86
- });
87
- });
88
- };
89
- return CustomSkusApi;
90
- }(baseApi_1.BaseApi));
91
- exports.default = CustomSkusApi;
92
- //# sourceMappingURL=customSkusApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customSkusApi.js","sourceRoot":"","sources":["../../../../src/api/custom-skus-api/customSkusApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAqC;AAIrC;IAA2C,iCAAO;IAAlD;;QACmB,iBAAW,GAAG,oBAAoB,CAAC;;IAuBtD,CAAC;IAlBc,wCAAgB,GAA7B;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,UAAO;yBAClC,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IAMK,wCAAgB,GAAtB,UAAuB,IAAyB;;;;4BACvC,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,MAAM;4BACd,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,IAAI,MAAA;yBACL,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IACH,oBAAC;AAAD,CAAC,AAxBD,CAA2C,iBAAO,GAwBjD"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/custom-skus-api/types.ts"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PatternStatuses = void 0;
4
- var PatternStatuses;
5
- (function (PatternStatuses) {
6
- PatternStatuses["active"] = "ACTIVE";
7
- PatternStatuses["deleted"] = "DELETED";
8
- })(PatternStatuses || (exports.PatternStatuses = PatternStatuses = {}));
9
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/api/patterns-api/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;AACrB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}
@@ -1,107 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
28
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
- Object.defineProperty(exports, "__esModule", { value: true });
54
- var baseApi_1 = require("../baseApi");
55
- var PatternsApi = (function (_super) {
56
- __extends(PatternsApi, _super);
57
- function PatternsApi() {
58
- var _this = _super !== null && _super.apply(this, arguments) || this;
59
- _this.apiBasePath = 'api/v1/patterns';
60
- return _this;
61
- }
62
- PatternsApi.prototype.getAllPatterns = function () {
63
- return __awaiter(this, void 0, void 0, function () {
64
- return __generator(this, function (_a) {
65
- switch (_a.label) {
66
- case 0: return [4, this.apiCall({
67
- method: 'GET',
68
- route: "".concat(this.apiBasePath),
69
- })];
70
- case 1: return [2, _a.sent()];
71
- }
72
- });
73
- });
74
- };
75
- PatternsApi.prototype.updatePattern = function (contractId, data) {
76
- return __awaiter(this, void 0, void 0, function () {
77
- return __generator(this, function (_a) {
78
- switch (_a.label) {
79
- case 0: return [4, this.apiCall({
80
- method: 'PUT',
81
- route: "".concat(this.apiBasePath),
82
- params: { contractId: contractId },
83
- data: data,
84
- })];
85
- case 1: return [2, _a.sent()];
86
- }
87
- });
88
- });
89
- };
90
- PatternsApi.prototype.createPattern = function (data) {
91
- return __awaiter(this, void 0, void 0, function () {
92
- return __generator(this, function (_a) {
93
- switch (_a.label) {
94
- case 0: return [4, this.apiCall({
95
- method: 'POST',
96
- route: "".concat(this.apiBasePath),
97
- data: data,
98
- })];
99
- case 1: return [2, _a.sent()];
100
- }
101
- });
102
- });
103
- };
104
- return PatternsApi;
105
- }(baseApi_1.BaseApi));
106
- exports.default = PatternsApi;
107
- //# sourceMappingURL=patternsApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patternsApi.js","sourceRoot":"","sources":["../../../../src/api/patterns-api/patternsApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAqC;AAKrC;IAAyC,+BAAO;IAAhD;;QACmB,iBAAW,GAAG,iBAAiB,CAAC;;IAqCnD,CAAC;IAhCc,oCAAc,GAA3B;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;yBAC7B,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IAOK,mCAAa,GAAnB,UAAoB,UAAkB,EAAE,IAAsB;;;;4BACrD,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM,EAAE,EAAE,UAAU,YAAA,EAAE;4BACtB,IAAI,MAAA;yBACL,CAAC,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IAMK,mCAAa,GAAnB,UAAoB,IAAsB;;;;4BACjC,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,MAAM;4BACd,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,IAAI,MAAA;yBACL,CAAC,EAAA;4BAJF,WAAO,SAIL,EAAC;;;;KACJ;IACH,kBAAC;AAAD,CAAC,AAtCD,CAAyC,iBAAO,GAsC/C"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/patterns-api/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"reportingApi.js","sourceRoot":"","sources":["../../../src/api/reportingApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kCAAuC;AAEvC,qCAAoC;AAEpC;IAA0C,gCAAO;IAAjD;;QACmB,iBAAW,GAAG,QAAQ,CAAC;;IAoB1C,CAAC;IARc,+BAAQ,GAArB;4DAAsB,MAA0B,EAAE,EAA+B;gBAA/B,qBAA6B,EAAE,KAAA,EAA7B,MAAM,YAAA;;;4BACjD,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,WAAQ;4BAClC,MAAM,EAAE,IAAA,mBAAW,EAAqB,MAAM,CAAC;4BAC/C,MAAM,QAAA;yBACP,CAAC,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IACH,mBAAC;AAAD,CAAC,AArBD,CAA0C,iBAAO,GAqBhD"}
@@ -1,78 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
28
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
- Object.defineProperty(exports, "__esModule", { value: true });
54
- var baseApi_1 = require("../baseApi");
55
- var TiersApi = (function (_super) {
56
- __extends(TiersApi, _super);
57
- function TiersApi() {
58
- var _this = _super !== null && _super.apply(this, arguments) || this;
59
- _this.apiBasePath = 'api/v1/tiers';
60
- return _this;
61
- }
62
- TiersApi.prototype.listOfTiers = function () {
63
- return __awaiter(this, void 0, void 0, function () {
64
- return __generator(this, function (_a) {
65
- switch (_a.label) {
66
- case 0: return [4, this.apiCall({
67
- method: 'GET',
68
- route: "".concat(this.apiBasePath, "/list"),
69
- })];
70
- case 1: return [2, _a.sent()];
71
- }
72
- });
73
- });
74
- };
75
- return TiersApi;
76
- }(baseApi_1.BaseApi));
77
- exports.default = TiersApi;
78
- //# sourceMappingURL=tiersApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tiersApi.js","sourceRoot":"","sources":["../../../../src/api/tiers-api/tiersApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAqC;AAIrC;IAAsC,4BAAO;IAA7C;;QACmB,iBAAW,GAAG,cAAc,CAAC;;IAWhD,CAAC;IANc,8BAAW,GAAxB;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,UAAO;yBAClC,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IACH,eAAC;AAAD,CAAC,AAZD,CAAsC,iBAAO,GAY5C"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/tiers-api/types.ts"],"names":[],"mappings":""}