@delopay/sdk 0.493.0 → 0.494.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/checkoutSession.cjs +2 -2
  2. package/dist/checkoutSession.js +1 -1
  3. package/dist/{chunk-XE54RJL2.js → chunk-3HUJ7PPJ.js} +26 -1
  4. package/dist/chunk-3HUJ7PPJ.js.map +1 -0
  5. package/dist/{chunk-QONQKUM3.js → chunk-CQQ2GBUU.js} +16 -1
  6. package/dist/chunk-CQQ2GBUU.js.map +1 -0
  7. package/dist/{chunk-DQHT4FGI.cjs → chunk-F6QJB4XP.cjs} +16 -1
  8. package/dist/chunk-F6QJB4XP.cjs.map +1 -0
  9. package/dist/{chunk-Y2EWCU4P.js → chunk-MOFPVWNN.js} +2 -2
  10. package/dist/{chunk-PWJS7MLG.cjs → chunk-OFZJ4JAH.cjs} +3 -3
  11. package/dist/{chunk-PWJS7MLG.cjs.map → chunk-OFZJ4JAH.cjs.map} +1 -1
  12. package/dist/{chunk-ANQRR2BG.cjs → chunk-OMQK3CMR.cjs} +26 -1
  13. package/dist/chunk-OMQK3CMR.cjs.map +1 -0
  14. package/dist/{chunk-EUJCMSTJ.js → chunk-QG6AD33A.js} +2 -2
  15. package/dist/{chunk-GWWGO4EU.cjs → chunk-XPSN5YYU.cjs} +3 -3
  16. package/dist/{chunk-GWWGO4EU.cjs.map → chunk-XPSN5YYU.cjs.map} +1 -1
  17. package/dist/client.cjs +2 -2
  18. package/dist/client.js +1 -1
  19. package/dist/index.cjs +4 -4
  20. package/dist/index.d.cts +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.js +3 -3
  23. package/dist/internal/resources/admin.d.cts +1 -1
  24. package/dist/internal/resources/admin.d.ts +1 -1
  25. package/dist/internal/resources/adminBranding.d.cts +1 -1
  26. package/dist/internal/resources/adminBranding.d.ts +1 -1
  27. package/dist/internal/resources/adminCheckoutDomains.d.cts +1 -1
  28. package/dist/internal/resources/adminCheckoutDomains.d.ts +1 -1
  29. package/dist/internal/resources/adminFeePlans.d.cts +1 -1
  30. package/dist/internal/resources/adminFeePlans.d.ts +1 -1
  31. package/dist/internal/resources/adminFileScans.d.cts +1 -1
  32. package/dist/internal/resources/adminFileScans.d.ts +1 -1
  33. package/dist/internal/resources/adminIndustries.d.cts +1 -1
  34. package/dist/internal/resources/adminIndustries.d.ts +1 -1
  35. package/dist/internal/resources/adminNotices.d.cts +1 -1
  36. package/dist/internal/resources/adminNotices.d.ts +1 -1
  37. package/dist/internal/resources/adminPortal.d.cts +1 -1
  38. package/dist/internal/resources/adminPortal.d.ts +1 -1
  39. package/dist/internal/resources/adminPricing.cjs +2 -2
  40. package/dist/internal/resources/adminPricing.d.cts +14 -1
  41. package/dist/internal/resources/adminPricing.d.ts +14 -1
  42. package/dist/internal/resources/adminPricing.js +1 -1
  43. package/dist/internal/resources/adminSupport.d.cts +1 -1
  44. package/dist/internal/resources/adminSupport.d.ts +1 -1
  45. package/dist/internal/resources/auditLogs.d.cts +1 -1
  46. package/dist/internal/resources/auditLogs.d.ts +1 -1
  47. package/dist/internal/resources/cardIssuers.d.cts +1 -1
  48. package/dist/internal/resources/cardIssuers.d.ts +1 -1
  49. package/dist/internal/resources/connectorRestrictionRules.d.cts +1 -1
  50. package/dist/internal/resources/connectorRestrictionRules.d.ts +1 -1
  51. package/dist/internal/resources/connectorRestrictions.d.cts +1 -1
  52. package/dist/internal/resources/connectorRestrictions.d.ts +1 -1
  53. package/dist/internal/resources/diagnostic.d.cts +1 -1
  54. package/dist/internal/resources/diagnostic.d.ts +1 -1
  55. package/dist/internal/resources/gsm.d.cts +1 -1
  56. package/dist/internal/resources/gsm.d.ts +1 -1
  57. package/dist/internal/resources/nativeRenewals.d.cts +1 -1
  58. package/dist/internal/resources/nativeRenewals.d.ts +1 -1
  59. package/dist/internal/resources/platformBilling.d.cts +1 -1
  60. package/dist/internal/resources/platformBilling.d.ts +1 -1
  61. package/dist/internal/resources/platformSettings.d.cts +1 -1
  62. package/dist/internal/resources/platformSettings.d.ts +1 -1
  63. package/dist/internal.cjs +7 -7
  64. package/dist/internal.d.cts +2 -2
  65. package/dist/internal.d.ts +2 -2
  66. package/dist/internal.js +4 -4
  67. package/dist/resources/billing.cjs +2 -2
  68. package/dist/resources/billing.d.cts +12 -1
  69. package/dist/resources/billing.d.ts +12 -1
  70. package/dist/resources/billing.js +1 -1
  71. package/dist/{types-C6zTmzk0.d.ts → types-BtWBzduo.d.ts} +78 -2
  72. package/dist/{types-CPwF4xMA.d.cts → types-UFZPk6UN.d.cts} +78 -2
  73. package/dist/types.d.cts +157 -5
  74. package/dist/types.d.ts +157 -5
  75. package/package.json +19 -17
  76. package/dist/chunk-ANQRR2BG.cjs.map +0 -1
  77. package/dist/chunk-DQHT4FGI.cjs.map +0 -1
  78. package/dist/chunk-QONQKUM3.js.map +0 -1
  79. package/dist/chunk-XE54RJL2.js.map +0 -1
  80. /package/dist/{chunk-Y2EWCU4P.js.map → chunk-MOFPVWNN.js.map} +0 -0
  81. /package/dist/{chunk-EUJCMSTJ.js.map → chunk-QG6AD33A.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkPWJS7MLGcjs = require('./chunk-PWJS7MLG.cjs');
3
+ var _chunkOFZJ4JAHcjs = require('./chunk-OFZJ4JAH.cjs');
4
4
 
5
5
 
6
- exports.CheckoutSession = _chunkPWJS7MLGcjs.CheckoutSession;
6
+ exports.CheckoutSession = _chunkOFZJ4JAHcjs.CheckoutSession;
7
7
  //# sourceMappingURL=checkoutSession.cjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CheckoutSession
3
- } from "./chunk-Y2EWCU4P.js";
3
+ } from "./chunk-MOFPVWNN.js";
4
4
  export {
5
5
  CheckoutSession
6
6
  };
