@sendly/node 3.19.1 → 3.21.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/index.d.mts CHANGED
@@ -3492,6 +3492,7 @@ declare class WebhooksSubResource {
3492
3492
  get(): Promise<EnterpriseWebhook>;
3493
3493
  delete(): Promise<void>;
3494
3494
  test(): Promise<EnterpriseWebhookTestResult>;
3495
+ rotateSecret(): Promise<EnterpriseWebhook>;
3495
3496
  }
3496
3497
  declare class AnalyticsSubResource {
3497
3498
  private readonly http;
@@ -3512,6 +3513,19 @@ declare class SettingsSubResource {
3512
3513
  getAutoTopUp(): Promise<AutoTopUpSettings>;
3513
3514
  updateAutoTopUp(options: UpdateAutoTopUpOptions): Promise<AutoTopUpSettings>;
3514
3515
  }
3516
+ declare class CreditsSubResource {
3517
+ private readonly http;
3518
+ constructor(http: HttpClient);
3519
+ get(): Promise<{
3520
+ balance: number;
3521
+ lifetimeCredits: number;
3522
+ reservedBalance: number;
3523
+ }>;
3524
+ deposit(amount: number, description?: string): Promise<{
3525
+ balance: number;
3526
+ lifetimeCredits: number;
3527
+ }>;
3528
+ }
3515
3529
  declare class BillingSubResource {
3516
3530
  private readonly http;
3517
3531
  constructor(http: HttpClient);
@@ -3524,6 +3538,7 @@ declare class EnterpriseResource {
3524
3538
  readonly analytics: AnalyticsSubResource;
3525
3539
  readonly settings: SettingsSubResource;
3526
3540
  readonly billing: BillingSubResource;
3541
+ readonly credits: CreditsSubResource;
3527
3542
  constructor(http: HttpClient);
3528
3543
  getAccount(): Promise<EnterpriseAccount>;
3529
3544
  provision(options: ProvisionWorkspaceOptions): Promise<ProvisionWorkspaceResult>;
package/dist/index.d.ts CHANGED
@@ -3492,6 +3492,7 @@ declare class WebhooksSubResource {
3492
3492
  get(): Promise<EnterpriseWebhook>;
3493
3493
  delete(): Promise<void>;
3494
3494
  test(): Promise<EnterpriseWebhookTestResult>;
3495
+ rotateSecret(): Promise<EnterpriseWebhook>;
3495
3496
  }
3496
3497
  declare class AnalyticsSubResource {
3497
3498
  private readonly http;
@@ -3512,6 +3513,19 @@ declare class SettingsSubResource {
3512
3513
  getAutoTopUp(): Promise<AutoTopUpSettings>;
3513
3514
  updateAutoTopUp(options: UpdateAutoTopUpOptions): Promise<AutoTopUpSettings>;
3514
3515
  }
3516
+ declare class CreditsSubResource {
3517
+ private readonly http;
3518
+ constructor(http: HttpClient);
3519
+ get(): Promise<{
3520
+ balance: number;
3521
+ lifetimeCredits: number;
3522
+ reservedBalance: number;
3523
+ }>;
3524
+ deposit(amount: number, description?: string): Promise<{
3525
+ balance: number;
3526
+ lifetimeCredits: number;
3527
+ }>;
3528
+ }
3515
3529
  declare class BillingSubResource {
3516
3530
  private readonly http;
3517
3531
  constructor(http: HttpClient);
@@ -3524,6 +3538,7 @@ declare class EnterpriseResource {
3524
3538
  readonly analytics: AnalyticsSubResource;
3525
3539
  readonly settings: SettingsSubResource;
3526
3540
  readonly billing: BillingSubResource;
3541
+ readonly credits: CreditsSubResource;
3527
3542
  constructor(http: HttpClient);
3528
3543
  getAccount(): Promise<EnterpriseAccount>;
3529
3544
  provision(options: ProvisionWorkspaceOptions): Promise<ProvisionWorkspaceResult>;
package/dist/index.js CHANGED
@@ -3168,6 +3168,13 @@ var WebhooksSubResource = class {
3168
3168
  });
3169
3169
  return transformKeys(response);
3170
3170
  }
3171
+ async rotateSecret() {
3172
+ const response = await this.http.request({
3173
+ method: "POST",
3174
+ path: "/enterprise/webhooks/rotate-secret"
3175
+ });
3176
+ return transformKeys(response);
3177
+ }
3171
3178
  };
3172
3179
  var AnalyticsSubResource = class {
3173
3180
  http;
@@ -3236,6 +3243,31 @@ var SettingsSubResource = class {
3236
3243
  return transformKeys(response);
3237
3244
  }
3238
3245
  };
3246
+ var CreditsSubResource = class {
3247
+ http;
3248
+ constructor(http) {
3249
+ this.http = http;
3250
+ }
3251
+ async get() {
3252
+ const response = await this.http.request({
3253
+ method: "GET",
3254
+ path: "/enterprise/credits"
3255
+ });
3256
+ return transformKeys(response);
3257
+ }
3258
+ async deposit(amount, description) {
3259
+ const body = { amount };
3260
+ if (description !== void 0) {
3261
+ body.description = description;
3262
+ }
3263
+ const response = await this.http.request({
3264
+ method: "POST",
3265
+ path: "/enterprise/credits/deposit",
3266
+ body
3267
+ });
3268
+ return transformKeys(response);
3269
+ }
3270
+ };
3239
3271
  var BillingSubResource = class {
3240
3272
  http;
3241
3273
  constructor(http) {
@@ -3261,6 +3293,7 @@ var EnterpriseResource = class {
3261
3293
  analytics;
3262
3294
  settings;
3263
3295
  billing;
3296
+ credits;
3264
3297
  constructor(http) {
3265
3298
  this.http = http;
3266
3299
  this.workspaces = new WorkspacesSubResource(http);
@@ -3268,6 +3301,7 @@ var EnterpriseResource = class {
3268
3301
  this.analytics = new AnalyticsSubResource(http);
3269
3302
  this.settings = new SettingsSubResource(http);
3270
3303
  this.billing = new BillingSubResource(http);
3304
+ this.credits = new CreditsSubResource(http);
3271
3305
  }
3272
3306
  async getAccount() {
3273
3307
  const response = await this.http.request({
package/dist/index.mjs CHANGED
@@ -3108,6 +3108,13 @@ var WebhooksSubResource = class {
3108
3108
  });
3109
3109
  return transformKeys(response);
3110
3110
  }
3111
+ async rotateSecret() {
3112
+ const response = await this.http.request({
3113
+ method: "POST",
3114
+ path: "/enterprise/webhooks/rotate-secret"
3115
+ });
3116
+ return transformKeys(response);
3117
+ }
3111
3118
  };
3112
3119
  var AnalyticsSubResource = class {
3113
3120
  http;
@@ -3176,6 +3183,31 @@ var SettingsSubResource = class {
3176
3183
  return transformKeys(response);
3177
3184
  }
3178
3185
  };
3186
+ var CreditsSubResource = class {
3187
+ http;
3188
+ constructor(http) {
3189
+ this.http = http;
3190
+ }
3191
+ async get() {
3192
+ const response = await this.http.request({
3193
+ method: "GET",
3194
+ path: "/enterprise/credits"
3195
+ });
3196
+ return transformKeys(response);
3197
+ }
3198
+ async deposit(amount, description) {
3199
+ const body = { amount };
3200
+ if (description !== void 0) {
3201
+ body.description = description;
3202
+ }
3203
+ const response = await this.http.request({
3204
+ method: "POST",
3205
+ path: "/enterprise/credits/deposit",
3206
+ body
3207
+ });
3208
+ return transformKeys(response);
3209
+ }
3210
+ };
3179
3211
  var BillingSubResource = class {
3180
3212
  http;
3181
3213
  constructor(http) {
@@ -3201,6 +3233,7 @@ var EnterpriseResource = class {
3201
3233
  analytics;
3202
3234
  settings;
3203
3235
  billing;
3236
+ credits;
3204
3237
  constructor(http) {
3205
3238
  this.http = http;
3206
3239
  this.workspaces = new WorkspacesSubResource(http);
@@ -3208,6 +3241,7 @@ var EnterpriseResource = class {
3208
3241
  this.analytics = new AnalyticsSubResource(http);
3209
3242
  this.settings = new SettingsSubResource(http);
3210
3243
  this.billing = new BillingSubResource(http);
3244
+ this.credits = new CreditsSubResource(http);
3211
3245
  }
3212
3246
  async getAccount() {
3213
3247
  const response = await this.http.request({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendly/node",
3
- "version": "3.19.1",
3
+ "version": "3.21.0",
4
4
  "description": "Official Sendly Node.js SDK for SMS messaging",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",