@or-sdk/ccp 2.3.3-beta.3644.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/Ccp.js +0 -8
- package/dist/cjs/Ccp.js.map +1 -1
- package/dist/cjs/api/customers-api/constants.js +1 -18
- package/dist/cjs/api/customers-api/constants.js.map +1 -1
- package/dist/cjs/api/customers-api/customersApi.js +0 -58
- package/dist/cjs/api/customers-api/customersApi.js.map +1 -1
- package/dist/cjs/api/index.js +1 -17
- package/dist/cjs/api/index.js.map +1 -1
- package/dist/cjs/constants.js +0 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/types.js +0 -4
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/Ccp.js +1 -9
- package/dist/esm/Ccp.js.map +1 -1
- package/dist/esm/api/customers-api/constants.js +0 -17
- package/dist/esm/api/customers-api/constants.js.map +1 -1
- package/dist/esm/api/customers-api/customersApi.js +0 -37
- package/dist/esm/api/customers-api/customersApi.js.map +1 -1
- package/dist/esm/api/index.js +0 -8
- package/dist/esm/api/index.js.map +1 -1
- package/dist/esm/constants.js +0 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/types.js +0 -4
- package/dist/esm/types.js.map +1 -1
- package/dist/types/Ccp.d.ts +1 -9
- package/dist/types/Ccp.d.ts.map +1 -1
- package/dist/types/api/customers-api/constants.d.ts +0 -14
- package/dist/types/api/customers-api/constants.d.ts.map +1 -1
- package/dist/types/api/customers-api/customersApi.d.ts +1 -6
- package/dist/types/api/customers-api/customersApi.d.ts.map +1 -1
- package/dist/types/api/customers-api/types.d.ts +1 -65
- package/dist/types/api/customers-api/types.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +0 -8
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/constants.d.ts +0 -1
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/types.d.ts +0 -32
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/Ccp.ts +0 -24
- package/src/api/customers-api/constants.ts +0 -17
- package/src/api/customers-api/customersApi.ts +2 -52
- package/src/api/customers-api/types.ts +1 -72
- package/src/api/index.ts +2 -8
- package/src/constants.ts +0 -1
- package/src/types.ts +0 -38
- package/dist/cjs/api/contracts-api/contractsApi.js +0 -136
- package/dist/cjs/api/contracts-api/contractsApi.js.map +0 -1
- package/dist/cjs/api/contracts-api/types.js +0 -3
- package/dist/cjs/api/contracts-api/types.js.map +0 -1
- package/dist/cjs/api/custom-skus-api/customSkusApi.js +0 -92
- package/dist/cjs/api/custom-skus-api/customSkusApi.js.map +0 -1
- package/dist/cjs/api/custom-skus-api/types.js +0 -3
- package/dist/cjs/api/custom-skus-api/types.js.map +0 -1
- package/dist/cjs/api/employeesApi.js +0 -78
- package/dist/cjs/api/employeesApi.js.map +0 -1
- package/dist/cjs/api/patterns-api/constants.js +0 -9
- package/dist/cjs/api/patterns-api/constants.js.map +0 -1
- package/dist/cjs/api/patterns-api/patternsApi.js +0 -107
- package/dist/cjs/api/patterns-api/patternsApi.js.map +0 -1
- package/dist/cjs/api/patterns-api/types.js +0 -3
- package/dist/cjs/api/patterns-api/types.js.map +0 -1
- package/dist/cjs/api/paymentProvidersApi.js +0 -122
- package/dist/cjs/api/paymentProvidersApi.js.map +0 -1
- package/dist/cjs/api/sageApi.js +0 -78
- package/dist/cjs/api/sageApi.js.map +0 -1
- package/dist/cjs/api/tiers-api/tiersApi.js +0 -78
- package/dist/cjs/api/tiers-api/tiersApi.js.map +0 -1
- package/dist/cjs/api/tiers-api/types.js +0 -3
- package/dist/cjs/api/tiers-api/types.js.map +0 -1
- package/dist/cjs/api/vedorsApi.js +0 -122
- package/dist/cjs/api/vedorsApi.js.map +0 -1
- package/dist/esm/api/contracts-api/contractsApi.js +0 -62
- package/dist/esm/api/contracts-api/contractsApi.js.map +0 -1
- package/dist/esm/api/contracts-api/types.js +0 -2
- package/dist/esm/api/contracts-api/types.js.map +0 -1
- package/dist/esm/api/custom-skus-api/customSkusApi.js +0 -34
- package/dist/esm/api/custom-skus-api/customSkusApi.js.map +0 -1
- package/dist/esm/api/custom-skus-api/types.js +0 -2
- package/dist/esm/api/custom-skus-api/types.js.map +0 -1
- package/dist/esm/api/employeesApi.js +0 -25
- package/dist/esm/api/employeesApi.js.map +0 -1
- package/dist/esm/api/patterns-api/constants.js +0 -6
- package/dist/esm/api/patterns-api/constants.js.map +0 -1
- package/dist/esm/api/patterns-api/patternsApi.js +0 -44
- package/dist/esm/api/patterns-api/patternsApi.js.map +0 -1
- package/dist/esm/api/patterns-api/types.js +0 -2
- package/dist/esm/api/patterns-api/types.js.map +0 -1
- package/dist/esm/api/paymentProvidersApi.js +0 -54
- package/dist/esm/api/paymentProvidersApi.js.map +0 -1
- package/dist/esm/api/sageApi.js +0 -25
- package/dist/esm/api/sageApi.js.map +0 -1
- package/dist/esm/api/tiers-api/tiersApi.js +0 -25
- package/dist/esm/api/tiers-api/tiersApi.js.map +0 -1
- package/dist/esm/api/tiers-api/types.js +0 -2
- package/dist/esm/api/tiers-api/types.js.map +0 -1
- package/dist/esm/api/vedorsApi.js +0 -54
- package/dist/esm/api/vedorsApi.js.map +0 -1
- package/dist/types/api/contracts-api/contractsApi.d.ts +0 -12
- package/dist/types/api/contracts-api/contractsApi.d.ts.map +0 -1
- package/dist/types/api/contracts-api/types.d.ts +0 -108
- package/dist/types/api/contracts-api/types.d.ts.map +0 -1
- package/dist/types/api/custom-skus-api/customSkusApi.d.ts +0 -8
- package/dist/types/api/custom-skus-api/customSkusApi.d.ts.map +0 -1
- package/dist/types/api/custom-skus-api/types.d.ts +0 -14
- package/dist/types/api/custom-skus-api/types.d.ts.map +0 -1
- package/dist/types/api/employeesApi.d.ts +0 -7
- package/dist/types/api/employeesApi.d.ts.map +0 -1
- package/dist/types/api/patterns-api/constants.d.ts +0 -5
- package/dist/types/api/patterns-api/constants.d.ts.map +0 -1
- package/dist/types/api/patterns-api/patternsApi.d.ts +0 -9
- package/dist/types/api/patterns-api/patternsApi.d.ts.map +0 -1
- package/dist/types/api/patterns-api/types.d.ts +0 -26
- package/dist/types/api/patterns-api/types.d.ts.map +0 -1
- package/dist/types/api/paymentProvidersApi.d.ts +0 -10
- package/dist/types/api/paymentProvidersApi.d.ts.map +0 -1
- package/dist/types/api/sageApi.d.ts +0 -7
- package/dist/types/api/sageApi.d.ts.map +0 -1
- package/dist/types/api/tiers-api/tiersApi.d.ts +0 -7
- package/dist/types/api/tiers-api/tiersApi.d.ts.map +0 -1
- package/dist/types/api/tiers-api/types.d.ts +0 -13
- package/dist/types/api/tiers-api/types.d.ts.map +0 -1
- package/dist/types/api/vedorsApi.d.ts +0 -10
- package/dist/types/api/vedorsApi.d.ts.map +0 -1
- package/src/api/contracts-api/contractsApi.ts +0 -67
- package/src/api/contracts-api/types.ts +0 -117
- package/src/api/custom-skus-api/customSkusApi.ts +0 -29
- package/src/api/custom-skus-api/types.ts +0 -15
- package/src/api/employeesApi.ts +0 -17
- package/src/api/patterns-api/constants.ts +0 -4
- package/src/api/patterns-api/patternsApi.ts +0 -44
- package/src/api/patterns-api/types.ts +0 -30
- package/src/api/paymentProvidersApi.ts +0 -60
- package/src/api/sageApi.ts +0 -18
- package/src/api/tiers-api/tiersApi.ts +0 -17
- package/src/api/tiers-api/types.ts +0 -12
- package/src/api/vedorsApi.ts +0 -60
package/dist/types/types.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { OrderDirection, Token } from '@or-sdk/base';
|
|
2
2
|
import { SortOrder } from './constants';
|
|
3
3
|
export * from './api/customers-api/types';
|
|
4
|
-
export * from './api/contracts-api/types';
|
|
5
|
-
export * from './api/tiers-api/types';
|
|
6
|
-
export * from './api/custom-skus-api/types';
|
|
7
|
-
export * from './api/patterns-api/types';
|
|
8
4
|
export type CcpConfig = {
|
|
9
5
|
token: Token;
|
|
10
6
|
discoveryUrl?: string;
|
|
@@ -110,38 +106,10 @@ export interface Usage {
|
|
|
110
106
|
environment_id: string;
|
|
111
107
|
flow_id: string;
|
|
112
108
|
}
|
|
113
|
-
export type ListPaymentProviderParams = {
|
|
114
|
-
id?: string;
|
|
115
|
-
name?: string;
|
|
116
|
-
};
|
|
117
|
-
export type PaymentProvider = {
|
|
118
|
-
id: string;
|
|
119
|
-
name: string;
|
|
120
|
-
};
|
|
121
|
-
export type Vendor = {
|
|
122
|
-
id: string;
|
|
123
|
-
name: string;
|
|
124
|
-
};
|
|
125
|
-
export type UpdatePaymentProvider = {
|
|
126
|
-
name: string;
|
|
127
|
-
};
|
|
128
|
-
export type UpdateVendor = {
|
|
129
|
-
name: string;
|
|
130
|
-
};
|
|
131
109
|
export type Pagination = {
|
|
132
110
|
page?: number;
|
|
133
111
|
pageSize?: number;
|
|
134
112
|
orderDirection?: OrderDirection;
|
|
135
113
|
orderBy?: string;
|
|
136
114
|
};
|
|
137
|
-
export type Employee = {
|
|
138
|
-
id: string;
|
|
139
|
-
name: string;
|
|
140
|
-
};
|
|
141
|
-
export type SageCustomer = {
|
|
142
|
-
RECORDNO: string;
|
|
143
|
-
CUSTOMERID: string;
|
|
144
|
-
NAME: string;
|
|
145
|
-
[key: string]: string;
|
|
146
|
-
};
|
|
147
115
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAc,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAc,2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AC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG;IACpD,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,IAAI,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAQD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/ccp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
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.42.
|
|
21
|
+
"@or-sdk/base": "^0.42.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"concurrently": "9.0.1",
|
|
@@ -26,5 +26,6 @@
|
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"gitHead": "125ac8b4ba02984760eaedba34d4dc90fecafece"
|
|
30
31
|
}
|
package/src/Ccp.ts
CHANGED
|
@@ -8,15 +8,7 @@ import {
|
|
|
8
8
|
MappingApi,
|
|
9
9
|
FlowsApi,
|
|
10
10
|
ReportingApi,
|
|
11
|
-
PaymentProvidersApi,
|
|
12
|
-
VendorsApi,
|
|
13
11
|
SkusApi,
|
|
14
|
-
EmployeesApi,
|
|
15
|
-
SageApi,
|
|
16
|
-
ContractsApi,
|
|
17
|
-
TiersApi,
|
|
18
|
-
CustomSkusApi,
|
|
19
|
-
PatternsApi,
|
|
20
12
|
} from './api';
|
|
21
13
|
import { ApiError } from './apiError';
|
|
22
14
|
import { SERVICE_KEY } from './constants';
|
|
@@ -37,15 +29,7 @@ export class Ccp extends Base {
|
|
|
37
29
|
public readonly mappingApi: MappingApi;
|
|
38
30
|
public readonly flowsApi: FlowsApi;
|
|
39
31
|
public readonly reportingApi: ReportingApi;
|
|
40
|
-
public readonly paymentProvidersApi: PaymentProvidersApi;
|
|
41
|
-
public readonly vendorsApi: VendorsApi;
|
|
42
32
|
public readonly skusApi: SkusApi;
|
|
43
|
-
public readonly employeesApi: EmployeesApi;
|
|
44
|
-
public readonly sageApi: SageApi;
|
|
45
|
-
public readonly contractsApi: ContractsApi;
|
|
46
|
-
public readonly tiersApi: TiersApi;
|
|
47
|
-
public readonly customSkusApi: CustomSkusApi;
|
|
48
|
-
public readonly patternsApi: PatternsApi;
|
|
49
33
|
private withApiErrorLog: boolean;
|
|
50
34
|
|
|
51
35
|
/**
|
|
@@ -75,15 +59,7 @@ export class Ccp extends Base {
|
|
|
75
59
|
this.mappingApi = new MappingApi(apiCall);
|
|
76
60
|
this.flowsApi = new FlowsApi(apiCall);
|
|
77
61
|
this.reportingApi = new ReportingApi(apiCall);
|
|
78
|
-
this.paymentProvidersApi = new PaymentProvidersApi(apiCall);
|
|
79
|
-
this.vendorsApi = new VendorsApi(apiCall);
|
|
80
62
|
this.skusApi = new SkusApi(apiCall);
|
|
81
|
-
this.employeesApi = new EmployeesApi(apiCall);
|
|
82
|
-
this.sageApi = new SageApi(apiCall);
|
|
83
|
-
this.contractsApi = new ContractsApi(apiCall);
|
|
84
|
-
this.tiersApi = new TiersApi(apiCall);
|
|
85
|
-
this.customSkusApi = new CustomSkusApi(apiCall);
|
|
86
|
-
this.patternsApi = new PatternsApi(apiCall);
|
|
87
63
|
}
|
|
88
64
|
|
|
89
65
|
callApi<T>(params: CalApiParams): Promise<T> {
|
|
@@ -5,20 +5,3 @@ export enum CustomerStatus {
|
|
|
5
5
|
DELETED = 'deleted',
|
|
6
6
|
TRIAL = 'trial',
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
export enum ExtendedCustomerStatuses {
|
|
10
|
-
active = 'active',
|
|
11
|
-
inactive = 'inactive',
|
|
12
|
-
suspended = 'suspended',
|
|
13
|
-
deleted = 'DELETED',
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export enum ExtendedCustomerPaymentStrategies {
|
|
17
|
-
postpayment = 'postpayment',
|
|
18
|
-
prepayment = 'prepayment',
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export enum ExtendedCustomerInvoicingStatuses {
|
|
22
|
-
qa = 'qa',
|
|
23
|
-
live = 'live',
|
|
24
|
-
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import { BaseApi } from '../baseApi';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Customer } from './types';
|
|
5
5
|
|
|
6
6
|
export default class CustomersApi extends BaseApi {
|
|
7
7
|
private readonly apiBasePath = 'api/v1/customers';
|
|
@@ -25,54 +25,4 @@ export default class CustomersApi extends BaseApi {
|
|
|
25
25
|
route: `${this.apiBasePath}/list`,
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Get paginated list of extended customers
|
|
31
|
-
* @param params Query parameters for filtering and pagination
|
|
32
|
-
*/
|
|
33
|
-
async getExtendedCustomers(params: GetExtendedCustomersParams = {}): Promise<PaginatedResponse<ExtendedCustomer>> {
|
|
34
|
-
return await this.apiCall({
|
|
35
|
-
method: 'GET',
|
|
36
|
-
route: `${this.apiBasePath}/extended`,
|
|
37
|
-
params,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Update extended customer
|
|
43
|
-
* @param id Customer ID
|
|
44
|
-
* @param data Updated customer data
|
|
45
|
-
*/
|
|
46
|
-
async updateExtendedCustomer(id: string, data: UpdateExtendedCustomerParams): Promise<ExtendedCustomer> {
|
|
47
|
-
return await this.apiCall({
|
|
48
|
-
method: 'PUT',
|
|
49
|
-
route: `${this.apiBasePath}/extended`,
|
|
50
|
-
params: { id },
|
|
51
|
-
data,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Create extended customer
|
|
57
|
-
* @param data Customer data
|
|
58
|
-
*/
|
|
59
|
-
async createExtendedCustomer(data: CreateExtendedCustomerParams): Promise<ExtendedCustomer> {
|
|
60
|
-
return await this.apiCall({
|
|
61
|
-
method: 'POST',
|
|
62
|
-
route: `${this.apiBasePath}/extended`,
|
|
63
|
-
data,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Delete extended customer
|
|
69
|
-
* @param id Customer ID
|
|
70
|
-
*/
|
|
71
|
-
async deleteExtendedCustomer(id: string): Promise<void> {
|
|
72
|
-
return await this.apiCall({
|
|
73
|
-
method: 'DELETE',
|
|
74
|
-
route: `${this.apiBasePath}/extended`,
|
|
75
|
-
params: { id },
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
28
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { Pagination } from '../../types';
|
|
2
|
-
|
|
3
1
|
import {
|
|
4
|
-
CustomerStatus
|
|
5
|
-
ExtendedCustomerInvoicingStatuses,
|
|
6
|
-
ExtendedCustomerPaymentStrategies,
|
|
7
|
-
ExtendedCustomerStatuses,
|
|
2
|
+
CustomerStatus
|
|
8
3
|
} from './constants';
|
|
9
4
|
|
|
10
5
|
export interface CustomerBillingAddress {
|
|
@@ -27,69 +22,3 @@ export interface Customer {
|
|
|
27
22
|
idwCustomerId?: string;
|
|
28
23
|
}
|
|
29
24
|
|
|
30
|
-
export type GetExtendedCustomersParams = {
|
|
31
|
-
id?: string;
|
|
32
|
-
name?: string;
|
|
33
|
-
billable?: boolean;
|
|
34
|
-
chargeCreditCard?: boolean;
|
|
35
|
-
domains?: string[];
|
|
36
|
-
approver?: string[];
|
|
37
|
-
managerId?: string;
|
|
38
|
-
parentCustomer?: string;
|
|
39
|
-
idwCustomerId?: string;
|
|
40
|
-
status?: ExtendedCustomerStatuses;
|
|
41
|
-
paymentStrategy?: ExtendedCustomerPaymentStrategies;
|
|
42
|
-
invoicingStatus?: ExtendedCustomerInvoicingStatuses;
|
|
43
|
-
stripeCustomerId?: string;
|
|
44
|
-
paymentProviderId?: string;
|
|
45
|
-
limit?: number;
|
|
46
|
-
} & Pagination;
|
|
47
|
-
|
|
48
|
-
export type MappedVendor = {
|
|
49
|
-
id: string;
|
|
50
|
-
name: string;
|
|
51
|
-
vendorKeys?: string[];
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
// TODO: Extend from base customers
|
|
55
|
-
export type ExtendedCustomer = {
|
|
56
|
-
anCustomerId?: string;
|
|
57
|
-
approverIds?: string[];
|
|
58
|
-
billable?: boolean;
|
|
59
|
-
billingAddress?: CustomerBillingAddress;
|
|
60
|
-
chargeCreditCard?: boolean;
|
|
61
|
-
created?: string;
|
|
62
|
-
sageId?: string;
|
|
63
|
-
customerProfileId?: string;
|
|
64
|
-
deliverInvoiceEmail?: boolean;
|
|
65
|
-
deliverInvoiceMail?: boolean;
|
|
66
|
-
domains?: string[];
|
|
67
|
-
endDate?: string;
|
|
68
|
-
friendlyName?: string;
|
|
69
|
-
id: string;
|
|
70
|
-
idwCustomerId?: string;
|
|
71
|
-
invoicingStatus?: ExtendedCustomerInvoicingStatuses;
|
|
72
|
-
managerId?: string;
|
|
73
|
-
name?: string;
|
|
74
|
-
parentCustomer?: string;
|
|
75
|
-
paymentProfileId?: string;
|
|
76
|
-
paymentStrategy?: ExtendedCustomerPaymentStrategies;
|
|
77
|
-
pageId?: string;
|
|
78
|
-
shortcode?: string;
|
|
79
|
-
slackChannel?: string;
|
|
80
|
-
startDate?: string;
|
|
81
|
-
status?: ExtendedCustomerStatuses;
|
|
82
|
-
stripeCustomerId?: string;
|
|
83
|
-
type?: string;
|
|
84
|
-
sendInvoiceCsv?: boolean;
|
|
85
|
-
vendors?: MappedVendor[];
|
|
86
|
-
paymentProviderId?: string | null;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
type UpdateMappedVendor = Omit<MappedVendor, 'name'> & { name?: string; };
|
|
90
|
-
|
|
91
|
-
export type CreateExtendedCustomerParams = Omit<Customer, 'id' | 'vendors'> & {
|
|
92
|
-
vendors?: UpdateMappedVendor[];
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export type UpdateExtendedCustomerParams = CreateExtendedCustomerParams;
|
package/src/api/index.ts
CHANGED
|
@@ -5,12 +5,6 @@ export { default as CategoriesApi } from './categoriesApi';
|
|
|
5
5
|
export { default as MappingApi } from './mappingApi';
|
|
6
6
|
export { default as FlowsApi } from './flowsApi';
|
|
7
7
|
export { default as ReportingApi } from './reportingApi';
|
|
8
|
-
export { default as PaymentProvidersApi } from './paymentProvidersApi';
|
|
9
|
-
export { default as VendorsApi } from './vedorsApi';
|
|
10
8
|
export { default as SkusApi } from './skusApi';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export { default as ContractsApi } from './contracts-api/contractsApi';
|
|
14
|
-
export { default as TiersApi } from './tiers-api/tiersApi';
|
|
15
|
-
export { default as CustomSkusApi } from './custom-skus-api/customSkusApi';
|
|
16
|
-
export { default as PatternsApi } from './patterns-api/patternsApi';
|
|
9
|
+
|
|
10
|
+
|
package/src/constants.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -3,10 +3,6 @@ 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
|
|
|
11
7
|
|
|
12
8
|
export type CcpConfig = {
|
|
@@ -149,28 +145,6 @@ export interface Usage {
|
|
|
149
145
|
flow_id: string;
|
|
150
146
|
}
|
|
151
147
|
|
|
152
|
-
export type ListPaymentProviderParams = {
|
|
153
|
-
id?: string;
|
|
154
|
-
name?: string;
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
export type PaymentProvider = {
|
|
158
|
-
id: string;
|
|
159
|
-
name: string;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export type Vendor = {
|
|
163
|
-
id: string;
|
|
164
|
-
name: string;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
export type UpdatePaymentProvider = {
|
|
168
|
-
name: string;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
export type UpdateVendor = {
|
|
172
|
-
name: string;
|
|
173
|
-
};
|
|
174
148
|
|
|
175
149
|
/**
|
|
176
150
|
* TODO:
|
|
@@ -184,15 +158,3 @@ export type Pagination = {
|
|
|
184
158
|
orderBy?: string;
|
|
185
159
|
};
|
|
186
160
|
|
|
187
|
-
export type Employee = {
|
|
188
|
-
id: string;
|
|
189
|
-
name: string;
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
// TODO: Improve sage integration type coverage after route refactor
|
|
193
|
-
export type SageCustomer = {
|
|
194
|
-
RECORDNO: string;
|
|
195
|
-
CUSTOMERID: string;
|
|
196
|
-
NAME: string;
|
|
197
|
-
[key: string]: string;
|
|
198
|
-
};
|
|
@@ -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;IA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hD"}
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/custom-skus-api/types.ts"],"names":[],"mappings":""}
|