@scalemule/sdk 0.0.4 → 0.0.6

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
@@ -2268,8 +2268,9 @@ declare class CommunicationService extends ServiceModule {
2268
2268
  sendEmail(data: {
2269
2269
  to: string;
2270
2270
  subject: string;
2271
- body: string;
2272
- template_id?: string;
2271
+ html_body: string;
2272
+ text_body?: string;
2273
+ message_type?: string;
2273
2274
  }, options?: RequestOptions): Promise<ApiResponse<MessageStatus>>;
2274
2275
  sendEmailTemplate(template: string, data: {
2275
2276
  to: string;
@@ -4275,6 +4276,7 @@ interface ProjectGrant {
4275
4276
  created_at: string;
4276
4277
  expires_at: string;
4277
4278
  redeemed_at?: string;
4279
+ email_sent?: boolean;
4278
4280
  }
4279
4281
  interface GrantInfo {
4280
4282
  id: string;
@@ -4387,12 +4389,18 @@ declare class AgentProjectsService extends ServiceModule {
4387
4389
  role: string;
4388
4390
  user_email: string;
4389
4391
  expires_at: string;
4392
+ invite_url?: string;
4390
4393
  }, options?: RequestOptions): Promise<ApiResponse<ProjectGrant>>;
4391
4394
  listGrants(projectId: string, options?: RequestOptions): Promise<ApiResponse<ProjectGrant[]>>;
4392
4395
  getGrant(id: string, options?: RequestOptions): Promise<ApiResponse<ProjectGrant>>;
4393
4396
  /** Public endpoint — no auth required. Returns masked email + project name. */
4394
4397
  getGrantInfo(id: string, options?: RequestOptions): Promise<ApiResponse<GrantInfo>>;
4395
4398
  revokeGrant(id: string, options?: RequestOptions): Promise<ApiResponse<void>>;
4399
+ resendGrantInvitation(id: string, data: {
4400
+ invite_url: string;
4401
+ }, options?: RequestOptions): Promise<ApiResponse<{
4402
+ email_sent: boolean;
4403
+ }>>;
4396
4404
  redeemGrant(id: string, options?: RequestOptions): Promise<ApiResponse<RedeemResult>>;
4397
4405
  }
4398
4406
 
package/dist/index.d.ts CHANGED
@@ -2268,8 +2268,9 @@ declare class CommunicationService extends ServiceModule {
2268
2268
  sendEmail(data: {
2269
2269
  to: string;
2270
2270
  subject: string;
2271
- body: string;
2272
- template_id?: string;
2271
+ html_body: string;
2272
+ text_body?: string;
2273
+ message_type?: string;
2273
2274
  }, options?: RequestOptions): Promise<ApiResponse<MessageStatus>>;
2274
2275
  sendEmailTemplate(template: string, data: {
2275
2276
  to: string;
@@ -4275,6 +4276,7 @@ interface ProjectGrant {
4275
4276
  created_at: string;
4276
4277
  expires_at: string;
4277
4278
  redeemed_at?: string;
4279
+ email_sent?: boolean;
4278
4280
  }
4279
4281
  interface GrantInfo {
4280
4282
  id: string;
@@ -4387,12 +4389,18 @@ declare class AgentProjectsService extends ServiceModule {
4387
4389
  role: string;
4388
4390
  user_email: string;
4389
4391
  expires_at: string;
4392
+ invite_url?: string;
4390
4393
  }, options?: RequestOptions): Promise<ApiResponse<ProjectGrant>>;
4391
4394
  listGrants(projectId: string, options?: RequestOptions): Promise<ApiResponse<ProjectGrant[]>>;
4392
4395
  getGrant(id: string, options?: RequestOptions): Promise<ApiResponse<ProjectGrant>>;
4393
4396
  /** Public endpoint — no auth required. Returns masked email + project name. */
4394
4397
  getGrantInfo(id: string, options?: RequestOptions): Promise<ApiResponse<GrantInfo>>;
4395
4398
  revokeGrant(id: string, options?: RequestOptions): Promise<ApiResponse<void>>;
4399
+ resendGrantInvitation(id: string, data: {
4400
+ invite_url: string;
4401
+ }, options?: RequestOptions): Promise<ApiResponse<{
4402
+ email_sent: boolean;
4403
+ }>>;
4396
4404
  redeemGrant(id: string, options?: RequestOptions): Promise<ApiResponse<RedeemResult>>;
4397
4405
  }
4398
4406
 
package/dist/index.js CHANGED
@@ -2906,7 +2906,8 @@ var RealtimeService = class extends ServiceModule {
2906
2906
  });
2907
2907
  }
2908
2908
  handleMessage(msg) {
2909
- switch (msg.type) {
2909
+ const type = msg.type;
2910
+ switch (type) {
2910
2911
  case "auth_success":
2911
2912
  this.authenticated = true;
2912
2913
  this.setStatus("connected");
@@ -4919,6 +4920,9 @@ var AgentProjectsService = class extends ServiceModule {
4919
4920
  async revokeGrant(id, options) {
4920
4921
  return this.del(`/project-grants/${id}`, options);
4921
4922
  }
4923
+ async resendGrantInvitation(id, data, options) {
4924
+ return this.post(`/project-grants/${id}/resend`, data, options);
4925
+ }
4922
4926
  async redeemGrant(id, options) {
4923
4927
  return this.post(`/project-grants/${id}/redeem`, void 0, options);
4924
4928
  }
package/dist/index.mjs CHANGED
@@ -2554,7 +2554,8 @@ var RealtimeService = class extends ServiceModule {
2554
2554
  });
2555
2555
  }
2556
2556
  handleMessage(msg) {
2557
- switch (msg.type) {
2557
+ const type = msg.type;
2558
+ switch (type) {
2558
2559
  case "auth_success":
2559
2560
  this.authenticated = true;
2560
2561
  this.setStatus("connected");
@@ -4567,6 +4568,9 @@ var AgentProjectsService = class extends ServiceModule {
4567
4568
  async revokeGrant(id, options) {
4568
4569
  return this.del(`/project-grants/${id}`, options);
4569
4570
  }
4571
+ async resendGrantInvitation(id, data, options) {
4572
+ return this.post(`/project-grants/${id}/resend`, data, options);
4573
+ }
4570
4574
  async redeemGrant(id, options) {
4571
4575
  return this.post(`/project-grants/${id}/redeem`, void 0, options);
4572
4576
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalemule/sdk",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Official TypeScript/JavaScript SDK for ScaleMule Backend-as-a-Service",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",