@jumoo/processing 18.3.2 → 19.0.0-beta02

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.
@@ -1,3 +1,3 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { createClient, createConfig } from './client';
3
- export const client = createClient(createConfig({ baseUrl: 'https://localhost:44348/', throwOnError: true }));
3
+ export const client = createClient(createConfig({ baseUrl: 'https://localhost:44348/' }));
@@ -1,2 +1,2 @@
1
1
  export { deleteProcessingDeleteQueueByKey, getProcessingGetPipelineById, getProcessingGetProcessors, getProcessingGetResultsById, getProcessingListPipelinesByStatus, getProcessingListPipelinesByStrategyByStrategyByStatus, getProcessingListQueue, getProcessingPeekItem, getProcessingPipelineStatusById, type Options, postProcessingCancelPipelineById, postProcessingClearPipelineById, postProcessingCreatePipeline, postProcessingProcessPipelineById, postProcessingProcessQueueByKey, postProcessingReattachPipelineById, postProcessingStartPipeline, postProcessingUpdatePipelineById } from './sdk.gen';
2
- export { type ClientOptions, type DeleteProcessingDeleteQueueByKeyData, type DeleteProcessingDeleteQueueByKeyError, type DeleteProcessingDeleteQueueByKeyErrors, type DeleteProcessingDeleteQueueByKeyResponses, type GetProcessingGetPipelineByIdData, type GetProcessingGetPipelineByIdError, type GetProcessingGetPipelineByIdErrors, type GetProcessingGetPipelineByIdResponse, type GetProcessingGetPipelineByIdResponses, type GetProcessingGetProcessorsData, type GetProcessingGetProcessorsError, type GetProcessingGetProcessorsErrors, type GetProcessingGetProcessorsResponse, type GetProcessingGetProcessorsResponses, type GetProcessingGetResultsByIdData, type GetProcessingGetResultsByIdError, type GetProcessingGetResultsByIdErrors, type GetProcessingGetResultsByIdResponse, type GetProcessingGetResultsByIdResponses, type GetProcessingListPipelinesByStatusData, type GetProcessingListPipelinesByStatusError, type GetProcessingListPipelinesByStatusErrors, type GetProcessingListPipelinesByStatusResponse, type GetProcessingListPipelinesByStatusResponses, type GetProcessingListPipelinesByStrategyByStrategyByStatusData, type GetProcessingListPipelinesByStrategyByStrategyByStatusError, type GetProcessingListPipelinesByStrategyByStrategyByStatusErrors, type GetProcessingListPipelinesByStrategyByStrategyByStatusResponse, type GetProcessingListPipelinesByStrategyByStrategyByStatusResponses, type GetProcessingListQueueData, type GetProcessingListQueueError, type GetProcessingListQueueErrors, type GetProcessingListQueueResponse, type GetProcessingListQueueResponses, type GetProcessingPeekItemData, type GetProcessingPeekItemError, type GetProcessingPeekItemErrors, type GetProcessingPeekItemResponse, type GetProcessingPeekItemResponses, type GetProcessingPipelineStatusByIdData, type GetProcessingPipelineStatusByIdError, type GetProcessingPipelineStatusByIdErrors, type GetProcessingPipelineStatusByIdResponse, type GetProcessingPipelineStatusByIdResponses, type PagedModelQueuedItemModel, type Pipeline, type PipelineBackgroundState, type PipelineConflictProblemDetails, type PipelineCreateRequest, type PipelineRunError, type PipelineRunProgress, type PipelineRunRejected, PipelineRunRejectedReason, type PipelineRunRequest, type PipelineRunStarted, PipelineRunState, type PipelineRunStatus, type PipelineRunSummary, type PipelineState, PipelineStatus, type PostProcessingCancelPipelineByIdData, type PostProcessingCancelPipelineByIdError, type PostProcessingCancelPipelineByIdErrors, type PostProcessingCancelPipelineByIdResponses, type PostProcessingClearPipelineByIdData, type PostProcessingClearPipelineByIdError, type PostProcessingClearPipelineByIdErrors, type PostProcessingClearPipelineByIdResponses, type PostProcessingCreatePipelineData, type PostProcessingCreatePipelineError, type PostProcessingCreatePipelineErrors, type PostProcessingCreatePipelineResponse, type PostProcessingCreatePipelineResponses, type PostProcessingProcessPipelineByIdData, type PostProcessingProcessPipelineByIdError, type PostProcessingProcessPipelineByIdErrors, type PostProcessingProcessPipelineByIdResponse, type PostProcessingProcessPipelineByIdResponses, type PostProcessingProcessQueueByKeyData, type PostProcessingProcessQueueByKeyError, type PostProcessingProcessQueueByKeyErrors, type PostProcessingProcessQueueByKeyResponse, type PostProcessingProcessQueueByKeyResponses, type PostProcessingReattachPipelineByIdData, type PostProcessingReattachPipelineByIdError, type PostProcessingReattachPipelineByIdErrors, type PostProcessingReattachPipelineByIdResponse, type PostProcessingReattachPipelineByIdResponses, type PostProcessingStartPipelineData, type PostProcessingStartPipelineError, type PostProcessingStartPipelineErrors, type PostProcessingStartPipelineResponse, type PostProcessingStartPipelineResponses, type PostProcessingUpdatePipelineByIdData, type PostProcessingUpdatePipelineByIdError, type PostProcessingUpdatePipelineByIdErrors, type PostProcessingUpdatePipelineByIdResponse, type PostProcessingUpdatePipelineByIdResponses, type ProblemDetails, type ProcessingErrorDetails, type ProcessingOptions, type ProcessingOptionsResults, type ProcessingRequest, type ProcessingRequestAction, type ProcessingResults, type ProgressInformation, type QueuedItem, type StepInfo, StepStatus } from './types.gen';
2
+ export { type ClientOptions, type DeleteProcessingDeleteQueueByKeyData, type DeleteProcessingDeleteQueueByKeyError, type DeleteProcessingDeleteQueueByKeyErrors, type DeleteProcessingDeleteQueueByKeyResponses, type GetProcessingGetPipelineByIdData, type GetProcessingGetPipelineByIdError, type GetProcessingGetPipelineByIdErrors, type GetProcessingGetPipelineByIdResponse, type GetProcessingGetPipelineByIdResponses, type GetProcessingGetProcessorsData, type GetProcessingGetProcessorsError, type GetProcessingGetProcessorsErrors, type GetProcessingGetProcessorsResponse, type GetProcessingGetProcessorsResponses, type GetProcessingGetResultsByIdData, type GetProcessingGetResultsByIdError, type GetProcessingGetResultsByIdErrors, type GetProcessingGetResultsByIdResponse, type GetProcessingGetResultsByIdResponses, type GetProcessingListPipelinesByStatusData, type GetProcessingListPipelinesByStatusError, type GetProcessingListPipelinesByStatusErrors, type GetProcessingListPipelinesByStatusResponse, type GetProcessingListPipelinesByStatusResponses, type GetProcessingListPipelinesByStrategyByStrategyByStatusData, type GetProcessingListPipelinesByStrategyByStrategyByStatusError, type GetProcessingListPipelinesByStrategyByStrategyByStatusErrors, type GetProcessingListPipelinesByStrategyByStrategyByStatusResponse, type GetProcessingListPipelinesByStrategyByStrategyByStatusResponses, type GetProcessingListQueueData, type GetProcessingListQueueError, type GetProcessingListQueueErrors, type GetProcessingListQueueResponse, type GetProcessingListQueueResponses, type GetProcessingPeekItemData, type GetProcessingPeekItemError, type GetProcessingPeekItemErrors, type GetProcessingPeekItemResponse, type GetProcessingPeekItemResponses, type GetProcessingPipelineStatusByIdData, type GetProcessingPipelineStatusByIdError, type GetProcessingPipelineStatusByIdErrors, type GetProcessingPipelineStatusByIdResponse, type GetProcessingPipelineStatusByIdResponses, type PagedModelQueuedItemModel, type Pipeline, type PipelineBackgroundState, type PipelineConflictProblemDetails, type PipelineCreateRequest, type PipelineRunError, type PipelineRunProgress, type PipelineRunRejected, PipelineRunRejectedReason, type PipelineRunRequest, type PipelineRunStarted, PipelineRunState, type PipelineRunStatus, type PipelineRunSummary, type PipelineState, PipelineStatus, type PostProcessingCancelPipelineByIdData, type PostProcessingCancelPipelineByIdError, type PostProcessingCancelPipelineByIdErrors, type PostProcessingCancelPipelineByIdResponses, type PostProcessingClearPipelineByIdData, type PostProcessingClearPipelineByIdError, type PostProcessingClearPipelineByIdErrors, type PostProcessingClearPipelineByIdResponses, type PostProcessingCreatePipelineData, type PostProcessingCreatePipelineError, type PostProcessingCreatePipelineErrors, type PostProcessingCreatePipelineResponse, type PostProcessingCreatePipelineResponses, type PostProcessingProcessPipelineByIdData, type PostProcessingProcessPipelineByIdError, type PostProcessingProcessPipelineByIdErrors, type PostProcessingProcessPipelineByIdResponse, type PostProcessingProcessPipelineByIdResponses, type PostProcessingProcessQueueByKeyData, type PostProcessingProcessQueueByKeyError, type PostProcessingProcessQueueByKeyErrors, type PostProcessingProcessQueueByKeyResponse, type PostProcessingProcessQueueByKeyResponses, type PostProcessingReattachPipelineByIdData, type PostProcessingReattachPipelineByIdError, type PostProcessingReattachPipelineByIdErrors, type PostProcessingReattachPipelineByIdResponse, type PostProcessingReattachPipelineByIdResponses, type PostProcessingStartPipelineData, type PostProcessingStartPipelineError, type PostProcessingStartPipelineErrors, type PostProcessingStartPipelineResponse, type PostProcessingStartPipelineResponses, type PostProcessingUpdatePipelineByIdData, type PostProcessingUpdatePipelineByIdError, type PostProcessingUpdatePipelineByIdErrors, type PostProcessingUpdatePipelineByIdResponse, type PostProcessingUpdatePipelineByIdResponses, type ProblemDetails, type ProcessingErrorDetails, type ProcessingOptions, type ProcessingOptionsResults, type ProcessingRequest, type ProcessingRequestAction, type ProcessingResults, type ProgressInformation, type QueuedItem, type SamplePipeline, type SamplePipelineOptions, type SamplePipelineState, type StepInfo, StepStatus } from './types.gen';
@@ -13,26 +13,26 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
13
13
  */