@@ -243,9 +243,34 @@ var AdminPricing = class {
243
243
  body: params
244
244
  });
245
245
  }
246
+ /** List recorded platform event fees across merchants. `GET /admin-portal/pricing/event-fees` */
247
+ async listEventFees(params) {
248
+ return this.request("GET", `${BASE}/event-fees`, {
249
+ query: params
250
+ });
251
+ }
252
+ /** Dry-run calculate the platform event fee and effective FX rate for a hypothetical event. `POST /admin-portal/pricing/event-fees/preview` */
253
+ async previewEventFee(params) {
254
+ return this.request("POST", `${BASE}/event-fees/preview`, {
255
+ body: params
256
+ });
257
+ }
258
+ /**
259
+ * Record and settle one operator-recorded platform event fee. `POST /admin-portal/pricing/event-fees`
260
+ *
261
+ * Deduplicated by `(merchant_id, fee_type, reference_id)` (trimmed `reference_id`, without a
262
+ * `test_mode` dimension). Retrying with a different `fee_type` bypasses deduplication and can
263
+ * create a separate debit depending on `charge_status`; callers must use distinct `reference_id`
264
+ * values for test and live records so a completed test write is never replayed as a live charge.
265
+ */
266
+ async recordEventFee(params) {
267
+ return this.request("POST", `${BASE}/event-fees`, {
268
+ body: params
269
+ });
270
+ }
246
271
  };
247
272
 
248
273
  export {
249
274
  AdminPricing
250
275
  };
