@beep-it/sdk-core 0.1.2-beta.3 → 0.1.3-beta.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.ts CHANGED
@@ -6,6 +6,7 @@ import { InvoicesModule } from './modules/invoices';
6
6
  import { PaymentsModule } from './modules/payments';
7
7
  import { ProductsModule } from './modules/products';
8
8
  import { WidgetModule } from './modules/widget';
9
+ import { UserModule } from './modules/user';
9
10
  /**
10
11
  * Configuration options for initializing the BeepClient
11
12
  */
@@ -67,6 +68,8 @@ export declare class BeepClient {
67
68
  * stopStreaming) are only available with BeepClient and secret API keys.
68
69
  */
69
70
  readonly payments: PaymentsModule;
71
+ /** Access to authenticated user info */
72
+ readonly user: UserModule;
70
73
  /**
71
74
  * Creates a new BEEP client instance
72
75
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAgB;IAE9B,oEAAoE;IACpE,SAAgB,QAAQ,EAAE,cAAc,CAAC;IAEzC,oEAAoE;IACpE,SAAgB,QAAQ,EAAE,cAAc,CAAC;IAEzC;;;;;OAKG;IACH,SAAgB,QAAQ,EAAE,cAAc,CAAC;IAEzC;;;;;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;;;;;;;;;;;;;GAwCG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAgB;IAE9B;;;;;;OAMG;IACH,SAAgB,MAAM,EAAE,YAAY,CAAC;IAErC;;;;;OAKG;gBACS,OAAO,EAAE,uBAAuB;CAe7C;AAED,YAAY,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,aAAa,GACd,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -752,6 +752,17 @@ var WidgetModule = class {
752
752
  }
753
753
  };
754
754
 
755
+ // src/modules/user.ts
756
+ var UserModule = class {
757
+ constructor(client) {
758
+ this.client = client;
759
+ }
760
+ async getCurrentUser() {
761
+ const { data } = await this.client.get("/v1/user");
762
+ return data;
763
+ }
764
+ };
765
+
755
766
  // src/index.ts
756
767
  var BeepClient = class {
757
768
  /**
@@ -775,6 +786,7 @@ var BeepClient = class {
775
786
  this.products = new ProductsModule(this.client);
776
787
  this.invoices = new InvoicesModule(this.client);
777
788
  this.payments = new PaymentsModule(this.client);
789
+ this.user = new UserModule(this.client);
778
790
  }
779
791
  /**
780
792
  * Initiate a payout from your treasury wallet to an external address.
package/dist/index.mjs CHANGED
@@ -715,6 +715,17 @@ var WidgetModule = class {
715
715
  }
716
716
  };
717
717
 
718
+ // src/modules/user.ts
719
+ var UserModule = class {
720
+ constructor(client) {
721
+ this.client = client;
722
+ }
723
+ async getCurrentUser() {
724
+ const { data } = await this.client.get("/v1/user");
725
+ return data;
726
+ }
727
+ };
728
+
718
729
  // src/index.ts
719
730
  var BeepClient = class {
720
731
  /**
@@ -738,6 +749,7 @@ var BeepClient = class {
738
749
  this.products = new ProductsModule(this.client);
739
750
  this.invoices = new InvoicesModule(this.client);
740
751
  this.payments = new PaymentsModule(this.client);
752
+ this.user = new UserModule(this.client);
741
753
  }
742
754
  /**
743
755
  * Initiate a payout from your treasury wallet to an external address.
@@ -0,0 +1,10 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ export interface CurrentUserResponse {
3
+ merchantId: string | null;
4
+ }
5
+ export declare class UserModule {
6
+ private client;
7
+ constructor(client: AxiosInstance);
8
+ getCurrentUser(): Promise<CurrentUserResponse>;
9
+ }
10
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/modules/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,qBAAa,UAAU;IACT,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAEnC,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC;CAIrD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beep-it/sdk-core",
3
- "version": "0.1.2-beta.3",
3
+ "version": "0.1.3-beta.0",
4
4
  "description": "Official TypeScript SDK for the BEEP Payment and Invoice Server",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",