@pushwoosh/rpc-gateway-payment-data 0.2.135

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.
@@ -0,0 +1,5 @@
1
+ export type Money = {
2
+ currencyCode: string;
3
+ units: number;
4
+ nanos: number;
5
+ };
package/google_type.js ADDED
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};
package/index.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import { PaymentProcessorServicePrivate as pushwoosh_accounts_payment_processor_PaymentProcessorServicePrivate } from './pushwoosh_accounts_payment_processor';
2
+ import { PaymentProcessorService as pushwoosh_accounts_payment_processor_PaymentProcessorService } from './pushwoosh_accounts_payment_processor';
3
+ export type API = {
4
+ paymentProcessorServicePrivate: pushwoosh_accounts_payment_processor_PaymentProcessorServicePrivate;
5
+ paymentProcessor: pushwoosh_accounts_payment_processor_PaymentProcessorService;
6
+ };
7
+ export { data } from './data';
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export { data } from './data';
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@pushwoosh/rpc-gateway-payment-data",
3
+ "version": "0.2.135",
4
+ "description": "Payment processor api gateway HTTP API Types and Data",
5
+ "main": "index.js",
6
+ "module": "index.js",
7
+ "types": "index.d.js",
8
+ "sideEffects": false,
9
+ "keywords": [
10
+ "RPC",
11
+ "Pushwoosh",
12
+ "API"
13
+ ],
14
+ "author": "Pushwoosh"
15
+ }
@@ -0,0 +1,402 @@
1
+ import { Money as google_type_Money } from './google_type';
2
+ export interface PaymentProcessorServicePrivate {
3
+ GetPaymentHistory(request: GetPaymentHistoryRequest): Promise<GetPaymentHistoryResponse>;
4
+ GetNextEstimatedInvoice(request: GetNextEstimatedInvoiceRequest): Promise<GetNextEstimatedInvoiceResponse>;
5
+ CancelSubscription(request: CancelSubscriptionRequest): Promise<CancelSubscriptionResponse>;
6
+ GetSellerCommission(request: GetSellerCommissionRequest): Promise<GetSellerCommissionResponse>;
7
+ GetAccountCounters(request: GetAccountCountersRequest): Promise<GetAccountCountersResponse>;
8
+ PayInvoice(request: PayInvoiceRequest): Promise<PayInvoiceResponse>;
9
+ RebuildInvoice(request: RebuildInvoiceRequest): Promise<RebuildInvoiceResponse>;
10
+ GetXeroContact(request: GetXeroContactRequest): Promise<GetXeroContactResponse>;
11
+ ApproveInvoice(request: ApproveInvoiceRequest): Promise<ApproveInvoiceResponse>;
12
+ RefundInvoice(request: RefundInvoiceRequest): Promise<RefundInvoiceResponse>;
13
+ CreateDraftSubscription(request: CreateDraftSubscriptionRequest): Promise<CreateDraftSubscriptionResponse>;
14
+ ActivateDraftSubscription(request: ActivateDraftSubscriptionRequest): Promise<ActivateDraftSubscriptionResponse>;
15
+ DeleteDraftSubscription(request: DeleteDraftSubscriptionRequest): Promise<DeleteDraftSubscriptionResponse>;
16
+ GetEmailStatisticCount(request: GetEmailStatisticCountRequest): Promise<GetEmailStatisticCountResponse>;
17
+ GetActiveDevicesCount(request: GetActiveDevicesCountRequest): Promise<GetActiveDevicesCountResponse>;
18
+ GetSubscribersCount(request: GetSubscribersCountRequest): Promise<GetSubscribersCountResponse>;
19
+ GetActiveUsersCount(request: GetActiveUsersCountRequest): Promise<GetActiveUsersCountResponse>;
20
+ GetTotalEmailSubscribersCount(request: GetTotalEmailSubscribersCountRequest): Promise<GetTotalEmailSubscribersCountResponse>;
21
+ GetAccountTokenWalletUsage(request: GetAccountTokenWalletUsageRequest): Promise<GetAccountTokenWalletUsageResponse>;
22
+ GetAccountsWithSubButNoInvoice(request: GetAccountsWithSubButNoInvoiceRequest): Promise<GetAccountsWithSubButNoInvoiceResponse>;
23
+ CreateShopifySubscription(request: CreateShopifySubscriptionRequest): Promise<CreateShopifySubscriptionResponse>;
24
+ RevenueStream(request: RevenueStreamRequest): Promise<RevenueStreamResponse>;
25
+ ChargeAccountTokenWallet(request: ChargeAccountTokenWalletRequest): Promise<ChargeAccountTokenWalletResponse>;
26
+ GetAccountTokenWalletUsageAllowed(request: GetAccountTokenWalletUsageAllowedRequest): Promise<GetAccountTokenWalletUsageAllowedResponse>;
27
+ }
28
+ export type GetAccountsWithSubButNoInvoiceRequest = {};
29
+ export type GetAccountsWithSubButNoInvoiceResponse = {
30
+ accountIds: number[];
31
+ };
32
+ export type DeleteDraftSubscriptionRequest = {
33
+ orderId?: number;
34
+ };
35
+ export type DeleteDraftSubscriptionResponse = {};
36
+ export type ActivateDraftSubscriptionRequest = {
37
+ orderId?: number;
38
+ };
39
+ export type ActivateDraftSubscriptionResponse = {};
40
+ export type CreateDraftSubscriptionRequest_ProductType = 'PRODUCT_MARKETING' | 'PRODUCT_ENTERPRISE' | 'PRODUCT_UNKNOWN';
41
+ export type CreateDraftSubscriptionRequest_OrderType = 'ORDER_BRAINTREE' | 'ORDER_XERO' | 'ORDER_MANUAL' | 'ORDER_UNKNOWN';
42
+ export type CreateDraftSubscriptionRequest_PaymentType = 'PAYMENT_PREPAID' | 'PAYMENT_POSTPAID' | 'PAYMENT_UNKNOWN';
43
+ export type CreateDraftSubscriptionRequest_PaymentSchedulingType = 'SCHEDULE_AUTO' | 'SCHEDULE_MANUAL' | 'SCHEDULE_UNKNOWN';
44
+ export type CreateDraftSubscriptionRequest = {
45
+ productType?: CreateDraftSubscriptionRequest_ProductType;
46
+ orderType?: CreateDraftSubscriptionRequest_OrderType;
47
+ paymentType?: CreateDraftSubscriptionRequest_PaymentType;
48
+ paymentSchedulingType?: CreateDraftSubscriptionRequest_PaymentSchedulingType;
49
+ billingCycle?: number;
50
+ firstBillingDate?: Date;
51
+ dueDateDays?: number;
52
+ currency?: string;
53
+ dueDateShift?: boolean;
54
+ };
55
+ export type CreateDraftSubscriptionResponse = {
56
+ orderId: number;
57
+ };
58
+ export type RebuildInvoiceRequest = {
59
+ invoiceId?: number;
60
+ };
61
+ export type RebuildInvoiceResponse = {};
62
+ export type RefundInvoiceRequest = {
63
+ invoiceId?: number;
64
+ };
65
+ export type RefundInvoiceResponse = {};
66
+ export type ApproveInvoiceRequest = {
67
+ invoiceId?: number;
68
+ };
69
+ export type ApproveInvoiceResponse = {};
70
+ export type GetXeroContactRequest = {
71
+ contactId?: string;
72
+ country?: string;
73
+ };
74
+ export type GetXeroContactResponse = {
75
+ contactId: string;
76
+ firstName: string;
77
+ lastName: string;
78
+ email: string;
79
+ };
80
+ export type GetSellerCommissionRequest = {
81
+ sellerId?: number;
82
+ dateFrom?: Date;
83
+ dateTo?: Date;
84
+ };
85
+ export type GetSellerCommissionResponse_Commission = {
86
+ accountId: number;
87
+ accountName: string;
88
+ paidDate: Date;
89
+ totalAmount: number;
90
+ commission: number;
91
+ };
92
+ export type GetSellerCommissionResponse = {
93
+ commissions: GetSellerCommissionResponse_Commission[];
94
+ };
95
+ export type GetEmailStatisticCountRequest = {
96
+ dateFrom?: Date;
97
+ dateTo?: Date;
98
+ };
99
+ export type GetEmailStatisticCountResponse = {
100
+ dailyEmailStat: number;
101
+ monthlyEmailStat: number;
102
+ lastEmailStat: number;
103
+ paidEmailQuota: number;
104
+ freeEmailQuota: number;
105
+ freeEmailLimit: number;
106
+ billingMonthEmailSendsStat: number;
107
+ requestDateEmailStat: number;
108
+ };
109
+ export type GetActiveDevicesCountRequest = {
110
+ dateFrom?: Date;
111
+ dateTo?: Date;
112
+ };
113
+ export type GetActiveDevicesCountResponse = {
114
+ monthlyActiveDevices: number;
115
+ calendarMonthlyActiveDevices: number;
116
+ previousMonthActiveDevices: number;
117
+ requestDateActiveDevices: number;
118
+ };
119
+ export type GetSubscribersCountRequest = {
120
+ platforms?: number[];
121
+ dateFrom?: Date;
122
+ dateTo?: Date;
123
+ };
124
+ export type GetSubscribersCountResponse = {
125
+ pushEnabled: number;
126
+ pushDisabled: number;
127
+ };
128
+ export type GetActiveUsersCountRequest = {
129
+ dateFrom?: Date;
130
+ dateTo?: Date;
131
+ };
132
+ export type GetActiveUsersCountResponse = {
133
+ monthlyActiveUsers: number;
134
+ calendarMonthlyActiveUsers: number;
135
+ previousMonthActiveUsers: number;
136
+ requestDateActiveUsers: number;
137
+ };
138
+ export type GetTotalEmailSubscribersCountRequest = {};
139
+ export type GetTotalEmailSubscribersCountResponse = {
140
+ totalEmailSubscribers: number;
141
+ };
142
+ export type CreateShopifySubscriptionRequest = {};
143
+ export type CreateShopifySubscriptionResponse = {};
144
+ export type RevenueStreamRequest = {
145
+ dateFrom?: Date;
146
+ dateTo?: Date;
147
+ };
148
+ export type RevenueStreamResponse_RevenueStream = {
149
+ amountPaid: number;
150
+ amountUnpaid: number;
151
+ currency: string;
152
+ dateFrom: Date;
153
+ dateTo: Date;
154
+ };
155
+ export type RevenueStreamResponse = {
156
+ revenueStreams: RevenueStreamResponse_RevenueStream[];
157
+ };
158
+ export type ChargeAccountTokenWalletRequest_ChargeUnit = {
159
+ model: string;
160
+ tokenType: string;
161
+ value: number;
162
+ messageId: number;
163
+ chatId: number;
164
+ applicationId: number;
165
+ };
166
+ export type ChargeAccountTokenWalletRequest = {
167
+ units?: ChargeAccountTokenWalletRequest_ChargeUnit[];
168
+ };
169
+ export type ChargeAccountTokenWalletResponse = {
170
+ paid: boolean;
171
+ message: string;
172
+ };
173
+ export type GetAccountTokenWalletUsageRequest = {
174
+ dateFrom?: Date;
175
+ dateTo?: Date;
176
+ };
177
+ export type GetAccountTokenWalletUsageResponse_TokenUnit = {
178
+ model: string;
179
+ tokenType: string;
180
+ value: number;
181
+ messageId: number;
182
+ chatId: number;
183
+ applicationId: number;
184
+ };
185
+ export type GetAccountTokenWalletUsageResponse = {
186
+ units: GetAccountTokenWalletUsageResponse_TokenUnit[];
187
+ };
188
+ export type GetAccountTokenWalletUsageAllowedRequest = {};
189
+ export type GetAccountTokenWalletUsageAllowedResponse = {
190
+ allowed: boolean;
191
+ reason: string;
192
+ };
193
+ export interface PaymentProcessorService {
194
+ GetPaymentHistory(request: GetPaymentHistoryRequest): Promise<GetPaymentHistoryResponse>;
195
+ ListPaymentMethods(request: ListPaymentMethodsRequest): Promise<ListPaymentMethodsResponse>;
196
+ DeletePaymentMethod(request: DeletePaymentMethodRequest): Promise<DeletePaymentMethodResponse>;
197
+ SavePaypal(request: SavePaypalRequest): Promise<SavePaypalResponse>;
198
+ SaveCard(request: SaveCardRequest): Promise<SaveCardResponse>;
199
+ SaveDefaultPaymentMethod(request: SaveDefaultPaymentMethodRequest): Promise<SaveDefaultPaymentMethodResponse>;
200
+ GetEstimatedSubscription(request: GetEstimatedSubscriptionRequest): Promise<GetEstimatedSubscriptionResponse>;
201
+ CreateSubscription(request: CreateSubscriptionRequest): Promise<CreateSubscriptionResponse>;
202
+ CancelSubscription(request: CancelSubscriptionRequest): Promise<CancelSubscriptionResponse>;
203
+ GetNextEstimatedInvoice(request: GetNextEstimatedInvoiceRequest): Promise<GetNextEstimatedInvoiceResponse>;
204
+ PayInvoice(request: PayInvoiceRequest): Promise<PayInvoiceResponse>;
205
+ GetCountries(request: GetCountriesRequest): Promise<GetCountriesResponse>;
206
+ GetRegions(request: GetRegionsRequest): Promise<GetRegionsResponse>;
207
+ GetAccountCounters(request: GetAccountCountersRequest): Promise<GetAccountCountersResponse>;
208
+ XeroLogin(request: XeroLoginRequest): Promise<XeroLoginResponse>;
209
+ XeroCallback(request: XeroCallbackRequest): Promise<XeroCallbackResponse>;
210
+ GetAccountTokenWallet(request: GetAccountTokenWalletRequest): Promise<GetAccountTokenWalletResponse>;
211
+ UpdateAccountTokenWallet(request: UpdateAccountTokenWalletRequest): Promise<UpdateAccountTokenWalletResponse>;
212
+ AccountTokenWalletPayment(request: AccountTokenWalletPaymentRequest): Promise<AccountTokenWalletPaymentResponse>;
213
+ }
214
+ export type GetPaymentHistoryRequest = {};
215
+ export type Payment = {
216
+ invoiceId: number;
217
+ amount: string;
218
+ currency: string;
219
+ status: string;
220
+ type: string;
221
+ title: string;
222
+ invoiceLink: string;
223
+ billingStartDate: Date;
224
+ billingEndDate: Date;
225
+ createdDate: Date;
226
+ receiptDate: Date;
227
+ };
228
+ export type GetPaymentHistoryResponse = {
229
+ payments: Payment[];
230
+ };
231
+ export type ListPaymentMethodsRequest = {};
232
+ export type PaymentCard = {
233
+ cardNumber: string;
234
+ cardType: string;
235
+ token: string;
236
+ expirationTime: Date;
237
+ };
238
+ export type PaymentPaypal = {
239
+ email: string;
240
+ token: string;
241
+ };
242
+ export type PaymentMethod_paymentMethod_card = {
243
+ type: 'card';
244
+ data: PaymentCard;
245
+ };
246
+ export type PaymentMethod_paymentMethod_paypal = {
247
+ type: 'paypal';
248
+ data: PaymentPaypal;
249
+ };
250
+ export type PaymentMethod_paymentMethod = PaymentMethod_paymentMethod_card | PaymentMethod_paymentMethod_paypal;
251
+ export type PaymentMethod = {
252
+ isMain: boolean;
253
+ paymentMethod: PaymentMethod_paymentMethod;
254
+ };
255
+ export type ListPaymentMethodsResponse = {
256
+ paymentMethods: PaymentMethod[];
257
+ clientToken: string;
258
+ };
259
+ export type SavePaypalRequest = {
260
+ paypalNonce?: string;
261
+ };
262
+ export type SavePaypalResponse = {
263
+ token: string;
264
+ };
265
+ export type SaveCardRequest = {
266
+ cardNumber?: string;
267
+ cardholderName?: string;
268
+ expirationMonth?: string;
269
+ expirationYear?: string;
270
+ cvv?: string;
271
+ };
272
+ export type SaveCardResponse = {
273
+ token: string;
274
+ };
275
+ export type SaveDefaultPaymentMethodRequest = {
276
+ token?: string;
277
+ };
278
+ export type SaveDefaultPaymentMethodResponse = {};
279
+ export type DeletePaymentMethodRequest = {
280
+ token?: string;
281
+ newMainToken?: string;
282
+ };
283
+ export type DeletePaymentMethodResponse = {};
284
+ export type CreateSubscriptionRequest = {
285
+ product?: string;
286
+ };
287
+ export type CreateSubscriptionResponse = {
288
+ paid: boolean;
289
+ message: string;
290
+ };
291
+ export type GetEstimatedSubscriptionRequest = {
292
+ product?: string;
293
+ };
294
+ export type GetEstimatedSubscriptionResponse = {
295
+ invoice: Invoice;
296
+ };
297
+ export type CancelSubscriptionRequest = {
298
+ reason?: string;
299
+ };
300
+ export type CancelSubscriptionResponse = {};
301
+ export type GetNextEstimatedInvoiceRequest = {
302
+ orderId?: number;
303
+ };
304
+ export type InvoiceItem = {
305
+ amount: string;
306
+ currency: string;
307
+ description: string;
308
+ counterType: string;
309
+ counterValue: number;
310
+ };
311
+ export type Invoice = {
312
+ amount: string;
313
+ currency: string;
314
+ paymentDate: Date;
315
+ items: InvoiceItem[];
316
+ billingPeriodMonths: number;
317
+ };
318
+ export type GetNextEstimatedInvoiceResponse = {
319
+ planName: string;
320
+ planType: string;
321
+ payByCard: boolean;
322
+ invoice: Invoice;
323
+ overage: Invoice;
324
+ };
325
+ export type PayInvoiceRequest = {
326
+ invoiceId?: number;
327
+ token?: string;
328
+ };
329
+ export type PayInvoiceResponse = {
330
+ paid: boolean;
331
+ message: string;
332
+ };
333
+ export type GetCountriesRequest = {
334
+ name?: string;
335
+ };
336
+ export type GetCountriesResponse_Country = {
337
+ name: string;
338
+ code: string;
339
+ };
340
+ export type GetCountriesResponse = {
341
+ countries: GetCountriesResponse_Country[];
342
+ };
343
+ export type GetRegionsRequest = {
344
+ countryCode?: string;
345
+ name?: string;
346
+ };
347
+ export type GetRegionsResponse_Region = {
348
+ name: string;
349
+ code: string;
350
+ };
351
+ export type GetRegionsResponse = {
352
+ regions: GetRegionsResponse_Region[];
353
+ };
354
+ export type GetAccountCountersRequest = {
355
+ dateFrom?: Date;
356
+ dateTo?: Date;
357
+ };
358
+ export type GetAccountCountersResponse = {
359
+ applications: number;
360
+ activeUsers: number;
361
+ activeDevices: number;
362
+ maped: number;
363
+ emailSubscribers: number;
364
+ pushEnabledDevices: number;
365
+ emailsPerMonth: number;
366
+ usersCount: number;
367
+ datapointsCount: number;
368
+ inappImpressions: number;
369
+ smsSpent: number;
370
+ parentAccountId: number;
371
+ subAccountIds: number[];
372
+ seatsCount: number;
373
+ };
374
+ export type XeroLoginRequest = {
375
+ country?: string;
376
+ };
377
+ export type XeroLoginResponse = {};
378
+ export type XeroCallbackRequest = {
379
+ code?: string;
380
+ country?: string;
381
+ };
382
+ export type XeroCallbackResponse = {};
383
+ export type GetAccountTokenWalletRequest = {};
384
+ export type GetAccountTokenWalletResponse = {
385
+ balance: google_type_Money;
386
+ autorefillEnabled: boolean;
387
+ autorefillThreshold: google_type_Money;
388
+ autorefillAmount: google_type_Money;
389
+ };
390
+ export type UpdateAccountTokenWalletRequest = {
391
+ autorefillEnabled?: boolean;
392
+ autorefillThreshold?: google_type_Money;
393
+ autorefillAmount?: google_type_Money;
394
+ };
395
+ export type UpdateAccountTokenWalletResponse = {};
396
+ export type AccountTokenWalletPaymentRequest = {
397
+ amount?: google_type_Money;
398
+ };
399
+ export type AccountTokenWalletPaymentResponse = {
400
+ paid: boolean;
401
+ message: string;
402
+ };
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};
package/types.d.ts ADDED
@@ -0,0 +1,46 @@
1
+ export type TypeDefinition = InterfaceDefinition | EnumDefinition | ServiceDefinition;
2
+ export type InterfaceDefinition = {
3
+ type: 'I';
4
+ fields: {
5
+ [fieldName: string]: FieldDefinition;
6
+ };
7
+ oneofs?: {
8
+ [oneofName: string]: OneofGroup;
9
+ };
10
+ };
11
+ export type FieldDefinition = {
12
+ type: string;
13
+ mapKeyType?: string;
14
+ array?: boolean;
15
+ optional?: boolean;
16
+ };
17
+ export type OneofGroup = {
18
+ oneof: string[];
19
+ };
20
+ export type EnumDefinition = {
21
+ type: 'E';
22
+ values: string[];
23
+ };
24
+ export type ServiceDefinition = {
25
+ type: 'S';
26
+ key: string;
27
+ methods: {
28
+ [methodName: string]: ServiceMethod;
29
+ };
30
+ };
31
+ export type ServiceMethod = {
32
+ request: string;
33
+ response: string;
34
+ method: string;
35
+ path: string;
36
+ };
37
+ export type InterfaceDefinitionRaw = InterfaceDefinition & {
38
+ package: string;
39
+ };
40
+ export type EnumDefinitionRaw = EnumDefinition & {
41
+ package: string;
42
+ };
43
+ export type ServiceDefinitionRaw = ServiceDefinition & {
44
+ package: string;
45
+ };
46
+ export type TypeDefinitionRaw = InterfaceDefinitionRaw | EnumDefinitionRaw | ServiceDefinitionRaw;
package/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};