repzo 1.0.78 → 1.0.80

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.js CHANGED
@@ -2061,6 +2061,8 @@ Repzo.CommandLog = class {
2061
2061
  this.processedAt = command_log.processedAt;
2062
2062
  this.onGoing = command_log.onGoing || false;
2063
2063
  this.trigger = command_log.trigger;
2064
+ this.sync_details = command_log.sync_details;
2065
+ this.error_details = command_log.error_details;
2064
2066
  // this.priority = command_log.priority
2065
2067
  // ? command_log.priority
2066
2068
  // : this.priority
@@ -2086,10 +2088,12 @@ Repzo.CommandLog = class {
2086
2088
  } else {
2087
2089
  this.error = error;
2088
2090
  }
2089
- this.error_details.push({
2090
- timestamp: Date.now(),
2091
- error: this.error,
2092
- });
2091
+ this.error_details = [
2092
+ {
2093
+ timestamp: Date.now(),
2094
+ error: this.error,
2095
+ },
2096
+ ];
2093
2097
  return this;
2094
2098
  }
2095
2099
  switch (status) {
@@ -2123,7 +2127,12 @@ Repzo.CommandLog = class {
2123
2127
  setBody(body) {
2124
2128
  this.body = body;
2125
2129
  if (!this.sync_details) this.sync_details = [];
2126
- this.sync_details.push({ timestamp: Date.now(), body: body });
2130
+ this.sync_details = [
2131
+ {
2132
+ timestamp: Date.now(),
2133
+ body: this.body,
2134
+ },
2135
+ ];
2127
2136
  return this;
2128
2137
  }
2129
2138
  setMeta(meta) {
@@ -2173,13 +2182,15 @@ Repzo.CommandLog = class {
2173
2182
  return this;
2174
2183
  }
2175
2184
  addDetail(detail, meta) {
2176
- let d = {
2177
- timestamp: Date.now(),
2178
- content: detail,
2179
- };
2185
+ if (!this.details) this.details = [];
2186
+ this.details = [
2187
+ {
2188
+ timestamp: Date.now(),
2189
+ content: detail,
2190
+ meta,
2191
+ },
2192
+ ];
2180
2193
  this.message = detail;
2181
- if (meta) d.meta = meta;
2182
- this.details.push(d);
2183
2194
  return this;
2184
2195
  }
2185
2196
  };
@@ -7519,6 +7519,18 @@ export declare namespace Service {
7519
7519
  onGoing?: boolean;
7520
7520
  retries?: number;
7521
7521
  trigger?: string;
7522
+ sync_details: {
7523
+ timestamp: number;
7524
+ body: {
7525
+ [key: string]: any;
7526
+ };
7527
+ }[];
7528
+ error_details: {
7529
+ timestamp: number;
7530
+ error: {
7531
+ [key: string]: any;
7532
+ };
7533
+ }[];
7522
7534
  createdAt: string;
7523
7535
  updatedAt: string;
7524
7536
  __v: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -2810,6 +2810,8 @@ export default class Repzo {
2810
2810
  this.processedAt = command_log.processedAt;
2811
2811
  this.onGoing = command_log.onGoing || false;
2812
2812
  this.trigger = command_log.trigger;
2813
+ this.sync_details = command_log.sync_details;
2814
+ this.error_details = command_log.error_details;
2813
2815
  // this.priority = command_log.priority
2814
2816
  // ? command_log.priority
2815
2817
  // : this.priority
@@ -2835,10 +2837,13 @@ export default class Repzo {
2835
2837
  } else {
2836
2838
  this.error = error;
2837
2839
  }
2838
- this.error_details.push({
2839
- timestamp: Date.now(),
2840
- error: this.error,
2841
- });
2840
+ this.error_details = [
2841
+ {
2842
+ timestamp: Date.now(),
2843
+ error: this.error,
2844
+ },
2845
+ ];
2846
+
2842
2847
  return this;
2843
2848
  }
2844
2849
  switch (status) {
@@ -2872,7 +2877,12 @@ export default class Repzo {
2872
2877
  setBody(body: any) {
2873
2878
  this.body = body;
2874
2879
  if (!this.sync_details) this.sync_details = [];
2875
- this.sync_details.push({ timestamp: Date.now(), body: body });
2880
+ this.sync_details = [
2881
+ {
2882
+ timestamp: Date.now(),
2883
+ body: this.body,
2884
+ },
2885
+ ];
2876
2886
  return this;
2877
2887
  }
2878
2888
  setMeta(meta: any) {
@@ -2922,13 +2932,15 @@ export default class Repzo {
2922
2932
  return this;
2923
2933
  }
2924
2934
  addDetail(detail: string, meta?: any) {
2925
- let d: Service.CommandLog.Detail = {
2926
- timestamp: Date.now(),
2927
- content: detail,
2928
- };
2935
+ if (!this.details) this.details = [];
2936
+ this.details = [
2937
+ {
2938
+ timestamp: Date.now(),
2939
+ content: detail,
2940
+ meta,
2941
+ },
2942
+ ];
2929
2943
  this.message = detail;
2930
- if (meta) d.meta = meta;
2931
- this.details.push(d);
2932
2944
  return this;
2933
2945
  }
2934
2946
  };
@@ -7491,6 +7491,8 @@ export namespace Service {
7491
7491
  onGoing?: boolean;
7492
7492
  retries?: number;
7493
7493
  trigger?: string;
7494
+ sync_details: { timestamp: number; body: { [key: string]: any } }[];
7495
+ error_details: { timestamp: number; error: { [key: string]: any } }[];
7494
7496
  createdAt: string;
7495
7497
  updatedAt: string;
7496
7498
  __v: number;