14
14
  meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
15
15
  };
16
- export declare const postProcessingCancelPipelineById: <ThrowOnError extends boolean = true>(options: Options<PostProcessingCancelPipelineByIdData, ThrowOnError>) => RequestResult<PostProcessingCancelPipelineByIdResponses, PostProcessingCancelPipelineByIdErrors, ThrowOnError>;
17
- export declare const postProcessingClearPipelineById: <ThrowOnError extends boolean = true>(options: Options<PostProcessingClearPipelineByIdData, ThrowOnError>) => RequestResult<PostProcessingClearPipelineByIdResponses, PostProcessingClearPipelineByIdErrors, ThrowOnError>;
18
- export declare const postProcessingCreatePipeline: <ThrowOnError extends boolean = true>(options: Options<PostProcessingCreatePipelineData, ThrowOnError>) => RequestResult<PostProcessingCreatePipelineResponses, PostProcessingCreatePipelineErrors, ThrowOnError>;
19
- export declare const getProcessingGetPipelineById: <ThrowOnError extends boolean = true>(options: Options<GetProcessingGetPipelineByIdData, ThrowOnError>) => RequestResult<GetProcessingGetPipelineByIdResponses, GetProcessingGetPipelineByIdErrors, ThrowOnError>;
20
- export declare const getProcessingGetProcessors: <ThrowOnError extends boolean = true>(options?: Options<GetProcessingGetProcessorsData, ThrowOnError>) => RequestResult<GetProcessingGetProcessorsResponses, GetProcessingGetProcessorsErrors, ThrowOnError>;
21
- export declare const getProcessingGetResultsById: <ThrowOnError extends boolean = true>(options: Options<GetProcessingGetResultsByIdData, ThrowOnError>) => RequestResult<GetProcessingGetResultsByIdResponses, GetProcessingGetResultsByIdErrors, ThrowOnError>;
22
- export declare const getProcessingListPipelinesByStatus: <ThrowOnError extends boolean = true>(options: Options<GetProcessingListPipelinesByStatusData, ThrowOnError>) => RequestResult<GetProcessingListPipelinesByStatusResponses, GetProcessingListPipelinesByStatusErrors, ThrowOnError>;
23
- export declare const getProcessingListPipelinesByStrategyByStrategyByStatus: <ThrowOnError extends boolean = true>(options: Options<GetProcessingListPipelinesByStrategyByStrategyByStatusData, ThrowOnError>) => RequestResult<GetProcessingListPipelinesByStrategyByStrategyByStatusResponses, GetProcessingListPipelinesByStrategyByStrategyByStatusErrors, ThrowOnError>;
24
- export declare const getProcessingPipelineStatusById: <ThrowOnError extends boolean = true>(options: Options<GetProcessingPipelineStatusByIdData, ThrowOnError>) => RequestResult<GetProcessingPipelineStatusByIdResponses, GetProcessingPipelineStatusByIdErrors, ThrowOnError>;
25
- export declare const postProcessingProcessPipelineById: <ThrowOnError extends boolean = true>(options: Options<PostProcessingProcessPipelineByIdData, ThrowOnError>) => RequestResult<PostProcessingProcessPipelineByIdResponses, PostProcessingProcessPipelineByIdErrors, ThrowOnError>;
26
- export declare const postProcessingReattachPipelineById: <ThrowOnError extends boolean = true>(options: Options<PostProcessingReattachPipelineByIdData, ThrowOnError>) => RequestResult<PostProcessingReattachPipelineByIdResponses, PostProcessingReattachPipelineByIdErrors, ThrowOnError>;
27
- export declare const postProcessingStartPipeline: <ThrowOnError extends boolean = true>(options: Options<PostProcessingStartPipelineData, ThrowOnError>) => RequestResult<PostProcessingStartPipelineResponses, PostProcessingStartPipelineErrors, ThrowOnError>;
28
- export declare const postProcessingUpdatePipelineById: <ThrowOnError extends boolean = true>(options: Options<PostProcessingUpdatePipelineByIdData, ThrowOnError>) => RequestResult<PostProcessingUpdatePipelineByIdResponses, PostProcessingUpdatePipelineByIdErrors, ThrowOnError>;
29
- export declare const deleteProcessingDeleteQueueByKey: <ThrowOnError extends boolean = true>(options: Options<DeleteProcessingDeleteQueueByKeyData, ThrowOnError>) => RequestResult<DeleteProcessingDeleteQueueByKeyResponses, DeleteProcessingDeleteQueueByKeyErrors, ThrowOnError>;
30
- export declare const getProcessingListQueue: <ThrowOnError extends boolean = true>(options?: Options<GetProcessingListQueueData, ThrowOnError>) => RequestResult<GetProcessingListQueueResponses, GetProcessingListQueueErrors, ThrowOnError>;
16
+ export declare const postProcessingCancelPipelineById: <ThrowOnError extends boolean = false>(options: Options<PostProcessingCancelPipelineByIdData, ThrowOnError>) => RequestResult<PostProcessingCancelPipelineByIdResponses, PostProcessingCancelPipelineByIdErrors, ThrowOnError>;
17
+ export declare const postProcessingClearPipelineById: <ThrowOnError extends boolean = false>(options: Options<PostProcessingClearPipelineByIdData, ThrowOnError>) => RequestResult<PostProcessingClearPipelineByIdResponses, PostProcessingClearPipelineByIdErrors, ThrowOnError>;
18
+ export declare const postProcessingCreatePipeline: <ThrowOnError extends boolean = false>(options: Options<PostProcessingCreatePipelineData, ThrowOnError>) => RequestResult<PostProcessingCreatePipelineResponses, PostProcessingCreatePipelineErrors, ThrowOnError>;
19
+ export declare const getProcessingGetPipelineById: <ThrowOnError extends boolean = false>(options: Options<GetProcessingGetPipelineByIdData, ThrowOnError>) => RequestResult<GetProcessingGetPipelineByIdResponses, GetProcessingGetPipelineByIdErrors, ThrowOnError>;
20
+ export declare const getProcessingGetProcessors: <ThrowOnError extends boolean = false>(options?: Options<GetProcessingGetProcessorsData, ThrowOnError>) => RequestResult<GetProcessingGetProcessorsResponses, GetProcessingGetProcessorsErrors, ThrowOnError>;
21
+ export declare const getProcessingGetResultsById: <ThrowOnError extends boolean = false>(options: Options<GetProcessingGetResultsByIdData, ThrowOnError>) => RequestResult<GetProcessingGetResultsByIdResponses, GetProcessingGetResultsByIdErrors, ThrowOnError>;
22
+ export declare const getProcessingListPipelinesByStatus: <ThrowOnError extends boolean = false>(options: Options<GetProcessingListPipelinesByStatusData, ThrowOnError>) => RequestResult<GetProcessingListPipelinesByStatusResponses, GetProcessingListPipelinesByStatusErrors, ThrowOnError>;
23
+ export declare const getProcessingListPipelinesByStrategyByStrategyByStatus: <ThrowOnError extends boolean = false>(options: Options<GetProcessingListPipelinesByStrategyByStrategyByStatusData, ThrowOnError>) => RequestResult<GetProcessingListPipelinesByStrategyByStrategyByStatusResponses, GetProcessingListPipelinesByStrategyByStrategyByStatusErrors, ThrowOnError>;
24
+ export declare const getProcessingPipelineStatusById: <ThrowOnError extends boolean = false>(options: Options<GetProcessingPipelineStatusByIdData, ThrowOnError>) => RequestResult<GetProcessingPipelineStatusByIdResponses, GetProcessingPipelineStatusByIdErrors, ThrowOnError>;
25
+ export declare const postProcessingProcessPipelineById: <ThrowOnError extends boolean = false>(options: Options<PostProcessingProcessPipelineByIdData, ThrowOnError>) => RequestResult<PostProcessingProcessPipelineByIdResponses, PostProcessingProcessPipelineByIdErrors, ThrowOnError>;
26
+ export declare const postProcessingReattachPipelineById: <ThrowOnError extends boolean = false>(options: Options<PostProcessingReattachPipelineByIdData, ThrowOnError>) => RequestResult<PostProcessingReattachPipelineByIdResponses, PostProcessingReattachPipelineByIdErrors, ThrowOnError>;
27
+ export declare const postProcessingStartPipeline: <ThrowOnError extends boolean = false>(options: Options<PostProcessingStartPipelineData, ThrowOnError>) => RequestResult<PostProcessingStartPipelineResponses, PostProcessingStartPipelineErrors, ThrowOnError>;
28
+ export declare const postProcessingUpdatePipelineById: <ThrowOnError extends boolean = false>(options: Options<PostProcessingUpdatePipelineByIdData, ThrowOnError>) => RequestResult<PostProcessingUpdatePipelineByIdResponses, PostProcessingUpdatePipelineByIdErrors, ThrowOnError>;
29
+ export declare const deleteProcessingDeleteQueueByKey: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessingDeleteQueueByKeyData, ThrowOnError>) => RequestResult<DeleteProcessingDeleteQueueByKeyResponses, DeleteProcessingDeleteQueueByKeyErrors, ThrowOnError>;
30
+ export declare const getProcessingListQueue: <ThrowOnError extends boolean = false>(options?: Options<GetProcessingListQueueData, ThrowOnError>) => RequestResult<GetProcessingListQueueResponses, GetProcessingListQueueErrors, ThrowOnError>;
31
31
  /**
32
32
  * Peek an item from the queue
33
33
  */
