@camstack/types 1.0.2 → 1.0.4

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.
@@ -1290,7 +1290,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
1290
1290
  } | undefined;
1291
1291
  hasBackup?: boolean | undefined;
1292
1292
  health?: {
1293
- phase: "pending" | "healthy" | "failed";
1293
+ phase: "pending" | "failed" | "healthy";
1294
1294
  retryCount: number;
1295
1295
  firstFailureAt: number | null;
1296
1296
  lastAttemptAt: number | null;
@@ -1508,89 +1508,6 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
1508
1508
  };
1509
1509
  meta: object;
1510
1510
  }>;
1511
- startBulkUpdate: import("@trpc/server").TRPCMutationProcedure<{
1512
- input: {
1513
- [x: string]: unknown;
1514
- nodeId: string;
1515
- items: readonly {
1516
- name: string;
1517
- version: string;
1518
- isSystem: boolean;
1519
- }[];
1520
- };
1521
- output: {
1522
- id: string;
1523
- };
1524
- meta: object;
1525
- }>;
1526
- getBulkUpdateState: import("@trpc/server").TRPCQueryProcedure<{
1527
- input: {
1528
- [x: string]: unknown;
1529
- id: string;
1530
- };
1531
- output: {
1532
- id: string;
1533
- nodeId: string;
1534
- startedAtMs: number;
1535
- total: number;
1536
- completed: number;
1537
- failed: number;
1538
- current: string | null;
1539
- phase: "system" | "regular" | "restarting" | "finalizing";
1540
- cancelled: boolean;
1541
- items: readonly {
1542
- name: string;
1543
- isSystem: boolean;
1544
- fromVersion: string;
1545
- toVersion: string;
1546
- status: "failed" | "queued" | "updating" | "done" | "done-pending-restart";
1547
- error?: string | undefined;
1548
- startedAtMs?: number | undefined;
1549
- completedAtMs?: number | undefined;
1550
- }[];
1551
- completedAtMs?: number | undefined;
1552
- } | null;
1553
- meta: object;
1554
- }>;
1555
- cancelBulkUpdate: import("@trpc/server").TRPCMutationProcedure<{
1556
- input: {
1557
- [x: string]: unknown;
1558
- id: string;
1559
- };
1560
- output: {
1561
- cancelled: boolean;
1562
- };
1563
- meta: object;
1564
- }>;
1565
- listActiveBulkUpdates: import("@trpc/server").TRPCQueryProcedure<{
1566
- input: {
1567
- [x: string]: unknown;
1568
- nodeId?: string | undefined;
1569
- };
1570
- output: readonly {
1571
- id: string;
1572
- nodeId: string;
1573
- startedAtMs: number;
1574
- total: number;
1575
- completed: number;
1576
- failed: number;
1577
- current: string | null;
1578
- phase: "system" | "regular" | "restarting" | "finalizing";
1579
- cancelled: boolean;
1580
- items: readonly {
1581
- name: string;
1582
- isSystem: boolean;
1583
- fromVersion: string;
1584
- toVersion: string;
1585
- status: "failed" | "queued" | "updating" | "done" | "done-pending-restart";
1586
- error?: string | undefined;
1587
- startedAtMs?: number | undefined;
1588
- completedAtMs?: number | undefined;
1589
- }[];
1590
- completedAtMs?: number | undefined;
1591
- }[];
1592
- meta: object;
1593
- }>;
1594
1511
  getVersions: import("@trpc/server").TRPCQueryProcedure<{
1595
1512
  input: {
1596
1513
  [x: string]: unknown;
@@ -1678,6 +1595,105 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
1678
1595
  output: unknown;
1679
1596
  meta: object;
1680
1597
  }>;
1598
+ startJob: import("@trpc/server").TRPCMutationProcedure<{
1599
+ input: {
1600
+ [x: string]: unknown;
1601
+ kind: "update" | "install" | "uninstall" | "restart";
1602
+ targets: {
1603
+ name: string;
1604
+ version: string;
1605
+ }[];
1606
+ nodeIds?: string[] | undefined;
1607
+ };
1608
+ output: {
1609
+ jobId: string;
1610
+ };
1611
+ meta: object;
1612
+ }>;
1613
+ getJob: import("@trpc/server").TRPCQueryProcedure<{
1614
+ input: {
1615
+ [x: string]: unknown;
1616
+ jobId: string;
1617
+ };
1618
+ output: {
1619
+ jobId: string;
1620
+ kind: "update" | "install" | "uninstall" | "restart";
1621
+ createdAtMs: number;
1622
+ createdBy: string;
1623
+ scope: "single" | "bulk" | "cluster";
1624
+ tasks: {
1625
+ taskId: string;
1626
+ nodeId: string;
1627
+ packageName: string;
1628
+ fromVersion: string | null;
1629
+ toVersion: string;
1630
+ target: "addon" | "framework";
1631
+ phase: "failed" | "queued" | "fetching" | "staged" | "validating" | "applying" | "restarting" | "applied" | "done" | "skipped";
1632
+ stagedPath: string | null;
1633
+ attempts: number;
1634
+ steps: {
1635
+ tsMs: number;
1636
+ nodeId: string;
1637
+ packageName: string;
1638
+ phase: "failed" | "queued" | "fetching" | "staged" | "validating" | "applying" | "restarting" | "applied" | "done" | "skipped";
1639
+ message: string;
1640
+ }[];
1641
+ error: string | null;
1642
+ startedAtMs: number | null;
1643
+ finishedAtMs: number | null;
1644
+ }[];
1645
+ state: "failed" | "running" | "completed" | "partially-failed" | "cancelled";
1646
+ schemaVersion: 1;
1647
+ } | null;
1648
+ meta: object;
1649
+ }>;
1650
+ listJobs: import("@trpc/server").TRPCQueryProcedure<{
1651
+ input: {
1652
+ [x: string]: unknown;
1653
+ activeOnly?: boolean | undefined;
1654
+ };
1655
+ output: {
1656
+ jobId: string;
1657
+ kind: "update" | "install" | "uninstall" | "restart";
1658
+ createdAtMs: number;
1659
+ createdBy: string;
1660
+ scope: "single" | "bulk" | "cluster";
1661
+ tasks: {
1662
+ taskId: string;
1663
+ nodeId: string;
1664
+ packageName: string;
1665
+ fromVersion: string | null;
1666
+ toVersion: string;
1667
+ target: "addon" | "framework";
1668
+ phase: "failed" | "queued" | "fetching" | "staged" | "validating" | "applying" | "restarting" | "applied" | "done" | "skipped";
1669
+ stagedPath: string | null;
1670
+ attempts: number;
1671
+ steps: {
1672
+ tsMs: number;
1673
+ nodeId: string;
1674
+ packageName: string;
1675
+ phase: "failed" | "queued" | "fetching" | "staged" | "validating" | "applying" | "restarting" | "applied" | "done" | "skipped";
1676
+ message: string;
1677
+ }[];
1678
+ error: string | null;
1679
+ startedAtMs: number | null;
1680
+ finishedAtMs: number | null;
1681
+ }[];
1682
+ state: "failed" | "running" | "completed" | "partially-failed" | "cancelled";
1683
+ schemaVersion: 1;
1684
+ }[];
1685
+ meta: object;
1686
+ }>;
1687
+ cancelJob: import("@trpc/server").TRPCMutationProcedure<{
1688
+ input: {
1689
+ [x: string]: unknown;
1690
+ jobId: string;
1691
+ };
1692
+ output: {
1693
+ cancelled: boolean;
1694
+ };
1695
+ meta: object;
1696
+ }>;
1681
1697
  onAddonLogs: import("@trpc/server").TRPCSubscriptionProcedure<{
1682
1698
  input: {
1683
1699
  addonId: string;
@@ -14420,7 +14436,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
14420
14436
  } | undefined;
14421
14437
  hasBackup?: boolean | undefined;
14422
14438
  health?: {
14423
- phase: "pending" | "healthy" | "failed";
14439
+ phase: "pending" | "failed" | "healthy";
14424
14440
  retryCount: number;
14425
14441
  firstFailureAt: number | null;
14426
14442
  lastAttemptAt: number | null;
@@ -14638,89 +14654,6 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
14638
14654
  };
14639
14655
  meta: object;
14640
14656
  }>;
14641
- startBulkUpdate: import("@trpc/server").TRPCMutationProcedure<{
14642
- input: {
14643
- [x: string]: unknown;
14644
- nodeId: string;
14645
- items: readonly {
14646
- name: string;
14647
- version: string;
14648
- isSystem: boolean;
14649
- }[];
14650
- };
14651
- output: {
14652
- id: string;
14653
- };
14654
- meta: object;
14655
- }>;
14656
- getBulkUpdateState: import("@trpc/server").TRPCQueryProcedure<{
14657
- input: {
14658
- [x: string]: unknown;
14659
- id: string;
14660
- };
14661
- output: {
14662
- id: string;
14663
- nodeId: string;
14664
- startedAtMs: number;
14665
- total: number;
14666
- completed: number;
14667
- failed: number;
14668
- current: string | null;
14669
- phase: "system" | "regular" | "restarting" | "finalizing";
14670
- cancelled: boolean;
14671
- items: readonly {
14672
- name: string;
14673
- isSystem: boolean;
14674
- fromVersion: string;
14675
- toVersion: string;
14676
- status: "failed" | "queued" | "updating" | "done" | "done-pending-restart";
14677
- error?: string | undefined;
14678
- startedAtMs?: number | undefined;
14679
- completedAtMs?: number | undefined;
14680
- }[];
14681
- completedAtMs?: number | undefined;
14682
- } | null;
14683
- meta: object;
14684
- }>;
14685
- cancelBulkUpdate: import("@trpc/server").TRPCMutationProcedure<{
14686
- input: {
14687
- [x: string]: unknown;
14688
- id: string;
14689
- };
14690
- output: {
14691
- cancelled: boolean;
14692
- };
14693
- meta: object;
14694
- }>;
14695
- listActiveBulkUpdates: import("@trpc/server").TRPCQueryProcedure<{
14696
- input: {
14697
- [x: string]: unknown;
14698
- nodeId?: string | undefined;
14699
- };
14700
- output: readonly {
14701
- id: string;
14702
- nodeId: string;
14703
- startedAtMs: number;
14704
- total: number;
14705
- completed: number;
14706
- failed: number;
14707
- current: string | null;
14708
- phase: "system" | "regular" | "restarting" | "finalizing";
14709
- cancelled: boolean;
14710
- items: readonly {
14711
- name: string;
14712
- isSystem: boolean;
14713
- fromVersion: string;
14714
- toVersion: string;
14715
- status: "failed" | "queued" | "updating" | "done" | "done-pending-restart";
14716
- error?: string | undefined;
14717
- startedAtMs?: number | undefined;
14718
- completedAtMs?: number | undefined;
14719
- }[];
14720
- completedAtMs?: number | undefined;
14721
- }[];
14722
- meta: object;
14723
- }>;
14724
14657
  getVersions: import("@trpc/server").TRPCQueryProcedure<{
14725
14658
  input: {
14726
14659
  [x: string]: unknown;
@@ -14808,6 +14741,105 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
14808
14741
  output: unknown;
14809
14742
  meta: object;
14810
14743
  }>;
14744
+ startJob: import("@trpc/server").TRPCMutationProcedure<{
14745
+ input: {
14746
+ [x: string]: unknown;
14747
+ kind: "update" | "install" | "uninstall" | "restart";
14748
+ targets: {
14749
+ name: string;
14750
+ version: string;
14751
+ }[];
14752
+ nodeIds?: string[] | undefined;
14753
+ };
14754
+ output: {
14755
+ jobId: string;
14756
+ };
14757
+ meta: object;
14758
+ }>;
14759
+ getJob: import("@trpc/server").TRPCQueryProcedure<{
14760
+ input: {
14761
+ [x: string]: unknown;
14762
+ jobId: string;
14763
+ };
14764
+ output: {
14765
+ jobId: string;
14766
+ kind: "update" | "install" | "uninstall" | "restart";
14767
+ createdAtMs: number;
14768
+ createdBy: string;
14769
+ scope: "single" | "bulk" | "cluster";
14770
+ tasks: {
14771
+ taskId: string;
14772
+ nodeId: string;
14773
+ packageName: string;
14774
+ fromVersion: string | null;
14775
+ toVersion: string;
14776
+ target: "addon" | "framework";
14777
+ phase: "failed" | "queued" | "fetching" | "staged" | "validating" | "applying" | "restarting" | "applied" | "done" | "skipped";
14778
+ stagedPath: string | null;
14779
+ attempts: number;
14780
+ steps: {
14781
+ tsMs: number;
14782
+ nodeId: string;
14783
+ packageName: string;
14784
+ phase: "failed" | "queued" | "fetching" | "staged" | "validating" | "applying" | "restarting" | "applied" | "done" | "skipped";
14785
+ message: string;
14786
+ }[];
14787
+ error: string | null;
14788
+ startedAtMs: number | null;
14789
+ finishedAtMs: number | null;
14790
+ }[];
14791
+ state: "failed" | "running" | "completed" | "partially-failed" | "cancelled";
14792
+ schemaVersion: 1;
14793
+ } | null;
14794
+ meta: object;
14795
+ }>;
14796
+ listJobs: import("@trpc/server").TRPCQueryProcedure<{
14797
+ input: {
14798
+ [x: string]: unknown;
14799
+ activeOnly?: boolean | undefined;
14800
+ };
14801
+ output: {
14802
+ jobId: string;
14803
+ kind: "update" | "install" | "uninstall" | "restart";
14804
+ createdAtMs: number;
14805
+ createdBy: string;
14806
+ scope: "single" | "bulk" | "cluster";
14807
+ tasks: {
14808
+ taskId: string;
14809
+ nodeId: string;
14810
+ packageName: string;
14811
+ fromVersion: string | null;
14812
+ toVersion: string;
14813
+ target: "addon" | "framework";
14814
+ phase: "failed" | "queued" | "fetching" | "staged" | "validating" | "applying" | "restarting" | "applied" | "done" | "skipped";
14815
+ stagedPath: string | null;
14816
+ attempts: number;
14817
+ steps: {
14818
+ tsMs: number;
14819
+ nodeId: string;
14820
+ packageName: string;
14821
+ phase: "failed" | "queued" | "fetching" | "staged" | "validating" | "applying" | "restarting" | "applied" | "done" | "skipped";
14822
+ message: string;
14823
+ }[];
14824
+ error: string | null;
14825
+ startedAtMs: number | null;
14826
+ finishedAtMs: number | null;
14827
+ }[];
14828
+ state: "failed" | "running" | "completed" | "partially-failed" | "cancelled";
14829
+ schemaVersion: 1;
14830
+ }[];
14831
+ meta: object;
14832
+ }>;
14833
+ cancelJob: import("@trpc/server").TRPCMutationProcedure<{
14834
+ input: {
14835
+ [x: string]: unknown;
14836
+ jobId: string;
14837
+ };
14838
+ output: {
14839
+ cancelled: boolean;
14840
+ };
14841
+ meta: object;
14842
+ }>;
14811
14843
  onAddonLogs: import("@trpc/server").TRPCSubscriptionProcedure<{
14812
14844
  input: {
14813
14845
  addonId: string;
@@ -47,7 +47,7 @@ import type { userManagementCapability } from '../capabilities/user-management.c
47
47
  */
48
48
  export interface SystemProxy {
49
49
  readonly addonPages: Pick<InferProvider<typeof addonPagesCapability>, 'listPages'>;
50
- readonly addons: Pick<InferProvider<typeof addonsCapability>, 'list' | 'getLogs' | 'listPackages' | 'installPackage' | 'installFromWorkspace' | 'isWorkspaceAvailable' | 'listWorkspacePackages' | 'uninstallPackage' | 'reloadPackages' | 'searchAvailable' | 'listUpdates' | 'updatePackage' | 'rollbackPackage' | 'forceRefresh' | 'restartServer' | 'getLastRestart' | 'listFrameworkPackages' | 'listCapabilityProviders' | 'setCapabilityProviderEnabled' | 'updateFrameworkPackage' | 'startBulkUpdate' | 'getBulkUpdateState' | 'cancelBulkUpdate' | 'listActiveBulkUpdates' | 'getVersions' | 'restartAddon' | 'retryLoad' | 'getAutoUpdateSettings' | 'setAutoUpdateSettings' | 'getAddonAutoUpdate' | 'setAddonAutoUpdate' | 'applyAutoUpdateToAll' | 'custom' | 'onAddonLogs'>;
50
+ readonly addons: Pick<InferProvider<typeof addonsCapability>, 'list' | 'getLogs' | 'listPackages' | 'installPackage' | 'installFromWorkspace' | 'isWorkspaceAvailable' | 'listWorkspacePackages' | 'uninstallPackage' | 'reloadPackages' | 'searchAvailable' | 'listUpdates' | 'updatePackage' | 'rollbackPackage' | 'forceRefresh' | 'restartServer' | 'getLastRestart' | 'listFrameworkPackages' | 'listCapabilityProviders' | 'setCapabilityProviderEnabled' | 'updateFrameworkPackage' | 'getVersions' | 'restartAddon' | 'retryLoad' | 'getAutoUpdateSettings' | 'setAutoUpdateSettings' | 'getAddonAutoUpdate' | 'setAddonAutoUpdate' | 'applyAutoUpdateToAll' | 'custom' | 'startJob' | 'getJob' | 'listJobs' | 'cancelJob' | 'onAddonLogs'>;
51
51
  readonly addonSettings: Pick<InferProvider<typeof addonSettingsCapability>, 'getGlobalSettings' | 'updateGlobalSettings'>;
52
52
  readonly addonWidgets: Pick<InferProvider<typeof addonWidgetsCapability>, 'listWidgets'>;
53
53
  readonly alerts: Pick<InferProvider<typeof alertsCapability>, 'emit' | 'update' | 'list' | 'getUnreadCount' | 'markRead' | 'markAllRead' | 'dismiss'>;
package/dist/index.d.ts CHANGED
@@ -46,6 +46,7 @@ export type * from './interfaces/python-env.js';
46
46
  export type * from './interfaces/network.js';
47
47
  export type * from './interfaces/router.js';
48
48
  export type * from './interfaces/logging.js';
49
+ export type * from './interfaces/config-port.js';
49
50
  export type * from './interfaces/event-bus.js';
50
51
  export { createEvent, isEvent, emitReadiness } from './interfaces/event-bus.js';
51
52
  export type * from './interfaces/readiness.js';
@@ -172,6 +173,7 @@ export { SCOPE_PRESETS } from './generated/scope-presets.js';
172
173
  export type { ScopePresetId, ScopePresetSpec } from './generated/scope-presets.js';
173
174
  export { CAP_PROVIDER_KIND_MAP, PROVIDER_KIND_CAP_NAMES, getCapsByProviderKind, } from './generated/provider-kind-map.js';
174
175
  export { UserRecordSchema, ApiKeyRecordSchema, ScopedTokenSchema, TokenScopeSchema, MethodAccessSchema, CapScopeSchema, type UserRecord, type ApiKeyRecord, type ScopedToken, type TokenScope, type MethodAccess, type CapScope, } from './schemas/auth-records.js';
176
+ export * from './lifecycle/index.js';
175
177
  export { locationSimilarity, bestLocationMatch } from './util/location-match.js';
176
178
  export { errMsg } from './utils/err-msg.js';
177
179
  export { maskUrlCredentials } from './utils/mask-url.js';