@yuno-payments/dashboard-api-mfe 2.1.1 → 2.2.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.
Files changed (62) hide show
  1. package/build/cjs/index.js +6 -6
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/types/api/api.d.ts +23 -31
  4. package/build/cjs/types/mutations/audit/audit-api.mutation.d.ts +0 -4
  5. package/build/cjs/types/mutations/domains/domains.mutation.d.ts +41 -0
  6. package/build/cjs/types/mutations/domains/index.d.ts +1 -0
  7. package/build/cjs/types/mutations/index.d.ts +1 -1
  8. package/build/cjs/types/mutations/users/users.mutation.d.ts +0 -4
  9. package/build/cjs/types/queries/audit/audit.query.d.ts +6 -4
  10. package/build/cjs/types/queries/audit/index.d.ts +0 -1
  11. package/build/cjs/types/queries/domains/domains.query.d.ts +13 -0
  12. package/build/cjs/types/queries/domains/index.d.ts +1 -0
  13. package/build/cjs/types/queries/index.d.ts +1 -2
  14. package/build/cjs/types/queries/mfa/organization-settings.query.d.ts +1 -10
  15. package/build/cjs/types/queries/users/users.query.d.ts +0 -1
  16. package/build/cjs/types/types/audit/audit.d.ts +0 -147
  17. package/build/cjs/types/types/domains/domains.d.ts +77 -0
  18. package/build/cjs/types/types/domains/index.d.ts +1 -0
  19. package/build/cjs/types/types/index.d.ts +1 -0
  20. package/build/esm/index.js +5 -5
  21. package/build/esm/index.js.map +1 -1
  22. package/build/esm/types/api/api.d.ts +23 -31
  23. package/build/esm/types/mutations/audit/audit-api.mutation.d.ts +0 -4
  24. package/build/esm/types/mutations/domains/domains.mutation.d.ts +41 -0
  25. package/build/esm/types/mutations/domains/index.d.ts +1 -0
  26. package/build/esm/types/mutations/index.d.ts +1 -1
  27. package/build/esm/types/mutations/users/users.mutation.d.ts +0 -4
  28. package/build/esm/types/queries/audit/audit.query.d.ts +6 -4
  29. package/build/esm/types/queries/audit/index.d.ts +0 -1
  30. package/build/esm/types/queries/domains/domains.query.d.ts +13 -0
  31. package/build/esm/types/queries/domains/index.d.ts +1 -0
  32. package/build/esm/types/queries/index.d.ts +1 -2
  33. package/build/esm/types/queries/mfa/organization-settings.query.d.ts +1 -10
  34. package/build/esm/types/queries/users/users.query.d.ts +0 -1
  35. package/build/esm/types/types/audit/audit.d.ts +0 -147
  36. package/build/esm/types/types/domains/domains.d.ts +77 -0
  37. package/build/esm/types/types/domains/index.d.ts +1 -0
  38. package/build/esm/types/types/index.d.ts +1 -0
  39. package/build/index.d.ts +154 -228
  40. package/package.json +1 -1
  41. package/build/cjs/types/msw/handlers/api-logs.d.ts +0 -1
  42. package/build/cjs/types/msw/handlers/webhooks.d.ts +0 -1
  43. package/build/cjs/types/msw/mocks/api-logs/api-logs-v3.mock.d.ts +0 -2
  44. package/build/cjs/types/msw/mocks/webhooks/webhook-timeline.mock.d.ts +0 -2
  45. package/build/cjs/types/mutations/organization-settings/index.d.ts +0 -1
  46. package/build/cjs/types/mutations/organization-settings/organization-settings.mutations.d.ts +0 -9
  47. package/build/cjs/types/queries/api-logs/api-logs-v3.query.d.ts +0 -9
  48. package/build/cjs/types/queries/api-logs/index.d.ts +0 -1
  49. package/build/cjs/types/queries/audit/audit-v3.query.d.ts +0 -9
  50. package/build/cjs/types/queries/webhooks/index.d.ts +0 -1
  51. package/build/cjs/types/queries/webhooks/webhook-timeline.query.d.ts +0 -9
  52. package/build/esm/types/msw/handlers/api-logs.d.ts +0 -1
  53. package/build/esm/types/msw/handlers/webhooks.d.ts +0 -1
  54. package/build/esm/types/msw/mocks/api-logs/api-logs-v3.mock.d.ts +0 -2
  55. package/build/esm/types/msw/mocks/webhooks/webhook-timeline.mock.d.ts +0 -2
  56. package/build/esm/types/mutations/organization-settings/index.d.ts +0 -1
  57. package/build/esm/types/mutations/organization-settings/organization-settings.mutations.d.ts +0 -9
  58. package/build/esm/types/queries/api-logs/api-logs-v3.query.d.ts +0 -9
  59. package/build/esm/types/queries/api-logs/index.d.ts +0 -1
  60. package/build/esm/types/queries/audit/audit-v3.query.d.ts +0 -9
  61. package/build/esm/types/queries/webhooks/index.d.ts +0 -1
  62. package/build/esm/types/queries/webhooks/webhook-timeline.query.d.ts +0 -9