34
- export declare const getProcessingPeekItem: <ThrowOnError extends boolean = true>(options?: Options<GetProcessingPeekItemData, ThrowOnError>) => RequestResult<GetProcessingPeekItemResponses, GetProcessingPeekItemErrors, ThrowOnError>;
34
+ export declare const getProcessingPeekItem: <ThrowOnError extends boolean = false>(options?: Options<GetProcessingPeekItemData, ThrowOnError>) => RequestResult<GetProcessingPeekItemResponses, GetProcessingPeekItemErrors, ThrowOnError>;
35
35
  /**
36
36
  * Takes an item off the queue, removes the schedule date and puts it back
37
37
  */
38
- export declare const postProcessingProcessQueueByKey: <ThrowOnError extends boolean = true>(options: Options<PostProcessingProcessQueueByKeyData, ThrowOnError>) => RequestResult<PostProcessingProcessQueueByKeyResponses, PostProcessingProcessQueueByKeyErrors, ThrowOnError>;
38
+ export declare const postProcessingProcessQueueByKey: <ThrowOnError extends boolean = false>(options: Options<PostProcessingProcessQueueByKeyData, ThrowOnError>) => RequestResult<PostProcessingProcessQueueByKeyResponses, PostProcessingProcessQueueByKeyErrors, ThrowOnError>;
@@ -205,6 +205,141 @@ export type QueuedItem = {
205
205
  ownerNode?: null | string;
206
206
  ownerHeartbeat?: null | string;
207
207
  };
