@yuno-payments/dashboard-api-mfe 2.1.1 → 2.2.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.
Files changed (46) 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 -25
  4. package/build/cjs/types/mutations/audit/audit-api.mutation.d.ts +0 -1
  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 +3 -3
  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 -0
  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 -63
  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 +4 -4
  21. package/build/esm/index.js.map +1 -1
  22. package/build/esm/types/api/api.d.ts +23 -25
  23. package/build/esm/types/mutations/audit/audit-api.mutation.d.ts +0 -1
  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 +3 -3
  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 -0
  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 -63
  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 +151 -122
  40. package/package.json +1 -1
  41. package/build/cjs/types/mutations/organization-settings/index.d.ts +0 -1
  42. package/build/cjs/types/mutations/organization-settings/organization-settings.mutations.d.ts +0 -9
  43. package/build/cjs/types/queries/audit/audit-v3.query.d.ts +0 -9
  44. package/build/esm/types/mutations/organization-settings/index.d.ts +0 -1
  45. package/build/esm/types/mutations/organization-settings/organization-settings.mutations.d.ts +0 -9
  46. package/build/esm/types/queries/audit/audit-v3.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,7 +164,6 @@ 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
167
  postExportWebhooksLogs<T>(payload: Audit.ExportWebhooksLogsRequest): Promise<AxiosResponse<T>>;
169
168
  getApiLogsV3<T>(paymentCode: string): Promise<AxiosResponse<T>>;
170
169
  getWebhookTimeline<T>(paymentCode: string): Promise<AxiosResponse<T>>;
