@delopay/sdk 0.280.0 → 0.289.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
@@ -21,6 +21,7 @@ import {
21
21
  BRANDING_EXPORT_FORMAT,
22
22
  BRANDING_EXPORT_VERSION,
23
23
  BUILTIN_PAYMENT_ICON_KEYS,
24
+ Branding,
24
25
  BuyerBlocklist,
25
26
  BuyerConversations,
26
27
  BuyerEvidenceReviews,
@@ -42,6 +43,7 @@ import {
42
43
  CheckoutMethods,
43
44
  CheckoutRecovery,
44
45
  CheckoutSession,
46
+ CheckoutTemplates,
45
47
  CostRules,
46
48
  DEFAULT_BADGES,
47
49
  DEFAULT_BADGES_DARK,
@@ -59,6 +61,7 @@ import {
59
61
  Forex,
60
62
  GOOGLE_PAY_BUTTON_COLORS,
61
63
  GOOGLE_PAY_BUTTON_TYPES,
64
+ IdentityVerifications,
62
65
  InvoiceSettingsResource,
63
66
  Invoices,
64
67
  LOCALIZABLE_COPY_FIELDS,
@@ -142,6 +145,7 @@ import {
142
145
  anyOf,
143
146
  applyBrandingVariables,
144
147
  asAirwallexCardPreset,
148
+ brandingAssetPath,
145
149
  buildBrandingExport,
146
150
  builtinPaymentIconDataUri,
147
151
  builtinPaymentIconSvg,
@@ -150,6 +154,7 @@ import {
150
154
  cardFieldFontPx,
151
155
  cardFieldWeightValue,
152
156
  checkoutCopy,
157
+ checkoutEntryUrl,
153
158
  checkoutLocaleDir,
154
159
  cloneBranding,
155
160
  cloneCustomField,
@@ -196,6 +201,7 @@ import {
196
201
  fontWeightValue,
197
202
  inputPadValue,
198
203
  isCheckboxChecked,
204
+ isCheckoutOpenEntryMessage,
199
205
  isConfirmedChild,
200
206
  isDarkSurface,
201
207
  isDefaultBadgeSet,
@@ -256,7 +262,7 @@ import {
256
262
  visibleCustomFields,
257
263
  whopAccentSwatch,
258
264
  whopCardElement
259
- } from "./chunk-3CHJT5YW.js";
265
+ } from "./chunk-ZZEGL45P.js";
260
266
 
261
267
  // src/internal/resources/admin.ts
262
268
  var Admin = class {
@@ -298,6 +304,33 @@ var Admin = class {
298
304
  }
299
305
  };
300
306
 
307
+ // src/internal/resources/adminBranding.ts
308
+ var AdminBranding = class {
309
+ constructor(request) {
310
+ this.request = request;
311
+ }
312
+ /**
313
+ * What is saved, the value in force for each unset field, and the revision
314
+ * to send back on the next update.
315
+ *
316
+ * `GET /admin-portal/branding`
317
+ */
318
+ async retrieve(options) {
319
+ return this.request("GET", "/admin-portal/branding", { ...options });
320
+ }
321
+ /**
322
+ * Replace the whole branding; all fields `null` clears it. A changed image
323
+ * or font address is fetched first and refused unless it answers with the
324
+ * right kind of file. A stale `expected_revision` is refused and changes
325
+ * nothing.
326
+ *
327
+ * `PUT /admin-portal/branding`
328
+ */
329
+ async update(params, options) {
330
+ return this.request("PUT", "/admin-portal/branding", { body: params, ...options });
331
+ }
332
+ };
333
+
301
334
  // src/internal/resources/adminLive.ts
302
335
  var AdminLive = class {
303
336
  constructor(request, openStream) {
@@ -912,6 +945,32 @@ var AdminPortal = class {
912
945
  { body }
913
946
  );
914
947
  }
948
+ /**
949
+ * A member of `merchantId`'s permission overrides.
950
+ * `GET /admin-portal/accounts/{merchant_id}/members/{user_id}/permission-overrides`
951
+ *
952
+ * Any internal role may read them; `can_edit` is `false` for one without
953
+ * `UsersManage`. A user holding no role in the merchant is a 404 `UR_68`.
954
+ */
955
+ async getMemberPermissionOverrides(merchantId, userId) {
956
+ return this.request(
957
+ "GET",
958
+ `/admin-portal/accounts/${encodeURIComponent(merchantId)}/members/${encodeURIComponent(userId)}/permission-overrides`
959
+ );
960
+ }
961
+ /**
962
+ * Replace a member of `merchantId`'s permission overrides. Needs
963
+ * `UsersManage`; an operator is not limited by their own access. Recorded
964
+ * in the merchant's audit log and applied to the member's next request.
965
+ * `PUT /admin-portal/accounts/{merchant_id}/members/{user_id}/permission-overrides`
966
+ */
967
+ async updateMemberPermissionOverrides(merchantId, userId, body) {
968
+ return this.request(
969
+ "PUT",
970
+ `/admin-portal/accounts/${encodeURIComponent(merchantId)}/members/${encodeURIComponent(userId)}/permission-overrides`,
971
+ { body }
972
+ );
973
+ }
915
974
  /**
916
975
  * Soft-delete a user globally: deactivates the row, blacklists existing
917
976
  * JWTs, and wipes credentials. Distinct from `deleteUserRole`, which
@@ -986,6 +1045,19 @@ var AdminPortal = class {
986
1045
  `/admin-portal/transactions/${encodeURIComponent(paymentId)}/recover`
987
1046
  );
988
1047
  }
1048
+ /**
1049
+ * Mark a transaction of ANY merchant as an integration test, or remove the
1050
+ * mark. Recorded in the payment's status history as an operator's change.
1051
+ *
1052
+ * `POST /admin-portal/transactions/{paymentId}/integration-test`
1053
+ */
1054
+ async setTransactionIntegrationTest(paymentId, params) {
1055
+ return this.request(
1056
+ "POST",
1057
+ `/admin-portal/transactions/${encodeURIComponent(paymentId)}/integration-test`,
1058
+ { body: params }
1059
+ );
1060
+ }
989
1061
  /**
990
1062
  * Client/device observations captured while the buyer interacted with a
991
1063
  * transaction of ANY merchant, oldest first.
@@ -2025,6 +2097,7 @@ var DelopayInternal = class extends Delopay {
2025
2097
  this.adminPortal = new AdminPortal(request);
2026
2098
  const openStream = this.openEventStream.bind(this);
2027
2099
  this.adminLive = new AdminLive(request, openStream);
2100
+ this.adminBranding = new AdminBranding(request);
2028
2101
  this.auditLogs = new AuditLogs(request);
2029
2102
  this.cache = new Cache(request);
2030
2103
  this.cardIssuers = new CardIssuers(request);
@@ -2057,6 +2130,7 @@ export {
2057
2130
  APPLE_PAY_BUTTON_STYLES,
2058
2131
  APPLE_PAY_BUTTON_TYPES,
2059
2132
  Admin,
2133
+ AdminBranding,
2060
2134
  AdminLive,
2061
2135
  AdminPortal,
2062
2136
  Analytics,
@@ -2067,6 +2141,7 @@ export {
2067
2141
  BRANDING_EXPORT_FORMAT,
2068
2142
  BRANDING_EXPORT_VERSION,
2069
2143
  BUILTIN_PAYMENT_ICON_KEYS,
2144
+ Branding,
2070
2145
  BuyerBlocklist,
2071
2146
  BuyerConversations,
2072
2147
  BuyerEvidenceReviews,
@@ -2090,6 +2165,7 @@ export {
2090
2165
  CheckoutMethods,
2091
2166
  CheckoutRecovery,
2092
2167
  CheckoutSession,
2168
+ CheckoutTemplates,
2093
2169
  Configs,
2094
2170
  ConnectorRestrictionRules,
2095
2171
  ConnectorRestrictions,
@@ -2113,6 +2189,7 @@ export {
2113
2189
  GOOGLE_PAY_BUTTON_COLORS,
2114
2190
  GOOGLE_PAY_BUTTON_TYPES,
2115
2191
  Gsm,
2192
+ IdentityVerifications,
2116
2193
  InvoiceSettingsResource,
2117
2194
  Invoices,
2118
2195
  LOCALIZABLE_COPY_FIELDS,
@@ -2201,6 +2278,7 @@ export {
2201
2278
  anyOf,
2202
2279
  applyBrandingVariables,
2203
2280
  asAirwallexCardPreset,
2281
+ brandingAssetPath,
2204
2282
  buildBrandingExport,
2205
2283
  builtinPaymentIconDataUri,
2206
2284
  builtinPaymentIconSvg,
@@ -2209,6 +2287,7 @@ export {
2209
2287
  cardFieldFontPx,
2210
2288
  cardFieldWeightValue,
2211
2289
  checkoutCopy,
2290
+ checkoutEntryUrl,
2212
2291
  checkoutLocaleDir,
2213
2292
  cloneBranding,
2214
2293
  cloneCustomField,
@@ -2255,6 +2334,7 @@ export {
2255
2334
  fontWeightValue,
2256
2335
  inputPadValue,
2257
2336
  isCheckboxChecked,
2337
+ isCheckoutOpenEntryMessage,
2258
2338
  isConfirmedChild,
2259
2339
  isDarkSurface,
2260
2340
  isDefaultBadgeSet,