208
+ export type SamplePipeline = {
209
+ sampleCounter: number;
210
+ requires: Array<string>;
211
+ id: string;
212
+ alias: string;
213
+ strategy: string;
214
+ state: {
215
+ childPipeline?: null | string;
216
+ elementName?: null | string;
217
+ status: 'NotStarted' | 'Running' | 'Background' | 'Waiting' | 'Scheduled' | 'Completed' | 'Failed' | 'Cancelled';
218
+ progress: {
219
+ isLastAction: boolean;
220
+ steps: Array<{
221
+ icon: string;
222
+ name: string;
223
+ status: 'None' | 'Running' | 'Complete' | 'Error';
224
+ }>;
225
+ progress: number;
226
+ };
227
+ currentRequest?: {
228
+ id: string;
229
+ clientId?: null | string;
230
+ isBackgroundRequest: boolean;
231
+ strategy: string;
232
+ action?: {
233
+ alias: string;
234
+ stepAlias?: null | string;
235
+ page: number;
236
+ pageSize: number;
237
+ subStep?: null | string;
238
+ element?: null | string;
239
+ waitOnAction: boolean;
240
+ };
241
+ user?: null | string;
242
+ title?: null | string;
243
+ source?: null | string;
244
+ options: {
245
+ [key: string]: unknown;
246
+ };
247
+ };
248
+ schedule?: null | string;
249
+ backgroundState?: {
250
+ isBackgroundRequest: boolean;
251
+ backgroundElement?: null | string;
252
+ completedElement?: null | string;
253
+ failedElement?: null | string;
254
+ clientId?: null | string;
255
+ };
256
+ isChildPipeline: boolean;
257
+ cancelRequested: boolean;
258
+ concurrencyKey?: null | string;
259
+ userKey?: null | string;
260
+ created?: null | string;
261
+ modified?: null | string;
262
+ };
263
+ options: {
264
+ extensions: {
265
+ [key: string]: unknown;
266
+ };
267
+ };
268
+ results?: {
269
+ results: {
270
+ [key: string]: unknown;
271
+ };
272
+ error?: {
273
+ source: string;
274
+ strategy: string;
275
+ message: string;
276
+ action: string;
277
+ step?: null | string;
278
+ page: number;
279
+ subStep?: null | string;
280
+ key: string;
281
+ className?: null | string;
282
+ methodName?: null | string;
283
+ stackTrace?: null | string;
284
+ };
285
+ };
286
+ };
287
+ export type SamplePipelineOptions = {
288
+ sampleOptionCounter: number;
289
+ something?: null | string;
290
+ };
291
+ export type SamplePipelineState = {
292
+ results: {
293
+ [key: string]: unknown;
294
+ };
295
+ status: 'NotStarted' | 'Running' | 'Background' | 'Waiting' | 'Scheduled' | 'Completed' | 'Failed' | 'Cancelled';
296
+ childPipeline?: null | string;
297
+ elementName?: null | string;
298
+ currentRequest?: {
299
+ id: string;
300
+ clientId?: null | string;
301
+ isBackgroundRequest: boolean;
302
+ strategy: string;
303
+ action?: {
304
+ alias: string;
305
+ stepAlias?: null | string;
306
+ page: number;
307
+ pageSize: number;
308
+ subStep?: null | string;
309
+ element?: null | string;
310
+ waitOnAction: boolean;
311
+ };
312
+ user?: null | string;
313
+ title?: null | string;
314
+ source?: null | string;
315
+ options: {
316
+ [key: string]: unknown;
317
+ };
318
+ };
319
+ progress: {
320
+ isLastAction: boolean;
321
+ steps: Array<{
322
+ icon: string;
323
+ name: string;
324
+ status: 'None' | 'Running' | 'Complete' | 'Error';
325
+ }>;
326
+ progress: number;
327
+ };
328
+ schedule?: null | string;
329
+ backgroundState?: {
330
+ isBackgroundRequest: boolean;
331
+ backgroundElement?: null | string;
332
+ completedElement?: null | string;
333
+ failedElement?: null | string;
334
+ clientId?: null | string;
335
+ };
336
+ isChildPipeline: boolean;
337
+ cancelRequested: boolean;
338
+ concurrencyKey?: null | string;
339
+ userKey?: null | string;
340
+ created?: null | string;
341
+ modified?: null | string;
342
+ };
208
343
  export type StepInfo = {
209
344
  icon: string;
210
345
  name: string;
@@ -23,8 +23,8 @@ export declare class PipelineContext extends UmbControllerBase {
23
23
  private isState;
24
24
  createPipeline(processor: string, strategy: string, options: ProcessingOptions | undefined): Promise<void>;
25
25
  loadPipeline(id: string): Promise<void>;
26
- getPipeline(id: string): Promise<import("@jumoo/processing").Pipeline>;
27
- fetchPipeline(id: string): Promise<import("@jumoo/processing").Pipeline>;
26
+ getPipeline(id: string): Promise<import("@jumoo/processing").Pipeline | undefined>;
27
+ fetchPipeline(id: string): Promise<import("@jumoo/processing").Pipeline | undefined>;
28
28
  process(): Promise<import("@jumoo/processing").Pipeline | undefined>;
29
29
  updateOptions(options: ProcessingOptions): Promise<void>;
30
30
  setOption(value: Record<string, unknown>): Promise<void>;
@@ -9,10 +9,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
9
9
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
- var _PipelineContext_instances, _PipelineContext_repository, _PipelineContext_hubContext, _PipelineContext_pipeline, _PipelineContext_state, _PipelineContext_options, _PipelineContext_results, _PipelineContext_message, _PipelineContext_backgroundState, _PipelineContext_conflict, _PipelineContext_clientId, _PipelineContext_hasConnectedBefore, _PipelineContext_onClientIdChanged, _PipelineContext_isInFlight, _PipelineContext_setConflict, _PipelineContext_trigger, _PipelineContext_close, _PipelineContext_finalized, _PipelineContext_valid, _PipelineContext_pending;
12
+ var _PipelineContext_instances, _PipelineContext_repository, _PipelineContext_hubContext, _PipelineContext_pipeline, _PipelineContext_state, _PipelineContext_options, _PipelineContext_results, _PipelineContext_message, _PipelineContext_backgroundState, _PipelineContext_conflict, _PipelineContext_clientId, _PipelineContext_hasConnectedBefore, _PipelineContext_onClientIdChanged, _PipelineContext_isInFlight, _PipelineContext_setConflict, _PipelineContext_retryAfterSignIn, _PipelineContext_waitForSignIn, _PipelineContext_trigger, _PipelineContext_close, _PipelineContext_finalized, _PipelineContext_valid, _PipelineContext_pending;
13
13
  import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
14
14
  import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
15
15
  import { UmbBooleanState, UmbObjectState } from '@umbraco-cms/backoffice/observable-api';
16
+ import { UMB_AUTH_CONTEXT } from '@umbraco-cms/backoffice/auth';
17
+ import { UmbApiError } from '@umbraco-cms/backoffice/resources';
18
+ import { filter, firstValueFrom } from '@umbraco-cms/backoffice/external/rxjs';
16
19
  import { PipelineStatus, PipelineRepository, ProcessingSignalRContext, getPipelineConflict, } from '@jumoo/processing';
17
20
  /**
18
21
  * @description context for keeping pipeline status and progress as we do things.
@@ -65,8 +68,7 @@ export class PipelineContext extends UmbControllerBase {
65
68
  __classPrivateFieldSet(this, _PipelineContext_repository, new PipelineRepository(this), "f");
66
69
  this.provideContext(JUMOO_PROCESSING_CONTEXT, this);
67
70
  __classPrivateFieldSet(this, _PipelineContext_hubContext, new ProcessingSignalRContext(this), "f");
68
- const token = '[redacted]';
69
- __classPrivateFieldGet(this, _PipelineContext_hubContext, "f").startHub(token, ['message', 'state']);
71
+ __classPrivateFieldGet(this, _PipelineContext_hubContext, "f").startHub(['message', 'state']);
70
72
  this.observe(__classPrivateFieldGet(this, _PipelineContext_hubContext, "f").messagesOf('message'), (message) => {
71
73
  if (!message?.message)
72
74
  return;
@@ -93,7 +95,7 @@ export class PipelineContext extends UmbControllerBase {
93
95
  }
94
96
  async createPipeline(processor, strategy, options) {
95
97
  __classPrivateFieldGet(this, _PipelineContext_conflict, "f").setValue(undefined);
96
- const { data, error } = await __classPrivateFieldGet(this, _PipelineContext_repository, "f").tryCreate(processor, strategy, options);
98
+ const { data, error } = await __classPrivateFieldGet(this, _PipelineContext_instances, "m", _PipelineContext_retryAfterSignIn).call(this, () => __classPrivateFieldGet(this, _PipelineContext_repository, "f").tryCreate(processor, strategy, options));
97
99
  if (error) {
98
100
  await __classPrivateFieldGet(this, _PipelineContext_instances, "m", _PipelineContext_setConflict).call(this, error);
99
101
  return;
@@ -123,8 +125,10 @@ export class PipelineContext extends UmbControllerBase {
123
125
  async process() {
124
126
  if (!__classPrivateFieldGet(this, _PipelineContext_pipeline, "f").value)
125
127
  return;
126
- const clientId = __classPrivateFieldGet(this, _PipelineContext_hubContext, "f")?.getClientId() ?? null;
127
- const { data: response, error } = await __classPrivateFieldGet(this, _PipelineContext_repository, "f").tryProcess(__classPrivateFieldGet(this, _PipelineContext_pipeline, "f").value, clientId);
128
+ const pipelineId = __classPrivateFieldGet(this, _PipelineContext_pipeline, "f").value;
129
+ const { data: response, error } = await __classPrivateFieldGet(this, _PipelineContext_instances, "m", _PipelineContext_retryAfterSignIn).call(this, () =>
130
+ // the connection id is read each time: the hub can reconnect while the user signs in.
131
+ __classPrivateFieldGet(this, _PipelineContext_repository, "f").tryProcess(pipelineId, __classPrivateFieldGet(this, _PipelineContext_hubContext, "f")?.getClientId() ?? null));
128
132
  if (error) {
129
133
  await __classPrivateFieldGet(this, _PipelineContext_instances, "m", _PipelineContext_setConflict).call(this, error);
130
134
  return undefined;
@@ -143,7 +147,8 @@ export class PipelineContext extends UmbControllerBase {
143
147
  async updateOptions(options) {
144
148
  if (!__classPrivateFieldGet(this, _PipelineContext_pipeline, "f").value)
145
149
  return;
146
- const { data: response, error } = await __classPrivateFieldGet(this, _PipelineContext_repository, "f").tryUpdate(__classPrivateFieldGet(this, _PipelineContext_pipeline, "f").value, options);
150
+ const pipelineId = __classPrivateFieldGet(this, _PipelineContext_pipeline, "f").value;
151
+ const { data: response, error } = await __classPrivateFieldGet(this, _PipelineContext_instances, "m", _PipelineContext_retryAfterSignIn).call(this, () => __classPrivateFieldGet(this, _PipelineContext_repository, "f").tryUpdate(pipelineId, options));
147
152
  if (error)
148
153
  await __classPrivateFieldGet(this, _PipelineContext_instances, "m", _PipelineContext_setConflict).call(this, error);
149
154
  if (response?.options) {
@@ -157,7 +162,8 @@ export class PipelineContext extends UmbControllerBase {
157
162
  async saveOptions() {
158
163
  if (!__classPrivateFieldGet(this, _PipelineContext_pipeline, "f").value)
159
164
  return;
160
- const { data: response, error } = await __classPrivateFieldGet(this, _PipelineContext_repository, "f").tryUpdate(__classPrivateFieldGet(this, _PipelineContext_pipeline, "f").value, __classPrivateFieldGet(this, _PipelineContext_options, "f").value);
165
+ const pipelineId = __classPrivateFieldGet(this, _PipelineContext_pipeline, "f").value;
166
+ const { data: response, error } = await __classPrivateFieldGet(this, _PipelineContext_instances, "m", _PipelineContext_retryAfterSignIn).call(this, () => __classPrivateFieldGet(this, _PipelineContext_repository, "f").tryUpdate(pipelineId, __classPrivateFieldGet(this, _PipelineContext_options, "f").value));
161
167
  if (error)
162
168
  await __classPrivateFieldGet(this, _PipelineContext_instances, "m", _PipelineContext_setConflict).call(this, error);
163
169
  if (response?.options) {
@@ -290,6 +296,48 @@ async function _PipelineContext_setConflict(error) {
290
296
  if (holder)
291
297
  __classPrivateFieldGet(this, _PipelineContext_conflict, "f").setValue({ ...conflict, holder });
292
298
  return true;
299
+ }, _PipelineContext_retryAfterSignIn =
300
+ /**
301
+ * @description makes a create, update or process call, and makes it again if it hit a session
302
+ * timeout. From Umbraco 19 a 401 on a POST opens the login modal but, unlike a GET, the
303
+ * request is not retried - so a run would drop back to waiting mid-pipeline, or carry on with
304
+ * options that were never saved. The 401 comes from the auth middleware, before our
305
+ * controller runs, so once the user has signed back in it is safe to send the same call again.
306
+ * @param call the request, made again on each attempt.
307
+ * @returns the first result that isn't a 401.
308
+ */
309
+ async function _PipelineContext_retryAfterSignIn(call) {
310
+ let result = await call();
311
+ while (result.error && (await __classPrivateFieldGet(this, _PipelineContext_instances, "m", _PipelineContext_waitForSignIn).call(this, result.error))) {
312
+ result = await call();
313
+ }
314
+ return result;
315
+ }, _PipelineContext_waitForSignIn =
316
+ /**
317
+ * @description waits for the user to sign back in after a session timeout.
318
+ * @param error the error from a request.
319
+ * @returns true once the user has signed back in after a 401, false for any other error.
320
+ */
321
+ async function _PipelineContext_waitForSignIn(error) {
322
+ // the generated client doesn't throw, so this is usually the problem details themselves
323
+ // rather than an UmbApiError - check both, as getPipelineConflict does.
324
+ const status = UmbApiError.isUmbApiError(error)
325
+ ? error.status
326
+ : error?.status;
327
+ if (status !== 401)
328
+ return false;
329
+ const authContext = await this.getContext(UMB_AUTH_CONTEXT);
330
+ if (!authContext)
331
+ return false;
332
+ // the 401 clears the session, but the request can land before that does - so wait for
333
+ // the session to be gone and then back, rather than taking a still-signed-in value.
334
+ let signedOut = false;
335
+ await firstValueFrom(authContext.isAuthorized.pipe(filter((isAuthorized) => {
336
+ if (!isAuthorized)
337
+ signedOut = true;
338
+ return isAuthorized && signedOut;
339
+ })));
340
+ return true;
293
341
  };
294
342
  export default PipelineContext;
295
343
  export const JUMOO_PROCESSING_CONTEXT = new UmbContextToken('JumooPipelineContext');
@@ -8,39 +8,54 @@ export declare class PipelineRepository extends UmbControllerBase {
8
8
  private readonly source;
9
9
  constructor(host: UmbControllerHost);
10
10
  clear(id: string): Promise<unknown>;
11
- process(id: string, clientId: string | null): Promise<import("@jumoo/processing").Pipeline>;
12
- reattach(id: string, clientId: string | null): Promise<import("@jumoo/processing").Pipeline>;
13
- update(id: string, body: any): Promise<import("@jumoo/processing").ProcessingOptionsResults>;
14
- getProcessors(): Promise<string[]>;
15
- Get(id: string): Promise<import("@jumoo/processing").Pipeline>;
16
- create(processor: string, strategy: string, options: ProcessingOptions | undefined): Promise<string>;
11
+ process(id: string, clientId: string | null): Promise<import("@jumoo/processing").Pipeline | undefined>;
12
+ reattach(id: string, clientId: string | null): Promise<import("@jumoo/processing").Pipeline | undefined>;
13
+ update(id: string, body: any): Promise<import("@jumoo/processing").ProcessingOptionsResults | undefined>;
14
+ getProcessors(): Promise<string[] | undefined>;
15
+ Get(id: string): Promise<import("@jumoo/processing").Pipeline | undefined>;
16
+ create(processor: string, strategy: string, options: ProcessingOptions | undefined): Promise<string | undefined>;
17
17
  /**
18
18
  * @description create, returning the whole response rather than just the id, so the caller
19
19
  * can tell a 409 "already running" (see getPipelineConflict) from any other failure.
20
20
  */
21
- tryCreate(processor: string, strategy: string, options: ProcessingOptions | undefined): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
21
+ tryCreate(processor: string, strategy: string, options: ProcessingOptions | undefined): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
22
22
  data: string;
23
- request: Request;
24
- response: Response;
23
+ error: undefined;
24
+ } | {
25
+ data: undefined;
26
+ error: unknown;
27
+ }) & {
28
+ request?: Request;
29
+ response?: Response;
25
30
  }>>;
26
31
  /**
27
32
  * @description process, returning the whole response - see tryCreate.
28
33
  */
29
- tryProcess(id: string, clientId: string | null): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
34
+ tryProcess(id: string, clientId: string | null): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
30
35
  data: import("@jumoo/processing").Pipeline;
31
- request: Request;
32
- response: Response;
36
+ error: undefined;
37
+ } | {
38
+ data: undefined;
39
+ error: unknown;
40
+ }) & {
41
+ request?: Request;
42
+ response?: Response;
33
43
  }>>;