@@ -176,16 +175,10 @@ export declare class Api extends HttpClient {
176
175
  postUnifiedExport<T>(tab: Audit.UnifiedExportTabType, payload: Audit.UnifiedExportRequest): Promise<AxiosResponse<T>>;
177
176
  getUnifiedExportStatus<T>(tab: Audit.UnifiedExportTabType, exportId: string): Promise<AxiosResponse<T>>;
178
177
  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
178
  postApiLogsStatsRequests<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
185
179
  postApiLogsStatsErrors<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
186
180
  postApiLogsStatsErrorsByEndpoint<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
187
181
  postApiLogsList<T>(payload: Audit.ApiLogsListParams): Promise<AxiosResponse<T>>;
188
- getApiLogsV3ByPaymentCode<T>(paymentCode: string, createdAtFrom?: string): Promise<AxiosResponse<T>>;
189
182
  createAuditSubscription<T>(payload: Audit.CreateAuditSubscriptionPayload): Promise<AxiosResponse<T>>;
190
183
  listAuditSubscriptions<T>(): Promise<AxiosResponse<T>>;
191
184
  deleteAuditSubscription<T>(code: string): Promise<AxiosResponse<T>>;
@@ -496,9 +489,8 @@ export declare class Api extends HttpClient {
496
489
  postUserThemeSettings<T>(payload: ThemeSettings): Promise<AxiosResponse<T>>;
497
490
  getMfaTokenValidation<T>(password: string, otp: string): Promise<AxiosResponse<T, any>>;
498
491
  getEmailOtp<T>(): Promise<AxiosResponse<T, any>>;
499
- confirmMfaOtp<T>(payload: MfaUserSubscribe): Promise<AxiosResponse<T>>;
492
+ confirmMfaOtp<T>(payload: MfaUserPayload): Promise<AxiosResponse<T>>;
500
493
  unrollMfa<T>(password: any): Promise<AxiosResponse<T, any>>;
501
- sendOTPForMFA(): Promise<AxiosResponse<void>>;
502
494
  getConfigAllowlist<T>(accountCode: any): Promise<AxiosResponse<T, any>>;
503
495
  getBlackListType<T>(accountCode: any): Promise<AxiosResponse<T, any>>;
504
496
  postBlockList<T>(accountCodes: string[], listName: string, page: number, size: number): Promise<AxiosResponse<T, any>>;
@@ -579,16 +571,7 @@ export declare class Api extends HttpClient {
579
571
  getBatchRefunds<T>(limit: any, offset: any): Promise<AxiosResponse<T, any>>;
580
572
  getBatchRefundProcessedFileDownload<T>(batchRefundId: string, organizationCode: string, accountCode: string): Promise<AxiosResponse<T, any>>;
581
573
  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
574
  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
575
  getAllConfigRules<T>(): Promise<AxiosResponse<T, any>>;
593
576
  getConditionalConfigRules<T>(conditional: any): Promise<AxiosResponse<T, any>>;
594
577
  getRule<T>(payload: any): Promise<AxiosResponse<T, any>>;
@@ -621,11 +604,6 @@ export declare class Api extends HttpClient {
621
604
  updateSamlConfig<T>(payload: any): Promise<AxiosResponse<T, any>>;
622
605
  deleteSamlConfig<T>(): Promise<AxiosResponse<T, any>>;
623
606
  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
607
  postValidateCredentials<T>({ payload, }: {
630
608
  payload: {
631
609
  account_code: string;
@@ -713,6 +691,26 @@ export declare class Api extends HttpClient {
713
691
  }): Promise<AxiosResponse<T, any>>;
714
692
  deleteCertificate<T>(organizationCode: string, accountCode: string, certificateCode: string): Promise<AxiosResponse<T, any>>;
715
693
  deleteCertificateAccount<T>(organizationCode: string, accountCode: string, certificateCode: string, accountCodeToRemove: string): Promise<AxiosResponse<T, any>>;
694
+ listAppleDomains<T>(organizationCode: string, filters: {
695
+ createdAtFrom: string;
696
+ createdAtTo: string;
697
+ accountCode?: string[];
698
+ paymentMethodType?: string[];
699
+ status?: string[];
700
+ responseCode?: string[];
701
+ domainName?: string;
702
+ page?: number;
703
+ limit?: number;
704
+ }): Promise<AxiosResponse<T, any>>;
705
+ registerAppleDomains<T>(organizationCode: string, payload: {
706
+ accountCode: string;
707
+ connectionCode: string;
708
+ paymentMethodType: 'APPLE_PAY' | 'GOOGLE_PAY';
709
+ domains: {
710
+ url: string;
711
+ }[];
712
+ }): Promise<AxiosResponse<T, any>>;
713
+ deleteAppleDomain<T>(organizationCode: string, accountIntegrationCode: string, paymentMethod: 'APPLE_PAY' | 'GOOGLE_PAY', domainCode: string, reason: string): Promise<AxiosResponse<T, any>>;
716
714
  createOnboarding<T>(organizationCode: string, recipientId: string, payload: CreateOnboardingPayload): Promise<AxiosResponse<T, any>>;
717
715
  updateOnboarding<T>(organizationCode: string, recipientId: string, onboardingId: string, payload: UpdateOnboardingPayload): Promise<AxiosResponse<T, any>>;
718
716
  blockOnboarding<T>(organizationCode: string, recipientId: string, onboardingId: string): Promise<AxiosResponse<T, any>>;
@@ -7,7 +7,6 @@ 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
10
  export declare function useExportWebhooksLogs(): UseMutationResult<string, BFFErrorResponse, Audit.ExportWebhooksLogsRequest>;
12
11
  export declare function useExportDashboardLogs(): UseMutationResult<Audit.AuditExportResponse, BFFErrorResponse, Audit.ExportDashboardLogsRequest>;
13
12
  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 {
@@ -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';
@@ -38,3 +38,4 @@ export * from './security';
38
38
  export * from './concierge';
39
39
  export * from './field-visibility';
40
40
  export * from './certificates';
41
+ 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;
@@ -129,51 +122,9 @@ export declare namespace Audit {
129
122
  size?: number;
130
123
  page?: number;
131
124
  }
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
125
  interface AuditApiJSON {
145
126
  [key: string]: string;
146
127
  }
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
128
  interface AuditWebhooksParams {
178
129
  page: number;
179
130
  size: number;
@@ -295,20 +246,6 @@ export declare namespace Audit {
295
246
  payment_code?: string;
296
247
  transaction_code?: string;
297
248
  }
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
249
  enum AuditExportReportType {
313
250
  DASHBOARD = "DASHBOARD",
314
251
  API = "API",
@@ -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';