@jumoo/processing 17.4.2 → 18.2.0

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 (43) hide show
  1. package/dist/api/client/client.gen.js +104 -123
  2. package/dist/api/client/index.d.ts +2 -0
  3. package/dist/api/client/types.gen.d.ts +6 -3
  4. package/dist/api/client/utils.gen.d.ts +8 -4
  5. package/dist/api/client/utils.gen.js +3 -3
  6. package/dist/api/client.gen.d.ts +2 -2
  7. package/dist/api/client.gen.js +1 -2
  8. package/dist/api/core/auth.gen.d.ts +7 -0
  9. package/dist/api/core/params.gen.d.ts +2 -2
  10. package/dist/api/core/params.gen.js +23 -14
  11. package/dist/api/core/queryKeySerializer.gen.d.ts +1 -1
  12. package/dist/api/core/serverSentEvents.gen.d.ts +1 -1
  13. package/dist/api/core/serverSentEvents.gen.js +3 -4
  14. package/dist/api/core/types.gen.d.ts +5 -0
  15. package/dist/api/index.d.ts +2 -3
  16. package/dist/api/index.js +1 -2
  17. package/dist/api/sdk.gen.d.ts +23 -27
  18. package/dist/api/sdk.gen.js +82 -114
  19. package/dist/api/types.gen.d.ts +113 -124
  20. package/dist/index.js +9 -1
  21. package/dist/pipeline/components/background.element.js +23 -23
  22. package/dist/pipeline/components/pipeline-list.element.js +28 -28
  23. package/dist/pipeline/components/pipeline-table.element.d.ts +2 -1
  24. package/dist/pipeline/components/pipeline-table.element.js +3 -1
  25. package/dist/pipeline/components/process-error.element.js +39 -39
  26. package/dist/pipeline/components/progress.element.js +122 -122
  27. package/dist/pipeline/components/progress.step.element.js +5 -5
  28. package/dist/pipeline/modal/errors/error-modal.element.js +87 -87
  29. package/dist/pipeline/modal/pipeline-modal.element.js +34 -34
  30. package/dist/pipeline/pipeline.context.d.ts +2 -2
  31. package/dist/pipeline/pipeline.context.js +1 -1
  32. package/dist/pipeline/pipeline.element.js +30 -30
  33. package/dist/pipeline/pipeline.repository.d.ts +8 -8
  34. package/dist/pipeline/pipeline.source.d.ts +72 -27
  35. package/dist/pipeline/pipeline.source.js +10 -10
  36. package/dist/pipeline/pipelines.context.d.ts +1 -1
  37. package/dist/pipeline/workspace/views/default-pipeline-view.js +18 -18
  38. package/dist/queue/components/queue-list.element.js +17 -17
  39. package/dist/queue/components/queue-table.element.js +15 -15
  40. package/dist/queue/queue.context.d.ts +1 -1
  41. package/dist/queue/queue.repository.d.ts +3 -3
  42. package/dist/queue/queue.repository.js +5 -5
  43. package/package.json +11 -10
@@ -1,11 +1,11 @@
1
1
  import { tryExecute } from '@umbraco-cms/backoffice/resources';