34
44
  /**
35
45
  * @description update, returning the whole response - see tryCreate.
36
46
  */
37
- tryUpdate(id: string, body: ProcessingOptions | undefined): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
47
+ tryUpdate(id: string, body: ProcessingOptions | undefined): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
38
48
  data: import("@jumoo/processing").ProcessingOptionsResults;
39
- request: Request;
40
- response: Response;
49
+ error: undefined;
50
+ } | {
51
+ data: undefined;
52
+ error: unknown;
53
+ }) & {
54
+ request?: Request;
55
+ response?: Response;
41
56
  }>>;
42
- getRunStatus(id: string): Promise<import("@jumoo/processing").PipelineRunStatus>;
57
+ getRunStatus(id: string): Promise<import("@jumoo/processing").PipelineRunStatus | undefined>;
43
58
  complete(id: string): Promise<void>;
44
- getResults(id: string): Promise<import("@jumoo/processing").ProcessingResults>;
45
- listPipelines(status: PipelineStatus): Promise<import("@jumoo/processing").Pipeline[]>;
59
+ getResults(id: string): Promise<import("@jumoo/processing").ProcessingResults | undefined>;
60
+ listPipelines(status: PipelineStatus): Promise<import("@jumoo/processing").Pipeline[] | undefined>;
46
61
  }
