@types/chartmogul-node 1.0.0 → 2.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.
- chartmogul-node/LICENSE +1 -1
- chartmogul-node/README.md +4 -4
- chartmogul-node/common.d.ts +11 -11
- chartmogul-node/index.d.ts +124 -125
- chartmogul-node/package.json +7 -4
chartmogul-node/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
chartmogul-node/README.md
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
This package contains type definitions for chartmogul-node (https://github.com/chartmogul/chartmogul-node).
|
|
6
6
|
|
|
7
7
|
# Details
|
|
8
|
-
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chartmogul-node
|
|
8
|
+
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chartmogul-node.
|
|
9
9
|
|
|
10
|
-
Additional Details
|
|
11
|
-
* Last updated:
|
|
10
|
+
### Additional Details
|
|
11
|
+
* Last updated: Thu, 17 Mar 2022 09:01:42 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: none
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
|
-
These definitions were written by ChartMogul
|
|
16
|
+
These definitions were written by [ChartMogul](https://github.com/chartmogul).
|
chartmogul-node/common.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export interface Map {
|
|
2
|
-
[key: string]: any
|
|
2
|
+
[key: string]: any;
|
|
3
3
|
}
|
|
4
4
|
export interface CursorParams {
|
|
5
|
-
page?: number;
|
|
6
|
-
per_page?: number;
|
|
5
|
+
page?: number | undefined;
|
|
6
|
+
per_page?: number | undefined;
|
|
7
7
|
}
|
|
8
8
|
export type Strings = string[];
|
|
9
9
|
|
|
10
10
|
export interface Cursor {
|
|
11
|
-
page?: number;
|
|
12
|
-
per_page?: number;
|
|
13
|
-
has_more?: boolean;
|
|
14
|
-
current_page?: number;
|
|
15
|
-
total_pages?: number;
|
|
11
|
+
page?: number | undefined;
|
|
12
|
+
per_page?: number | undefined;
|
|
13
|
+
has_more?: boolean | undefined;
|
|
14
|
+
current_page?: number | undefined;
|
|
15
|
+
total_pages?: number | undefined;
|
|
16
16
|
}
|
|
17
17
|
export interface Entries<T> extends Cursor {
|
|
18
|
-
entries: T[]
|
|
18
|
+
entries: T[];
|
|
19
19
|
}
|
|
20
|
-
interface Summary {
|
|
20
|
+
export interface Summary {
|
|
21
21
|
current: number;
|
|
22
22
|
previous: number;
|
|
23
23
|
['percentage-change']: number;
|
|
@@ -25,4 +25,4 @@ interface Summary {
|
|
|
25
25
|
export interface EntriesSummary<T> {
|
|
26
26
|
entries: T[];
|
|
27
27
|
summary: Summary;
|
|
28
|
-
}
|
|
28
|
+
}
|
chartmogul-node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for chartmogul-node
|
|
1
|
+
// Type definitions for chartmogul-node 2.0
|
|
2
2
|
// Project: https://github.com/chartmogul/chartmogul-node
|
|
3
3
|
// Definitions by: ChartMogul <https://github.com/chartmogul>
|
|
4
4
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
@@ -10,9 +10,8 @@ export class Config {
|
|
|
10
10
|
API_BASE: string;
|
|
11
11
|
retries: number;
|
|
12
12
|
|
|
13
|
-
constructor(token: string,
|
|
13
|
+
constructor(token: string, base?: string);
|
|
14
14
|
getAccountToken(): string;
|
|
15
|
-
getSecretKey(): string;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export namespace Ping {
|
|
@@ -21,18 +20,18 @@ export namespace Ping {
|
|
|
21
20
|
|
|
22
21
|
export namespace DataSource {
|
|
23
22
|
interface DataSource {
|
|
24
|
-
uuid?: string;
|
|
23
|
+
uuid?: string | undefined;
|
|
25
24
|
name: string;
|
|
26
|
-
created_at?: string;
|
|
27
|
-
status?: string;
|
|
28
|
-
system?: string;
|
|
25
|
+
created_at?: string | undefined;
|
|
26
|
+
status?: string | undefined;
|
|
27
|
+
system?: string | undefined;
|
|
29
28
|
}
|
|
30
29
|
interface DataSources {
|
|
31
30
|
data_sources: DataSource[];
|
|
32
31
|
}
|
|
33
32
|
interface ListDataSourcesParams {
|
|
34
|
-
name?: string;
|
|
35
|
-
system?: string;
|
|
33
|
+
name?: string | undefined;
|
|
34
|
+
system?: string | undefined;
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
function create(config: Config, data: DataSource): Promise<DataSource>;
|
|
@@ -43,92 +42,92 @@ export namespace DataSource {
|
|
|
43
42
|
|
|
44
43
|
export namespace Customer {
|
|
45
44
|
interface Customer {
|
|
46
|
-
id?: number;
|
|
47
|
-
data_source_uuid?: string;
|
|
48
|
-
data_source_uuids?: Strings;
|
|
49
|
-
uuid?: string;
|
|
50
|
-
external_id?: string;
|
|
51
|
-
external_ids?: Strings;
|
|
52
|
-
name?: string;
|
|
53
|
-
email?: string;
|
|
54
|
-
status?: string;
|
|
55
|
-
['customer-since']?: string;
|
|
56
|
-
attributes?: Attributes;
|
|
45
|
+
id?: number | undefined;
|
|
46
|
+
data_source_uuid?: string | undefined;
|
|
47
|
+
data_source_uuids?: Strings | undefined;
|
|
48
|
+
uuid?: string | undefined;
|
|
49
|
+
external_id?: string | undefined;
|
|
50
|
+
external_ids?: Strings | undefined;
|
|
51
|
+
name?: string | undefined;
|
|
52
|
+
email?: string | undefined;
|
|
53
|
+
status?: string | undefined;
|
|
54
|
+
['customer-since']?: string | undefined;
|
|
55
|
+
attributes?: Attributes | undefined;
|
|
57
56
|
address?: {
|
|
58
|
-
address_zip?: string;
|
|
59
|
-
city?: string;
|
|
60
|
-
state?: string;
|
|
61
|
-
country?: string;
|
|
62
|
-
};
|
|
63
|
-
mrr?: number;
|
|
64
|
-
arr?: number;
|
|
65
|
-
['billing-system-url']?: string;
|
|
66
|
-
['chartmogul-url']?: string;
|
|
67
|
-
['billing-system-type']?: string;
|
|
68
|
-
currency?: string;
|
|
69
|
-
['currency-sign']?: string;
|
|
70
|
-
company?: string;
|
|
71
|
-
country?: string;
|
|
72
|
-
state?: string;
|
|
73
|
-
city?: string;
|
|
74
|
-
zip?: string;
|
|
75
|
-
lead_created_at?: string;
|
|
76
|
-
free_trial_started_at?: string;
|
|
57
|
+
address_zip?: string | undefined;
|
|
58
|
+
city?: string | undefined;
|
|
59
|
+
state?: string | undefined;
|
|
60
|
+
country?: string | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
mrr?: number | undefined;
|
|
63
|
+
arr?: number | undefined;
|
|
64
|
+
['billing-system-url']?: string | undefined;
|
|
65
|
+
['chartmogul-url']?: string | undefined;
|
|
66
|
+
['billing-system-type']?: string | undefined;
|
|
67
|
+
currency?: string | undefined;
|
|
68
|
+
['currency-sign']?: string | undefined;
|
|
69
|
+
company?: string | undefined;
|
|
70
|
+
country?: string | undefined;
|
|
71
|
+
state?: string | undefined;
|
|
72
|
+
city?: string | undefined;
|
|
73
|
+
zip?: string | undefined;
|
|
74
|
+
lead_created_at?: string | undefined;
|
|
75
|
+
free_trial_started_at?: string | undefined;
|
|
77
76
|
}
|
|
78
77
|
interface NewCustomer {
|
|
79
78
|
data_source_uuid: string;
|
|
80
79
|
external_id: string;
|
|
81
80
|
name: string;
|
|
82
|
-
email?: string;
|
|
83
|
-
company?: string;
|
|
84
|
-
country?: string;
|
|
85
|
-
state?: string;
|
|
86
|
-
city?: string;
|
|
87
|
-
zip?: string;
|
|
88
|
-
lead_created_at?: string;
|
|
89
|
-
free_trial_started_at?: string;
|
|
90
|
-
attributes?: NewAttributes;
|
|
81
|
+
email?: string | undefined;
|
|
82
|
+
company?: string | undefined;
|
|
83
|
+
country?: string | undefined;
|
|
84
|
+
state?: string | undefined;
|
|
85
|
+
city?: string | undefined;
|
|
86
|
+
zip?: string | undefined;
|
|
87
|
+
lead_created_at?: string | undefined;
|
|
88
|
+
free_trial_started_at?: string | undefined;
|
|
89
|
+
attributes?: NewAttributes | undefined;
|
|
91
90
|
}
|
|
92
91
|
interface UpdateCustomer {
|
|
93
|
-
name?: string;
|
|
94
|
-
email?: string;
|
|
95
|
-
company?: string;
|
|
96
|
-
country?: string;
|
|
97
|
-
state?: string;
|
|
98
|
-
city?: string;
|
|
99
|
-
zip?: string;
|
|
100
|
-
lead_created_at?: string;
|
|
101
|
-
free_trial_started_at?: string;
|
|
102
|
-
attributes?: NewAttributes;
|
|
92
|
+
name?: string | undefined;
|
|
93
|
+
email?: string | undefined;
|
|
94
|
+
company?: string | undefined;
|
|
95
|
+
country?: string | undefined;
|
|
96
|
+
state?: string | undefined;
|
|
97
|
+
city?: string | undefined;
|
|
98
|
+
zip?: string | undefined;
|
|
99
|
+
lead_created_at?: string | undefined;
|
|
100
|
+
free_trial_started_at?: string | undefined;
|
|
101
|
+
attributes?: NewAttributes | undefined;
|
|
103
102
|
}
|
|
104
103
|
interface NewAttributes {
|
|
105
|
-
tags?: Strings;
|
|
106
|
-
custom?: NewCustomAttributes[];
|
|
104
|
+
tags?: Strings | undefined;
|
|
105
|
+
custom?: NewCustomAttributes[] | undefined;
|
|
107
106
|
}
|
|
108
107
|
interface NewCustomAttributes {
|
|
109
|
-
type?: string;
|
|
108
|
+
type?: string | undefined;
|
|
110
109
|
key: string;
|
|
111
110
|
value: any;
|
|
112
|
-
source?: string;
|
|
111
|
+
source?: string | undefined;
|
|
113
112
|
}
|
|
114
113
|
interface Attributes {
|
|
115
|
-
tags?: Strings;
|
|
116
|
-
stripe?: Map;
|
|
117
|
-
clearbit?: Map;
|
|
118
|
-
custom?: Map;
|
|
114
|
+
tags?: Strings | undefined;
|
|
115
|
+
stripe?: Map | undefined;
|
|
116
|
+
clearbit?: Map | undefined;
|
|
117
|
+
custom?: Map | undefined;
|
|
119
118
|
}
|
|
120
119
|
interface ListCustomersParams extends CursorParams {
|
|
121
|
-
data_source_uuid?: string;
|
|
122
|
-
status?: string;
|
|
123
|
-
system?: string;
|
|
124
|
-
external_id?: string;
|
|
120
|
+
data_source_uuid?: string | undefined;
|
|
121
|
+
status?: string | undefined;
|
|
122
|
+
system?: string | undefined;
|
|
123
|
+
external_id?: string | undefined;
|
|
125
124
|
}
|
|
126
125
|
interface SearchCustomersParams extends CursorParams {
|
|
127
126
|
email: string;
|
|
128
127
|
}
|
|
129
128
|
interface MergeID {
|
|
130
|
-
customer_uuid?: string;
|
|
131
|
-
external_id?: string;
|
|
129
|
+
customer_uuid?: string | undefined;
|
|
130
|
+
external_id?: string | undefined;
|
|
132
131
|
}
|
|
133
132
|
interface MergeCustomersParams {
|
|
134
133
|
from: MergeID;
|
|
@@ -147,17 +146,17 @@ export namespace Customer {
|
|
|
147
146
|
|
|
148
147
|
export namespace Plan {
|
|
149
148
|
interface Plan {
|
|
150
|
-
uuid?: string;
|
|
151
|
-
data_source_uuid?: string;
|
|
152
|
-
external_id?: string;
|
|
153
|
-
name?: string;
|
|
154
|
-
interval_count?: number;
|
|
155
|
-
interval_unit?: string;
|
|
149
|
+
uuid?: string | undefined;
|
|
150
|
+
data_source_uuid?: string | undefined;
|
|
151
|
+
external_id?: string | undefined;
|
|
152
|
+
name?: string | undefined;
|
|
153
|
+
interval_count?: number | undefined;
|
|
154
|
+
interval_unit?: string | undefined;
|
|
156
155
|
}
|
|
157
156
|
interface ListPlansParams extends CursorParams {
|
|
158
|
-
data_source_uuid?: string;
|
|
159
|
-
system?: string;
|
|
160
|
-
external_id?: string;
|
|
157
|
+
data_source_uuid?: string | undefined;
|
|
158
|
+
system?: string | undefined;
|
|
159
|
+
external_id?: string | undefined;
|
|
161
160
|
}
|
|
162
161
|
interface Plans extends Cursor {
|
|
163
162
|
plans: Plan[];
|
|
@@ -172,50 +171,50 @@ export namespace Plan {
|
|
|
172
171
|
|
|
173
172
|
export namespace Invoice {
|
|
174
173
|
interface Invoice {
|
|
175
|
-
uuid?: string;
|
|
176
|
-
customer_uuid?: string;
|
|
177
|
-
currency?: string;
|
|
178
|
-
data_source_uuid?: string;
|
|
179
|
-
date?: string;
|
|
180
|
-
due_date?: string;
|
|
181
|
-
external_id?: string;
|
|
182
|
-
line_items?: LineItem[];
|
|
183
|
-
transactions?: Transaction[];
|
|
174
|
+
uuid?: string | undefined;
|
|
175
|
+
customer_uuid?: string | undefined;
|
|
176
|
+
currency?: string | undefined;
|
|
177
|
+
data_source_uuid?: string | undefined;
|
|
178
|
+
date?: string | undefined;
|
|
179
|
+
due_date?: string | undefined;
|
|
180
|
+
external_id?: string | undefined;
|
|
181
|
+
line_items?: LineItem[] | undefined;
|
|
182
|
+
transactions?: Transaction[] | undefined;
|
|
184
183
|
}
|
|
185
184
|
interface LineItem {
|
|
186
|
-
uuid?: string;
|
|
187
|
-
account_code?: string;
|
|
188
|
-
amount_in_cents?: number;
|
|
189
|
-
cancelled_at?: string;
|
|
190
|
-
description?: string;
|
|
191
|
-
discount_amount_in_cents?: number;
|
|
192
|
-
discount_code?: string;
|
|
193
|
-
external_id?: string;
|
|
194
|
-
plan_uuid?: string;
|
|
195
|
-
prorated?: boolean;
|
|
196
|
-
quantity?: number;
|
|
197
|
-
service_period_end?: string;
|
|
198
|
-
service_period_start?: string;
|
|
199
|
-
subscription_external_id?: string;
|
|
200
|
-
subscription_uuid?: string;
|
|
201
|
-
tax_amount_in_cents?: number;
|
|
202
|
-
transaction_fees_in_cents?: number;
|
|
203
|
-
type?: string;
|
|
185
|
+
uuid?: string | undefined;
|
|
186
|
+
account_code?: string | undefined;
|
|
187
|
+
amount_in_cents?: number | undefined;
|
|
188
|
+
cancelled_at?: string | undefined;
|
|
189
|
+
description?: string | undefined;
|
|
190
|
+
discount_amount_in_cents?: number | undefined;
|
|
191
|
+
discount_code?: string | undefined;
|
|
192
|
+
external_id?: string | undefined;
|
|
193
|
+
plan_uuid?: string | undefined;
|
|
194
|
+
prorated?: boolean | undefined;
|
|
195
|
+
quantity?: number | undefined;
|
|
196
|
+
service_period_end?: string | undefined;
|
|
197
|
+
service_period_start?: string | undefined;
|
|
198
|
+
subscription_external_id?: string | undefined;
|
|
199
|
+
subscription_uuid?: string | undefined;
|
|
200
|
+
tax_amount_in_cents?: number | undefined;
|
|
201
|
+
transaction_fees_in_cents?: number | undefined;
|
|
202
|
+
type?: string | undefined;
|
|
204
203
|
}
|
|
205
204
|
interface Transaction {
|
|
206
|
-
uuid?: string;
|
|
207
|
-
date?: string;
|
|
208
|
-
external_id?: string;
|
|
209
|
-
result?: string;
|
|
210
|
-
type?: string;
|
|
205
|
+
uuid?: string | undefined;
|
|
206
|
+
date?: string | undefined;
|
|
207
|
+
external_id?: string | undefined;
|
|
208
|
+
result?: string | undefined;
|
|
209
|
+
type?: string | undefined;
|
|
211
210
|
}
|
|
212
211
|
interface ListInvoicesParams extends CursorParams {
|
|
213
|
-
data_source_uuid?: string;
|
|
214
|
-
customer_uuid?: string;
|
|
215
|
-
external_id?: string;
|
|
212
|
+
data_source_uuid?: string | undefined;
|
|
213
|
+
customer_uuid?: string | undefined;
|
|
214
|
+
external_id?: string | undefined;
|
|
216
215
|
}
|
|
217
216
|
interface Invoices extends Cursor {
|
|
218
|
-
customer_uuid?: string;
|
|
217
|
+
customer_uuid?: string | undefined;
|
|
219
218
|
invoices: Invoice[];
|
|
220
219
|
}
|
|
221
220
|
|
|
@@ -230,9 +229,9 @@ export namespace Invoice {
|
|
|
230
229
|
|
|
231
230
|
export namespace Transaction {
|
|
232
231
|
interface Transaction {
|
|
233
|
-
uuid?: string;
|
|
232
|
+
uuid?: string | undefined;
|
|
234
233
|
date: string;
|
|
235
|
-
external_id?: string;
|
|
234
|
+
external_id?: string | undefined;
|
|
236
235
|
result: string;
|
|
237
236
|
type: string;
|
|
238
237
|
}
|
|
@@ -250,11 +249,11 @@ export namespace Subscription {
|
|
|
250
249
|
data_source_uuid: string;
|
|
251
250
|
}
|
|
252
251
|
interface CancelSubscriptionParams {
|
|
253
|
-
cancelled_at?: string;
|
|
254
|
-
cancellation_dates?: Strings;
|
|
252
|
+
cancelled_at?: string | undefined;
|
|
253
|
+
cancellation_dates?: Strings | undefined;
|
|
255
254
|
}
|
|
256
255
|
interface Subscriptions extends Cursor {
|
|
257
|
-
customer_uuid?: string;
|
|
256
|
+
customer_uuid?: string | undefined;
|
|
258
257
|
subscriptions: Subscription[];
|
|
259
258
|
}
|
|
260
259
|
|
|
@@ -296,13 +295,13 @@ export namespace CustomAttribute {
|
|
|
296
295
|
|
|
297
296
|
export namespace Metrics {
|
|
298
297
|
interface Params extends ParamsNoInterval {
|
|
299
|
-
interval?: string;
|
|
298
|
+
interval?: string | undefined;
|
|
300
299
|
}
|
|
301
300
|
interface ParamsNoInterval {
|
|
302
301
|
['start-date']: string;
|
|
303
302
|
['end-date']: string;
|
|
304
|
-
geo?: string;
|
|
305
|
-
plans?: string;
|
|
303
|
+
geo?: string | undefined;
|
|
304
|
+
plans?: string | undefined;
|
|
306
305
|
}
|
|
307
306
|
interface All {
|
|
308
307
|
entries: {
|
chartmogul-node/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/chartmogul-node",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "TypeScript definitions for chartmogul-node",
|
|
5
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chartmogul-node",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"contributors": [
|
|
7
8
|
{
|
|
@@ -11,12 +12,14 @@
|
|
|
11
12
|
}
|
|
12
13
|
],
|
|
13
14
|
"main": "",
|
|
15
|
+
"types": "index.d.ts",
|
|
14
16
|
"repository": {
|
|
15
17
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
|
|
18
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
19
|
+
"directory": "types/chartmogul-node"
|
|
17
20
|
},
|
|
18
21
|
"scripts": {},
|
|
19
22
|
"dependencies": {},
|
|
20
|
-
"typesPublisherContentHash": "
|
|
21
|
-
"typeScriptVersion": "
|
|
23
|
+
"typesPublisherContentHash": "18b0191a40c5165c6e78f01a4bfd35057fbfee28118aadab8e2a3b109c3d4612",
|
|
24
|
+
"typeScriptVersion": "3.9"
|
|
22
25
|
}
|