@delopay/sdk 0.164.0 → 0.166.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/internal.js CHANGED
@@ -42,6 +42,7 @@ import {
42
42
  DEFAULT_BADGES_DARK,
43
43
  DEFAULT_BRANDING,
44
44
  DEFAULT_BRANDING_DARK,
45
+ DEFAULT_NOTICES,
45
46
  Delopay,
46
47
  DelopayAuthenticationError,
47
48
  DelopayError,
@@ -63,6 +64,12 @@ import {
63
64
  NATIVE_PANE_CATEGORY_KEYS,
64
65
  NATIVE_PANE_ICON_KEYS,
65
66
  NOMUPAY_FORM_STYLES,
67
+ NOTICES_PER_SECTION,
68
+ NOTICE_ICONS,
69
+ NOTICE_ICON_FALLBACK,
70
+ NOTICE_ICON_PATHS,
71
+ NOTICE_LABEL_MAX_LENGTH,
72
+ NOTICE_SECTIONS,
66
73
  OperationLimits,
67
74
  PANES_MAX,
68
75
  PANE_CATEGORY_KEYS,
@@ -120,6 +127,7 @@ import {
120
127
  cloneBranding,
121
128
  cloneCustomField,
122
129
  cloneNativePane,
130
+ cloneNotice,
123
131
  clonePane,
124
132
  compareSections,
125
133
  contrastRatio,
@@ -135,11 +143,13 @@ import {
135
143
  decodeMethodSectionLabels,
136
144
  decodeMethodSectionOrder,
137
145
  decodeNativePanes,
146
+ decodeNotices,
138
147
  decodePanes,
139
148
  defaultBranding,
140
149
  defaultCustomFieldVisibility,
141
150
  defaultMethodSectionOrder,
142
151
  defaultNativePane,
152
+ defaultNotices,
143
153
  defaultOperatorForSource,
144
154
  defaultPane,
145
155
  emptyPaneCatalog,
@@ -149,6 +159,7 @@ import {
149
159
  encodeMethodSectionLabels,
150
160
  encodeMethodSectionOrder,
151
161
  encodeNativePanes,
162
+ encodeNotices,
152
163
  encodePanes,
153
164
  evaluateCustomFieldCondition,
154
165
  evaluateCustomFieldVisibility,
@@ -159,13 +170,17 @@ import {
159
170
  inputPadValue,
160
171
  isCheckboxChecked,
161
172
  isDarkSurface,
173
+ isDefaultBadgeSet,
162
174
  isHexColor,
175
+ isNoticeIcon,
163
176
  isSubscriptionDisputeWebhook,
164
177
  isSubscriptionLifecycleWebhook,
165
178
  knownSectionLabelKey,
166
179
  leaf,
167
180
  logoDimensions,
168
181
  nativePaneMethodInfo,
182
+ noticeText,
183
+ noticesIn,
169
184
  offerablePaneMethods,
170
185
  paneCatalogFor,
171
186
  paneDisplayDefaults,
@@ -174,6 +189,7 @@ import {
174
189
  paneViewVisibility,
175
190
  parseCustomFieldsLoose,
176
191
  parseImportedBranding,
192
+ parseNoticesLoose,
177
193
  programToTree,
178
194
  radiusValue,
179
195
  readableInkOn,
@@ -181,12 +197,15 @@ import {
181
197
  resolveAirwallexLabelStyle,
182
198
  resolveApplePayButtonStyle,
183
199
  resolveGooglePayButtonColor,
200
+ resolveNoticesAndBadges,
184
201
  resolveStripeTheme,
185
202
  ruleMatchToTree,
203
+ runExport,
186
204
  sanitizeCustomCss,
187
205
  sectionLabel,
188
206
  sectionOrderOf,
189
207
  shadowFor,
208
+ shownNotices,
190
209
  stripeSpacingValues,
191
210
  surchargeFigurePlan,
192
211
  surchargeShowsLabel,
@@ -197,7 +216,7 @@ import {
197
216
  validatePanes,
198
217
  verticalGapValue,
199
218
  visibleCustomFields
200
- } from "./chunk-GCJDY4KX.js";
219
+ } from "./chunk-W57MOHOE.js";
201
220
 
202
221
  // src/internal/resources/admin.ts
203
222
  var Admin = class {
@@ -258,6 +277,15 @@ var AdminPortal = class {
258
277
  query
259
278
  });
260
279
  }
280
+ async exportTransactions(params, options) {
281
+ return runExport(
282
+ this.request,
283
+ "GET",
284
+ "/admin-portal/transactions/export",
285
+ { query: transactionListQuery(params) },
286
+ options
287
+ );
288
+ }
261
289
  /**
262
290
  * Full detail for a single transaction of ANY merchant — the same
263
291
  * `PaymentResponse` the merchant `payments.retrieve` returns. Admin-scoped:
@@ -856,11 +884,13 @@ var AdminPortal = class {
856
884
  }
857
885
  /**
858
886
  * Export a settlement statement as PDF. Returns the raw bytes as a `Blob`
859
- * with the same auth and error handling as every other call.
887
+ * with the same auth and error handling as every other call. `options`
888
+ * takes a signal, a timeout and an `onDownloadProgress` listener for the
889
+ * download's bytes (the PDF carries a `Content-Length`, so `total` is set).
860
890
  *
861
891
  * `GET /admin-portal/accounts/{merchantId}/settlement/statements/{statementId}/pdf`
862
892
  */
863
- async downloadSettlementStatementPdf(merchantId, statementId, params) {
893
+ async downloadSettlementStatementPdf(merchantId, statementId, params, options) {
864
894
  return this.request(
865
895
  "GET",
866
896
  `/admin-portal/accounts/${encodeURIComponent(merchantId)}/settlement/statements/${encodeURIComponent(statementId)}/pdf`,
@@ -869,7 +899,8 @@ var AdminPortal = class {
869
899
  currency: params?.currency,
870
900
  include_transactions: params?.include_transactions
871
901
  },
872
- responseType: "blob"
902
+ responseType: "blob",
903
+ ...options
873
904
  }
874
905
  );
875
906
  }
@@ -974,17 +1005,16 @@ var AuditLogs = class {
974
1005
  return this.request("GET", `/admin-portal/audit/${encodeURIComponent(logId)}`);
975
1006
  }
976
1007
  async export(params, options) {
977
- const format = options?.format ?? "json";
978
- const accept = format === "csv" ? "text/csv" : format === "pdf" ? "application/pdf" : "application/json";
979
- const request = {
980
- query: params,
1008
+ return runExport(
1009
+ this.request,
1010
+ "GET",
1011
+ "/admin-portal/audit/export",
981
1012
  // The format is negotiated by `Accept`, never a query field: the query
982
1013
  // here is the list's own filter model, and adding a key to it would fork
983
1014
  // the filter vocabulary the export exists to reuse.
984
- headers: { Accept: accept }
985
- };
986
- if (format !== "json") request.responseType = "blob";
987
- return this.request("GET", "/admin-portal/audit/export", request);
1015
+ { query: params },
1016
+ options
1017
+ );
988
1018
  }
989
1019
  };
990
1020
 
@@ -1654,6 +1684,7 @@ export {
1654
1684
  DEFAULT_BADGES_DARK,
1655
1685
  DEFAULT_BRANDING,
1656
1686
  DEFAULT_BRANDING_DARK,
1687
+ DEFAULT_NOTICES,
1657
1688
  Delopay,
1658
1689
  DelopayAuthenticationError,
1659
1690
  DelopayError,
@@ -1678,6 +1709,12 @@ export {
1678
1709
  NATIVE_PANE_CATEGORY_KEYS,
1679
1710
  NATIVE_PANE_ICON_KEYS,
1680
1711
  NOMUPAY_FORM_STYLES,
1712
+ NOTICES_PER_SECTION,
1713
+ NOTICE_ICONS,
1714
+ NOTICE_ICON_FALLBACK,
1715
+ NOTICE_ICON_PATHS,
1716
+ NOTICE_LABEL_MAX_LENGTH,
1717
+ NOTICE_SECTIONS,
1681
1718
  OperationLimits,
1682
1719
  PANES_MAX,
1683
1720
  PANE_CATEGORY_KEYS,
@@ -1737,6 +1774,7 @@ export {
1737
1774
  cloneBranding,
1738
1775
  cloneCustomField,
1739
1776
  cloneNativePane,
1777
+ cloneNotice,
1740
1778
  clonePane,
1741
1779
  compareSections,
1742
1780
  contrastRatio,
@@ -1752,11 +1790,13 @@ export {
1752
1790
  decodeMethodSectionLabels,
1753
1791
  decodeMethodSectionOrder,
1754
1792
  decodeNativePanes,
1793
+ decodeNotices,
1755
1794
  decodePanes,
1756
1795
  defaultBranding,
1757
1796
  defaultCustomFieldVisibility,
1758
1797
  defaultMethodSectionOrder,
1759
1798
  defaultNativePane,
1799
+ defaultNotices,
1760
1800
  defaultOperatorForSource,
1761
1801
  defaultPane,
1762
1802
  emptyPaneCatalog,
@@ -1766,6 +1806,7 @@ export {
1766
1806
  encodeMethodSectionLabels,
1767
1807
  encodeMethodSectionOrder,
1768
1808
  encodeNativePanes,
1809
+ encodeNotices,
1769
1810
  encodePanes,
1770
1811
  evaluateCustomFieldCondition,
1771
1812
  evaluateCustomFieldVisibility,
@@ -1776,13 +1817,17 @@ export {
1776
1817
  inputPadValue,
1777
1818
  isCheckboxChecked,
1778
1819
  isDarkSurface,
1820
+ isDefaultBadgeSet,
1779
1821
  isHexColor,
1822
+ isNoticeIcon,
1780
1823
  isSubscriptionDisputeWebhook,
1781
1824
  isSubscriptionLifecycleWebhook,
1782
1825
  knownSectionLabelKey,
1783
1826
  leaf,
1784
1827
  logoDimensions,
1785
1828
  nativePaneMethodInfo,
1829
+ noticeText,
1830
+ noticesIn,
1786
1831
  offerablePaneMethods,
1787
1832
  paneCatalogFor,
1788
1833
  paneDisplayDefaults,
@@ -1791,6 +1836,7 @@ export {
1791
1836
  paneViewVisibility,
1792
1837
  parseCustomFieldsLoose,
1793
1838
  parseImportedBranding,
1839
+ parseNoticesLoose,
1794
1840
  programToTree,
1795
1841
  radiusValue,
1796
1842
  readableInkOn,
@@ -1798,12 +1844,14 @@ export {
1798
1844
  resolveAirwallexLabelStyle,
1799
1845
  resolveApplePayButtonStyle,
1800
1846
  resolveGooglePayButtonColor,
1847
+ resolveNoticesAndBadges,
1801
1848
  resolveStripeTheme,
1802
1849
  ruleMatchToTree,
1803
1850
  sanitizeCustomCss,
1804
1851
  sectionLabel,
1805
1852
  sectionOrderOf,
1806
1853
  shadowFor,
1854
+ shownNotices,
1807
1855
  stripeSpacingValues,
1808
1856
  surchargeFigurePlan,
1809
1857
  surchargeShowsLabel,