@@ -7,10 +7,15 @@ export declare class PipelineSource {
7
7
  * @description a 409 (another pipeline holds this one's concurrency key, so it can't resume)
8
8
  * is returned as the error without a notification - see getPipelineConflict.
9
9
  */
10
- process(id: string, clientId: string | null): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
10
+ process(id: string, clientId: string | null): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
11
11
  data: import("..").Pipeline;
12
- request: Request;
13
- response: Response;
12
+ error: undefined;
13
+ } | {
14
+ data: undefined;
15
+ error: unknown;
16
+ }) & {
17
+ request?: Request;
18
+ response?: Response;
14
19
  }>>;
15
20
  /**
16
21
  * @description re-registers a client id against a pipeline already running in the
@@ -18,34 +23,54 @@ export declare class PipelineSource {
18
23
  * returns the full, current pipeline so the caller can resync rather than trust whatever it
19
24
  * last saw down the old, now-dead connection.
20
25
  */
21
- reattach(id: string, clientId: string | null): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
26
+ reattach(id: string, clientId: string | null): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
22
27
  data: import("..").Pipeline;
23
- request: Request;
24
- response: Response;
28
+ error: undefined;
29
+ } | {
30
+ data: undefined;
31
+ error: unknown;
32
+ }) & {
33
+ request?: Request;
34
+ response?: Response;
25
35
  }>>;
