@fabriktor/fx 0.0.174 → 0.0.176
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.
|
@@ -199,7 +199,10 @@ export class ChatSendQueue {
|
|
|
199
199
|
this.confirmed.has(entry.server_id))) {
|
|
200
200
|
this.startConfirmation(entry, owner, signal);
|
|
201
201
|
}
|
|
202
|
-
if (entry.chat && entry.status === ChatSendStatus.
|
|
202
|
+
if (entry.chat && entry.status === ChatSendStatus.Queued) {
|
|
203
|
+
this.startUpload(entry, owner, signal);
|
|
204
|
+
}
|
|
205
|
+
else if (entry.chat && entry.status === ChatSendStatus.Uploading) {
|
|
203
206
|
this.recoverUpload(entry, owner, signal);
|
|
204
207
|
}
|
|
205
208
|
}
|
|
@@ -477,7 +480,8 @@ export class ChatSendQueue {
|
|
|
477
480
|
current = {
|
|
478
481
|
...current,
|
|
479
482
|
chat,
|
|
480
|
-
|
|
483
|
+
// Confirmed message; its first attachment upload has not started.
|
|
484
|
+
status: ChatSendStatus.Queued,
|
|
481
485
|
retry: undefined,
|
|
482
486
|
};
|
|
483
487
|
await this.save(current);
|
|
@@ -531,7 +535,8 @@ export class ChatSendQueue {
|
|
|
531
535
|
return;
|
|
532
536
|
}
|
|
533
537
|
const stored = (await this.opts.store.list(owner)).find((value) => value.id === entry.id);
|
|
534
|
-
if (!stored ||
|
|
538
|
+
if (!stored?.chat ||
|
|
539
|
+
(stored.status !== ChatSendStatus.Queued && !chatSendNeedsRetry(stored))) {
|
|
535
540
|
return;
|
|
536
541
|
}
|
|
537
542
|
try {
|
package/dist/src/jobs/jobs.d.ts
CHANGED
|
@@ -29,12 +29,12 @@ export type ArchiveLocationOptions = {
|
|
|
29
29
|
type LocationSearchFields = Partial<Pick<Location, "is_archived">>;
|
|
30
30
|
type JobSearchFields = Partial<Pick<Job, "location_id" | "status">>;
|
|
31
31
|
export type SearchLocationsOptions = OwnerSearchOptions & LocationSearchFields;
|
|
32
|
-
export type SearchAccessibleLocationsOptions = SearchOptions & LocationSearchFields
|
|
32
|
+
export type SearchAccessibleLocationsOptions = SearchOptions & LocationSearchFields & Partial<Pick<Location, "owner_id">>;
|
|
33
33
|
export type SearchJobProgramsOptions = OwnerSearchOptions & Partial<Pick<JobProgram, "finished">> & {
|
|
34
34
|
location_id?: JobProgram["job_location_id"];
|
|
35
35
|
};
|
|
36
36
|
export type SearchJobsOptions = OwnerSearchOptions & JobSearchFields;
|
|
37
|
-
export type SearchAccessibleJobsOptions = SearchOptions & JobSearchFields
|
|
37
|
+
export type SearchAccessibleJobsOptions = SearchOptions & JobSearchFields & Partial<Pick<Job, "owner_id">>;
|
|
38
38
|
export type SearchLocationsPage = SearchPage<Location>;
|
|
39
39
|
export type SearchJobProgramsPage = SearchPage<JobProgram>;
|
|
40
40
|
export type SearchJobsPage = SearchPage<Job>;
|
package/dist/src/jobs/jobs.js
CHANGED
|
@@ -110,12 +110,10 @@ export class JobsFX {
|
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
async searchAccessibleLocations(opts = {}) {
|
|
113
|
-
const { is_archived, ...searchOpts } = opts;
|
|
113
|
+
const { owner_id, is_archived, ...searchOpts } = opts;
|
|
114
114
|
return await runSearch({
|
|
115
115
|
...searchOpts,
|
|
116
|
-
query: is_archived
|
|
117
|
-
? undefined
|
|
118
|
-
: queryParams({ is_archived }),
|
|
116
|
+
query: queryParams({ owner_id: resolvedID(owner_id), is_archived }),
|
|
119
117
|
search: (opts) => this.jobs.searchMineLocations(opts),
|
|
120
118
|
});
|
|
121
119
|
}
|
|
@@ -230,10 +228,13 @@ export class JobsFX {
|
|
|
230
228
|
});
|
|
231
229
|
}
|
|
232
230
|
async searchAccessibleJobs(opts = {}) {
|
|
233
|
-
const { location_id, status, ...searchOpts } = opts;
|
|
231
|
+
const { owner_id, location_id, status, ...searchOpts } = opts;
|
|
234
232
|
return await runSearch({
|
|
235
233
|
...searchOpts,
|
|
236
|
-
query:
|
|
234
|
+
query: {
|
|
235
|
+
...jobSearchQuery({ location_id, status }),
|
|
236
|
+
...queryParams({ owner_id: resolvedID(owner_id) }),
|
|
237
|
+
},
|
|
237
238
|
search: (opts) => this.jobs.searchMineJobs(opts),
|
|
238
239
|
});
|
|
239
240
|
}
|