@jumoo/processing 17.4.2

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.
Files changed (121) hide show
  1. package/dist/api/client/client.gen.d.ts +2 -0
  2. package/dist/api/client/client.gen.js +235 -0
  3. package/dist/api/client/index.d.ts +8 -0
  4. package/dist/api/client/index.js +6 -0
  5. package/dist/api/client/types.gen.d.ts +117 -0
  6. package/dist/api/client/types.gen.js +2 -0
  7. package/dist/api/client/utils.gen.d.ts +33 -0
  8. package/dist/api/client/utils.gen.js +230 -0
  9. package/dist/api/client.gen.d.ts +12 -0
  10. package/dist/api/client.gen.js +4 -0
  11. package/dist/api/core/auth.gen.d.ts +18 -0
  12. package/dist/api/core/auth.gen.js +14 -0
  13. package/dist/api/core/bodySerializer.gen.d.ts +25 -0
  14. package/dist/api/core/bodySerializer.gen.js +57 -0
  15. package/dist/api/core/params.gen.d.ts +43 -0
  16. package/dist/api/core/params.gen.js +100 -0
  17. package/dist/api/core/pathSerializer.gen.d.ts +33 -0
  18. package/dist/api/core/pathSerializer.gen.js +106 -0
  19. package/dist/api/core/queryKeySerializer.gen.d.ts +18 -0
  20. package/dist/api/core/queryKeySerializer.gen.js +92 -0
  21. package/dist/api/core/serverSentEvents.gen.d.ts +71 -0
  22. package/dist/api/core/serverSentEvents.gen.js +133 -0
  23. package/dist/api/core/types.gen.d.ts +78 -0
  24. package/dist/api/core/types.gen.js +2 -0
  25. package/dist/api/core/utils.gen.d.ts +19 -0
  26. package/dist/api/core/utils.gen.js +87 -0
  27. package/dist/api/index.d.ts +3 -0
  28. package/dist/api/index.js +4 -0
  29. package/dist/api/sdk.gen.d.ts +39 -0
  30. package/dist/api/sdk.gen.js +118 -0
  31. package/dist/api/types.gen.d.ts +547 -0
  32. package/dist/api/types.gen.js +18 -0
  33. package/dist/constants.d.ts +1 -0
  34. package/dist/constants.js +8 -0
  35. package/dist/exports.d.ts +6 -0
  36. package/dist/exports.js +6 -0
  37. package/dist/external/signalr/index.d.ts +4 -0
  38. package/dist/external/signalr/index.js +4 -0
  39. package/dist/hey-api.d.ts +11 -0
  40. package/dist/hey-api.js +14 -0
  41. package/dist/index.d.ts +8 -0
  42. package/dist/index.js +12 -0
  43. package/dist/lang/files/en.d.ts +22 -0
  44. package/dist/lang/files/en.js +21 -0
  45. package/dist/lang/manifest.d.ts +1 -0
  46. package/dist/lang/manifest.js +11 -0
  47. package/dist/pipeline/components/background.element.d.ts +23 -0
  48. package/dist/pipeline/components/background.element.js +88 -0
  49. package/dist/pipeline/components/index.d.ts +6 -0
  50. package/dist/pipeline/components/index.js +6 -0
  51. package/dist/pipeline/components/pipeline-list.element.d.ts +32 -0
  52. package/dist/pipeline/components/pipeline-list.element.js +178 -0
  53. package/dist/pipeline/components/pipeline-table.element.d.ts +19 -0
  54. package/dist/pipeline/components/pipeline-table.element.js +149 -0
  55. package/dist/pipeline/components/process-error.element.d.ts +16 -0
  56. package/dist/pipeline/components/process-error.element.js +93 -0
  57. package/dist/pipeline/components/progress.element.d.ts +14 -0
  58. package/dist/pipeline/components/progress.element.js +177 -0
  59. package/dist/pipeline/components/progress.step.element.d.ts +15 -0
  60. package/dist/pipeline/components/progress.step.element.js +48 -0
  61. package/dist/pipeline/index.d.ts +8 -0
  62. package/dist/pipeline/index.js +8 -0
  63. package/dist/pipeline/modal/errors/error-modal.element.d.ts +13 -0
  64. package/dist/pipeline/modal/errors/error-modal.element.js +129 -0
  65. package/dist/pipeline/modal/errors/error-modal.token.d.ts +10 -0
  66. package/dist/pipeline/modal/errors/error-modal.token.js +8 -0
  67. package/dist/pipeline/modal/errors/index.d.ts +1 -0
  68. package/dist/pipeline/modal/errors/index.js +2 -0
  69. package/dist/pipeline/modal/errors/manifest.d.ts +1 -0
  70. package/dist/pipeline/modal/errors/manifest.js +7 -0
  71. package/dist/pipeline/modal/index.d.ts +2 -0
  72. package/dist/pipeline/modal/index.js +3 -0
  73. package/dist/pipeline/modal/manifest.d.ts +1 -0
  74. package/dist/pipeline/modal/manifest.js +8 -0
  75. package/dist/pipeline/modal/pipeline-modal.element.d.ts +20 -0
  76. package/dist/pipeline/modal/pipeline-modal.element.js +151 -0
  77. package/dist/pipeline/modal/pipeline-modal.token.d.ts +39 -0
  78. package/dist/pipeline/modal/pipeline-modal.token.js +38 -0
  79. package/dist/pipeline/pipeline.context.d.ts +53 -0
  80. package/dist/pipeline/pipeline.context.js +260 -0
  81. package/dist/pipeline/pipeline.element.d.ts +74 -0
  82. package/dist/pipeline/pipeline.element.js +260 -0
  83. package/dist/pipeline/pipeline.repository.d.ts +20 -0
  84. package/dist/pipeline/pipeline.repository.js +41 -0
  85. package/dist/pipeline/pipeline.source.d.ts +76 -0
  86. package/dist/pipeline/pipeline.source.js +79 -0
  87. package/dist/pipeline/pipelines.context.d.ts +12 -0
  88. package/dist/pipeline/pipelines.context.js +33 -0
  89. package/dist/pipeline/steps/index.d.ts +2 -0
  90. package/dist/pipeline/steps/index.js +2 -0
  91. package/dist/pipeline/steps/interfaces.d.ts +10 -0
  92. package/dist/pipeline/steps/interfaces.js +1 -0
  93. package/dist/pipeline/steps/models.d.ts +14 -0
  94. package/dist/pipeline/steps/models.js +24 -0
  95. package/dist/pipeline/workspace/manifest.d.ts +1 -0
  96. package/dist/pipeline/workspace/manifest.js +33 -0
  97. package/dist/pipeline/workspace/pipeline-workspace.context.d.ts +17 -0
  98. package/dist/pipeline/workspace/pipeline-workspace.context.js +58 -0
  99. package/dist/pipeline/workspace/pipeline-workspace.element.d.ts +6 -0
  100. package/dist/pipeline/workspace/pipeline-workspace.element.js +21 -0
  101. package/dist/pipeline/workspace/types.d.ts +6 -0
  102. package/dist/pipeline/workspace/types.js +10 -0
  103. package/dist/pipeline/workspace/views/default-pipeline-view.d.ts +20 -0
  104. package/dist/pipeline/workspace/views/default-pipeline-view.js +140 -0
  105. package/dist/queue/components/queue-list.element.d.ts +21 -0
  106. package/dist/queue/components/queue-list.element.js +72 -0
  107. package/dist/queue/components/queue-table.element.d.ts +24 -0
  108. package/dist/queue/components/queue-table.element.js +156 -0
  109. package/dist/queue/index.d.ts +3 -0
  110. package/dist/queue/index.js +3 -0
  111. package/dist/queue/queue.context.d.ts +13 -0
  112. package/dist/queue/queue.context.js +37 -0
  113. package/dist/queue/queue.repository.d.ts +10 -0
  114. package/dist/queue/queue.repository.js +32 -0
  115. package/dist/signalr/index.d.ts +2 -0
  116. package/dist/signalr/index.js +2 -0
  117. package/dist/signalr/signalr.context.d.ts +24 -0
  118. package/dist/signalr/signalr.context.js +99 -0
  119. package/dist/signalr/types.d.ts +12 -0
  120. package/dist/signalr/types.js +1 -0
  121. package/package.json +51 -0