251
- //# sourceMappingURL=chunk-XE54RJL2.js.map
276
+ //# sourceMappingURL=chunk-3HUJ7PPJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/internal/resources/adminPricing.ts"],"sourcesContent":["import type { RequestFn } from '../../client';\nimport type { MerchantPricingViewResponse, PricingFeeType } from '../../types';\nimport type {\n AdminEventFeeListQuery,\n AdminEventFeeListResponse,\n AdminEventFeeRecord,\n AdminServiceUsageListQuery,\n AdminServiceUsageListResponse,\n AdminServiceUsageRecord,\n EffectivePricingQuery,\n EffectivePricingResponse,\n EventFeePreviewRequest,\n EventFeePreviewResponse,\n EventFeeRecordRequest,\n MerchantPricingBrandResponse,\n PricingBrand,\n PricingOverview,\n PricingOverviewQuery,\n PricingSaveRequest,\n PricingScope,\n PricingScopeView,\n ServiceUsagePreviewRequest,\n ServiceUsagePreviewResponse,\n ServiceUsageRecordRequest,\n} from '../types';\n\nconst BASE = '/admin-portal/pricing';\nconst brandPath = (brand: PricingBrand, feeType: PricingFeeType): string =>\n `${BASE}/brands/${encodeURIComponent(brand)}/${encodeURIComponent(feeType)}`;\nconst merchantBasePath = (merchantId: string): string =>\n `${BASE}/merchants/${encodeURIComponent(merchantId)}`;\nconst merchantFeePath = (merchantId: string, feeType: PricingFeeType): string =>\n `${merchantBasePath(merchantId)}/${encodeURIComponent(feeType)}`;\nconst projectFeePath = (merchantId: string, projectId: string, feeType: PricingFeeType): string =>\n `${merchantBasePath(merchantId)}/projects/${encodeURIComponent(projectId)}/${encodeURIComponent(feeType)}`;\nconst shopFeePath = (merchantId: string, profileId: string, feeType: PricingFeeType): string =>\n `${merchantBasePath(merchantId)}/shops/${encodeURIComponent(profileId)}/${encodeURIComponent(feeType)}`;\n\nconst UNICODE_EDGE_WHITESPACE = /^\\p{White_Space}+|\\p{White_Space}+$/gu;\n\nfunction trimUnicodeWhitespace(value: string): string {\n return value.replace(UNICODE_EDGE_WHITESPACE, '');\n}\n\nfunction assertOptionalProviderSlug(provider: string | null | undefined): string | undefined {\n if (provider === undefined || provider === null) {\n return undefined;\n }\n const trimmed = trimUnicodeWhitespace(provider);\n if (!trimmed) {\n throw new TypeError(\n 'Provider slug cannot be empty or whitespace; omit provider (or pass null when saving) for a service-wide rule.',\n );\n }\n return trimmed;\n}\n\nfunction validateSaveRequest(params: PricingSaveRequest): PricingSaveRequest {\n if (params.provider === undefined || params.provider === null) {\n return params;\n }\n const provider = assertOptionalProviderSlug(params.provider);\n return provider === params.provider ? params : { ...params, provider };\n}\n\nfunction scopeCancelQuery(scope: PricingScope): Record<string, string> {\n switch (scope.level) {\n case 'brand_default':\n if (!scope.brand) {\n throw new TypeError('Brand default scope requires brand.');\n }\n return { brand: scope.brand };\n case 'merchant':\n if (!scope.merchant_id) {\n throw new TypeError('Merchant scope requires merchant_id.');\n }\n return { merchant_id: scope.merchant_id };\n case 'project':\n if (!scope.merchant_id || !scope.project_id) {\n throw new TypeError('Project scope requires merchant_id and project_id.');\n }\n return { merchant_id: scope.merchant_id, project_id: scope.project_id };\n case 'shop':\n if (!scope.merchant_id || !scope.profile_id) {\n throw new TypeError('Shop scope requires merchant_id and profile_id.');\n }\n return { merchant_id: scope.merchant_id, profile_id: scope.profile_id };\n }\n}\n\n/**\n * Unified platform pricing hierarchy across every fee type: brand default\n * (`delopay` / `spicepay`), merchant, project, and shop, plus the Effective\n * Price View showing where every price comes from.\n *\n * Every write carries the scope's optimistic `expected_revision` token; a write\n * against an older revision is refused with `412 Precondition Failed`.\n */\nexport class AdminPricing {\n constructor(private readonly request: RequestFn) {}\n\n /** Brand defaults, active/scheduled exceptions, and older setups. `GET /admin-portal/pricing` */\n async overview(params?: PricingOverviewQuery): Promise<PricingOverview> {\n return this.request('GET', BASE, {\n query: {\n merchant_id: params?.merchant_id,\n fee_type: params?.fee_type,\n provider: params?.provider,\n },\n });\n }\n\n /** Effective price view naming the exact source of every fee type. `GET /admin-portal/pricing/effective` */\n async effective(params: EffectivePricingQuery): Promise<EffectivePricingResponse> {\n return this.request('GET', `${BASE}/effective`, {\n query: {\n merchant_id: params.merchant_id,\n project_id: params.project_id,\n profile_id: params.profile_id,\n provider: params.provider,\n at: params.at,\n },\n });\n }\n\n /** Save a brand default price (service-wide or for one provider). `PUT /admin-portal/pricing/brands/{brand}/{fee_type}` */\n async saveBrand(\n brand: PricingBrand,\n feeType: PricingFeeType,\n params: PricingSaveRequest,\n ): Promise<PricingScopeView> {\n return this.request('PUT', brandPath(brand, feeType), { body: validateSaveRequest(params) });\n }\n\n /** Remove a provider-specific brand default override. Service-wide brand defaults cannot be removed. `DELETE /admin-portal/pricing/brands/{brand}/{fee_type}` */\n async removeBrand(\n brand: PricingBrand,\n feeType: PricingFeeType,\n expectedRevision: string,\n provider: string,\n ): Promise<PricingScopeView> {\n const trimmed = trimUnicodeWhitespace(provider);\n if (!trimmed) {\n throw new TypeError(\n 'Removing a brand pricing rule requires a provider slug; service-wide brand defaults cannot be removed.',\n );\n }\n return this.request('DELETE', brandPath(brand, feeType), {\n query: { expected_revision: expectedRevision, provider: trimmed },\n });\n }\n\n /** Save a merchant exception. `PUT /admin-portal/pricing/merchants/{merchant_id}/{fee_type}` */\n async saveMerchant(\n merchantId: string,\n feeType: PricingFeeType,\n params: PricingSaveRequest,\n ): Promise<PricingScopeView> {\n return this.request('PUT', merchantFeePath(merchantId, feeType), {\n body: validateSaveRequest(params),\n });\n }\n\n /** Remove a merchant exception (service-wide or for one provider). `DELETE /admin-portal/pricing/merchants/{merchant_id}/{fee_type}` */\n async removeMerchant(\n merchantId: string,\n feeType: PricingFeeType,\n expectedRevision: string,\n provider?: string,\n ): Promise<PricingScopeView> {\n const validatedProvider = assertOptionalProviderSlug(provider);\n return this.request('DELETE', merchantFeePath(merchantId, feeType), {\n query: { expected_revision: expectedRevision, provider: validatedProvider },\n });\n }\n\n /** Save a project exception. `PUT /admin-portal/pricing/merchants/{merchant_id}/projects/{project_id}/{fee_type}` */\n async saveProject(\n merchantId: string,\n projectId: string,\n feeType: PricingFeeType,\n params: PricingSaveRequest,\n ): Promise<PricingScopeView> {\n return this.request('PUT', projectFeePath(merchantId, projectId, feeType), {\n body: validateSaveRequest(params),\n });\n }\n\n /** Remove a project exception (service-wide or for one provider). `DELETE /admin-portal/pricing/merchants/{merchant_id}/projects/{project_id}/{fee_type}` */\n async removeProject(\n merchantId: string,\n projectId: string,\n feeType: PricingFeeType,\n expectedRevision: string,\n provider?: string,\n ): Promise<PricingScopeView> {\n const validatedProvider = assertOptionalProviderSlug(provider);\n return this.request('DELETE', projectFeePath(merchantId, projectId, feeType), {\n query: { expected_revision: expectedRevision, provider: validatedProvider },\n });\n }\n\n /** Save a shop exception. `PUT /admin-portal/pricing/merchants/{merchant_id}/shops/{profile_id}/{fee_type}` */\n async saveShop(\n merchantId: string,\n profileId: string,\n feeType: PricingFeeType,\n params: PricingSaveRequest,\n ): Promise<PricingScopeView> {\n return this.request('PUT', shopFeePath(merchantId, profileId, feeType), {\n body: validateSaveRequest(params),\n });\n }\n\n /** Remove a shop exception (service-wide or for one provider). `DELETE /admin-portal/pricing/merchants/{merchant_id}/shops/{profile_id}/{fee_type}` */\n async removeShop(\n merchantId: string,\n profileId: string,\n feeType: PricingFeeType,\n expectedRevision: string,\n provider?: string,\n ): Promise<PricingScopeView> {\n const validatedProvider = assertOptionalProviderSlug(provider);\n return this.request('DELETE', shopFeePath(merchantId, profileId, feeType), {\n query: { expected_revision: expectedRevision, provider: validatedProvider },\n });\n }\n\n /** Save a price at any scope in the hierarchy (brand default, merchant, project, or shop). */\n async save(\n scope: PricingScope,\n feeType: PricingFeeType,\n params: PricingSaveRequest,\n ): Promise<PricingScopeView> {\n switch (scope.level) {\n case 'brand_default':\n if (!scope.brand) {\n throw new TypeError('Brand default scope requires brand.');\n }\n return this.saveBrand(scope.brand, feeType, params);\n case 'merchant':\n if (!scope.merchant_id) {\n throw new TypeError('Merchant scope requires merchant_id.');\n }\n return this.saveMerchant(scope.merchant_id, feeType, params);\n case 'project':\n if (!scope.merchant_id || !scope.project_id) {\n throw new TypeError('Project scope requires merchant_id and project_id.');\n }\n return this.saveProject(scope.merchant_id, scope.project_id, feeType, params);\n case 'shop':\n if (!scope.merchant_id || !scope.profile_id) {\n throw new TypeError('Shop scope requires merchant_id and profile_id.');\n }\n return this.saveShop(scope.merchant_id, scope.profile_id, feeType, params);\n }\n }\n\n /** Remove an exception scope or a provider-specific brand override; service-wide brand defaults cannot be removed. */\n async remove(\n scope: PricingScope,\n feeType: PricingFeeType,\n expectedRevision: string,\n provider?: string,\n ): Promise<PricingScopeView> {\n switch (scope.level) {\n case 'brand_default':\n if (!scope.brand) {\n throw new TypeError('Brand default scope requires brand.');\n }\n if (!provider || !trimUnicodeWhitespace(provider)) {\n throw new TypeError('A brand default price cannot be removed without a provider.');\n }\n return this.removeBrand(scope.brand, feeType, expectedRevision, provider);\n case 'merchant':\n if (!scope.merchant_id) {\n throw new TypeError('Merchant scope requires merchant_id.');\n }\n return this.removeMerchant(scope.merchant_id, feeType, expectedRevision, provider);\n case 'project':\n if (!scope.merchant_id || !scope.project_id) {\n throw new TypeError('Project scope requires merchant_id and project_id.');\n }\n return this.removeProject(\n scope.merchant_id,\n scope.project_id,\n feeType,\n expectedRevision,\n provider,\n );\n case 'shop':\n if (!scope.merchant_id || !scope.profile_id) {\n throw new TypeError('Shop scope requires merchant_id and profile_id.');\n }\n return this.removeShop(\n scope.merchant_id,\n scope.profile_id,\n feeType,\n expectedRevision,\n provider,\n );\n }\n }\n\n /** Cancel a future scheduled version. `DELETE /admin-portal/pricing/versions/{version_id}` */\n async cancelVersion(\n versionId: string,\n feeType: PricingFeeType,\n scope: PricingScope,\n expectedRevision: string,\n provider?: string,\n ): Promise<PricingScopeView> {\n const scopeQuery = scopeCancelQuery(scope);\n const validatedProvider = assertOptionalProviderSlug(provider);\n return this.request('DELETE', `${BASE}/versions/${encodeURIComponent(versionId)}`, {\n query: {\n fee_type: feeType,\n provider: validatedProvider,\n ...scopeQuery,\n expected_revision: expectedRevision,\n },\n });\n }\n\n /** Read a merchant's effective and explicit pricing brand. `GET /admin-portal/pricing/merchants/{merchant_id}/brand` */\n async getMerchantBrand(merchantId: string): Promise<MerchantPricingBrandResponse> {\n return this.request('GET', `${merchantBasePath(merchantId)}/brand`);\n }\n\n /** Read the exact Pricing page view a merchant sees (read-only staff mirror). `GET /admin-portal/pricing/merchants/{merchant_id}/view` */\n async getMerchantView(merchantId: string): Promise<MerchantPricingViewResponse> {\n return this.request('GET', `${merchantBasePath(merchantId)}/view`);\n }\n\n /** Assign a merchant's pricing brand (`'delopay'` / `'spicepay'`), or `null` to inherit the deployment brand. `PUT /admin-portal/pricing/merchants/{merchant_id}/brand` */\n async setMerchantBrand(\n merchantId: string,\n brand: PricingBrand | null,\n ): Promise<MerchantPricingBrandResponse> {\n return this.request('PUT', `${merchantBasePath(merchantId)}/brand`, {\n body: { brand },\n });\n }\n\n /** List recorded third-party service uses across merchants with separate provider cost and markup. `GET /admin-portal/pricing/service-usages` */\n async listServiceUsages(\n params?: AdminServiceUsageListQuery,\n ): Promise<AdminServiceUsageListResponse> {\n return this.request('GET', `${BASE}/service-usages`, {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /** Dry-run calculate the provider cost, platform markup, and total charge for a third-party service use. `POST /admin-portal/pricing/service-usages/preview` */\n async previewServiceUsage(\n params: ServiceUsagePreviewRequest,\n ): Promise<ServiceUsagePreviewResponse> {\n return this.request('POST', `${BASE}/service-usages/preview`, {\n body: params,\n });\n }\n\n /** Record and settle one third-party service use idempotently by `reference_id`. `POST /admin-portal/pricing/service-usages` */\n async recordServiceUsage(params: ServiceUsageRecordRequest): Promise<AdminServiceUsageRecord> {\n return this.request('POST', `${BASE}/service-usages`, {\n body: params,\n });\n }\n\n /** List recorded platform event fees across merchants. `GET /admin-portal/pricing/event-fees` */\n async listEventFees(params?: AdminEventFeeListQuery): Promise<AdminEventFeeListResponse> {\n return this.request('GET', `${BASE}/event-fees`, {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /** Dry-run calculate the platform event fee and effective FX rate for a hypothetical event. `POST /admin-portal/pricing/event-fees/preview` */\n async previewEventFee(params: EventFeePreviewRequest): Promise<EventFeePreviewResponse> {\n return this.request('POST', `${BASE}/event-fees/preview`, {\n body: params,\n });\n }\n\n /**\n * Record and settle one operator-recorded platform event fee. `POST /admin-portal/pricing/event-fees`\n *\n * Deduplicated by `(merchant_id, fee_type, reference_id)` (trimmed `reference_id`, without a\n * `test_mode` dimension). Retrying with a different `fee_type` bypasses deduplication and can\n * create a separate debit depending on `charge_status`; callers must use distinct `reference_id`\n * values for test and live records so a completed test write is never replayed as a live charge.\n */\n async recordEventFee(params: EventFeeRecordRequest): Promise<AdminEventFeeRecord> {\n return this.request('POST', `${BASE}/event-fees`, {\n body: params,\n });\n }\n}\n"],"mappings":";AA0BA,IAAM,OAAO;AACb,IAAM,YAAY,CAAC,OAAqB,YACtC,GAAG,IAAI,WAAW,mBAAmB,KA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,UAAU,CAAC,UAAU;AAAA,MAClE,MAAM,EAAE,MAAM;AAAA,IAChB,CAAC;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,kBACJ,QACwC;AACxC,WAAO,KAAK,QAAQ,OAAO,GAAG,IAAI,mBAAmB;AAAA,MACnD,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,oBACJ,QACsC;AACtC,WAAO,KAAK,QAAQ,QAAQ,GAAG,IAAI,2BAA2B;AAAA,MAC5D,MAAM;AAAA,IACR,CAAC;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,mBAAmB,QAAqE;AAC5F,WAAO,KAAK,QAAQ,QAAQ,GAAG,IAAI,mBAAmB;AAAA,MACpD,MAAM;AAAA,IACR,CAAC;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,cAAc,QAAqE;AACvF,WAAO,KAAK,QAAQ,OAAO,GAAG,IAAI,eAAe;AAAA,MAC/C,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAAA;AAAA,EAGA,MAAM,gBAAgB,QAAkE;AACtF,WAAO,KAAK,QAAQ,QAAQ,GAAG,IAAI,uBAAuB;AAAA,MACxD,MAAM;AAAA,IACR,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,eAAe,QAA6D;AAChF,WAAO,KAAK,QAAQ,QAAQ,GAAG,IAAI,eAAe;AAAA,MAChD,MAAM;AAAA,IACR,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -145,6 +145,21 @@ var Billing = class {
145
145
  query: params
