@or-sdk/ccp 1.1.1-beta.2850.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/Ccp.js +0 -5
- package/dist/cjs/Ccp.js.map +1 -1
- package/dist/cjs/api/customersApi.js +1 -1
- package/dist/cjs/api/customersApi.js.map +1 -1
- package/dist/cjs/api/index.js +1 -11
- package/dist/cjs/api/index.js.map +1 -1
- package/dist/esm/Ccp.js +1 -6
- package/dist/esm/Ccp.js.map +1 -1
- package/dist/esm/api/customersApi.js +1 -1
- package/dist/esm/api/customersApi.js.map +1 -1
- package/dist/esm/api/index.js +0 -5
- package/dist/esm/api/index.js.map +1 -1
- package/dist/types/Ccp.d.ts +1 -6
- package/dist/types/Ccp.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +0 -5
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +0 -58
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/Ccp.ts +1 -11
- package/src/api/customersApi.ts +1 -1
- package/src/api/index.ts +0 -5
- package/src/types.ts +0 -66
- package/dist/cjs/api/accountsApi.js +0 -79
- package/dist/cjs/api/accountsApi.js.map +0 -1
- package/dist/cjs/api/categoriesApi.js +0 -78
- package/dist/cjs/api/categoriesApi.js.map +0 -1
- package/dist/cjs/api/environmentsApi.js +0 -79
- package/dist/cjs/api/environmentsApi.js.map +0 -1
- package/dist/cjs/api/mappingApi.js +0 -78
- package/dist/cjs/api/mappingApi.js.map +0 -1
- package/dist/cjs/api/reportingApi.js +0 -94
- package/dist/cjs/api/reportingApi.js.map +0 -1
- package/dist/cjs/utils.js +0 -16
- package/dist/cjs/utils.js.map +0 -1
- package/dist/esm/api/accountsApi.js +0 -26
- package/dist/esm/api/accountsApi.js.map +0 -1
- package/dist/esm/api/categoriesApi.js +0 -25
- package/dist/esm/api/categoriesApi.js.map +0 -1
- package/dist/esm/api/environmentsApi.js +0 -26
- package/dist/esm/api/environmentsApi.js.map +0 -1
- package/dist/esm/api/mappingApi.js +0 -25
- package/dist/esm/api/mappingApi.js.map +0 -1
- package/dist/esm/api/reportingApi.js +0 -36
- package/dist/esm/api/reportingApi.js.map +0 -1
- package/dist/esm/utils.js +0 -11
- package/dist/esm/utils.js.map +0 -1
- package/dist/types/api/accountsApi.d.ts +0 -7
- package/dist/types/api/accountsApi.d.ts.map +0 -1
- package/dist/types/api/categoriesApi.d.ts +0 -7
- package/dist/types/api/categoriesApi.d.ts.map +0 -1
- package/dist/types/api/environmentsApi.d.ts +0 -7
- package/dist/types/api/environmentsApi.d.ts.map +0 -1
- package/dist/types/api/mappingApi.d.ts +0 -7
- package/dist/types/api/mappingApi.d.ts.map +0 -1
- package/dist/types/api/reportingApi.d.ts +0 -8
- package/dist/types/api/reportingApi.d.ts.map +0 -1
- package/dist/types/utils.d.ts +0 -4
- package/dist/types/utils.d.ts.map +0 -1
- package/src/api/accountsApi.ts +0 -23
- package/src/api/categoriesApi.ts +0 -16
- package/src/api/environmentsApi.ts +0 -21
- package/src/api/mappingApi.ts +0 -16
- package/src/api/reportingApi.ts +0 -43
- package/src/utils.ts +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.1.1](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/ccp@1.1.0...@or-sdk/ccp@1.1.1) (2024-07-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @or-sdk/ccp
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## 1.1.0 (2024-06-12)
|
|
7
15
|
|
|
8
16
|
|
package/dist/cjs/Ccp.js
CHANGED
|
@@ -45,11 +45,6 @@ var Ccp = (function (_super) {
|
|
|
45
45
|
var apiCall = _this.callApi.bind(_this);
|
|
46
46
|
_this.withApiErrorLog = Boolean(params.withApiErrorLog);
|
|
47
47
|
_this.customersApi = new api_1.CustomersApi(apiCall);
|
|
48
|
-
_this.environmentsApi = new api_1.EnvironmentsApi(apiCall);
|
|
49
|
-
_this.accountsApi = new api_1.AccountsApi(apiCall);
|
|
50
|
-
_this.categoriesApi = new api_1.CategoriesApi(apiCall);
|
|
51
|
-
_this.mappingApi = new api_1.MappingApi(apiCall);
|
|
52
|
-
_this.reportingApi = new api_1.ReportingApi(apiCall);
|
|
53
48
|
return _this;
|
|
54
49
|
}
|
|
55
50
|
Ccp.prototype.callApi = function (params) {
|
package/dist/cjs/Ccp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ccp.js","sourceRoot":"","sources":["../../src/Ccp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA8D;AAC9D,
|
|
1
|
+
{"version":3,"file":"Ccp.js","sourceRoot":"","sources":["../../src/Ccp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA8D;AAC9D,6BAAqC;AACrC,uCAAsC;AAEtC,yCAA0C;AAS1C;IAAyB,uBAAI;IAU3B,aAAY,MAAiB;QAA7B,iBAeC;QAdS,IAAA,KAAK,GAA8B,MAAM,MAApC,EAAE,YAAY,GAAgB,MAAM,aAAtB,EAAE,SAAS,GAAK,MAAM,UAAX,CAAY;gBAElD,kBAAM;YACJ,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,uBAAW;SACxB,CAAC;QAEF,IAAM,OAAO,GAAG,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC;QAExC,KAAI,CAAC,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QAEvD,KAAI,C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,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;QAC5D,CAAC,CAAC,EAAE,CAAE,CAAC,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,0BAAmB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC,CAAC;QAC7D,OAAO,CAAC,KAAK,CAAC,0BAAmB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAE,CAAC,CAAC;QAChE,OAAO,CAAC,KAAK,CAAC,0BAAmB,MAAA,CAAC,CAAC,MAAM,0CAAE,OAAO,CAAC,aAAa,CAAE,CAAC,CAAC;IACtE,CAAC;IACH,UAAC;AAAD,CAAC,AA1DD,CAAyB,WAAI,GA0D5B;AA1DY,kBAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customersApi.js","sourceRoot":"","sources":["../../../src/api/customersApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAA0C,gCAAO;IAAjD;QAAA,qEAsBC;QArBkB,iBAAW,GAAG,kBAAkB,CAAC;;IAqBpD,CAAC;IAhBc,sCAAe,GAA5B;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"customersApi.js","sourceRoot":"","sources":["../../../src/api/customersApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAA0C,gCAAO;IAAjD;QAAA,qEAsBC;QArBkB,iBAAW,GAAG,kBAAkB,CAAC;;IAqBpD,CAAC;IAhBc,sCAAe,GAA5B;;;;4BACS,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,MAAG;yBAC9B,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IAKY,sCAAe,GAA5B;;;;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,AAtBD,CAA0C,iBAAO,GAsBhD"}
|
package/dist/cjs/api/index.js
CHANGED
|
@@ -3,17 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.CustomersApi = void 0;
|
|
7
7
|
var customersApi_1 = require("./customersApi");
|
|
8
8
|
Object.defineProperty(exports, "CustomersApi", { enumerable: true, get: function () { return __importDefault(customersApi_1).default; } });
|
|
9
|
-
var environmentsApi_1 = require("./environmentsApi");
|
|
10
|
-
Object.defineProperty(exports, "EnvironmentsApi", { enumerable: true, get: function () { return __importDefault(environmentsApi_1).default; } });
|
|
11
|
-
var accountsApi_1 = require("./accountsApi");
|
|
12
|
-
Object.defineProperty(exports, "AccountsApi", { enumerable: true, get: function () { return __importDefault(accountsApi_1).default; } });
|
|
13
|
-
var categoriesApi_1 = require("./categoriesApi");
|
|
14
|
-
Object.defineProperty(exports, "CategoriesApi", { enumerable: true, get: function () { return __importDefault(categoriesApi_1).default; } });
|
|
15
|
-
var mappingApi_1 = require("./mappingApi");
|
|
16
|
-
Object.defineProperty(exports, "MappingApi", { enumerable: true, get: function () { return __importDefault(mappingApi_1).default; } });
|
|
17
|
-
var reportingApi_1 = require("./reportingApi");
|
|
18
|
-
Object.defineProperty(exports, "ReportingApi", { enumerable: true, get: function () { return __importDefault(reportingApi_1).default; } });
|
|
19
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB"}
|
package/dist/esm/Ccp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Base } from '@or-sdk/base';
|
|
2
|
-
import { CustomersApi
|
|
2
|
+
import { CustomersApi } from './api';
|
|
3
3
|
import { ApiError } from './apiError';
|
|
4
4
|
import { SERVICE_KEY } from './constants';
|
|
5
5
|
export class Ccp extends Base {
|
|
@@ -14,11 +14,6 @@ export class Ccp extends Base {
|
|
|
14
14
|
const apiCall = this.callApi.bind(this);
|
|
15
15
|
this.withApiErrorLog = Boolean(params.withApiErrorLog);
|
|
16
16
|
this.customersApi = new CustomersApi(apiCall);
|
|
17
|
-
this.environmentsApi = new EnvironmentsApi(apiCall);
|
|
18
|
-
this.accountsApi = new AccountsApi(apiCall);
|
|
19
|
-
this.categoriesApi = new CategoriesApi(apiCall);
|
|
20
|
-
this.mappingApi = new MappingApi(apiCall);
|
|
21
|
-
this.reportingApi = new ReportingApi(apiCall);
|
|
22
17
|
}
|
|
23
18
|
callApi(params) {
|
|
24
19
|
return super.callApiV2(Object.assign({}, params));
|
package/dist/esm/Ccp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ccp.js","sourceRoot":"","sources":["../../src/Ccp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,IAAI,EAAgB,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"Ccp.js","sourceRoot":"","sources":["../../src/Ccp.ts"],"names":[],"mappings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AAC;IAhBc,eAAe;;YAC1B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"customersApi.js","sourceRoot":"","sources":["../../../src/api/customersApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAAjD;;QACmB,gBAAW,GAAG,kBAAkB,CAAC;IAqBpD,CAAC;IAhBc,eAAe;;YAC1B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,GAAG;aAC9B,CAAC,CAAC;QACL,CAAC;KAAA;IAKY,eAAe;;YAC1B,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,OAAO;aAClC,CAAC,CAAC;QACL,CAAC;KAAA;CACF"}
|
package/dist/esm/api/index.js
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
export { default as CustomersApi } from './customersApi';
|
|
2
|
-
export { default as EnvironmentsApi } from './environmentsApi';
|
|
3
|
-
export { default as AccountsApi } from './accountsApi';
|
|
4
|
-
export { default as CategoriesApi } from './categoriesApi';
|
|
5
|
-
export { default as MappingApi } from './mappingApi';
|
|
6
|
-
export { default as ReportingApi } from './reportingApi';
|
|
7
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/types/Ccp.d.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { AxiosError, Base, CalApiParams } from '@or-sdk/base';
|
|
2
|
-
import { CustomersApi
|
|
2
|
+
import { CustomersApi } from './api';
|
|
3
3
|
import { CcpConfig } from './types';
|
|
4
4
|
export declare class Ccp extends Base {
|
|
5
5
|
readonly customersApi: CustomersApi;
|
|
6
|
-
readonly environmentsApi: EnvironmentsApi;
|
|
7
|
-
readonly accountsApi: AccountsApi;
|
|
8
|
-
readonly categoriesApi: CategoriesApi;
|
|
9
|
-
readonly mappingApi: MappingApi;
|
|
10
|
-
readonly reportingApi: ReportingApi;
|
|
11
6
|
private withApiErrorLog;
|
|
12
7
|
constructor(params: CcpConfig);
|
|
13
8
|
callApi<T>(params: CalApiParams): Promise<T>;
|
package/dist/types/Ccp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ccp.d.ts","sourceRoot":"","sources":["../../src/Ccp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"Ccp.d.ts","sourceRoot":"","sources":["../../src/Ccp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAUpC,qBAAa,GAAI,SAAQ,IAAI;IAC3B,SAAgB,YAAY,EAAE,YAAY,CAAC;IAC3C,OAAO,CAAC,eAAe,CAAU;gBAQrB,MAAM,EAAE,SAAS;IAiB7B,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC;IAM5C,UAAU,CAAC,CAAC,EAAE,UAAU,GAAG,KAAK;IAahC,OAAO,CAAC,WAAW;CAYpB"}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
export { default as CustomersApi } from './customersApi';
|
|
2
|
-
export { default as EnvironmentsApi } from './environmentsApi';
|
|
3
|
-
export { default as AccountsApi } from './accountsApi';
|
|
4
|
-
export { default as CategoriesApi } from './categoriesApi';
|
|
5
|
-
export { default as MappingApi } from './mappingApi';
|
|
6
|
-
export { default as ReportingApi } from './reportingApi';
|
|
7
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -31,62 +31,4 @@ export interface Customer {
|
|
|
31
31
|
BillingAddress?: CustomerBillingAddress;
|
|
32
32
|
IdwCustomerId?: string;
|
|
33
33
|
}
|
|
34
|
-
export type ApiRequestParams = {
|
|
35
|
-
clientId: string;
|
|
36
|
-
};
|
|
37
|
-
export type EnvironmentStatus = 'ACTIVE' | 'NOT ACTIVE';
|
|
38
|
-
export type EnvironmentRequestParams = ApiRequestParams & {
|
|
39
|
-
id?: string;
|
|
40
|
-
environmentName?: string;
|
|
41
|
-
status?: EnvironmentStatus;
|
|
42
|
-
};
|
|
43
|
-
export interface Environment {
|
|
44
|
-
id: string;
|
|
45
|
-
environmentName: string;
|
|
46
|
-
customer: string;
|
|
47
|
-
status: EnvironmentStatus;
|
|
48
|
-
}
|
|
49
|
-
export type AccountStatus = 'ACTIVE' | 'INACTIVE';
|
|
50
|
-
export type AccountRequestParams = ApiRequestParams & {
|
|
51
|
-
id?: string;
|
|
52
|
-
accountName?: string;
|
|
53
|
-
environmentId?: string;
|
|
54
|
-
billable?: boolean;
|
|
55
|
-
status?: AccountStatus;
|
|
56
|
-
};
|
|
57
|
-
export interface Account {
|
|
58
|
-
id: string;
|
|
59
|
-
accountName: string;
|
|
60
|
-
customerId: string;
|
|
61
|
-
environmentId: string;
|
|
62
|
-
billable: boolean;
|
|
63
|
-
status?: AccountStatus;
|
|
64
|
-
}
|
|
65
|
-
export interface Category {
|
|
66
|
-
name: string;
|
|
67
|
-
value: string;
|
|
68
|
-
}
|
|
69
|
-
export interface Mapping {
|
|
70
|
-
[key: string]: {
|
|
71
|
-
[key: string]: string;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
export type UsageRequestParams = ApiRequestParams & {
|
|
75
|
-
dateFrom: Date;
|
|
76
|
-
dateTo: Date;
|
|
77
|
-
tiers?: boolean;
|
|
78
|
-
environments?: string[];
|
|
79
|
-
accounts?: string[];
|
|
80
|
-
categories?: string[];
|
|
81
|
-
};
|
|
82
|
-
export interface Usage {
|
|
83
|
-
date: Date;
|
|
84
|
-
sku: string;
|
|
85
|
-
category: string;
|
|
86
|
-
units: number;
|
|
87
|
-
rate: number;
|
|
88
|
-
cost: number;
|
|
89
|
-
account_id: string;
|
|
90
|
-
environment_id: string;
|
|
91
|
-
}
|
|
92
34
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,MAAM,MAAM,SAAS,GAAG;IAItB,KAAK,EAAE,KAAK,CAAC;IAIb,YAAY,CAAC,EAAE,MAAM,CAAC;IAItB,SAAS,CAAC,EAAE,MAAM,CAA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AED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/ccp",
|
|
3
|
-
"version": "1.1.1
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dev": "pnpm build:watch:esm"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@or-sdk/base": "^0.38.
|
|
21
|
+
"@or-sdk/base": "^0.38.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"concurrently": "8.2.2",
|
|
@@ -26,5 +26,6 @@
|
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"gitHead": "c565da89b7b4412e6cbdc615929d47f3fee7fd59"
|
|
30
31
|
}
|
package/src/Ccp.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosError, Base, CalApiParams } from '@or-sdk/base';
|
|
2
|
-
import { CustomersApi
|
|
2
|
+
import { CustomersApi } from './api';
|
|
3
3
|
import { ApiError } from './apiError';
|
|
4
4
|
import { CcpConfig } from './types';
|
|
5
5
|
import { SERVICE_KEY } from './constants';
|
|
@@ -13,11 +13,6 @@ import { SERVICE_KEY } from './constants';
|
|
|
13
13
|
*/
|
|
14
14
|
export class Ccp extends Base {
|
|
15
15
|
public readonly customersApi: CustomersApi;
|
|
16
|
-
public readonly environmentsApi: EnvironmentsApi;
|
|
17
|
-
public readonly accountsApi: AccountsApi;
|
|
18
|
-
public readonly categoriesApi: CategoriesApi;
|
|
19
|
-
public readonly mappingApi: MappingApi;
|
|
20
|
-
public readonly reportingApi: ReportingApi;
|
|
21
16
|
private withApiErrorLog: boolean;
|
|
22
17
|
|
|
23
18
|
/**
|
|
@@ -41,11 +36,6 @@ export class Ccp extends Base {
|
|
|
41
36
|
this.withApiErrorLog = Boolean(params.withApiErrorLog);
|
|
42
37
|
|
|
43
38
|
this.customersApi = new CustomersApi(apiCall);
|
|
44
|
-
this.environmentsApi = new EnvironmentsApi(apiCall);
|
|
45
|
-
this.accountsApi = new AccountsApi(apiCall);
|
|
46
|
-
this.categoriesApi = new CategoriesApi(apiCall);
|
|
47
|
-
this.mappingApi = new MappingApi(apiCall);
|
|
48
|
-
this.reportingApi = new ReportingApi(apiCall);
|
|
49
39
|
}
|
|
50
40
|
|
|
51
41
|
callApi<T>(params: CalApiParams): Promise<T> {
|
package/src/api/customersApi.ts
CHANGED
package/src/api/index.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
1
|
export { default as CustomersApi } from './customersApi';
|
|
2
|
-
export { default as EnvironmentsApi } from './environmentsApi';
|
|
3
|
-
export { default as AccountsApi } from './accountsApi';
|
|
4
|
-
export { default as CategoriesApi } from './categoriesApi';
|
|
5
|
-
export { default as MappingApi } from './mappingApi';
|
|
6
|
-
export { default as ReportingApi } from './reportingApi';
|
package/src/types.ts
CHANGED
|
@@ -52,69 +52,3 @@ export interface Customer {
|
|
|
52
52
|
IdwCustomerId?: string;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export type ApiRequestParams = {
|
|
56
|
-
clientId: string;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export type EnvironmentStatus = 'ACTIVE' | 'NOT ACTIVE';
|
|
60
|
-
|
|
61
|
-
export type EnvironmentRequestParams = ApiRequestParams & {
|
|
62
|
-
id?: string;
|
|
63
|
-
environmentName?: string;
|
|
64
|
-
status?: EnvironmentStatus;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export interface Environment {
|
|
68
|
-
id: string;
|
|
69
|
-
environmentName: string;
|
|
70
|
-
customer: string;
|
|
71
|
-
status: EnvironmentStatus;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export type AccountStatus = 'ACTIVE' | 'INACTIVE';
|
|
75
|
-
|
|
76
|
-
export type AccountRequestParams = ApiRequestParams & {
|
|
77
|
-
id?: string;
|
|
78
|
-
accountName?: string;
|
|
79
|
-
environmentId?: string;
|
|
80
|
-
billable?: boolean;
|
|
81
|
-
status?: AccountStatus;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export interface Account {
|
|
85
|
-
id: string;
|
|
86
|
-
accountName: string;
|
|
87
|
-
customerId: string;
|
|
88
|
-
environmentId: string;
|
|
89
|
-
billable: boolean;
|
|
90
|
-
status?: AccountStatus;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export interface Category {
|
|
94
|
-
name: string;
|
|
95
|
-
value: string;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface Mapping {
|
|
99
|
-
[key: string]: { [key: string]: string; };
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export type UsageRequestParams = ApiRequestParams & {
|
|
103
|
-
dateFrom: Date;
|
|
104
|
-
dateTo: Date;
|
|
105
|
-
tiers?: boolean;
|
|
106
|
-
environments?: string[];
|
|
107
|
-
accounts?: string[];
|
|
108
|
-
categories?: string[];
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export interface Usage {
|
|
112
|
-
date: Date;
|
|
113
|
-
sku: string;
|
|
114
|
-
category: string;
|
|
115
|
-
units: number;
|
|
116
|
-
rate: number;
|
|
117
|
-
cost: number;
|
|
118
|
-
account_id: string;
|
|
119
|
-
environment_id: string;
|
|
120
|
-
}
|
|
@@ -1,79 +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;
|
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (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 AccountsApi = (function (_super) {
|
|
56
|
-
__extends(AccountsApi, _super);
|
|
57
|
-
function AccountsApi() {
|
|
58
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
-
_this.apiBasePath = 'api/v1/accounts';
|
|
60
|
-
return _this;
|
|
61
|
-
}
|
|
62
|
-
AccountsApi.prototype.getAccounts = function (params) {
|
|
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
|
-
params: params,
|
|
70
|
-
})];
|
|
71
|
-
case 1: return [2, _a.sent()];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
return AccountsApi;
|
|
77
|
-
}(baseApi_1.BaseApi));
|
|
78
|
-
exports.default = AccountsApi;
|
|
79
|
-
//# sourceMappingURL=accountsApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accountsApi.js","sourceRoot":"","sources":["../../../src/api/accountsApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAAyC,+BAAO;IAAhD;QAAA,qEAmBC;QAlBkB,iBAAW,GAAG,iBAAiB,CAAC;;IAkBnD,CAAC;IAPc,iCAAW,GAAxB,UAAyB,MAA4B;;;;4BAC5C,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;IACH,kBAAC;AAAD,CAAC,AAnBD,CAAyC,iBAAO,GAmB/C"}
|
|
@@ -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;
|
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (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 CategoriesApi = (function (_super) {
|
|
56
|
-
__extends(CategoriesApi, _super);
|
|
57
|
-
function CategoriesApi() {
|
|
58
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
-
_this.apiBasePath = 'api/v1/categories';
|
|
60
|
-
return _this;
|
|
61
|
-
}
|
|
62
|
-
CategoriesApi.prototype.getCategories = 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
|
-
return CategoriesApi;
|
|
76
|
-
}(baseApi_1.BaseApi));
|
|
77
|
-
exports.default = CategoriesApi;
|
|
78
|
-
//# sourceMappingURL=categoriesApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"categoriesApi.js","sourceRoot":"","sources":["../../../src/api/categoriesApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAA2C,iCAAO;IAAlD;QAAA,qEAYC;QAXkB,iBAAW,GAAG,mBAAmB,CAAC;;IAWrD,CAAC;IANc,qCAAa,GAA1B;;;;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;IACH,oBAAC;AAAD,CAAC,AAZD,CAA2C,iBAAO,GAYjD"}
|