@delopay/sdk 0.443.0 → 0.447.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.
- package/dist/airwallexCard.cjs.map +1 -1
- package/dist/branding.cjs.map +1 -1
- package/dist/cardFormStyles.cjs.map +1 -1
- package/dist/checkoutSession.cjs +2 -2
- package/dist/checkoutSession.cjs.map +1 -1
- package/dist/checkoutSession.js +1 -1
- package/dist/chunk-244VZFFO.cjs.map +1 -1
- package/dist/chunk-2IJRBJXW.cjs.map +1 -1
- package/dist/chunk-34PC72O7.cjs.map +1 -1
- package/dist/chunk-3GBWQWTP.cjs.map +1 -1
- package/dist/chunk-3YBBJT3Y.cjs.map +1 -1
- package/dist/chunk-44QBWVRS.cjs.map +1 -1
- package/dist/{chunk-OHKZR745.cjs → chunk-4CRVNVVO.cjs} +3 -3
- package/dist/chunk-4CRVNVVO.cjs.map +1 -0
- package/dist/chunk-4EKAWNYI.cjs.map +1 -1
- package/dist/chunk-4LN4BR2T.cjs.map +1 -1
- package/dist/chunk-4T4XHPYN.cjs.map +1 -1
- package/dist/chunk-5CITBN33.cjs.map +1 -1
- package/dist/chunk-5HCKC4HF.cjs.map +1 -1
- package/dist/chunk-5O2JSQYA.cjs.map +1 -1
- package/dist/{chunk-75FQADKN.cjs → chunk-5QNQRLWX.cjs} +72 -1
- package/dist/chunk-5QNQRLWX.cjs.map +1 -0
- package/dist/chunk-6EBY2KKL.cjs.map +1 -1
- package/dist/chunk-6LFOM6HV.cjs.map +1 -1
- package/dist/chunk-6LOWE2YI.cjs.map +1 -1
- package/dist/chunk-6LSG5Z4T.cjs.map +1 -1
- package/dist/chunk-6SU2MTN2.cjs.map +1 -1
- package/dist/chunk-6YCDLSIU.cjs.map +1 -1
- package/dist/chunk-75E5WNJG.cjs.map +1 -1
- package/dist/chunk-7JV6VVO7.cjs.map +1 -1
- package/dist/chunk-7QZCUXWB.cjs.map +1 -1
- package/dist/chunk-7VXF5D67.cjs.map +1 -1
- package/dist/chunk-ACZ2R47X.cjs.map +1 -1
- package/dist/chunk-AVR2GPXU.cjs.map +1 -1
- package/dist/chunk-AYUYJO3I.cjs.map +1 -1
- package/dist/chunk-BCA3TCGS.cjs.map +1 -1
- package/dist/chunk-BP6KDQ6I.cjs.map +1 -1
- package/dist/chunk-BRY3W7N3.cjs.map +1 -1
- package/dist/chunk-CAMALM35.cjs.map +1 -1
- package/dist/chunk-CCN44NZJ.cjs.map +1 -1
- package/dist/chunk-CKKNFFKP.cjs.map +1 -1
- package/dist/chunk-CR3JBTP3.cjs.map +1 -1
- package/dist/chunk-DJASVBOJ.cjs.map +1 -1
- package/dist/chunk-EEB2HDYL.cjs.map +1 -1
- package/dist/chunk-ENPSUWTS.cjs.map +1 -1
- package/dist/chunk-EQ6P6ZND.cjs.map +1 -1
- package/dist/chunk-EXPWQBI3.cjs.map +1 -1
- package/dist/chunk-F3I5DOWV.cjs.map +1 -1
- package/dist/chunk-F46K5H3U.cjs.map +1 -1
- package/dist/chunk-F6S3WCCB.cjs.map +1 -1
- package/dist/chunk-FG7YBXJQ.cjs.map +1 -1
- package/dist/chunk-FQRC4NJG.cjs.map +1 -1
- package/dist/chunk-FYISDU2Y.cjs.map +1 -1
- package/dist/chunk-GG52SAHA.cjs.map +1 -1
- package/dist/chunk-GK5FWN4H.cjs.map +1 -1
- package/dist/chunk-GSQN5EOO.cjs.map +1 -1
- package/dist/chunk-GW7IHYXR.cjs.map +1 -1
- package/dist/chunk-GWJ33GOK.cjs.map +1 -1
- package/dist/{chunk-LZB4FKZD.js → chunk-GY26OJZF.js} +2 -2
- package/dist/chunk-HHUUSNIL.cjs.map +1 -1
- package/dist/chunk-HLHML5ES.cjs.map +1 -1
- package/dist/chunk-HLKFUOAQ.cjs.map +1 -1
- package/dist/chunk-HLYGHP6F.cjs.map +1 -1
- package/dist/chunk-HSJABE7X.cjs.map +1 -1
- package/dist/chunk-I2W7AO4B.cjs.map +1 -1
- package/dist/chunk-I2XGNALG.cjs.map +1 -1
- package/dist/{chunk-LTMHV6PC.cjs → chunk-I5XG56UR.cjs} +3 -3
- package/dist/chunk-I5XG56UR.cjs.map +1 -0
- package/dist/chunk-IKXGA2Z5.cjs.map +1 -1
- package/dist/chunk-IR2LFKKA.cjs.map +1 -1
- package/dist/chunk-J4ZB7MU4.cjs.map +1 -1
- package/dist/chunk-JJPKURUG.cjs.map +1 -1
- package/dist/chunk-JPRSNCYP.cjs.map +1 -1
- package/dist/chunk-K5Q2H3VD.cjs.map +1 -1
- package/dist/chunk-KD5Y2YWK.cjs.map +1 -1
- package/dist/chunk-KJDMNF2T.cjs.map +1 -1
- package/dist/chunk-KLONGJCL.cjs.map +1 -1
- package/dist/chunk-KOB6MOAV.cjs.map +1 -1
- package/dist/chunk-KSJ7JLR3.cjs.map +1 -1
- package/dist/chunk-LJ2EG6JK.cjs.map +1 -1
- package/dist/chunk-LLYY4TCZ.cjs.map +1 -1
- package/dist/chunk-LYIBTVK6.cjs.map +1 -1
- package/dist/chunk-M3HWE7KT.cjs.map +1 -1
- package/dist/chunk-M3SJHFT4.cjs.map +1 -1
- package/dist/chunk-MCNDMK7F.cjs.map +1 -1
- package/dist/{chunk-UJ7EBPTO.js → chunk-MKMWXXMC.js} +2 -2
- package/dist/chunk-MLG6NXI6.cjs.map +1 -1
- package/dist/chunk-NFB3S2E6.cjs.map +1 -1
- package/dist/chunk-NKDUQ2BI.cjs.map +1 -1
- package/dist/chunk-NYL3BNHR.cjs.map +1 -1
- package/dist/chunk-O4AYHLQX.cjs.map +1 -1
- package/dist/chunk-ODPNVNYE.cjs.map +1 -1
- package/dist/chunk-OG2KJAYD.cjs.map +1 -1
- package/dist/chunk-OWP7XBY2.cjs.map +1 -1
- package/dist/chunk-OYZP6NF6.cjs.map +1 -1
- package/dist/chunk-P6JLNQ6L.cjs.map +1 -1
- package/dist/chunk-P7DYLUUI.cjs.map +1 -1
- package/dist/chunk-PKAE6AQT.cjs.map +1 -1
- package/dist/chunk-Q7M7DO7M.cjs.map +1 -1
- package/dist/chunk-QKUWFMZP.cjs.map +1 -1
- package/dist/chunk-QRSA72B3.cjs.map +1 -1
- package/dist/chunk-QYNRNDIY.cjs.map +1 -1
- package/dist/chunk-R4FE6K43.cjs.map +1 -1
- package/dist/chunk-R4GA6BVP.cjs.map +1 -1
- package/dist/chunk-R5VYSZ3Q.cjs.map +1 -1
- package/dist/chunk-RHFUXHQN.cjs.map +1 -1
- package/dist/chunk-RI42IDRR.cjs.map +1 -1
- package/dist/chunk-RSVLVW4L.cjs.map +1 -1
- package/dist/chunk-S77LQWYC.cjs.map +1 -1
- package/dist/chunk-S7SBNOGS.cjs.map +1 -1
- package/dist/chunk-SQELICSX.cjs.map +1 -1
- package/dist/chunk-TMAJE5P2.cjs.map +1 -1
- package/dist/chunk-TNIJ6OSH.cjs.map +1 -1
- package/dist/chunk-UGSM7RJ2.cjs.map +1 -1
- package/dist/chunk-UKLZAOLW.cjs.map +1 -1
- package/dist/chunk-V47G7P6L.cjs.map +1 -1
- package/dist/chunk-VH5A6SMU.cjs.map +1 -1
- package/dist/chunk-VHMH4QMY.cjs.map +1 -1
- package/dist/chunk-VYC7WUM5.cjs.map +1 -1
- package/dist/chunk-W457XUA6.cjs.map +1 -1
- package/dist/chunk-WHDI3TMP.cjs.map +1 -1
- package/dist/chunk-WITCPKNL.cjs.map +1 -1
- package/dist/chunk-WX6NP7UU.cjs.map +1 -1
- package/dist/chunk-XQLRIBVR.cjs.map +1 -1
- package/dist/{chunk-OUDYJEZN.js → chunk-XR4SKXMH.js} +2 -2
- package/dist/chunk-YJQPKT6W.cjs.map +1 -1
- package/dist/chunk-YK3P5QNZ.cjs.map +1 -1
- package/dist/{chunk-PVVAAENM.cjs → chunk-ZFUGT6YL.cjs} +3 -3
- package/dist/chunk-ZFUGT6YL.cjs.map +1 -0
- package/dist/chunk-ZKPVUCQV.cjs.map +1 -1
- package/dist/{chunk-6H5AJY4O.js → chunk-ZPFPDNBE.js} +72 -1
- package/dist/chunk-ZPFPDNBE.js.map +1 -0
- package/dist/chunk-ZUULK36E.cjs.map +1 -1
- package/dist/client.cjs +2 -2
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/currencies.cjs.map +1 -1
- package/dist/enigmaCardForm.cjs.map +1 -1
- package/dist/error.cjs.map +1 -1
- package/dist/eventStream.cjs.map +1 -1
- package/dist/exportDownload.cjs.map +1 -1
- package/dist/feeProgram.cjs.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/internal/resources/admin.cjs.map +1 -1
- package/dist/internal/resources/adminBranding.cjs.map +1 -1
- package/dist/internal/resources/adminCheckoutDomains.cjs.map +1 -1
- package/dist/internal/resources/adminFeePlans.cjs.map +1 -1
- package/dist/internal/resources/adminFileScans.cjs.map +1 -1
- package/dist/internal/resources/adminIndustries.cjs.map +1 -1
- package/dist/internal/resources/adminLive.cjs.map +1 -1
- package/dist/internal/resources/adminNotices.cjs.map +1 -1
- package/dist/internal/resources/adminPortal.cjs +2 -2
- package/dist/internal/resources/adminPortal.cjs.map +1 -1
- package/dist/internal/resources/adminPortal.js +1 -1
- package/dist/internal/resources/adminSupport.cjs.map +1 -1
- package/dist/internal/resources/auditLogs.cjs.map +1 -1
- package/dist/internal/resources/cache.cjs.map +1 -1
- package/dist/internal/resources/cardIssuers.cjs.map +1 -1
- package/dist/internal/resources/configs.cjs.map +1 -1
- package/dist/internal/resources/connectorRestrictionRules.cjs.map +1 -1
- package/dist/internal/resources/connectorRestrictions.cjs.map +1 -1
- package/dist/internal/resources/diagnostic.cjs.map +1 -1
- package/dist/internal/resources/gsm.cjs.map +1 -1
- package/dist/internal/resources/nativeRenewals.cjs.map +1 -1
- package/dist/internal/resources/platformBilling.cjs.map +1 -1
- package/dist/internal/resources/platformFees.cjs.map +1 -1
- package/dist/internal/resources/platformMessageTemplates.cjs.map +1 -1
- package/dist/internal/resources/platformSettings.cjs.map +1 -1
- package/dist/internal.cjs +7 -7
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +4 -4
- package/dist/listQuery.cjs.map +1 -1
- package/dist/panes.cjs.map +1 -1
- package/dist/paymentPresentation.cjs.map +1 -1
- package/dist/recordCounter.cjs.map +1 -1
- package/dist/resources/aiTools.cjs.map +1 -1
- package/dist/resources/analytics.cjs.map +1 -1
- package/dist/resources/analyticsDashboard.cjs.map +1 -1
- package/dist/resources/apiKeys.cjs.map +1 -1
- package/dist/resources/audit.cjs.map +1 -1
- package/dist/resources/authentication.cjs.map +1 -1
- package/dist/resources/availabilityOverrides.cjs.map +1 -1
- package/dist/resources/billing.cjs.map +1 -1
- package/dist/resources/buyerAccount.cjs.map +1 -1
- package/dist/resources/buyerBlocklist.cjs.map +1 -1
- package/dist/resources/buyerConversations.cjs.map +1 -1
- package/dist/resources/buyerEvidenceReviews.cjs.map +1 -1
- package/dist/resources/buyerPortal.cjs.map +1 -1
- package/dist/resources/cards.cjs.map +1 -1
- package/dist/resources/chargebackPrevention.cjs.map +1 -1
- package/dist/resources/checkoutDomains.cjs.map +1 -1
- package/dist/resources/checkoutMethods.cjs.map +1 -1
- package/dist/resources/checkoutRecovery.cjs.map +1 -1
- package/dist/resources/checkoutTemplates.cjs.map +1 -1
- package/dist/resources/connectors.cjs.map +1 -1
- package/dist/resources/contentEncryption.cjs.map +1 -1
- package/dist/resources/costRules.cjs.map +1 -1
- package/dist/resources/customers.cjs.map +1 -1
- package/dist/resources/deploymentBranding.cjs.map +1 -1
- package/dist/resources/disputes.cjs.map +1 -1
- package/dist/resources/ephemeralKeys.cjs.map +1 -1
- package/dist/resources/events.cjs.map +1 -1
- package/dist/resources/export.cjs.map +1 -1
- package/dist/resources/externalRecords.cjs.map +1 -1
- package/dist/resources/featureMatrix.cjs.map +1 -1
- package/dist/resources/fees.cjs.map +1 -1
- package/dist/resources/files.cjs.map +1 -1
- package/dist/resources/forex.cjs.map +1 -1
- package/dist/resources/identityVerifications.cjs.map +1 -1
- package/dist/resources/industries.cjs.map +1 -1
- package/dist/resources/invoiceSettings.cjs.map +1 -1
- package/dist/resources/invoices.cjs.map +1 -1
- package/dist/resources/live.cjs.map +1 -1
- package/dist/resources/mandates.cjs.map +1 -1
- package/dist/resources/merchantAccounts.cjs.map +1 -1
- package/dist/resources/messageTemplates.cjs.map +1 -1
- package/dist/resources/notices.cjs.map +1 -1
- package/dist/resources/operationLimits.cjs.map +1 -1
- package/dist/resources/paymentLinks.cjs.map +1 -1
- package/dist/resources/paymentMethods.cjs.map +1 -1
- package/dist/resources/payments.cjs.map +1 -1
- package/dist/resources/payoutDestinations.cjs.map +1 -1
- package/dist/resources/payouts.cjs.map +1 -1
- package/dist/resources/paypalDisputes.cjs.map +1 -1
- package/dist/resources/persons.cjs.map +1 -1
- package/dist/resources/poll.cjs.map +1 -1
- package/dist/resources/processorCosts.cjs.map +1 -1
- package/dist/resources/processorImports.cjs.map +1 -1
- package/dist/resources/products.cjs.map +1 -1
- package/dist/resources/profileAcquirers.cjs.map +1 -1
- package/dist/resources/profiles.cjs.map +1 -1
- package/dist/resources/projects.cjs.map +1 -1
- package/dist/resources/refunds.cjs.map +1 -1
- package/dist/resources/regions.cjs.map +1 -1
- package/dist/resources/relay.cjs.map +1 -1
- package/dist/resources/risk.cjs.map +1 -1
- package/dist/resources/routing.cjs.map +1 -1
- package/dist/resources/search.cjs.map +1 -1
- package/dist/resources/sellToRestrictions.cjs.map +1 -1
- package/dist/resources/settings.cjs.map +1 -1
- package/dist/resources/settlement.cjs +2 -2
- package/dist/resources/settlement.cjs.map +1 -1
- package/dist/resources/settlement.d.cts +42 -1
- package/dist/resources/settlement.d.ts +42 -1
- package/dist/resources/settlement.js +1 -1
- package/dist/resources/shopLabels.cjs.map +1 -1
- package/dist/resources/shops.cjs.map +1 -1
- package/dist/resources/stripeConnect.cjs.map +1 -1
- package/dist/resources/subscriptions.cjs.map +1 -1
- package/dist/resources/support.cjs.map +1 -1
- package/dist/resources/threeDsRules.cjs.map +1 -1
- package/dist/resources/users.cjs.map +1 -1
- package/dist/resources/vatRates.cjs.map +1 -1
- package/dist/resources/verification.cjs.map +1 -1
- package/dist/resources/webhooks.cjs.map +1 -1
- package/dist/resources/whopResolutionCases.cjs.map +1 -1
- package/dist/trustedOrigins.cjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +254 -1
- package/dist/types.d.ts +254 -1
- package/package.json +1 -1
- package/dist/chunk-6H5AJY4O.js.map +0 -1
- package/dist/chunk-75FQADKN.cjs.map +0 -1
- package/dist/chunk-LTMHV6PC.cjs.map +0 -1
- package/dist/chunk-OHKZR745.cjs.map +0 -1
- package/dist/chunk-PVVAAENM.cjs.map +0 -1
- /package/dist/{chunk-LZB4FKZD.js.map → chunk-GY26OJZF.js.map} +0 -0
- /package/dist/{chunk-UJ7EBPTO.js.map → chunk-MKMWXXMC.js.map} +0 -0
- /package/dist/{chunk-OUDYJEZN.js.map → chunk-XR4SKXMH.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/tmp/w4-sdk-publish-0443/dist/chunk-ZKPVUCQV.cjs","../src/resources/users.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACsFO,IAAM,MAAA,EAAN,MAAY;AAAA,EACjB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,MAAA,CAAO,MAAA,EAA0E;AACrF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,cAAA,EAAgB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC9D;AAAA,EAEA,MAAM,MAAA,CAAO,MAAA,EAA8C;AACzD,IAAA,OAAO,IAAA,CAAK,O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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQmE,EAAA;AACO,IAAA;AAC1E,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeqE,EAAA;AACa,IAAA;AAClF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuB+B,EAAA;AACsC,IAAA;AAC3D,MAAA;AACP,IAAA;AACH,EAAA;AACF;ADhPqF;AACA;AACA;AACA","file":"/tmp/w4-sdk-publish-0443/dist/chunk-ZKPVUCQV.cjs","sourcesContent":[null,"import type {\n AdminRevokeUserSessionsResponse,\n RolePaymentVisibilityPolicy,\n SignUpRequest,\n SignUpWithMerchantRequest,\n SignInRequest,\n DashboardOAuthProvider,\n DashboardOAuthProvidersResponse,\n DashboardOAuthStartRequest,\n DashboardOAuthLinkStartRequest,\n DashboardOAuthStartResponse,\n DashboardOAuthCompleteRequest,\n DashboardOAuthDisconnectRequest,\n AuthResponse,\n UserResponse,\n ChangePasswordRequest,\n DeleteAccountRequest,\n ForgotPasswordRequest,\n ResetPasswordRequest,\n SwitchMerchantRequest,\n SwitchProfileRequest,\n ImpersonateEmployeeRequest,\n InviteUsersRequest,\n InviteUsersResponse,\n AddUserRequest,\n AddUserResponse,\n UpdateUserRoleRequest,\n DeleteUserRoleRequest,\n ChangeMemberScopeRequest,\n ChangeMemberScopeResponse,\n UpdateMemberExpiryRequest,\n UpdateMemberExpiryResponse,\n GetUserRoleDetailsResponse,\n TeamMemberDetails,\n ReInviteUserRequest,\n ReInviteUserResponse,\n InviteLinkResponse,\n TeamMemberContactProfileResponse,\n UpdateTeamMemberContactsRequest,\n WriteTeamMemberNoteRequest,\n DeleteTeamMemberNoteRequest,\n MemberMethodAccessResponse,\n UpdateMemberMethodAccessRequest,\n MemberPermissionOverridesResponse,\n PermissionOverride,\n UpdateMemberPermissionOverridesRequest,\n ResetTeamMemberPasswordRequest,\n ResetTeamMemberPasswordResponse,\n TotpResponse,\n RecoveryCodesResponse,\n PhoneOtpRequest,\n PhoneOtpResponse,\n PhoneOtpVerifyRequest,\n PhoneOtpVerifyResponse,\n UpdateMetadataRequest,\n SetUserPreferenceRequest,\n UserPreferenceResponse,\n DashboardTourResponse,\n UpdateDashboardTourRequest,\n UpdateUserDetailsRequest,\n FromEmailRequest,\n TokenResponse,\n UserInvitation,\n AcceptInvitationsPreAuthRequest,\n VerifyTotpRequest,\n Terminate2faQueryParams,\n ListInvitableRolesParams,\n ListUsersInLineageParams,\n UserInLineage,\n LoginHistoryParams,\n LoginHistoryResponse,\n UserSessionListResponse,\n UserSessionRevokeResponse,\n ParentGroupInfo,\n RoleConnectorGrant,\n UpdateRoleConnectorGrantParams,\n CreateInvitationLinkRequest,\n CreateInvitationLinkResponse,\n InvitationLinkResponse,\n InvitationLinkPreviewResponse,\n ListInvitationLinksResponse,\n UpdateInvitationLinkRequest,\n JoinInvitationLinkResponse,\n JoinInvitationLinkPreAuthResponse,\n RegisterThroughInvitationLinkRequest,\n RegisterThroughInvitationLinkResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\nimport { csvQuery } from '../listQuery';\n\nexport class Users {\n constructor(private readonly request: RequestFn) {}\n\n async signUp(params: SignUpRequest | SignUpWithMerchantRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/signup', { body: params });\n }\n\n async signIn(params: SignInRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/signin', { body: params });\n }\n\n /** Providers currently configured for dashboard sign-in. */\n async listOAuthProviders(): Promise<DashboardOAuthProvidersResponse> {\n return this.request('GET', '/user/oauth/providers');\n }\n\n /** Current account's links; disabled providers remain visible. */\n async listLinkedOAuthProviders(): Promise<DashboardOAuthProvidersResponse> {\n return this.request('GET', '/user/oauth/linked');\n }\n\n async startOAuthSignIn(params: DashboardOAuthStartRequest): Promise<DashboardOAuthStartResponse> {\n return this.request('POST', '/user/oauth/start', { body: params });\n }\n\n async startOAuthLink(\n params: DashboardOAuthLinkStartRequest,\n ): Promise<DashboardOAuthStartResponse> {\n return this.request('POST', '/user/oauth/link/start', { body: params });\n }\n\n async completeOAuthSignIn(params: DashboardOAuthCompleteRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/oauth/complete', { body: params });\n }\n\n async completeOAuthLink(params: DashboardOAuthCompleteRequest): Promise<void> {\n return this.request('POST', '/user/oauth/link/complete', { body: params });\n }\n\n async disconnectOAuthProvider(\n provider: DashboardOAuthProvider,\n params: DashboardOAuthDisconnectRequest,\n ): Promise<void> {\n return this.request('DELETE', `/user/oauth/linked/${encodeURIComponent(provider)}`, {\n body: params,\n });\n }\n\n async signOut(): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/signout');\n }\n\n /**\n * Sliding-session refresh: exchange the current (still-valid) login JWT\n * for a fresh one with the same claims and a full lifetime. The backend\n * keeps the session's identity (`jti`), slides `user_session.expires_at`\n * forward and re-sets the `login_token` cookie.\n *\n * Requires a token backed by a revocable session (a `jti` claim). Signin\n * and switch-merchant/-profile tokens have one; **session-less tokens do\n * not and are rejected with 400** — team-impersonation tokens are the\n * case in practice, and they are deliberately tab-scoped and\n * time-bounded rather than renewable. A 400 here is not a dead session:\n * the token remains valid for ordinary calls, it simply cannot slide.\n *\n * Rejected (401) for expired, blacklisted or revoked tokens — refresh can\n * only extend a session that is still alive. Rate-limited server-side\n * (429) to one mint per session per minute; treat a 429 as \"still fresh\n * enough\", not as an error.\n *\n * The returned token is NOT applied to this client automatically — pass\n * it to `setJwtToken()`, or use {@link Delopay.refreshSession} which does\n * both.\n *\n * `POST /user/token/refresh`. Requires a logged-in JWT.\n */\n async refreshToken(): Promise<TokenResponse> {\n return this.request('POST', '/user/token/refresh');\n }\n\n /**\n * Paginated login history for the authenticated user -- IP, User-Agent,\n * country / city / lat-lon (when GeoIP is enabled), success and failure\n * events with their reasons. Strictly scoped to the JWT subject; a user\n * can only see their own activity.\n *\n * `GET /user/me/login-activity`. Requires a logged-in JWT.\n *\n * Returns an empty page when a Delopay admin is impersonating a merchant,\n * so the admin's metadata is not exposed inside the merchant dashboard.\n *\n * Newest first unless `sort_by` says otherwise. Several `event_type` or\n * `auth_method` values match an event with any of them.\n */\n async listLoginActivity(params?: LoginHistoryParams): Promise<LoginHistoryResponse> {\n if (params === undefined) {\n return this.request('GET', '/user/me/login-activity');\n }\n return this.request('GET', '/user/me/login-activity', {\n query: csvQuery(params, ['event_type', 'auth_method']),\n });\n }\n\n /**\n * List the authenticated user's currently-active dashboard sessions\n * (one row per minted login JWT that hasn't been revoked or expired).\n *\n * The row matching the JWT making this call has `is_current: true`,\n * which is what lets the dashboard render a \"This device\" tag.\n *\n * `GET /user/me/sessions`. Requires a logged-in JWT. Returns an empty\n * list when a Delopay admin is impersonating a non-admin merchant\n * (same guard as `listLoginActivity`).\n */\n async listActiveSessions(): Promise<UserSessionListResponse> {\n return this.request('GET', '/user/me/sessions');\n }\n\n /**\n * Disconnect one of the authenticated user's sessions. The matching\n * JWT is rejected on its next request — fast-path via Redis, fall back\n * to the persistent `revoked_at` column.\n *\n * Idempotent: revoking an already-revoked or unknown id returns 404,\n * which the caller can treat as success for retry purposes. Revoking\n * a session id that belongs to a different user also returns 404 —\n * the response intentionally doesn't leak whether the id exists.\n *\n * `POST /user/me/sessions/{sessionId}/revoke`.\n */\n async revokeSession(sessionId: string): Promise<UserSessionRevokeResponse> {\n return this.request('POST', `/user/me/sessions/${encodeURIComponent(sessionId)}/revoke`);\n }\n\n async getDetails(): Promise<UserResponse> {\n return this.request('GET', '/user');\n }\n\n async update(params: UpdateUserDetailsRequest, options?: RequestExtras): Promise<UserResponse> {\n return this.request('POST', '/user/update', { body: params, ...options });\n }\n\n /**\n * Read a preference owned by the logged-in user. Missing keys return value null.\n * Works in both dashboards with a login JWT; API keys and impersonation are rejected.\n * Keys contain 1–128 ASCII letters, digits, dots, underscores or hyphens.\n * Unknown widget IDs and their order are preserved; consumers choose what to render.\n */\n async getPreference(key: string): Promise<UserPreferenceResponse> {\n return this.request('GET', `/user/preferences/${encodeURIComponent(key)}`);\n }\n\n /**\n * Save one own preference: omitted/false if_absent replaces it (last write wins);\n * true preserves an existing object and returns the winner. The JSON object is\n * limited to 16 KiB of compact UTF-8 JSON. For layouts, use one namespaced key\n * per page (e.g. merchant.analytics.payments) and ordered widget IDs per region,\n * without titles, fetched metrics or rendered state. Requires a login JWT.\n */\n async setPreference(\n key: string,\n params: SetUserPreferenceRequest,\n ): Promise<UserPreferenceResponse> {\n return this.request('PUT', `/user/preferences/${encodeURIComponent(key)}`, { body: params });\n }\n\n /**\n * Initialize only a missing preference. Existing objects, including a client\n * reset marker saved with setPreference (for example { reset: true }), win. Render/cache the returned value, which may differ from\n * the proposed value. Safe for migration retries after a lost response.\n * Explicit edits and reset markers use setPreference with no if_absent flag.\n * DELETE removes the key; it leaves no marker and permits initialization again.\n * Requires a login JWT and the same key/object limits as setPreference.\n */\n async initializePreference(\n key: string,\n value: Record<string, unknown>,\n ): Promise<UserPreferenceResponse> {\n return this.request('PUT', `/user/preferences/${encodeURIComponent(key)}`, {\n body: { value, if_absent: true },\n });\n }\n\n /**\n * Remove an own preference. Idempotent; returns value null, without storing a\n * tombstone. Later initialization may import a value again. To suppress legacy\n * migration after a reset, save a client reset-marker object with setPreference.\n * Login JWT only.\n */\n async deletePreference(key: string): Promise<UserPreferenceResponse> {\n return this.request('DELETE', `/user/preferences/${encodeURIComponent(key)}`);\n }\n\n /**\n * The caller's guided dashboard tour in the session's scope: their progress,\n * whether to offer the tour now, and their current and acknowledged access.\n * Progress is kept per merchant, or per shop for a user whose role is limited\n * to shops; the scope comes from the session. Login JWT only.\n *\n * `GET /user/dashboard-tour`\n */\n async getDashboardTour(): Promise<DashboardTourResponse> {\n return this.request('GET', '/user/dashboard-tour');\n }\n\n /**\n * Save the caller's tour progress in the session's scope and return the same\n * body as {@link Users.getDashboardTour}. `completed` and `skipped` are added\n * to the stored ones unless `restart` is set; `active`, `baseline` and\n * `offer_handled_at` replace them. `acknowledge_access: true` stores the\n * access the server computes as acknowledged. Unknown fields, malformed step\n * ids or baselines, and more than 300 steps per list are refused; so is any\n * save while acting as another user (`read_only`). Login JWT only.\n *\n * `PUT /user/dashboard-tour`\n */\n async updateDashboardTour(params: UpdateDashboardTourRequest): Promise<DashboardTourResponse> {\n return this.request('PUT', '/user/dashboard-tour', { body: params });\n }\n\n /**\n * RFC 7396 merge-patch the caller's own user-scoped metadata bucket.\n * Returns the full user details, so callers can refresh their context\n * without a second fetch.\n *\n * `PATCH /user/metadata`\n */\n async updateMetadata(params: UpdateMetadataRequest): Promise<UserResponse> {\n return this.request('PATCH', '/user/metadata', { body: params });\n }\n\n /**\n * RFC 7396 merge-patch the merchant-scoped metadata bucket shared by\n * every dashboard user of the merchant. Same response contract as\n * {@link Users.updateMetadata}.\n *\n * `PATCH /user/merchant/metadata`\n */\n async updateMerchantMetadata(params: UpdateMetadataRequest): Promise<UserResponse> {\n return this.request('PATCH', '/user/merchant/metadata', { body: params });\n }\n\n /**\n * Permanently delete the caller's account. Requires a fresh password\n * (and a current 6-digit TOTP code if the user has TOTP enrolled). On\n * success all role assignments are removed, the user record is\n * deactivated, and all in-flight sessions are invalidated. The caller\n * should clear local credentials and route to the login page.\n *\n * Returns `InvalidDeleteOperation` when the caller is the sole\n * owner-level admin of an org / merchant / profile -- they must\n * transfer ownership first.\n */\n async deleteAccount(params: DeleteAccountRequest): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/user/account', { body: params });\n }\n\n async changePassword(params: ChangePasswordRequest): Promise<UserResponse> {\n return this.request('POST', '/user/change-password', { body: params });\n }\n\n async rotatePassword(params: ResetPasswordRequest): Promise<UserResponse> {\n return this.request('POST', '/user/rotate-password', { body: params });\n }\n\n async forgotPassword(params: ForgotPasswordRequest): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/forgot-password', { body: params });\n }\n\n /**\n * Commit a password reset.\n *\n * The caller is responsible for obtaining a `SinglePurposeToken` with\n * `purpose: reset_password` via the email-token exchange + TOTP flow\n * (see `fromEmail`, `beginTotp`, `updateTotp`/`verifyTotp`,\n * `generateRecoveryCodes`, `terminate2fa`) and setting it on the client\n * via `setJwtToken` before calling this method. `body.token` must still\n * be the original `EmailToken` from the reset-link URL — the handler\n * decodes it a second time to find the user.\n */\n async resetPassword(params: ResetPasswordRequest): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/reset-password', { body: params });\n }\n\n /**\n * Exchange an email-link token (`EmailToken`) for a single-purpose JWT\n * that drives the next step of the flow (TOTP, verify email, accept\n * invitation, etc.). No authentication required.\n *\n * The `token_type` in the response tells you which step to run next.\n */\n async fromEmail(params: FromEmailRequest): Promise<TokenResponse> {\n return this.request('POST', '/user/from-email', { body: params });\n }\n\n async verifyEmail(params: Record<string, unknown>): Promise<AuthResponse> {\n return this.request('POST', '/user/verify-email', { body: params });\n }\n\n async sendVerificationEmail(params: ForgotPasswordRequest): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/verify-email-request', { body: params });\n }\n\n async createMerchant(params: Record<string, unknown>): Promise<AuthResponse> {\n return this.request('POST', '/user/create-merchant', { body: params });\n }\n\n async switchMerchant(params: SwitchMerchantRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/switch/merchant', { body: params });\n }\n\n async switchProfile(params: SwitchProfileRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/switch/profile', { body: params });\n }\n\n async listMerchants(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/user/list/merchant');\n }\n\n async listProfiles(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/user/list/profile');\n }\n\n /**\n * Invite team members by email. `POST /user/employees/invite`\n *\n * `project_ids` grants a shop-level role on every shop of each project, once\n * the invitation is accepted. A refusal of `project_ids` is a `UR_23` error whose `data.reason` is one of\n * `project_not_in_merchant`, `role_not_grantable_on_project`,\n * `shop_in_granted_project`, `project_already_granted` or\n * `project_grant_requires_merchant_level`.\n */\n async inviteUsers(params: InviteUsersRequest[]): Promise<InviteUsersResponse[]> {\n return this.request('POST', '/user/employees/invite', { body: params });\n }\n\n /**\n * Add a team member directly, without sending an invite email.\n * `POST /user/employees/add`\n *\n * Unlike `inviteUsers`, the account is active immediately and you hand over\n * the credentials yourself. Omit `password` to have the server generate one\n * and return it once in `password` on the response; supply your own and it is\n * not echoed back. Either way the member must change it on first sign-in.\n *\n * Same role rules as invite: you cannot grant a role above your own, and a\n * shop-scoped caller can only target their own shop. `project_ids` grants a\n * shop-level role on every shop of each project. A refusal of `project_ids` is a `UR_23` error whose `data.reason` is one of\n * `project_not_in_merchant`, `role_not_grantable_on_project`,\n * `shop_in_granted_project`, `project_already_granted` or\n * `project_grant_requires_merchant_level`.\n */\n async addUser(params: AddUserRequest): Promise<AddUserResponse> {\n return this.request('POST', '/user/employees/add', { body: params });\n }\n\n /**\n * Impersonate one of your own team members — `POST /user/employees/impersonate`.\n *\n * Mints a session token **as** the given member, so the dashboard renders\n * exactly what they see (useful for support and role verification). The\n * caller needs the *Impersonation* permission, and the member's role must\n * either rank **strictly below** the caller's\n * (`Profile < Merchant < Organization`), or sit at the caller's own\n * merchant-or-higher level and be **strictly narrower** than the caller's\n * role (grant nothing the caller's role does not, and less in total). The\n * server rejects self-impersonation and cross-merchant targets.\n * `MinimalRoleInfo.can_impersonate` in `listUsersInLineage` answers the same rule\n * per binding, so a UI can offer the action only where it will succeed.\n *\n * A role refusal is a `UR_33` error whose `data.reason` names the rule:\n * `impersonation_target_not_narrower` (the member's role is above, equal to,\n * or not contained in the caller's), or `act_as_token_cannot_impersonate`\n * (the caller is itself signed in as another member — start from your own\n * session).\n *\n * The returned token is tab-scoped by design: open it in a fresh tab (e.g.\n * `/auth/impersonate?token=…`) rather than replacing the caller's own\n * session. No auth cookie is set on the response.\n */\n async impersonateEmployee(params: ImpersonateEmployeeRequest): Promise<TokenResponse> {\n return this.request('POST', '/user/employees/impersonate', { body: params });\n }\n\n async acceptInvitation(params: Record<string, unknown>): Promise<AuthResponse> {\n return this.request('POST', '/user/employees/invite/accept', { body: params });\n }\n\n /**\n * Accept invitations before a session exists.\n *\n * Sign-in issues a `token_type: \"accept_invite\"` step token instead of a\n * session when the caller has no active role yet — every role is still an\n * unaccepted invitation. With that token set via `setJwtToken`, pass the\n * entities from `listInvitations` here; the response is the next step of\n * the sign-in flow (`user_info` for the session, or `force_set_password`\n * first). Rejected when none of the entities carries a pending invitation.\n */\n async acceptInvitationsPreAuth(params: AcceptInvitationsPreAuthRequest): Promise<TokenResponse> {\n return this.request('POST', '/user/employees/invite/accept/pre-auth', { body: params });\n }\n\n /**\n * Accept an invitation via the email-link flow.\n *\n * Caller must already hold a `SinglePurposeToken` with\n * `purpose: accept_invitation_from_email` (obtained via `fromEmail` + any\n * required TOTP step) and have set it on the client via `setJwtToken`.\n * `body.token` must still be the original `EmailToken` from the\n * invite-link URL — the handler decodes it a second time to find the\n * invitee and the entity lineage.\n */\n async acceptInviteFromEmail(params: FromEmailRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/accept-invite-from-email', { body: params });\n }\n\n /**\n * Start TOTP setup (or no-op if already set).\n *\n * Returns the QR-code payload when the user has no TOTP configured yet;\n * returns `{ secret: null }` when the user is already set up (caller\n * should then prompt for a 6-digit code and call `verifyTotp`).\n *\n * Requires `Authorization: Bearer <SPT{purpose:totp}>`.\n */\n async beginTotp(): Promise<TotpResponse> {\n return this.request('GET', '/user/2fa/totp/begin');\n }\n\n /**\n * Verify a 6-digit TOTP code for a user whose TOTP is already set up.\n * Marks the code as used in Redis so subsequent flow steps can advance.\n *\n * Requires `Authorization: Bearer <SPT{purpose:totp}>`.\n */\n async verifyTotp(params: VerifyTotpRequest): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/2fa/totp/verify', { body: params });\n }\n\n async resetTotp(): Promise<Record<string, unknown>> {\n return this.request('GET', '/user/2fa/totp/reset');\n }\n\n async generateRecoveryCodes(): Promise<RecoveryCodesResponse> {\n return this.request('GET', '/user/2fa/recovery-code/generate');\n }\n\n async verifyRecoveryCode(params: Record<string, unknown>): Promise<AuthResponse> {\n return this.request('POST', '/user/2fa/recovery-code/verify', { body: params });\n }\n\n async sendPhoneOtp(params: PhoneOtpRequest): Promise<PhoneOtpResponse> {\n return this.request('POST', '/user/phone/send-otp', { body: params });\n }\n\n async verifyPhoneOtp(params: PhoneOtpVerifyRequest): Promise<PhoneOtpVerifyResponse> {\n return this.request('POST', '/user/phone/verify-otp', { body: params });\n }\n\n /**\n * List all roles visible to the caller (predefined + custom).\n *\n * `GET /user/role/list`. With `groups: true` the response is the\n * parent-groups shape: `[{role_id, role_name, entity_type, role_scope,\n * parent_groups: [{name, description, scopes}]}]`; without it, the\n * deprecated flat `groups` shape.\n *\n * Each role carries `managed_centrally: true` when it is a shared role the\n * platform offers this merchant: it can be assigned, but `updateRole`,\n * `deleteRole` and `updateRoleConnectors` refuse it with `UR_71`\n * (`data.reason: 'managed_centrally'`).\n */\n async listRoles(params?: {\n groups?: boolean;\n entity_type?: string;\n }): Promise<Record<string, unknown>[]> {\n if (params === undefined) {\n return this.request('GET', '/user/role/list');\n }\n return this.request('GET', '/user/role/list', {\n query: { groups: params.groups, entity_type: params.entity_type },\n });\n }\n\n /**\n * The roles a member holds, one entry per role. `POST /user/employees`\n *\n * A project-level role carries `project`: it applies to every shop of that\n * project.\n */\n async listUserRoles(params?: Record<string, unknown>): Promise<GetUserRoleDetailsResponse[]> {\n return this.request('POST', '/user/employees', { body: params });\n }\n\n /**\n * The current role's explicit payment-data policy, or `null` when the role\n * retains its pre-control access. A dashboard hint: every API response\n * enforces the same policy on its own. `GET /user/role/payment-visibility`\n */\n async getRolePaymentVisibility(): Promise<RolePaymentVisibilityPolicy | null> {\n return this.request('GET', '/user/role/payment-visibility');\n }\n\n /**\n * Change a team member's role. `POST /user/employees/update-role`\n *\n * Pass `profile_id` to name the shop when managing a shop's team as a\n * merchant-scoped admin — see {@link UpdateUserRoleRequest.profile_id}.\n */\n async updateUserRole(params: UpdateUserRoleRequest): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/employees/update-role', { body: params });\n }\n\n /**\n * Remove a team member. `DELETE /user/employees/delete`\n *\n * Pass `profile_id` to name the shop when managing a shop's team as a\n * merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}. Pass\n * `project_id` instead to remove a project-level role, which the member then\n * loses on every shop of the project.\n */\n async deleteUserRole(params: DeleteUserRoleRequest): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/user/employees/delete', { body: params });\n }\n\n /**\n * Move a team member between a merchant-level role and shop-level roles.\n * `POST /user/employees/change-scope`\n *\n * A merchant-level `role_id` takes no `profile_ids` or `project_ids`; a\n * shop-level one needs at least one shop or project. A project grants the\n * role on every shop of the project, including shops added later. Every\n * earlier merchant-, project- and shop-level binding of the member in your\n * merchant is replaced. When the change takes a scope away, the\n * member's sessions end (`sessions_revoked: true`). Needs a caller at\n * merchant level or above. A refusal is a `UR_23` error whose `data.reason`\n * names the rule; an unknown `role_id` is `UR_22`. The project rules add the\n * reasons `project_not_in_merchant`, `role_not_grantable_on_project`,\n * `shop_in_granted_project`, `project_already_granted` and\n * `project_grant_requires_merchant_level`.\n */\n async changeMemberScope(params: ChangeMemberScopeRequest): Promise<ChangeMemberScopeResponse> {\n return this.request('POST', '/user/employees/change-scope', { body: params });\n }\n\n /**\n * Set or clear when a team member's access to your merchant ends.\n * `POST /user/employees/update-expiry`\n *\n * Every merchant-, shop- and project-level role the member holds in your\n * merchant, accepted or still an invitation, gets the same `expires_at`.\n * From that instant the roles grant nothing: every request, sign-in, token\n * refresh and switch made with them is refused, and `listUsersInLineage`\n * reports the instant in `MinimalRoleInfo.expires_at`. Send `null` to remove\n * the expiry. A shop-level caller reaches only members whose every role is\n * on its own shop. A refusal is a `UR_70` error whose `data` is an\n * {@link AccessExpiryRefusal}.\n */\n async updateMemberExpiry(params: UpdateMemberExpiryRequest): Promise<UpdateMemberExpiryResponse> {\n return this.request('POST', '/user/employees/update-expiry', { body: params });\n }\n\n /**\n * Create a reusable team invitation link. `POST /user/employees/invitation-links`\n *\n * Each person who joins through it gets `role_id` on the target, up to\n * `max_uses` people, until `expires_at`, and only from the networks and\n * countries `restrictions` allow. Creating it grants nothing and sends\n * nothing. You may grant only what you could invite with; a shop-level\n * caller only for its own shop. The secret to share comes back once, in\n * `token`. A refusal is a `UR_72` error whose `data` is an `InvitationLinkRefusal`.\n */\n async createInvitationLink(\n params: CreateInvitationLinkRequest,\n ): Promise<CreateInvitationLinkResponse> {\n return this.request('POST', '/user/employees/invitation-links', { body: params });\n }\n\n /**\n * Your merchant's team invitation links, newest first, with their usage and\n * status. A shop-level caller sees its own shop's.\n * `GET /user/employees/invitation-links`\n */\n async listInvitationLinks(): Promise<ListInvitationLinksResponse> {\n return this.request('GET', '/user/employees/invitation-links');\n }\n\n /**\n * Change a link's name, limit, expiry, access expiry or restrictions.\n * `PUT /user/employees/invitation-links/{link_id}`\n *\n * Send the whole policy and the `modified_at` you read as `version`. Saving\n * also reconfirms the link under your authority.\n */\n async updateInvitationLink(\n linkId: string,\n params: UpdateInvitationLinkRequest,\n ): Promise<InvitationLinkResponse> {\n return this.request('PUT', `/user/employees/invitation-links/${encodeURIComponent(linkId)}`, {\n body: params,\n });\n }\n\n /**\n * Revoke a link: nobody joins through it from now on, and who already\n * joined keeps their access. Revoking a revoked link answers it unchanged.\n * `POST /user/employees/invitation-links/{link_id}/revoke`\n */\n async revokeInvitationLink(linkId: string): Promise<InvitationLinkResponse> {\n return this.request(\n 'POST',\n `/user/employees/invitation-links/${encodeURIComponent(linkId)}/revoke`,\n );\n }\n\n /**\n * What a shared link offers, before joining. No authentication; grants\n * nothing. `POST /user/invitation-link/preview`\n */\n async previewInvitationLink(token: string): Promise<InvitationLinkPreviewResponse> {\n return this.request('POST', '/user/invitation-link/preview', { body: { token } });\n }\n\n /**\n * Join through a shared link from a signed-in session.\n * `POST /user/invitation-link/join`\n *\n * Needs a verified email address. Joining twice answers `already_member`\n * and uses no second place.\n */\n async joinInvitationLink(token: string): Promise<JoinInvitationLinkResponse> {\n return this.request('POST', '/user/invitation-link/join', { body: { token } });\n }\n\n /**\n * Join through a shared link during sign-in, for someone who holds no access\n * yet: call it with the `accept_invite` single-purpose token set on the\n * client. Answers the token for the next sign-in step.\n * `POST /user/invitation-link/join/pre-auth`\n */\n async joinInvitationLinkPreAuth(token: string): Promise<JoinInvitationLinkPreAuthResponse> {\n return this.request('POST', '/user/invitation-link/join/pre-auth', { body: { token } });\n }\n\n /**\n * Make an account through a shared link, for someone who has none. No\n * authentication. The account holds no access: its owner verifies the\n * address from the email this sends, signs in and joins.\n * `POST /user/invitation-link/register`\n */\n async registerThroughInvitationLink(\n params: RegisterThroughInvitationLinkRequest,\n ): Promise<RegisterThroughInvitationLinkResponse> {\n return this.request('POST', '/user/invitation-link/register', { body: params });\n }\n\n /**\n * One member of your merchant, with the person fields the member list\n * omits. `GET /user/employees/{user_id}/details`\n *\n * Answers only for a member `listUsersInLineage` shows you. Any other id,\n * unknown or not yours, is a 404 `UR_68` with `data.reason:\n * 'member_not_found'`.\n */\n async getTeamMemberDetails(userId: string): Promise<TeamMemberDetails> {\n return this.request('GET', `/user/employees/${encodeURIComponent(userId)}/details`);\n }\n\n /**\n * Supplied contacts and internal notes for a visible member in the current\n * merchant. Requires a session JWT and Users read permission. The returned\n * revision is required even for the first write; can_edit states write access.\n * An unknown or invisible member is refused with the same 404 UR_68 response.\n */\n async getTeamMemberContactProfile(userId: string): Promise<TeamMemberContactProfileResponse> {\n return this.request('GET', `/user/employees/${encodeURIComponent(userId)}/contact-profile`);\n }\n\n /**\n * Replace the supplied contacts, preserving notes and login/recovery identity.\n * Omitted optional contact fields are cleared. Requires Users write permission\n * and authority over the whole member. Send the exact last-read revision.\n * On a changed refusal, keep the draft and read again before resubmitting.\n * Structured UR_68 data is a TeamMemberRefusal with reason contact_profile.\n */\n async updateTeamMemberContacts(\n userId: string,\n params: UpdateTeamMemberContactsRequest,\n ): Promise<TeamMemberContactProfileResponse> {\n return this.request('PUT', `/user/employees/${encodeURIComponent(userId)}/contact-profile`, {\n body: params,\n });\n }\n\n /** Create a plain-text note with server-authored attribution; requires the current revision. */\n async createTeamMemberNote(\n userId: string,\n params: WriteTeamMemberNoteRequest,\n ): Promise<TeamMemberContactProfileResponse> {\n return this.request('POST', `/user/employees/${encodeURIComponent(userId)}/notes`, {\n body: params,\n });\n }\n\n /** Edit one note, retaining its original author and creation time. Uses the same write scope. */\n async updateTeamMemberNote(\n userId: string,\n noteId: string,\n params: WriteTeamMemberNoteRequest,\n ): Promise<TeamMemberContactProfileResponse> {\n return this.request(\n 'PUT',\n `/user/employees/${encodeURIComponent(userId)}/notes/${encodeURIComponent(noteId)}`,\n { body: params },\n );\n }\n\n /**\n * Delete only the named member note. The exact profile revision is sent in the\n * query; contacts and all other notes remain. Returns the new profile revision.\n */\n async deleteTeamMemberNote(\n userId: string,\n noteId: string,\n params: DeleteTeamMemberNoteRequest,\n ): Promise<TeamMemberContactProfileResponse> {\n return this.request(\n 'DELETE',\n `/user/employees/${encodeURIComponent(userId)}/notes/${encodeURIComponent(noteId)}`,\n { query: { expected_revision: params.expected_revision } },\n );\n }\n\n /**\n * Replace a team member's password with a temporary one, returned once.\n * `POST /user/employees/{user_id}/reset-password`\n *\n * Needs the *Users* write permission and the *Impersonation* permission,\n * and the member must be one you could sign in as with\n * `impersonateEmployee`. The member's sessions end, and their next sign-in\n * asks them to choose a new password. Two-factor authentication is left as\n * it is. `TeamMemberDetails.can_reset_password` answers the same rule. A\n * refusal is a `UR_68` error whose `data` is a {@link TeamMemberRefusal}.\n */\n async resetTeamMemberPassword(\n userId: string,\n params: ResetTeamMemberPasswordRequest,\n ): Promise<ResetTeamMemberPasswordResponse> {\n return this.request('POST', `/user/employees/${encodeURIComponent(userId)}/reset-password`, {\n body: params,\n });\n }\n\n /**\n * One team member's sign-in history: successes and failures with method,\n * address, location and device, filtered, sorted and paged as\n * `listLoginActivity` is. `GET /user/employees/{user_id}/login-activity`\n *\n * Needs the *Users* write permission. Answers only for a member\n * `listUsersInLineage` shows you; any other id is a 404 `UR_68` with\n * `data.reason: 'member_not_found'`. Sign-ins belong to the account, so\n * they are shown only for an account wholly in this merchant: refused with\n * a 400 `UR_68` `member_has_access_elsewhere` for an account that also\n * holds a role elsewhere, and `member_not_activated` for one that is only\n * invited. `TeamMemberDetails.can_view_sign_ins` answers the same rule.\n */\n async listTeamMemberLoginActivity(\n userId: string,\n params?: LoginHistoryParams,\n ): Promise<LoginHistoryResponse> {\n const path = `/user/employees/${encodeURIComponent(userId)}/login-activity`;\n if (params === undefined) {\n return this.request('GET', path);\n }\n return this.request('GET', path, {\n query: csvQuery(params, ['event_type', 'auth_method']),\n });\n }\n\n /**\n * One team member's live sessions: neither signed out nor expired.\n * `is_current` marks the caller's own session only.\n * `GET /user/employees/{user_id}/sessions`\n *\n * Same permission and refusals as `listTeamMemberLoginActivity`.\n */\n async listTeamMemberSessions(userId: string): Promise<UserSessionListResponse> {\n return this.request('GET', `/user/employees/${encodeURIComponent(userId)}/sessions`);\n }\n\n /**\n * Sign a team member out everywhere: ends every session and token of the\n * member, at this merchant and at every other merchant the account belongs\n * to. `POST /user/employees/{user_id}/sessions/revoke-all`\n *\n * The account stays active and its password unchanged, so the member can\n * sign in again at once. Allowed on exactly the members whose password you\n * may reset with `resetTeamMemberPassword`, and refused with the same\n * `UR_68` reasons ({@link TeamMemberRefusal}).\n * `TeamMemberDetails.can_sign_out` answers the same rule. Recorded in the\n * audit log.\n */\n async revokeTeamMemberSessions(userId: string): Promise<AdminRevokeUserSessionsResponse> {\n return this.request(\n 'POST',\n `/user/employees/${encodeURIComponent(userId)}/sessions/revoke-all`,\n );\n }\n\n /**\n * Which checkout payment methods a member may change in your merchant.\n * `GET /user/employees/{user_id}/method-access`\n *\n * Needs the *Users* read permission, and answers only for a member\n * `listUsersInLineage` shows you (any other id is a 404 `UR_68` with\n * `data.reason: 'member_not_found'`). `can_edit` says whether you may\n * change it; `grant_all` and `grantable` say which methods you may grant.\n */\n async getMemberMethodAccess(userId: string): Promise<MemberMethodAccessResponse> {\n return this.request('GET', `/user/employees/${encodeURIComponent(userId)}/method-access`);\n }\n\n /**\n * Limit a member to some checkout payment methods, or give every method\n * back. `PUT /user/employees/{user_id}/method-access`\n *\n * Needs the *Connectors* edit and *Payment methods* write permissions and a\n * member within your reach, other than yourself. A caller limited itself\n * grants only within its own limit. The change is audited and applies to\n * the member's next request. A refusal is a `UR_68` whose `data` is\n * `{ reason: 'method_access', refusal }` (see {@link MethodAccessRefusal}).\n */\n async updateMemberMethodAccess(\n userId: string,\n params: UpdateMemberMethodAccessRequest,\n ): Promise<MemberMethodAccessResponse> {\n return this.request('PUT', `/user/employees/${encodeURIComponent(userId)}/method-access`, {\n body: params,\n });\n }\n\n /**\n * A member's permission overrides in your merchant: every area that can be\n * overridden at their level, with what their roles give, the level set for\n * them, and what they have. `GET /user/employees/{user_id}/permission-overrides`\n *\n * Needs the *Users* read permission, and answers only for a member\n * `listUsersInLineage` shows you (any other id is a 404 `UR_68`).\n * `can_edit`, `can_raise` and each area's `grantable_level` say what you\n * may change.\n */\n async getMemberPermissionOverrides(userId: string): Promise<MemberPermissionOverridesResponse> {\n return this.request(\n 'GET',\n `/user/employees/${encodeURIComponent(userId)}/permission-overrides`,\n );\n }\n\n /**\n * Replace a member's permission overrides. An area left out goes back to\n * what their roles give. `PUT /user/employees/{user_id}/permission-overrides`\n *\n * Needs the *Users* write permission and a member within your reach, other\n * than yourself. Keeping or lowering is always allowed; a gain must stay\n * within what you hold in that area, and a gain above the member's roles\n * needs `can_raise`. The change is audited and applies to the member's next\n * request. A refusal is a `UR_68` whose `data` is\n * `{ reason: 'permission_overrides', refusal }` (see\n * {@link PermissionOverrideRefusal}).\n */\n async updateMemberPermissionOverrides(\n userId: string,\n params: UpdateMemberPermissionOverridesRequest,\n ): Promise<MemberPermissionOverridesResponse> {\n return this.request(\n 'PUT',\n `/user/employees/${encodeURIComponent(userId)}/permission-overrides`,\n { body: params },\n );\n }\n\n /**\n * The permission overrides your own session acts under, sorted by area.\n * An area named here has exactly that level, whatever a broader legacy area\n * of the role would suggest. `GET /user/role/permission-overrides`\n */\n async getOwnPermissionOverrides(): Promise<PermissionOverride[]> {\n return this.request('GET', '/user/role/permission-overrides');\n }\n\n /** Sign in via OIDC. `POST /user/oidc` */\n async signInOidc(params: Record<string, unknown>): Promise<AuthResponse> {\n return this.request('POST', '/user/oidc', { body: params });\n }\n\n /** Transfer key. `POST /user/key/transfer` */\n async transferKey(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/key/transfer', { body: params });\n }\n\n /**\n * Invitations still waiting on the caller. `GET /user/list/invitation`\n *\n * Accepts an `accept_invite` step token as well as a session JWT, so it\n * can feed `acceptInvitationsPreAuth` during sign-in. An invitation to a\n * project carries `project_id`; pass it back unchanged when accepting.\n */\n async listInvitations(): Promise<UserInvitation[]> {\n return this.request('GET', '/user/list/invitation');\n }\n\n /** Check 2FA status. `GET /user/2fa` */\n async check2faStatus(): Promise<Record<string, unknown>> {\n return this.request('GET', '/user/2fa');\n }\n\n /**\n * Finish first-time TOTP setup: commit the secret generated by `beginTotp`\n * against a 6-digit code from the user's authenticator app.\n *\n * `PUT /user/2fa/totp/verify`. Requires `Authorization: Bearer <SPT{purpose:totp}>`.\n */\n async updateTotp(params: VerifyTotpRequest): Promise<Record<string, unknown>> {\n return this.request('PUT', '/user/2fa/totp/verify', { body: params });\n }\n\n /**\n * Complete the TOTP step and advance to the next flow stage (e.g.\n * `reset_password`). Returns a fresh single-purpose token with the\n * next `token_type`.\n *\n * `GET /user/2fa/terminate`. Requires `Authorization: Bearer <SPT{purpose:totp}>`.\n */\n async terminate2fa(query?: Terminate2faQueryParams): Promise<TokenResponse> {\n if (query === undefined) {\n return this.request('GET', '/user/2fa/terminate');\n }\n return this.request('GET', '/user/2fa/terminate', {\n query: query as Record<string, boolean | undefined>,\n });\n }\n\n /** Create auth method. `POST /user/auth` */\n async createAuthMethod(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/auth', { body: params });\n }\n\n /** Update auth method. `PUT /user/auth` */\n async updateAuthMethod(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('PUT', '/user/auth', { body: params });\n }\n\n /** List auth methods. `GET /user/auth/list` */\n async listAuthMethods(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/user/auth/list');\n }\n\n /** Get auth URL. `GET /user/auth/url` */\n async getAuthUrl(): Promise<Record<string, unknown>> {\n return this.request('GET', '/user/auth/url');\n }\n\n /** Select auth method. `POST /user/auth/select` */\n async selectAuth(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/auth/select', { body: params });\n }\n\n /**\n * List users in lineage.\n *\n * Needs the Users *view* grant now — the response carries colleagues' email\n * addresses, so a role without it is refused rather than handed a roster.\n * A shop-scoped role keeps reading its own shop's members.\n *\n * `GET /user/employees/list`\n */\n async listUsersInLineage(params?: ListUsersInLineageParams): Promise<UserInLineage[]> {\n return this.request('GET', '/user/employees/list', {\n query: params as Record<string, string | undefined> | undefined,\n });\n }\n\n /**\n * Send a pending member a new invitation link. `POST /user/resend-invite`\n *\n * The new link replaces the one before it, which stops working. It works\n * for `link_valid_for_days` days, 7 by default. Works for any pending member\n * `listUsersInLineage` shows you. A refusal is a `UR_68` error\n * (`no_pending_invitation`, `invite_link_validity_out_of_range`) or a\n * `UR_70` `invitation_expired` when the access the invitation offers has\n * ended.\n */\n async resendInvite(params: ReInviteUserRequest): Promise<ReInviteUserResponse> {\n return this.request('POST', '/user/resend-invite', { body: params });\n }\n\n /**\n * A pending member's current invitation link, or why it is not shown.\n * `GET /user/employees/{user_id}/invite-link`\n *\n * Only the link of an account the invitation created, that nobody has used\n * since, is returned: the link signs its holder in without a password. Every\n * link returned is audited. Needs team write access.\n */\n async getInviteLink(userId: string): Promise<InviteLinkResponse> {\n return this.request('GET', `/user/employees/${encodeURIComponent(userId)}/invite-link`);\n }\n\n /**\n * Get the caller's parent permission groups + scopes.\n *\n * `GET /user/role`\n */\n async getRolePermissions(): Promise<ParentGroupInfo[]> {\n return this.request('GET', '/user/role');\n }\n\n /**\n * List invitable roles. `GET /user/role/list/invite`\n *\n * @param params - Optional query. `entity_type` scopes the role list to a\n * particular entity (e.g. `'merchant'` to list only merchant-scoped roles\n * when inviting employees from the merchant dashboard).\n */\n async listInvitableRoles(params?: ListInvitableRolesParams): Promise<Record<string, unknown>[]> {\n if (params === undefined || params.entity_type === undefined) {\n return this.request('GET', '/user/role/list/invite');\n }\n return this.request('GET', '/user/role/list/invite', {\n query: { entity_type: params.entity_type },\n });\n }\n\n /** List updatable roles. `GET /user/role/list/update` */\n async listUpdatableRoles(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/user/role/list/update');\n }\n\n /** Get parent list. `GET /user/parent/list` */\n async getParentList(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/user/parent/list');\n }\n\n /** Create a role. `POST /user/role` */\n async createRole(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/role', { body: params });\n }\n\n /** Get role by ID. `GET /user/role/{roleId}` */\n async getRoleById(roleId: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/user/role/${encodeURIComponent(roleId)}`);\n }\n\n /** Update role by ID. `PUT /user/role/{roleId}` */\n async updateRole(\n roleId: string,\n params: Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<Record<string, unknown>> {\n return this.request('PUT', `/user/role/${encodeURIComponent(roleId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Delete a custom role. Predefined roles and roles still assigned to\n * team members are rejected by the backend with a 400.\n *\n * `DELETE /user/role/{roleId}`\n */\n async deleteRole(roleId: string): Promise<Record<string, unknown>> {\n return this.request('DELETE', `/user/role/${encodeURIComponent(roleId)}`);\n }\n\n /**\n * Read which individual connector accounts a role may see.\n *\n * `GET /user/role/{roleId}/connectors`\n *\n * **Check `restricted` before reading `connectors`.** An empty list is\n * ambiguous by itself, so the backend states which case it is: `false` means\n * the role holds no grant and sees whatever its entity and profile scope\n * already allowed. Rendering an empty `connectors` array as \"this role sees\n * nothing\" inverts the meaning.\n *\n * Requires the permission that *edits a role*, not a connector permission.\n */\n async getRoleConnectors(roleId: string): Promise<RoleConnectorGrant> {\n return this.request('GET', `/user/role/${encodeURIComponent(roleId)}/connectors`);\n }\n\n /**\n * Replace the set of connector accounts a role may see.\n *\n * `PUT /user/role/{roleId}/connectors`\n *\n * The call **replaces** the whole set rather than adding to it, so send the\n * complete list every time. An empty `merchant_connector_ids` clears the\n * grant and returns the role to unrestricted.\n *\n * The backend refuses an id that is not a connector account of the caller's\n * own merchant, an `Organization`-scoped role (a connector account belongs to\n * exactly one merchant, so an org-spanning role cannot hold one coherently),\n * and any predefined role (one static entry shared by every tenant).\n *\n * Editing a grant invalidates the role cache and blacklists tokens minted\n * before the edit, so **users holding this role must sign in again**. Worth\n * saying in the UI before the save, not after.\n */\n async updateRoleConnectors(\n roleId: string,\n params: UpdateRoleConnectorGrantParams,\n ): Promise<RoleConnectorGrant> {\n return this.request('PUT', `/user/role/${encodeURIComponent(roleId)}/connectors`, {\n body: params,\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/tmp/w4-sdk447/dist/chunk-ZKPVUCQV.cjs","../src/resources/users.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACsFO,IAAM,MAAA,EAAN,MAAY;AAAA,EACjB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA,EAElD,MAAM,MAAA,CAAO,MAAA,EAA0E;AACrF,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,MAAA,EAAQ,cAAA,EAAgB,EAAE,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC9D;AAAA,EAEA,MAAM,MAAA,CAAO,MAAA,EAA8C;AACzD,IAAA,OAAO,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AA;AACH,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQmE,EAAA;AACO,IAAA;AAC1E,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeqE,EAAA;AACa,IAAA;AAClF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuB+B,EAAA;AACsC,IAAA;AAC3D,MAAA;AACP,IAAA;AACH,EAAA;AACF;ADhPqF;AACA;AACA;AACA","file":"/tmp/w4-sdk447/dist/chunk-ZKPVUCQV.cjs","sourcesContent":[null,"import type {\n AdminRevokeUserSessionsResponse,\n RolePaymentVisibilityPolicy,\n SignUpRequest,\n SignUpWithMerchantRequest,\n SignInRequest,\n DashboardOAuthProvider,\n DashboardOAuthProvidersResponse,\n DashboardOAuthStartRequest,\n DashboardOAuthLinkStartRequest,\n DashboardOAuthStartResponse,\n DashboardOAuthCompleteRequest,\n DashboardOAuthDisconnectRequest,\n AuthResponse,\n UserResponse,\n ChangePasswordRequest,\n DeleteAccountRequest,\n ForgotPasswordRequest,\n ResetPasswordRequest,\n SwitchMerchantRequest,\n SwitchProfileRequest,\n ImpersonateEmployeeRequest,\n InviteUsersRequest,\n InviteUsersResponse,\n AddUserRequest,\n AddUserResponse,\n UpdateUserRoleRequest,\n DeleteUserRoleRequest,\n ChangeMemberScopeRequest,\n ChangeMemberScopeResponse,\n UpdateMemberExpiryRequest,\n UpdateMemberExpiryResponse,\n GetUserRoleDetailsResponse,\n TeamMemberDetails,\n ReInviteUserRequest,\n ReInviteUserResponse,\n InviteLinkResponse,\n TeamMemberContactProfileResponse,\n UpdateTeamMemberContactsRequest,\n WriteTeamMemberNoteRequest,\n DeleteTeamMemberNoteRequest,\n MemberMethodAccessResponse,\n UpdateMemberMethodAccessRequest,\n MemberPermissionOverridesResponse,\n PermissionOverride,\n UpdateMemberPermissionOverridesRequest,\n ResetTeamMemberPasswordRequest,\n ResetTeamMemberPasswordResponse,\n TotpResponse,\n RecoveryCodesResponse,\n PhoneOtpRequest,\n PhoneOtpResponse,\n PhoneOtpVerifyRequest,\n PhoneOtpVerifyResponse,\n UpdateMetadataRequest,\n SetUserPreferenceRequest,\n UserPreferenceResponse,\n DashboardTourResponse,\n UpdateDashboardTourRequest,\n UpdateUserDetailsRequest,\n FromEmailRequest,\n TokenResponse,\n UserInvitation,\n AcceptInvitationsPreAuthRequest,\n VerifyTotpRequest,\n Terminate2faQueryParams,\n ListInvitableRolesParams,\n ListUsersInLineageParams,\n UserInLineage,\n LoginHistoryParams,\n LoginHistoryResponse,\n UserSessionListResponse,\n UserSessionRevokeResponse,\n ParentGroupInfo,\n RoleConnectorGrant,\n UpdateRoleConnectorGrantParams,\n CreateInvitationLinkRequest,\n CreateInvitationLinkResponse,\n InvitationLinkResponse,\n InvitationLinkPreviewResponse,\n ListInvitationLinksResponse,\n UpdateInvitationLinkRequest,\n JoinInvitationLinkResponse,\n JoinInvitationLinkPreAuthResponse,\n RegisterThroughInvitationLinkRequest,\n RegisterThroughInvitationLinkResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\nimport { csvQuery } from '../listQuery';\n\nexport class Users {\n constructor(private readonly request: RequestFn) {}\n\n async signUp(params: SignUpRequest | SignUpWithMerchantRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/signup', { body: params });\n }\n\n async signIn(params: SignInRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/signin', { body: params });\n }\n\n /** Providers currently configured for dashboard sign-in. */\n async listOAuthProviders(): Promise<DashboardOAuthProvidersResponse> {\n return this.request('GET', '/user/oauth/providers');\n }\n\n /** Current account's links; disabled providers remain visible. */\n async listLinkedOAuthProviders(): Promise<DashboardOAuthProvidersResponse> {\n return this.request('GET', '/user/oauth/linked');\n }\n\n async startOAuthSignIn(params: DashboardOAuthStartRequest): Promise<DashboardOAuthStartResponse> {\n return this.request('POST', '/user/oauth/start', { body: params });\n }\n\n async startOAuthLink(\n params: DashboardOAuthLinkStartRequest,\n ): Promise<DashboardOAuthStartResponse> {\n return this.request('POST', '/user/oauth/link/start', { body: params });\n }\n\n async completeOAuthSignIn(params: DashboardOAuthCompleteRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/oauth/complete', { body: params });\n }\n\n async completeOAuthLink(params: DashboardOAuthCompleteRequest): Promise<void> {\n return this.request('POST', '/user/oauth/link/complete', { body: params });\n }\n\n async disconnectOAuthProvider(\n provider: DashboardOAuthProvider,\n params: DashboardOAuthDisconnectRequest,\n ): Promise<void> {\n return this.request('DELETE', `/user/oauth/linked/${encodeURIComponent(provider)}`, {\n body: params,\n });\n }\n\n async signOut(): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/signout');\n }\n\n /**\n * Sliding-session refresh: exchange the current (still-valid) login JWT\n * for a fresh one with the same claims and a full lifetime. The backend\n * keeps the session's identity (`jti`), slides `user_session.expires_at`\n * forward and re-sets the `login_token` cookie.\n *\n * Requires a token backed by a revocable session (a `jti` claim). Signin\n * and switch-merchant/-profile tokens have one; **session-less tokens do\n * not and are rejected with 400** — team-impersonation tokens are the\n * case in practice, and they are deliberately tab-scoped and\n * time-bounded rather than renewable. A 400 here is not a dead session:\n * the token remains valid for ordinary calls, it simply cannot slide.\n *\n * Rejected (401) for expired, blacklisted or revoked tokens — refresh can\n * only extend a session that is still alive. Rate-limited server-side\n * (429) to one mint per session per minute; treat a 429 as \"still fresh\n * enough\", not as an error.\n *\n * The returned token is NOT applied to this client automatically — pass\n * it to `setJwtToken()`, or use {@link Delopay.refreshSession} which does\n * both.\n *\n * `POST /user/token/refresh`. Requires a logged-in JWT.\n */\n async refreshToken(): Promise<TokenResponse> {\n return this.request('POST', '/user/token/refresh');\n }\n\n /**\n * Paginated login history for the authenticated user -- IP, User-Agent,\n * country / city / lat-lon (when GeoIP is enabled), success and failure\n * events with their reasons. Strictly scoped to the JWT subject; a user\n * can only see their own activity.\n *\n * `GET /user/me/login-activity`. Requires a logged-in JWT.\n *\n * Returns an empty page when a Delopay admin is impersonating a merchant,\n * so the admin's metadata is not exposed inside the merchant dashboard.\n *\n * Newest first unless `sort_by` says otherwise. Several `event_type` or\n * `auth_method` values match an event with any of them.\n */\n async listLoginActivity(params?: LoginHistoryParams): Promise<LoginHistoryResponse> {\n if (params === undefined) {\n return this.request('GET', '/user/me/login-activity');\n }\n return this.request('GET', '/user/me/login-activity', {\n query: csvQuery(params, ['event_type', 'auth_method']),\n });\n }\n\n /**\n * List the authenticated user's currently-active dashboard sessions\n * (one row per minted login JWT that hasn't been revoked or expired).\n *\n * The row matching the JWT making this call has `is_current: true`,\n * which is what lets the dashboard render a \"This device\" tag.\n *\n * `GET /user/me/sessions`. Requires a logged-in JWT. Returns an empty\n * list when a Delopay admin is impersonating a non-admin merchant\n * (same guard as `listLoginActivity`).\n */\n async listActiveSessions(): Promise<UserSessionListResponse> {\n return this.request('GET', '/user/me/sessions');\n }\n\n /**\n * Disconnect one of the authenticated user's sessions. The matching\n * JWT is rejected on its next request — fast-path via Redis, fall back\n * to the persistent `revoked_at` column.\n *\n * Idempotent: revoking an already-revoked or unknown id returns 404,\n * which the caller can treat as success for retry purposes. Revoking\n * a session id that belongs to a different user also returns 404 —\n * the response intentionally doesn't leak whether the id exists.\n *\n * `POST /user/me/sessions/{sessionId}/revoke`.\n */\n async revokeSession(sessionId: string): Promise<UserSessionRevokeResponse> {\n return this.request('POST', `/user/me/sessions/${encodeURIComponent(sessionId)}/revoke`);\n }\n\n async getDetails(): Promise<UserResponse> {\n return this.request('GET', '/user');\n }\n\n async update(params: UpdateUserDetailsRequest, options?: RequestExtras): Promise<UserResponse> {\n return this.request('POST', '/user/update', { body: params, ...options });\n }\n\n /**\n * Read a preference owned by the logged-in user. Missing keys return value null.\n * Works in both dashboards with a login JWT; API keys and impersonation are rejected.\n * Keys contain 1–128 ASCII letters, digits, dots, underscores or hyphens.\n * Unknown widget IDs and their order are preserved; consumers choose what to render.\n */\n async getPreference(key: string): Promise<UserPreferenceResponse> {\n return this.request('GET', `/user/preferences/${encodeURIComponent(key)}`);\n }\n\n /**\n * Save one own preference: omitted/false if_absent replaces it (last write wins);\n * true preserves an existing object and returns the winner. The JSON object is\n * limited to 16 KiB of compact UTF-8 JSON. For layouts, use one namespaced key\n * per page (e.g. merchant.analytics.payments) and ordered widget IDs per region,\n * without titles, fetched metrics or rendered state. Requires a login JWT.\n */\n async setPreference(\n key: string,\n params: SetUserPreferenceRequest,\n ): Promise<UserPreferenceResponse> {\n return this.request('PUT', `/user/preferences/${encodeURIComponent(key)}`, { body: params });\n }\n\n /**\n * Initialize only a missing preference. Existing objects, including a client\n * reset marker saved with setPreference (for example { reset: true }), win. Render/cache the returned value, which may differ from\n * the proposed value. Safe for migration retries after a lost response.\n * Explicit edits and reset markers use setPreference with no if_absent flag.\n * DELETE removes the key; it leaves no marker and permits initialization again.\n * Requires a login JWT and the same key/object limits as setPreference.\n */\n async initializePreference(\n key: string,\n value: Record<string, unknown>,\n ): Promise<UserPreferenceResponse> {\n return this.request('PUT', `/user/preferences/${encodeURIComponent(key)}`, {\n body: { value, if_absent: true },\n });\n }\n\n /**\n * Remove an own preference. Idempotent; returns value null, without storing a\n * tombstone. Later initialization may import a value again. To suppress legacy\n * migration after a reset, save a client reset-marker object with setPreference.\n * Login JWT only.\n */\n async deletePreference(key: string): Promise<UserPreferenceResponse> {\n return this.request('DELETE', `/user/preferences/${encodeURIComponent(key)}`);\n }\n\n /**\n * The caller's guided dashboard tour in the session's scope: their progress,\n * whether to offer the tour now, and their current and acknowledged access.\n * Progress is kept per merchant, or per shop for a user whose role is limited\n * to shops; the scope comes from the session. Login JWT only.\n *\n * `GET /user/dashboard-tour`\n */\n async getDashboardTour(): Promise<DashboardTourResponse> {\n return this.request('GET', '/user/dashboard-tour');\n }\n\n /**\n * Save the caller's tour progress in the session's scope and return the same\n * body as {@link Users.getDashboardTour}. `completed` and `skipped` are added\n * to the stored ones unless `restart` is set; `active`, `baseline` and\n * `offer_handled_at` replace them. `acknowledge_access: true` stores the\n * access the server computes as acknowledged. Unknown fields, malformed step\n * ids or baselines, and more than 300 steps per list are refused; so is any\n * save while acting as another user (`read_only`). Login JWT only.\n *\n * `PUT /user/dashboard-tour`\n */\n async updateDashboardTour(params: UpdateDashboardTourRequest): Promise<DashboardTourResponse> {\n return this.request('PUT', '/user/dashboard-tour', { body: params });\n }\n\n /**\n * RFC 7396 merge-patch the caller's own user-scoped metadata bucket.\n * Returns the full user details, so callers can refresh their context\n * without a second fetch.\n *\n * `PATCH /user/metadata`\n */\n async updateMetadata(params: UpdateMetadataRequest): Promise<UserResponse> {\n return this.request('PATCH', '/user/metadata', { body: params });\n }\n\n /**\n * RFC 7396 merge-patch the merchant-scoped metadata bucket shared by\n * every dashboard user of the merchant. Same response contract as\n * {@link Users.updateMetadata}.\n *\n * `PATCH /user/merchant/metadata`\n */\n async updateMerchantMetadata(params: UpdateMetadataRequest): Promise<UserResponse> {\n return this.request('PATCH', '/user/merchant/metadata', { body: params });\n }\n\n /**\n * Permanently delete the caller's account. Requires a fresh password\n * (and a current 6-digit TOTP code if the user has TOTP enrolled). On\n * success all role assignments are removed, the user record is\n * deactivated, and all in-flight sessions are invalidated. The caller\n * should clear local credentials and route to the login page.\n *\n * Returns `InvalidDeleteOperation` when the caller is the sole\n * owner-level admin of an org / merchant / profile -- they must\n * transfer ownership first.\n */\n async deleteAccount(params: DeleteAccountRequest): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/user/account', { body: params });\n }\n\n async changePassword(params: ChangePasswordRequest): Promise<UserResponse> {\n return this.request('POST', '/user/change-password', { body: params });\n }\n\n async rotatePassword(params: ResetPasswordRequest): Promise<UserResponse> {\n return this.request('POST', '/user/rotate-password', { body: params });\n }\n\n async forgotPassword(params: ForgotPasswordRequest): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/forgot-password', { body: params });\n }\n\n /**\n * Commit a password reset.\n *\n * The caller is responsible for obtaining a `SinglePurposeToken` with\n * `purpose: reset_password` via the email-token exchange + TOTP flow\n * (see `fromEmail`, `beginTotp`, `updateTotp`/`verifyTotp`,\n * `generateRecoveryCodes`, `terminate2fa`) and setting it on the client\n * via `setJwtToken` before calling this method. `body.token` must still\n * be the original `EmailToken` from the reset-link URL — the handler\n * decodes it a second time to find the user.\n */\n async resetPassword(params: ResetPasswordRequest): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/reset-password', { body: params });\n }\n\n /**\n * Exchange an email-link token (`EmailToken`) for a single-purpose JWT\n * that drives the next step of the flow (TOTP, verify email, accept\n * invitation, etc.). No authentication required.\n *\n * The `token_type` in the response tells you which step to run next.\n */\n async fromEmail(params: FromEmailRequest): Promise<TokenResponse> {\n return this.request('POST', '/user/from-email', { body: params });\n }\n\n async verifyEmail(params: Record<string, unknown>): Promise<AuthResponse> {\n return this.request('POST', '/user/verify-email', { body: params });\n }\n\n async sendVerificationEmail(params: ForgotPasswordRequest): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/verify-email-request', { body: params });\n }\n\n async createMerchant(params: Record<string, unknown>): Promise<AuthResponse> {\n return this.request('POST', '/user/create-merchant', { body: params });\n }\n\n async switchMerchant(params: SwitchMerchantRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/switch/merchant', { body: params });\n }\n\n async switchProfile(params: SwitchProfileRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/switch/profile', { body: params });\n }\n\n async listMerchants(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/user/list/merchant');\n }\n\n async listProfiles(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/user/list/profile');\n }\n\n /**\n * Invite team members by email. `POST /user/employees/invite`\n *\n * `project_ids` grants a shop-level role on every shop of each project, once\n * the invitation is accepted. A refusal of `project_ids` is a `UR_23` error whose `data.reason` is one of\n * `project_not_in_merchant`, `role_not_grantable_on_project`,\n * `shop_in_granted_project`, `project_already_granted` or\n * `project_grant_requires_merchant_level`.\n */\n async inviteUsers(params: InviteUsersRequest[]): Promise<InviteUsersResponse[]> {\n return this.request('POST', '/user/employees/invite', { body: params });\n }\n\n /**\n * Add a team member directly, without sending an invite email.\n * `POST /user/employees/add`\n *\n * Unlike `inviteUsers`, the account is active immediately and you hand over\n * the credentials yourself. Omit `password` to have the server generate one\n * and return it once in `password` on the response; supply your own and it is\n * not echoed back. Either way the member must change it on first sign-in.\n *\n * Same role rules as invite: you cannot grant a role above your own, and a\n * shop-scoped caller can only target their own shop. `project_ids` grants a\n * shop-level role on every shop of each project. A refusal of `project_ids` is a `UR_23` error whose `data.reason` is one of\n * `project_not_in_merchant`, `role_not_grantable_on_project`,\n * `shop_in_granted_project`, `project_already_granted` or\n * `project_grant_requires_merchant_level`.\n */\n async addUser(params: AddUserRequest): Promise<AddUserResponse> {\n return this.request('POST', '/user/employees/add', { body: params });\n }\n\n /**\n * Impersonate one of your own team members — `POST /user/employees/impersonate`.\n *\n * Mints a session token **as** the given member, so the dashboard renders\n * exactly what they see (useful for support and role verification). The\n * caller needs the *Impersonation* permission, and the member's role must\n * either rank **strictly below** the caller's\n * (`Profile < Merchant < Organization`), or sit at the caller's own\n * merchant-or-higher level and be **strictly narrower** than the caller's\n * role (grant nothing the caller's role does not, and less in total). The\n * server rejects self-impersonation and cross-merchant targets.\n * `MinimalRoleInfo.can_impersonate` in `listUsersInLineage` answers the same rule\n * per binding, so a UI can offer the action only where it will succeed.\n *\n * A role refusal is a `UR_33` error whose `data.reason` names the rule:\n * `impersonation_target_not_narrower` (the member's role is above, equal to,\n * or not contained in the caller's), or `act_as_token_cannot_impersonate`\n * (the caller is itself signed in as another member — start from your own\n * session).\n *\n * The returned token is tab-scoped by design: open it in a fresh tab (e.g.\n * `/auth/impersonate?token=…`) rather than replacing the caller's own\n * session. No auth cookie is set on the response.\n */\n async impersonateEmployee(params: ImpersonateEmployeeRequest): Promise<TokenResponse> {\n return this.request('POST', '/user/employees/impersonate', { body: params });\n }\n\n async acceptInvitation(params: Record<string, unknown>): Promise<AuthResponse> {\n return this.request('POST', '/user/employees/invite/accept', { body: params });\n }\n\n /**\n * Accept invitations before a session exists.\n *\n * Sign-in issues a `token_type: \"accept_invite\"` step token instead of a\n * session when the caller has no active role yet — every role is still an\n * unaccepted invitation. With that token set via `setJwtToken`, pass the\n * entities from `listInvitations` here; the response is the next step of\n * the sign-in flow (`user_info` for the session, or `force_set_password`\n * first). Rejected when none of the entities carries a pending invitation.\n */\n async acceptInvitationsPreAuth(params: AcceptInvitationsPreAuthRequest): Promise<TokenResponse> {\n return this.request('POST', '/user/employees/invite/accept/pre-auth', { body: params });\n }\n\n /**\n * Accept an invitation via the email-link flow.\n *\n * Caller must already hold a `SinglePurposeToken` with\n * `purpose: accept_invitation_from_email` (obtained via `fromEmail` + any\n * required TOTP step) and have set it on the client via `setJwtToken`.\n * `body.token` must still be the original `EmailToken` from the\n * invite-link URL — the handler decodes it a second time to find the\n * invitee and the entity lineage.\n */\n async acceptInviteFromEmail(params: FromEmailRequest): Promise<AuthResponse> {\n return this.request('POST', '/user/accept-invite-from-email', { body: params });\n }\n\n /**\n * Start TOTP setup (or no-op if already set).\n *\n * Returns the QR-code payload when the user has no TOTP configured yet;\n * returns `{ secret: null }` when the user is already set up (caller\n * should then prompt for a 6-digit code and call `verifyTotp`).\n *\n * Requires `Authorization: Bearer <SPT{purpose:totp}>`.\n */\n async beginTotp(): Promise<TotpResponse> {\n return this.request('GET', '/user/2fa/totp/begin');\n }\n\n /**\n * Verify a 6-digit TOTP code for a user whose TOTP is already set up.\n * Marks the code as used in Redis so subsequent flow steps can advance.\n *\n * Requires `Authorization: Bearer <SPT{purpose:totp}>`.\n */\n async verifyTotp(params: VerifyTotpRequest): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/2fa/totp/verify', { body: params });\n }\n\n async resetTotp(): Promise<Record<string, unknown>> {\n return this.request('GET', '/user/2fa/totp/reset');\n }\n\n async generateRecoveryCodes(): Promise<RecoveryCodesResponse> {\n return this.request('GET', '/user/2fa/recovery-code/generate');\n }\n\n async verifyRecoveryCode(params: Record<string, unknown>): Promise<AuthResponse> {\n return this.request('POST', '/user/2fa/recovery-code/verify', { body: params });\n }\n\n async sendPhoneOtp(params: PhoneOtpRequest): Promise<PhoneOtpResponse> {\n return this.request('POST', '/user/phone/send-otp', { body: params });\n }\n\n async verifyPhoneOtp(params: PhoneOtpVerifyRequest): Promise<PhoneOtpVerifyResponse> {\n return this.request('POST', '/user/phone/verify-otp', { body: params });\n }\n\n /**\n * List all roles visible to the caller (predefined + custom).\n *\n * `GET /user/role/list`. With `groups: true` the response is the\n * parent-groups shape: `[{role_id, role_name, entity_type, role_scope,\n * parent_groups: [{name, description, scopes}]}]`; without it, the\n * deprecated flat `groups` shape.\n *\n * Each role carries `managed_centrally: true` when it is a shared role the\n * platform offers this merchant: it can be assigned, but `updateRole`,\n * `deleteRole` and `updateRoleConnectors` refuse it with `UR_71`\n * (`data.reason: 'managed_centrally'`).\n */\n async listRoles(params?: {\n groups?: boolean;\n entity_type?: string;\n }): Promise<Record<string, unknown>[]> {\n if (params === undefined) {\n return this.request('GET', '/user/role/list');\n }\n return this.request('GET', '/user/role/list', {\n query: { groups: params.groups, entity_type: params.entity_type },\n });\n }\n\n /**\n * The roles a member holds, one entry per role. `POST /user/employees`\n *\n * A project-level role carries `project`: it applies to every shop of that\n * project.\n */\n async listUserRoles(params?: Record<string, unknown>): Promise<GetUserRoleDetailsResponse[]> {\n return this.request('POST', '/user/employees', { body: params });\n }\n\n /**\n * The current role's explicit payment-data policy, or `null` when the role\n * retains its pre-control access. A dashboard hint: every API response\n * enforces the same policy on its own. `GET /user/role/payment-visibility`\n */\n async getRolePaymentVisibility(): Promise<RolePaymentVisibilityPolicy | null> {\n return this.request('GET', '/user/role/payment-visibility');\n }\n\n /**\n * Change a team member's role. `POST /user/employees/update-role`\n *\n * Pass `profile_id` to name the shop when managing a shop's team as a\n * merchant-scoped admin — see {@link UpdateUserRoleRequest.profile_id}.\n */\n async updateUserRole(params: UpdateUserRoleRequest): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/employees/update-role', { body: params });\n }\n\n /**\n * Remove a team member. `DELETE /user/employees/delete`\n *\n * Pass `profile_id` to name the shop when managing a shop's team as a\n * merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}. Pass\n * `project_id` instead to remove a project-level role, which the member then\n * loses on every shop of the project.\n */\n async deleteUserRole(params: DeleteUserRoleRequest): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/user/employees/delete', { body: params });\n }\n\n /**\n * Move a team member between a merchant-level role and shop-level roles.\n * `POST /user/employees/change-scope`\n *\n * A merchant-level `role_id` takes no `profile_ids` or `project_ids`; a\n * shop-level one needs at least one shop or project. A project grants the\n * role on every shop of the project, including shops added later. Every\n * earlier merchant-, project- and shop-level binding of the member in your\n * merchant is replaced. When the change takes a scope away, the\n * member's sessions end (`sessions_revoked: true`). Needs a caller at\n * merchant level or above. A refusal is a `UR_23` error whose `data.reason`\n * names the rule; an unknown `role_id` is `UR_22`. The project rules add the\n * reasons `project_not_in_merchant`, `role_not_grantable_on_project`,\n * `shop_in_granted_project`, `project_already_granted` and\n * `project_grant_requires_merchant_level`.\n */\n async changeMemberScope(params: ChangeMemberScopeRequest): Promise<ChangeMemberScopeResponse> {\n return this.request('POST', '/user/employees/change-scope', { body: params });\n }\n\n /**\n * Set or clear when a team member's access to your merchant ends.\n * `POST /user/employees/update-expiry`\n *\n * Every merchant-, shop- and project-level role the member holds in your\n * merchant, accepted or still an invitation, gets the same `expires_at`.\n * From that instant the roles grant nothing: every request, sign-in, token\n * refresh and switch made with them is refused, and `listUsersInLineage`\n * reports the instant in `MinimalRoleInfo.expires_at`. Send `null` to remove\n * the expiry. A shop-level caller reaches only members whose every role is\n * on its own shop. A refusal is a `UR_70` error whose `data` is an\n * {@link AccessExpiryRefusal}.\n */\n async updateMemberExpiry(params: UpdateMemberExpiryRequest): Promise<UpdateMemberExpiryResponse> {\n return this.request('POST', '/user/employees/update-expiry', { body: params });\n }\n\n /**\n * Create a reusable team invitation link. `POST /user/employees/invitation-links`\n *\n * Each person who joins through it gets `role_id` on the target, up to\n * `max_uses` people, until `expires_at`, and only from the networks and\n * countries `restrictions` allow. Creating it grants nothing and sends\n * nothing. You may grant only what you could invite with; a shop-level\n * caller only for its own shop. The secret to share comes back once, in\n * `token`. A refusal is a `UR_72` error whose `data` is an `InvitationLinkRefusal`.\n */\n async createInvitationLink(\n params: CreateInvitationLinkRequest,\n ): Promise<CreateInvitationLinkResponse> {\n return this.request('POST', '/user/employees/invitation-links', { body: params });\n }\n\n /**\n * Your merchant's team invitation links, newest first, with their usage and\n * status. A shop-level caller sees its own shop's.\n * `GET /user/employees/invitation-links`\n */\n async listInvitationLinks(): Promise<ListInvitationLinksResponse> {\n return this.request('GET', '/user/employees/invitation-links');\n }\n\n /**\n * Change a link's name, limit, expiry, access expiry or restrictions.\n * `PUT /user/employees/invitation-links/{link_id}`\n *\n * Send the whole policy and the `modified_at` you read as `version`. Saving\n * also reconfirms the link under your authority.\n */\n async updateInvitationLink(\n linkId: string,\n params: UpdateInvitationLinkRequest,\n ): Promise<InvitationLinkResponse> {\n return this.request('PUT', `/user/employees/invitation-links/${encodeURIComponent(linkId)}`, {\n body: params,\n });\n }\n\n /**\n * Revoke a link: nobody joins through it from now on, and who already\n * joined keeps their access. Revoking a revoked link answers it unchanged.\n * `POST /user/employees/invitation-links/{link_id}/revoke`\n */\n async revokeInvitationLink(linkId: string): Promise<InvitationLinkResponse> {\n return this.request(\n 'POST',\n `/user/employees/invitation-links/${encodeURIComponent(linkId)}/revoke`,\n );\n }\n\n /**\n * What a shared link offers, before joining. No authentication; grants\n * nothing. `POST /user/invitation-link/preview`\n */\n async previewInvitationLink(token: string): Promise<InvitationLinkPreviewResponse> {\n return this.request('POST', '/user/invitation-link/preview', { body: { token } });\n }\n\n /**\n * Join through a shared link from a signed-in session.\n * `POST /user/invitation-link/join`\n *\n * Needs a verified email address. Joining twice answers `already_member`\n * and uses no second place.\n */\n async joinInvitationLink(token: string): Promise<JoinInvitationLinkResponse> {\n return this.request('POST', '/user/invitation-link/join', { body: { token } });\n }\n\n /**\n * Join through a shared link during sign-in, for someone who holds no access\n * yet: call it with the `accept_invite` single-purpose token set on the\n * client. Answers the token for the next sign-in step.\n * `POST /user/invitation-link/join/pre-auth`\n */\n async joinInvitationLinkPreAuth(token: string): Promise<JoinInvitationLinkPreAuthResponse> {\n return this.request('POST', '/user/invitation-link/join/pre-auth', { body: { token } });\n }\n\n /**\n * Make an account through a shared link, for someone who has none. No\n * authentication. The account holds no access: its owner verifies the\n * address from the email this sends, signs in and joins.\n * `POST /user/invitation-link/register`\n */\n async registerThroughInvitationLink(\n params: RegisterThroughInvitationLinkRequest,\n ): Promise<RegisterThroughInvitationLinkResponse> {\n return this.request('POST', '/user/invitation-link/register', { body: params });\n }\n\n /**\n * One member of your merchant, with the person fields the member list\n * omits. `GET /user/employees/{user_id}/details`\n *\n * Answers only for a member `listUsersInLineage` shows you. Any other id,\n * unknown or not yours, is a 404 `UR_68` with `data.reason:\n * 'member_not_found'`.\n */\n async getTeamMemberDetails(userId: string): Promise<TeamMemberDetails> {\n return this.request('GET', `/user/employees/${encodeURIComponent(userId)}/details`);\n }\n\n /**\n * Supplied contacts and internal notes for a visible member in the current\n * merchant. Requires a session JWT and Users read permission. The returned\n * revision is required even for the first write; can_edit states write access.\n * An unknown or invisible member is refused with the same 404 UR_68 response.\n */\n async getTeamMemberContactProfile(userId: string): Promise<TeamMemberContactProfileResponse> {\n return this.request('GET', `/user/employees/${encodeURIComponent(userId)}/contact-profile`);\n }\n\n /**\n * Replace the supplied contacts, preserving notes and login/recovery identity.\n * Omitted optional contact fields are cleared. Requires Users write permission\n * and authority over the whole member. Send the exact last-read revision.\n * On a changed refusal, keep the draft and read again before resubmitting.\n * Structured UR_68 data is a TeamMemberRefusal with reason contact_profile.\n */\n async updateTeamMemberContacts(\n userId: string,\n params: UpdateTeamMemberContactsRequest,\n ): Promise<TeamMemberContactProfileResponse> {\n return this.request('PUT', `/user/employees/${encodeURIComponent(userId)}/contact-profile`, {\n body: params,\n });\n }\n\n /** Create a plain-text note with server-authored attribution; requires the current revision. */\n async createTeamMemberNote(\n userId: string,\n params: WriteTeamMemberNoteRequest,\n ): Promise<TeamMemberContactProfileResponse> {\n return this.request('POST', `/user/employees/${encodeURIComponent(userId)}/notes`, {\n body: params,\n });\n }\n\n /** Edit one note, retaining its original author and creation time. Uses the same write scope. */\n async updateTeamMemberNote(\n userId: string,\n noteId: string,\n params: WriteTeamMemberNoteRequest,\n ): Promise<TeamMemberContactProfileResponse> {\n return this.request(\n 'PUT',\n `/user/employees/${encodeURIComponent(userId)}/notes/${encodeURIComponent(noteId)}`,\n { body: params },\n );\n }\n\n /**\n * Delete only the named member note. The exact profile revision is sent in the\n * query; contacts and all other notes remain. Returns the new profile revision.\n */\n async deleteTeamMemberNote(\n userId: string,\n noteId: string,\n params: DeleteTeamMemberNoteRequest,\n ): Promise<TeamMemberContactProfileResponse> {\n return this.request(\n 'DELETE',\n `/user/employees/${encodeURIComponent(userId)}/notes/${encodeURIComponent(noteId)}`,\n { query: { expected_revision: params.expected_revision } },\n );\n }\n\n /**\n * Replace a team member's password with a temporary one, returned once.\n * `POST /user/employees/{user_id}/reset-password`\n *\n * Needs the *Users* write permission and the *Impersonation* permission,\n * and the member must be one you could sign in as with\n * `impersonateEmployee`. The member's sessions end, and their next sign-in\n * asks them to choose a new password. Two-factor authentication is left as\n * it is. `TeamMemberDetails.can_reset_password` answers the same rule. A\n * refusal is a `UR_68` error whose `data` is a {@link TeamMemberRefusal}.\n */\n async resetTeamMemberPassword(\n userId: string,\n params: ResetTeamMemberPasswordRequest,\n ): Promise<ResetTeamMemberPasswordResponse> {\n return this.request('POST', `/user/employees/${encodeURIComponent(userId)}/reset-password`, {\n body: params,\n });\n }\n\n /**\n * One team member's sign-in history: successes and failures with method,\n * address, location and device, filtered, sorted and paged as\n * `listLoginActivity` is. `GET /user/employees/{user_id}/login-activity`\n *\n * Needs the *Users* write permission. Answers only for a member\n * `listUsersInLineage` shows you; any other id is a 404 `UR_68` with\n * `data.reason: 'member_not_found'`. Sign-ins belong to the account, so\n * they are shown only for an account wholly in this merchant: refused with\n * a 400 `UR_68` `member_has_access_elsewhere` for an account that also\n * holds a role elsewhere, and `member_not_activated` for one that is only\n * invited. `TeamMemberDetails.can_view_sign_ins` answers the same rule.\n */\n async listTeamMemberLoginActivity(\n userId: string,\n params?: LoginHistoryParams,\n ): Promise<LoginHistoryResponse> {\n const path = `/user/employees/${encodeURIComponent(userId)}/login-activity`;\n if (params === undefined) {\n return this.request('GET', path);\n }\n return this.request('GET', path, {\n query: csvQuery(params, ['event_type', 'auth_method']),\n });\n }\n\n /**\n * One team member's live sessions: neither signed out nor expired.\n * `is_current` marks the caller's own session only.\n * `GET /user/employees/{user_id}/sessions`\n *\n * Same permission and refusals as `listTeamMemberLoginActivity`.\n */\n async listTeamMemberSessions(userId: string): Promise<UserSessionListResponse> {\n return this.request('GET', `/user/employees/${encodeURIComponent(userId)}/sessions`);\n }\n\n /**\n * Sign a team member out everywhere: ends every session and token of the\n * member, at this merchant and at every other merchant the account belongs\n * to. `POST /user/employees/{user_id}/sessions/revoke-all`\n *\n * The account stays active and its password unchanged, so the member can\n * sign in again at once. Allowed on exactly the members whose password you\n * may reset with `resetTeamMemberPassword`, and refused with the same\n * `UR_68` reasons ({@link TeamMemberRefusal}).\n * `TeamMemberDetails.can_sign_out` answers the same rule. Recorded in the\n * audit log.\n */\n async revokeTeamMemberSessions(userId: string): Promise<AdminRevokeUserSessionsResponse> {\n return this.request(\n 'POST',\n `/user/employees/${encodeURIComponent(userId)}/sessions/revoke-all`,\n );\n }\n\n /**\n * Which checkout payment methods a member may change in your merchant.\n * `GET /user/employees/{user_id}/method-access`\n *\n * Needs the *Users* read permission, and answers only for a member\n * `listUsersInLineage` shows you (any other id is a 404 `UR_68` with\n * `data.reason: 'member_not_found'`). `can_edit` says whether you may\n * change it; `grant_all` and `grantable` say which methods you may grant.\n */\n async getMemberMethodAccess(userId: string): Promise<MemberMethodAccessResponse> {\n return this.request('GET', `/user/employees/${encodeURIComponent(userId)}/method-access`);\n }\n\n /**\n * Limit a member to some checkout payment methods, or give every method\n * back. `PUT /user/employees/{user_id}/method-access`\n *\n * Needs the *Connectors* edit and *Payment methods* write permissions and a\n * member within your reach, other than yourself. A caller limited itself\n * grants only within its own limit. The change is audited and applies to\n * the member's next request. A refusal is a `UR_68` whose `data` is\n * `{ reason: 'method_access', refusal }` (see {@link MethodAccessRefusal}).\n */\n async updateMemberMethodAccess(\n userId: string,\n params: UpdateMemberMethodAccessRequest,\n ): Promise<MemberMethodAccessResponse> {\n return this.request('PUT', `/user/employees/${encodeURIComponent(userId)}/method-access`, {\n body: params,\n });\n }\n\n /**\n * A member's permission overrides in your merchant: every area that can be\n * overridden at their level, with what their roles give, the level set for\n * them, and what they have. `GET /user/employees/{user_id}/permission-overrides`\n *\n * Needs the *Users* read permission, and answers only for a member\n * `listUsersInLineage` shows you (any other id is a 404 `UR_68`).\n * `can_edit`, `can_raise` and each area's `grantable_level` say what you\n * may change.\n */\n async getMemberPermissionOverrides(userId: string): Promise<MemberPermissionOverridesResponse> {\n return this.request(\n 'GET',\n `/user/employees/${encodeURIComponent(userId)}/permission-overrides`,\n );\n }\n\n /**\n * Replace a member's permission overrides. An area left out goes back to\n * what their roles give. `PUT /user/employees/{user_id}/permission-overrides`\n *\n * Needs the *Users* write permission and a member within your reach, other\n * than yourself. Keeping or lowering is always allowed; a gain must stay\n * within what you hold in that area, and a gain above the member's roles\n * needs `can_raise`. The change is audited and applies to the member's next\n * request. A refusal is a `UR_68` whose `data` is\n * `{ reason: 'permission_overrides', refusal }` (see\n * {@link PermissionOverrideRefusal}).\n */\n async updateMemberPermissionOverrides(\n userId: string,\n params: UpdateMemberPermissionOverridesRequest,\n ): Promise<MemberPermissionOverridesResponse> {\n return this.request(\n 'PUT',\n `/user/employees/${encodeURIComponent(userId)}/permission-overrides`,\n { body: params },\n );\n }\n\n /**\n * The permission overrides your own session acts under, sorted by area.\n * An area named here has exactly that level, whatever a broader legacy area\n * of the role would suggest. `GET /user/role/permission-overrides`\n */\n async getOwnPermissionOverrides(): Promise<PermissionOverride[]> {\n return this.request('GET', '/user/role/permission-overrides');\n }\n\n /** Sign in via OIDC. `POST /user/oidc` */\n async signInOidc(params: Record<string, unknown>): Promise<AuthResponse> {\n return this.request('POST', '/user/oidc', { body: params });\n }\n\n /** Transfer key. `POST /user/key/transfer` */\n async transferKey(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/key/transfer', { body: params });\n }\n\n /**\n * Invitations still waiting on the caller. `GET /user/list/invitation`\n *\n * Accepts an `accept_invite` step token as well as a session JWT, so it\n * can feed `acceptInvitationsPreAuth` during sign-in. An invitation to a\n * project carries `project_id`; pass it back unchanged when accepting.\n */\n async listInvitations(): Promise<UserInvitation[]> {\n return this.request('GET', '/user/list/invitation');\n }\n\n /** Check 2FA status. `GET /user/2fa` */\n async check2faStatus(): Promise<Record<string, unknown>> {\n return this.request('GET', '/user/2fa');\n }\n\n /**\n * Finish first-time TOTP setup: commit the secret generated by `beginTotp`\n * against a 6-digit code from the user's authenticator app.\n *\n * `PUT /user/2fa/totp/verify`. Requires `Authorization: Bearer <SPT{purpose:totp}>`.\n */\n async updateTotp(params: VerifyTotpRequest): Promise<Record<string, unknown>> {\n return this.request('PUT', '/user/2fa/totp/verify', { body: params });\n }\n\n /**\n * Complete the TOTP step and advance to the next flow stage (e.g.\n * `reset_password`). Returns a fresh single-purpose token with the\n * next `token_type`.\n *\n * `GET /user/2fa/terminate`. Requires `Authorization: Bearer <SPT{purpose:totp}>`.\n */\n async terminate2fa(query?: Terminate2faQueryParams): Promise<TokenResponse> {\n if (query === undefined) {\n return this.request('GET', '/user/2fa/terminate');\n }\n return this.request('GET', '/user/2fa/terminate', {\n query: query as Record<string, boolean | undefined>,\n });\n }\n\n /** Create auth method. `POST /user/auth` */\n async createAuthMethod(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/auth', { body: params });\n }\n\n /** Update auth method. `PUT /user/auth` */\n async updateAuthMethod(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('PUT', '/user/auth', { body: params });\n }\n\n /** List auth methods. `GET /user/auth/list` */\n async listAuthMethods(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/user/auth/list');\n }\n\n /** Get auth URL. `GET /user/auth/url` */\n async getAuthUrl(): Promise<Record<string, unknown>> {\n return this.request('GET', '/user/auth/url');\n }\n\n /** Select auth method. `POST /user/auth/select` */\n async selectAuth(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/auth/select', { body: params });\n }\n\n /**\n * List users in lineage.\n *\n * Needs the Users *view* grant now — the response carries colleagues' email\n * addresses, so a role without it is refused rather than handed a roster.\n * A shop-scoped role keeps reading its own shop's members.\n *\n * `GET /user/employees/list`\n */\n async listUsersInLineage(params?: ListUsersInLineageParams): Promise<UserInLineage[]> {\n return this.request('GET', '/user/employees/list', {\n query: params as Record<string, string | undefined> | undefined,\n });\n }\n\n /**\n * Send a pending member a new invitation link. `POST /user/resend-invite`\n *\n * The new link replaces the one before it, which stops working. It works\n * for `link_valid_for_days` days, 7 by default. Works for any pending member\n * `listUsersInLineage` shows you. A refusal is a `UR_68` error\n * (`no_pending_invitation`, `invite_link_validity_out_of_range`) or a\n * `UR_70` `invitation_expired` when the access the invitation offers has\n * ended.\n */\n async resendInvite(params: ReInviteUserRequest): Promise<ReInviteUserResponse> {\n return this.request('POST', '/user/resend-invite', { body: params });\n }\n\n /**\n * A pending member's current invitation link, or why it is not shown.\n * `GET /user/employees/{user_id}/invite-link`\n *\n * Only the link of an account the invitation created, that nobody has used\n * since, is returned: the link signs its holder in without a password. Every\n * link returned is audited. Needs team write access.\n */\n async getInviteLink(userId: string): Promise<InviteLinkResponse> {\n return this.request('GET', `/user/employees/${encodeURIComponent(userId)}/invite-link`);\n }\n\n /**\n * Get the caller's parent permission groups + scopes.\n *\n * `GET /user/role`\n */\n async getRolePermissions(): Promise<ParentGroupInfo[]> {\n return this.request('GET', '/user/role');\n }\n\n /**\n * List invitable roles. `GET /user/role/list/invite`\n *\n * @param params - Optional query. `entity_type` scopes the role list to a\n * particular entity (e.g. `'merchant'` to list only merchant-scoped roles\n * when inviting employees from the merchant dashboard).\n */\n async listInvitableRoles(params?: ListInvitableRolesParams): Promise<Record<string, unknown>[]> {\n if (params === undefined || params.entity_type === undefined) {\n return this.request('GET', '/user/role/list/invite');\n }\n return this.request('GET', '/user/role/list/invite', {\n query: { entity_type: params.entity_type },\n });\n }\n\n /** List updatable roles. `GET /user/role/list/update` */\n async listUpdatableRoles(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/user/role/list/update');\n }\n\n /** Get parent list. `GET /user/parent/list` */\n async getParentList(): Promise<Record<string, unknown>[]> {\n return this.request('GET', '/user/parent/list');\n }\n\n /** Create a role. `POST /user/role` */\n async createRole(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/user/role', { body: params });\n }\n\n /** Get role by ID. `GET /user/role/{roleId}` */\n async getRoleById(roleId: string): Promise<Record<string, unknown>> {\n return this.request('GET', `/user/role/${encodeURIComponent(roleId)}`);\n }\n\n /** Update role by ID. `PUT /user/role/{roleId}` */\n async updateRole(\n roleId: string,\n params: Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<Record<string, unknown>> {\n return this.request('PUT', `/user/role/${encodeURIComponent(roleId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Delete a custom role. Predefined roles and roles still assigned to\n * team members are rejected by the backend with a 400.\n *\n * `DELETE /user/role/{roleId}`\n */\n async deleteRole(roleId: string): Promise<Record<string, unknown>> {\n return this.request('DELETE', `/user/role/${encodeURIComponent(roleId)}`);\n }\n\n /**\n * Read which individual connector accounts a role may see.\n *\n * `GET /user/role/{roleId}/connectors`\n *\n * **Check `restricted` before reading `connectors`.** An empty list is\n * ambiguous by itself, so the backend states which case it is: `false` means\n * the role holds no grant and sees whatever its entity and profile scope\n * already allowed. Rendering an empty `connectors` array as \"this role sees\n * nothing\" inverts the meaning.\n *\n * Requires the permission that *edits a role*, not a connector permission.\n */\n async getRoleConnectors(roleId: string): Promise<RoleConnectorGrant> {\n return this.request('GET', `/user/role/${encodeURIComponent(roleId)}/connectors`);\n }\n\n /**\n * Replace the set of connector accounts a role may see.\n *\n * `PUT /user/role/{roleId}/connectors`\n *\n * The call **replaces** the whole set rather than adding to it, so send the\n * complete list every time. An empty `merchant_connector_ids` clears the\n * grant and returns the role to unrestricted.\n *\n * The backend refuses an id that is not a connector account of the caller's\n * own merchant, an `Organization`-scoped role (a connector account belongs to\n * exactly one merchant, so an org-spanning role cannot hold one coherently),\n * and any predefined role (one static entry shared by every tenant).\n *\n * Editing a grant invalidates the role cache and blacklists tokens minted\n * before the edit, so **users holding this role must sign in again**. Worth\n * saying in the UI before the save, not after.\n */\n async updateRoleConnectors(\n roleId: string,\n params: UpdateRoleConnectorGrantParams,\n ): Promise<RoleConnectorGrant> {\n return this.request('PUT', `/user/role/${encodeURIComponent(roleId)}/connectors`, {\n body: params,\n });\n }\n}\n"]}
|
|
@@ -492,6 +492,34 @@ var Settlement = class {
|
|
|
492
492
|
bodyIdempotencyKey: params.idempotency_key
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
|
+
/**
|
|
496
|
+
* Freeze a report for exactly one ended statement period of a shop, under
|
|
497
|
+
* its saved settlement structure. Requires settlement edit permission. A
|
|
498
|
+
* period that is not in the shop's plan or has not ended yet is refused.
|
|
499
|
+
* Reuse the same idempotency key when retrying the same request.
|
|
500
|
+
*
|
|
501
|
+
* `POST /settlement/native/reports/period`
|
|
502
|
+
*/
|
|
503
|
+
async createNativePeriodReport(params, options) {
|
|
504
|
+
return this.request("POST", "/settlement/native/reports/period", {
|
|
505
|
+
body: params,
|
|
506
|
+
...options,
|
|
507
|
+
bodyIdempotencyKey: params.idempotency_key
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Add up the shops' period reports for one window and currency. Reads
|
|
512
|
+
* only. A shop whose period crosses the window or lacks a report is listed
|
|
513
|
+
* with that status and left out of the totals.
|
|
514
|
+
*
|
|
515
|
+
* `POST /settlement/native/reports/combined`
|
|
516
|
+
*/
|
|
517
|
+
async combineNativeReports(params, options) {
|
|
518
|
+
return this.request("POST", "/settlement/native/reports/combined", {
|
|
519
|
+
body: params,
|
|
520
|
+
...options
|
|
521
|
+
});
|
|
522
|
+
}
|
|
495
523
|
async retrieveNativeReport(reportId, options) {
|
|
496
524
|
return this.request(
|
|
497
525
|
"GET",
|
|
@@ -510,6 +538,36 @@ var Settlement = class {
|
|
|
510
538
|
...options
|
|
511
539
|
});
|
|
512
540
|
}
|
|
541
|
+
/**
|
|
542
|
+
* The period reports of the shop a shop reader's role is bound to, newest
|
|
543
|
+
* first, without any figure. A merchant-level reader is refused (403) and
|
|
544
|
+
* reads the full reports with `listNativeReports`; so is a shop whose
|
|
545
|
+
* merchant does not share settlement with it.
|
|
546
|
+
*
|
|
547
|
+
* `GET /settlement/native/shop/reports`
|
|
548
|
+
*/
|
|
549
|
+
async listShopNativeReports(params, options) {
|
|
550
|
+
return this.request("GET", "/settlement/native/shop/reports", {
|
|
551
|
+
query: {
|
|
552
|
+
currency: params.currency,
|
|
553
|
+
test_mode: params.test_mode,
|
|
554
|
+
...params.limit != null ? { limit: params.limit } : {},
|
|
555
|
+
...params.offset != null ? { offset: params.offset } : {}
|
|
556
|
+
},
|
|
557
|
+
...options
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* One of the shop's period reports as a shop reader sees it: the items the
|
|
562
|
+
* merchant hides are withheld, as frozen with the report.
|
|
563
|
+
*
|
|
564
|
+
* `GET /settlement/native/shop/reports/{id}`
|
|
565
|
+
*/
|
|
566
|
+
async retrieveShopNativeReport(id, options) {
|
|
567
|
+
return this.request("GET", `/settlement/native/shop/reports/${encodeURIComponent(id)}`, {
|
|
568
|
+
...options
|
|
569
|
+
});
|
|
570
|
+
}
|
|
513
571
|
/**
|
|
514
572
|
* Record a transfer already made, under settlement write permission and
|
|
515
573
|
* the caller's payout limits. This method never sends money. Native minor
|
|
@@ -566,6 +624,19 @@ var Settlement = class {
|
|
|
566
624
|
async listNativeReserves(options) {
|
|
567
625
|
return this.request("GET", "/settlement/native/reserves", { ...options });
|
|
568
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* What the shop's reserves hold for it, for a reader whose role is bound to
|
|
629
|
+
* one shop: only reserves the merchant shows to shop readers, and only this
|
|
630
|
+
* shop's held amounts and releases.
|
|
631
|
+
*
|
|
632
|
+
* `GET /settlement/native/shop/reserves`
|
|
633
|
+
*/
|
|
634
|
+
async listShopNativeReserves(params, options) {
|
|
635
|
+
return this.request("GET", "/settlement/native/shop/reserves", {
|
|
636
|
+
query: { currency: params.currency, test_mode: params.test_mode },
|
|
637
|
+
...options
|
|
638
|
+
});
|
|
639
|
+
}
|
|
569
640
|
/**
|
|
570
641
|
* Store a reserve for a statement structure's reserve item, at the merchant,
|
|
571
642
|
* one of its projects or one of its shops. Requires settlement edit
|
|
@@ -636,4 +707,4 @@ export {
|
|
|
636
707
|
statementListQuery,
|
|
637
708
|
Settlement
|
|
638
709
|
};
|
|
639
|
-
//# sourceMappingURL=chunk-
|
|
710
|
+
//# sourceMappingURL=chunk-ZPFPDNBE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resources/settlement.ts"],"sourcesContent":["import type {\n NativeReserve,\n NativeReserveCreateRequest,\n NativeReserveListResponse,\n NativeReserveMovement,\n NativeReserveOverview,\n NativeReserveOverviewRequest,\n NativeReserveReleaseRequest,\n NativeReserveUpdateRequest,\n NativeSettlementPreviewRequest,\n NativeSettlementPreviewResponse,\n NativeSettlementReportCreateRequest,\n NativeSettlementPeriodReportRequest,\n NativeSettlementCombinedRequest,\n NativeSettlementCombinedResponse,\n NativeSettlementReport,\n NativeSettlementReportExport,\n NativeSettlementListRequest,\n NativeSettlementReportListResponse,\n NativeSettlementPayoutCreateRequest,\n NativeSettlementPayout,\n NativeSettlementPayoutListResponse,\n NativeSettlementFeeRefreshRequest,\n NativeSettlementFeeRefreshResponse,\n NativeSettlementPdfRequest,\n NativeShopReport,\n NativeShopReportListRequest,\n NativeShopReportListResponse,\n NativeShopReserveListRequest,\n NativeShopReserveListResponse,\n ProcessorCostEventsRequest,\n ProcessorCostEventsResponse,\n ProcessorCostPeriodRequest,\n ProcessorCostPeriodResponse,\n ProviderHoldsRequest,\n ProviderHoldsResponse,\n FeeStatementDetail,\n SettlementBackfillRequest,\n SettlementBackfillResponse,\n SettlementCostParams,\n SettlementCostResponse,\n SettlementCurrentParams,\n SettlementCurrentResponse,\n SettlementLineListParams,\n SettlementLineListResponse,\n SettlementOverviewParams,\n SettlementOverviewResponse,\n SettlementStatementListParams,\n SettlementStatementListResponse,\n ShopFeeConfigParams,\n ShopFeeConfigResponse,\n ShopVisibilityResponse,\n ShopVisibilityUpdateRequest,\n StatementAdjustment,\n StatementAdjustmentCreateRequest,\n StatementAdjustmentListResponse,\n StatementGenerateRequest,\n StatementPayoutUpdateRequest,\n StatementPayoutRecordRequest,\n StatementPayoutListResponse,\n StatementAdvance,\n StatementAdvanceRecordRequest,\n SettlementAdvanceListRequest,\n SettlementAdvanceListResponse,\n SettlementPeriodListParams,\n SettlementPeriodPreviewParams,\n SettlementPeriodPreviewResponse,\n SettlementPeriodListResponse,\n StatementPdfParams,\n} from '../types';\nimport type { RequestExtras, RequestFn, RequestOptions } from '../client';\nimport { csvQuery } from '../listQuery';\n\n/**\n * The statement list's query: `test_mode` always travels, `false` included,\n * and several payout statuses travel as one comma-separated value.\n */\nexport function statementListQuery(params: SettlementStatementListParams): RequestOptions['query'] {\n return csvQuery(\n {\n test_mode: params.test_mode,\n profile_id: params.profile_id,\n limit: params.limit,\n offset: params.offset,\n payout_status: params.payout_status,\n period_from: params.period_from,\n period_to: params.period_to,\n sort_by: params.sort_by,\n sort_order: params.sort_order,\n },\n ['payout_status'],\n );\n}\n\n/** The query of a native report or payout list. */\nfunction nativeListQuery(params: NativeSettlementListRequest): RequestOptions['query'] {\n return {\n profile_id: params.profile_id,\n currency: params.currency,\n test_mode: params.test_mode,\n limit: params.limit,\n offset: params.offset,\n sort_by: params.sort_by,\n sort_order: params.sort_order,\n };\n}\n\nfunction exportHeaders(options: RequestExtras | undefined, accept: string): Record<string, string> {\n const headers = new Headers(options?.headers);\n headers.set('Accept', accept);\n const output: Record<string, string> = {};\n headers.forEach((value, key) => {\n output[key] = value;\n });\n return output;\n}\n\n/**\n * Hosted-shop settlement: monthly statements, the live current-period\n * rollup, per-line detail, fee schedules and backfills.\n *\n * Every read takes an explicit `test_mode` — test and live figures must\n * never blend, so the environment lives in the signature rather than in a\n * default. `false` is transmitted, not dropped.\n *\n * Shop-owner responses are redacted server-side: absent platform-fee fields\n * are a permission boundary, not a gap — never re-derive them client-side.\n */\nexport class Settlement {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Read signed refund/dispute processor fees and report availability.\n * Merchant scope and connector grants apply. Empty movements confirm zero\n * only when the source is reported and complete.\n * Supply payment_id without year/month for all history. force_sync reads\n * provider reports for this page; it requires payment_id and limit <= 20,\n * and never issues a payment, refund or dispute action.\n * Omit test_mode for every reporting partition of one payment; period\n * queries default to live. Each source states its reporting partition.\n */\n async listProcessorCostEvents(\n params: ProcessorCostEventsRequest,\n options?: RequestExtras,\n ): Promise<ProcessorCostEventsResponse> {\n return this.request('GET', '/settlement/processor-cost-events', {\n query: {\n profile_id: params.profile_id,\n payment_id: params.payment_id,\n year: params.year,\n month: params.month,\n test_mode: params.test_mode,\n limit: params.limit,\n offset: params.offset,\n force_sync: params.force_sync,\n },\n ...options,\n });\n }\n\n /**\n * Per-shop settlement rollup for the host merchant: unpaid totals and the\n * running current period, one row per shop.\n *\n * `GET /settlement/overview`\n */\n async overview(\n params: SettlementOverviewParams,\n options?: RequestExtras,\n ): Promise<SettlementOverviewResponse> {\n return this.request('GET', '/settlement/overview', {\n query: { test_mode: params.test_mode },\n ...options,\n });\n }\n\n /**\n * Live rollup of the current (not yet statemented) period.\n *\n * `GET /settlement/current`\n */\n async current(\n params: SettlementCurrentParams,\n options?: RequestExtras,\n ): Promise<SettlementCurrentResponse> {\n return this.request('GET', '/settlement/current', {\n query: { test_mode: params.test_mode, profile_id: params.profile_id },\n ...options,\n });\n }\n\n /**\n * What a period's payments cost, and what was left over: gross, the\n * platform fee, hosting fees, what the rails took, and the margin, with a\n * per-connector breakdown.\n *\n * Send `year` and `month` together to report one UTC calendar month, or\n * neither for the running month so far.\n *\n * **Host-only.** The response is the host's cost base, which a shop owner\n * must never see, so a profile-scoped caller is refused with a 403 rather\n * than given a redacted shell. Gate the surface on the caller's scope\n * instead of calling it and handling the failure. Connector-restricted\n * roles cannot read this merchant-wide aggregate; fee-event reads retain\n * their connector grants.\n *\n * Two things not to flatten when rendering the result:\n * `margin_usd` is absent — not zero — whenever `margin_quality` is\n * `'unknown'`, and `unlined_captured_attempt_count` (cost definitely\n * missing) means something different from `unlined_unresolved_attempt_count`\n * (mostly ordinary abandonment).\n *\n * `GET /settlement/cost`\n *\n * @example\n * ```typescript\n * const cost = await delopay.settlement.cost({ test_mode: false, year: 2026, month: 7 });\n * if (cost.margin_quality === 'unknown') {\n * // cost.margin_usd is absent — say so, do not render 0.00\n * }\n * ```\n */\n async cost(\n params?: SettlementCostParams,\n options?: RequestExtras,\n ): Promise<SettlementCostResponse> {\n return this.request('GET', '/settlement/cost', {\n query: {\n profile_id: params?.profile_id,\n test_mode: params?.test_mode,\n year: params?.year,\n month: params?.month,\n },\n ...options,\n });\n }\n\n /**\n * What a period's payments cost at the rails, grouped by shop, connector\n * and payment method. Answers for **every** merchant, including one that\n * hosts nobody — it reads the per-attempt settlement record rather than the\n * settlement lines, which exist only where hosting fees are configured.\n *\n * A sibling of {@link Settlement.cost} rather than a widening of it. That\n * endpoint is a profit statement whose revenue term is hosting income, and\n * a merchant who hosts nobody has none. This publishes cost and never\n * margin.\n *\n * Send `year` and `month` together to report one UTC calendar month, or\n * neither for the running month so far.\n *\n * **The response carries no period total, and a caller must not compute\n * one here.** Every figure keeps the unit the rail reported it in, and the\n * unit is part of each bucket's key, so adding two buckets is not addition.\n * Convert caller-side if you need one number, and say which rates you used.\n * The counts are totalled, because a count has no unit.\n *\n * Two distinctions not to flatten when rendering a bucket:\n * `cost_amount` covers `reported_count + estimated_count` attempts out of\n * `attempt_count` and is a lower bound whenever those disagree; and\n * `unavailable_count` (the rail says it has no figure) means something\n * different from `unwritten_count` (a gap in our own recording).\n *\n * **Merchant scope.** A token scoped to a single shop, a role narrowed to\n * specific connector accounts, or a role without the settlement-read\n * permission group is refused `403`: what a rail charged is the merchant's\n * own cost base, and here it is the whole response, so there is nothing\n * coherent to redact down to. Gate the surface on the caller's scope rather\n * than calling it and handling the failure.\n *\n * `GET /settlement/processor-cost`\n *\n * @example\n * ```typescript\n * const period = await delopay.settlement.processorCost({\n * test_mode: false,\n * year: 2026,\n * month: 7,\n * });\n * for (const bucket of period.buckets) {\n * // Each bucket is its own unit — render per bucket, never a sum.\n * console.log(bucket.connector, bucket.cost_amount, bucket.cost_currency);\n * }\n * ```\n */\n async processorCost(\n params?: ProcessorCostPeriodRequest,\n options?: RequestExtras,\n ): Promise<ProcessorCostPeriodResponse> {\n return this.request('GET', '/settlement/processor-cost', {\n query: {\n profile_id: params?.profile_id,\n test_mode: params?.test_mode,\n year: params?.year,\n month: params?.month,\n },\n ...options,\n });\n }\n\n /**\n * What the payment providers say about one period's money, per connector\n * account and currency: of the payments made in the period, how much the\n * provider still holds, has released into its balance, has paid out to a\n * bank, or says nothing about.\n *\n * Amounts are the payments' gross in their own currency, never converted,\n * so render per bucket and never sum across currencies. A provider that\n * reports no settlement is `unknown`, never available. An amount is `null`\n * where no payment of the bucket carried one, never `0`.\n *\n * Give both `from` and `to`, or neither for the running calendar month.\n *\n * `GET /settlement/provider-holds`\n */\n async providerHolds(\n params?: ProviderHoldsRequest,\n options?: RequestExtras,\n ): Promise<ProviderHoldsResponse> {\n return this.request('GET', '/settlement/provider-holds', {\n query: {\n profile_id: params?.profile_id,\n test_mode: params?.test_mode,\n from: params?.from,\n to: params?.to,\n },\n ...options,\n });\n }\n\n /**\n * List generated settlement statements, the newest period first unless\n * `sort_by` says otherwise. Several `payout_status` values match a\n * statement in any of them.\n *\n * `GET /settlement/statements`\n */\n async listStatements(\n params: SettlementStatementListParams,\n options?: RequestExtras,\n ): Promise<SettlementStatementListResponse> {\n return this.request('GET', '/settlement/statements', {\n query: statementListQuery(params),\n ...options,\n });\n }\n\n /**\n * One statement with its per-connector/currency breakdown.\n *\n * `GET /settlement/statements/{statementId}`\n */\n async retrieveStatement(\n statementId: string,\n options?: RequestExtras,\n ): Promise<FeeStatementDetail> {\n return this.request(\n 'GET',\n `/settlement/statements/${encodeURIComponent(statementId)}`,\n options,\n );\n }\n\n /**\n * Generate (or regenerate) the statement for one shop and period: a\n * calendar month by `year` and `month`, or any period by its `period_start`.\n *\n * `POST /settlement/statements/generate`\n */\n async generateStatement(\n params: StatementGenerateRequest,\n options?: RequestExtras,\n ): Promise<FeeStatementDetail> {\n return this.request('POST', '/settlement/statements/generate', {\n body: params,\n ...options,\n });\n }\n\n /**\n * Record payout progress on a statement (`unpaid` / `partial` / `paid`).\n *\n * Subject to the caller's `settlement_payout` operation limit — a\n * per-operation ceiling, a windowed total, a windowed count, or any\n * combination: an over-limit call fails with `DE_01` and nothing is\n * recorded. There is no approval route out of it — four-eyes needs an\n * executor that can run the operation once somebody says yes, and only\n * refunds have one, so a settlement rule can only block.\n *\n * `POST /settlement/statements/{statementId}/payout`\n */\n async updateStatementPayout(\n statementId: string,\n params: StatementPayoutUpdateRequest,\n options?: RequestExtras,\n ): Promise<FeeStatementDetail> {\n return this.request(\n 'POST',\n `/settlement/statements/${encodeURIComponent(statementId)}/payout`,\n { body: params, ...options },\n );\n }\n\n /** Append one external transfer record. Send a stable idempotency_key for safe retries. */\n async recordStatementPayout(\n statementId: string,\n params: StatementPayoutRecordRequest,\n options?: RequestExtras,\n ): Promise<FeeStatementDetail> {\n return this.request(\n 'POST',\n `/settlement/statements/${encodeURIComponent(statementId)}/payout`,\n {\n body: params,\n ...options,\n bodyIdempotencyKey: params.idempotency_key ?? null,\n },\n );\n }\n\n /** Read individual transfer records, their signed total, and any overpayment. */\n async listStatementPayouts(\n statementId: string,\n options?: RequestExtras,\n ): Promise<StatementPayoutListResponse> {\n return this.request(\n 'GET',\n `/settlement/statements/${encodeURIComponent(statementId)}/payouts`,\n options,\n );\n }\n\n /** Record a transfer against a shop's period before its statement exists. */\n async recordAdvance(\n params: StatementAdvanceRecordRequest,\n options?: RequestExtras,\n ): Promise<StatementAdvance> {\n return this.request('POST', '/settlement/advances', {\n body: params,\n ...options,\n bodyIdempotencyKey: params.idempotency_key ?? null,\n });\n }\n\n async listAdvances(\n params: SettlementAdvanceListRequest,\n options?: RequestExtras,\n ): Promise<SettlementAdvanceListResponse> {\n return this.request('GET', '/settlement/advances', {\n query: {\n profile_id: params.profile_id,\n year: params.year,\n month: params.month,\n period_start: params.period_start,\n test_mode: params.test_mode,\n },\n ...options,\n });\n }\n\n /**\n * A shop's statement periods, newest first: the running one and those that\n * closed in the last twelve months. Each `period_start` names its period to\n * {@link generateStatement}, {@link recordAdvance} and {@link listAdvances}.\n *\n * `GET /settlement/periods`\n */\n async listPeriods(\n params: SettlementPeriodListParams,\n options?: RequestExtras,\n ): Promise<SettlementPeriodListResponse> {\n return this.request('GET', '/settlement/periods', {\n query: { profile_id: params.profile_id },\n ...options,\n });\n }\n\n /**\n * The next six statement periods a value of the `settlement.statement_period`\n * setting would make, before it is saved: for a shop, the rest of its running\n * period and the change at its next boundary. The value is judged as a save\n * would judge it, so a value the account cannot save is refused here too.\n * Writes nothing.\n *\n * `POST /settlement/periods/preview`\n */\n async previewPeriods(\n params: SettlementPeriodPreviewParams,\n options?: RequestExtras,\n ): Promise<SettlementPeriodPreviewResponse> {\n return this.request('POST', '/settlement/periods/preview', {\n body: params,\n ...options,\n });\n }\n\n /**\n * Export a statement as PDF, or with `format` as CSV, JSON\n * (`StatementDocument`) or XLSX. Returns the raw bytes as a `Blob`, with\n * the same auth, retries and error handling as every other call — persist\n * or object-URL it caller-side.\n *\n * `GET /settlement/statements/{statementId}/pdf`\n *\n * @example\n * ```typescript\n * const pdf = await delopay.settlement.downloadStatementPdf('stmt_1', {\n * currency: 'EUR',\n * include_transactions: true,\n * });\n * const url = URL.createObjectURL(pdf);\n * ```\n */\n async downloadStatementPdf(\n statementId: string,\n params?: StatementPdfParams,\n options?: RequestExtras,\n ): Promise<Blob> {\n return this.request('GET', `/settlement/statements/${encodeURIComponent(statementId)}/pdf`, {\n query: {\n currency: params?.currency,\n include_transactions: params?.include_transactions,\n format: params?.format,\n },\n responseType: 'blob',\n ...options,\n });\n }\n\n /**\n * The individual settled attempts of one shop's calendar month.\n *\n * `GET /settlement/lines`\n */\n async listLines(\n params: SettlementLineListParams,\n options?: RequestExtras,\n ): Promise<SettlementLineListResponse> {\n return this.request('GET', '/settlement/lines', {\n query: {\n profile_id: params.profile_id,\n year: params.year,\n month: params.month,\n period_start: params.period_start,\n test_mode: params.test_mode,\n limit: params.limit,\n offset: params.offset,\n },\n ...options,\n });\n }\n\n /**\n * The fee schedules that currently apply to a shop.\n *\n * `GET /settlement/fee-config`\n */\n async feeConfig(\n params: ShopFeeConfigParams,\n options?: RequestExtras,\n ): Promise<ShopFeeConfigResponse> {\n return this.request('GET', '/settlement/fee-config', {\n query: { profile_id: params.profile_id },\n ...options,\n });\n }\n\n /**\n * Enqueue a settlement-line backfill over historical attempts. Attempts\n * already covered by a line are always skipped.\n *\n * `POST /settlement/backfill`\n */\n async backfill(\n params?: SettlementBackfillRequest,\n options?: RequestExtras,\n ): Promise<SettlementBackfillResponse> {\n return this.request('POST', '/settlement/backfill', { body: params, ...options });\n }\n\n /**\n * Toggle whether a shop's owner can see their own settlement figures.\n *\n * `POST /settlement/shops/visibility`\n */\n async setShopVisibility(\n params: ShopVisibilityUpdateRequest,\n options?: RequestExtras,\n ): Promise<ShopVisibilityResponse> {\n return this.request('POST', '/settlement/shops/visibility', {\n body: params,\n ...options,\n });\n }\n\n /**\n * Manual adjustments recorded on a statement.\n *\n * `GET /settlement/statements/{statementId}/adjustments`\n */\n async listStatementAdjustments(\n statementId: string,\n options?: RequestExtras,\n ): Promise<StatementAdjustmentListResponse> {\n return this.request(\n 'GET',\n `/settlement/statements/${encodeURIComponent(statementId)}/adjustments`,\n options,\n );\n }\n\n /**\n * Add a manual adjustment to a statement. Positive `amount_usd` charges\n * the shop (reducing their payout); negative credits them.\n *\n * Subject to the caller's `settlement_adjustment` operation limit: an\n * over-limit call fails with `DE_01` and no adjustment is added. Both\n * windows count every add, and a credit counts at its magnitude. A\n * settlement rule can only block — approval is refund-only, for the reason\n * given on `updateStatementPayout()`. When another add by the same user\n * changes the window while this one is being admitted, the call fails with\n * HTTP 412 and nothing is written; retrying the same request is safe.\n *\n * `POST /settlement/statements/{statementId}/adjustments`\n */\n async createStatementAdjustment(\n statementId: string,\n params: StatementAdjustmentCreateRequest,\n options?: RequestExtras,\n ): Promise<StatementAdjustment> {\n return this.request(\n 'POST',\n `/settlement/statements/${encodeURIComponent(statementId)}/adjustments`,\n { body: params, ...options },\n );\n }\n\n /**\n * Remove a manual adjustment from a statement.\n *\n * The adjustment still counts against the caller's `settlement_adjustment`\n * limit window it was added in: removing it does not give back its count or\n * amount.\n *\n * `DELETE /settlement/statements/{statementId}/adjustments/{adjustmentId}`\n */\n async deleteStatementAdjustment(\n statementId: string,\n adjustmentId: string,\n options?: RequestExtras,\n ): Promise<void> {\n return this.request(\n 'DELETE',\n `/settlement/statements/${encodeURIComponent(statementId)}/adjustments/${encodeURIComponent(adjustmentId)}`,\n options,\n );\n }\n\n /**\n * Calculate a period in its transaction currency. Requires a host-level\n * dashboard JWT and settlement read permission. Profile users and roles\n * restricted to selected connector accounts cannot read this aggregate.\n * Rates apply once to the period total. Unknown or estimated fees keep\n * dependent amounts provisional. Native money values remain integer strings.\n */\n async previewNative(\n params: NativeSettlementPreviewRequest,\n options?: RequestExtras,\n ): Promise<NativeSettlementPreviewResponse> {\n return this.request('POST', '/settlement/native/preview', { body: params, ...options });\n }\n\n /**\n * Recalculate and freeze an immutable report version. Requires settlement\n * edit permission. Explicitly allow provisional figures when source fees\n * are incomplete. A report records a calculation and sends no money.\n * Reuse the same idempotency key when retrying the same request.\n */\n async createNativeReport(\n params: NativeSettlementReportCreateRequest,\n options?: RequestExtras,\n ): Promise<NativeSettlementReport> {\n return this.request('POST', '/settlement/native/reports', {\n body: params,\n ...options,\n bodyIdempotencyKey: params.idempotency_key,\n });\n }\n\n /**\n * Freeze a report for exactly one ended statement period of a shop, under\n * its saved settlement structure. Requires settlement edit permission. A\n * period that is not in the shop's plan or has not ended yet is refused.\n * Reuse the same idempotency key when retrying the same request.\n *\n * `POST /settlement/native/reports/period`\n */\n async createNativePeriodReport(\n params: NativeSettlementPeriodReportRequest,\n options?: RequestExtras,\n ): Promise<NativeSettlementReport> {\n return this.request('POST', '/settlement/native/reports/period', {\n body: params,\n ...options,\n bodyIdempotencyKey: params.idempotency_key,\n });\n }\n\n /**\n * Add up the shops' period reports for one window and currency. Reads\n * only. A shop whose period crosses the window or lacks a report is listed\n * with that status and left out of the totals.\n *\n * `POST /settlement/native/reports/combined`\n */\n async combineNativeReports(\n params: NativeSettlementCombinedRequest,\n options?: RequestExtras,\n ): Promise<NativeSettlementCombinedResponse> {\n return this.request('POST', '/settlement/native/reports/combined', {\n body: params,\n ...options,\n });\n }\n\n async retrieveNativeReport(\n reportId: string,\n options?: RequestExtras,\n ): Promise<NativeSettlementReport> {\n return this.request(\n 'GET',\n `/settlement/native/reports/${encodeURIComponent(reportId)}`,\n options,\n );\n }\n\n /**\n * List report summaries without fetching every source row in each saved\n * snapshot, the newest first. `sort_by` takes `period` here; another value\n * is refused.\n */\n async listNativeReports(\n params: NativeSettlementListRequest,\n options?: RequestExtras,\n ): Promise<NativeSettlementReportListResponse> {\n return this.request('GET', '/settlement/native/reports', {\n query: nativeListQuery(params),\n ...options,\n });\n }\n\n /**\n * The period reports of the shop a shop reader's role is bound to, newest\n * first, without any figure. A merchant-level reader is refused (403) and\n * reads the full reports with `listNativeReports`; so is a shop whose\n * merchant does not share settlement with it.\n *\n * `GET /settlement/native/shop/reports`\n */\n async listShopNativeReports(\n params: NativeShopReportListRequest,\n options?: RequestExtras,\n ): Promise<NativeShopReportListResponse> {\n return this.request('GET', '/settlement/native/shop/reports', {\n query: {\n currency: params.currency,\n test_mode: params.test_mode,\n ...(params.limit != null ? { limit: params.limit } : {}),\n ...(params.offset != null ? { offset: params.offset } : {}),\n },\n ...options,\n });\n }\n\n /**\n * One of the shop's period reports as a shop reader sees it: the items the\n * merchant hides are withheld, as frozen with the report.\n *\n * `GET /settlement/native/shop/reports/{id}`\n */\n async retrieveShopNativeReport(id: string, options?: RequestExtras): Promise<NativeShopReport> {\n return this.request('GET', `/settlement/native/shop/reports/${encodeURIComponent(id)}`, {\n ...options,\n });\n }\n\n /**\n * Record a transfer already made, under settlement write permission and\n * the caller's payout limits. This method never sends money. Native minor\n * units remain strings; negative records must name a same-scope reversal.\n * These records belong to the native ledger, separate from monthly USD\n * statement payouts and advances.\n */\n async recordNativePayout(\n params: NativeSettlementPayoutCreateRequest,\n options?: RequestExtras,\n ): Promise<NativeSettlementPayout> {\n return this.request('POST', '/settlement/native/payouts', {\n body: params,\n ...options,\n bodyIdempotencyKey: params.idempotency_key,\n });\n }\n\n /**\n * List recorded payouts, the earliest value date first. `sort_by` takes\n * `value_date` or `amount` here; another value is refused.\n */\n async listNativePayouts(\n params: NativeSettlementListRequest,\n options?: RequestExtras,\n ): Promise<NativeSettlementPayoutListResponse> {\n return this.request('GET', '/settlement/native/payouts', {\n query: nativeListQuery(params),\n ...options,\n });\n }\n\n /** Refresh a bounded page of provider fee evidence. Follow next_offset while has_more is true. */\n async refreshNativeFees(\n params: NativeSettlementFeeRefreshRequest,\n options?: RequestExtras,\n ): Promise<NativeSettlementFeeRefreshResponse> {\n return this.request('POST', '/settlement/native/fees/refresh', { body: params, ...options });\n }\n\n async downloadNativeReportPdf(\n reportId: string,\n params?: NativeSettlementPdfRequest,\n options?: RequestExtras,\n ): Promise<Blob> {\n return this.request('GET', `/settlement/native/reports/${encodeURIComponent(reportId)}/pdf`, {\n query: { include_transactions: params?.include_transactions },\n responseType: 'blob',\n ...options,\n });\n }\n\n /** Download the frozen source rows and calculation as CSV. */\n async downloadNativeReportCsv(reportId: string, options?: RequestExtras): Promise<Blob> {\n return this.request(\n 'GET',\n `/settlement/native/reports/${encodeURIComponent(reportId)}/export`,\n {\n ...options,\n headers: exportHeaders(options, 'text/csv'),\n responseType: 'blob',\n },\n );\n }\n\n /**\n * The merchant's stored reserves: what a statement structure's reserve item\n * holds, for how long and when it is released.\n *\n * `GET /settlement/native/reserves`\n */\n async listNativeReserves(options?: RequestExtras): Promise<NativeReserveListResponse> {\n return this.request('GET', '/settlement/native/reserves', { ...options });\n }\n\n /**\n * What the shop's reserves hold for it, for a reader whose role is bound to\n * one shop: only reserves the merchant shows to shop readers, and only this\n * shop's held amounts and releases.\n *\n * `GET /settlement/native/shop/reserves`\n */\n async listShopNativeReserves(\n params: NativeShopReserveListRequest,\n options?: RequestExtras,\n ): Promise<NativeShopReserveListResponse> {\n return this.request('GET', '/settlement/native/shop/reserves', {\n query: { currency: params.currency, test_mode: params.test_mode },\n ...options,\n });\n }\n\n /**\n * Store a reserve for a statement structure's reserve item, at the merchant,\n * one of its projects or one of its shops. Requires settlement edit\n * permission. One reserve per item and level; a second is refused with 412.\n *\n * `POST /settlement/native/reserves`\n */\n async createNativeReserve(\n params: NativeReserveCreateRequest,\n options?: RequestExtras,\n ): Promise<NativeReserve> {\n return this.request('POST', '/settlement/native/reserves', { body: params, ...options });\n }\n\n /**\n * Change a stored reserve. Amounts already held keep the rule they were held\n * under. Send the `modified_at` you read; an edit of an older version is\n * refused with 412.\n *\n * `PUT /settlement/native/reserves/{id}`\n */\n async updateNativeReserve(\n reserveId: string,\n params: NativeReserveUpdateRequest,\n options?: RequestExtras,\n ): Promise<NativeReserve> {\n return this.request('PUT', `/settlement/native/reserves/${encodeURIComponent(reserveId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * What a reserve holds in one currency and mode: its balance, each held\n * amount with the rule it keeps, and every release.\n *\n * `GET /settlement/native/reserves/{id}/overview`\n */\n async nativeReserveOverview(\n reserveId: string,\n params: NativeReserveOverviewRequest,\n options?: RequestExtras,\n ): Promise<NativeReserveOverview> {\n return this.request(\n 'GET',\n `/settlement/native/reserves/${encodeURIComponent(reserveId)}/overview`,\n {\n query: { currency: params.currency, test_mode: params.test_mode },\n ...options,\n },\n );\n }\n\n /**\n * Release part of a held amount by hand, before it is due. Requires\n * settlement write permission. Reuse the same `release_key` when retrying:\n * the same key and amount answer with the release already made.\n *\n * `POST /settlement/native/reserves/{id}/lots/{lot_id}/release`\n */\n async releaseNativeReserveEarly(\n reserveId: string,\n lotId: string,\n params: NativeReserveReleaseRequest,\n options?: RequestExtras,\n ): Promise<NativeReserveMovement> {\n return this.request(\n 'POST',\n `/settlement/native/reserves/${encodeURIComponent(reserveId)}/lots/${encodeURIComponent(lotId)}/release`,\n { body: params, ...options },\n );\n }\n\n /** Export the frozen report as JSON, excluding host account-level costs. */\n async exportNativeReportJson(\n reportId: string,\n options?: RequestExtras,\n ): Promise<NativeSettlementReportExport> {\n return this.request(\n 'GET',\n `/settlement/native/reports/${encodeURIComponent(reportId)}/export`,\n {\n ...options,\n headers: exportHeaders(options, 'application/json'),\n },\n );\n }\n}\n"],"mappings":";;;;;AA6EO,SAAS,mBAAmB,QAAgE;AACjG,SAAO;AAAA,IACL;AAAA,MACE,WAAW,OAAO;AAAA,MAClB,YAAY,OAAO;AAAA,MACnB,OAAO,OAAO;AA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AA,EASA,MAAM,oBACJ,QACA,SACwB;AACxB,WAAO,KAAK,QAAQ,QAAQ,+BAA+B,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAAA,EACzF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,oBACJ,WACA,QACA,SACwB;AACxB,WAAO,KAAK,QAAQ,OAAO,+BAA+B,mBAAmB,SAAS,CAAC,IAAI;AAAA,MACzF,MAAM;AAAA,MACN,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,sBACJ,WACA,QACA,SACgC;AAChC,WAAO,KAAK;AAAA,MACV;AAAA,MACA,+BAA+B,mBAAmB,SAAS,CAAC;AAAA,MAC5D;AAAA,QACE,OAAO,EAAE,UAAU,OAAO,UAAU,WAAW,OAAO,UAAU;AAAA,QAChE,GAAG;AAAA,MACL;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,0BACJ,WACA,OACA,QACA,SACgC;AAChC,WAAO,KAAK;AAAA,MACV;AAAA,MACA,+BAA+B,mBAAmB,SAAS,CAAC,SAAS,mBAAmB,KAAK,CAAC;AAAA,MAC9F,EAAE,MAAM,QAAQ,GAAG,QAAQ;AAAA,IAC7B;AAAA,EACF;AAAA;AAAA,EAGA,MAAM,uBACJ,UACA,SACuC;AACvC,WAAO,KAAK;AAAA,MACV;AAAA,MACA,8BAA8B,mBAAmB,QAAQ,CAAC;AAAA,MAC1D;AAAA,QACE,GAAG;AAAA,QACH,SAAS,cAAc,SAAS,kBAAkB;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/tmp/w4-
|
|
1
|
+
{"version":3,"sources":["/tmp/w4-sdk447/dist/chunk-ZUULK36E.cjs","../src/resources/contentEncryption.ts"],"names":[],"mappings":"AAAA;ACWO,IAAM,kBAAA,EAAN,MAAwB;AAAA,EAC7B,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAalD,MAAM,QAAA,CAAS,OAAA,EAA2D;AACxE,IAAA,OAAO,IAAA,CAAK,OAAA,CAAQ,KAAA,EAAO,qBAAA,EAAuB,EAAE,GAAG,QAAQ,CAAC,CAAA;AAAA,EAClE;AACF,CAAA;ADRA;AACA;AACE;AACF,8CAAC","file":"/tmp/w4-sdk447/dist/chunk-ZUULK36E.cjs","sourcesContent":[null,"import type { RequestExtras, RequestFn } from '../client';\nimport type { ContentEncryptionStatus } from '../types';\n\n/**\n * Whether the deployment stores new messages and uploaded files encrypted\n * with its own key. Public: no credential is needed, so a client built with\n * no API key or with only a publishable key can ask before anyone signs in.\n *\n * This is encryption at rest by the deployment's servers, which hold the\n * key. It is never end-to-end.\n */\nexport class ContentEncryption {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The current status. Show a \"stored encrypted\" note only while\n * `encrypted` is `true`. The answer is cached for up to 60 seconds, so a\n * change can take that long to show.\n *\n * Pass a `signal` (e.g. `AbortSignal.timeout(2500)`) to bound the call\n * including its retries; a `timeout` alone applies to each attempt. A\n * page that cannot get an answer should show no note, rather than wait.\n *\n * `GET /content-encryption`\n */\n async retrieve(options?: RequestExtras): Promise<ContentEncryptionStatus> {\n return this.request('GET', '/content-encryption', { ...options });\n }\n}\n"]}
|
package/dist/client.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZFUGT6YLcjs = require('./chunk-ZFUGT6YL.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkHSJABE7Xcjs = require('./chunk-HSJABE7X.cjs');
|
|
@@ -13,5 +13,5 @@ var _chunkI2W7AO4Bcjs = require('./chunk-I2W7AO4B.cjs');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.Delopay =
|
|
16
|
+
exports.Delopay = _chunkZFUGT6YLcjs.Delopay; exports.DelopayAuthenticationError = _chunkI2W7AO4Bcjs.DelopayAuthenticationError; exports.DelopayCore = _chunkHSJABE7Xcjs.DelopayCore; exports.DelopayError = _chunkI2W7AO4Bcjs.DelopayError;
|
|
17
17
|
//# sourceMappingURL=client.cjs.map
|
package/dist/client.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/tmp/w4-
|
|
1
|
+
{"version":3,"sources":["/tmp/w4-sdk447/dist/client.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,2OAAC","file":"/tmp/w4-sdk447/dist/client.cjs"}
|
package/dist/client.js
CHANGED
package/dist/core.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/tmp/w4-
|
|
1
|
+
{"version":3,"sources":["/tmp/w4-sdk447/dist/core.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,8LAAC","file":"/tmp/w4-sdk447/dist/core.cjs"}
|
package/dist/currencies.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/tmp/w4-
|
|
1
|
+
{"version":3,"sources":["/tmp/w4-sdk447/dist/currencies.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,kEAAC","file":"/tmp/w4-sdk447/dist/currencies.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/tmp/w4-
|
|
1
|
+
{"version":3,"sources":["/tmp/w4-sdk447/dist/enigmaCardForm.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,ukEAAC","file":"/tmp/w4-sdk447/dist/enigmaCardForm.cjs"}
|
package/dist/error.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/tmp/w4-
|
|
1
|
+
{"version":3,"sources":["/tmp/w4-sdk447/dist/error.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,yIAAC","file":"/tmp/w4-sdk447/dist/error.cjs"}
|
package/dist/eventStream.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/tmp/w4-
|
|
1
|
+
{"version":3,"sources":["/tmp/w4-sdk447/dist/eventStream.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,gEAAC","file":"/tmp/w4-sdk447/dist/eventStream.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/tmp/w4-
|
|
1
|
+
{"version":3,"sources":["/tmp/w4-sdk447/dist/exportDownload.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,+eAAC","file":"/tmp/w4-sdk447/dist/exportDownload.cjs"}
|
package/dist/feeProgram.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/tmp/w4-
|
|
1
|
+
{"version":3,"sources":["/tmp/w4-sdk447/dist/feeProgram.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,ihBAAC","file":"/tmp/w4-sdk447/dist/feeProgram.cjs"}
|