@stackbe/sdk 0.6.2 → 0.6.3

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
@@ -627,7 +627,8 @@ declare class EntitlementsClient {
627
627
 
628
628
  declare class CustomersClient {
629
629
  private http;
630
- constructor(http: HttpClient);
630
+ private appId;
631
+ constructor(http: HttpClient, appId: string);
631
632
  /**
632
633
  * Get a customer by ID.
633
634
  *
package/dist/index.d.ts CHANGED
@@ -627,7 +627,8 @@ declare class EntitlementsClient {
627
627
 
628
628
  declare class CustomersClient {
629
629
  private http;
630
- constructor(http: HttpClient);
630
+ private appId;
631
+ constructor(http: HttpClient, appId: string);
631
632
  /**
632
633
  * Get a customer by ID.
633
634
  *
package/dist/index.js CHANGED
@@ -474,8 +474,9 @@ var EntitlementsClient = class {
474
474
 
475
475
  // src/customers.ts
476
476
  var CustomersClient = class {
477
- constructor(http) {
477
+ constructor(http, appId) {
478
478
  this.http = http;
479
+ this.appId = appId;
479
480
  }
480
481
  /**
481
482
  * Get a customer by ID.
@@ -520,7 +521,10 @@ var CustomersClient = class {
520
521
  * ```
521
522
  */
522
523
  async create(options) {
523
- return this.http.post("/v1/customers", options);
524
+ return this.http.post("/v1/customers", {
525
+ ...options,
526
+ appId: this.appId
527
+ });
524
528
  }
525
529
  /**
526
530
  * Update a customer.
@@ -1204,7 +1208,7 @@ var StackBE = class {
1204
1208
  });
1205
1209
  this.usage = new UsageClient(this.http);
1206
1210
  this.entitlements = new EntitlementsClient(this.http);
1207
- this.customers = new CustomersClient(this.http);
1211
+ this.customers = new CustomersClient(this.http, config.appId);
1208
1212
  this.checkout = new CheckoutClient(this.http, config.appId);
1209
1213
  this.subscriptions = new SubscriptionsClient(this.http);
1210
1214
  this.auth = new AuthClient(this.http, config.appId, {
package/dist/index.mjs CHANGED
@@ -441,8 +441,9 @@ var EntitlementsClient = class {
441
441
 
442
442
  // src/customers.ts
443
443
  var CustomersClient = class {
444
- constructor(http) {
444
+ constructor(http, appId) {
445
445
  this.http = http;
446
+ this.appId = appId;
446
447
  }
447
448
  /**
448
449
  * Get a customer by ID.
@@ -487,7 +488,10 @@ var CustomersClient = class {
487
488
  * ```
488
489
  */
489
490
  async create(options) {
490
- return this.http.post("/v1/customers", options);
491
+ return this.http.post("/v1/customers", {
492
+ ...options,
493
+ appId: this.appId
494
+ });
491
495
  }
492
496
  /**
493
497
  * Update a customer.
@@ -1171,7 +1175,7 @@ var StackBE = class {
1171
1175
  });
1172
1176
  this.usage = new UsageClient(this.http);
1173
1177
  this.entitlements = new EntitlementsClient(this.http);
1174
- this.customers = new CustomersClient(this.http);
1178
+ this.customers = new CustomersClient(this.http, config.appId);
1175
1179
  this.checkout = new CheckoutClient(this.http, config.appId);
1176
1180
  this.subscriptions = new SubscriptionsClient(this.http);
1177
1181
  this.auth = new AuthClient(this.http, config.appId, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackbe/sdk",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Official JavaScript/TypeScript SDK for StackBE - the billing backend for your side project",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",