2
- import { PipelinesService } from '../api';
2
+ import { getProcessingGetPipelineById, getProcessingGetProcessors, getProcessingGetResultsById, getProcessingListPipelinesByStatus, postProcessingClearPipelineById, postProcessingCreatePipeline, postProcessingProcessPipelineById, postProcessingReattachPipelineById, postProcessingUpdatePipelineById, } from '../api';
3
3
  export class PipelineSource {
4
4
  constructor(host) {
5
5
  this.host = host;
6
6
  }
7
7
  async process(id, clientId) {
8
- const result = await tryExecute(this.host, PipelinesService.processPipeline({
8
+ const result = await tryExecute(this.host, postProcessingProcessPipelineById({
9
9
  path: { id: id },
10
10
  query: { clientId: clientId ?? undefined },
11
11
  }));
@@ -18,20 +18,20 @@ export class PipelineSource {
18
18
  * last saw down the old, now-dead connection.
19
19
  */
20
20
  async reattach(id, clientId) {
21
- const result = await tryExecute(this.host, PipelinesService.reattachPipeline({
21
+ const result = await tryExecute(this.host, postProcessingReattachPipelineById({
22
22
  path: { id: id },
23
23
  query: { clientId: clientId ?? undefined },
24
24
  }));
25
25
  return result;
26
26
  }
27
27
  async update(id, body) {
28
- return await tryExecute(this.host, PipelinesService.updatePipeline({
28
+ return await tryExecute(this.host, postProcessingUpdatePipelineById({
29
29
  path: { id: id },
30
30
  body: body,
31
31
  }));
32
32
  }
33
33
  async getProcessors() {
34
- return await tryExecute(this.host, PipelinesService.getProcessors());
34
+ return await tryExecute(this.host, getProcessingGetProcessors());
35
35
  }
36
36
  /**
37
37
  *
@@ -39,7 +39,7 @@ export class PipelineSource {
39
39
  * @returns pipeline
40
40
  */
41
41
  async Get(id) {
42
- return await tryExecute(this.host, PipelinesService.getPipeline({ path: { id: id } }));
42
+ return await tryExecute(this.host, getProcessingGetPipelineById({ path: { id: id } }));
43
43
  }
44
44
  /**
45
45
  *
@@ -47,7 +47,7 @@ export class PipelineSource {
47
47
  * @returns
48
48
  */
49
49
  async create(processor, strategy, options) {
50
- return await tryExecute(this.host, PipelinesService.createPipeline({
50
+ return await tryExecute(this.host, postProcessingCreatePipeline({
51
51
  body: {
52
52
  alias: processor,
53
53
  strategy: strategy,
@@ -62,18 +62,18 @@ export class PipelineSource {
62
62
  * @returns nothing.
63
63
  */
64
64
  async clear(id) {
65
- return await tryExecute(this.host, PipelinesService.clearPipeline({ path: { id: id } }));
65
+ return await tryExecute(this.host, postProcessingClearPipelineById({ path: { id: id } }));
66
66
  }
67
67
  /**
68
68
  * @param id guid id of the pipeline to retrieve results for
69
69
  * @returns results (if there are any) for the pipeline
70
70
  */
71
71
  async getResults(id) {
72
- return await tryExecute(this.host, PipelinesService.getResults({
72
+ return await tryExecute(this.host, getProcessingGetResultsById({
73
73
  path: { id: id },
74
74
  }));
75
75
  }
76
76
  async listPiplelines(status) {
77
- return await tryExecute(this.host, PipelinesService.listPipelines({ path: { status: status } }));
77
+ return await tryExecute(this.host, getProcessingListPipelinesByStatus({ path: { status: status } }));
78
78
  }
79
79
  }
@@ -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;
@@ -50,30 +50,30 @@ let JumooProcessingPipelineWorkspaceDefaultViewElement = class JumooProcessingPi
50
50
  this.progressLabel = this.localize.term('jumooProc_process');
51
51
  }
52
52
  render() {
53
- return html `<umb-body-layout .headline=${this.headline}>
54
- <jumoo-pipeline
55
- .pipelineId=${this.pipeline?.id}
56
- .setup=${this.pipeline?.options}
57
- .debug=${false}
58
- @pipeline-status=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onStatusChange)}
59
- @pipeline-valid=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onSetValid)}
60
- @pipeline-complete=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onComplete)}
61
- @pipeline-modal-update=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onUpdateModal)}></jumoo-pipeline>
62
- <div slot="actions">${this.renderActions()}</div>
53
+ return html `<umb-body-layout .headline=${this.headline}>
54
+ <jumoo-pipeline
55
+ .pipelineId=${this.pipeline?.id}
56
+ .setup=${this.pipeline?.options}
57
+ .debug=${false}
58
+ @pipeline-status=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onStatusChange)}
59
+ @pipeline-valid=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onSetValid)}
60
+ @pipeline-complete=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onComplete)}
61
+ @pipeline-modal-update=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onUpdateModal)}></jumoo-pipeline>
62
+ <div slot="actions">${this.renderActions()}</div>
63
63
  </umb-body-layout>`;
64
64
  }
65
65
  renderActions() {
66
66
  const actionButton = this._status === PipelineStatus.WAITING && this._isValid && !this._isLastAction
67
- ? html `<uui-button
68
- @click=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onProcess)}
69
- color="positive"
70
- look="primary"
67
+ ? html `<uui-button
68
+ @click=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onProcess)}
69
+ color="positive"
70
+ look="primary"
71
71
  .label=${this.progressLabel}></uui-button>`
72
72
  : nothing;
73
- const closeButton = html `<uui-button
74
- @click=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onClose)}
75
- color="default"
76
- look="default"
73
+ const closeButton = html `<uui-button
74
+ @click=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onClose)}
75
+ color="default"
76
+ look="outline"
77
77
  label=${this.closeLabel}></uui-button>`;
78
78
  return html `${closeButton} ${actionButton}`;
79
79
  }
@@ -27,34 +27,34 @@ let JumooQueueListElement = class JumooQueueListElement extends UmbLitElement {
27
27
  this.loading = false;
28
28
  }
29
29
  render() {
30
- return html `<uui-box style="--uui-box-default-padding: 0;" .headline=${this.headline}>
31
- <div slot="header-actions">
32
- <uui-button label="refresh" @click=${this.onRefresh} compact
33
- ><uui-icon name="icon-refresh"></uui-icon
34
- ></uui-button>
35
- </div>
36
- ${when(this.loading, () => html `<uui-loader-bar
37
- animationDuration="1.5"
38
- style="color: black"></uui-loader-bar>`, () => this.renderTable())}
30
+ return html `<uui-box style="--uui-box-default-padding: 0;" .headline=${this.headline}>
31
+ <div slot="header-actions">
32
+ <uui-button label="refresh" @click=${this.onRefresh} compact
33
+ ><uui-icon name="icon-refresh"></uui-icon
34
+ ></uui-button>
35
+ </div>
36
+ ${when(this.loading, () => html `<uui-loader-bar
37
+ animationDuration="1.5"
38
+ style="color: black"></uui-loader-bar>`, () => this.renderTable())}
39
39
  </uui-box>`;
40
40
  }
41
41
  renderTable() {
42
42
  return !this.queue || !this.queue.items.length
43
43
  ? html `<div class="emtpy">Nothing in the queue</div>`
44
- : html `<jumoo-queue-table
45
- .items=${this.queue.items}
44
+ : html `<jumoo-queue-table
45
+ .items=${this.queue.items}
46
46
  @process-queue-item=${this._onProcessQueueItem}></jumoo-queue-table>`;
47
47
  }
48
48
  async _onProcessQueueItem(e) {
49
49
  await this._queueContext.process(e.detail.key);
50
50
  }
51
51
  };
52
- JumooQueueListElement.styles = css `
53
- .emtpy {
54
- display: flex;
55
- justify-content: center;
56
- padding: var(--uui-size-space-5);
57
- }
52
+ JumooQueueListElement.styles = css `
53
+ .emtpy {
54
+ display: flex;
55
+ justify-content: center;
56
+ padding: var(--uui-size-space-5);
57
+ }
58
58
  `;
59
59
  __decorate([
60
60
  property({ type: String })
@@ -93,24 +93,24 @@ let JumooQueueTableElement = class JumooQueueTableElement extends UmbLitElement
93
93
  };
94
94
  })
95
95
  .filter((item) => item !== undefined);
96
- return html ` <umb-table
97
- .items=${items}
98
- .config=${this.tableConfig}
99
- .columns=${this.tableColumns}
96
+ return html ` <umb-table
97
+ .items=${items}
98
+ .config=${this.tableConfig}
99
+ .columns=${this.tableColumns}
100
100
  .filter=${this.filter}></umb-table>`;
101
101
  }
102
102
  renderActions(item) {
103
- return html ` <uui-button-group>
104
- ${when(this.showViewDetails, () => html ` <uui-button
105
- label="Details"
106
- color="default"
107
- look="primary"
108
- @click=${() => __classPrivateFieldGet(this, _JumooQueueTableElement_instances, "m", _JumooQueueTableElement_onViewDetails).call(this, item)}></uui-button>`)}
109
- ${when(!this.hideProcess, () => html ` <uui-button
110
- label="Process"
111
- color="positive"
112
- look="outline"
113
- @click=${() => __classPrivateFieldGet(this, _JumooQueueTableElement_instances, "m", _JumooQueueTableElement_onProcess).call(this, item)}></uui-button>`)}
103
+ return html ` <uui-button-group>
104
+ ${when(this.showViewDetails, () => html ` <uui-button
105
+ label="Details"
106
+ color="default"
107
+ look="primary"
108
+ @click=${() => __classPrivateFieldGet(this, _JumooQueueTableElement_instances, "m", _JumooQueueTableElement_onViewDetails).call(this, item)}></uui-button>`)}
109
+ ${when(!this.hideProcess, () => html ` <uui-button
110
+ label="Process"
111
+ color="positive"
112
+ look="outline"
113
+ @click=${() => __classPrivateFieldGet(this, _JumooQueueTableElement_instances, "m", _JumooQueueTableElement_onProcess).call(this, item)}></uui-button>`)}
114
114
  </uui-button-group>`;
115
115
  }
116
116
  };
@@ -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;
@@ -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,28 +1,28 @@
1
1
  import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
2
- import { QueuesService } from '../api';
2
+ import { deleteProcessingDeleteQueueByKey, getProcessingListQueue, getProcessingPeekItem, postProcessingProcessQueueByKey, } from '../api';
3
3
  export class QueueRepository extends UmbControllerBase {
4
4
  constructor(host) {
5
5
  super(host);
6
6
  }
7
7
  async list() {
8
- return (await QueuesService.listQueue()).data;
8
+ return (await getProcessingListQueue()).data;
9
9
  }
10
10
  async peek(key) {
11
- return (await QueuesService.peekItem({
11
+ return (await getProcessingPeekItem({
12
12
  query: {
13
13
  key: key,
14
14
  },
15
15
  })).data;
16
16
  }
17
17
  async delete(key) {
18
- return (await QueuesService.delete({
18
+ return (await deleteProcessingDeleteQueueByKey({
19
19
  path: {
20
20
  key: key,
21
21
  },
22
22
  })).data;
23
23
  }
24
24
  async process(key) {
25
- return (await QueuesService.process({
25
+ return (await postProcessingProcessQueueByKey({
26
26
  path: {
27
27
  key: key,
28
28
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jumoo/processing",
3
3
  "licence": "custom",
4
- "version": "17.4.2",
4
+ "version": "18.2.0",
5
5
  "type": "module",
6
6
  "description": "Jumoo processing library",
7
7
  "exports": {
@@ -25,27 +25,28 @@
25
25
  "client:publish": "npm publish -tag next",
26
26
  "client:make": "npm run client:build && npm run client:pack && npm run client:publish",
27
27
  "client:link": "npm link",
28
- "generate": "openapi-ts",
28
+ "generate-client": "node scripts/generate-openapi.js https://localhost:44348/umbraco/openapi/processing.json",
29
29
  "lint": "eslint .",
30
30
  "lint:fix": "eslint . --fix",
31
31
  "format:fix": "npm run format -- --write",
32
- "format": "prettier \"src/**/*.ts\" --check",
32
+ "format": "prettier \"src/**/*.ts\" \"*.ts\" \"*.js\" \"*.json\" \"scripts/**/*.js\" --check",
33
33
  "build": "tsc && vite build",
34
34
  "watch": "vite build --watch",
35
35
  "make": "npm run build && npm run client:make"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@eslint/js": "^10.0.1",
39
- "@hey-api/openapi-ts": "^0.95.0",
39
+ "@hey-api/openapi-ts": "^0.99.0",
40
40
  "@microsoft/signalr": "^10.0.0",
41
- "@umbraco-cms/backoffice": "^17.3.0",
42
- "eslint": "^10.2.0",
41
+ "@umbraco-cms/backoffice": "18.0.1",
42
+ "chalk": "^5.6.2",
43
+ "cross-env": "^10.1.0",
44
+ "eslint": "^10.5.0",
43
45
  "globals": "^17.8.0",
44
- "lit": "^3.3.2",
46
+ "node-fetch": "^3.3.2",
45
47
  "prettier": "^3.8.2",
46
- "typescript": "^6.0.2",
48
+ "typescript": "^6.0.3",
47
49
  "typescript-eslint": "^8.65.0",
48
- "vite": "^8.0.8",
49
- "vite-plugin-dts": "^4.5.4"
50
+ "vite": "^8.0.16"
50
51
  }
51
52
  }