@yuno-payments/dashboard-api-mfe 0.42.3-subscriptions-beta.1 → 0.42.3-subscriptions-beta.3

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.
@@ -1,6 +1,6 @@
1
1
  import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
2
2
  import { HttpClient } from '../lib/http-client';
3
- import { GetPaymentsParams, GetReconciliationMetricParams, FirebaseUserSubscribe, PathNotification, TimeZoneCatalog, GetTransactionDetailsV2Params, MfaUserSubscribe, UserInviteMultiaccountPayload, GetTransactionsParams, PaymentsSettings, GetPayoutDetail, GetPayoutTransactionDetail, PinnedSections, ThemeSettings } from './api.types';
3
+ import { GetPaymentsParams, GetReconciliationMetricParams, FirebaseUserSubscribe, PathNotification, TimeZoneCatalog, GetTransactionDetailsV2Params, MfaUserSubscribe, UserInviteMultiaccountPayload, GetTransactionsParams, PaymentsSettings, GetPayoutDetail, GetPayoutTransactionDetail, PinnedSections, ThemeSettings, ListSubscriptionsParams } from './api.types';
4
4
  import { Audit, OperationTransaction, Organization, OrganizationConfig, SmartRouting, User, Webhook, Reports, ReportType, TemplateType, OrganizationSettings, IListScheduledReportsResponse, DataReport, Reconciliation, Checkout, ReconciliationReportType, SendPaymentNotification, ReconciliationAlerts, ReconciliationAgenda, ReconciliationSales, ReconciliationAdvancements, ReconciliationFees, Payment, InsightsFraudParams, InsightsFraudBody, AI, PaymentFiltersSection, GetInstallmentPlansResponse, Connection, TemplateReporting, GetUserFullResponse } from '../types';
5
5
  import { ConversionRateParams, ConversionRateBody, ConversionRateOverview, ConversionRateOverviewFraud3ds } from '../types/data-report/conversion-rate.types';
6
6
  import { RoutingMonitors } from '../types/routing-monitors';
