@keboola/api-fixtures 20.0.0 → 22.0.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.
package/dist/index.d.cts CHANGED
@@ -1,3 +1,5 @@
1
+ import * as _keboola_api_client_apps_types from '@keboola/api-client/apps/types';
2
+ import { App, Deployment, AppRun } from '@keboola/api-client/apps/types';
1
3
  import * as _keboola_api_client_storage_types from '@keboola/api-client/storage/types';
2
4
  import { TableDetail } from '@keboola/api-client/storage/types';
3
5
  export { Table, TableDetail } from '@keboola/api-client/storage/types';
@@ -139,7 +141,589 @@ declare const fixtures: {
139
141
  };
140
142
  };
141
143
  };
144
+ apps: {
145
+ apps: {
146
+ getApp: () => _keboola_api_client_apps_types.App;
147
+ listApps: () => _keboola_api_client_apps_types.App[];
148
+ fixtures: {
149
+ neverDeployed: {
150
+ configVersion: string;
151
+ production: {
152
+ desiredNumber: null;
153
+ desiredId: null;
154
+ actualNumber: null;
155
+ actualId: null;
156
+ };
157
+ undeployedChanges: false;
158
+ state: "NOT_DEPLOYED";
159
+ id: string;
160
+ projectId: string;
161
+ componentId: string;
162
+ branchId: string;
163
+ configId: string;
164
+ type: "streamlit";
165
+ mode: "prod";
166
+ url: string;
167
+ };
168
+ legacyV1Serving: {
169
+ id: string;
170
+ projectId: string;
171
+ componentId: string;
172
+ branchId: string;
173
+ configId: string;
174
+ configVersion: string;
175
+ type: "streamlit";
176
+ mode: "dev";
177
+ url: string;
178
+ production: {
179
+ desiredNumber: null;
180
+ desiredId: null;
181
+ actualNumber: null;
182
+ actualId: null;
183
+ };
184
+ undeployedChanges: false;
185
+ state: "NOT_DEPLOYED";
186
+ };
187
+ running: {
188
+ configVersion: string;
189
+ production: {
190
+ desiredNumber: number;
191
+ desiredId: string;
192
+ actualNumber: number;
193
+ actualId: string;
194
+ };
195
+ undeployedChanges: false;
196
+ state: "RUNNING";
197
+ id: string;
198
+ projectId: string;
199
+ componentId: string;
200
+ branchId: string;
201
+ configId: string;
202
+ type: "streamlit";
203
+ mode: "prod";
204
+ url: string;
205
+ };
206
+ undeployedChanges: {
207
+ configVersion: string;
208
+ production: {
209
+ desiredNumber: number;
210
+ desiredId: string;
211
+ actualNumber: number;
212
+ actualId: string;
213
+ };
214
+ undeployedChanges: true;
215
+ state: "RUNNING";
216
+ id: string;
217
+ projectId: string;
218
+ componentId: string;
219
+ branchId: string;
220
+ configId: string;
221
+ type: "streamlit";
222
+ mode: "prod";
223
+ url: string;
224
+ };
225
+ promoting: {
226
+ configVersion: string;
227
+ production: {
228
+ desiredNumber: number;
229
+ desiredId: string;
230
+ actualNumber: number;
231
+ actualId: string;
232
+ };
233
+ undeployedChanges: true;
234
+ state: "RUNNING";
235
+ id: string;
236
+ projectId: string;
237
+ componentId: string;
238
+ branchId: string;
239
+ configId: string;
240
+ type: "streamlit";
241
+ mode: "prod";
242
+ url: string;
243
+ };
244
+ sleeping: {
245
+ configVersion: string;
246
+ production: {
247
+ desiredNumber: number;
248
+ desiredId: string;
249
+ actualNumber: number;
250
+ actualId: string;
251
+ };
252
+ undeployedChanges: false;
253
+ state: "SLEEPING";
254
+ id: string;
255
+ projectId: string;
256
+ componentId: string;
257
+ branchId: string;
258
+ configId: string;
259
+ type: "streamlit";
260
+ mode: "prod";
261
+ url: string;
262
+ };
263
+ suspended: {
264
+ configVersion: string;
265
+ production: {
266
+ desiredNumber: number;
267
+ desiredId: string;
268
+ actualNumber: number;
269
+ actualId: string;
270
+ };
271
+ undeployedChanges: false;
272
+ state: "SUSPENDED";
273
+ id: string;
274
+ projectId: string;
275
+ componentId: string;
276
+ branchId: string;
277
+ configId: string;
278
+ type: "streamlit";
279
+ mode: "prod";
280
+ url: string;
281
+ };
282
+ };
283
+ };
284
+ deployments: {
285
+ getDeployment: () => _keboola_api_client_apps_types.Deployment;
286
+ listDeployments: () => _keboola_api_client_apps_types.Deployment[];
287
+ fixtures: {
288
+ archived: {
289
+ id: string;
290
+ number: number;
291
+ configId: string;
292
+ configVersion: string;
293
+ gitCommitSha: null;
294
+ size: "tiny";
295
+ buildState: "PREBUILT";
296
+ runState: "STOPPED";
297
+ archived: true;
298
+ archivedAt: string;
299
+ createdAt: string;
300
+ };
301
+ live: {
302
+ id: string;
303
+ number: number;
304
+ configId: string;
305
+ configVersion: string;
306
+ gitCommitSha: null;
307
+ size: "small";
308
+ buildState: "PREBUILT";
309
+ runState: "RUNNING";
310
+ archived: false;
311
+ archivedAt: null;
312
+ createdAt: string;
313
+ };
314
+ staged: {
315
+ id: string;
316
+ number: number;
317
+ configId: string;
318
+ configVersion: string;
319
+ gitCommitSha: null;
320
+ size: "small";
321
+ buildState: "PREBUILT";
322
+ runState: "NEVER_RUN";
323
+ archived: false;
324
+ archivedAt: null;
325
+ createdAt: string;
326
+ };
327
+ buildFailed: {
328
+ id: string;
329
+ number: number;
330
+ configId: string;
331
+ configVersion: string;
332
+ gitCommitSha: null;
333
+ size: "small";
334
+ buildState: "FAILED";
335
+ runState: "NEVER_RUN";
336
+ archived: false;
337
+ archivedAt: null;
338
+ createdAt: string;
339
+ };
340
+ runFailed: {
341
+ id: string;
342
+ number: number;
343
+ configId: string;
344
+ configVersion: string;
345
+ gitCommitSha: null;
346
+ size: "small";
347
+ buildState: "PREBUILT";
348
+ runState: "FAILED";
349
+ archived: false;
350
+ archivedAt: null;
351
+ createdAt: string;
352
+ };
353
+ };
354
+ };
355
+ runs: {
356
+ getAppRun: () => _keboola_api_client_apps_types.AppRun;
357
+ listAppRuns: () => _keboola_api_client_apps_types.AppRun[];
358
+ fixtures: {
359
+ running: {
360
+ id: string;
361
+ deploymentId: string;
362
+ configVersion: string;
363
+ state: "running";
364
+ createdAt: string;
365
+ startedAt: string;
366
+ stoppedAt: null;
367
+ startupLogs: null;
368
+ failureReason: null;
369
+ appId: string;
370
+ runtimeSize: string;
371
+ runtimeBackendType: string;
372
+ imageVersion: string;
373
+ mode: string;
374
+ };
375
+ finished: {
376
+ id: string;
377
+ deploymentId: string;
378
+ configVersion: string;
379
+ state: "finished";
380
+ createdAt: string;
381
+ startedAt: string;
382
+ stoppedAt: string;
383
+ startupLogs: null;
384
+ failureReason: null;
385
+ appId: string;
386
+ runtimeSize: string;
387
+ runtimeBackendType: string;
388
+ imageVersion: string;
389
+ mode: string;
390
+ };
391
+ failed: {
392
+ id: string;
393
+ deploymentId: string;
394
+ configVersion: string;
395
+ state: "failed";
396
+ createdAt: string;
397
+ startedAt: null;
398
+ stoppedAt: string;
399
+ startupLogs: string;
400
+ failureReason: {
401
+ reason: string;
402
+ message: string;
403
+ };
404
+ appId: string;
405
+ runtimeSize: string;
406
+ runtimeBackendType: string;
407
+ imageVersion: string;
408
+ mode: string;
409
+ };
410
+ legacy: {
411
+ id: string;
412
+ deploymentId: null;
413
+ configVersion: string;
414
+ state: "running";
415
+ createdAt: string;
416
+ startedAt: string;
417
+ stoppedAt: null;
418
+ startupLogs: null;
419
+ failureReason: null;
420
+ appId: string;
421
+ runtimeSize: string;
422
+ runtimeBackendType: string;
423
+ imageVersion: string;
424
+ mode: string;
425
+ };
426
+ };
427
+ };
428
+ };
429
+ };
430
+
431
+ declare const appFixtures: {
432
+ neverDeployed: {
433
+ configVersion: string;
434
+ production: {
435
+ desiredNumber: null;
436
+ desiredId: null;
437
+ actualNumber: null;
438
+ actualId: null;
439
+ };
440
+ undeployedChanges: false;
441
+ state: "NOT_DEPLOYED";
442
+ id: string;
443
+ projectId: string;
444
+ componentId: string;
445
+ branchId: string;
446
+ configId: string;
447
+ type: "streamlit";
448
+ mode: "prod";
449
+ url: string;
450
+ };
451
+ legacyV1Serving: {
452
+ id: string;
453
+ projectId: string;
454
+ componentId: string;
455
+ branchId: string;
456
+ configId: string;
457
+ configVersion: string;
458
+ type: "streamlit";
459
+ mode: "dev";
460
+ url: string;
461
+ production: {
462
+ desiredNumber: null;
463
+ desiredId: null;
464
+ actualNumber: null;
465
+ actualId: null;
466
+ };
467
+ undeployedChanges: false;
468
+ state: "NOT_DEPLOYED";
469
+ };
470
+ running: {
471
+ configVersion: string;
472
+ production: {
473
+ desiredNumber: number;
474
+ desiredId: string;
475
+ actualNumber: number;
476
+ actualId: string;
477
+ };
478
+ undeployedChanges: false;
479
+ state: "RUNNING";
480
+ id: string;
481
+ projectId: string;
482
+ componentId: string;
483
+ branchId: string;
484
+ configId: string;
485
+ type: "streamlit";
486
+ mode: "prod";
487
+ url: string;
488
+ };
489
+ undeployedChanges: {
490
+ configVersion: string;
491
+ production: {
492
+ desiredNumber: number;
493
+ desiredId: string;
494
+ actualNumber: number;
495
+ actualId: string;
496
+ };
497
+ undeployedChanges: true;
498
+ state: "RUNNING";
499
+ id: string;
500
+ projectId: string;
501
+ componentId: string;
502
+ branchId: string;
503
+ configId: string;
504
+ type: "streamlit";
505
+ mode: "prod";
506
+ url: string;
507
+ };
508
+ promoting: {
509
+ configVersion: string;
510
+ production: {
511
+ desiredNumber: number;
512
+ desiredId: string;
513
+ actualNumber: number;
514
+ actualId: string;
515
+ };
516
+ undeployedChanges: true;
517
+ state: "RUNNING";
518
+ id: string;
519
+ projectId: string;
520
+ componentId: string;
521
+ branchId: string;
522
+ configId: string;
523
+ type: "streamlit";
524
+ mode: "prod";
525
+ url: string;
526
+ };
527
+ sleeping: {
528
+ configVersion: string;
529
+ production: {
530
+ desiredNumber: number;
531
+ desiredId: string;
532
+ actualNumber: number;
533
+ actualId: string;
534
+ };
535
+ undeployedChanges: false;
536
+ state: "SLEEPING";
537
+ id: string;
538
+ projectId: string;
539
+ componentId: string;
540
+ branchId: string;
541
+ configId: string;
542
+ type: "streamlit";
543
+ mode: "prod";
544
+ url: string;
545
+ };
546
+ suspended: {
547
+ configVersion: string;
548
+ production: {
549
+ desiredNumber: number;
550
+ desiredId: string;
551
+ actualNumber: number;
552
+ actualId: string;
553
+ };
554
+ undeployedChanges: false;
555
+ state: "SUSPENDED";
556
+ id: string;
557
+ projectId: string;
558
+ componentId: string;
559
+ branchId: string;
560
+ configId: string;
561
+ type: "streamlit";
562
+ mode: "prod";
563
+ url: string;
564
+ };
142
565
  };
