@go-avro/avro-js 0.0.2-beta.12 → 0.0.2-beta.14
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.
|
@@ -23,6 +23,6 @@ export declare class AvroQueryClient {
|
|
|
23
23
|
}, cancelToken?: CancelToken): Promise<Boolean>;
|
|
24
24
|
logout(cancelToken?: CancelToken): Promise<void>;
|
|
25
25
|
fetchJobs(companyGuid: string, amt?: number, knownIds?: string[], unknownIds?: string[], keyword?: string, offset?: number, cancelToken?: CancelToken, headers?: Record<string, string>): Promise<any>;
|
|
26
|
-
fetchEvents(companyGuid: string, amt?: number,
|
|
27
|
-
fetchBills(companyGuid: string, amt?: number,
|
|
26
|
+
fetchEvents(companyGuid: string, amt?: number, knownIds?: string[], unknownIds?: string[], keyword?: string, offset?: number, unbilled?: boolean, billed?: boolean, paid?: boolean, jobId?: string | null, cancelToken?: CancelToken, headers?: Record<string, string>): Promise<any>;
|
|
27
|
+
fetchBills(companyGuid: string, amt?: number, knownIds?: string[], unknownIds?: string[], keyword?: string, offset?: number, paid?: boolean, cancelToken?: CancelToken, headers?: Record<string, string>): Promise<any>;
|
|
28
28
|
}
|
|
@@ -224,13 +224,13 @@ export class AvroQueryClient {
|
|
|
224
224
|
throw new StandardError(500, 'Failed to fetch jobs');
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
|
-
fetchEvents(companyGuid, amt = 50,
|
|
227
|
+
fetchEvents(companyGuid, amt = 50, knownIds = [], unknownIds = [], keyword = '', offset = 0, unbilled = true, billed = true, paid = true, jobId = null, cancelToken, headers = {}) {
|
|
228
228
|
const body = {
|
|
229
229
|
amt,
|
|
230
|
-
known_ids,
|
|
231
|
-
unknown_ids,
|
|
230
|
+
known_ids: knownIds,
|
|
231
|
+
unknown_ids: unknownIds,
|
|
232
232
|
query: keyword,
|
|
233
|
-
job_id,
|
|
233
|
+
job_id: jobId,
|
|
234
234
|
};
|
|
235
235
|
if (!companyGuid) {
|
|
236
236
|
return Promise.reject(new StandardError(400, 'Company GUID is required'));
|
|
@@ -247,17 +247,17 @@ export class AvroQueryClient {
|
|
|
247
247
|
throw new StandardError(500, 'Failed to fetch events');
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
|
-
fetchBills(companyGuid, amt = 50,
|
|
250
|
+
fetchBills(companyGuid, amt = 50, knownIds = [], unknownIds = [], keyword = '', offset = 0, paid = true, cancelToken, headers = {}) {
|
|
251
251
|
const body = {
|
|
252
252
|
amt,
|
|
253
|
-
known_ids,
|
|
254
|
-
unknown_ids,
|
|
253
|
+
known_ids: knownIds,
|
|
254
|
+
unknown_ids: unknownIds,
|
|
255
255
|
query: keyword,
|
|
256
256
|
};
|
|
257
257
|
if (!companyGuid) {
|
|
258
258
|
return Promise.reject(new StandardError(400, 'Company GUID is required'));
|
|
259
259
|
}
|
|
260
|
-
return this._fetch('POST', `/company/${companyGuid}/bills?amt=${amt}&offset=${offset}`, body, cancelToken, headers)
|
|
260
|
+
return this._fetch('POST', `/company/${companyGuid}/bills?amt=${amt}&offset=${offset}&paid=${paid}`, body, cancelToken, headers)
|
|
261
261
|
.then(response => {
|
|
262
262
|
if (!response || !Array.isArray(response)) {
|
|
263
263
|
throw new StandardError(400, 'Invalid bills response');
|