@@ -398,7 +398,7 @@ export declare class Api extends HttpClient {
398
398
  patchSubscription<T>(subscriptionCode: string, payload: any): Promise<AxiosResponse<T, any>>;
399
399
  postRescheduleSubscription<T>(subscriptionCode: string): Promise<AxiosResponse<T, any>>;
400
400
  getSubscriptionPayments<T>(subscriptionCode: string, page?: number, size?: number): Promise<AxiosResponse<T, any>>;
401
- postListSubscriptions<T>(payload: any): Promise<AxiosResponse<T, any>>;
401
+ postListSubscriptions<T>(payload: ListSubscriptionsParams): Promise<AxiosResponse<T, any>>;
402
402
  getTimezone<T>(organizationCode: string): Promise<AxiosResponse<T, any>>;
403
403
  getInstallmentPlans(accountCode: string): Promise<AxiosResponse<GetInstallmentPlansResponse>>;
404
404
  firebaseUserSubscribe<T>(payload: FirebaseUserSubscribe): Promise<AxiosResponse<T>>;
@@ -6,6 +6,12 @@ export interface GetPaymentsParams {
6
6
  enabled?: boolean;
7
7
  account_code?: string;
8
8
  payment_link_code?: string;
9
+ metadata?: Array<{
10
+ field: string;
11
+ formatType: 'TEXT' | 'NUMBER';
12
+ type: string;
13
+ values: string | string[];
14
+ }>;
9
15
  }
10
16
  export interface GetPaymentsEvaluatedParams {
11
17
  start_date: string | Date;
@@ -127,6 +133,12 @@ export interface GetTransactionsParams {
127
133
  page?: number;
128
134
  size?: number;
129
135
  account_code?: string;
136
+ metadata?: Array<{
137
+ field: string;
138
+ formatType: 'TEXT' | 'NUMBER';
139
+ type: string;
140
+ values: string | string[];
141
+ }>;
130
142
  }
131
143
  export interface GetPayoutDetail {
132
144
  payout_code: string;
@@ -196,4 +208,20 @@ export interface PinnedSections {
196
208
  sections: string[];
197
209
  };
198
210
  }
211
+ export interface ListSubscriptionsParams {
212
+ organization_code: string;
213
+ account_codes?: string[];
214
+ start_date?: string;
215
+ end_date?: string;
216
+ statuses?: string[];
217
+ countries?: string[];
218
+ payment_method_types?: string[];
219
+ page?: number;
220
+ size?: number;
221
+ merchant_reference?: string;
222
+ subscription_id?: string;
223
+ payment_id?: string;
224
+ customer_search?: string;
225
+ timezone?: string;
226
+ }
199
227
  export {};
@@ -1,3 +1,4 @@
1
+ import { ListSubscriptionsParams } from '../../api/api.types';
1
2
  export declare function useCreateSubscription(): import("@tanstack/react-query").UseMutationResult<any, unknown, any, unknown>;
2
3
  export declare function usePauseSubscription(): import("@tanstack/react-query").UseMutationResult<any, unknown, {
3
4
  subscriptionCode: string;
@@ -15,4 +16,4 @@ export declare function useUpdateSubscription(): import("@tanstack/react-query")
15
16
  export declare function useRescheduleSubscription(): import("@tanstack/react-query").UseMutationResult<any, unknown, {
16
17
  subscriptionCode: string;
17
18
  }, unknown>;
18
- export declare function useListSubscriptions(): import("@tanstack/react-query").UseMutationResult<any, unknown, any, unknown>;
19
+ export declare function useListSubscriptions(): import("@tanstack/react-query").UseMutationResult<any, unknown, ListSubscriptionsParams, unknown>;
@@ -1,5 +1,5 @@
1
1
  export declare namespace DataReport {
2
- enum InsightsVolumeMetricsV2Path {
2
+ export enum InsightsVolumeMetricsV2Path {
3
3
  REFUNDS_AND_CHARGEBACKS = "refunds-and-chargebacks",
4
4
  APPROVED_PAYMENTS = "approved-payments",
5
5
  PAYMENT_METHODS = "payment-methods",
@@ -8,7 +8,7 @@ export declare namespace DataReport {
8
8
  UNIQUE_CUSTOMER_PAYMENTS = "unique-customer-payments",
9
9
  TOTAL_PAYMENTS = "total-payments"
10
10
  }
11
- interface SmartRouting {
11
+ export interface SmartRouting {
12
12
  version: string;
13
13
  code_integration: string;
14
14
  Conditions: {
@@ -21,31 +21,46 @@ export declare namespace DataReport {
21
21
  cost: number;
22
22
  }[];
23
23
  }
24
- enum OverviewMetricType {
24
+ export enum OverviewMetricType {
25
25
  GENERAL = "volume-and-total-payments",
26
26
  LATENCY = "provider-latency",
27
27
  STATUS = "status",
28
28
  SUBSCRIPTIONS = "subscriptions"
29
29
  }
30
- interface InsightMetricParams {
31
- [a: string]: string | boolean | number | string[] | undefined;
30
+ interface MetadataField {
31
+ field: string;
32
+ formatType: 'TEXT' | 'NUMBER';
33
+ type: string;
34
+ values: string | string[];
35
+ }
36
+ interface MetadataFieldFilter {
37
+ key: string;
38
+ conditional: string;
39
+ values: string | string[];
40
+ }
41
+ export interface InsightMetricParams {
42
+ [a: string]: string | boolean | number | string[] | MetadataField[] | undefined;
32
43
  account_code?: string;
33
44
  connection_name?: string;
45
+ metadata?: MetadataField[];
34
46
  }
35
- interface InsightMetricBody {
47
+ export interface InsightMetricBody {
36
48
  account_codes?: string[];
37
49
  account_code?: string[];
38
50
  connection_name?: string[];
51
+ metadata_filters?: MetadataFieldFilter[];
52
+ metadata?: MetadataField[];
39
53
  }
40
- interface InsightExportParams {
54
+ export interface InsightExportParams {
41
55
  type?: string;
42
56
  code?: string;
43
57
  }
44
- interface InsightsHomeMetrics {
58
+ export interface InsightsHomeMetrics {
45
59
  account_codes?: string[];
46
60
  organization_code?: string;
47
61
  currency_code?: string;
48
62
  timezone?: string;
49
63
  isLiveMode?: boolean;
50
64
  }
65
+ export {};
51
66
  }