@@ -0,0 +1,133 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) => {
3
+ let lastEventId;
4
+ const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
5
+ const createStream = async function* () {
6
+ let retryDelay = sseDefaultRetryDelay ?? 3000;
7
+ let attempt = 0;
8
+ const signal = options.signal ?? new AbortController().signal;
9
+ while (true) {
10
+ if (signal.aborted)
11
+ break;
12
+ attempt++;
13
+ const headers = options.headers instanceof Headers
14
+ ? options.headers
15
+ : new Headers(options.headers);
16
+ if (lastEventId !== undefined) {
17
+ headers.set('Last-Event-ID', lastEventId);
18
+ }
19
+ try {
20
+ const requestInit = {
21
+ redirect: 'follow',
22
+ ...options,
23
+ body: options.serializedBody,
24
+ headers,
25
+ signal,
26
+ };
27
+ let request = new Request(url, requestInit);
28
+ if (onRequest) {
29
+ request = await onRequest(url, requestInit);
30
+ }
31
+ // fetch must be assigned here, otherwise it would throw the error:
32
+ // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
33
+ const _fetch = options.fetch ?? globalThis.fetch;
34
+ const response = await _fetch(request);
35
+ if (!response.ok)
36
+ throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
37
+ if (!response.body)
38
+ throw new Error('No body in SSE response');
39
+ const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
40
+ let buffer = '';
41
+ const abortHandler = () => {
42
+ try {
43
+ reader.cancel();
44
+ }
45
+ catch {
46
+ // noop
47
+ }
48
+ };
49
+ signal.addEventListener('abort', abortHandler);
50
+ try {
51
+ while (true) {
52
+ const { done, value } = await reader.read();
53
+ if (done)
54
+ break;
55
+ buffer += value;
56
+ // Normalize line endings: CRLF -> LF, then CR -> LF
57
+ buffer = buffer.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
58
+ const chunks = buffer.split('\n\n');
59
+ buffer = chunks.pop() ?? '';
60
+ for (const chunk of chunks) {
61
+ const lines = chunk.split('\n');
62
+ const dataLines = [];
63
+ let eventName;
64
+ for (const line of lines) {
65
+ if (line.startsWith('data:')) {
66
+ dataLines.push(line.replace(/^data:\s*/, ''));
67
+ }
68
+ else if (line.startsWith('event:')) {
69
+ eventName = line.replace(/^event:\s*/, '');
70
+ }
71
+ else if (line.startsWith('id:')) {
72
+ lastEventId = line.replace(/^id:\s*/, '');
73
+ }
74
+ else if (line.startsWith('retry:')) {
75
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ''), 10);
76
+ if (!Number.isNaN(parsed)) {
77
+ retryDelay = parsed;
78
+ }
79
+ }
80
+ }
81
+ let data;
82
+ let parsedJson = false;
83
+ if (dataLines.length) {
84
+ const rawData = dataLines.join('\n');
85
+ try {
86
+ data = JSON.parse(rawData);
87
+ parsedJson = true;
88
+ }
89
+ catch {
90
+ data = rawData;
91
+ }
92
+ }
93
+ if (parsedJson) {
94
+ if (responseValidator) {
95
+ await responseValidator(data);
96
+ }
97
+ if (responseTransformer) {
98
+ data = await responseTransformer(data);
99
+ }
100
+ }
101
+ onSseEvent?.({
102
+ data,
103
+ event: eventName,
104
+ id: lastEventId,
105
+ retry: retryDelay,
106
+ });
107
+ if (dataLines.length) {
108
+ yield data;
109
+ }
110
+ }
111
+ }
112
+ }
113
+ finally {
114
+ signal.removeEventListener('abort', abortHandler);
115
+ reader.releaseLock();
116
+ }
117
+ break; // exit loop on normal completion
118
+ }
119
+ catch (error) {
120
+ // connection failed or aborted; retry after delay
121
+ onSseError?.(error);
122
+ if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
123
+ break; // stop after firing error
124
+ }
125
+ // exponential backoff: double retry each attempt, cap at 30s
126
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);
127
+ await sleep(backoff);
128
+ }
129
+ }
130
+ };
131
+ const stream = createStream();
132
+ return { stream };
133
+ };
@@ -0,0 +1,78 @@
1
+ import type { Auth, AuthToken } from './auth.gen';
2
+ import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';
3
+ export type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
4
+ export type Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
5
+ /**
6
+ * Returns the final request URL.
7
+ */
8
+ buildUrl: BuildUrlFn;
9
+ getConfig: () => Config;
10
+ request: RequestFn;
11
+ setConfig: (config: Config) => Config;
12
+ } & {
13
+ [K in HttpMethod]: MethodFn;
14
+ } & ([SseFn] extends [never] ? {
15
+ sse?: never;
16
+ } : {
17
+ sse: {
18
+ [K in HttpMethod]: SseFn;
19
+ };
20
+ });
21
+ export interface Config {
22
+ /**
23
+ * Auth token or a function returning auth token. The resolved value will be
24
+ * added to the request payload as defined by its `security` array.
25
+ */
26
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
27
+ /**
28
+ * A function for serializing request body parameter. By default,
29
+ * {@link JSON.stringify()} will be used.
30
+ */
31
+ bodySerializer?: BodySerializer | null;
32
+ /**
33
+ * An object containing any HTTP headers that you want to pre-populate your
34
+ * `Headers` object with.
35
+ *
36
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
37
+ */
38
+ headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
39
+ /**
40
+ * The request method.
41
+ *
42
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
43
+ */
44
+ method?: Uppercase<HttpMethod>;
45
+ /**
46
+ * A function for serializing request query parameters. By default, arrays
47
+ * will be exploded in form style, objects will be exploded in deepObject
48
+ * style, and reserved characters are percent-encoded.
49
+ *
50
+ * This method will have no effect if the native `paramsSerializer()` Axios
51
+ * API function is used.
52
+ *
53
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
54
+ */
55
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
56
+ /**
57
+ * A function validating request data. This is useful if you want to ensure
58
+ * the request conforms to the desired shape, so it can be safely sent to
59
+ * the server.
60
+ */
61
+ requestValidator?: (data: unknown) => Promise<unknown>;
62
+ /**
63
+ * A function transforming response data before it's returned. This is useful
64
+ * for post-processing data, e.g., converting ISO strings into Date objects.
65
+ */
66
+ responseTransformer?: (data: unknown) => Promise<unknown>;
67
+ /**
68
+ * A function validating response data. This is useful if you want to ensure
69
+ * the response conforms to the desired shape, so it can be safely passed to
70
+ * the transformers and returned to the user.
71
+ */
72
+ responseValidator?: (data: unknown) => Promise<unknown>;
73
+ }
74
+ type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never] ? true : [T] extends [never | undefined] ? [undefined] extends [T] ? false : true : false;
75
+ export type OmitNever<T extends Record<string, unknown>> = {
76
+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
77
+ };
78
+ export {};
@@ -0,0 +1,2 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { BodySerializer, QuerySerializer } from './bodySerializer.gen';
2
+ export interface PathSerializer {
3
+ path: Record<string, unknown>;
4
+ url: string;
5
+ }
6
+ export declare const PATH_PARAM_RE: RegExp;
7
+ export declare const defaultPathSerializer: ({ path, url: _url }: PathSerializer) => string;
8
+ export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
9
+ baseUrl?: string;
10
+ path?: Record<string, unknown>;
11
+ query?: Record<string, unknown>;
12
+ querySerializer: QuerySerializer;
13
+ url: string;
14
+ }) => string;
15
+ export declare function getValidRequestBody(options: {
16
+ body?: unknown;
17
+ bodySerializer?: BodySerializer | null;
18
+ serializedBody?: unknown;
19
+ }): unknown;
@@ -0,0 +1,87 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from './pathSerializer.gen';
3
+ export const PATH_PARAM_RE = /\{[^{}]+\}/g;
4
+ export const defaultPathSerializer = ({ path, url: _url }) => {
5
+ let url = _url;
6
+ const matches = _url.match(PATH_PARAM_RE);
7
+ if (matches) {
8
+ for (const match of matches) {
9
+ let explode = false;
10
+ let name = match.substring(1, match.length - 1);
11
+ let style = 'simple';
12
+ if (name.endsWith('*')) {
13
+ explode = true;
14
+ name = name.substring(0, name.length - 1);
15
+ }
16
+ if (name.startsWith('.')) {
17
+ name = name.substring(1);
18
+ style = 'label';
19
+ }
20
+ else if (name.startsWith(';')) {
21
+ name = name.substring(1);
22
+ style = 'matrix';
23
+ }
24
+ const value = path[name];
25
+ if (value === undefined || value === null) {
26
+ continue;
27
+ }
28
+ if (Array.isArray(value)) {
29
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
30
+ continue;
31
+ }
32
+ if (typeof value === 'object') {
33
+ url = url.replace(match, serializeObjectParam({
34
+ explode,
35
+ name,
36
+ style,
37
+ value: value,
38
+ valueOnly: true,
39
+ }));
40
+ continue;
41
+ }
42
+ if (style === 'matrix') {
43
+ url = url.replace(match, `;${serializePrimitiveParam({
44
+ name,
45
+ value: value,
46
+ })}`);
47
+ continue;
48
+ }
49
+ const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
50
+ url = url.replace(match, replaceValue);
51
+ }
52
+ }
53
+ return url;
54
+ };
55
+ export const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
56
+ const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
57
+ let url = (baseUrl ?? '') + pathUrl;
58
+ if (path) {
59
+ url = defaultPathSerializer({ path, url });
60
+ }
61
+ let search = query ? querySerializer(query) : '';
62
+ if (search.startsWith('?')) {
63
+ search = search.substring(1);
64
+ }
65
+ if (search) {
66
+ url += `?${search}`;
67
+ }
68
+ return url;
69
+ };
70
+ export function getValidRequestBody(options) {
71
+ const hasBody = options.body !== undefined;
72
+ const isSerializedBody = hasBody && options.bodySerializer;
73
+ if (isSerializedBody) {
74
+ if ('serializedBody' in options) {
75
+ const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== '';
76
+ return hasSerializedBody ? options.serializedBody : null;
77
+ }
78
+ // not all clients implement a serializedBody property (i.e., client-axios)
79
+ return options.body !== '' ? options.body : null;
80
+ }
81
+ // plain/text body
82
+ if (hasBody) {
83
+ return options.body;
84
+ }
85
+ // no body was provided
86
+ return undefined;
87
+ }
@@ -0,0 +1,3 @@
1
+ export { client, type CreateClientConfig } from './client.gen';
2
+ export { type Options, PipelinesService, QueuesService } from './sdk.gen';
3
+ export { type ClearPipelineData, type ClearPipelineError, type ClearPipelineErrors, type ClearPipelineResponses, type ClientOptions, type CreatePipelineData, type CreatePipelineError, type CreatePipelineErrors, type CreatePipelineResponse, type CreatePipelineResponses, type DeleteData, type DeleteError, type DeleteErrors, type DeleteResponses, type GetPipelineData, type GetPipelineError, type GetPipelineErrors, type GetPipelineResponse, type GetPipelineResponses, type GetProcessorsData, type GetProcessorsError, type GetProcessorsErrors, type GetProcessorsResponse, type GetProcessorsResponses, type GetResultsData, type GetResultsError, type GetResultsErrors, type GetResultsResponse, type GetResultsResponses, type ListPipelinesByStrategyData, type ListPipelinesByStrategyError, type ListPipelinesByStrategyErrors, type ListPipelinesByStrategyResponse, type ListPipelinesByStrategyResponses, type ListPipelinesData, type ListPipelinesError, type ListPipelinesErrors, type ListPipelinesResponse, type ListPipelinesResponses, type ListQueueData, type ListQueueError, type ListQueueErrors, type ListQueueResponse, type ListQueueResponses, type PagedModelQueuedItemModel, type PeekItemData, type PeekItemError, type PeekItemErrors, type PeekItemResponse, type PeekItemResponses, type Pipeline, type PipelineBackgroundState, type PipelineCreateRequest, type PipelineState, PipelineStatus, type ProblemDetails, type ProcessData, type ProcessError, type ProcessErrors, type ProcessingChildRequestAction, type ProcessingErrorDetails, type ProcessingOptions, type ProcessingOptionsResults, type ProcessingRequest, type ProcessingRequestAction, type ProcessingResults, type ProcessPipelineData, type ProcessPipelineError, type ProcessPipelineErrors, type ProcessPipelineResponse, type ProcessPipelineResponses, type ProcessResponse, type ProcessResponses, type ProgressInformation, type QueuedItem, type ReattachPipelineData, type ReattachPipelineError, type ReattachPipelineErrors, type ReattachPipelineResponse, type ReattachPipelineResponses, type StepInfo, StepStatus, type UpdatePipelineData, type UpdatePipelineError, type UpdatePipelineErrors, type UpdatePipelineResponse, type UpdatePipelineResponses } from './types.gen';
@@ -0,0 +1,4 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export { client } from './client.gen';
3
+ export { PipelinesService, QueuesService } from './sdk.gen';
4
+ export { PipelineStatus, StepStatus } from './types.gen';
@@ -0,0 +1,39 @@
1
+ import type { Client, Options as Options2, TDataShape } from './client';
2
+ import type { ClearPipelineData, ClearPipelineErrors, ClearPipelineResponses, CreatePipelineData, CreatePipelineErrors, CreatePipelineResponses, DeleteData, DeleteErrors, DeleteResponses, GetPipelineData, GetPipelineErrors, GetPipelineResponses, GetProcessorsData, GetProcessorsErrors, GetProcessorsResponses, GetResultsData, GetResultsErrors, GetResultsResponses, ListPipelinesByStrategyData, ListPipelinesByStrategyErrors, ListPipelinesByStrategyResponses, ListPipelinesData, ListPipelinesErrors, ListPipelinesResponses, ListQueueData, ListQueueErrors, ListQueueResponses, PeekItemData, PeekItemErrors, PeekItemResponses, ProcessData, ProcessErrors, ProcessPipelineData, ProcessPipelineErrors, ProcessPipelineResponses, ProcessResponses, ReattachPipelineData, ReattachPipelineErrors, ReattachPipelineResponses, UpdatePipelineData, UpdatePipelineErrors, UpdatePipelineResponses } from './types.gen';
3
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
4
+ /**
5
+ * You can provide a client instance returned by `createClient()` instead of
6
+ * individual options. This might be also useful if you want to implement a
7
+ * custom client.
8
+ */
9
+ client?: Client;
10
+ /**
11
+ * You can pass arbitrary values through the `meta` object. This can be
12
+ * used to access values that aren't defined as part of the SDK function.
13
+ */
14
+ meta?: Record<string, unknown>;
15
+ };
16
+ export declare class PipelinesService {
17
+ static clearPipeline<ThrowOnError extends boolean = true>(options: Options<ClearPipelineData, ThrowOnError>): import("./client").RequestResult<ClearPipelineResponses, ClearPipelineErrors, ThrowOnError, "fields">;
18
+ static createPipeline<ThrowOnError extends boolean = true>(options?: Options<CreatePipelineData, ThrowOnError>): import("./client").RequestResult<CreatePipelineResponses, CreatePipelineErrors, ThrowOnError, "fields">;
19
+ static getPipeline<ThrowOnError extends boolean = true>(options: Options<GetPipelineData, ThrowOnError>): import("./client").RequestResult<GetPipelineResponses, GetPipelineErrors, ThrowOnError, "fields">;
20
+ static getProcessors<ThrowOnError extends boolean = true>(options?: Options<GetProcessorsData, ThrowOnError>): import("./client").RequestResult<GetProcessorsResponses, GetProcessorsErrors, ThrowOnError, "fields">;
21
+ static getResults<ThrowOnError extends boolean = true>(options: Options<GetResultsData, ThrowOnError>): import("./client").RequestResult<GetResultsResponses, GetResultsErrors, ThrowOnError, "fields">;
22
+ static listPipelines<ThrowOnError extends boolean = true>(options: Options<ListPipelinesData, ThrowOnError>): import("./client").RequestResult<ListPipelinesResponses, ListPipelinesErrors, ThrowOnError, "fields">;
23
+ static listPipelinesByStrategy<ThrowOnError extends boolean = true>(options: Options<ListPipelinesByStrategyData, ThrowOnError>): import("./client").RequestResult<ListPipelinesByStrategyResponses, ListPipelinesByStrategyErrors, ThrowOnError, "fields">;
24
+ static processPipeline<ThrowOnError extends boolean = true>(options: Options<ProcessPipelineData, ThrowOnError>): import("./client").RequestResult<ProcessPipelineResponses, ProcessPipelineErrors, ThrowOnError, "fields">;
25
+ static reattachPipeline<ThrowOnError extends boolean = true>(options: Options<ReattachPipelineData, ThrowOnError>): import("./client").RequestResult<ReattachPipelineResponses, ReattachPipelineErrors, ThrowOnError, "fields">;
26
+ static updatePipeline<ThrowOnError extends boolean = true>(options: Options<UpdatePipelineData, ThrowOnError>): import("./client").RequestResult<UpdatePipelineResponses, UpdatePipelineErrors, ThrowOnError, "fields">;
27
+ }
28
+ export declare class QueuesService {
29
+ static delete<ThrowOnError extends boolean = true>(options: Options<DeleteData, ThrowOnError>): import("./client").RequestResult<DeleteResponses, DeleteErrors, ThrowOnError, "fields">;
30
+ static listQueue<ThrowOnError extends boolean = true>(options?: Options<ListQueueData, ThrowOnError>): import("./client").RequestResult<ListQueueResponses, ListQueueErrors, ThrowOnError, "fields">;
31
+ /**
32
+ * Peek an item from the queue
33
+ */
34
+ static peekItem<ThrowOnError extends boolean = true>(options?: Options<PeekItemData, ThrowOnError>): import("./client").RequestResult<PeekItemResponses, PeekItemErrors, ThrowOnError, "fields">;
35
+ /**
36
+ * Takes an item off the queue, removes the schedule date and puts it back
37
+ */
38
+ static process<ThrowOnError extends boolean = true>(options: Options<ProcessData, ThrowOnError>): import("./client").RequestResult<ProcessResponses, ProcessErrors, ThrowOnError, "fields">;
39
+ }
@@ -0,0 +1,118 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { client } from './client.gen';
3
+ export class PipelinesService {
4
+ static clearPipeline(options) {
5
+ return (options.client ?? client).post({
6
+ security: [{ scheme: 'bearer', type: 'http' }],
7
+ url: '/umbraco/jumoo/api/v1/processing/ClearPipeline/{id}',
8
+ ...options
9
+ });
10
+ }
11
+ static createPipeline(options) {
12
+ return (options?.client ?? client).post({
13
+ security: [{ scheme: 'bearer', type: 'http' }],
14
+ url: '/umbraco/jumoo/api/v1/processing/CreatePipeline',
15
+ ...options,
16
+ headers: {
17
+ 'Content-Type': 'application/json',
18
+ ...options?.headers
19
+ }
20
+ });
21
+ }
22
+ static getPipeline(options) {
23
+ return (options.client ?? client).get({
24
+ security: [{ scheme: 'bearer', type: 'http' }],
25
+ url: '/umbraco/jumoo/api/v1/processing/GetPipeline/{id}',
26
+ ...options
27
+ });
28
+ }
29
+ static getProcessors(options) {
30
+ return (options?.client ?? client).get({
31
+ security: [{ scheme: 'bearer', type: 'http' }],
32
+ url: '/umbraco/jumoo/api/v1/processing/GetProcessors',
33
+ ...options
34
+ });
35
+ }
36
+ static getResults(options) {
37
+ return (options.client ?? client).get({
38
+ security: [{ scheme: 'bearer', type: 'http' }],
39
+ url: '/umbraco/jumoo/api/v1/processing/GetResults/{id}',
40
+ ...options
41
+ });
42
+ }
43
+ static listPipelines(options) {
44
+ return (options.client ?? client).get({
45
+ security: [{ scheme: 'bearer', type: 'http' }],
46
+ url: '/umbraco/jumoo/api/v1/processing/ListPipelines/{status}',
47
+ ...options
48
+ });
49
+ }
50
+ static listPipelinesByStrategy(options) {
51
+ return (options.client ?? client).get({
52
+ security: [{ scheme: 'bearer', type: 'http' }],
53
+ url: '/umbraco/jumoo/api/v1/processing/ListPipelinesByStrategy/{strategy}/{status}',
54
+ ...options
55
+ });
56
+ }
57
+ static processPipeline(options) {
58
+ return (options.client ?? client).post({
59
+ security: [{ scheme: 'bearer', type: 'http' }],
60
+ url: '/umbraco/jumoo/api/v1/processing/ProcessPipeline/{id}',
61
+ ...options
62
+ });
63
+ }
64
+ static reattachPipeline(options) {
65
+ return (options.client ?? client).post({
66
+ security: [{ scheme: 'bearer', type: 'http' }],
67
+ url: '/umbraco/jumoo/api/v1/processing/ReattachPipeline/{id}',
68
+ ...options
69
+ });
70
+ }
71
+ static updatePipeline(options) {
72
+ return (options.client ?? client).post({
73
+ security: [{ scheme: 'bearer', type: 'http' }],
74
+ url: '/umbraco/jumoo/api/v1/processing/UpdatePipeline/{id}',
75
+ ...options,
76
+ headers: {
77
+ 'Content-Type': 'application/json',
78
+ ...options.headers
79
+ }
80
+ });
81
+ }
82
+ }
83
+ export class QueuesService {
84
+ static delete(options) {
85
+ return (options.client ?? client).delete({
86
+ security: [{ scheme: 'bearer', type: 'http' }],
87
+ url: '/umbraco/jumoo/api/v1/processing/DeleteQueue/{key}',
88
+ ...options
89
+ });
90
+ }
91
+ static listQueue(options) {
92
+ return (options?.client ?? client).get({
93
+ security: [{ scheme: 'bearer', type: 'http' }],
94
+ url: '/umbraco/jumoo/api/v1/processing/ListQueue',
95
+ ...options
96
+ });
97
+ }
98
+ /**
99
+ * Peek an item from the queue
100
+ */
101
+ static peekItem(options) {
102
+ return (options?.client ?? client).get({
103
+ security: [{ scheme: 'bearer', type: 'http' }],
104
+ url: '/umbraco/jumoo/api/v1/processing/PeekItem',
105
+ ...options
106
+ });
107
+ }
108
+ /**
109
+ * Takes an item off the queue, removes the schedule date and puts it back
110
+ */
111
+ static process(options) {
112
+ return (options.client ?? client).post({
113
+ security: [{ scheme: 'bearer', type: 'http' }],
114
+ url: '/umbraco/jumoo/api/v1/processing/ProcessQueue/{key}',
115
+ ...options
116
+ });
117
+ }
118
+ }