@delopay/sdk 0.37.0 → 0.39.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.cjs CHANGED
@@ -32,6 +32,7 @@ __export(internal_exports, {
32
32
  CardIssuers: () => CardIssuers,
33
33
  Cards: () => Cards,
34
34
  Configs: () => Configs,
35
+ ConnectorRestrictionRules: () => ConnectorRestrictionRules,
35
36
  ConnectorRestrictions: () => ConnectorRestrictions,
36
37
  DEFAULT_BADGES: () => DEFAULT_BADGES,
37
38
  DEFAULT_BADGES_DARK: () => DEFAULT_BADGES_DARK,
@@ -4036,6 +4037,41 @@ var Configs = class {
4036
4037
  }
4037
4038
  };
4038
4039
 
4040
+ // src/internal/resources/connectorRestrictionRules.ts
4041
+ var BASE = "/admin/connector-restriction-rules";
4042
+ var ConnectorRestrictionRules = class {
4043
+ constructor(request) {
4044
+ this.request = request;
4045
+ }
4046
+ /**
4047
+ * Create one allow/deny rule. A duplicate
4048
+ * `(merchant_id, scope, scope_id, connector)` is rejected — update or delete
4049
+ * the existing rule instead.
4050
+ */
4051
+ async create(body) {
4052
+ return this.request("POST", BASE, { body });
4053
+ }
4054
+ /**
4055
+ * List rules for one scope (`scope` + `scope_id`) or a whole merchant
4056
+ * (`merchant_id`). Pass exactly one selector.
4057
+ */
4058
+ async list(query) {
4059
+ return this.request("GET", BASE, { query: { ...query } });
4060
+ }
4061
+ /** Retrieve a single rule by ID. */
4062
+ async retrieve(id) {
4063
+ return this.request("GET", `${BASE}/${encodeURIComponent(id)}`);
4064
+ }
4065
+ /** Update a rule's action and/or reason. */
4066
+ async update(id, body) {
4067
+ return this.request("PATCH", `${BASE}/${encodeURIComponent(id)}`, { body });
4068
+ }
4069
+ /** Delete a rule by ID. */
4070
+ async delete(id) {
4071
+ return this.request("DELETE", `${BASE}/${encodeURIComponent(id)}`);
4072
+ }
4073
+ };
4074
+
4039
4075
  // src/internal/resources/connectorRestrictions.ts
4040
4076
  var ConnectorRestrictions = class {
4041
4077
  constructor(request) {
@@ -4228,6 +4264,7 @@ var DelopayInternal = class extends Delopay {
4228
4264
  this.cardIssuers = new CardIssuers(request);
4229
4265
  this.configs = new Configs(request);
4230
4266
  this.connectorRestrictions = new ConnectorRestrictions(request);
4267
+ this.connectorRestrictionRules = new ConnectorRestrictionRules(request);
4231
4268
  this.gsm = new Gsm(request);
4232
4269
  this.platformBilling = new PlatformBilling(request);
4233
4270
  this.platformFees = new PlatformFees(request);
@@ -4247,6 +4284,7 @@ var DelopayInternal = class extends Delopay {
4247
4284
  CardIssuers,
4248
4285
  Cards,
4249
4286
  Configs,
4287
+ ConnectorRestrictionRules,
4250
4288
  ConnectorRestrictions,
4251
4289
  DEFAULT_BADGES,
4252
4290
  DEFAULT_BADGES_DARK,