566
+ declare const getApp: () => App;
567
+ declare const listApps: () => App[];
568
+
569
+ declare const deploymentFixtures: {
570
+ archived: {
571
+ id: string;
572
+ number: number;
573
+ configId: string;
574
+ configVersion: string;
575
+ gitCommitSha: null;
576
+ size: "tiny";
577
+ buildState: "PREBUILT";
578
+ runState: "STOPPED";
579
+ archived: true;
580
+ archivedAt: string;
581
+ createdAt: string;
582
+ };
583
+ live: {
584
+ id: string;
585
+ number: number;
586
+ configId: string;
587
+ configVersion: string;
588
+ gitCommitSha: null;
589
+ size: "small";
590
+ buildState: "PREBUILT";
591
+ runState: "RUNNING";
592
+ archived: false;
593
+ archivedAt: null;
594
+ createdAt: string;
595
+ };
596
+ staged: {
597
+ id: string;
598
+ number: number;
599
+ configId: string;
600
+ configVersion: string;
601
+ gitCommitSha: null;
602
+ size: "small";
603
+ buildState: "PREBUILT";
604
+ runState: "NEVER_RUN";
605
+ archived: false;
606
+ archivedAt: null;
607
+ createdAt: string;
608
+ };
609
+ buildFailed: {
610
+ id: string;
611
+ number: number;
612
+ configId: string;
613
+ configVersion: string;
614
+ gitCommitSha: null;
615
+ size: "small";
616
+ buildState: "FAILED";
617
+ runState: "NEVER_RUN";
618
+ archived: false;
619
+ archivedAt: null;
620
+ createdAt: string;
621
+ };
622
+ runFailed: {
623
+ id: string;
624
+ number: number;
625
+ configId: string;
626
+ configVersion: string;
627
+ gitCommitSha: null;
628
+ size: "small";
629
+ buildState: "PREBUILT";
630
+ runState: "FAILED";
631
+ archived: false;
632
+ archivedAt: null;
633
+ createdAt: string;
634
+ };
635
+ };
636
+ declare const getDeployment: () => Deployment;
637
+ /**
638
+ * One continuous history: #1 retired, #2 serving, #3 staged, #4 failed to build, #5 built but its
639
+ * run failed.
640
+ *
641
+ * All five, because `runFixtures.failed` names #5 as its deployment — a list that left the failed
642
+ * ones out could not be joined to the runs, which is the join a timeline is built from.
643
+ *
644
+ * Returned in ascending `number` order. The endpoint does not specify an order, so consumers must
645
+ * sort for themselves — this order is a fixture convention, not a contract to rely on, and it is
646
+ * ascending on purpose: a consumer that assumes newest-first gets the wrong answer here rather
647
+ * than in production.
648
+ */
649
+ declare const listDeployments: () => Deployment[];
650
+
651
+ declare const runFixtures: {
652
+ running: {
653
+ id: string;
654
+ deploymentId: string;
655
+ configVersion: string;
656
+ state: "running";
657
+ createdAt: string;
658
+ startedAt: string;
659
+ stoppedAt: null;
660
+ startupLogs: null;
661
+ failureReason: null;
662
+ appId: string;
663
+ runtimeSize: string;
664
+ runtimeBackendType: string;
665
+ imageVersion: string;
666
+ mode: string;
667
+ };
668
+ finished: {
669
+ id: string;
670
+ deploymentId: string;
671
+ configVersion: string;
672
+ state: "finished";
673
+ createdAt: string;
674
+ startedAt: string;
675
+ stoppedAt: string;
676
+ startupLogs: null;
677
+ failureReason: null;
678
+ appId: string;
679
+ runtimeSize: string;
680
+ runtimeBackendType: string;
681
+ imageVersion: string;
682
+ mode: string;
683
+ };
684
+ failed: {
685
+ id: string;
686
+ deploymentId: string;
687
+ configVersion: string;
688
+ state: "failed";
689
+ createdAt: string;
690
+ startedAt: null;
691
+ stoppedAt: string;
692
+ startupLogs: string;
693
+ failureReason: {
694
+ reason: string;
695
+ message: string;
696
+ };
697
+ appId: string;
698
+ runtimeSize: string;
699
+ runtimeBackendType: string;
700
+ imageVersion: string;
701
+ mode: string;
702
+ };
703
+ legacy: {
704
+ id: string;
705
+ deploymentId: null;
706
+ configVersion: string;
707
+ state: "running";
708
+ createdAt: string;
709
+ startedAt: string;
710
+ stoppedAt: null;
711
+ startupLogs: null;
712
+ failureReason: null;
713
+ appId: string;
714
+ runtimeSize: string;
715
+ runtimeBackendType: string;
716
+ imageVersion: string;
717
+ mode: string;
718
+ };
719
+ };
720
+ declare const getAppRun: () => AppRun;
721
+ /**
722
+ * Every run this app has, newest first — the order the endpoint documents, so a consumer that
723
+ * relies on it (`[latest] = runs`) is exercised against data that keeps the promise rather than
724
+ * data that happens to contradict it.
725
+ */
726
+ declare const listAppRuns: () => AppRun[];
143
727
 
144
728
  /**
145
729
  * Returns a single realistic typed TableDetail (fresh, no imports yet).
@@ -289,4 +873,4 @@ declare const tableFixtures: {
289
873
  };
290
874
  };
291
875
 
292
- export { fixtures, getTable, listTables, tableFixtures };
876
+ export { appFixtures, deploymentFixtures, fixtures, getApp, getAppRun, getDeployment, getTable, listAppRuns, listApps, listDeployments, listTables, runFixtures, tableFixtures };