146
146
  });
147
147
  }
148
+ /**
149
+ * List recorded platform event fees (disputes, refunds, declined attempts,
150
+ * 3-D Secure attempts, currency conversion markups, international card
151
+ * surcharges, and payouts) for a merchant.
152
+ *
153
+ * @param merchantId - The merchant account ID.
154
+ * @param params - Optional shop, event fee type, entity ID, charge status,
155
+ * test-mode, date window, and pagination filters.
156
+ * @returns Paginated platform event fee records.
157
+ */
158
+ async listEventFees(merchantId, params) {
159
+ return this.request("GET", `/billing/${encodeURIComponent(merchantId)}/event-fees`, {
160
+ query: params
161
+ });
162
+ }
148
163
  /**
149
164
  * List payment attempts that were blocked by the billing suspension gate
150
165
  * (account suspended, setup incomplete, or shop allocation suspended).
@@ -219,4 +234,4 @@ var Billing = class {
219
234
  export {
220
235
  Billing
221
236
  };
222
- //# sourceMappingURL=chunk-QONQKUM3.js.map
237
+ //# sourceMappingURL=chunk-CQQ2GBUU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/billing.ts"],"sourcesContent":["import type {\n BillingProfileResponse,\n BillingSetupRequest,\n BillingSetupResponse,\n BillingCompleteSetupRequest,\n TopupRequest,\n TopupResponse,\n LedgerResponse,\n LedgerListParams,\n BlockedAttemptListResponse,\n BlockedAttemptListParams,\n AutoRechargeUpdateRequest,\n AllocationTransferRequest,\n AllocationTransferResponse,\n AllocationListResponse,\n AllocationResponse,\n ServiceUsageListParams,\n ServiceUsageListResponse,\n MerchantPricingViewResponse,\n AcceptPricingChangeResponse,\n BillingStatementParams,\n BillingStatementResponse,\n EventFeeListParams,\n EventFeeListResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\nimport { csvQuery } from '../listQuery';\n\n/** Manage per-shop prepaid balance allocations transferred from the host merchant treasury. */\nclass BillingAllocations {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Transfer funds from the host merchant treasury into a shop's allocation.\n *\n * @param merchantId - The host merchant account ID.\n * @param params - Transfer details (amount, target profile/shop ID).\n * @returns The allocation transfer result.\n */\n async transferIn(\n merchantId: string,\n params: AllocationTransferRequest,\n ): Promise<AllocationTransferResponse> {\n return this.request(\n 'POST',\n `/billing/${encodeURIComponent(merchantId)}/allocations/transfer-in`,\n { body: params },\n );\n }\n\n /**\n * Transfer funds from a shop's allocation back to the host merchant treasury.\n *\n * @param merchantId - The host merchant account ID.\n * @param params - Transfer details (amount, source profile/shop ID).\n * @returns The allocation transfer result.\n */\n async transferOut(\n merchantId: string,\n params: AllocationTransferRequest,\n ): Promise<AllocationTransferResponse> {\n return this.request(\n 'POST',\n `/billing/${encodeURIComponent(merchantId)}/allocations/transfer-out`,\n {\n body: params,\n },\n );\n }\n\n /**\n * List all shop balance allocations for a merchant.\n *\n * @param merchantId - The merchant account ID.\n * @returns List of shop allocations.\n */\n async list(merchantId: string): Promise<AllocationListResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/allocations`);\n }\n\n /**\n * Get the balance allocation for a specific shop.\n *\n * @param merchantId - The merchant account ID.\n * @param profileId - The shop (business profile) ID.\n * @returns The shop's balance allocation.\n */\n async get(merchantId: string, profileId: string): Promise<AllocationResponse> {\n return this.request(\n 'GET',\n `/billing/${encodeURIComponent(merchantId)}/allocations/${encodeURIComponent(profileId)}`,\n );\n }\n}\n\n/**\n * Manage prepaid billing balances — top-ups, card setup, auto-recharge, and the balance ledger.\n *\n * Delopay deducts a platform fee from the merchant's prepaid balance on every successful payment.\n * Use these endpoints to fund and monitor that balance.\n */\nexport class Billing {\n /** Per-shop balance allocation management for host merchants. */\n readonly allocations: BillingAllocations;\n\n constructor(private readonly request: RequestFn) {\n this.allocations = new BillingAllocations(request);\n }\n\n /**\n * Retrieve a merchant's billing profile (balance, status, auto-recharge config).\n *\n * @param merchantId - The merchant account ID.\n * @returns The billing profile.\n *\n * @example\n * ```typescript\n * const profile = await delopay.billing.getProfile('merch_123');\n * console.log(profile.balance, profile.status);\n * ```\n */\n async getProfile(merchantId: string): Promise<BillingProfileResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}`);\n }\n\n /**\n * Start a Stripe SetupIntent flow to collect a payment card for auto-recharge.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional setup parameters.\n * @returns The Stripe client secret needed to render the card element.\n */\n async setup(merchantId: string, params?: BillingSetupRequest): Promise<BillingSetupResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/setup`, {\n body: params,\n });\n }\n\n /**\n * Confirm card setup after the Stripe SetupIntent completes on the frontend.\n *\n * @param merchantId - The merchant account ID.\n * @param params - The Stripe SetupIntent ID to confirm.\n * @returns The updated billing profile.\n */\n async completeSetup(\n merchantId: string,\n params: BillingCompleteSetupRequest,\n ): Promise<BillingProfileResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/setup/complete`, {\n body: params,\n });\n }\n\n /**\n * Manually top up a merchant's prepaid balance by charging their saved card.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Top-up amount and currency.\n * @returns The top-up result.\n */\n async topup(merchantId: string, params: TopupRequest): Promise<TopupResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/topup`, {\n body: params,\n });\n }\n\n /**\n * List the balance ledger (credits and debits) for a merchant, the newest\n * entry first unless `sort_by` says otherwise.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional pagination, filters (entry types, a creation\n * window) and sort.\n * @returns The ledger entries.\n */\n async listLedger(merchantId: string, params?: LedgerListParams): Promise<LedgerResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/ledger`, {\n query: csvQuery(params, ['entry_type']),\n });\n }\n\n /**\n * List recorded third-party service uses for a merchant with separate\n * provider cost, platform fee markup, and charged total in the merchant's\n * billing currency.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional shop, service type, provider, charge status,\n * test-mode, date window, and pagination filters.\n * @returns Paginated service usage records.\n */\n async listServiceUsages(\n merchantId: string,\n params?: ServiceUsageListParams,\n ): Promise<ServiceUsageListResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/service-usages`, {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * List recorded platform event fees (disputes, refunds, declined attempts,\n * 3-D Secure attempts, currency conversion markups, international card\n * surcharges, and payouts) for a merchant.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional shop, event fee type, entity ID, charge status,\n * test-mode, date window, and pagination filters.\n * @returns Paginated platform event fee records.\n */\n async listEventFees(\n merchantId: string,\n params?: EventFeeListParams,\n ): Promise<EventFeeListResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/event-fees`, {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * List payment attempts that were blocked by the billing suspension gate\n * (account suspended, setup incomplete, or shop allocation suspended).\n *\n * These attempts never created a payment, so they do not appear in the\n * payments list — this is the only way to retrieve them.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional filters (profile, reason, date range) and pagination.\n * @returns The blocked-attempt entries with a total count.\n */\n async listBlockedAttempts(\n merchantId: string,\n params?: BlockedAttemptListParams,\n ): Promise<BlockedAttemptListResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/blocked-attempts`, {\n query: params as Record<string, string | number | undefined>,\n });\n }\n\n /**\n * Update auto-recharge configuration (threshold, top-up amount, enabled flag).\n *\n * @param merchantId - The merchant account ID.\n * @param params - Auto-recharge settings to update.\n * @returns The updated billing profile.\n */\n async updateAutoRecharge(\n merchantId: string,\n params: AutoRechargeUpdateRequest,\n options?: RequestExtras,\n ): Promise<BillingProfileResponse> {\n return this.request('PATCH', `/billing/${encodeURIComponent(merchantId)}/auto-recharge`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Retrieve the merchant-facing Pricing page payload: effective merchant baseline\n * prices, project and shop exceptions side by side with the merchant baseline,\n * upcoming scheduled or pending-acceptance price changes, and recorded acceptances.\n *\n * @param merchantId - The merchant account ID.\n * @returns The merchant pricing view.\n */\n async getPricing(merchantId: string): Promise<MerchantPricingViewResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/pricing`);\n }\n\n /**\n * Record the merchant's acceptance of a pending price change.\n *\n * Must be called directly by an authorized merchant user (staff support-switch\n * and act-as sessions are refused with `403`).\n *\n * @param merchantId - The merchant account ID.\n * @param versionId - The pending pricing version ID to accept.\n * @returns The immutable acceptance record and whether the price took effect immediately.\n */\n async acceptPricingChange(\n merchantId: string,\n versionId: string,\n ): Promise<AcceptPricingChangeResponse> {\n return this.request(\n 'POST',\n `/billing/${encodeURIComponent(merchantId)}/pricing/versions/${encodeURIComponent(versionId)}/accept`,\n );\n }\n\n /**\n * Retrieve a monthly platform billing statement grouped by fee type so the groups\n * reconcile to the total platform fees of the period.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional UTC calendar month (`YYYY-MM`) and shop (`profile_id`) filter.\n * @returns The per-currency grouped monthly statement.\n */\n async getStatement(\n merchantId: string,\n params?: BillingStatementParams,\n ): Promise<BillingStatementResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/statement`, {\n query: params as Record<string, string | undefined>,\n });\n }\n}\n"],"mappings":";;;;;AA6BA,IAAM,qBAAN,MAAyB;AAAA,EACvB,YAA6B,SAAoB;AAApB;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASlD,MAAM,WACJ,YACA,QACqC;AACrC,WAAO,KAAK;AAAA,MACV;AAAA,MACA,YAAY,mBAAmB,UAAU,CAAC;AAAA,MAC1C,EAAE,MAAM,OAAO;AAAA,IACjB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,YACJ,YACA,QACqC;AACrC,WAAO,KAAK;AAAA,MACV;AAAA,MACA,YAAY,mBAAmB,UAAU,CAAC;AAAA,MAC1C;AAAA,QACE,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,KAAK,YAAqD;AAC9D,WAAO,KAAK,QAAQ,OAAO,YAAY,mBAAmB,UAAU,CAAC,cAAc;AAAA,EACrF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,IAAI,YAAoB,WAAgD;AAC5E,WAAO,KAAK;AAAA,MACV;AAAA,MACA,YAAY,mBAAmB,UAAU,CAAC,gBAAgB,mBAAmB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AAY,mBAAmB,UAAU,CAAC,cAAc;AAAA,MACjF,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -145,6 +145,21 @@ var Billing = class {
145
145
  query: params
146
146
  });
147
147
  }
148
+ /**
149
+ * List recorded platform event fees (disputes, refunds, declined attempts,
150
+ * 3-D Secure attempts, currency conversion markups, international card
151
+ * surcharges, and payouts) for a merchant.
152
+ *
153
+ * @param merchantId - The merchant account ID.
154
+ * @param params - Optional shop, event fee type, entity ID, charge status,
155
+ * test-mode, date window, and pagination filters.
156
+ * @returns Paginated platform event fee records.
157
+ */
158
+ async listEventFees(merchantId, params) {
159
+ return this.request("GET", `/billing/${encodeURIComponent(merchantId)}/event-fees`, {
160
+ query: params
161
+ });
162
+ }
148
163
  /**
149
164
  * List payment attempts that were blocked by the billing suspension gate
150
165
  * (account suspended, setup incomplete, or shop allocation suspended).
@@ -219,4 +234,4 @@ var Billing = class {
219
234
 
220
235
 
221
236
  exports.Billing = Billing;
222
- //# sourceMappingURL=chunk-DQHT4FGI.cjs.map
237
+ //# sourceMappingURL=chunk-F6QJB4XP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-F6QJB4XP.cjs","../src/resources/billing.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACyBA,IAAM,mBAAA,EAAN,MAAyB;AAAA,EACvB,WAAA,CAA6B,OAAA,EAAoB;AAApB,IAAA,IAAA,CAAA,QAAA,EAAA,OAAA;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASlD,MAAM,UAAA,CACJ,UAAA,EACA,MAAA,EACqC;AACrC,IAAA,OAAO,IAAA,CAAK,OAAA;AAAA,MACV,MAAA;AAAA,MACA,CAAA,SAAA,EAAY,kBAAA,CAAmB,UAAU,CAAC,CAAA,wBAAA,CAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,O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A;AAAA;AAAA;AAAA,EAAA;AAUE,IAAA;AAAgF,MAAA;AACxE,IAAA;AACP,EAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAYE,IAAA;AAAgF,MAAA;AACxC,IAAA;AACvC,EAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAwF,MAAA;AAC/E,IAAA;AACR,EAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAoF,MAAA;AAC3E,IAAA;AACR,EAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAiBE,IAAA;AAA0F,MAAA;AACjF,IAAA;AACR,EAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAcE,IAAA;AAAyF,MAAA;AACjF,MAAA;AACH,IAAA;AACJ,EAAA;AACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAWE,IAAA;AAA+E,EAAA;AACjF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAgBE,IAAA;AAAY,MAAA;AACV,MAAA;AAC4F,IAAA;AAC9F,EAAA;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAcE,IAAA;AAAmF,MAAA;AAC1E,IAAA;AACR,EAAA;AAEL;AD1EA;AACA;AACA;AACA","file":"/home/anes/delo-payment/delopay-typescript-sdk/dist/chunk-F6QJB4XP.cjs","sourcesContent":[null,"import type {\n BillingProfileResponse,\n BillingSetupRequest,\n BillingSetupResponse,\n BillingCompleteSetupRequest,\n TopupRequest,\n TopupResponse,\n LedgerResponse,\n LedgerListParams,\n BlockedAttemptListResponse,\n BlockedAttemptListParams,\n AutoRechargeUpdateRequest,\n AllocationTransferRequest,\n AllocationTransferResponse,\n AllocationListResponse,\n AllocationResponse,\n ServiceUsageListParams,\n ServiceUsageListResponse,\n MerchantPricingViewResponse,\n AcceptPricingChangeResponse,\n BillingStatementParams,\n BillingStatementResponse,\n EventFeeListParams,\n EventFeeListResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\nimport { csvQuery } from '../listQuery';\n\n/** Manage per-shop prepaid balance allocations transferred from the host merchant treasury. */\nclass BillingAllocations {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Transfer funds from the host merchant treasury into a shop's allocation.\n *\n * @param merchantId - The host merchant account ID.\n * @param params - Transfer details (amount, target profile/shop ID).\n * @returns The allocation transfer result.\n */\n async transferIn(\n merchantId: string,\n params: AllocationTransferRequest,\n ): Promise<AllocationTransferResponse> {\n return this.request(\n 'POST',\n `/billing/${encodeURIComponent(merchantId)}/allocations/transfer-in`,\n { body: params },\n );\n }\n\n /**\n * Transfer funds from a shop's allocation back to the host merchant treasury.\n *\n * @param merchantId - The host merchant account ID.\n * @param params - Transfer details (amount, source profile/shop ID).\n * @returns The allocation transfer result.\n */\n async transferOut(\n merchantId: string,\n params: AllocationTransferRequest,\n ): Promise<AllocationTransferResponse> {\n return this.request(\n 'POST',\n `/billing/${encodeURIComponent(merchantId)}/allocations/transfer-out`,\n {\n body: params,\n },\n );\n }\n\n /**\n * List all shop balance allocations for a merchant.\n *\n * @param merchantId - The merchant account ID.\n * @returns List of shop allocations.\n */\n async list(merchantId: string): Promise<AllocationListResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/allocations`);\n }\n\n /**\n * Get the balance allocation for a specific shop.\n *\n * @param merchantId - The merchant account ID.\n * @param profileId - The shop (business profile) ID.\n * @returns The shop's balance allocation.\n */\n async get(merchantId: string, profileId: string): Promise<AllocationResponse> {\n return this.request(\n 'GET',\n `/billing/${encodeURIComponent(merchantId)}/allocations/${encodeURIComponent(profileId)}`,\n );\n }\n}\n\n/**\n * Manage prepaid billing balances — top-ups, card setup, auto-recharge, and the balance ledger.\n *\n * Delopay deducts a platform fee from the merchant's prepaid balance on every successful payment.\n * Use these endpoints to fund and monitor that balance.\n */\nexport class Billing {\n /** Per-shop balance allocation management for host merchants. */\n readonly allocations: BillingAllocations;\n\n constructor(private readonly request: RequestFn) {\n this.allocations = new BillingAllocations(request);\n }\n\n /**\n * Retrieve a merchant's billing profile (balance, status, auto-recharge config).\n *\n * @param merchantId - The merchant account ID.\n * @returns The billing profile.\n *\n * @example\n * ```typescript\n * const profile = await delopay.billing.getProfile('merch_123');\n * console.log(profile.balance, profile.status);\n * ```\n */\n async getProfile(merchantId: string): Promise<BillingProfileResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}`);\n }\n\n /**\n * Start a Stripe SetupIntent flow to collect a payment card for auto-recharge.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional setup parameters.\n * @returns The Stripe client secret needed to render the card element.\n */\n async setup(merchantId: string, params?: BillingSetupRequest): Promise<BillingSetupResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/setup`, {\n body: params,\n });\n }\n\n /**\n * Confirm card setup after the Stripe SetupIntent completes on the frontend.\n *\n * @param merchantId - The merchant account ID.\n * @param params - The Stripe SetupIntent ID to confirm.\n * @returns The updated billing profile.\n */\n async completeSetup(\n merchantId: string,\n params: BillingCompleteSetupRequest,\n ): Promise<BillingProfileResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/setup/complete`, {\n body: params,\n });\n }\n\n /**\n * Manually top up a merchant's prepaid balance by charging their saved card.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Top-up amount and currency.\n * @returns The top-up result.\n */\n async topup(merchantId: string, params: TopupRequest): Promise<TopupResponse> {\n return this.request('POST', `/billing/${encodeURIComponent(merchantId)}/topup`, {\n body: params,\n });\n }\n\n /**\n * List the balance ledger (credits and debits) for a merchant, the newest\n * entry first unless `sort_by` says otherwise.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional pagination, filters (entry types, a creation\n * window) and sort.\n * @returns The ledger entries.\n */\n async listLedger(merchantId: string, params?: LedgerListParams): Promise<LedgerResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/ledger`, {\n query: csvQuery(params, ['entry_type']),\n });\n }\n\n /**\n * List recorded third-party service uses for a merchant with separate\n * provider cost, platform fee markup, and charged total in the merchant's\n * billing currency.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional shop, service type, provider, charge status,\n * test-mode, date window, and pagination filters.\n * @returns Paginated service usage records.\n */\n async listServiceUsages(\n merchantId: string,\n params?: ServiceUsageListParams,\n ): Promise<ServiceUsageListResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/service-usages`, {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * List recorded platform event fees (disputes, refunds, declined attempts,\n * 3-D Secure attempts, currency conversion markups, international card\n * surcharges, and payouts) for a merchant.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional shop, event fee type, entity ID, charge status,\n * test-mode, date window, and pagination filters.\n * @returns Paginated platform event fee records.\n */\n async listEventFees(\n merchantId: string,\n params?: EventFeeListParams,\n ): Promise<EventFeeListResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/event-fees`, {\n query: params as Record<string, string | number | boolean | undefined>,\n });\n }\n\n /**\n * List payment attempts that were blocked by the billing suspension gate\n * (account suspended, setup incomplete, or shop allocation suspended).\n *\n * These attempts never created a payment, so they do not appear in the\n * payments list — this is the only way to retrieve them.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional filters (profile, reason, date range) and pagination.\n * @returns The blocked-attempt entries with a total count.\n */\n async listBlockedAttempts(\n merchantId: string,\n params?: BlockedAttemptListParams,\n ): Promise<BlockedAttemptListResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/blocked-attempts`, {\n query: params as Record<string, string | number | undefined>,\n });\n }\n\n /**\n * Update auto-recharge configuration (threshold, top-up amount, enabled flag).\n *\n * @param merchantId - The merchant account ID.\n * @param params - Auto-recharge settings to update.\n * @returns The updated billing profile.\n */\n async updateAutoRecharge(\n merchantId: string,\n params: AutoRechargeUpdateRequest,\n options?: RequestExtras,\n ): Promise<BillingProfileResponse> {\n return this.request('PATCH', `/billing/${encodeURIComponent(merchantId)}/auto-recharge`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Retrieve the merchant-facing Pricing page payload: effective merchant baseline\n * prices, project and shop exceptions side by side with the merchant baseline,\n * upcoming scheduled or pending-acceptance price changes, and recorded acceptances.\n *\n * @param merchantId - The merchant account ID.\n * @returns The merchant pricing view.\n */\n async getPricing(merchantId: string): Promise<MerchantPricingViewResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/pricing`);\n }\n\n /**\n * Record the merchant's acceptance of a pending price change.\n *\n * Must be called directly by an authorized merchant user (staff support-switch\n * and act-as sessions are refused with `403`).\n *\n * @param merchantId - The merchant account ID.\n * @param versionId - The pending pricing version ID to accept.\n * @returns The immutable acceptance record and whether the price took effect immediately.\n */\n async acceptPricingChange(\n merchantId: string,\n versionId: string,\n ): Promise<AcceptPricingChangeResponse> {\n return this.request(\n 'POST',\n `/billing/${encodeURIComponent(merchantId)}/pricing/versions/${encodeURIComponent(versionId)}/accept`,\n );\n }\n\n /**\n * Retrieve a monthly platform billing statement grouped by fee type so the groups\n * reconcile to the total platform fees of the period.\n *\n * @param merchantId - The merchant account ID.\n * @param params - Optional UTC calendar month (`YYYY-MM`) and shop (`profile_id`) filter.\n * @returns The per-currency grouped monthly statement.\n */\n async getStatement(\n merchantId: string,\n params?: BillingStatementParams,\n ): Promise<BillingStatementResponse> {\n return this.request('GET', `/billing/${encodeURIComponent(merchantId)}/statement`, {\n query: params as Record<string, string | undefined>,\n });\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Delopay
3
- } from "./chunk-EUJCMSTJ.js";
3
+ } from "./chunk-QG6AD33A.js";
4
4
  import {
5
5
  DelopayError
6
6
  } from "./chunk-37BJUQ32.js";
