repzo 1.0.8 → 1.0.11

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/lib/index.d.ts CHANGED
@@ -523,11 +523,11 @@ export default class Repzo {
523
523
  isOld: boolean;
524
524
  superThis: Repzo;
525
525
  load(sync_id: string): Promise<any>;
526
- setStatus(status: Service.ActionLogs.Status, error?: any): Promise<any>;
526
+ setStatus(status: Service.ActionLogs.Status, error?: any): any;
527
527
  setBody(body: any): any;
528
528
  setMeta(meta: any): any;
529
529
  commit(): Promise<any>;
530
- addDetail(detail: string, meta: any): any;
530
+ addDetail(detail: string, meta?: any): any;
531
531
  };
532
532
  };
533
533
  static CommandLog: {
package/lib/index.js CHANGED
@@ -1014,7 +1014,7 @@ export default class Repzo {
1014
1014
  update: async (id, body) => {
1015
1015
  let res = await this._update(
1016
1016
  this.svAPIEndpoint,
1017
- this.payment._path,
1017
+ this.joinActionsWebHook._path,
1018
1018
  body
1019
1019
  );
1020
1020
  return res;
@@ -1087,8 +1087,8 @@ Repzo.ActionLogs = class {
1087
1087
  this._path,
1088
1088
  params
1089
1089
  );
1090
- if (res?.data?.length)
1091
- throw new Error(`Command Log Not found, sync_id: ${sync_id}`);
1090
+ if (!res?.data?.length)
1091
+ throw new Error(`Action Log Not found, sync_id: ${sync_id}`);
1092
1092
  const action_log = res.data[0];
1093
1093
  this.sync_id = sync_id;
1094
1094
  this.details = action_log.details;
@@ -1106,7 +1106,7 @@ Repzo.ActionLogs = class {
1106
1106
  this.isOld = true;
1107
1107
  return this;
1108
1108
  }
1109
- async setStatus(status, error) {
1109
+ setStatus(status, error) {
1110
1110
  this.details.push({
1111
1111
  timestamp: Date.now(),
1112
1112
  content: `status was changed from ${this.status} to ${status}`,
@@ -1193,7 +1193,7 @@ Repzo.CommandLog = class {
1193
1193
  this._path,
1194
1194
  params
1195
1195
  );
1196
- if (res?.data?.length)
1196
+ if (!res?.data?.length)
1197
1197
  throw new Error(`Command Log Not found, sync_id: ${sync_id}`);
1198
1198
  const command_log = res.data[0];
1199
1199
  if (command_log) {
@@ -4107,12 +4107,12 @@ export declare namespace Service {
4107
4107
  join: boolean;
4108
4108
  }
4109
4109
  export interface Result {
4110
- data: [JoinData];
4110
+ data: JoinData[];
4111
4111
  status?: "success" | "failure";
4112
4112
  error?: any;
4113
4113
  }
4114
4114
  export interface Data {
4115
- data: [JoinData];
4115
+ data: JoinData[];
4116
4116
  }
4117
4117
  export {};
4118
4118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.8",
3
+ "version": "1.0.11",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -1480,6 +1480,7 @@ export default class Repzo {
1480
1480
  return res;
1481
1481
  },
1482
1482
  };
1483
+
1483
1484
  joinActionsWebHook = {
1484
1485
  _path: "/svix-integration",
1485
1486
  update: async (
@@ -1488,12 +1489,13 @@ export default class Repzo {
1488
1489
  ): Promise<Service.JoinActionsWeHook.Result> => {
1489
1490
  let res: Service.JoinActionsWeHook.Result = await this._update(
1490
1491
  this.svAPIEndpoint,
1491
- this.payment._path,
1492
+ this.joinActionsWebHook._path,
1492
1493
  body
1493
1494
  );
1494
1495
  return res;
1495
1496
  },
1496
1497
  };
1498
+
1497
1499
  static ActionLogs = class {
1498
1500
  _path: string = "/integration-action-log";
1499
1501
  available_app_name: string = "";
@@ -1528,8 +1530,8 @@ export default class Repzo {
1528
1530
  this._path,
1529
1531
  params
1530
1532
  );
1531
- if (res?.data?.length)
1532
- throw new Error(`Command Log Not found, sync_id: ${sync_id}`);
1533
+ if (!res?.data?.length)
1534
+ throw new Error(`Action Log Not found, sync_id: ${sync_id}`);
1533
1535
  const action_log: Service.ActionLogs.Schema = res.data[0];
1534
1536
  this.sync_id = sync_id;
1535
1537
  this.details = action_log.details;
@@ -1548,7 +1550,7 @@ export default class Repzo {
1548
1550
 
1549
1551
  return this;
1550
1552
  }
1551
- async setStatus(status: Service.ActionLogs.Status, error?: any) {
1553
+ setStatus(status: Service.ActionLogs.Status, error?: any) {
1552
1554
  this.details.push({
1553
1555
  timestamp: Date.now(),
1554
1556
  content: `status was changed from ${this.status} to ${status}`,
@@ -1596,7 +1598,7 @@ export default class Repzo {
1596
1598
  }
1597
1599
  return this;
1598
1600
  }
1599
- addDetail(detail: string, meta: any) {
1601
+ addDetail(detail: string, meta?: any) {
1600
1602
  let d: Service.ActionLogs.Detail = {
1601
1603
  timestamp: Date.now(),
1602
1604
  content: detail,
@@ -1667,7 +1669,7 @@ export default class Repzo {
1667
1669
  this._path,
1668
1670
  params
1669
1671
  );
1670
- if (res?.data?.length)
1672
+ if (!res?.data?.length)
1671
1673
  throw new Error(`Command Log Not found, sync_id: ${sync_id}`);
1672
1674
  const command_log: Service.CommandLog.Schema = res.data[0];
1673
1675
 
@@ -4054,12 +4054,12 @@ export namespace Service {
4054
4054
  join: boolean;
4055
4055
  }
4056
4056
  export interface Result {
4057
- data: [JoinData];
4057
+ data: JoinData[];
4058
4058
  status?: "success" | "failure";
4059
4059
  error?: any;
4060
4060
  }
4061
4061
  export interface Data {
4062
- data: [JoinData];
4062
+ data: JoinData[];
4063
4063
  }
4064
4064
  }
4065
4065
  export namespace App {