@@ -1,7 +1,7 @@
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, ListSubscriptionsParams } from './api.types';
4
- import { Audit, OperationTransaction, Organization, OrganizationConfig, SmartRouting, User, Webhook, Reports, ReportType, TemplateType, OrganizationSettings, IListScheduledReportsResponse, DataReport, Reconciliation, Checkout, ReconciliationReportType, SendPaymentNotification, ReconciliationAlerts, ReconciliationAgenda, ReconciliationSales, ReconciliationAdvancements, ReconciliationFees, ReconciliationInsights, Payment, AddToRiskListRequest, InsightsFraudParams, InsightsFraudBody, AI, PaymentFiltersSection, Installments, Connection, TemplateReporting, GetUserFullResponse, Team, ConciergeAccess, ConciergeAccessRequest, Playground } from '../types';
3
+ import { GetPaymentsParams, GetReconciliationMetricParams, FirebaseUserSubscribe, PathNotification, TimeZoneCatalog, GetTransactionDetailsV2Params, MfaUserPayload, UserInviteMultiaccountPayload, GetTransactionsParams, PaymentsSettings, GetPayoutDetail, GetPayoutTransactionDetail, PinnedSections, ThemeSettings, ListSubscriptionsParams } from './api.types';
4
+ import { Audit, OperationTransaction, Organization, OrganizationConfig, SmartRouting, User, Webhook, Reports, ReportType, TemplateType, IListScheduledReportsResponse, DataReport, Reconciliation, Checkout, ReconciliationReportType, SendPaymentNotification, ReconciliationAlerts, ReconciliationAgenda, ReconciliationSales, ReconciliationAdvancements, ReconciliationFees, ReconciliationInsights, Payment, AddToRiskListRequest, InsightsFraudParams, InsightsFraudBody, AI, PaymentFiltersSection, Installments, Connection, TemplateReporting, GetUserFullResponse, Team, ConciergeAccess, ConciergeAccessRequest, Playground } from '../types';
5
5
  import { ConversionRateParams, ConversionRateBody, ConversionRateOverview, ConversionRateOverviewFraud3ds } from '../types/data-report/conversion-rate.types';
6
6
  import { RoutingMonitors } from '../types/routing-monitors';
7
7
  import { ChangePaymentsWebhook } from '../mutations';
@@ -164,28 +164,15 @@ export declare class Api extends HttpClient {
164
164
  payload: Audit.AuditWebhooksParams;
165
165
  }): Promise<AxiosResponse<T>>;
166
166
  postResendWebhooks<T>({ codes, }: Audit.AuditWebhooksResendParams): Promise<AxiosResponse<T>>;
167
- postExportApiLogs<T>(payload: Audit.ExportApiLogsRequest): Promise<AxiosResponse<T>>;
168
- postExportWebhooksLogs<T>(payload: Audit.ExportWebhooksLogsRequest): Promise<AxiosResponse<T>>;
169
- getApiLogsV3<T>(paymentCode: string): Promise<AxiosResponse<T>>;
170
- getWebhookTimeline<T>(paymentCode: string): Promise<AxiosResponse<T>>;
171
- postExportDashboardLogs<T>(payload: Audit.ExportDashboardLogsRequest): Promise<AxiosResponse<T>>;
172
- postExportMonitorsLogs<T>(payload: Audit.ExportMonitorsLogsRequest): Promise<AxiosResponse<T>>;
173
167
  getAuditExportsList<T>(reportType: Audit.AuditExportReportType): Promise<AxiosResponse<T>>;
174
168
  getAuditExportDownload<T>(reportId: string): Promise<AxiosResponse<T>>;
175
169
  private getUnifiedExportsPath;
176
170
  postUnifiedExport<T>(tab: Audit.UnifiedExportTabType, payload: Audit.UnifiedExportRequest): Promise<AxiosResponse<T>>;
177
171
  getUnifiedExportStatus<T>(tab: Audit.UnifiedExportTabType, exportId: string): Promise<AxiosResponse<T>>;
178
172
  getUnifiedExportsList<T>(tab: Audit.UnifiedExportTabType, page?: number, size?: number): Promise<AxiosResponse<T>>;
