@digipair/skill-temporal 0.133.0 → 0.133.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.
@@ -10,9 +10,7 @@
10
10
  "paths": {
11
11
  "/activity": {
12
12
  "post": {
13
- "tags": [
14
- "service"
15
- ],
13
+ "tags": ["service"],
16
14
  "summary": "Activitée",
17
15
  "description": "Définit une activité",
18
16
  "parameters": [
@@ -56,9 +54,7 @@
56
54
  },
57
55
  "/sleep": {
58
56
  "post": {
59
- "tags": [
60
- "service"
61
- ],
57
+ "tags": ["service"],
62
58
  "summary": "Attente",
63
59
  "parameters": [
64
60
  {
@@ -98,9 +94,7 @@
98
94
  },
99
95
  "/condition": {
100
96
  "post": {
101
- "tags": [
102
- "service"
103
- ],
97
+ "tags": ["service"],
104
98
  "summary": "Condition d'attente",
105
99
  "description": "Condition d'attente dans un workflow",
106
100
  "parameters": [
@@ -141,9 +135,7 @@
141
135
  },
142
136
  "/goto": {
143
137
  "post": {
144
- "tags": [
145
- "service"
146
- ],
138
+ "tags": ["service"],
147
139
  "summary": "Aller à l'étape",
148
140
  "parameters": [
149
141
  {
@@ -183,9 +175,7 @@
183
175
  },
184
176
  "/stop": {
185
177
  "post": {
186
- "tags": [
187
- "service"
188
- ],
178
+ "tags": ["service"],
189
179
  "summary": "Arrête le workflow",
190
180
  "description": "Arrête le workflow",
191
181
  "parameters": [
@@ -217,9 +207,7 @@
217
207
  },
218
208
  "/push": {
219
209
  "post": {
220
- "tags": [
221
- "service"
222
- ],
210
+ "tags": ["service"],
223
211
  "summary": "Envoi de nouvelles données dans un workflow",
224
212
  "description": "Envoi de nouvelles données dans le workflow",
225
213
  "parameters": [
@@ -260,9 +248,7 @@
260
248
  },
261
249
  "/terminate": {
262
250
  "post": {
263
- "tags": [
264
- "service"
265
- ],
251
+ "tags": ["service"],
266
252
  "summary": "Arrête un workflow",
267
253
  "description": "Arrête un workflow",
268
254
  "parameters": [
@@ -294,9 +280,7 @@
294
280
  },
295
281
  "/cancel": {
296
282
  "post": {
297
- "tags": [
298
- "service"
299
- ],
283
+ "tags": ["service"],
300
284
  "summary": "Annule un workflow",
301
285
  "description": "Annule un workflow",
302
286
  "parameters": [
@@ -328,9 +312,7 @@
328
312
  },
329
313
  "/list": {
330
314
  "post": {
331
- "tags": [
332
- "service"
333
- ],
315
+ "tags": ["service"],
334
316
  "summary": "Liste les workflows",
335
317
  "description": "Liste les workflows",
336
318
  "parameters": [
@@ -364,9 +346,7 @@
364
346
  },
365
347
  "/describe": {
366
348
  "post": {
367
- "tags": [
368
- "service"
369
- ],
349
+ "tags": ["service"],
370
350
  "summary": "Description du workflow",
371
351
  "description": "Retourner la description du workflow",
372
352
  "parameters": [
@@ -395,6 +375,90 @@
395
375
  }
396
376
  }
397
377
  }
378
+ },
379
+ "/workflow": {
380
+ "post": {
381
+ "summary": "Workflow Temporal",
382
+ "description": "Execute un workflow Temporal",
383
+ "tags": ["service"],
384
+ "parameters": [
385
+ {
386
+ "name": "id",
387
+ "summary": "Identifiant",
388
+ "required": true,
389
+ "description": "Identifiant du workflow",
390
+ "schema": {
391
+ "type": "string"
392
+ }
393
+ },
394
+ {
395
+ "name": "steps",
396
+ "summary": "Exécute les étapes suivantes",
397
+ "required": true,
398
+ "description": "Exécute les étapes définies",
399
+ "schema": {
400
+ "type": "array",
401
+ "items": {
402
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
403
+ }
404
+ }
405
+ },
406
+ {
407
+ "name": "data",
408
+ "summary": "Données du workflow",
409
+ "required": false,
410
+ "description": "Données du workflow temporal",
411
+ "schema": {
412
+ "type": "object"
413
+ }
414
+ },
415
+ {
416
+ "name": "options",
417
+ "summary": "Options temporal",
418
+ "required": false,
419
+ "description": "Options du workflow temporal",
420
+ "schema": {
421
+ "type": "object"
422
+ }
423
+ },
424
+ {
425
+ "name": "cancelSteps",
426
+ "summary": "Étapes de nettoyage après annulation",
427
+ "required": false,
428
+ "description": "Exécute les étapes de nettoyage déclenchées lors de l'annulation",
429
+ "schema": {
430
+ "type": "array",
431
+ "items": {
432
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
433
+ }
434
+ }
435
+ },
436
+ {
437
+ "name": "failureSteps",
438
+ "summary": "Étapes de nettoyage après erreur",
439
+ "required": false,
440
+ "description": "Exécute les étapes de nettoyage déclenchées lors d'un workflow en erreur",
441
+ "schema": {
442
+ "type": "array",
443
+ "items": {
444
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
445
+ }
446
+ }
447
+ }
448
+ ],
449
+ "responses": {
450
+ "200": {
451
+ "description": "Résultat de l'exécution du workflow",
452
+ "content": {
453
+ "application/json": {
454
+ "schema": {
455
+ "description": "Le résultat de la dernière étape exécutée dans le workflow"
456
+ }
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
398
462
  }
399
463
  },
400
464
  "components": {
@@ -423,13 +487,7 @@
423
487
  },
424
488
  "status": {
425
489
  "type": "string",
426
- "enum": [
427
- "Running",
428
- "Completed",
429
- "Failed",
430
- "Cancelled",
431
- "Terminated"
432
- ],
490
+ "enum": ["Running", "Completed", "Failed", "Cancelled", "Terminated"],
433
491
  "description": "Statut actuel du workflow"
434
492
  },
435
493
  "startTime": {
@@ -449,9 +507,7 @@
449
507
  "/workflow": {
450
508
  "summary": "Workflow Temporal",
451
509
  "description": "Execute un workflow Temporal",
452
- "tags": [
453
- "service"
454
- ],
510
+ "tags": ["service"],
455
511
  "metadata": [],
456
512
  "parameters": [
457
513
  {
@@ -504,6 +560,18 @@
504
560
  "$ref": "https://schemas.digipair.ai/pinsSettings"
505
561
  }
506
562
  }
563
+ },
564
+ {
565
+ "name": "failureSteps",
566
+ "summary": "Étapes de nettoyage après erreur",
567
+ "required": false,
568
+ "description": "Exécute les étapes de nettoyage déclenchées lors d'un workflow en erreur",
569
+ "schema": {
570
+ "type": "array",
571
+ "items": {
572
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
573
+ }
574
+ }
507
575
  }
508
576
  ],
509
577
  "responses": {
package/dist/schema.json CHANGED
@@ -10,9 +10,7 @@
10
10
  "paths": {
11
11
  "/activity": {
12
12
  "post": {
13
- "tags": [
14
- "service"
15
- ],
13
+ "tags": ["service"],
16
14
  "summary": "Activity",
17
15
  "description": "Defines an activity",
18
16
  "parameters": [
@@ -56,9 +54,7 @@
56
54
  },
57
55
  "/sleep": {
58
56
  "post": {
59
- "tags": [
60
- "service"
61
- ],
57
+ "tags": ["service"],
62
58
  "summary": "Wait",
63
59
  "parameters": [
64
60
  {
@@ -98,9 +94,7 @@
98
94
  },
99
95
  "/condition": {
100
96
  "post": {
101
- "tags": [
102
- "service"
103
- ],
97
+ "tags": ["service"],
104
98
  "summary": "Wait condition",
105
99
  "description": "Wait condition in a workflow",
106
100
  "parameters": [
@@ -141,9 +135,7 @@
141
135
  },
142
136
  "/goto": {
143
137
  "post": {
144
- "tags": [
145
- "service"
146
- ],
138
+ "tags": ["service"],
147
139
  "summary": "Go to step",
148
140
  "parameters": [
149
141
  {
@@ -183,9 +175,7 @@
183
175
  },
184
176
  "/stop": {
185
177
  "post": {
186
- "tags": [
187
- "service"
188
- ],
178
+ "tags": ["service"],
189
179
  "summary": "Stop the workflow",
190
180
  "description": "Stop the workflow",
191
181
  "parameters": [
@@ -217,9 +207,7 @@
217
207
  },
218
208
  "/push": {
219
209
  "post": {
220
- "tags": [
221
- "service"
222
- ],
210
+ "tags": ["service"],
223
211
  "summary": "Send new data to a workflow",
224
212
  "description": "Send new data to the workflow",
225
213
  "parameters": [
@@ -260,9 +248,7 @@
260
248
  },
261
249
  "/terminate": {
262
250
  "post": {
263
- "tags": [
264
- "service"
265
- ],
251
+ "tags": ["service"],
266
252
  "summary": "Stop a workflow",
267
253
  "description": "Stop a workflow",
268
254
  "parameters": [
@@ -294,9 +280,7 @@
294
280
  },
295
281
  "/cancel": {
296
282
  "post": {
297
- "tags": [
298
- "service"
299
- ],
283
+ "tags": ["service"],
300
284
  "summary": "Cancel a workflow",
301
285
  "description": "Cancel a workflow",
302
286
  "parameters": [
@@ -328,9 +312,7 @@
328
312
  },
329
313
  "/list": {
330
314
  "post": {
331
- "tags": [
332
- "service"
333
- ],
315
+ "tags": ["service"],
334
316
  "summary": "List workflows",
335
317
  "description": "List workflows",
336
318
  "parameters": [
@@ -364,9 +346,7 @@
364
346
  },
365
347
  "/describe": {
366
348
  "post": {
367
- "tags": [
368
- "service"
369
- ],
349
+ "tags": ["service"],
370
350
  "summary": "Workflow description",
371
351
  "description": "Workflow description",
372
352
  "parameters": [
@@ -395,6 +375,90 @@
395
375
  }
396
376
  }
397
377
  }
378
+ },
379
+ "/workflow": {
380
+ "post": {
381
+ "summary": "Temporal Workflow",
382
+ "description": "Execute a Temporal workflow",
383
+ "tags": ["service"],
384
+ "parameters": [
385
+ {
386
+ "name": "id",
387
+ "summary": "ID",
388
+ "required": true,
389
+ "description": "Workflow ID",
390
+ "schema": {
391
+ "type": "string"
392
+ }
393
+ },
394
+ {
395
+ "name": "steps",
396
+ "summary": "Execute the following steps",
397
+ "required": true,
398
+ "description": "Content of the page",
399
+ "schema": {
400
+ "type": "array",
401
+ "items": {
402
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
403
+ }
404
+ }
405
+ },
406
+ {
407
+ "name": "data",
408
+ "summary": "Workflow data",
409
+ "required": false,
410
+ "description": "Temporal workflow data",
411
+ "schema": {
412
+ "type": "object"
413
+ }
414
+ },
415
+ {
416
+ "name": "options",
417
+ "summary": "Temporal options",
418
+ "required": false,
419
+ "description": "Temporal workflow options",
420
+ "schema": {
421
+ "type": "object"
422
+ }
423
+ },
424
+ {
425
+ "name": "cancelSteps",
426
+ "summary": "Cleanup steps after cancellation",
427
+ "required": false,
428
+ "description": "Executes the cleanup steps triggered when the workflow is canceled",
429
+ "schema": {
430
+ "type": "array",
431
+ "items": {
432
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
433
+ }
434
+ }
435
+ },
436
+ {
437
+ "name": "failureSteps",
438
+ "summary": "Cleanup steps after failure",
439
+ "required": false,
440
+ "description": "Executes the cleanup steps triggered when the workflow is on failure",
441
+ "schema": {
442
+ "type": "array",
443
+ "items": {
444
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
445
+ }
446
+ }
447
+ }
448
+ ],
449
+ "responses": {
450
+ "200": {
451
+ "description": "Workflow execution result",
452
+ "content": {
453
+ "application/json": {
454
+ "schema": {
455
+ "description": "The result of the last executed step in the workflow"
456
+ }
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
398
462
  }
399
463
  },
400
464
  "components": {
@@ -423,13 +487,7 @@
423
487
  },
424
488
  "status": {
425
489
  "type": "string",
426
- "enum": [
427
- "Running",
428
- "Completed",
429
- "Failed",
430
- "Cancelled",
431
- "Terminated"
432
- ],
490
+ "enum": ["Running", "Completed", "Failed", "Cancelled", "Terminated"],
433
491
  "description": "Current status of the workflow"
434
492
  },
435
493
  "startTime": {
@@ -449,9 +507,7 @@
449
507
  "/workflow": {
450
508
  "summary": "Temporal Workflow",
451
509
  "description": "Execute a Temporal workflow",
452
- "tags": [
453
- "service"
454
- ],
510
+ "tags": ["service"],
455
511
  "metadata": [],
456
512
  "parameters": [
457
513
  {
@@ -504,6 +560,18 @@
504
560
  "$ref": "https://schemas.digipair.ai/pinsSettings"
505
561
  }
506
562
  }
563
+ },
564
+ {
565
+ "name": "failureSteps",
566
+ "summary": "Cleanup steps after failure",
567
+ "required": false,
568
+ "description": "Executes the cleanup steps triggered when the workflow is on failure",
569
+ "schema": {
570
+ "type": "array",
571
+ "items": {
572
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
573
+ }
574
+ }
507
575
  }
508
576
  ],
509
577
  "responses": {
@@ -1 +1 @@
1
- {"version":3,"file":"skill-temporal.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-temporal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAgLhD,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,kBACc,CAAC;AAEzD,eAAO,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IAAI,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBAC9B,CAAC;AAEnD,eAAO,MAAM,QAAQ,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBAC9B,CAAC"}
@@ -139,8 +139,15 @@ class TemporalService {
139
139
  const prefix = context.privates.TEMPORAL_PREFIX ??
140
140
  process.env['TEMPORAL_PREFIX'] ??
141
141
  `digipair-workflow-${context.request.digipair}-${context.request.reasoning}-`;
142
- const handle = this.client.getHandle(`${prefix}${id}`);
143
- return await handle.describe();
142
+ try {
143
+ const handle = this.client.getHandle(`${prefix}${id}`);
144
+ return await handle.describe();
145
+ }
146
+ catch (error) {
147
+ if (error?.name === 'WorkflowNotFoundError')
148
+ return null;
149
+ throw error;
150
+ }
144
151
  }
145
152
  }
146
153
  let instance;
@@ -1 +1 @@
1
- {"version":3,"file":"skill-temporal.js","sourceRoot":"","sources":["../../../src/lib/skill-temporal.ts"],"names":[],"mappings":";;;;AAGA,+CAAuF;AACvF,+CAA6E;AAE7E,iDAAqE;AACrE,2CAAmD;AACnD,oEAA8C;AAE9C,MAAM,eAAe;IAInB,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,gBAAgB,EAAE,aAAsC;QACjF,MAAM,sBAAsB,GAA2B;YACrD,mCAAmC,EAAE,CAAC;YACtC,mCAAmC,EAAE,CAAC;SACvC,CAAC;QACF,MAAM,kBAAkB,GAA2B;YACjD,GAAG,sBAAsB;YACzB,GAAG,aAAa;SACjB,CAAC;QACF,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAChC,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;IACtD,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,OAAe;QACvC,MAAM,UAAU,GAAG,MAAM,mBAAU,CAAC,OAAO,CAAC;YAC1C,OAAO;SACR,CAAC,CAAC;QAE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AW,EAAE,gBAAgC,EAAE,OAAY,EAAE,EAAE,CACtF,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAD1C,QAAA,QAAQ,YACkC;AAEhD,MAAM,IAAI,GAAG,CAAC,MAAW,EAAE,gBAAgC,EAAE,OAAY,EAAE,EAAE,CAClF,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;AADtC,QAAA,IAAI,QACkC;AAE5C,MAAM,SAAS,GAAG,CAAC,MAAW,EAAE,gBAAgC,EAAE,OAAY,EAAE,EAAE,CACvF,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAD3C,QAAA,SAAS,aACkC;AAEjD,MAAM,MAAM,GAAG,CAAC,MAAW,EAAE,gBAAgC,EAAE,OAAY,EAAE,EAAE,CACpF,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;AADxC,QAAA,MAAM,UACkC;AAE9C,MAAM,IAAI,GAAG,CAAC,MAAW,EAAE,gBAAgC,EAAE,OAAY,EAAE,EAAE,CAClF,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;AADtC,QAAA,IAAI,QACkC;AAE5C,MAAM,QAAQ,GAAG,CAAC,MAAW,EAAE,gBAAgC,EAAE,OAAY,EAAE,EAAE,CACtF,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAD1C,QAAA,QAAQ,YACkC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-temporal",
3
- "version": "0.133.0",
3
+ "version": "0.133.2",
4
4
  "keywords": [
5
5
  "digipair",
6
6
  "service",
@@ -168,9 +168,14 @@ class TemporalService {
168
168
  context.privates.TEMPORAL_PREFIX ??
169
169
  process.env['TEMPORAL_PREFIX'] ??
170
170
  `digipair-workflow-${context.request.digipair}-${context.request.reasoning}-`;
171
- const handle = this.client.getHandle(`${prefix}${id}`);
171
+ try {
172
+ const handle = this.client.getHandle(`${prefix}${id}`);
172
173
 
173
- return await handle.describe();
174
+ return await handle.describe();
175
+ } catch(error: any) {
176
+ if (error?.name === 'WorkflowNotFoundError') return null;
177
+ throw error;
178
+ }
174
179
  }
175
180
  }
176
181
 
@@ -10,9 +10,7 @@
10
10
  "paths": {
11
11
  "/activity": {
12
12
  "post": {
13
- "tags": [
14
- "service"
15
- ],
13
+ "tags": ["service"],
16
14
  "summary": "Activitée",
17
15
  "description": "Définit une activité",
18
16
  "parameters": [
@@ -56,9 +54,7 @@
56
54
  },
57
55
  "/sleep": {
58
56
  "post": {
59
- "tags": [
60
- "service"
61
- ],
57
+ "tags": ["service"],
62
58
  "summary": "Attente",
63
59
  "parameters": [
64
60
  {
@@ -98,9 +94,7 @@
98
94
  },
99
95
  "/condition": {
100
96
  "post": {
101
- "tags": [
102
- "service"
103
- ],
97
+ "tags": ["service"],
104
98
  "summary": "Condition d'attente",
105
99
  "description": "Condition d'attente dans un workflow",
106
100
  "parameters": [
@@ -141,9 +135,7 @@
141
135
  },
142
136
  "/goto": {
143
137
  "post": {
144
- "tags": [
145
- "service"
146
- ],
138
+ "tags": ["service"],
147
139
  "summary": "Aller à l'étape",
148
140
  "parameters": [
149
141
  {
@@ -183,9 +175,7 @@
183
175
  },
184
176
  "/stop": {
185
177
  "post": {
186
- "tags": [
187
- "service"
188
- ],
178
+ "tags": ["service"],
189
179
  "summary": "Arrête le workflow",
190
180
  "description": "Arrête le workflow",
191
181
  "parameters": [
@@ -217,9 +207,7 @@
217
207
  },
218
208
  "/push": {
219
209
  "post": {
220
- "tags": [
221
- "service"
222
- ],
210
+ "tags": ["service"],
223
211
  "summary": "Envoi de nouvelles données dans un workflow",
224
212
  "description": "Envoi de nouvelles données dans le workflow",
225
213
  "parameters": [
@@ -260,9 +248,7 @@
260
248
  },
261
249
  "/terminate": {
262
250
  "post": {
263
- "tags": [
264
- "service"
265
- ],
251
+ "tags": ["service"],
266
252
  "summary": "Arrête un workflow",
267
253
  "description": "Arrête un workflow",
268
254
  "parameters": [
@@ -294,9 +280,7 @@
294
280
  },
295
281
  "/cancel": {
296
282
  "post": {
297
- "tags": [
298
- "service"
299
- ],
283
+ "tags": ["service"],
300
284
  "summary": "Annule un workflow",
301
285
  "description": "Annule un workflow",
302
286
  "parameters": [
@@ -328,9 +312,7 @@
328
312
  },
329
313
  "/list": {
330
314
  "post": {
331
- "tags": [
332
- "service"
333
- ],
315
+ "tags": ["service"],
334
316
  "summary": "Liste les workflows",
335
317
  "description": "Liste les workflows",
336
318
  "parameters": [
@@ -364,9 +346,7 @@
364
346
  },
365
347
  "/describe": {
366
348
  "post": {
367
- "tags": [
368
- "service"
369
- ],
349
+ "tags": ["service"],
370
350
  "summary": "Description du workflow",
371
351
  "description": "Retourner la description du workflow",
372
352
  "parameters": [
@@ -395,6 +375,90 @@
395
375
  }
396
376
  }
397
377
  }
378
+ },
379
+ "/workflow": {
380
+ "post": {
381
+ "summary": "Workflow Temporal",
382
+ "description": "Execute un workflow Temporal",
383
+ "tags": ["service"],
384
+ "parameters": [
385
+ {
386
+ "name": "id",
387
+ "summary": "Identifiant",
388
+ "required": true,
389
+ "description": "Identifiant du workflow",
390
+ "schema": {
391
+ "type": "string"
392
+ }
393
+ },
394
+ {
395
+ "name": "steps",
396
+ "summary": "Exécute les étapes suivantes",
397
+ "required": true,
398
+ "description": "Exécute les étapes définies",
399
+ "schema": {
400
+ "type": "array",
401
+ "items": {
402
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
403
+ }
404
+ }
405
+ },
406
+ {
407
+ "name": "data",
408
+ "summary": "Données du workflow",
409
+ "required": false,
410
+ "description": "Données du workflow temporal",
411
+ "schema": {
412
+ "type": "object"
413
+ }
414
+ },
415
+ {
416
+ "name": "options",
417
+ "summary": "Options temporal",
418
+ "required": false,
419
+ "description": "Options du workflow temporal",
420
+ "schema": {
421
+ "type": "object"
422
+ }
423
+ },
424
+ {
425
+ "name": "cancelSteps",
426
+ "summary": "Étapes de nettoyage après annulation",
427
+ "required": false,
428
+ "description": "Exécute les étapes de nettoyage déclenchées lors de l'annulation",
429
+ "schema": {
430
+ "type": "array",
431
+ "items": {
432
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
433
+ }
434
+ }
435
+ },
436
+ {
437
+ "name": "failureSteps",
438
+ "summary": "Étapes de nettoyage après erreur",
439
+ "required": false,
440
+ "description": "Exécute les étapes de nettoyage déclenchées lors d'un workflow en erreur",
441
+ "schema": {
442
+ "type": "array",
443
+ "items": {
444
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
445
+ }
446
+ }
447
+ }
448
+ ],
449
+ "responses": {
450
+ "200": {
451
+ "description": "Résultat de l'exécution du workflow",
452
+ "content": {
453
+ "application/json": {
454
+ "schema": {
455
+ "description": "Le résultat de la dernière étape exécutée dans le workflow"
456
+ }
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
398
462
  }
399
463
  },
400
464
  "components": {
@@ -423,13 +487,7 @@
423
487
  },
424
488
  "status": {
425
489
  "type": "string",
426
- "enum": [
427
- "Running",
428
- "Completed",
429
- "Failed",
430
- "Cancelled",
431
- "Terminated"
432
- ],
490
+ "enum": ["Running", "Completed", "Failed", "Cancelled", "Terminated"],
433
491
  "description": "Statut actuel du workflow"
434
492
  },
435
493
  "startTime": {
@@ -449,9 +507,7 @@
449
507
  "/workflow": {
450
508
  "summary": "Workflow Temporal",
451
509
  "description": "Execute un workflow Temporal",
452
- "tags": [
453
- "service"
454
- ],
510
+ "tags": ["service"],
455
511
  "metadata": [],
456
512
  "parameters": [
457
513
  {
@@ -504,6 +560,18 @@
504
560
  "$ref": "https://schemas.digipair.ai/pinsSettings"
505
561
  }
506
562
  }
563
+ },
564
+ {
565
+ "name": "failureSteps",
566
+ "summary": "Étapes de nettoyage après erreur",
567
+ "required": false,
568
+ "description": "Exécute les étapes de nettoyage déclenchées lors d'un workflow en erreur",
569
+ "schema": {
570
+ "type": "array",
571
+ "items": {
572
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
573
+ }
574
+ }
507
575
  }
508
576
  ],
509
577
  "responses": {
package/src/schema.json CHANGED
@@ -10,9 +10,7 @@
10
10
  "paths": {
11
11
  "/activity": {
12
12
  "post": {
13
- "tags": [
14
- "service"
15
- ],
13
+ "tags": ["service"],
16
14
  "summary": "Activity",
17
15
  "description": "Defines an activity",
18
16
  "parameters": [
@@ -56,9 +54,7 @@
56
54
  },
57
55
  "/sleep": {
58
56
  "post": {
59
- "tags": [
60
- "service"
61
- ],
57
+ "tags": ["service"],
62
58
  "summary": "Wait",
63
59
  "parameters": [
64
60
  {
@@ -98,9 +94,7 @@
98
94
  },
99
95
  "/condition": {
100
96
  "post": {
101
- "tags": [
102
- "service"
103
- ],
97
+ "tags": ["service"],
104
98
  "summary": "Wait condition",
105
99
  "description": "Wait condition in a workflow",
106
100
  "parameters": [
@@ -141,9 +135,7 @@
141
135
  },
142
136
  "/goto": {
143
137
  "post": {
144
- "tags": [
145
- "service"
146
- ],
138
+ "tags": ["service"],
147
139
  "summary": "Go to step",
148
140
  "parameters": [
149
141
  {
@@ -183,9 +175,7 @@
183
175
  },
184
176
  "/stop": {
185
177
  "post": {
186
- "tags": [
187
- "service"
188
- ],
178
+ "tags": ["service"],
189
179
  "summary": "Stop the workflow",
190
180
  "description": "Stop the workflow",
191
181
  "parameters": [
@@ -217,9 +207,7 @@
217
207
  },
218
208
  "/push": {
219
209
  "post": {
220
- "tags": [
221
- "service"
222
- ],
210
+ "tags": ["service"],
223
211
  "summary": "Send new data to a workflow",
224
212
  "description": "Send new data to the workflow",
225
213
  "parameters": [
@@ -260,9 +248,7 @@
260
248
  },
261
249
  "/terminate": {
262
250
  "post": {
263
- "tags": [
264
- "service"
265
- ],
251
+ "tags": ["service"],
266
252
  "summary": "Stop a workflow",
267
253
  "description": "Stop a workflow",
268
254
  "parameters": [
@@ -294,9 +280,7 @@
294
280
  },
295
281
  "/cancel": {
296
282
  "post": {
297
- "tags": [
298
- "service"
299
- ],
283
+ "tags": ["service"],
300
284
  "summary": "Cancel a workflow",
301
285
  "description": "Cancel a workflow",
302
286
  "parameters": [
@@ -328,9 +312,7 @@
328
312
  },
329
313
  "/list": {
330
314
  "post": {
331
- "tags": [
332
- "service"
333
- ],
315
+ "tags": ["service"],
334
316
  "summary": "List workflows",
335
317
  "description": "List workflows",
336
318
  "parameters": [
@@ -364,9 +346,7 @@
364
346
  },
365
347
  "/describe": {
366
348
  "post": {
367
- "tags": [
368
- "service"
369
- ],
349
+ "tags": ["service"],
370
350
  "summary": "Workflow description",
371
351
  "description": "Workflow description",
372
352
  "parameters": [
@@ -395,6 +375,90 @@
395
375
  }
396
376
  }
397
377
  }
378
+ },
379
+ "/workflow": {
380
+ "post": {
381
+ "summary": "Temporal Workflow",
382
+ "description": "Execute a Temporal workflow",
383
+ "tags": ["service"],
384
+ "parameters": [
385
+ {
386
+ "name": "id",
387
+ "summary": "ID",
388
+ "required": true,
389
+ "description": "Workflow ID",
390
+ "schema": {
391
+ "type": "string"
392
+ }
393
+ },
394
+ {
395
+ "name": "steps",
396
+ "summary": "Execute the following steps",
397
+ "required": true,
398
+ "description": "Content of the page",
399
+ "schema": {
400
+ "type": "array",
401
+ "items": {
402
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
403
+ }
404
+ }
405
+ },
406
+ {
407
+ "name": "data",
408
+ "summary": "Workflow data",
409
+ "required": false,
410
+ "description": "Temporal workflow data",
411
+ "schema": {
412
+ "type": "object"
413
+ }
414
+ },
415
+ {
416
+ "name": "options",
417
+ "summary": "Temporal options",
418
+ "required": false,
419
+ "description": "Temporal workflow options",
420
+ "schema": {
421
+ "type": "object"
422
+ }
423
+ },
424
+ {
425
+ "name": "cancelSteps",
426
+ "summary": "Cleanup steps after cancellation",
427
+ "required": false,
428
+ "description": "Executes the cleanup steps triggered when the workflow is canceled",
429
+ "schema": {
430
+ "type": "array",
431
+ "items": {
432
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
433
+ }
434
+ }
435
+ },
436
+ {
437
+ "name": "failureSteps",
438
+ "summary": "Cleanup steps after failure",
439
+ "required": false,
440
+ "description": "Executes the cleanup steps triggered when the workflow is on failure",
441
+ "schema": {
442
+ "type": "array",
443
+ "items": {
444
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
445
+ }
446
+ }
447
+ }
448
+ ],
449
+ "responses": {
450
+ "200": {
451
+ "description": "Workflow execution result",
452
+ "content": {
453
+ "application/json": {
454
+ "schema": {
455
+ "description": "The result of the last executed step in the workflow"
456
+ }
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
398
462
  }
399
463
  },
400
464
  "components": {
@@ -423,13 +487,7 @@
423
487
  },
424
488
  "status": {
425
489
  "type": "string",
426
- "enum": [
427
- "Running",
428
- "Completed",
429
- "Failed",
430
- "Cancelled",
431
- "Terminated"
432
- ],
490
+ "enum": ["Running", "Completed", "Failed", "Cancelled", "Terminated"],
433
491
  "description": "Current status of the workflow"
434
492
  },
435
493
  "startTime": {
@@ -449,9 +507,7 @@
449
507
  "/workflow": {
450
508
  "summary": "Temporal Workflow",
451
509
  "description": "Execute a Temporal workflow",
452
- "tags": [
453
- "service"
454
- ],
510
+ "tags": ["service"],
455
511
  "metadata": [],
456
512
  "parameters": [
457
513
  {
@@ -504,6 +560,18 @@
504
560
  "$ref": "https://schemas.digipair.ai/pinsSettings"
505
561
  }
506
562
  }
563
+ },
564
+ {
565
+ "name": "failureSteps",
566
+ "summary": "Cleanup steps after failure",
567
+ "required": false,
568
+ "description": "Executes the cleanup steps triggered when the workflow is on failure",
569
+ "schema": {
570
+ "type": "array",
571
+ "items": {
572
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
573
+ }
574
+ }
507
575
  }
508
576
  ],
509
577
  "responses": {