@types/chartmogul-node 3.8.0 → 3.9.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.
- chartmogul-node/README.md +1 -1
- chartmogul-node/common.d.ts +9 -7
- chartmogul-node/index.d.ts +855 -145
- chartmogul-node/package.json +2 -2
chartmogul-node/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for chartmogul-node (https://github.com/c
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chartmogul-node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 14 Jan 2026 13:15:13 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
chartmogul-node/common.d.ts
CHANGED
|
@@ -2,17 +2,19 @@ export interface Map {
|
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}
|
|
4
4
|
export interface CursorParams {
|
|
5
|
-
page?: number
|
|
6
|
-
per_page?: number
|
|
5
|
+
page?: number;
|
|
6
|
+
per_page?: number;
|
|
7
|
+
cursor?: string;
|
|
7
8
|
}
|
|
8
9
|
export type Strings = string[];
|
|
9
10
|
|
|
10
11
|
export interface Cursor {
|
|
11
|
-
page?: number
|
|
12
|
-
per_page?: number
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
page?: number;
|
|
13
|
+
per_page?: number;
|
|
14
|
+
cursor?: string;
|
|
15
|
+
has_more?: boolean;
|
|
16
|
+
current_page?: number;
|
|
17
|
+
total_pages?: number;
|
|
16
18
|
}
|
|
17
19
|
export interface Entries<T> extends Cursor {
|
|
18
20
|
entries: T[];
|
chartmogul-node/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Cursor, CursorParams, Entries, EntriesSummary, Map, Strings } from "./common";
|
|
2
2
|
|
|
3
|
+
export interface ResourceDestroyed {
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
export class Config {
|
|
4
8
|
VERSION: string;
|
|
5
9
|
API_BASE: string;
|
|
@@ -13,14 +17,60 @@ export namespace Ping {
|
|
|
13
17
|
function ping(config: Config): Promise<string>;
|
|
14
18
|
}
|
|
15
19
|
|
|
20
|
+
export namespace Account {
|
|
21
|
+
type WeekStartOn = "monday" | "sunday";
|
|
22
|
+
type ChurnRecognition =
|
|
23
|
+
| "churn_at_time_of_cancelation"
|
|
24
|
+
| "churn_at_period_end"
|
|
25
|
+
| "churn_at_click";
|
|
26
|
+
type RefundHandling = "refund_ignore" | "refund_full_only";
|
|
27
|
+
type ProximateMovementReclassification =
|
|
28
|
+
| "reclassification_off"
|
|
29
|
+
| "one_minute_reclassification"
|
|
30
|
+
| "ten_minutes_reclassification"
|
|
31
|
+
| "one_hour_reclassification"
|
|
32
|
+
| "one_day_reclassification"
|
|
33
|
+
| "one_week_reclassification"
|
|
34
|
+
| "thirty_days_reclassification"
|
|
35
|
+
| "sixty_days_reclassification"
|
|
36
|
+
| "ninety_days_reclassification";
|
|
37
|
+
|
|
38
|
+
interface ExtraAccountParams {
|
|
39
|
+
/**
|
|
40
|
+
* Comma-separated list of fields to include. Allowed values:
|
|
41
|
+
* - churn_recognition,
|
|
42
|
+
* - churn_when_zero_mrr,
|
|
43
|
+
* - auto_churn_subscription,
|
|
44
|
+
* - refund_handling,
|
|
45
|
+
* - proximate_movement_reclassification
|
|
46
|
+
* Example: auto_churn_subscription,churn_when_zero_mrr
|
|
47
|
+
*/
|
|
48
|
+
include?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface Account {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
currency: string;
|
|
55
|
+
time_zone: string;
|
|
56
|
+
week_start_on: WeekStartOn;
|
|
57
|
+
churn_recognition?: ChurnRecognition;
|
|
58
|
+
churn_when_zero_mrr?: boolean;
|
|
59
|
+
auto_churn_subscription?: boolean;
|
|
60
|
+
refund_handling?: RefundHandling;
|
|
61
|
+
proximate_movement_reclassification?: ProximateMovementReclassification;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function retrieve(config: Config, params?: ExtraAccountParams): Promise<Account>;
|
|
65
|
+
}
|
|
66
|
+
|
|
16
67
|
export namespace DataSource {
|
|
17
68
|
type DataSourceStatus =
|
|
18
69
|
| "never_imported"
|
|
19
70
|
| "import_complete"
|
|
20
71
|
| "import_in_progress"
|
|
21
72
|
| "import_failed"
|
|
22
|
-
| string
|
|
23
|
-
| undefined;
|
|
73
|
+
| string;
|
|
24
74
|
|
|
25
75
|
interface ProcessingStatus {
|
|
26
76
|
processed?: number;
|
|
@@ -50,213 +100,640 @@ export namespace DataSource {
|
|
|
50
100
|
auto_churn_subscription_setting?: AutoChurnSubscriptionSetting;
|
|
51
101
|
invoice_handling_setting?: Record<string, any>;
|
|
52
102
|
}
|
|
103
|
+
interface NewDataSource {
|
|
104
|
+
name: string;
|
|
105
|
+
}
|
|
53
106
|
interface DataSources {
|
|
54
107
|
data_sources: DataSource[];
|
|
55
108
|
}
|
|
56
109
|
|
|
57
|
-
function create(config: Config, data:
|
|
110
|
+
function create(config: Config, data: NewDataSource): Promise<DataSource>;
|
|
58
111
|
function retrieve(config: Config, uuid: string, params?: ExtraDataSourceParams): Promise<DataSource>;
|
|
59
|
-
function destroy(config: Config, uuid: string): Promise<
|
|
112
|
+
function destroy(config: Config, uuid: string): Promise<ResourceDestroyed>;
|
|
60
113
|
function all(config: Config, params?: ListDataSourcesParams): Promise<DataSources>;
|
|
61
114
|
}
|
|
62
115
|
|
|
63
116
|
export namespace Customer {
|
|
64
117
|
interface Customer {
|
|
65
|
-
id?: number
|
|
66
|
-
data_source_uuid?: string
|
|
67
|
-
data_source_uuids?: Strings
|
|
68
|
-
uuid?: string
|
|
69
|
-
external_id?: string
|
|
70
|
-
external_ids?: Strings
|
|
71
|
-
name?: string
|
|
72
|
-
email?: string
|
|
73
|
-
status?: string
|
|
74
|
-
["customer-since"]?: string
|
|
75
|
-
attributes?: Attributes
|
|
118
|
+
id?: number;
|
|
119
|
+
data_source_uuid?: string;
|
|
120
|
+
data_source_uuids?: Strings;
|
|
121
|
+
uuid?: string;
|
|
122
|
+
external_id?: string;
|
|
123
|
+
external_ids?: Strings;
|
|
124
|
+
name?: string;
|
|
125
|
+
email?: string;
|
|
126
|
+
status?: string;
|
|
127
|
+
["customer-since"]?: string;
|
|
128
|
+
attributes?: Attributes;
|
|
76
129
|
address?: {
|
|
77
|
-
address_zip?: string
|
|
78
|
-
city?: string
|
|
79
|
-
state?: string
|
|
80
|
-
country?: string
|
|
81
|
-
}
|
|
82
|
-
mrr?: number
|
|
83
|
-
arr?: number
|
|
84
|
-
["billing-system-url"]?: string
|
|
85
|
-
["chartmogul-url"]?: string
|
|
86
|
-
["billing-system-type"]?: string
|
|
87
|
-
currency?: string
|
|
88
|
-
["currency-sign"]?: string
|
|
89
|
-
company?: string
|
|
90
|
-
country?: string
|
|
91
|
-
state?: string
|
|
92
|
-
city?: string
|
|
93
|
-
zip?: string
|
|
94
|
-
lead_created_at?: string
|
|
95
|
-
free_trial_started_at?: string
|
|
130
|
+
address_zip?: string;
|
|
131
|
+
city?: string;
|
|
132
|
+
state?: string;
|
|
133
|
+
country?: string;
|
|
134
|
+
};
|
|
135
|
+
mrr?: number;
|
|
136
|
+
arr?: number;
|
|
137
|
+
["billing-system-url"]?: string;
|
|
138
|
+
["chartmogul-url"]?: string;
|
|
139
|
+
["billing-system-type"]?: string;
|
|
140
|
+
currency?: string;
|
|
141
|
+
["currency-sign"]?: string;
|
|
142
|
+
company?: string;
|
|
143
|
+
country?: string;
|
|
144
|
+
state?: string;
|
|
145
|
+
city?: string;
|
|
146
|
+
zip?: string;
|
|
147
|
+
lead_created_at?: string;
|
|
148
|
+
free_trial_started_at?: string;
|
|
149
|
+
owner?: string;
|
|
150
|
+
website_url?: string;
|
|
151
|
+
}
|
|
152
|
+
interface PrimaryContact {
|
|
153
|
+
first_name?: string;
|
|
154
|
+
last_name?: string;
|
|
155
|
+
email?: string;
|
|
156
|
+
title?: string;
|
|
157
|
+
phone?: string;
|
|
158
|
+
linked_in?: string;
|
|
159
|
+
twitter?: string;
|
|
160
|
+
notes?: string;
|
|
96
161
|
}
|
|
97
162
|
interface NewCustomer {
|
|
98
163
|
data_source_uuid: string;
|
|
99
164
|
external_id: string;
|
|
100
|
-
name
|
|
101
|
-
email?: string
|
|
102
|
-
company?: string
|
|
103
|
-
country?: string
|
|
104
|
-
state?: string
|
|
105
|
-
city?: string
|
|
106
|
-
zip?: string
|
|
107
|
-
lead_created_at?: string
|
|
108
|
-
free_trial_started_at?: string
|
|
109
|
-
attributes?: NewAttributes
|
|
165
|
+
name?: string;
|
|
166
|
+
email?: string;
|
|
167
|
+
company?: string;
|
|
168
|
+
country?: string;
|
|
169
|
+
state?: string;
|
|
170
|
+
city?: string;
|
|
171
|
+
zip?: string;
|
|
172
|
+
lead_created_at?: string;
|
|
173
|
+
free_trial_started_at?: string;
|
|
174
|
+
attributes?: NewAttributes;
|
|
175
|
+
owner?: string;
|
|
176
|
+
primary_contact?: PrimaryContact;
|
|
177
|
+
website_url?: string;
|
|
110
178
|
}
|
|
111
179
|
interface UpdateCustomer {
|
|
112
|
-
name?: string
|
|
113
|
-
email?: string
|
|
114
|
-
company?: string
|
|
115
|
-
country?: string
|
|
116
|
-
state?: string
|
|
117
|
-
city?: string
|
|
118
|
-
zip?: string
|
|
119
|
-
lead_created_at?: string
|
|
120
|
-
free_trial_started_at?: string
|
|
121
|
-
attributes?:
|
|
180
|
+
name?: string;
|
|
181
|
+
email?: string;
|
|
182
|
+
company?: string;
|
|
183
|
+
country?: string;
|
|
184
|
+
state?: string;
|
|
185
|
+
city?: string;
|
|
186
|
+
zip?: string;
|
|
187
|
+
lead_created_at?: string;
|
|
188
|
+
free_trial_started_at?: string;
|
|
189
|
+
attributes?: UpdateAttributes;
|
|
190
|
+
owner?: string;
|
|
191
|
+
primary_contact?: PrimaryContact;
|
|
192
|
+
website_url?: string;
|
|
193
|
+
status?: string;
|
|
122
194
|
}
|
|
123
|
-
interface
|
|
124
|
-
tags?: Strings
|
|
125
|
-
custom?:
|
|
195
|
+
interface UpdateAttributes {
|
|
196
|
+
tags?: Strings;
|
|
197
|
+
custom?: Map;
|
|
126
198
|
}
|
|
127
|
-
interface
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
value: any;
|
|
131
|
-
source?: string | undefined;
|
|
199
|
+
interface NewAttributes {
|
|
200
|
+
tags?: Strings;
|
|
201
|
+
custom?: CustomAttribute.NewCustomAttribute[];
|
|
132
202
|
}
|
|
133
203
|
interface Attributes {
|
|
134
|
-
tags?: Strings
|
|
135
|
-
stripe?: Map
|
|
136
|
-
clearbit?: Map
|
|
137
|
-
custom?: Map
|
|
204
|
+
tags?: Strings;
|
|
205
|
+
stripe?: Map;
|
|
206
|
+
clearbit?: Map;
|
|
207
|
+
custom?: Map;
|
|
138
208
|
}
|
|
139
209
|
interface ListCustomersParams extends CursorParams {
|
|
140
|
-
data_source_uuid?: string
|
|
141
|
-
status?: string
|
|
142
|
-
system?: string
|
|
143
|
-
external_id?: string
|
|
210
|
+
data_source_uuid?: string;
|
|
211
|
+
status?: string;
|
|
212
|
+
system?: string;
|
|
213
|
+
external_id?: string;
|
|
144
214
|
}
|
|
145
215
|
interface SearchCustomersParams extends CursorParams {
|
|
146
|
-
email
|
|
147
|
-
}
|
|
148
|
-
interface MergeID {
|
|
149
|
-
customer_uuid?: string | undefined;
|
|
150
|
-
external_id?: string | undefined;
|
|
216
|
+
email?: string;
|
|
151
217
|
}
|
|
218
|
+
type MergeID =
|
|
219
|
+
| {
|
|
220
|
+
customer_uuid: string;
|
|
221
|
+
data_source_uuid?: never;
|
|
222
|
+
external_id?: never;
|
|
223
|
+
}
|
|
224
|
+
| {
|
|
225
|
+
customer_uuid?: never;
|
|
226
|
+
data_source_uuid: string;
|
|
227
|
+
external_id: string;
|
|
228
|
+
};
|
|
152
229
|
interface MergeCustomersParams {
|
|
153
230
|
from: MergeID;
|
|
154
231
|
into: MergeID;
|
|
155
232
|
}
|
|
233
|
+
type MoveToNewCustomerField = "tasks" | "opportunities" | "notes";
|
|
234
|
+
type UnmergeCustomersParams = MergeID & {
|
|
235
|
+
move_to_new_customer?: MoveToNewCustomerField[];
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
interface SubscriptionData {
|
|
239
|
+
subscriptions: Array<{ uuid: string; data_source_uuid?: string }>;
|
|
240
|
+
}
|
|
156
241
|
|
|
157
242
|
function create(config: Config, data: NewCustomer): Promise<Customer>;
|
|
158
243
|
function retrieve(config: Config, uuid: string): Promise<Customer>;
|
|
159
244
|
function modify(config: Config, uuid: string, data: UpdateCustomer): Promise<Customer>;
|
|
160
|
-
function destroy(config: Config, uuid: string): Promise<
|
|
245
|
+
function destroy(config: Config, uuid: string): Promise<ResourceDestroyed>;
|
|
161
246
|
function all(config: Config, params?: ListCustomersParams): Promise<Entries<Customer>>;
|
|
162
247
|
function search(config: Config, params?: SearchCustomersParams): Promise<Entries<Customer>>;
|
|
163
248
|
function merge(config: Config, params?: MergeCustomersParams): Promise<{}>;
|
|
249
|
+
function unmerge(config: Config, params: UnmergeCustomersParams): Promise<{}>;
|
|
164
250
|
function attributes(config: Config, uuid: string): Promise<Attributes>;
|
|
251
|
+
/**
|
|
252
|
+
* @deprecated Use Metrics.Customer.connectSubscriptions instead
|
|
253
|
+
*/
|
|
254
|
+
function connectSubscriptions(config: Config, customerUuid: string, data: SubscriptionData): Promise<{}>;
|
|
255
|
+
/**
|
|
256
|
+
* @deprecated Use Metrics.Customer.disconnectSubscriptions instead
|
|
257
|
+
*/
|
|
258
|
+
function disconnectSubscriptions(config: Config, customerUuid: string, data: SubscriptionData): Promise<{}>;
|
|
259
|
+
|
|
260
|
+
function contacts(
|
|
261
|
+
config: Config,
|
|
262
|
+
customerId: string,
|
|
263
|
+
params?: Contact.ListContactsParams,
|
|
264
|
+
): Promise<Entries<Contact.Contact>>;
|
|
265
|
+
function createContact(
|
|
266
|
+
config: Config,
|
|
267
|
+
customerId: string,
|
|
268
|
+
data: Contact.NewCustomerContact,
|
|
269
|
+
): Promise<Contact.Contact>;
|
|
270
|
+
|
|
271
|
+
function notes(
|
|
272
|
+
config: Config,
|
|
273
|
+
customerId: string,
|
|
274
|
+
params?: CustomerNote.ListCustomerNotesParams,
|
|
275
|
+
): Promise<Entries<CustomerNote.CustomerNote>>;
|
|
276
|
+
function createNote(
|
|
277
|
+
config: Config,
|
|
278
|
+
customerId: string,
|
|
279
|
+
data: CustomerNote.NewCustomerNote,
|
|
280
|
+
): Promise<CustomerNote.CustomerNote>;
|
|
281
|
+
|
|
282
|
+
function opportunities(
|
|
283
|
+
config: Config,
|
|
284
|
+
customerId: string,
|
|
285
|
+
params?: Opportunity.ListOpportunitiesParams,
|
|
286
|
+
): Promise<Entries<Opportunity.Opportunity>>;
|
|
287
|
+
function createOpportunity(
|
|
288
|
+
config: Config,
|
|
289
|
+
customerId: string,
|
|
290
|
+
data: Opportunity.NewOpportunity,
|
|
291
|
+
): Promise<Opportunity.Opportunity>;
|
|
292
|
+
|
|
293
|
+
function tasks(
|
|
294
|
+
config: Config,
|
|
295
|
+
customerId: string,
|
|
296
|
+
params?: Task.ListTasksParams,
|
|
297
|
+
): Promise<Entries<Task.Task>>;
|
|
298
|
+
function createTask(config: Config, customerId: string, data: Task.NewTask): Promise<Task.Task>;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export namespace Opportunity {
|
|
302
|
+
type OpportunityType = "one-time" | "recurring";
|
|
303
|
+
type ForecastCategory = "pipeline" | "best_case" | "committed" | "omitted";
|
|
304
|
+
type OpportunityPipeline = "New Business" | "Renewals";
|
|
305
|
+
type OpportunityPipelineStage =
|
|
306
|
+
| "Discovery"
|
|
307
|
+
| "Evaluation"
|
|
308
|
+
| "Negotiation"
|
|
309
|
+
| "Verbal Commit"
|
|
310
|
+
| "Closed Won"
|
|
311
|
+
| "Closed Lost";
|
|
312
|
+
interface Opportunity {
|
|
313
|
+
uuid?: string;
|
|
314
|
+
customer_uuid?: string;
|
|
315
|
+
owner?: string;
|
|
316
|
+
pipeline?: OpportunityPipeline | (string & {});
|
|
317
|
+
pipeline_stage?: OpportunityPipelineStage | (string & {});
|
|
318
|
+
estimated_close_date?: string;
|
|
319
|
+
currency?: string;
|
|
320
|
+
amount_in_cents?: number;
|
|
321
|
+
type?: OpportunityType;
|
|
322
|
+
forecast_category?: ForecastCategory;
|
|
323
|
+
win_likelihood?: number;
|
|
324
|
+
custom?: Map;
|
|
325
|
+
created_at?: string;
|
|
326
|
+
updated_at?: string;
|
|
327
|
+
}
|
|
328
|
+
interface ListOpportunitiesParams extends CursorParams {
|
|
329
|
+
customer_uuid?: string;
|
|
330
|
+
owner?: string;
|
|
331
|
+
pipeline?: OpportunityPipeline | (string & {});
|
|
332
|
+
pipeline_stage?: OpportunityPipelineStage | (string & {});
|
|
333
|
+
estimated_close_date_on_or_after?: string;
|
|
334
|
+
estimated_close_date_on_or_before?: string;
|
|
335
|
+
}
|
|
336
|
+
interface NewOpportunity {
|
|
337
|
+
customer_uuid: string;
|
|
338
|
+
owner: string;
|
|
339
|
+
pipeline: OpportunityPipeline | (string & {});
|
|
340
|
+
pipeline_stage: OpportunityPipelineStage | (string & {});
|
|
341
|
+
estimated_close_date: string;
|
|
342
|
+
amount_in_cents: number;
|
|
343
|
+
currency: string;
|
|
344
|
+
type?: OpportunityType;
|
|
345
|
+
forecast_category?: ForecastCategory;
|
|
346
|
+
win_likelihood?: number;
|
|
347
|
+
custom?: Array<{ key: string; value: any }>;
|
|
348
|
+
}
|
|
349
|
+
interface UpdateOpportunity {
|
|
350
|
+
owner?: string;
|
|
351
|
+
pipeline?: OpportunityPipeline | (string & {});
|
|
352
|
+
pipeline_stage?: OpportunityPipelineStage | (string & {});
|
|
353
|
+
estimated_close_date?: string;
|
|
354
|
+
amount_in_cents?: number;
|
|
355
|
+
currency?: string;
|
|
356
|
+
type?: OpportunityType;
|
|
357
|
+
forecast_category?: ForecastCategory;
|
|
358
|
+
win_likelihood?: number;
|
|
359
|
+
custom?: Array<{ key: string; value: any }>;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
function create(config: Config, data: NewOpportunity): Promise<Opportunity>;
|
|
363
|
+
function retrieve(config: Config, uuid: string): Promise<Opportunity>;
|
|
364
|
+
function modify(config: Config, uuid: string, data: UpdateOpportunity): Promise<Opportunity>;
|
|
365
|
+
function destroy(config: Config, uuid: string): Promise<ResourceDestroyed>;
|
|
366
|
+
function all(config: Config, params?: ListOpportunitiesParams): Promise<Entries<Opportunity>>;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export namespace Task {
|
|
370
|
+
interface Task {
|
|
371
|
+
task_uuid?: string;
|
|
372
|
+
customer_uuid?: string;
|
|
373
|
+
task_details?: string;
|
|
374
|
+
assignee?: string;
|
|
375
|
+
due_date?: string;
|
|
376
|
+
completed_at?: string;
|
|
377
|
+
created_at?: string;
|
|
378
|
+
updated_at?: string;
|
|
379
|
+
}
|
|
380
|
+
interface ListTasksParams extends CursorParams {
|
|
381
|
+
customer_uuid?: string;
|
|
382
|
+
assignee?: string;
|
|
383
|
+
due_date_on_or_after?: string;
|
|
384
|
+
due_date_on_or_before?: string;
|
|
385
|
+
completed?: boolean;
|
|
386
|
+
}
|
|
387
|
+
interface NewTask {
|
|
388
|
+
customer_uuid: string;
|
|
389
|
+
task_details: string;
|
|
390
|
+
assignee: string;
|
|
391
|
+
due_date: string;
|
|
392
|
+
completed_at?: string;
|
|
393
|
+
}
|
|
394
|
+
interface UpdateTask {
|
|
395
|
+
task_details?: string;
|
|
396
|
+
assignee?: string;
|
|
397
|
+
due_date?: string;
|
|
398
|
+
completed_at?: string;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
function create(config: Config, data: NewTask): Promise<Task>;
|
|
402
|
+
function retrieve(config: Config, taskUuid: string): Promise<Task>;
|
|
403
|
+
function modify(config: Config, taskUuid: string, data: UpdateTask): Promise<Task>;
|
|
404
|
+
function destroy(config: Config, taskUuid: string): Promise<ResourceDestroyed>;
|
|
405
|
+
function all(config: Config, params?: ListTasksParams): Promise<Entries<Task>>;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export namespace CustomerNote {
|
|
409
|
+
type CustomerNoteType = "note" | "call";
|
|
410
|
+
interface CustomerNote {
|
|
411
|
+
uuid?: string;
|
|
412
|
+
customer_uuid?: string;
|
|
413
|
+
type?: CustomerNoteType;
|
|
414
|
+
text?: string;
|
|
415
|
+
author?: string;
|
|
416
|
+
call_duration?: number;
|
|
417
|
+
created_at?: string;
|
|
418
|
+
updated_at?: string;
|
|
419
|
+
}
|
|
420
|
+
interface ListCustomerNotesParams extends CursorParams {
|
|
421
|
+
customer_uuid?: string;
|
|
422
|
+
type?: CustomerNoteType;
|
|
423
|
+
author_email?: string;
|
|
424
|
+
}
|
|
425
|
+
interface NewCustomerNote {
|
|
426
|
+
customer_uuid: string;
|
|
427
|
+
type: CustomerNoteType;
|
|
428
|
+
author_email?: string;
|
|
429
|
+
text?: string;
|
|
430
|
+
call_duration?: number;
|
|
431
|
+
created_at?: string;
|
|
432
|
+
}
|
|
433
|
+
interface UpdateCustomerNote {
|
|
434
|
+
author_email?: string;
|
|
435
|
+
text?: string;
|
|
436
|
+
call_duration?: number;
|
|
437
|
+
created_at?: string;
|
|
438
|
+
updated_at?: string;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
function create(config: Config, data: NewCustomerNote): Promise<CustomerNote>;
|
|
442
|
+
function retrieve(config: Config, uuid: string): Promise<CustomerNote>;
|
|
443
|
+
function modify(config: Config, uuid: string, data: UpdateCustomerNote): Promise<CustomerNote>;
|
|
444
|
+
function destroy(config: Config, uuid: string): Promise<ResourceDestroyed>;
|
|
445
|
+
function all(config: Config, params?: ListCustomerNotesParams): Promise<Entries<CustomerNote>>;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export namespace Contact {
|
|
449
|
+
interface Contact {
|
|
450
|
+
uuid?: string;
|
|
451
|
+
customer_uuid?: string;
|
|
452
|
+
customer_external_id?: string;
|
|
453
|
+
data_source_uuid?: string;
|
|
454
|
+
position?: number;
|
|
455
|
+
first_name?: string;
|
|
456
|
+
last_name?: string;
|
|
457
|
+
title?: string;
|
|
458
|
+
email?: string;
|
|
459
|
+
phone?: string;
|
|
460
|
+
linked_in?: string;
|
|
461
|
+
twitter?: string;
|
|
462
|
+
notes?: string;
|
|
463
|
+
custom?: Map;
|
|
464
|
+
}
|
|
465
|
+
interface ListContactsParams extends CursorParams {
|
|
466
|
+
customer_uuid?: string;
|
|
467
|
+
data_source_uuid?: string;
|
|
468
|
+
email?: string;
|
|
469
|
+
customer_external_id?: string;
|
|
470
|
+
}
|
|
471
|
+
interface NewContact {
|
|
472
|
+
customer_uuid: string;
|
|
473
|
+
data_source_uuid: string;
|
|
474
|
+
position?: number;
|
|
475
|
+
first_name?: string;
|
|
476
|
+
last_name?: string;
|
|
477
|
+
title?: string;
|
|
478
|
+
email?: string;
|
|
479
|
+
phone?: string;
|
|
480
|
+
linked_in?: string;
|
|
481
|
+
twitter?: string;
|
|
482
|
+
notes?: string;
|
|
483
|
+
custom?: CustomAttribute.NewCustomAttribute[];
|
|
484
|
+
}
|
|
485
|
+
type NewCustomerContact = Omit<NewContact, "customer_uuid">;
|
|
486
|
+
interface UpdateContact {
|
|
487
|
+
position?: number;
|
|
488
|
+
first_name?: string;
|
|
489
|
+
last_name?: string;
|
|
490
|
+
title?: string;
|
|
491
|
+
email?: string;
|
|
492
|
+
phone?: string;
|
|
493
|
+
linked_in?: string;
|
|
494
|
+
twitter?: string;
|
|
495
|
+
notes?: string;
|
|
496
|
+
custom?: CustomAttribute.NewCustomAttribute[];
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
function create(config: Config, data: NewContact): Promise<Contact>;
|
|
500
|
+
function retrieve(config: Config, uuid: string): Promise<Contact>;
|
|
501
|
+
function modify(config: Config, uuid: string, data: UpdateContact): Promise<Contact>;
|
|
502
|
+
function destroy(config: Config, uuid: string): Promise<ResourceDestroyed>;
|
|
503
|
+
function merge(config: Config, intoContactUuid: string, fromContactUuid: string): Promise<Contact>;
|
|
504
|
+
function all(config: Config, params?: ListContactsParams): Promise<Entries<Contact>>;
|
|
165
505
|
}
|
|
166
506
|
|
|
167
507
|
export namespace Plan {
|
|
168
508
|
interface Plan {
|
|
169
|
-
uuid?: string
|
|
170
|
-
data_source_uuid?: string
|
|
171
|
-
external_id?: string
|
|
172
|
-
name?: string
|
|
173
|
-
interval_count?: number
|
|
174
|
-
interval_unit?: string
|
|
509
|
+
uuid?: string;
|
|
510
|
+
data_source_uuid?: string;
|
|
511
|
+
external_id?: string;
|
|
512
|
+
name?: string;
|
|
513
|
+
interval_count?: number;
|
|
514
|
+
interval_unit?: string;
|
|
175
515
|
}
|
|
176
516
|
interface ListPlansParams extends CursorParams {
|
|
177
|
-
data_source_uuid?: string
|
|
178
|
-
system?: string
|
|
179
|
-
external_id?: string
|
|
517
|
+
data_source_uuid?: string;
|
|
518
|
+
system?: string;
|
|
519
|
+
external_id?: string;
|
|
180
520
|
}
|
|
181
521
|
interface Plans extends Cursor {
|
|
182
522
|
plans: Plan[];
|
|
183
523
|
}
|
|
524
|
+
interface NewPlan {
|
|
525
|
+
data_source_uuid: string;
|
|
526
|
+
name: string;
|
|
527
|
+
interval_count: number;
|
|
528
|
+
interval_unit: string;
|
|
529
|
+
external_id?: string;
|
|
530
|
+
}
|
|
531
|
+
interface UpdatePlan {
|
|
532
|
+
name?: string;
|
|
533
|
+
interval_count?: number;
|
|
534
|
+
interval_unit?: string;
|
|
535
|
+
}
|
|
184
536
|
|
|
185
|
-
function create(config: Config, data:
|
|
537
|
+
function create(config: Config, data: NewPlan): Promise<Plan>;
|
|
186
538
|
function retrieve(config: Config, uuid: string): Promise<Plan>;
|
|
187
|
-
function modify(config: Config, uuid: string, data:
|
|
188
|
-
function destroy(config: Config, uuid: string): Promise<
|
|
539
|
+
function modify(config: Config, uuid: string, data: UpdatePlan): Promise<Plan>;
|
|
540
|
+
function destroy(config: Config, uuid: string): Promise<ResourceDestroyed>;
|
|
189
541
|
function all(config: Config, params?: ListPlansParams): Promise<Plans>;
|
|
190
542
|
}
|
|
191
543
|
|
|
544
|
+
export namespace PlanGroup {
|
|
545
|
+
interface PlanGroup {
|
|
546
|
+
uuid?: string;
|
|
547
|
+
name?: string;
|
|
548
|
+
plans_count?: number;
|
|
549
|
+
}
|
|
550
|
+
interface PlanGroups extends Cursor {
|
|
551
|
+
plan_groups: PlanGroup[];
|
|
552
|
+
}
|
|
553
|
+
interface NewPlanGroup {
|
|
554
|
+
name: string;
|
|
555
|
+
plans: string[];
|
|
556
|
+
}
|
|
557
|
+
interface UpdatePlanGroup {
|
|
558
|
+
name?: string;
|
|
559
|
+
plans?: string[];
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
function create(config: Config, data: NewPlanGroup): Promise<PlanGroup>;
|
|
563
|
+
function retrieve(config: Config, uuid: string): Promise<PlanGroup>;
|
|
564
|
+
function modify(config: Config, uuid: string, data: UpdatePlanGroup): Promise<PlanGroup>;
|
|
565
|
+
function destroy(config: Config, uuid: string): Promise<ResourceDestroyed>;
|
|
566
|
+
function all(config: Config, planGroupUuid: string, params?: CursorParams): Promise<Plan.Plans>;
|
|
567
|
+
function all(config: Config, params?: CursorParams): Promise<PlanGroups>;
|
|
568
|
+
}
|
|
569
|
+
|
|
192
570
|
export namespace Invoice {
|
|
193
571
|
interface Invoice {
|
|
194
|
-
uuid?: string
|
|
195
|
-
customer_uuid?: string
|
|
196
|
-
currency?: string
|
|
197
|
-
data_source_uuid?: string
|
|
198
|
-
date?: string
|
|
199
|
-
due_date?: string
|
|
200
|
-
external_id?: string
|
|
201
|
-
line_items?: LineItem[]
|
|
202
|
-
transactions?: Transaction[]
|
|
572
|
+
uuid?: string;
|
|
573
|
+
customer_uuid?: string;
|
|
574
|
+
currency?: string;
|
|
575
|
+
data_source_uuid?: string;
|
|
576
|
+
date?: string;
|
|
577
|
+
due_date?: string;
|
|
578
|
+
external_id?: string;
|
|
579
|
+
line_items?: LineItem[];
|
|
580
|
+
transactions?: Transaction[];
|
|
203
581
|
}
|
|
204
582
|
interface LineItem {
|
|
205
|
-
uuid?: string
|
|
206
|
-
account_code?: string
|
|
207
|
-
amount_in_cents?: number
|
|
208
|
-
cancelled_at?: string
|
|
209
|
-
description?: string
|
|
210
|
-
discount_amount_in_cents?: number
|
|
211
|
-
discount_code?: string
|
|
212
|
-
external_id?: string
|
|
213
|
-
plan_uuid?: string
|
|
214
|
-
prorated?: boolean
|
|
215
|
-
quantity?: number
|
|
216
|
-
service_period_end?: string
|
|
217
|
-
service_period_start?: string
|
|
218
|
-
subscription_external_id?: string
|
|
219
|
-
subscription_uuid?: string
|
|
220
|
-
tax_amount_in_cents?: number
|
|
221
|
-
transaction_fees_in_cents?: number
|
|
222
|
-
type?: string
|
|
583
|
+
uuid?: string;
|
|
584
|
+
account_code?: string;
|
|
585
|
+
amount_in_cents?: number;
|
|
586
|
+
cancelled_at?: string;
|
|
587
|
+
description?: string;
|
|
588
|
+
discount_amount_in_cents?: number;
|
|
589
|
+
discount_code?: string;
|
|
590
|
+
external_id?: string;
|
|
591
|
+
plan_uuid?: string;
|
|
592
|
+
prorated?: boolean;
|
|
593
|
+
quantity?: number;
|
|
594
|
+
service_period_end?: string;
|
|
595
|
+
service_period_start?: string;
|
|
596
|
+
subscription_external_id?: string;
|
|
597
|
+
subscription_uuid?: string;
|
|
598
|
+
tax_amount_in_cents?: number;
|
|
599
|
+
transaction_fees_in_cents?: number;
|
|
600
|
+
type?: string;
|
|
223
601
|
}
|
|
224
602
|
interface Transaction {
|
|
225
|
-
uuid?: string
|
|
226
|
-
date?: string
|
|
227
|
-
external_id?: string
|
|
228
|
-
result?: string
|
|
229
|
-
type?: string
|
|
603
|
+
uuid?: string;
|
|
604
|
+
date?: string;
|
|
605
|
+
external_id?: string;
|
|
606
|
+
result?: string;
|
|
607
|
+
type?: string;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
interface NewLineItemBase {
|
|
611
|
+
amount_in_cents: number;
|
|
612
|
+
quantity?: number;
|
|
613
|
+
discount_amount_in_cents?: number;
|
|
614
|
+
discount_code?: string;
|
|
615
|
+
tax_amount_in_cents?: number;
|
|
616
|
+
transaction_fees_in_cents?: number;
|
|
617
|
+
external_id?: string;
|
|
618
|
+
account_code?: string;
|
|
619
|
+
transaction_fees_currency?: string;
|
|
620
|
+
discount_description?: string;
|
|
621
|
+
event_order?: number;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
interface NewSubscriptionLineItem extends NewLineItemBase {
|
|
625
|
+
type: "subscription";
|
|
626
|
+
subscription_external_id: string;
|
|
627
|
+
subscription_set_external_id?: string;
|
|
628
|
+
plan_uuid: string;
|
|
629
|
+
service_period_start: string;
|
|
630
|
+
service_period_end?: string;
|
|
631
|
+
cancelled_at?: string;
|
|
632
|
+
prorated?: boolean;
|
|
633
|
+
proration_type?: "differential" | "full" | "differential_mrr";
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
interface NewOneTimeLineItem extends NewLineItemBase {
|
|
637
|
+
type: "one_time";
|
|
638
|
+
description?: string;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
interface NewTrialLineItem extends NewLineItemBase {
|
|
642
|
+
type: "trial";
|
|
643
|
+
subscription_external_id: string;
|
|
644
|
+
subscription_set_external_id?: string;
|
|
645
|
+
plan_uuid: string;
|
|
646
|
+
service_period_start: string;
|
|
647
|
+
service_period_end: string;
|
|
648
|
+
cancelled_at?: string;
|
|
649
|
+
prorated?: boolean;
|
|
650
|
+
proration_type?: "differential" | "full" | "differential_mrr";
|
|
230
651
|
}
|
|
652
|
+
|
|
653
|
+
type NewLineItem = NewSubscriptionLineItem | NewOneTimeLineItem | NewTrialLineItem;
|
|
654
|
+
|
|
655
|
+
interface NewTransaction {
|
|
656
|
+
date: string;
|
|
657
|
+
type: "payment" | "refund";
|
|
658
|
+
result: "successful" | "failed";
|
|
659
|
+
amount_in_cents?: number;
|
|
660
|
+
external_id?: string;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
interface NewInvoice {
|
|
664
|
+
external_id: string;
|
|
665
|
+
date: string;
|
|
666
|
+
currency: string;
|
|
667
|
+
line_items: NewLineItem[];
|
|
668
|
+
customer_external_id?: string;
|
|
669
|
+
data_source_uuid?: string;
|
|
670
|
+
transactions?: NewTransaction[];
|
|
671
|
+
due_date?: string;
|
|
672
|
+
collection_method?: "automatic" | "manual";
|
|
673
|
+
}
|
|
674
|
+
|
|
231
675
|
interface ListInvoicesParams extends CursorParams {
|
|
232
|
-
data_source_uuid?: string
|
|
233
|
-
customer_uuid?: string
|
|
234
|
-
external_id?: string
|
|
676
|
+
data_source_uuid?: string;
|
|
677
|
+
customer_uuid?: string;
|
|
678
|
+
external_id?: string;
|
|
679
|
+
}
|
|
680
|
+
interface RetrieveInvoiceParams {
|
|
681
|
+
validation_type?: "valid" | "invalid" | "all";
|
|
682
|
+
include_edit_histories?: boolean;
|
|
683
|
+
with_disabled?: boolean;
|
|
684
|
+
}
|
|
685
|
+
interface UpdateInvoice {
|
|
686
|
+
date?: string;
|
|
687
|
+
due_date?: string;
|
|
688
|
+
currency?: string;
|
|
689
|
+
collection_method?: "automatic" | "manual";
|
|
235
690
|
}
|
|
236
691
|
interface Invoices extends Cursor {
|
|
237
|
-
customer_uuid?: string
|
|
692
|
+
customer_uuid?: string;
|
|
238
693
|
invoices: Invoice[];
|
|
239
694
|
}
|
|
240
695
|
|
|
241
|
-
function create(
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
696
|
+
function create(
|
|
697
|
+
config: Config,
|
|
698
|
+
uuid: string,
|
|
699
|
+
data: {
|
|
700
|
+
invoices: NewInvoice[];
|
|
701
|
+
},
|
|
702
|
+
): Promise<{ invoices: Invoice[] }>;
|
|
703
|
+
function retrieve(config: Config, uuid: string, params?: RetrieveInvoiceParams): Promise<Invoice>;
|
|
704
|
+
function modify(config: Config, uuid: string, data: UpdateInvoice): Promise<Invoice>;
|
|
705
|
+
function destroy(config: Config, uuid: string): Promise<ResourceDestroyed>;
|
|
246
706
|
function all(config: Config, uuid: string, params?: ListInvoicesParams): Promise<Invoices>;
|
|
247
707
|
function all(config: Config, params?: ListInvoicesParams): Promise<Invoices>;
|
|
248
708
|
}
|
|
249
709
|
|
|
250
710
|
export namespace Transaction {
|
|
251
711
|
interface Transaction {
|
|
252
|
-
uuid?: string
|
|
712
|
+
uuid?: string;
|
|
713
|
+
external_id?: string;
|
|
714
|
+
type?: string;
|
|
715
|
+
date?: string;
|
|
716
|
+
result?: string;
|
|
717
|
+
amount_in_cents?: number | null;
|
|
718
|
+
transaction_fees_in_cents?: number | null;
|
|
719
|
+
transaction_fees_currency?: string | null;
|
|
720
|
+
disabled?: boolean;
|
|
721
|
+
disabled_at?: string | null;
|
|
722
|
+
disabled_by?: string | null;
|
|
723
|
+
user_created?: boolean;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
interface NewTransaction {
|
|
727
|
+
type: "payment" | "refund";
|
|
253
728
|
date: string;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
729
|
+
result: "successful" | "failed";
|
|
730
|
+
external_id?: string;
|
|
731
|
+
amount_in_cents?: number;
|
|
732
|
+
transaction_fees_in_cents?: number;
|
|
733
|
+
transaction_fees_currency?: string;
|
|
257
734
|
}
|
|
258
735
|
|
|
259
|
-
function create(config: Config,
|
|
736
|
+
function create(config: Config, invoiceUuid: string, data: NewTransaction): Promise<Transaction>;
|
|
260
737
|
}
|
|
261
738
|
|
|
262
739
|
export namespace Subscription {
|
|
@@ -269,11 +746,11 @@ export namespace Subscription {
|
|
|
269
746
|
data_source_uuid: string;
|
|
270
747
|
}
|
|
271
748
|
interface CancelSubscriptionParams {
|
|
272
|
-
cancelled_at?: string
|
|
273
|
-
cancellation_dates?: Strings
|
|
749
|
+
cancelled_at?: string;
|
|
750
|
+
cancellation_dates?: Strings;
|
|
274
751
|
}
|
|
275
752
|
interface Subscriptions extends Cursor {
|
|
276
|
-
customer_uuid?: string
|
|
753
|
+
customer_uuid?: string;
|
|
277
754
|
subscriptions: Subscription[];
|
|
278
755
|
}
|
|
279
756
|
|
|
@@ -281,6 +758,118 @@ export namespace Subscription {
|
|
|
281
758
|
function cancel(config: Config, uuid: string, data: CancelSubscriptionParams): Promise<Subscription>;
|
|
282
759
|
}
|
|
283
760
|
|
|
761
|
+
export namespace SubscriptionEvent {
|
|
762
|
+
type SubscriptionEventType =
|
|
763
|
+
| "subscription_start"
|
|
764
|
+
| "subscription_start_scheduled"
|
|
765
|
+
| "scheduled_subscription_start_retracted"
|
|
766
|
+
| "subscription_cancelled"
|
|
767
|
+
| "subscription_cancellation_scheduled"
|
|
768
|
+
| "scheduled_subscription_cancellation_retracted"
|
|
769
|
+
| "subscription_updated"
|
|
770
|
+
| "subscription_update_scheduled"
|
|
771
|
+
| "scheduled_subscription_update_retracted"
|
|
772
|
+
| "subscription_event_retracted";
|
|
773
|
+
|
|
774
|
+
interface SubscriptionEvent {
|
|
775
|
+
id?: number;
|
|
776
|
+
data_source_uuid?: string;
|
|
777
|
+
customer_external_id?: string;
|
|
778
|
+
subscription_set_external_id?: string | null;
|
|
779
|
+
subscription_external_id?: string;
|
|
780
|
+
plan_external_id?: string;
|
|
781
|
+
event_date?: string;
|
|
782
|
+
effective_date?: string;
|
|
783
|
+
event_type?: SubscriptionEventType;
|
|
784
|
+
external_id?: string;
|
|
785
|
+
errors?: Record<string, any>;
|
|
786
|
+
created_at?: string;
|
|
787
|
+
updated_at?: string;
|
|
788
|
+
quantity?: number;
|
|
789
|
+
currency?: string;
|
|
790
|
+
amount_in_cents?: number | string;
|
|
791
|
+
tax_amount_in_cents?: number;
|
|
792
|
+
event_order?: number | null;
|
|
793
|
+
retracted_event_id?: string | null;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
interface NewSubscriptionEvent {
|
|
797
|
+
data_source_uuid: string;
|
|
798
|
+
customer_external_id: string;
|
|
799
|
+
event_type: SubscriptionEventType;
|
|
800
|
+
event_date: string;
|
|
801
|
+
effective_date: string;
|
|
802
|
+
subscription_external_id: string;
|
|
803
|
+
plan_external_id?: string;
|
|
804
|
+
currency?: string;
|
|
805
|
+
amount_in_cents?: number;
|
|
806
|
+
quantity?: number;
|
|
807
|
+
subscription_set_external_id?: string;
|
|
808
|
+
tax_amount_in_cents?: number;
|
|
809
|
+
retracted_event_id?: string;
|
|
810
|
+
external_id?: string;
|
|
811
|
+
event_order?: number;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
interface ListSubscriptionEventsParams extends CursorParams {
|
|
815
|
+
external_id?: string;
|
|
816
|
+
customer_external_id?: string;
|
|
817
|
+
data_source_uuid?: string;
|
|
818
|
+
subscription_external_id?: string;
|
|
819
|
+
event_type?: SubscriptionEventType;
|
|
820
|
+
event_date?: string;
|
|
821
|
+
effective_date?: string;
|
|
822
|
+
plan_external_id?: string;
|
|
823
|
+
include_edit_histories?: boolean;
|
|
824
|
+
with_disabled?: boolean;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
interface SubscriptionEvents extends Cursor {
|
|
828
|
+
subscription_events: SubscriptionEvent[];
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
interface UpdateSubscriptionEvent {
|
|
832
|
+
external_id?: string;
|
|
833
|
+
data_source_uuid?: string;
|
|
834
|
+
id?: number;
|
|
835
|
+
customer_external_id?: string;
|
|
836
|
+
event_type?: SubscriptionEventType;
|
|
837
|
+
event_date?: string;
|
|
838
|
+
effective_date?: string;
|
|
839
|
+
subscription_external_id?: string;
|
|
840
|
+
plan_external_id?: string;
|
|
841
|
+
currency?: string;
|
|
842
|
+
amount_in_cents?: number;
|
|
843
|
+
quantity?: number;
|
|
844
|
+
subscription_set_external_id?: string;
|
|
845
|
+
tax_amount_in_cents?: number;
|
|
846
|
+
retracted_event_id?: string;
|
|
847
|
+
event_order?: number;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
interface DestroySubscriptionEvent {
|
|
851
|
+
external_id?: string;
|
|
852
|
+
data_source_uuid?: string;
|
|
853
|
+
id?: number;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
function create(config: Config, data: { subscription_event: NewSubscriptionEvent }): Promise<SubscriptionEvent>;
|
|
857
|
+
function all(config: Config, params?: ListSubscriptionEventsParams): Promise<SubscriptionEvents>;
|
|
858
|
+
function modify(config: Config, data: { subscription_event: UpdateSubscriptionEvent }): Promise<SubscriptionEvent>;
|
|
859
|
+
function updateWithParams(
|
|
860
|
+
config: Config,
|
|
861
|
+
data: { subscription_event: UpdateSubscriptionEvent },
|
|
862
|
+
): Promise<SubscriptionEvent>;
|
|
863
|
+
function destroy(
|
|
864
|
+
config: Config,
|
|
865
|
+
data: { subscription_event: DestroySubscriptionEvent },
|
|
866
|
+
): Promise<ResourceDestroyed>;
|
|
867
|
+
function deleteWithParams(
|
|
868
|
+
config: Config,
|
|
869
|
+
data: { subscription_event: DestroySubscriptionEvent },
|
|
870
|
+
): Promise<ResourceDestroyed>;
|
|
871
|
+
}
|
|
872
|
+
|
|
284
873
|
export namespace Tag {
|
|
285
874
|
interface Tags {
|
|
286
875
|
tags: Strings;
|
|
@@ -295,17 +884,22 @@ export namespace Tag {
|
|
|
295
884
|
}
|
|
296
885
|
|
|
297
886
|
export namespace CustomAttribute {
|
|
298
|
-
|
|
887
|
+
interface NewCustomAttribute {
|
|
888
|
+
type?: string;
|
|
889
|
+
key: string;
|
|
890
|
+
value: any;
|
|
891
|
+
source?: string;
|
|
892
|
+
}
|
|
299
893
|
|
|
300
894
|
interface CustomAttributes {
|
|
301
895
|
custom: Map;
|
|
302
896
|
}
|
|
303
897
|
function add(config: Config, uuid: string, data: {
|
|
304
898
|
email: string;
|
|
305
|
-
custom:
|
|
899
|
+
custom: NewCustomAttribute[];
|
|
306
900
|
}): Promise<Entries<Customer.Customer>>;
|
|
307
901
|
function add(config: Config, uuid: string, data: {
|
|
308
|
-
custom:
|
|
902
|
+
custom: NewCustomAttribute[];
|
|
309
903
|
}): Promise<CustomAttributes>;
|
|
310
904
|
function update(config: Config, uuid: string, data: CustomAttributes): Promise<CustomAttributes>;
|
|
311
905
|
function remove(config: Config, uuid: string, data: {
|
|
@@ -315,25 +909,60 @@ export namespace CustomAttribute {
|
|
|
315
909
|
|
|
316
910
|
export namespace Metrics {
|
|
317
911
|
interface Params extends ParamsNoInterval {
|
|
318
|
-
interval?: string
|
|
912
|
+
interval?: string;
|
|
319
913
|
}
|
|
320
914
|
interface ParamsNoInterval {
|
|
321
915
|
["start-date"]: string;
|
|
322
916
|
["end-date"]: string;
|
|
323
|
-
geo?: string
|
|
324
|
-
plans?: string
|
|
917
|
+
geo?: string;
|
|
918
|
+
plans?: string;
|
|
919
|
+
filters?: string;
|
|
325
920
|
}
|
|
326
921
|
interface All {
|
|
327
922
|
entries: {
|
|
328
923
|
date: string;
|
|
924
|
+
mrr: number;
|
|
925
|
+
["mrr-percentage-change"]: number;
|
|
926
|
+
arr: number;
|
|
927
|
+
["arr-percentage-change"]: number;
|
|
329
928
|
["customer-churn-rate"]: number;
|
|
929
|
+
["customer-churn-rate-percentage-change"]: number;
|
|
330
930
|
["mrr-churn-rate"]: number;
|
|
931
|
+
["mrr-churn-rate-percentage-change"]: number;
|
|
331
932
|
ltv: number;
|
|
933
|
+
["ltv-percentage-change"]: number;
|
|
332
934
|
customers: number;
|
|
935
|
+
["customers-percentage-change"]: number;
|
|
333
936
|
asp: number;
|
|
937
|
+
["asp-percentage-change"]: number;
|
|
334
938
|
arpa: number;
|
|
335
|
-
|
|
336
|
-
|
|
939
|
+
["arpa-percentage-change"]: number;
|
|
940
|
+
};
|
|
941
|
+
summary: {
|
|
942
|
+
["current-mrr"]: number;
|
|
943
|
+
["previous-mrr"]: number;
|
|
944
|
+
["mrr-percentage-change"]: number;
|
|
945
|
+
["current-arr"]: number;
|
|
946
|
+
["previous-arr"]: number;
|
|
947
|
+
["arr-percentage-change"]: number;
|
|
948
|
+
["current-customer-churn-rate"]: number;
|
|
949
|
+
["previous-customer-churn-rate"]: number;
|
|
950
|
+
["customer-churn-rate-percentage-change"]: number;
|
|
951
|
+
["current-mrr-churn-rate"]: number;
|
|
952
|
+
["previous-mrr-churn-rate"]: number;
|
|
953
|
+
["mrr-churn-rate-percentage-change"]: number;
|
|
954
|
+
["current-ltv"]: number;
|
|
955
|
+
["previous-ltv"]: number;
|
|
956
|
+
["ltv-percentage-change"]: number;
|
|
957
|
+
["current-customers"]: number;
|
|
958
|
+
["previous-customers"]: number;
|
|
959
|
+
["customers-percentage-change"]: number;
|
|
960
|
+
["current-asp"]: number;
|
|
961
|
+
["previous-asp"]: number;
|
|
962
|
+
["asp-percentage-change"]: number;
|
|
963
|
+
["current-arpa"]: number;
|
|
964
|
+
["previous-arpa"]: number;
|
|
965
|
+
["arpa-percentage-change"]: number;
|
|
337
966
|
};
|
|
338
967
|
}
|
|
339
968
|
|
|
@@ -391,6 +1020,7 @@ export namespace Metrics {
|
|
|
391
1020
|
external_id: string;
|
|
392
1021
|
plan: string;
|
|
393
1022
|
quantity: number;
|
|
1023
|
+
uuid: string;
|
|
394
1024
|
mrr: number;
|
|
395
1025
|
arr: number;
|
|
396
1026
|
status: string;
|
|
@@ -419,6 +1049,86 @@ export namespace Metrics {
|
|
|
419
1049
|
params?: CursorParams,
|
|
420
1050
|
): Promise<Entries<MetricsSubscription>>;
|
|
421
1051
|
function activities(config: Config, uuid: string, params?: CursorParams): Promise<Entries<MetricsActivity>>;
|
|
1052
|
+
function connectSubscriptions(
|
|
1053
|
+
config: Config,
|
|
1054
|
+
dataSourceUuid: string,
|
|
1055
|
+
customerUuid: string,
|
|
1056
|
+
data: Array<{ uuid: string }>,
|
|
1057
|
+
): Promise<{}>;
|
|
1058
|
+
function disconnectSubscriptions(
|
|
1059
|
+
config: Config,
|
|
1060
|
+
dataSourceUuid: string,
|
|
1061
|
+
customerUuid: string,
|
|
1062
|
+
data: Array<{ uuid: string }>,
|
|
1063
|
+
): Promise<{}>;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
namespace Activity {
|
|
1067
|
+
type ActivityType = "new_biz" | "reactivation" | "expansion" | "contraction" | "churn";
|
|
1068
|
+
|
|
1069
|
+
interface Activity {
|
|
1070
|
+
description?: string;
|
|
1071
|
+
["activity-mrr-movement"]?: number;
|
|
1072
|
+
["activity-mrr"]?: number;
|
|
1073
|
+
["activity-arr"]?: number;
|
|
1074
|
+
date?: string;
|
|
1075
|
+
type?: ActivityType;
|
|
1076
|
+
currency?: string;
|
|
1077
|
+
["subscription-external-id"]?: string;
|
|
1078
|
+
["plan-external-id"]?: string;
|
|
1079
|
+
subscription_set_external_id?: string | null;
|
|
1080
|
+
["customer-name"]?: string;
|
|
1081
|
+
["customer-uuid"]?: string;
|
|
1082
|
+
["customer-external-id"]?: string;
|
|
1083
|
+
["billing-connector-uuid"]?: string;
|
|
1084
|
+
uuid?: string;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
interface ListActivitiesParams {
|
|
1088
|
+
cursor?: string;
|
|
1089
|
+
["per-page"]?: number;
|
|
1090
|
+
["start-date"]?: string;
|
|
1091
|
+
["end-date"]?: string;
|
|
1092
|
+
type?: ActivityType;
|
|
1093
|
+
order?: "date" | "-date";
|
|
1094
|
+
["start-after"]?: string;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
interface Activities extends Cursor {
|
|
1098
|
+
entries: Activity[];
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
function all(config: Config, params?: ListActivitiesParams): Promise<Activities>;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
namespace ActivitiesExport {
|
|
1105
|
+
type ActivityType = "new_biz" | "reactivation" | "expansion" | "contraction" | "churn";
|
|
1106
|
+
type ExportStatus = "pending" | "processing" | "failed" | "successful";
|
|
1107
|
+
|
|
1108
|
+
interface ActivitiesExport {
|
|
1109
|
+
id?: string;
|
|
1110
|
+
status?: ExportStatus;
|
|
1111
|
+
file_url?: string | null;
|
|
1112
|
+
params?: {
|
|
1113
|
+
kind?: string;
|
|
1114
|
+
params?: {
|
|
1115
|
+
activity_type?: ActivityType;
|
|
1116
|
+
start_date?: string;
|
|
1117
|
+
end_date?: string;
|
|
1118
|
+
};
|
|
1119
|
+
};
|
|
1120
|
+
expires_at?: string | null;
|
|
1121
|
+
created_at?: string;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
interface NewActivitiesExport {
|
|
1125
|
+
["start-date"]?: string;
|
|
1126
|
+
["end-date"]?: string;
|
|
1127
|
+
type?: ActivityType;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
function create(config: Config, data?: NewActivitiesExport): Promise<ActivitiesExport>;
|
|
1131
|
+
function retrieve(config: Config, id: string): Promise<ActivitiesExport>;
|
|
422
1132
|
}
|
|
423
1133
|
}
|
|
424
1134
|
|
chartmogul-node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/chartmogul-node",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"description": "TypeScript definitions for chartmogul-node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chartmogul-node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
"scripts": {},
|
|
22
22
|
"dependencies": {},
|
|
23
23
|
"peerDependencies": {},
|
|
24
|
-
"typesPublisherContentHash": "
|
|
24
|
+
"typesPublisherContentHash": "942d74ef377b48c68e689711ba8e125de4eb25685de4215d61340d752d03d7df",
|
|
25
25
|
"typeScriptVersion": "5.2"
|
|
26
26
|
}
|