@@ -1040,4 +1040,4 @@ var CheckoutSession = class {
1040
1040
  export {
1041
1041
  CheckoutSession
1042
1042
  };
1043
- //# sourceMappingURL=chunk-Y2EWCU4P.js.map
1043
+ //# sourceMappingURL=chunk-MOFPVWNN.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkGWWGO4EUcjs = require('./chunk-GWWGO4EU.cjs');
3
+ var _chunkXPSN5YYUcjs = require('./chunk-XPSN5YYU.cjs');
4
4
 
5
5
 
6
6
  var _chunkI2W7AO4Bcjs = require('./chunk-I2W7AO4B.cjs');
@@ -69,7 +69,7 @@ var CheckoutSession = class {
69
69
  this.paymentId = options.paymentId;
70
70
  this.publishableKey = options.publishableKey;
71
71
  this.clientSecret = options.clientSecret;
72
- this.client = new (0, _chunkGWWGO4EUcjs.Delopay)("", {
72
+ this.client = new (0, _chunkXPSN5YYUcjs.Delopay)("", {
73
73
  baseUrl: options.baseUrl,
74
74
  sandbox: options.sandbox,
75
75
  timeout: options.timeout,
@@ -1040,4 +1040,4 @@ var CheckoutSession = class {
1040
1040
 
1041
1041
 
1042
1042
  exports.CheckoutSession = CheckoutSession;
1043
- //# sourceMappingURL=chunk-PWJS7MLG.cjs.map
1043
+ //# sourceMappingURL=chunk-OFZJ4JAH.cjs.map