@or-sdk/billing 11.30.1-beta.2800.0 → 11.31.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/dist/cjs/api/accountsApi/index.js.map +1 -1
- package/dist/cjs/api/accountsApi/types.js.map +1 -1
- package/dist/esm/api/accountsApi/index.js.map +1 -1
- package/dist/esm/api/accountsApi/types.js.map +1 -1
- package/dist/types/api/accountsApi/index.d.ts +4 -5
- package/dist/types/api/accountsApi/index.d.ts.map +1 -1
- package/dist/types/api/accountsApi/types.d.ts +2 -57
- package/dist/types/api/accountsApi/types.d.ts.map +1 -1
- package/dist/types/api/customerForPaymentsApi/types.d.ts +1 -1
- package/dist/types/api/customerForPaymentsApi/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/api/accountsApi/index.ts +7 -14
- package/src/api/accountsApi/types.ts +5 -62
- package/src/api/customerForPaymentsApi/index.ts +2 -2
- package/src/api/customerForPaymentsApi/types.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/accountsApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,sCAAqC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/accountsApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,sCAAqC;AAErC;IAAyC,+BAAO;IAAhD;;QACmB,iBAAW,GAAG,UAAU,CAAC;QACzB,4BAAsB,GAAG,qBAAqB,CAAC;;IAoSlE,CAAC;IA9Pc,iCAAW,GAAxB,UAAyB,MAA8B;;;;4BAC9C,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM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AAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,sBAAsB,cAAI,aAAa,6BAAmB,SAAS,CAAE;yBACrF,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IAOK,+CAAyB,GAA/B,UACE,aAAqB,EACrB,SAAiB;;;;4BAEV,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,sBAAsB,cAAI,aAAa,8BAAoB,SAAS,CAAE;yBACtF,CAAC,EAAA;4BAHF,WAAO,SAGL,EAAC;;;;KACJ;IACH,kBAAC;AAAD,CAAC,AAtSD,CAAyC,iBAAO,GAsS/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/accountsApi/types.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/accountsApi/types.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AAE9C,4FAFA,4BAAW,OAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/accountsApi/index.ts"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/accountsApi/index.ts"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAAhD;;QACmB,gBAAW,GAAG,UAAU,CAAC;QACzB,2BAAsB,GAAG,qBAAqB,CAAC;IAoSlE,CAAC;IA9Pc,WAAW,CAAC,MAA8B;;YACrD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC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rB,SAAiB;;YAEjB,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,GAAG,IAAI,CAAC,sBAAsB,IAAI,aAAa,oBAAoB,SAAS,EAAE;aACtF,CAAC,CAAC;QACL,CAAC;KAAA;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/accountsApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/accountsApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { AccountsQueryParamsV2Dto, AccountV2Dto, CreateEnvironmentAccountDto, UpdateEnvironmentAccountDto, EnvironmentAccountDto, PaginatedResponseDto, EnvironmentAccountDataDto, EnvironmentAccountsFiltersDto } from '@onereach/billing-dto';
|
|
1
|
+
import { AccountsQueryParamsV2Dto, AccountV2Dto, CreateEnvironmentAccountDto, UpdateEnvironmentAccountDto, EnvironmentAccountDto, PaginatedResponseDto, EnvironmentAccountDataDto, EnvironmentAccountsFiltersDto, AccountDto, AccountsQueryParamsDto, CreateAccountDto, UpdateAccountDto } from '@onereach/billing-dto';
|
|
2
2
|
import { ResponseDto } from '@onereach/billing-shared';
|
|
3
3
|
import { BaseApi } from '../baseApi';
|
|
4
|
-
import { AccountQueryParams, CreateAccountParams, UpdateAccountParams, AccountDto } from './types';
|
|
5
4
|
export default class AccountsApi extends BaseApi {
|
|
6
5
|
private readonly apiBasePath;
|
|
7
6
|
private readonly accountsManagementPath;
|
|
8
|
-
getAccounts(params:
|
|
9
|
-
createAccount(data:
|
|
10
|
-
updateAccount(id: string, data:
|
|
7
|
+
getAccounts(params: AccountsQueryParamsDto): Promise<ResponseDto<AccountDto>>;
|
|
8
|
+
createAccount(data: CreateAccountDto): Promise<AccountDto>;
|
|
9
|
+
updateAccount(id: string, data: UpdateAccountDto): Promise<AccountDto>;
|
|
11
10
|
deleteAccount(id: string, softDelete?: boolean): Promise<void>;
|
|
12
11
|
getAccountsV2(params: AccountsQueryParamsV2Dto): Promise<ResponseDto<AccountV2Dto>>;
|
|
13
12
|
listEnvironmentAccounts(environmentId: string, filters?: EnvironmentAccountsFiltersDto): Promise<PaginatedResponseDto<EnvironmentAccountDto>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/accountsApi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/accountsApi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,UAAU,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACxT,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC9C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAC1C,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAyB;IAsCnD,WAAW,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IA+C7E,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IAuC1D,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IAiBtE,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,UAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC3D,aAAa,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAe1F,uBAAuB,CAC3B,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,6BAA6B,GACtC,OAAO,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;IAajD,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAY5F,sBAAsB,CAC1B,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,yBAAyB,CAAC;IAa/B,4BAA4B,CAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,qBAAqB,CAAC;IAa3B,wBAAwB,CAC5B,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,qBAAqB,CAAC;IAa3B,wBAAwB,CAC5B,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;IAYV,yBAAyB,CAC7B,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;CAMjB"}
|
|
@@ -1,59 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AccountType } from '@onereach/billing-shared';
|
|
2
2
|
export { AccountType };
|
|
3
|
-
export { EnvironmentAccountDataDto, EnvironmentAccountsFiltersDto, CreateEnvironmentAccountDto, UpdateEnvironmentAccountDto, EnvironmentAccountDto, } from '@onereach/billing-dto';
|
|
4
|
-
export interface AccountDto {
|
|
5
|
-
id: string;
|
|
6
|
-
environmentId: string;
|
|
7
|
-
accountName?: string;
|
|
8
|
-
backupDate?: Date;
|
|
9
|
-
billable?: boolean;
|
|
10
|
-
creatorName?: string;
|
|
11
|
-
customerId?: string;
|
|
12
|
-
dateCreated?: Date;
|
|
13
|
-
dateModified?: Date;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
environmentName?: string;
|
|
16
|
-
lastTimeActive?: Date;
|
|
17
|
-
metadata?: Record<string, unknown>;
|
|
18
|
-
modifiedAt?: string;
|
|
19
|
-
purpose?: string;
|
|
20
|
-
status?: string;
|
|
21
|
-
type?: AccountType;
|
|
22
|
-
}
|
|
23
|
-
export type AccountQueryParams = {
|
|
24
|
-
id?: string;
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
environmentId?: string;
|
|
27
|
-
billable?: boolean;
|
|
28
|
-
customerId?: string;
|
|
29
|
-
status?: string;
|
|
30
|
-
} & RequestDto;
|
|
31
|
-
export interface CreateAccountParams {
|
|
32
|
-
id: string;
|
|
33
|
-
environmentId: string;
|
|
34
|
-
accountName?: string;
|
|
35
|
-
backupDate?: Date;
|
|
36
|
-
billable?: boolean;
|
|
37
|
-
creatorName?: string;
|
|
38
|
-
customerId?: string;
|
|
39
|
-
dateCreated?: Date | number;
|
|
40
|
-
dateModified?: Date | number;
|
|
41
|
-
disabled?: boolean;
|
|
42
|
-
environmentName?: string;
|
|
43
|
-
lastTimeActive?: Date;
|
|
44
|
-
metadata?: Record<string, unknown>;
|
|
45
|
-
modifiedAt?: string;
|
|
46
|
-
purpose?: string;
|
|
47
|
-
status?: string;
|
|
48
|
-
type?: AccountType;
|
|
49
|
-
}
|
|
50
|
-
export interface UpdateAccountParams {
|
|
51
|
-
billable?: boolean;
|
|
52
|
-
customerId?: string;
|
|
53
|
-
type?: AccountType;
|
|
54
|
-
environmentId: string;
|
|
55
|
-
purpose?: string;
|
|
56
|
-
status?: string;
|
|
57
|
-
disabled?: boolean;
|
|
58
|
-
}
|
|
3
|
+
export { EnvironmentAccountDataDto, EnvironmentAccountsFiltersDto, CreateEnvironmentAccountDto, UpdateEnvironmentAccountDto, EnvironmentAccountDto, AccountDto, AccountsQueryParamsDto, CreateAccountDto, UpdateAccountDto, } from '@onereach/billing-dto';
|
|
59
4
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/accountsApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/accountsApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,UAAU,EACV,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/customerForPaymentsApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,
|
|
1
|
+
{"version":3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M,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/billing",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.31.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"dev": "pnpm build:watch:esm"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@onereach/billing-dto": "^11.
|
|
19
|
-
"@onereach/billing-shared": "^11.
|
|
18
|
+
"@onereach/billing-dto": "^11.31.0",
|
|
19
|
+
"@onereach/billing-shared": "^11.31.0",
|
|
20
20
|
"@or-sdk/base": "^0.42.3",
|
|
21
21
|
"@or-sdk/discovery": "1.10.4",
|
|
22
22
|
"@types/qs": "6.14.0",
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
import { AccountsQueryParamsV2Dto, AccountV2Dto, CreateEnvironmentAccountDto, UpdateEnvironmentAccountDto, EnvironmentAccountDto, PaginatedResponseDto, EnvironmentAccountDataDto, EnvironmentAccountsFiltersDto } from '@onereach/billing-dto';
|
|
1
|
+
import { AccountsQueryParamsV2Dto, AccountV2Dto, CreateEnvironmentAccountDto, UpdateEnvironmentAccountDto, EnvironmentAccountDto, PaginatedResponseDto, EnvironmentAccountDataDto, EnvironmentAccountsFiltersDto, AccountDto, AccountsQueryParamsDto, CreateAccountDto, UpdateAccountDto } from '@onereach/billing-dto';
|
|
2
2
|
import { ResponseDto } from '@onereach/billing-shared';
|
|
3
3
|
|
|
4
4
|
import { BaseApi } from '../baseApi';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
AccountQueryParams,
|
|
8
|
-
CreateAccountParams,
|
|
9
|
-
UpdateAccountParams,
|
|
10
|
-
AccountDto,
|
|
11
|
-
} from './types';
|
|
12
|
-
|
|
13
6
|
export default class AccountsApi extends BaseApi {
|
|
14
7
|
private readonly apiBasePath = 'accounts';
|
|
15
8
|
private readonly accountsManagementPath = 'accounts-management';
|
|
16
9
|
|
|
17
10
|
/**
|
|
18
11
|
* Retrieves accounts based on specified query parameters
|
|
19
|
-
* @param {
|
|
12
|
+
* @param {AccountsQueryParamsDto} [params] - Query parameters for filtering accounts
|
|
20
13
|
* @param {string} [params.id] - Filter accounts by ID
|
|
21
14
|
* @param {boolean} [params.disabled] - Filter accounts by disabled status
|
|
22
15
|
* @param {string} [params.environmentId] - Filter accounts by environment ID
|
|
@@ -50,7 +43,7 @@ export default class AccountsApi extends BaseApi {
|
|
|
50
43
|
* - status?: string - Account status
|
|
51
44
|
* - type?: AccountType - Account type
|
|
52
45
|
*/
|
|
53
|
-
public async getAccounts(params:
|
|
46
|
+
public async getAccounts(params: AccountsQueryParamsDto): Promise<ResponseDto<AccountDto>> {
|
|
54
47
|
return await this.apiCall({
|
|
55
48
|
method: 'GET',
|
|
56
49
|
route: `${this.apiBasePath}`,
|
|
@@ -60,7 +53,7 @@ export default class AccountsApi extends BaseApi {
|
|
|
60
53
|
|
|
61
54
|
/**
|
|
62
55
|
* Creates a new account
|
|
63
|
-
* @param {
|
|
56
|
+
* @param {CreateAccountDto} data - Account data for creation
|
|
64
57
|
* @param {string} data.id - Unique identifier for the account
|
|
65
58
|
* @param {string} data.environmentId - Environment identifier the account belongs to
|
|
66
59
|
* @param {string} [data.accountName] - Name of the account
|
|
@@ -97,7 +90,7 @@ export default class AccountsApi extends BaseApi {
|
|
|
97
90
|
* - status?: string - Account status
|
|
98
91
|
* - type?: AccountType - Account type
|
|
99
92
|
*/
|
|
100
|
-
public async createAccount(data:
|
|
93
|
+
public async createAccount(data: CreateAccountDto): Promise<AccountDto> {
|
|
101
94
|
return await this.apiCall({
|
|
102
95
|
method: 'POST',
|
|
103
96
|
route: `${this.apiBasePath}`,
|
|
@@ -109,7 +102,7 @@ export default class AccountsApi extends BaseApi {
|
|
|
109
102
|
* Updates an existing account by ID
|
|
110
103
|
* NOTE: In the ops dev environment, you can only update accounts that exist in the ops dev environment
|
|
111
104
|
* @param {string} id - The ID of the account to update
|
|
112
|
-
* @param {
|
|
105
|
+
* @param {UpdateAccountDto} data - Account data to update
|
|
113
106
|
* @param {boolean} [data.billable] - Whether the account is billable
|
|
114
107
|
* @param {string} [data.customerId] - Associated customer identifier
|
|
115
108
|
* @param {AccountType} [data.type] - Type of the account
|
|
@@ -136,7 +129,7 @@ export default class AccountsApi extends BaseApi {
|
|
|
136
129
|
* - status?: string - Account status
|
|
137
130
|
* - type?: AccountType - Account type
|
|
138
131
|
*/
|
|
139
|
-
public async updateAccount(id: string, data:
|
|
132
|
+
public async updateAccount(id: string, data: UpdateAccountDto): Promise<AccountDto> {
|
|
140
133
|
return await this.apiCall({
|
|
141
134
|
method: 'PUT',
|
|
142
135
|
route: `${this.apiBasePath}`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AccountType } from '@onereach/billing-shared';
|
|
2
2
|
|
|
3
3
|
export { AccountType };
|
|
4
4
|
|
|
@@ -8,65 +8,8 @@ export {
|
|
|
8
8
|
CreateEnvironmentAccountDto,
|
|
9
9
|
UpdateEnvironmentAccountDto,
|
|
10
10
|
EnvironmentAccountDto,
|
|
11
|
+
AccountDto,
|
|
12
|
+
AccountsQueryParamsDto,
|
|
13
|
+
CreateAccountDto,
|
|
14
|
+
UpdateAccountDto,
|
|
11
15
|
} from '@onereach/billing-dto';
|
|
12
|
-
|
|
13
|
-
export interface AccountDto {
|
|
14
|
-
id: string;
|
|
15
|
-
environmentId: string;
|
|
16
|
-
accountName?: string;
|
|
17
|
-
backupDate?: Date;
|
|
18
|
-
billable?: boolean;
|
|
19
|
-
creatorName?: string;
|
|
20
|
-
customerId?: string;
|
|
21
|
-
dateCreated?: Date;
|
|
22
|
-
dateModified?: Date;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
environmentName?: string;
|
|
25
|
-
lastTimeActive?: Date;
|
|
26
|
-
metadata?: Record<string, unknown>;
|
|
27
|
-
modifiedAt?: string;
|
|
28
|
-
purpose?: string;
|
|
29
|
-
status?: string;
|
|
30
|
-
type?: AccountType;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type AccountQueryParams = {
|
|
34
|
-
id?: string;
|
|
35
|
-
disabled?: boolean;
|
|
36
|
-
environmentId?: string;
|
|
37
|
-
billable?: boolean;
|
|
38
|
-
customerId?: string;
|
|
39
|
-
status?: string;
|
|
40
|
-
} & RequestDto;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export interface CreateAccountParams {
|
|
44
|
-
id: string;
|
|
45
|
-
environmentId: string;
|
|
46
|
-
accountName?: string;
|
|
47
|
-
backupDate?: Date;
|
|
48
|
-
billable?: boolean;
|
|
49
|
-
creatorName?: string;
|
|
50
|
-
customerId?: string;
|
|
51
|
-
dateCreated?: Date | number;
|
|
52
|
-
dateModified?: Date | number;
|
|
53
|
-
disabled?: boolean;
|
|
54
|
-
environmentName?: string;
|
|
55
|
-
lastTimeActive?: Date;
|
|
56
|
-
metadata?: Record<string, unknown>;
|
|
57
|
-
modifiedAt?: string;
|
|
58
|
-
purpose?: string;
|
|
59
|
-
status?: string;
|
|
60
|
-
type?: AccountType;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
export interface UpdateAccountParams {
|
|
65
|
-
billable?: boolean;
|
|
66
|
-
customerId?: string;
|
|
67
|
-
type?: AccountType;
|
|
68
|
-
environmentId: string;
|
|
69
|
-
purpose?: string;
|
|
70
|
-
status?: string;
|
|
71
|
-
disabled?: boolean;
|
|
72
|
-
}
|
|
@@ -21,7 +21,7 @@ export default class CustomerForPaymentsApi extends BaseApi {
|
|
|
21
21
|
* @param {string} data.newAccountName - Optional New account name
|
|
22
22
|
* @param {string} data.type - Optional Customer type
|
|
23
23
|
* @param {string} data.status - Optional Customer status
|
|
24
|
-
* @param {number} data.bonus -
|
|
24
|
+
* @param {number} data.bonus - Bonus amount
|
|
25
25
|
* @param {string} [data.accountId] - Optional account ID to associate with customer
|
|
26
26
|
* @param {string} [data.stripeCustomerId] - Optional Stripe customer ID
|
|
27
27
|
* @param {Object} [data.billingAddress] - Customer billing address
|
|
@@ -55,7 +55,7 @@ export default class CustomerForPaymentsApi extends BaseApi {
|
|
|
55
55
|
* @param {string} data.newAccountName - Optional New account name
|
|
56
56
|
* @param {string} data.type - Optional Customer type
|
|
57
57
|
* @param {string} data.status - Optional Customer status
|
|
58
|
-
* @param {number} data.bonus -
|
|
58
|
+
* @param {number} data.bonus - Bonus amount
|
|
59
59
|
* @param {string} [data.accountId] - Optional account ID to associate with customer
|
|
60
60
|
* @param {string} [data.stripeCustomerId] - Optional Stripe customer ID
|
|
61
61
|
* @param {Object} [data.billingAddress] - Customer billing address
|
|
@@ -9,7 +9,7 @@ export type CreateCustomerForPaymentsParams = {
|
|
|
9
9
|
status?: CustomerStatuses;
|
|
10
10
|
environmentId: string;
|
|
11
11
|
newAccountName?: string;
|
|
12
|
-
bonus
|
|
12
|
+
bonus: number;
|
|
13
13
|
accountId?: string;
|
|
14
14
|
stripeCustomerId?: string;
|
|
15
15
|
billingAddress?: CustomerBillingAddress;
|