repzo 1.0.75 → 1.0.76
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 +12 -0
- package/lib/index.js +8 -0
- package/lib/types/index.d.ts +12 -0
- package/package.json +1 -1
- package/src/index.ts +10 -0
- package/src/types/index.ts +2 -0
package/lib/index.d.ts
CHANGED
|
@@ -944,6 +944,18 @@ export default class Repzo {
|
|
|
944
944
|
total_time?: number | undefined;
|
|
945
945
|
company_namespace: NameSpaces;
|
|
946
946
|
body?: any;
|
|
947
|
+
sync_details: {
|
|
948
|
+
timestamp: number;
|
|
949
|
+
body: {
|
|
950
|
+
[key: string]: any;
|
|
951
|
+
};
|
|
952
|
+
}[];
|
|
953
|
+
error_details: {
|
|
954
|
+
timestamp: number;
|
|
955
|
+
error: {
|
|
956
|
+
[key: string]: any;
|
|
957
|
+
};
|
|
958
|
+
}[];
|
|
947
959
|
meta?: any;
|
|
948
960
|
message: string;
|
|
949
961
|
details: Service.CommandLog.Detail[];
|
package/lib/index.js
CHANGED
|
@@ -2028,6 +2028,8 @@ Repzo.CommandLog = class {
|
|
|
2028
2028
|
this.retries = 1;
|
|
2029
2029
|
this.trigger = trigger;
|
|
2030
2030
|
this.onGoing = true;
|
|
2031
|
+
this.sync_details = [];
|
|
2032
|
+
this.error_details = [];
|
|
2031
2033
|
}
|
|
2032
2034
|
async load(sync_id, retries) {
|
|
2033
2035
|
if (sync_id) {
|
|
@@ -2072,6 +2074,7 @@ Repzo.CommandLog = class {
|
|
|
2072
2074
|
this.addDetail(`status was changed from ${this.status} to ${status}`);
|
|
2073
2075
|
this.status = status;
|
|
2074
2076
|
if (error) {
|
|
2077
|
+
if (!this.error_details) this.error_details = [];
|
|
2075
2078
|
if (typeof error == "string") {
|
|
2076
2079
|
this.error = { message: error };
|
|
2077
2080
|
} else if (error.message || error.response?.data) {
|
|
@@ -2080,6 +2083,7 @@ Repzo.CommandLog = class {
|
|
|
2080
2083
|
message: error.message,
|
|
2081
2084
|
responseData: error.response?.data,
|
|
2082
2085
|
};
|
|
2086
|
+
this.error_details.push({ timestamp: Date.now(), error: this.error });
|
|
2083
2087
|
} else {
|
|
2084
2088
|
this.error = error;
|
|
2085
2089
|
}
|
|
@@ -2115,6 +2119,8 @@ Repzo.CommandLog = class {
|
|
|
2115
2119
|
}
|
|
2116
2120
|
setBody(body) {
|
|
2117
2121
|
this.body = body;
|
|
2122
|
+
if (!this.sync_details) this.sync_details = [];
|
|
2123
|
+
this.sync_details.push({ timestamp: Date.now(), body: body });
|
|
2118
2124
|
return this;
|
|
2119
2125
|
}
|
|
2120
2126
|
setMeta(meta) {
|
|
@@ -2148,6 +2154,8 @@ Repzo.CommandLog = class {
|
|
|
2148
2154
|
onGoing: this.onGoing !== undefined ? this.onGoing : undefined,
|
|
2149
2155
|
retries: this.retries !== undefined ? this.retries : undefined,
|
|
2150
2156
|
trigger: this.trigger,
|
|
2157
|
+
sync_details: this.sync_details,
|
|
2158
|
+
error_details: this.error_details,
|
|
2151
2159
|
};
|
|
2152
2160
|
try {
|
|
2153
2161
|
const res = await this.superThis._create(
|
package/lib/types/index.d.ts
CHANGED
|
@@ -7558,6 +7558,18 @@ export declare namespace Service {
|
|
|
7558
7558
|
onGoing?: boolean;
|
|
7559
7559
|
retries?: number;
|
|
7560
7560
|
trigger?: string;
|
|
7561
|
+
sync_details: {
|
|
7562
|
+
timestamp: number;
|
|
7563
|
+
body: {
|
|
7564
|
+
[key: string]: any;
|
|
7565
|
+
};
|
|
7566
|
+
}[];
|
|
7567
|
+
error_details: {
|
|
7568
|
+
timestamp: number;
|
|
7569
|
+
error: {
|
|
7570
|
+
[key: string]: any;
|
|
7571
|
+
};
|
|
7572
|
+
}[];
|
|
7561
7573
|
}
|
|
7562
7574
|
export namespace Find {
|
|
7563
7575
|
type Params = DefaultPaginationQueryParams & {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -2735,6 +2735,8 @@ export default class Repzo {
|
|
|
2735
2735
|
total_time?: number;
|
|
2736
2736
|
company_namespace: NameSpaces;
|
|
2737
2737
|
body?: any;
|
|
2738
|
+
sync_details: { timestamp: number; body: { [key: string]: any } }[];
|
|
2739
|
+
error_details: { timestamp: number; error: { [key: string]: any } }[];
|
|
2738
2740
|
meta?: any;
|
|
2739
2741
|
message: string;
|
|
2740
2742
|
details: Service.CommandLog.Detail[];
|
|
@@ -2772,6 +2774,8 @@ export default class Repzo {
|
|
|
2772
2774
|
this.retries = 1;
|
|
2773
2775
|
this.trigger = trigger;
|
|
2774
2776
|
this.onGoing = true;
|
|
2777
|
+
this.sync_details = [];
|
|
2778
|
+
this.error_details = [];
|
|
2775
2779
|
}
|
|
2776
2780
|
async load(sync_id?: string, retries?: number) {
|
|
2777
2781
|
if (sync_id) {
|
|
@@ -2819,6 +2823,7 @@ export default class Repzo {
|
|
|
2819
2823
|
this.addDetail(`status was changed from ${this.status} to ${status}`);
|
|
2820
2824
|
this.status = status;
|
|
2821
2825
|
if (error) {
|
|
2826
|
+
if (!this.error_details) this.error_details = [];
|
|
2822
2827
|
if (typeof error == "string") {
|
|
2823
2828
|
this.error = { message: error };
|
|
2824
2829
|
} else if (error.message || error.response?.data) {
|
|
@@ -2827,6 +2832,7 @@ export default class Repzo {
|
|
|
2827
2832
|
message: error.message,
|
|
2828
2833
|
responseData: error.response?.data,
|
|
2829
2834
|
};
|
|
2835
|
+
this.error_details.push({ timestamp: Date.now(), error: this.error });
|
|
2830
2836
|
} else {
|
|
2831
2837
|
this.error = error;
|
|
2832
2838
|
}
|
|
@@ -2862,6 +2868,8 @@ export default class Repzo {
|
|
|
2862
2868
|
}
|
|
2863
2869
|
setBody(body: any) {
|
|
2864
2870
|
this.body = body;
|
|
2871
|
+
if (!this.sync_details) this.sync_details = [];
|
|
2872
|
+
this.sync_details.push({ timestamp: Date.now(), body: body });
|
|
2865
2873
|
return this;
|
|
2866
2874
|
}
|
|
2867
2875
|
setMeta(meta: any) {
|
|
@@ -2895,6 +2903,8 @@ export default class Repzo {
|
|
|
2895
2903
|
onGoing: this.onGoing !== undefined ? this.onGoing : undefined,
|
|
2896
2904
|
retries: this.retries !== undefined ? this.retries : undefined,
|
|
2897
2905
|
trigger: this.trigger,
|
|
2906
|
+
sync_details: this.sync_details,
|
|
2907
|
+
error_details: this.error_details,
|
|
2898
2908
|
};
|
|
2899
2909
|
try {
|
|
2900
2910
|
const res: Service.CommandLog.Create.Result = await this.superThis._create(
|
package/src/types/index.ts
CHANGED
|
@@ -7521,6 +7521,8 @@ export namespace Service {
|
|
|
7521
7521
|
onGoing?: boolean;
|
|
7522
7522
|
retries?: number;
|
|
7523
7523
|
trigger?: string;
|
|
7524
|
+
sync_details: { timestamp: number; body: { [key: string]: any } }[];
|
|
7525
|
+
error_details: { timestamp: number; error: { [key: string]: any } }[];
|
|
7524
7526
|
}
|
|
7525
7527
|
|
|
7526
7528
|
export namespace Find {
|