179
- postApiLogs<T>({ payload: { account_code, ...rest }, }: {
180
- payload: Audit.AuditApiLogsParams;
181
- }): Promise<AxiosResponse<T>>;
182
- getApiLogsDetailByPaymentCode<T>(paymentCode: string, createdAtFrom?: string): Promise<AxiosResponse<T>>;
183
- getApiLogsByTransactionCode<T>(transactionCode: string, accountCode: string): Promise<AxiosResponse<T>>;
184
173
  postApiLogsStatsRequests<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
185
174
  postApiLogsStatsErrors<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
186
175
  postApiLogsStatsErrorsByEndpoint<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
187
- postApiLogsList<T>(payload: Audit.ApiLogsListParams): Promise<AxiosResponse<T>>;
188
- getApiLogsV3ByPaymentCode<T>(paymentCode: string, createdAtFrom?: string): Promise<AxiosResponse<T>>;
189
176
  createAuditSubscription<T>(payload: Audit.CreateAuditSubscriptionPayload): Promise<AxiosResponse<T>>;
190
177
  listAuditSubscriptions<T>(): Promise<AxiosResponse<T>>;
191
178
  deleteAuditSubscription<T>(code: string): Promise<AxiosResponse<T>>;
@@ -496,9 +483,8 @@ export declare class Api extends HttpClient {
496
483
  postUserThemeSettings<T>(payload: ThemeSettings): Promise<AxiosResponse<T>>;
497
484
  getMfaTokenValidation<T>(password: string, otp: string): Promise<AxiosResponse<T, any>>;
498
485
  getEmailOtp<T>(): Promise<AxiosResponse<T, any>>;
499
- confirmMfaOtp<T>(payload: MfaUserSubscribe): Promise<AxiosResponse<T>>;
486
+ confirmMfaOtp<T>(payload: MfaUserPayload): Promise<AxiosResponse<T>>;
500
487
  unrollMfa<T>(password: any): Promise<AxiosResponse<T, any>>;
501
- sendOTPForMFA(): Promise<AxiosResponse<void>>;
502
488
  getConfigAllowlist<T>(accountCode: any): Promise<AxiosResponse<T, any>>;
503
489
  getBlackListType<T>(accountCode: any): Promise<AxiosResponse<T, any>>;
504
490
  postBlockList<T>(accountCodes: string[], listName: string, page: number, size: number): Promise<AxiosResponse<T, any>>;
@@ -579,16 +565,7 @@ export declare class Api extends HttpClient {
579
565
  getBatchRefunds<T>(limit: any, offset: any): Promise<AxiosResponse<T, any>>;
580
566
  getBatchRefundProcessedFileDownload<T>(batchRefundId: string, organizationCode: string, accountCode: string): Promise<AxiosResponse<T, any>>;
581
567
  getBatchRefundUserFileDownload<T>(batchRefundId: string, organizationCode: string, accountCode: string): Promise<AxiosResponse<T, any>>;
582
- getMFAConfig<T>({ organizationCode }: {
583
- organizationCode: any;
584
- }): Promise<AxiosResponse<T, any>>;
585
- getMFAExcludedUsers<T>({ organizationCode, }: {
586
- organizationCode: any;
587
- }): Promise<AxiosResponse<T, any>>;
588
- getMFAEnforcementStatus<T>(): Promise<AxiosResponse<T, any>>;
589
568
  getWorkOsMfaStatus<T>(): Promise<AxiosResponse<T, any>>;
590
- updateMFAConfig<T>(payload: OrganizationSettings.MfaConfigRequest, organizationCode: string): Promise<AxiosResponse<T, any>>;
591
- mfaExcludeUsers<T>(users: OrganizationSettings.MfaUserExcluded[], organizationCode: string): Promise<AxiosResponse<T, any>>;
592
569
  getAllConfigRules<T>(): Promise<AxiosResponse<T, any>>;
593
570
  getConditionalConfigRules<T>(conditional: any): Promise<AxiosResponse<T, any>>;
594
571
  getRule<T>(payload: any): Promise<AxiosResponse<T, any>>;
@@ -621,11 +598,6 @@ export declare class Api extends HttpClient {
621
598
  updateSamlConfig<T>(payload: any): Promise<AxiosResponse<T, any>>;
622
599
  deleteSamlConfig<T>(): Promise<AxiosResponse<T, any>>;
623
600
  postCall<T>(payload: any): Promise<AxiosResponse<T, any>>;
624
- getLoginMethods<T>(): Promise<AxiosResponse<T, any>>;
625
- changeLoginMethods<T>(payload: {
626
- methodCode: string;
627
- enabled: boolean;
628
- }): Promise<AxiosResponse<T, any>>;
629
601
  postValidateCredentials<T>({ payload, }: {
630
602
  payload: {
631
603
  account_code: string;
@@ -713,6 +685,26 @@ export declare class Api extends HttpClient {
713
685
  }): Promise<AxiosResponse<T, any>>;
714
686
  deleteCertificate<T>(organizationCode: string, accountCode: string, certificateCode: string): Promise<AxiosResponse<T, any>>;
715
687
  deleteCertificateAccount<T>(organizationCode: string, accountCode: string, certificateCode: string, accountCodeToRemove: string): Promise<AxiosResponse<T, any>>;
688
+ listAppleDomains<T>(organizationCode: string, filters: {
689
+ createdAtFrom: string;
690
+ createdAtTo: string;
691
+ accountCode?: string[];
692
+ paymentMethodType?: string[];
693
+ status?: string[];
694
+ responseCode?: string[];
695
+ domainName?: string;
696
+ page?: number;
697
+ limit?: number;
698
+ }): Promise<AxiosResponse<T, any>>;
699
+ registerAppleDomains<T>(organizationCode: string, payload: {
700
+ accountCode: string;
701
+ connectionCode: string;
702
+ paymentMethodType: 'APPLE_PAY' | 'GOOGLE_PAY';
703
+ domains: {
704
+ url: string;
705
+ }[];
706
+ }): Promise<AxiosResponse<T, any>>;
707
+ deleteAppleDomain<T>(organizationCode: string, accountIntegrationCode: string, paymentMethod: 'APPLE_PAY' | 'GOOGLE_PAY', domainCode: string, reason: string): Promise<AxiosResponse<T, any>>;
716
708
  createOnboarding<T>(organizationCode: string, recipientId: string, payload: CreateOnboardingPayload): Promise<AxiosResponse<T, any>>;
717
709
  updateOnboarding<T>(organizationCode: string, recipientId: string, onboardingId: string, payload: UpdateOnboardingPayload): Promise<AxiosResponse<T, any>>;
718
710
  blockOnboarding<T>(organizationCode: string, recipientId: string, onboardingId: string): Promise<AxiosResponse<T, any>>;
@@ -7,7 +7,3 @@ export interface UnifiedExportStartParams {
7
7
  payload: Audit.UnifiedExportRequest;
8
8
  }
9
9
  export declare function useUnifiedExportStart(): UseMutationResult<Audit.UnifiedExportStartResponse, BFFErrorResponse, UnifiedExportStartParams>;
10
- export declare function useExportApiLogs(): UseMutationResult<string, BFFErrorResponse, Audit.ExportApiLogsRequest>;
11
- export declare function useExportWebhooksLogs(): UseMutationResult<string, BFFErrorResponse, Audit.ExportWebhooksLogsRequest>;
12
- export declare function useExportDashboardLogs(): UseMutationResult<Audit.AuditExportResponse, BFFErrorResponse, Audit.ExportDashboardLogsRequest>;
13
- export declare function useExportMonitorsLogs(): UseMutationResult<Audit.AuditExportResponse, BFFErrorResponse, Audit.ExportMonitorsLogsRequest>;
@@ -0,0 +1,41 @@
1
+ import { AxiosError } from 'axios';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
+ import { Domains } from '../../types/domains';
4
+ import { BFFErrorResponse } from '../smart-routing/smart-routing.mutation';
5
+ interface RegisterDomainsParams {
6
+ organizationCode: string;
7
+ payload: Domains.RegisterDomainsPayload;
8
+ }
9
+ interface DeleteDomainParams {
10
+ organizationCode: string;
11
+ /**
12
+ * Forwarded as `x-account-integration-code` so provider-domain-ms can
13
+ * propagate it to pci-applepay-ms (Apple needs the connection to unregister
14
+ * the domain). Resolve this from the connection that owns the domain — for
15
+ * Apple Pay today, the single Apple Pay connection on the account.
16
+ */
17
+ accountIntegrationCode: string;
18
+ paymentMethod: Domains.PaymentMethodType;
19
+ code: string;
20
+ /**
21
+ * Surfaced to provider-domain-ms in the unregister payload. Use distinct
22
+ * strings for the user-facing "Delete" action vs the in-flight "Cancel"
23
+ * action so audit logs can distinguish intent.
24
+ */
25
+ reason: string;
26
+ }
27
+ /**
28
+ * Registers one or more Apple Pay (or future Google Pay) domains. Also drives
29
+ * the "Retry" row action — calling Register again with the same URL is the
30
+ * supported way to recover a row stuck in ERROR, since provider-domain-ms has
31
+ * no dedicated retry endpoint.
32
+ */
33
+ export declare function useRegisterAppleDomains(): UseMutationResult<Domains.RegisterDomainsResponse, AxiosError<BFFErrorResponse>, RegisterDomainsParams>;
34
+ /**
35
+ * Soft-deletes (status → INACTIVE) a single domain. Also drives the "Cancel"
36
+ * row action while the domain is verifying — both flows POST to the same
37
+ * endpoint but pass distinct `reason` strings so callers can be told apart in
38
+ * audit logs.
39
+ */
40
+ export declare function useDeleteAppleDomain(): UseMutationResult<void, AxiosError<BFFErrorResponse>, DeleteDomainParams>;
41
+ export {};
@@ -0,0 +1 @@
1
+ export * from './domains.mutation';
@@ -17,7 +17,6 @@ export * from './multi-factor-authentication';
17
17
  export * from './fraud-screening';
18
18
  export * from './batch-refunds';
19
19
  export * from './S3Client';
20
- export * from './organization-settings';
21
20
  export * from './scheduled-reports';
22
21
  export * from './velocity-rules';
23
22
  export * from './developers';
@@ -36,3 +35,4 @@ export * from './concierge';
36
35
  export * from './playground';
37
36
  export * from './integration-requests';
38
37
  export * from './certificates';
38
+ export * from './domains';
@@ -10,7 +10,3 @@ export declare function useUnInviteUsersV2(): import("@tanstack/react-query").Us
10
10
  organizationCode: string;
11
11
  }, unknown>;
12
12
  export declare function usePostCall(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<unknown, any, {}>, unknown, void, unknown>;
13
- export declare function useLoginMethods(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<unknown, any, {}>, unknown, {
14
- methodCode: string;
15
- enabled: boolean;
16
- }, unknown>;
@@ -17,16 +17,16 @@ export declare function useGetAuditEvents(params: Audit.AuditEventsParams): UseQ
17
17
  */
18
18
  export declare function useGetAuditEventByCode(eventCode: string | null | undefined, accountCodes: string[] | undefined): UseQueryResult<Audit.AuditEventData, AxiosError>;
19
19
  export declare function useGetAuditMonitorEventDetail(id: number | null): UseQueryResult<Audit.AuditMonitorDetail, AxiosError>;
20
- export declare function usePostApiLogs(params: Audit.AuditApiLogsParams): UseQueryResult<Audit.AuditApiLogsResponse, BFFErrorResponse>;
21
20
  export declare function usePostWebhookLogs({ params, }: {
22
21
  params: Audit.AuditWebhooksParams;
23
22
  }): UseQueryResult<Audit.AuditWebhooksResponse, BFFErrorResponse>;
24
- export declare function useGetApiLogsDetailByPaymentCode(code: string | null | undefined, createdAtFrom?: string): UseQueryResult<Audit.ApiLogsDetailByPaymentCode, BFFErrorResponse>;
23
+ export declare function usePostWebhookLogsV2({ params, }: {
24
+ params: Audit.AuditWebhooksParams;
25
+ }): UseQueryResult<Audit.AuditWebhooksResponse, BFFErrorResponse>;
25
26
  /**
26
27
  * GET /api-logs/payment/:paymentId via the new audit-logs microservice.
27
28
  */
28
29
  export declare function useGetApiLogsByPaymentId(paymentId: string | null | undefined, accountCode: string | null | undefined, createdAtFrom?: string): UseQueryResult<Audit.ApiLogsV3ListResponse, BFFErrorResponse>;
29
- export declare function useGetApiLogsByTransactionCode(transactionCode: string | null | undefined, accountCode: string | null | undefined): UseQueryResult<Audit.ApiLogByTransactionCode, BFFErrorResponse>;
30
30
  export declare function useGetAuditExportsList(reportType: Audit.AuditExportReportType, enabled?: boolean): UseQueryResult<Audit.AuditExportResponse[], BFFErrorResponse>;
31
31
  export declare function useGetAuditExportDownload(reportId: string, enabled?: boolean, onSuccess?: (data: Audit.AuditExportDownloadResponse) => void): UseQueryResult<Audit.AuditExportDownloadResponse, BFFErrorResponse>;
32
32
  export interface UnifiedExportStatusQueryParams {
@@ -46,4 +46,6 @@ export declare function useGetUnifiedExportsList({ tab, page, size, enabled, }:
46
46
  export declare function useGetApiLogsStatsRequests(params: Audit.ApiLogsStatsParams): UseQueryResult<Audit.ApiLogsStatsResponse, BFFErrorResponse>;
47
47
  export declare function useGetApiLogsStatsErrors(params: Audit.ApiLogsStatsParams): UseQueryResult<Audit.ApiLogsStatsResponse, BFFErrorResponse>;
48
48
  export declare function useGetApiLogsStatsErrorsByEndpoint(params: Audit.ApiLogsStatsParams): UseQueryResult<Audit.ApiLogsErrorsByEndpointResponse, BFFErrorResponse>;
49
- export declare function useGetApiLogsList(params: Audit.ApiLogsListParams): UseQueryResult<Audit.ApiLogsListResponse, BFFErrorResponse>;
49
+ export declare function useGetApiLogsStatsRequestsV2(params: Audit.ApiLogsStatsParams): UseQueryResult<Audit.ApiLogsStatsResponse, BFFErrorResponse>;
50
+ export declare function useGetApiLogsStatsErrorsV2(params: Audit.ApiLogsStatsParams): UseQueryResult<Audit.ApiLogsStatsResponse, BFFErrorResponse>;
51
+ export declare function useGetApiLogsStatsErrorsByEndpointV2(params: Audit.ApiLogsStatsParams): UseQueryResult<Audit.ApiLogsErrorsByEndpointResponse, BFFErrorResponse>;
@@ -1,3 +1,2 @@
1
1
  export * from './audit.query';
2
- export * from './audit-v3.query';
3
2
  export * from './audit-subscriptions.query';
@@ -0,0 +1,13 @@
1
+ import { AxiosError } from 'axios';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { Domains } from '../../types/domains';
4
+ import { BFFErrorResponse } from '../../mutations';
5
+ /**
6
+ * Lists Apple Pay (and future Google Pay) merchant domains for an organization.
7
+ *
8
+ * provider-domain-ms doesn't emit webhooks when CREATED rows transition to
9
+ * REGISTERED/ERROR. To keep the UI responsive we poll every 5s while at least
10
+ * one row in the current page is still CREATED, and stop as soon as the table
11
+ * settles (saves bandwidth on idle tabs).
12
+ */
13
+ export declare function useListAppleDomains(organizationCode: string, filters: Domains.ListDomainsFilters, enabled?: boolean): UseQueryResult<Domains.ListDomainsResponse, AxiosError<BFFErrorResponse>>;
@@ -0,0 +1 @@
1
+ export * from './domains.query';
@@ -32,9 +32,8 @@ export * from './organization-config';
32
32
  export * from './onboarding';
33
33
  export * from './recipients';
34
34
  export * from './installments';
35
- export * from './api-logs';
36
- export * from './webhooks';
37
35
  export * from './security';
38
36
  export * from './concierge';
39
37
  export * from './field-visibility';
40
38
  export * from './certificates';
39
+ export * from './domains';
@@ -1,14 +1,5 @@
1
1
  import { UseQueryResult } from '@tanstack/react-query';
2
- import { MFA, OrganizationSettings } from '../../types';
3
- export declare function useGetMFAExcludedUsers({ organizationCode, }: {
4
- organizationCode: string;
5
- }, enabled: boolean): UseQueryResult<OrganizationSettings.MfaConfig[], unknown>;
6
- export declare function useGetMFAConfig({ organizationCode, }: {
7
- organizationCode: string;
8
- }, enabled: boolean): UseQueryResult<OrganizationSettings.MfaConfig, unknown>;
9
- export declare function useGetMFAStatus({ accountCode, }: {
10
- accountCode: string;
11
- }, enabled: boolean): UseQueryResult<OrganizationSettings.MfaConfig, unknown>;
2
+ import { MFA } from '../../types';
12
3
  export declare function useGetWorkOsMfaStatus({ enabled, }: {
13
4
  enabled: boolean;
14
5
  }): UseQueryResult<MFA.WorkOsMfaStatus, unknown>;
@@ -5,7 +5,6 @@ export declare function useGetProfile(): UseQueryResult<User.UserResponsePayload
5
5
  export declare function useGetUserFull(): UseQueryResult<GetUserFullResponse, unknown>;
6
6
  export declare function useGetPermissions(organizationCode: any, accountCode: any): UseQueryResult<Accounts.PermissionsResponse[], unknown>;
7
7
  export declare function useEmailVerification(email: string): UseQueryResult<User.UserResponseEmailVerification | string, unknown>;
8
- export declare function useGetLoginMethods(): UseQueryResult<unknown, unknown>;
9
8
  export declare function useGetImpersonationUsers(): UseQueryResult<User.ImpersonationUser[], AxiosError>;
10
9
  export declare function useGetImpersonationEnabled(): UseQueryResult<User.ImpersonationEnabledResponse, AxiosError>;
11
10
  export declare function useGetUsersToImpersonate(organizationCode: string, accountCodes?: string[], page?: number, pageSize?: number, searchValue?: string, roleIds?: string[]): UseQueryResult<User.UsersToImpersonateResponse, AxiosError>;
@@ -1,11 +1,4 @@
1
1
  export declare namespace Audit {
2
- interface ApiLogsDetailByPaymentCode {
3
- data: ApiLogByTransactionCode[];
4
- page: number;
5
- size: number;
6
- total_rows: number;
7
- total_pages: number;
8
- }
9
2
  interface AuditEventsParams {
10
3
  page: number;
11
4
  size: number;
@@ -117,63 +110,9 @@ export declare namespace Audit {
117
110
  type: string;
118
111
  percentage: number;
119
112
  }
120
- interface ExportWebhooksLogsRequest {
121
- report_name: string;
122
- account_code?: string[];
123
- start_date: string;
124
- end_date: string;
125
- time_zone: string;
126
- organizationCode?: string;
127
- status_codes?: string[];
128
- methods?: string[];
129
- size?: number;
130
- page?: number;
131
- }
132
- interface ExportApiLogsRequest {
133
- report_name: string;
134
- account_code?: string[];
135
- start_date: string;
136
- end_date: string;
137
- time_zone: string;
138
- organizationCode?: string;
139
- status_codes?: string[];
140
- methods?: string[];
141
- size?: number;
142
- page?: number;
143
- }
144
113
  interface AuditApiJSON {
145
114
  [key: string]: string;
146
115
  }
147
- interface AuditApiLogs {
148
- code: string;
149
- url: string;
150
- method: string;
151
- source: string;
152
- headers: AuditApiJSON;
153
- request: AuditApiJSON;
154
- response: AuditApiJSON;
155
- account_name: string;
156
- account_code: string;
157
- status_code: number;
158
- trace_id: string;
159
- created_at: string;
160
- }
161
- interface AuditApiLogsResponse {
162
- data: AuditApiLogs[];
163
- page: number;
164
- size: number;
165
- total_rows: number;
166
- total_pages: number;
167
- }
168
- interface AuditApiLogsParams {
169
- page: number;
170
- size: number;
171
- periodicity?: string;
172
- account_code?: string[];
173
- organizationCode?: string;
174
- status_codes?: string[];
175
- methods?: string[];
176
- }
177
116
  interface AuditWebhooksParams {
178
117
  page: number;
179
118
  size: number;
@@ -229,28 +168,6 @@ export declare namespace Audit {
229
168
  payment_code?: string;
230
169
  transaction_code?: string;
231
170
  }
232
- interface ApiLogsV3Response {
233
- data: ApiLogV3[];
234
- page: number;
235
- size: number;
236
- total_rows: number;
237
- total_pages: number;
238
- }
239
- interface ApiLogsV3Params {
240
- page: number;
241
- size: number;
242
- periodicity?: string;
243
- account_code?: string[];
244
- organizationCode?: string;
245
- status_codes?: string[];
246
- methods?: string[];
247
- start_date?: string;
248
- end_date?: string;
249
- search?: string;
250
- time_zone?: string;
251
- now?: string;
252
- payment_code?: string;
253
- }
254
171
  interface WebhookTimelineItem {
255
172
  id: number;
256
173
  organization_code: string;
@@ -273,42 +190,6 @@ export declare namespace Audit {
273
190
  payment_code?: string;
274
191
  transaction_code?: string;
275
192
  }
276
- interface WebhookTimelineResponse {
277
- data: WebhookTimelineItem[];
278
- page: number;
279
- size: number;
280
- total_rows: number;
281
- total_pages: number;
282
- }
283
- interface WebhookTimelineParams {
284
- page: number;
285
- size: number;
286
- organizationCode?: string;
287
- periodicity?: string;
288
- account_code?: string[];
289
- status_codes?: string[];
290
- methods?: string[];
291
- start_date?: string;
292
- end_date?: string;
293
- time_zone?: string;
294
- now?: string;
295
- payment_code?: string;
296
- transaction_code?: string;
297
- }
298
- interface ApiLogByTransactionCode {
299
- code: string;
300
- url: string;
301
- method: string;
302
- source: string;
303
- headers: AuditApiJSON;
304
- request: AuditApiJSON;
305
- response: AuditApiJSON;
306
- account_name: string;
307
- account_code: string;
308
- status_code: number;
309
- trace_id: string;
310
- created_at: string;
311
- }
312
193
  enum AuditExportReportType {
313
194
  DASHBOARD = "DASHBOARD",
314
195
  API = "API",
@@ -316,27 +197,6 @@ export declare namespace Audit {
316
197
  MONITORS = "MONITORS"
317
198
  }
318
199
  type AuditExportStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
319
- interface ExportDashboardLogsRequest {
320
- report_name: string;
321
- account_code?: string[];
322
- start_date: string;
323
- end_date: string;
324
- time_zone: string;
325
- event?: string[];
326
- source?: string[];
327
- search?: string[];
328
- }
329
- interface ExportMonitorsLogsRequest {
330
- report_name: string;
331
- account_codes?: string[];
332
- start_date: string;
333
- end_date: string;
334
- time_zone: string;
335
- status?: string[];
336
- payment_methods?: string[];
337
- providers?: string[];
338
- traffic_redistribution?: boolean;
339
- }
340
200
  type UnifiedExportTabType = 'dashboard-logs' | 'api-logs' | 'webhook-logs' | 'monitor-logs';
341
201
  interface UnifiedExportRequest {
342
202
  start_date: string;
@@ -421,13 +281,6 @@ export declare namespace Audit {
421
281
  search?: string;
422
282
  accounts?: string[];
423
283
  }
424
- interface ApiLogsListResponse {
425
- page: number;
426
- size: number;
427
- total_rows: number;
428
- total_pages: number;
429
- data: ApiLogItem[];
430
- }
431
284
  interface ApiLogItem {
432
285
  code: string;
433
286
  url: string;
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Apple Pay (and future Google Pay) merchant domain registrations.
3
+ *
4
+ * Backend statuses (`BackendStatus`) come straight from provider-domain-ms's
5
+ * `merchant_domain_registrations.status` column. Consumers usually want the
6
+ * coarser UI bucket (`UiStatus`) — see `mapBackendStatusToUi`.
7
+ */
8
+ export declare namespace Domains {
9
+ type BackendStatus = 'REGISTERED' | 'CREATED' | 'ERROR' | 'INACTIVE';
10
+ /** UI bucket exposed to the Dashboard (matches the Figma status badge variants). */
11
+ type UiStatus = 'ACTIVE' | 'VERIFYING' | 'FAILED';
12
+ type PaymentMethodType = 'APPLE_PAY' | 'GOOGLE_PAY';
13
+ interface AppleDomain {
14
+ code: string;
15
+ domain: string;
16
+ status: BackendStatus;
17
+ paymentMethod: PaymentMethodType;
18
+ accountCode: string;
19
+ responseCode: string;
20
+ createdAt: string;
21
+ updatedAt: string;
22
+ }
23
+ interface Pagination {
24
+ page: number;
25
+ limit: number;
26
+ total: number;
27
+ totalPages: number;
28
+ }
29
+ /**
30
+ * Filters accepted by the list endpoint. Every multi-value filter is serialised
31
+ * as repeated query params (`?status=A&status=B`) by the BFF — matches the strict
32
+ * parser in provider-domain-ms.
33
+ *
34
+ * `createdAtFrom` / `createdAtTo` are required ISO-8601 instants; defaults are the
35
+ * caller's job (e.g. "last 90 days" in the UI).
36
+ */
37
+ interface ListDomainsFilters {
38
+ createdAtFrom: string;
39
+ createdAtTo: string;
40
+ accountCode?: string[];
41
+ paymentMethodType?: PaymentMethodType[];
42
+ status?: BackendStatus[];
43
+ responseCode?: string[];
44
+ domainName?: string;
45
+ page?: number;
46
+ limit?: number;
47
+ }
48
+ interface ListDomainsResponse {
49
+ data: AppleDomain[];
50
+ pagination: Pagination;
51
+ }
52
+ interface RegisterDomainsPayload {
53
+ accountCode: string;
54
+ connectionCode: string;
55
+ paymentMethodType: PaymentMethodType;
56
+ domains: {
57
+ url: string;
58
+ }[];
59
+ }
60
+ interface RegisterDomainsResponse {
61
+ accountCode: string;
62
+ paymentMethod: PaymentMethodType;
63
+ domains: AppleDomain[];
64
+ }
65
+ interface DeleteDomainPayload {
66
+ paymentMethod: PaymentMethodType;
67
+ code: string;
68
+ reason: string;
69
+ }
70
+ /**
71
+ * Maps the backend status to the FE bucket the Figma uses for badges and row
72
+ * actions. INACTIVE rows are tombstones — callers typically filter them out
73
+ * before reaching the badge layer, but mapping to `null` keeps the function
74
+ * total in case a row slips through.
75
+ */
76
+ const mapBackendStatusToUi: (status: BackendStatus) => UiStatus | null;
77
+ }
@@ -0,0 +1 @@
1
+ export * from './domains';
@@ -39,3 +39,4 @@ export * from './concierge';
39
39
  export * from './playground';
40
40
  export * from './field-visibility';
41
41
  export * from './certificates';
42
+ export * from './domains';