@delopay/sdk 0.193.0 → 0.198.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
@@ -3913,6 +3913,31 @@ var Users = class {
3913
3913
  async signIn(params) {
3914
3914
  return this.request("POST", "/user/signin", { body: params });
3915
3915
  }
3916
+ /** Providers currently configured for dashboard sign-in. */
3917
+ async listOAuthProviders() {
3918
+ return this.request("GET", "/user/oauth/providers");
3919
+ }
3920
+ /** Current account's links; disabled providers remain visible. */
3921
+ async listLinkedOAuthProviders() {
3922
+ return this.request("GET", "/user/oauth/linked");
3923
+ }
3924
+ async startOAuthSignIn(params) {
3925
+ return this.request("POST", "/user/oauth/start", { body: params });
3926
+ }
3927
+ async startOAuthLink(params) {
3928
+ return this.request("POST", "/user/oauth/link/start", { body: params });
3929
+ }
3930
+ async completeOAuthSignIn(params) {
3931
+ return this.request("POST", "/user/oauth/complete", { body: params });
3932
+ }
3933
+ async completeOAuthLink(params) {
3934
+ return this.request("POST", "/user/oauth/link/complete", { body: params });
3935
+ }
3936
+ async disconnectOAuthProvider(provider, params) {
3937
+ return this.request("DELETE", `/user/oauth/linked/${encodeURIComponent(provider)}`, {
3938
+ body: params
3939
+ });
3940
+ }
3916
3941
  async signOut() {
3917
3942
  return this.request("POST", "/user/signout");
3918
3943
  }
@@ -5991,7 +6016,13 @@ var Subscriptions = class {
5991
6016
  ...options
5992
6017
  });
5993
6018
  }
5994
- /** Update a subscription's plan/price. `PUT /subscriptions/{subscriptionId}/update` */
6019
+ /**
6020
+ * Update a subscription's plan/price. `PUT /subscriptions/{subscriptionId}/update`
6021
+ *
6022
+ * From the dashboard this counts against the caller's `subscription_change`
6023
+ * operation limit; an over-limit call fails with `DE_01` and nothing reaches
6024
+ * the processor. Calls made with an API key are not limited.
6025
+ */
5995
6026
  async update(subscriptionId, params, options) {
5996
6027
  return this.request("PUT", `/subscriptions/${encodeURIComponent(subscriptionId)}/update`, {
5997
6028
  body: params,
@@ -6047,6 +6078,10 @@ var Subscriptions = class {
6047
6078
  /**
6048
6079
  * Pause a subscription. `POST /subscriptions/{subscriptionId}/pause`
6049
6080
  *
6081
+ * From the dashboard this counts against the caller's `subscription_change`
6082
+ * operation limit; an over-limit call fails with `DE_01` and nothing reaches
6083
+ * the processor. Calls made with an API key are not limited.
6084
+ *
6050
6085
  * The body defaults to `{}` so the request still carries
6051
6086
  * `Content-Type: application/json` even when no params are passed — the
6052
6087
  * backend rejects the POST otherwise ("Unsupported content type").
@@ -6057,7 +6092,13 @@ var Subscriptions = class {
6057
6092
  ...options
6058
6093
  });
6059
6094
  }
6060
- /** Resume a paused subscription. `POST /subscriptions/{subscriptionId}/resume` */
6095
+ /**
6096
+ * Resume a paused subscription. `POST /subscriptions/{subscriptionId}/resume`
6097
+ *
6098
+ * From the dashboard this counts against the caller's `subscription_change`
6099
+ * operation limit; an over-limit call fails with `DE_01` and nothing reaches
6100
+ * the processor. Calls made with an API key are not limited.
6101
+ */
6061
6102
  async resume(subscriptionId, params, options) {
6062
6103
  return this.request("POST", `/subscriptions/${encodeURIComponent(subscriptionId)}/resume`, {
6063
6104
  body: params ?? {},
@@ -6069,6 +6110,10 @@ var Subscriptions = class {
6069
6110
  *
6070
6111
  * A subscription in a state it cannot be cancelled from is refused with
6071
6112
  * `DE_11`; `error.data.reason` then names why (`SubscriptionActionRefusal`).
6113
+ *
6114
+ * From the dashboard this counts against the caller's `subscription_change`
6115
+ * operation limit; an over-limit call fails with `DE_01` and nothing reaches
6116
+ * the processor. Calls made with an API key are not limited.
6072
6117
  */
6073
6118
  async cancel(subscriptionId, params, options) {
6074
6119
  return this.request("POST", `/subscriptions/${encodeURIComponent(subscriptionId)}/cancel`, {
@@ -6573,10 +6618,13 @@ var Settlement = class {
6573
6618
  * Add a manual adjustment to a statement. Positive `amount_usd` charges
6574
6619
  * the shop (reducing their payout); negative credits them.
6575
6620
  *
6576
- * Subject to the caller's `settlement_adjustment` operation limit (amount
6577
- * dimensions only): an over-limit call fails with `DE_01` and no adjustment
6578
- * is added. A settlement rule can only block — approval is refund-only, for
6579
- * the reason given on `updateStatementPayout()`.
6621
+ * Subject to the caller's `settlement_adjustment` operation limit: an
6622
+ * over-limit call fails with `DE_01` and no adjustment is added. Both
6623
+ * windows count every add, and a credit counts at its magnitude. A
6624
+ * settlement rule can only block — approval is refund-only, for the reason
6625
+ * given on `updateStatementPayout()`. When another add by the same user
6626
+ * changes the window while this one is being admitted, the call fails with
6627
+ * HTTP 412 and nothing is written; retrying the same request is safe.
6580
6628
  *
6581
6629
  * `POST /settlement/statements/{statementId}/adjustments`
6582
6630
  */
@@ -6590,6 +6638,10 @@ var Settlement = class {
6590
6638
  /**
6591
6639
  * Remove a manual adjustment from a statement.
6592
6640
  *
6641
+ * The adjustment still counts against the caller's `settlement_adjustment`
6642
+ * limit window it was added in: removing it does not give back its count or
6643
+ * amount.
6644
+ *
6593
6645
  * `DELETE /settlement/statements/{statementId}/adjustments/{adjustmentId}`
6594
6646
  */
6595
6647
  async deleteStatementAdjustment(statementId, adjustmentId, options) {
@@ -11998,6 +12050,18 @@ var AdminPortal = class {
11998
12050
  async getPromoConfig() {
11999
12051
  return this.request("GET", "/admin-portal/promo-config");
12000
12052
  }
12053
+ /** OAuth credentials are encrypted server-side and never returned. */
12054
+ async getDashboardOAuthSettings() {
12055
+ return this.request("GET", "/admin-portal/dashboard-oauth");
12056
+ }
12057
+ async updateDashboardOAuthUrls(params) {
12058
+ return this.request("PUT", "/admin-portal/dashboard-oauth/urls", { body: params });
12059
+ }
12060
+ async updateDashboardOAuthProvider(provider, params) {
12061
+ return this.request("PUT", `/admin-portal/dashboard-oauth/${encodeURIComponent(provider)}`, {
12062
+ body: params
12063
+ });
12064
+ }
12001
12065
  /**
12002
12066
  * Update the global welcome promotional-credit config. Any subset of
12003
12067
  * `amount` (minor units) / `message` may be supplied; omitted fields are