@go-avro/avro-js 1.6.6-rc2 → 1.6.6-rc4
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.
|
@@ -274,6 +274,8 @@ export interface CatalogItemUpdatePayload {
|
|
|
274
274
|
recommended_expire_on?: number | null;
|
|
275
275
|
/** Skill GUIDs; replaces the item's skills. */
|
|
276
276
|
skills?: string[];
|
|
277
|
+
/** ProposalTerms GUIDs; replaces the item's suggested terms. */
|
|
278
|
+
terms?: string[];
|
|
277
279
|
/** Replaces the item's payment options. */
|
|
278
280
|
payment_options?: PaymentOptionInput[];
|
|
279
281
|
}
|
|
@@ -284,7 +286,7 @@ export type CatalogItemCreatePayload = CatalogItemUpdatePayload & {
|
|
|
284
286
|
/**
|
|
285
287
|
* Body of `POST /job/<id>/proposal` and `PUT /proposal/<id>` (backend
|
|
286
288
|
* `CreateProposal` / `UpdateProposal`); omitted fields are unchanged, and
|
|
287
|
-
* null clears `expire_on` / `
|
|
289
|
+
* null clears `expire_on` / `prepay_due_date`.
|
|
288
290
|
*/
|
|
289
291
|
export interface ProposalWritePayload {
|
|
290
292
|
/**
|
|
@@ -292,8 +294,8 @@ export interface ProposalWritePayload {
|
|
|
292
294
|
* null means never.
|
|
293
295
|
*/
|
|
294
296
|
expire_on?: number | null;
|
|
295
|
-
/** Terms version
|
|
296
|
-
|
|
297
|
+
/** Terms version GUIDs; replaces the attached terms (`[]` detaches all). */
|
|
298
|
+
terms_version_ids?: string[];
|
|
297
299
|
/** Unix seconds (>= 0); null clears. */
|
|
298
300
|
prepay_due_date?: number | null;
|
|
299
301
|
/** Replaces the proposal's tasks (only `id` is read). */
|
|
@@ -329,8 +331,11 @@ export interface ProposalReviewTask {
|
|
|
329
331
|
/** Body of `POST /proposal/<id>/review` (backend `ReviewProposal`). */
|
|
330
332
|
export interface ProposalReviewPayload {
|
|
331
333
|
tasks?: ProposalReviewTask[];
|
|
332
|
-
/**
|
|
333
|
-
|
|
334
|
+
/**
|
|
335
|
+
* The terms version GUIDs agreed to; must be exactly the proposal's when
|
|
336
|
+
* it has terms and any task is accepted.
|
|
337
|
+
*/
|
|
338
|
+
terms_version_ids?: string[];
|
|
334
339
|
pay_in_cash?: boolean;
|
|
335
340
|
}
|
|
336
341
|
/**
|
package/dist/types/api/Avro.d.ts
CHANGED
|
@@ -88,11 +88,55 @@ export interface PerformanceSample {
|
|
|
88
88
|
memory_percent: number;
|
|
89
89
|
}[];
|
|
90
90
|
}
|
|
91
|
+
/** A live scheduler process (`avro scheduler-worker`). */
|
|
92
|
+
export interface SchedulerWorker {
|
|
93
|
+
/** `<hostname>:<pid>` of the scheduler process. */
|
|
94
|
+
worker: string;
|
|
95
|
+
/** Unix seconds of the last heartbeat. */
|
|
96
|
+
time: number;
|
|
97
|
+
/** Unix seconds when the process started its scheduler. */
|
|
98
|
+
started_at: number;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Latest run state of a scheduled job. `pending` until its first run since
|
|
102
|
+
* the worker started; `locked` when the last run skipped because another
|
|
103
|
+
* process held the job's Redis lock. A run skipped because the previous one
|
|
104
|
+
* is still going leaves it `running` and sets `last_skipped`.
|
|
105
|
+
*/
|
|
106
|
+
export type SchedulerJobStatus = 'pending' | 'running' | 'ok' | 'error' | 'missed' | 'locked';
|
|
107
|
+
/** A scheduled job and its latest run (times are Unix seconds). */
|
|
108
|
+
export interface SchedulerJob {
|
|
109
|
+
/** The job's function name, e.g. `update_routes`. */
|
|
110
|
+
id: string;
|
|
111
|
+
/** E.g. `cron[hour='1', minute='0', second='0']`. */
|
|
112
|
+
trigger: string | null;
|
|
113
|
+
status: SchedulerJobStatus | null;
|
|
114
|
+
next_run_time: number | null;
|
|
115
|
+
last_started: number | null;
|
|
116
|
+
last_finished: number | null;
|
|
117
|
+
last_success: number | null;
|
|
118
|
+
last_skipped: number | null;
|
|
119
|
+
/** Last run skipped because another process held the job's lock. */
|
|
120
|
+
last_locked: number | null;
|
|
121
|
+
/** The Redis lock that was held on the last `locked` run. */
|
|
122
|
+
lock_name: string | null;
|
|
123
|
+
/** Of the last finished run. */
|
|
124
|
+
duration_seconds: number | null;
|
|
125
|
+
last_error: string | null;
|
|
126
|
+
last_error_time: number | null;
|
|
127
|
+
}
|
|
128
|
+
/** Scheduler health: live processes and every job's latest run. */
|
|
129
|
+
export interface PerformanceScheduler {
|
|
130
|
+
/** Empty when no scheduler process is alive. */
|
|
131
|
+
workers: SchedulerWorker[];
|
|
132
|
+
jobs: SchedulerJob[];
|
|
133
|
+
}
|
|
91
134
|
/** Response of GET /avro/performance (root only). */
|
|
92
135
|
export interface PerformanceMetrics {
|
|
93
136
|
current: {
|
|
94
137
|
database: PerformanceDatabase;
|
|
95
138
|
fleet: PerformanceFleet;
|
|
139
|
+
scheduler: PerformanceScheduler;
|
|
96
140
|
};
|
|
97
141
|
/** Oldest first. */
|
|
98
142
|
samples: PerformanceSample[];
|
|
@@ -108,11 +152,15 @@ export interface ClientErrorReport {
|
|
|
108
152
|
route?: string;
|
|
109
153
|
extra?: Record<string, unknown>;
|
|
110
154
|
}
|
|
111
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* One entry in the admin error log (backend errors, client crashes and
|
|
157
|
+
* scheduler job failures). Scheduler entries carry no request context:
|
|
158
|
+
* `endpoint` is the job id and the request fields are absent.
|
|
159
|
+
*/
|
|
112
160
|
export interface ErrorLogEntry {
|
|
113
161
|
id: string;
|
|
114
162
|
time: number;
|
|
115
|
-
source: 'backend' | 'app' | 'web';
|
|
163
|
+
source: 'backend' | 'app' | 'web' | 'scheduler';
|
|
116
164
|
/** HTTP status; absent from client reports. */
|
|
117
165
|
status?: number | null;
|
|
118
166
|
message: string | null;
|
|
@@ -123,22 +171,20 @@ export interface ErrorLogEntry {
|
|
|
123
171
|
app_version?: string | null;
|
|
124
172
|
update_id?: string | null;
|
|
125
173
|
route?: string | null;
|
|
126
|
-
method
|
|
127
|
-
path
|
|
128
|
-
endpoint
|
|
129
|
-
client_id
|
|
130
|
-
client_version
|
|
131
|
-
js_version
|
|
132
|
-
user_agent
|
|
133
|
-
remote_addr
|
|
134
|
-
forwarded_for
|
|
135
|
-
source_ip
|
|
136
|
-
|
|
137
|
-
user: {
|
|
174
|
+
method?: string | null;
|
|
175
|
+
path?: string | null;
|
|
176
|
+
endpoint?: string | null;
|
|
177
|
+
client_id?: string | null;
|
|
178
|
+
client_version?: string | null;
|
|
179
|
+
js_version?: string | null;
|
|
180
|
+
user_agent?: string | null;
|
|
181
|
+
remote_addr?: string | null;
|
|
182
|
+
forwarded_for?: string | null;
|
|
183
|
+
source_ip?: string | null;
|
|
184
|
+
user?: {
|
|
138
185
|
id: string;
|
|
139
186
|
username: string;
|
|
140
187
|
is_paying?: boolean | null;
|
|
141
188
|
} | string | null;
|
|
142
|
-
/** A string when the stored value was too long and was truncated to its JSON text. */
|
|
143
189
|
extra?: Record<string, unknown> | string | null;
|
|
144
190
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AVRO_JS_VERSION = "1.6.6-
|
|
1
|
+
export declare const AVRO_JS_VERSION = "1.6.6-rc4";
|
package/dist/version.js
CHANGED