26
36
  /**
27
37
  * @description a 409 (the new options' concurrency key is held) is returned as the error
28
38
  * without a notification - see getPipelineConflict.
29
39
  */
30
- update(id: string, body: any): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
40
+ update(id: string, body: any): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
31
41
  data: import("..").ProcessingOptionsResults;
32
- request: Request;
33
- response: Response;
42
+ error: undefined;
43
+ } | {
44
+ data: undefined;
45
+ error: unknown;
46
+ }) & {
47
+ request?: Request;
48
+ response?: Response;
34
49
  }>>;
35
- getProcessors(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
50
+ getProcessors(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
36
51
  data: string[];
37
- request: Request;
38
- response: Response;
52
+ error: undefined;
53
+ } | {
54
+ data: undefined;
55
+ error: unknown;
56
+ }) & {
57
+ request?: Request;
58
+ response?: Response;
39
59
  }>>;
40
60
  /**
41
61
  *
42
62
  * @param id guid id of the pipeline to retrieve
43
63
  * @returns pipeline
44
64
  */
45
- Get(id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
65
+ Get(id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
46
66
  data: import("..").Pipeline;
47
- request: Request;
48
- response: Response;
67
+ error: undefined;
68
+ } | {
69
+ data: undefined;
70
+ error: unknown;
71
+ }) & {
72
+ request?: Request;
73
+ response?: Response;
49
74
  }>>;
50
75
  /**
51
76
  *
@@ -53,42 +78,67 @@ export declare class PipelineSource {
53
78
  * @returns the new pipeline's id. A 409 (another pipeline holds its concurrency key) is
54
79
  * returned as the error without a notification - see getPipelineConflict.
55
80
  */
56
- create(processor: string, strategy: string, options: any): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
81
+ create(processor: string, strategy: string, options: any): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
57
82
  data: string;
58
- request: Request;
59
- response: Response;
83
+ error: undefined;
84
+ } | {
85
+ data: undefined;
86
+ error: unknown;
87
+ }) & {
88
+ request?: Request;
89
+ response?: Response;
60
90
  }>>;
61
91
  /**
62
92
  *
63
93
  * @param id guid id of the pipeline to remove
64
94
  * @returns nothing.
65
95
  */
66
- clear(id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
96
+ clear(id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
67
97
  data: unknown;
68
- request: Request;
69
- response: Response;
98
+ error: undefined;
99
+ } | {
100
+ data: undefined;
101
+ error: unknown;
102
+ }) & {
103
+ request?: Request;
104
+ response?: Response;
70
105
  }>>;
71
106
  /**
72
107
  * @param id guid id of the pipeline to retrieve results for
73
108
  * @returns results (if there are any) for the pipeline
74
109
  */
75
- getResults(id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
110
+ getResults(id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
76
111
  data: import("..").ProcessingResults;
77
- request: Request;
78
- response: Response;
112
+ error: undefined;
113
+ } | {
114
+ data: undefined;
115
+ error: unknown;
116
+ }) & {
117
+ request?: Request;
118
+ response?: Response;
79
119
  }>>;
80
120
  /**
81
121
  * @param id guid id of the pipeline
82
122
  * @returns its run status, or an error (without a notification) if the user can't see it.
83
123
  */
84
- getRunStatus(id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
124
+ getRunStatus(id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
85
125
  data: import("..").PipelineRunStatus;
86
- request: Request;
87
- response: Response;
126
+ error: undefined;
127
+ } | {
128
+ data: undefined;
129
+ error: unknown;
130
+ }) & {
131
+ request?: Request;
132
+ response?: Response;
88
133
  }>>;
89
- listPiplelines(status: PipelineStatus): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
134
+ listPiplelines(status: PipelineStatus): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
90
135
  data: import("..").Pipeline[];
91
- request: Request;
92
- response: Response;
136
+ error: undefined;
137
+ } | {
138
+ data: undefined;
139
+ error: unknown;
140
+ }) & {
141
+ request?: Request;
142
+ response?: Response;
93
143
  }>>;
94
144
  }
@@ -5,7 +5,7 @@ import { PipelineStatus } from '../api';
5
5
  export declare class PipelinesContext extends UmbControllerBase {
6
6
  #private;
7
7
  constructor(host: UmbControllerHost);
8
- listPipelines(status: PipelineStatus): Promise<import("..").Pipeline[]>;
8
+ listPipelines(status: PipelineStatus): Promise<import("..").Pipeline[] | undefined>;
9
9
  clear(id: string): Promise<unknown>;
10
10
  }
11
11
  export default PipelinesContext;
@@ -6,7 +6,7 @@ export declare class QueueContext extends UmbControllerBase {
6
6
  #private;
7
7
  constructor(host: UmbControllerHost);
8
8
  readonly queue: import("rxjs").Observable<PagedModelQueuedItemModel | undefined>;
9
- loadQueue(): Promise<PagedModelQueuedItemModel>;
9
+ loadQueue(): Promise<PagedModelQueuedItemModel | undefined>;
10
10
  process(key: string): Promise<void>;
11
11
  }
12
12
  export default QueueContext;
@@ -24,9 +24,7 @@ export class QueueContext extends UmbControllerBase {
24
24
  }
25
25
  async loadQueue() {
26
26
  const queue = await __classPrivateFieldGet(this, _QueueContext_repository, "f").list();
27
- // undefined means the request failed, so keep the last list rather than clearing it.
28
- if (queue)
29
- __classPrivateFieldGet(this, _QueueContext_queue, "f").setValue(queue);
27
+ __classPrivateFieldGet(this, _QueueContext_queue, "f").setValue(queue);
30
28
  return queue;
31
29
  }
