@superdurable/dex 1.8.0 → 1.9.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.
@@ -1282,6 +1282,14 @@ export interface InterpreterWorkflowInput {
1282
1282
  timeoutHandlerOptions: FlowTimeoutHandlerOptions | undefined;
1283
1283
  /** Tenant of a multi-tenant Flow, set at start and copied to SubFlows. Empty in single-tenant mode. */
1284
1284
  tenantId: string;
1285
+ /** Verified claims of the starting tenant principal, used to check worker targets at every dispatch. */
1286
+ tenantClaims: {
1287
+ [key: string]: string;
1288
+ };
1289
+ }
1290
+ export interface InterpreterWorkflowInput_TenantClaimsEntry {
1291
+ key: string;
1292
+ value: string;
1285
1293
  }
1286
1294
  export interface InterpreterWorkflowOutput {
1287
1295
  stepCompletionOutputs: StepCompletionOutput[];
@@ -1297,6 +1305,14 @@ export interface InvokeWaitForMethodActivityInput {
1297
1305
  request: InvokeWaitForMethodRequest | undefined;
1298
1306
  /** Tenant of the dispatching Flow; empty in single-tenant mode. */
1299
1307
  tenantId: string;
1308
+ /** Claims of the Flow's tenant principal; empty in single-tenant mode. */
1309
+ tenantClaims: {
1310
+ [key: string]: string;
1311
+ };
1312
+ }
1313
+ export interface InvokeWaitForMethodActivityInput_TenantClaimsEntry {
1314
+ key: string;
1315
+ value: string;
1300
1316
  }
1301
1317
  export interface InvokeWaitForMethodActivityOutput {
1302
1318
  response: InvokeWaitForMethodResponse | undefined;
@@ -1306,6 +1322,14 @@ export interface InvokeExecuteMethodActivityInput {
1306
1322
  request: InvokeExecuteMethodRequest | undefined;
1307
1323
  /** Tenant of the dispatching Flow; empty in single-tenant mode. */
1308
1324
  tenantId: string;
1325
+ /** Claims of the Flow's tenant principal; empty in single-tenant mode. */
1326
+ tenantClaims: {
1327
+ [key: string]: string;
1328
+ };
1329
+ }
1330
+ export interface InvokeExecuteMethodActivityInput_TenantClaimsEntry {
1331
+ key: string;
1332
+ value: string;
1309
1333
  }
1310
1334
  export interface RecoveryErrorInfo {
1311
1335
  detail: string;
@@ -1332,6 +1356,14 @@ export interface InvokeWorkerRPCActivityInput {
1332
1356
  request: InvokeRPCRequest | undefined;
1333
1357
  /** Tenant of the Flow; empty in single-tenant mode. */
1334
1358
  tenantId: string;
1359
+ /** Claims of the Flow's tenant principal; empty in single-tenant mode. */
1360
+ tenantClaims: {
1361
+ [key: string]: string;
1362
+ };
1363
+ }
1364
+ export interface InvokeWorkerRPCActivityInput_TenantClaimsEntry {
1365
+ key: string;
1366
+ value: string;
1335
1367
  }
1336
1368
  export interface InvokeWorkerRPCActivityOutput {
1337
1369
  response: InvokeWorkerRPCResponse | undefined;
@@ -1361,6 +1393,14 @@ export interface StartSubFlowActivityInput {
1361
1393
  parentStepExecutionId: string;
1362
1394
  /** Tenant of the parent Flow, inherited by the SubFlow; empty in single-tenant mode. */
1363
1395
  tenantId: string;
1396
+ /** Claims of the Flow's tenant principal; empty in single-tenant mode. */
1397
+ tenantClaims: {
1398
+ [key: string]: string;
1399
+ };
1400
+ }
1401
+ export interface StartSubFlowActivityInput_TenantClaimsEntry {
1402
+ key: string;
1403
+ value: string;
1364
1404
  }
1365
1405
  export interface StartSubFlowActivityOutput {
1366
1406
  immediateFlowResult: FlowResult | undefined;
@@ -1466,6 +1506,37 @@ export interface InvokeRpcUpdateResult {
1466
1506
  export interface StepExecutionNumbers {
1467
1507
  numbers: number[];
1468
1508
  }
1509
+ export interface TenantAdminState {
1510
+ tenantId: string;
1511
+ isTombstoned: boolean;
1512
+ tombstonedTime: Date | undefined;
1513
+ /** Set when a purge has found nothing left in two queries a confirmation delay apart. */
1514
+ purgeDoneTime: Date | undefined;
1515
+ /** After this time the tombstone is removed and the tenant ID may be reused. */
1516
+ tombstoneExpiryTime: Date | undefined;
1517
+ }
1518
+ export interface TombstoneTenantRequest {
1519
+ tenantId: string;
1520
+ }
1521
+ export interface TombstoneTenantResponse {
1522
+ state: TenantAdminState | undefined;
1523
+ }
1524
+ export interface PurgeTenantRequest {
1525
+ tenantId: string;
1526
+ }
1527
+ export interface PurgeTenantResponse {
1528
+ state: TenantAdminState | undefined;
1529
+ terminatedExecutions: number;
1530
+ deletedExecutions: number;
1531
+ deletedBlobObjects: number;
1532
+ done: boolean;
1533
+ }
1534
+ export interface DescribeTenantRequest {
1535
+ tenantId: string;
1536
+ }
1537
+ export interface DescribeTenantResponse {
1538
+ state: TenantAdminState | undefined;
1539
+ }
1469
1540
  export declare const ServerInfo: MessageFns<ServerInfo>;
1470
1541
  export declare const Value: MessageFns<Value>;
1471
1542
  export declare const EncodedObject: MessageFns<EncodedObject>;
@@ -1617,24 +1688,29 @@ export declare const ContinueAsNewDump: MessageFns<ContinueAsNewDump>;
1617
1688
  export declare const ContinueAsNewDump_ChannelReceivedEntry: MessageFns<ContinueAsNewDump_ChannelReceivedEntry>;
1618
1689
  export declare const ContinueAsNewInput: MessageFns<ContinueAsNewInput>;
1619
1690
  export declare const InterpreterWorkflowInput: MessageFns<InterpreterWorkflowInput>;
1691
+ export declare const InterpreterWorkflowInput_TenantClaimsEntry: MessageFns<InterpreterWorkflowInput_TenantClaimsEntry>;
1620
1692
  export declare const InterpreterWorkflowOutput: MessageFns<InterpreterWorkflowOutput>;
1621
1693
  export declare const BlobStoreCleanupWorkflowInput: MessageFns<BlobStoreCleanupWorkflowInput>;
1622
1694
  export declare const BlobStoreCleanupWorkflowOutput: MessageFns<BlobStoreCleanupWorkflowOutput>;
1623
1695
  export declare const InvokeWaitForMethodActivityInput: MessageFns<InvokeWaitForMethodActivityInput>;
1696
+ export declare const InvokeWaitForMethodActivityInput_TenantClaimsEntry: MessageFns<InvokeWaitForMethodActivityInput_TenantClaimsEntry>;
1624
1697
  export declare const InvokeWaitForMethodActivityOutput: MessageFns<InvokeWaitForMethodActivityOutput>;
1625
1698
  export declare const InvokeExecuteMethodActivityInput: MessageFns<InvokeExecuteMethodActivityInput>;
1699
+ export declare const InvokeExecuteMethodActivityInput_TenantClaimsEntry: MessageFns<InvokeExecuteMethodActivityInput_TenantClaimsEntry>;
1626
1700
  export declare const RecoveryErrorInfo: MessageFns<RecoveryErrorInfo>;
1627
1701
  export declare const InternalLocalStepActivityFailure: MessageFns<InternalLocalStepActivityFailure>;
1628
1702
  export declare const InvokeExecuteMethodActivityOutput: MessageFns<InvokeExecuteMethodActivityOutput>;
1629
1703
  export declare const DumpFlowForContinueAsNewActivityInput: MessageFns<DumpFlowForContinueAsNewActivityInput>;
1630
1704
  export declare const DumpFlowForContinueAsNewActivityOutput: MessageFns<DumpFlowForContinueAsNewActivityOutput>;
1631
1705
  export declare const InvokeWorkerRPCActivityInput: MessageFns<InvokeWorkerRPCActivityInput>;
1706
+ export declare const InvokeWorkerRPCActivityInput_TenantClaimsEntry: MessageFns<InvokeWorkerRPCActivityInput_TenantClaimsEntry>;
1632
1707
  export declare const InvokeWorkerRPCActivityOutput: MessageFns<InvokeWorkerRPCActivityOutput>;
1633
1708
  export declare const CleanupBlobStoreActivityInput: MessageFns<CleanupBlobStoreActivityInput>;
1634
1709
  export declare const CleanupBlobStoreActivityOutput: MessageFns<CleanupBlobStoreActivityOutput>;
1635
1710
  export declare const AttributeSyncItem: MessageFns<AttributeSyncItem>;
1636
1711
  export declare const SyncAttributeBatchActivityInput: MessageFns<SyncAttributeBatchActivityInput>;
1637
1712
  export declare const StartSubFlowActivityInput: MessageFns<StartSubFlowActivityInput>;
1713
+ export declare const StartSubFlowActivityInput_TenantClaimsEntry: MessageFns<StartSubFlowActivityInput_TenantClaimsEntry>;
1638
1714
  export declare const StartSubFlowActivityOutput: MessageFns<StartSubFlowActivityOutput>;
1639
1715
  export declare const SubFlowCompletionSignalRequest: MessageFns<SubFlowCompletionSignalRequest>;
1640
1716
  export declare const ReportSubFlowCompletionActivityInput: MessageFns<ReportSubFlowCompletionActivityInput>;
@@ -1656,6 +1732,13 @@ export declare const GetScheduledGreedyTimerTimesQueryResponse: MessageFns<GetSc
1656
1732
  export declare const DebugDumpResponse: MessageFns<DebugDumpResponse>;
1657
1733
  export declare const InvokeRpcUpdateResult: MessageFns<InvokeRpcUpdateResult>;
1658
1734
  export declare const StepExecutionNumbers: MessageFns<StepExecutionNumbers>;
1735
+ export declare const TenantAdminState: MessageFns<TenantAdminState>;
1736
+ export declare const TombstoneTenantRequest: MessageFns<TombstoneTenantRequest>;
1737
+ export declare const TombstoneTenantResponse: MessageFns<TombstoneTenantResponse>;
1738
+ export declare const PurgeTenantRequest: MessageFns<PurgeTenantRequest>;
1739
+ export declare const PurgeTenantResponse: MessageFns<PurgeTenantResponse>;
1740
+ export declare const DescribeTenantRequest: MessageFns<DescribeTenantRequest>;
1741
+ export declare const DescribeTenantResponse: MessageFns<DescribeTenantResponse>;
1659
1742
  /** Hosted by Dex server; SDKs call these RPCs. */
1660
1743
  export type FlowServiceService = typeof FlowServiceService;
1661
1744
  export declare const FlowServiceService: {
@@ -2073,7 +2156,68 @@ export declare const WorkerServiceClient: {
2073
2156
  service: typeof WorkerServiceService;
2074
2157
  serviceName: string;
2075
2158
  };
2076
- /** Server-internal only (interpreter CAN activity → API). Not SDK-facing. */
2159
+ /**
2160
+ * Server-internal only (interpreter CAN activity → API). Not SDK-facing.
2161
+ * TenantAdminService manages the tenants of a multi-tenant server. Only operator principals may call it.
2162
+ * Every RPC names its tenant explicitly and never returns Flow data.
2163
+ */
2164
+ export type TenantAdminServiceService = typeof TenantAdminServiceService;
2165
+ export declare const TenantAdminServiceService: {
2166
+ /** Refuses every credential of the tenant within the tombstone refresh interval. Idempotent. */
2167
+ readonly tombstoneTenant: {
2168
+ readonly path: "/dex.TenantAdminService/TombstoneTenant";
2169
+ readonly requestStream: false;
2170
+ readonly responseStream: false;
2171
+ readonly requestSerialize: (value: TombstoneTenantRequest) => Buffer;
2172
+ readonly requestDeserialize: (value: Buffer) => TombstoneTenantRequest;
2173
+ readonly responseSerialize: (value: TombstoneTenantResponse) => Buffer;
2174
+ readonly responseDeserialize: (value: Buffer) => TombstoneTenantResponse;
2175
+ };
2176
+ /** Deletes one bounded batch of the tombstoned tenant's data. Repeat until done is true. */
2177
+ readonly purgeTenant: {
2178
+ readonly path: "/dex.TenantAdminService/PurgeTenant";
2179
+ readonly requestStream: false;
2180
+ readonly responseStream: false;
2181
+ readonly requestSerialize: (value: PurgeTenantRequest) => Buffer;
2182
+ readonly requestDeserialize: (value: Buffer) => PurgeTenantRequest;
2183
+ readonly responseSerialize: (value: PurgeTenantResponse) => Buffer;
2184
+ readonly responseDeserialize: (value: Buffer) => PurgeTenantResponse;
2185
+ };
2186
+ readonly describeTenant: {
2187
+ readonly path: "/dex.TenantAdminService/DescribeTenant";
2188
+ readonly requestStream: false;
2189
+ readonly responseStream: false;
2190
+ readonly requestSerialize: (value: DescribeTenantRequest) => Buffer;
2191
+ readonly requestDeserialize: (value: Buffer) => DescribeTenantRequest;
2192
+ readonly responseSerialize: (value: DescribeTenantResponse) => Buffer;
2193
+ readonly responseDeserialize: (value: Buffer) => DescribeTenantResponse;
2194
+ };
2195
+ };
2196
+ export interface TenantAdminServiceServer extends UntypedServiceImplementation {
2197
+ /** Refuses every credential of the tenant within the tombstone refresh interval. Idempotent. */
2198
+ tombstoneTenant: handleUnaryCall<TombstoneTenantRequest, TombstoneTenantResponse>;
2199
+ /** Deletes one bounded batch of the tombstoned tenant's data. Repeat until done is true. */
2200
+ purgeTenant: handleUnaryCall<PurgeTenantRequest, PurgeTenantResponse>;
2201
+ describeTenant: handleUnaryCall<DescribeTenantRequest, DescribeTenantResponse>;
2202
+ }
2203
+ export interface TenantAdminServiceClient extends Client {
2204
+ /** Refuses every credential of the tenant within the tombstone refresh interval. Idempotent. */
2205
+ tombstoneTenant(request: TombstoneTenantRequest, callback: (error: ServiceError | null, response: TombstoneTenantResponse) => void): ClientUnaryCall;
2206
+ tombstoneTenant(request: TombstoneTenantRequest, metadata: Metadata, callback: (error: ServiceError | null, response: TombstoneTenantResponse) => void): ClientUnaryCall;
2207
+ tombstoneTenant(request: TombstoneTenantRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: TombstoneTenantResponse) => void): ClientUnaryCall;
2208
+ /** Deletes one bounded batch of the tombstoned tenant's data. Repeat until done is true. */
2209
+ purgeTenant(request: PurgeTenantRequest, callback: (error: ServiceError | null, response: PurgeTenantResponse) => void): ClientUnaryCall;
2210
+ purgeTenant(request: PurgeTenantRequest, metadata: Metadata, callback: (error: ServiceError | null, response: PurgeTenantResponse) => void): ClientUnaryCall;
2211
+ purgeTenant(request: PurgeTenantRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: PurgeTenantResponse) => void): ClientUnaryCall;
2212
+ describeTenant(request: DescribeTenantRequest, callback: (error: ServiceError | null, response: DescribeTenantResponse) => void): ClientUnaryCall;
2213
+ describeTenant(request: DescribeTenantRequest, metadata: Metadata, callback: (error: ServiceError | null, response: DescribeTenantResponse) => void): ClientUnaryCall;
2214
+ describeTenant(request: DescribeTenantRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: DescribeTenantResponse) => void): ClientUnaryCall;
2215
+ }
2216
+ export declare const TenantAdminServiceClient: {
2217
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): TenantAdminServiceClient;
2218
+ service: typeof TenantAdminServiceService;
2219
+ serviceName: string;
2220
+ };
2077
2221
  export type InternalServiceService = typeof InternalServiceService;
2078
2222
  export declare const InternalServiceService: {
2079
2223
  readonly dumpFlowForContinueAsNew: {