32
30
  async process(key) {
@@ -2,9 +2,9 @@ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
2
2
  import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
3
3
  export declare class QueueRepository extends UmbControllerBase {
4
4
  constructor(host: UmbControllerHost);
5
- list(): Promise<import("..").PagedModelQueuedItemModel>;
6
- peek(key: string): Promise<import("..").PagedModelQueuedItemModel>;
5
+ list(): Promise<import("..").PagedModelQueuedItemModel | undefined>;
6
+ peek(key: string): Promise<import("..").PagedModelQueuedItemModel | undefined>;
7
7
  delete(key: string): Promise<unknown>;
8
- process(key: string): Promise<import("..").QueuedItem>;
8
+ process(key: string): Promise<import("..").QueuedItem | undefined>;
9
9
  }
10
10
  export default QueueRepository;
@@ -1,33 +1,32 @@
1
1
  import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
2
- import { tryExecute } from '@umbraco-cms/backoffice/resources';
3
2
  import { deleteProcessingDeleteQueueByKey, getProcessingListQueue, getProcessingPeekItem, postProcessingProcessQueueByKey, } from '../api';
4
3
  export class QueueRepository extends UmbControllerBase {
5
4
  constructor(host) {
6
5
  super(host);
7
6
  }
8
7
  async list() {
9
- return (await tryExecute(this, getProcessingListQueue())).data;
8
+ return (await getProcessingListQueue()).data;
10
9
  }
11
10
  async peek(key) {
12
- return (await tryExecute(this, getProcessingPeekItem({
11
+ return (await getProcessingPeekItem({
13
12
  query: {
14
13
  key: key,
15
14
  },
16
- }))).data;
15
+ })).data;
17
16
  }
18
17
  async delete(key) {
19
- return (await tryExecute(this, deleteProcessingDeleteQueueByKey({
18
+ return (await deleteProcessingDeleteQueueByKey({
20
19
  path: {
21
20
  key: key,
22
21
  },
23
- }))).data;
22
+ })).data;
24
23
  }
25
24
  async process(key) {
26
- return (await tryExecute(this, postProcessingProcessQueueByKey({
25
+ return (await postProcessingProcessQueueByKey({
27
26
  path: {
28
27
  key: key,
29
28
  },
30
- }))).data;
29
+ })).data;
31
30
  }
32
31
  }
33
32
  export default QueueRepository;
@@ -9,6 +9,15 @@ export declare class ProcessingSignalRContext extends UmbControllerBase {
9
9
  readonly message: import("rxjs").Observable<ProcessingHubMessage[]>;
10
10
  readonly clientId: import("rxjs").Observable<string | null>;
11
11
  readonly connectionState: import("rxjs").Observable<ProcessingConnectionState>;
12
+ /**
13
+ * @description connects to the processing hub. From Umbraco 19 the backoffice session is a
14
+ * cookie, so the connection sends that rather than a token.
15
+ */
16
+ startHub(methods: string[]): void;
17
+ /**
18
+ * @deprecated there is no client-side token from Umbraco 19 - call `startHub(methods)`. The
19
+ * token is ignored. Will be removed in v21.
20
+ */
12
21
  startHub(token: string, methods: string[]): void;
13
22
  hostConnected(): void;
14
23
  hostDisconnected(): void;
@@ -28,8 +28,9 @@ export class ProcessingSignalRContext extends UmbControllerBase {
28
28
  this.connectionState = __classPrivateFieldGet(this, _ProcessingSignalRContext_connectionState, "f").asObservable();
29
29
  this.provideContext(JUMOO_PROCESSING_SIGNALR_CONTEXT, this);
30
30
  }
31
- startHub(token, methods) {
32
- __classPrivateFieldGet(this, _ProcessingSignalRContext_instances, "m", _ProcessingSignalRContext_setupConnection).call(this, JUMOO_PROCESSING_HUB_PATH, token, methods);
31
+ startHub(tokenOrMethods, methods) {
32
+ const hubMethods = Array.isArray(tokenOrMethods) ? tokenOrMethods : (methods ?? []);
33
+ __classPrivateFieldGet(this, _ProcessingSignalRContext_instances, "m", _ProcessingSignalRContext_setupConnection).call(this, JUMOO_PROCESSING_HUB_PATH, hubMethods);
33
34
  }
34
35
  hostConnected() {
35
36
  super.hostConnected();
@@ -53,9 +54,11 @@ export class ProcessingSignalRContext extends UmbControllerBase {
53
54
  return __classPrivateFieldGet(this, _ProcessingSignalRContext_connection, "f")?.connectionId ?? null;
54
55
  }
55
56
  }
56
- _ProcessingSignalRContext_connection = new WeakMap(), _ProcessingSignalRContext_messages = new WeakMap(), _ProcessingSignalRContext_clientId = new WeakMap(), _ProcessingSignalRContext_connectionState = new WeakMap(), _ProcessingSignalRContext_instances = new WeakSet(), _ProcessingSignalRContext_setupConnection = function _ProcessingSignalRContext_setupConnection(url, token, methods) {
57
+ _ProcessingSignalRContext_connection = new WeakMap(), _ProcessingSignalRContext_messages = new WeakMap(), _ProcessingSignalRContext_clientId = new WeakMap(), _ProcessingSignalRContext_connectionState = new WeakMap(), _ProcessingSignalRContext_instances = new WeakSet(), _ProcessingSignalRContext_setupConnection = function _ProcessingSignalRContext_setupConnection(url, methods) {
58
+ // no accessTokenFactory: the backoffice auth cookie goes with the negotiate request and
59
+ // the websocket upgrade, which is how Umbraco's own server-event hub connects.
57
60
  __classPrivateFieldSet(this, _ProcessingSignalRContext_connection, new signalR.HubConnectionBuilder()
58
- .withUrl(url, { accessTokenFactory: () => token })
61
+ .withUrl(url)
59
62
  .withAutomaticReconnect([0, 2000, 10000, 30000])
60
63
  .configureLogging(signalR.LogLevel.None)
61
64
  .build(), "f");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jumoo/processing",
3
3
  "licence": "custom",
4
- "version": "18.3.2",
4
+ "version": "19.0.0-beta02",
5
5
  "type": "module",
6
6
  "description": "Jumoo processing library",
7
7
  "exports": {
@@ -40,7 +40,7 @@
40
40
  "@eslint/js": "^10.0.1",
41
41
  "@hey-api/openapi-ts": "^0.99.0",
42
42
  "@microsoft/signalr": "^10.0.0",
43
- "@umbraco-cms/backoffice": "18.0.1",
43
+ "@umbraco-cms/backoffice": "19.0.0-beta1",
44
44
  "chalk": "^6.0.1",
45
45
  "cross-env": "^10.1.0",
46
46
  "eslint": "^10.13.0",