@modelprofile.com/authswitch 7.0.0 → 8.1.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_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/authority-contract.d.ts +1 -3
- package/dist_ts/authority-contract.js +1 -1
- package/dist_ts/authority-import-contract.d.ts +207 -0
- package/dist_ts/authority-import-contract.js +18 -0
- package/dist_ts/classes.authoritybroker.js +1 -5
- package/dist_ts/classes.authoritycli.d.ts +4 -0
- package/dist_ts/classes.authoritycli.js +149 -12
- package/dist_ts/classes.authorityclient.d.ts +7 -0
- package/dist_ts/classes.authorityclient.js +13 -1
- package/dist_ts/classes.authoritydaemon.d.ts +4 -0
- package/dist_ts/classes.authoritydaemon.js +75 -9
- package/dist_ts/classes.authoritydatabase.d.ts +10 -26
- package/dist_ts/classes.authoritydatabase.js +68 -133
- package/dist_ts/classes.authorityimport.d.ts +161 -0
- package/dist_ts/classes.authorityimport.js +638 -0
- package/dist_ts/classes.authoritymodels.d.ts +39 -43
- package/dist_ts/classes.authoritymodels.js +209 -243
- package/dist_ts/classes.authoritypreuse.js +1 -2
- package/dist_ts/classes.authorityregistry.d.ts +2 -17
- package/dist_ts/classes.authorityregistry.js +18 -74
- package/dist_ts/classes.authoritysecrets.d.ts +1 -1
- package/dist_ts/classes.authoritysecrets.js +2 -2
- package/dist_ts/classes.authorityusage.d.ts +3 -3
- package/dist_ts/classes.claudeauthority.js +3 -7
- package/dist_ts/classes.claudenative.d.ts +1 -8
- package/dist_ts/classes.claudenative.js +2 -25
- package/dist_ts/classes.codexmanaged.d.ts +1 -1
- package/dist_ts/index.d.ts +1 -0
- package/dist_ts/index.js +6 -3
- package/dist_ts/plugins.d.ts +7 -7
- package/dist_ts/plugins.js +8 -8
- package/dist_ts/ts_migration/0001_authority_meta.d.ts +13 -3
- package/dist_ts/ts_migration/0001_authority_meta.js +29 -17
- package/dist_ts/ts_migration/0002_remove_backup_records.d.ts +17 -0
- package/dist_ts/ts_migration/0002_remove_backup_records.js +48 -0
- package/dist_ts/ts_migration/index.d.ts +6 -3
- package/dist_ts/ts_migration/index.js +10 -4
- package/dist_ts/ts_migration/legacysources/authswitchstores.d.ts +2 -0
- package/dist_ts/ts_migration/legacysources/authswitchstores.js +244 -0
- package/dist_ts/ts_migration/legacysources/index.d.ts +18 -0
- package/dist_ts/ts_migration/legacysources/index.js +24 -0
- package/dist_ts/ts_migration/legacysources/material.d.ts +37 -0
- package/dist_ts/ts_migration/legacysources/material.js +120 -0
- package/dist_ts/ts_migration/legacysources/nativestores.d.ts +2 -0
- package/dist_ts/ts_migration/legacysources/nativestores.js +207 -0
- package/dist_ts/ts_migration/legacysources/shared.d.ts +124 -0
- package/dist_ts/ts_migration/legacysources/shared.js +142 -0
- package/package.json +6 -5
- package/readme.md +68 -26
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/authority-contract.ts +1 -3
- package/ts/authority-import-contract.ts +216 -0
- package/ts/classes.authoritybroker.ts +0 -4
- package/ts/classes.authoritycli.ts +165 -11
- package/ts/classes.authorityclient.ts +22 -0
- package/ts/classes.authoritydaemon.ts +75 -8
- package/ts/classes.authoritydatabase.ts +70 -145
- package/ts/classes.authorityimport.ts +718 -0
- package/ts/classes.authoritymodels.ts +253 -269
- package/ts/classes.authoritypreuse.ts +0 -1
- package/ts/classes.authorityregistry.ts +20 -91
- package/ts/classes.authoritysecrets.ts +1 -1
- package/ts/classes.authorityusage.ts +3 -3
- package/ts/classes.claudeauthority.ts +2 -6
- package/ts/classes.claudenative.ts +1 -32
- package/ts/classes.codexmanaged.ts +1 -1
- package/ts/index.ts +5 -2
- package/ts/plugins.ts +7 -7
- package/ts/ts_migration/0001_authority_meta.ts +29 -17
- package/ts/ts_migration/0002_remove_backup_records.ts +49 -0
- package/ts/ts_migration/index.ts +10 -5
- package/ts/ts_migration/legacysources/authswitchstores.ts +211 -0
- package/ts/ts_migration/legacysources/index.ts +35 -0
- package/ts/ts_migration/legacysources/material.ts +134 -0
- package/ts/ts_migration/legacysources/nativestores.ts +204 -0
- package/ts/ts_migration/legacysources/shared.ts +220 -0
- package/dist_ts/authorityrehearsal.child.d.ts +0 -1
- package/dist_ts/authorityrehearsal.child.js +0 -395
- package/dist_ts/classes.authoritybackup.d.ts +0 -134
- package/dist_ts/classes.authoritybackup.js +0 -769
- package/dist_ts/classes.authorityrehearsal.d.ts +0 -127
- package/dist_ts/classes.authorityrehearsal.js +0 -632
- package/ts/authorityrehearsal.child.ts +0 -330
- package/ts/classes.authoritybackup.ts +0 -780
- package/ts/classes.authorityrehearsal.ts +0 -625
|
@@ -4,8 +4,6 @@ import type { IAuthSwitchStoredUsage } from './classes.authorityusage.js';
|
|
|
4
4
|
|
|
5
5
|
export interface IStoredAuthorityMeta {
|
|
6
6
|
id: 'authswitch-authority';
|
|
7
|
-
schemaVersion: 2;
|
|
8
|
-
admission: 'open' | 'closed_restored';
|
|
9
7
|
epoch: string;
|
|
10
8
|
revision: number;
|
|
11
9
|
updateId: string;
|
|
@@ -53,6 +51,27 @@ export interface IStoredAuthorityGrant {
|
|
|
53
51
|
updateId: string;
|
|
54
52
|
}
|
|
55
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Whether a change of grant owner hands the refresher from one live owner to another.
|
|
56
|
+
*
|
|
57
|
+
* `daemon`, `legacy_native` and `claude_native` each refresh the grant they own, so moving between any two
|
|
58
|
+
* of them is a transfer and needs a verified handoff: doing it in one write would leave two owners believing
|
|
59
|
+
* they may send the same rotating refresh token. `none` is not an owner but the absence of one -- a grant
|
|
60
|
+
* that needs re-authentication has no refresher, and a device login gives it one -- so every transition to
|
|
61
|
+
* or from `none` is an ordinary lifecycle step, not a transfer.
|
|
62
|
+
*/
|
|
63
|
+
export const transfersGrantRefresher = (previous: IStoredAuthorityGrant['owner'],
|
|
64
|
+
next: IStoredAuthorityGrant['owner']): boolean =>
|
|
65
|
+
previous !== next && previous !== 'none' && next !== 'none';
|
|
66
|
+
|
|
67
|
+
/** The refusal that names the direction of a transfer, so a caller learns which handoff it needs. */
|
|
68
|
+
export const grantRefresherTransferRefusal = (previous: IStoredAuthorityGrant['owner'],
|
|
69
|
+
next: IStoredAuthorityGrant['owner']): string => next === 'daemon'
|
|
70
|
+
? 'Native ownership requires a verified handoff.'
|
|
71
|
+
: previous === 'daemon'
|
|
72
|
+
? 'Daemon ownership is released by a verified handoff.'
|
|
73
|
+
: 'Native ownership moves between native owners by a verified handoff.';
|
|
74
|
+
|
|
56
75
|
/** Credential-free provider usage cached for one exact account/login pair. */
|
|
57
76
|
export interface IStoredAuthorityUsage extends IAuthSwitchStoredUsage {
|
|
58
77
|
id: string;
|
|
@@ -153,7 +172,6 @@ export interface IStoredAuthorityHandoff {
|
|
|
153
172
|
operationId: string;
|
|
154
173
|
sourceDigest: string;
|
|
155
174
|
verifiedSourceDigest: string | null;
|
|
156
|
-
backupDigest: string | null;
|
|
157
175
|
revision: number;
|
|
158
176
|
statusObservedAt: string;
|
|
159
177
|
updateId: string;
|
|
@@ -169,7 +187,6 @@ export interface IStoredAuthorityMigrationLedger {
|
|
|
169
187
|
status: 'pending_native_owner' | 'prepared' | 'verified' | 'complete' | 'quarantined';
|
|
170
188
|
accountId: string | null;
|
|
171
189
|
grantId: string | null;
|
|
172
|
-
backupDigest: string | null;
|
|
173
190
|
revision: number;
|
|
174
191
|
statusObservedAt: string;
|
|
175
192
|
updateId: string;
|
|
@@ -206,7 +223,7 @@ export interface IStoredAuthorityDeviceOperation {
|
|
|
206
223
|
export type TStoredAuthorityPreuseProblem =
|
|
207
224
|
| 'none' | 'target_unavailable' | 'access_unavailable' | 'catalog_unavailable'
|
|
208
225
|
| 'account_busy' | 'cancelled' | 'authority_closing' | 'interrupted'
|
|
209
|
-
| 'request_uncertain'
|
|
226
|
+
| 'request_uncertain';
|
|
210
227
|
|
|
211
228
|
/** One quota-consuming request. The prompt and generated prose never enter persistence. */
|
|
212
229
|
export interface IStoredAuthorityPreuseOperation {
|
|
@@ -375,9 +392,8 @@ export const assertStoredAuthorityUsage: (value: unknown) => asserts value is IS
|
|
|
375
392
|
};
|
|
376
393
|
|
|
377
394
|
export const assertStoredAuthorityMeta: (value: unknown) => asserts value is IStoredAuthorityMeta = value => {
|
|
378
|
-
if (!object(value) || !exactKeys(value, ['id', '
|
|
379
|
-
|| value.id !== 'authswitch-authority' || value.
|
|
380
|
-
|| !['open', 'closed_restored'].includes(value.admission as string) || !uuid(value.epoch)
|
|
395
|
+
if (!object(value) || !exactKeys(value, ['id', 'epoch', 'revision', 'updateId'])
|
|
396
|
+
|| value.id !== 'authswitch-authority' || !uuid(value.epoch)
|
|
381
397
|
|| !revision(value.revision) || !uuid(value.updateId)) throw new Error('Invalid authswitch authority metadata.');
|
|
382
398
|
};
|
|
383
399
|
|
|
@@ -517,35 +533,36 @@ export const assertStoredAuthorityClaudeHandoff: (value: unknown) => asserts val
|
|
|
517
533
|
|
|
518
534
|
export const assertStoredAuthorityHandoff: (value: unknown) => asserts value is IStoredAuthorityHandoff = value => {
|
|
519
535
|
if (!object(value) || !exactKeys(value, ['id', 'accountId', 'grantId', 'nativeHomeId', 'direction', 'phase',
|
|
520
|
-
'operationId', 'sourceDigest', 'verifiedSourceDigest', '
|
|
536
|
+
'operationId', 'sourceDigest', 'verifiedSourceDigest', 'revision', 'statusObservedAt', 'updateId'])
|
|
521
537
|
|| !hash(value.id) || !hash(value.accountId) || !hash(value.grantId) || !hash(value.nativeHomeId)
|
|
522
538
|
|| !['to_native', 'to_daemon'].includes(String(value.direction))
|
|
523
539
|
|| !['prepared', 'source_stopped', 'target_written', 'verified', 'committed', 'needs_reauth', 'aborted'].includes(String(value.phase))
|
|
524
540
|
|| !uuid(value.operationId) || !hash(value.sourceDigest)
|
|
525
541
|
|| (value.verifiedSourceDigest !== null && !hash(value.verifiedSourceDigest))
|
|
526
|
-
|| (value.backupDigest !== null && !hash(value.backupDigest))
|
|
527
542
|
|| !revision(value.revision) || !iso(value.statusObservedAt) || !uuid(value.updateId)) {
|
|
528
543
|
throw new Error('Invalid authswitch handoff record.');
|
|
529
544
|
}
|
|
530
|
-
if (['verified', 'committed'].includes(String(value.phase))
|
|
531
|
-
|
|
532
|
-
throw new Error('A verified native handoff requires source and backup proof.');
|
|
545
|
+
if (['verified', 'committed'].includes(String(value.phase)) && value.verifiedSourceDigest === null) {
|
|
546
|
+
throw new Error('A verified native handoff requires source proof.');
|
|
533
547
|
}
|
|
534
548
|
};
|
|
535
549
|
|
|
536
550
|
export const assertStoredAuthorityMigrationLedger: (value: unknown) => asserts value is IStoredAuthorityMigrationLedger = value => {
|
|
537
551
|
if (!object(value) || !exactKeys(value, ['id', 'version', 'sourceKind', 'sourcePathHash', 'sourceDigest',
|
|
538
|
-
'status', 'accountId', 'grantId', '
|
|
552
|
+
'status', 'accountId', 'grantId', 'revision', 'statusObservedAt', 'updateId'])
|
|
539
553
|
|| !hash(value.id) || !revision(value.version) || value.version === 0
|
|
540
554
|
|| !['authswitch_stash', 'authswitch_backup', 'agl_flex', 'codex_native', 'opencode_native', 'claude_native'].includes(String(value.sourceKind))
|
|
541
555
|
|| !hash(value.sourcePathHash) || !hash(value.sourceDigest)
|
|
542
556
|
|| !['pending_native_owner', 'prepared', 'verified', 'complete', 'quarantined'].includes(String(value.status))
|
|
543
557
|
|| (value.accountId !== null && !hash(value.accountId))
|
|
544
558
|
|| (value.grantId !== null && !hash(value.grantId))
|
|
545
|
-
|| (value.backupDigest !== null && !hash(value.backupDigest))
|
|
546
559
|
|| !revision(value.revision) || !iso(value.statusObservedAt) || !uuid(value.updateId)) {
|
|
547
560
|
throw new Error('Invalid authswitch migration ledger record.');
|
|
548
561
|
}
|
|
562
|
+
// Every row carries its source digest; a verified import additionally names the account and grant it produced.
|
|
563
|
+
if (['verified', 'complete'].includes(String(value.status)) && (value.accountId === null || value.grantId === null)) {
|
|
564
|
+
throw new Error('A verified migration requires the imported account and grant.');
|
|
565
|
+
}
|
|
549
566
|
};
|
|
550
567
|
|
|
551
568
|
export const assertStoredAuthorityEvent: (value: unknown) => asserts value is IStoredAuthorityEvent = value => {
|
|
@@ -619,7 +636,7 @@ const assertStoredAuthorityPreuseOperation: (value: unknown) => asserts value is
|
|
|
619
636
|
|| (value.grantGeneration !== null && (!revision(value.grantGeneration) || value.grantGeneration === 0))
|
|
620
637
|
|| !['preparing', 'request_may_have_started', 'complete', 'not_sent', 'outcome_unknown'].includes(String(value.state))
|
|
621
638
|
|| !['none', 'target_unavailable', 'access_unavailable', 'catalog_unavailable', 'account_busy', 'cancelled',
|
|
622
|
-
'authority_closing', 'interrupted', 'request_uncertain'
|
|
639
|
+
'authority_closing', 'interrupted', 'request_uncertain'].includes(String(value.problem))
|
|
623
640
|
|| !iso(value.createdAt) || !iso(value.updatedAt)
|
|
624
641
|
|| (value.finishedAt !== null && !iso(value.finishedAt))
|
|
625
642
|
|| !revision(value.revision) || value.revision === 0 || !uuid(value.updateId)) {
|
|
@@ -651,14 +668,10 @@ const assertStoredAuthorityPreuseOperation: (value: unknown) => asserts value is
|
|
|
651
668
|
|| value.problem === 'none' || value.problem === 'request_uncertain' || value.finishedAt === null) {
|
|
652
669
|
throw new Error('Invalid unsent authswitch preuse operation.');
|
|
653
670
|
}
|
|
654
|
-
} else
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|| (restoredHistory ? !coherentMarker : value.model === null || value.grantGeneration === null
|
|
659
|
-
|| !['cancelled', 'authority_closing', 'request_uncertain'].includes(String(value.problem)))) {
|
|
660
|
-
throw new Error('Invalid uncertain authswitch preuse operation.');
|
|
661
|
-
}
|
|
671
|
+
} else if (value.result !== null || value.finishedAt === null || value.model === null
|
|
672
|
+
|| value.grantGeneration === null
|
|
673
|
+
|| !['cancelled', 'authority_closing', 'request_uncertain'].includes(String(value.problem))) {
|
|
674
|
+
throw new Error('Invalid uncertain authswitch preuse operation.');
|
|
662
675
|
}
|
|
663
676
|
};
|
|
664
677
|
|
|
@@ -670,273 +683,244 @@ export const assertStoredAuthorityOperationDocument: (value: unknown) => asserts
|
|
|
670
683
|
assertStoredAuthorityOperation(value);
|
|
671
684
|
};
|
|
672
685
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
assertStoredAuthorityOperation(operation);
|
|
682
|
-
const unresolvedDevice = operation.kind !== 'preuse_openai'
|
|
683
|
-
&& ['starting', 'pending', 'committing'].includes(operation.state);
|
|
684
|
-
const unresolvedPreuse = operation.kind === 'preuse_openai'
|
|
685
|
-
&& ['preparing', 'request_may_have_started'].includes(operation.state);
|
|
686
|
-
if (!unresolvedDevice && !unresolvedPreuse) return operation;
|
|
687
|
-
const restored: IStoredAuthorityOperation = operation.kind === 'preuse_openai'
|
|
688
|
-
? { ...operation, state: 'outcome_unknown', result: null, problem: 'restored_history_uncertain',
|
|
689
|
-
updatedAt: options.restoredAt, finishedAt: options.restoredAt,
|
|
690
|
-
revision: operation.revision + 1, updateId: options.updateId }
|
|
691
|
-
: { ...operation, state: 'interrupted', prompt: null, result: null, commitId: null,
|
|
692
|
-
error: 'Interrupted by authority restore.', updatedAt: options.restoredAt, finishedAt: options.restoredAt,
|
|
693
|
-
revision: operation.revision + 1, updateId: options.updateId };
|
|
694
|
-
assertStoredAuthorityOperation(restored);
|
|
695
|
-
return restored;
|
|
696
|
-
};
|
|
697
|
-
|
|
698
|
-
@plugins.smartdata.managed({ collectionName: 'authswitch_authority_meta' })
|
|
699
|
-
@plugins.smartdata.exactPersistence({ assertDocument: assertStoredAuthorityMeta })
|
|
700
|
-
export class AuthSwitchAuthorityMetaModel extends plugins.smartdata.SmartDataDbDoc<AuthSwitchAuthorityMetaModel, IStoredAuthorityMeta> {
|
|
701
|
-
declare static exact: plugins.smartdata.TExact<AuthSwitchAuthorityMetaModel>;
|
|
702
|
-
@plugins.smartdata.unI() public id!: 'authswitch-authority';
|
|
703
|
-
@plugins.smartdata.svDb() public schemaVersion!: 2;
|
|
704
|
-
@plugins.smartdata.svDb() public admission!: IStoredAuthorityMeta['admission'];
|
|
705
|
-
@plugins.smartdata.svDb() public epoch!: string;
|
|
706
|
-
@plugins.smartdata.svDb() public revision!: number;
|
|
707
|
-
@plugins.smartdata.svDb() public updateId!: string;
|
|
686
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_meta' })
|
|
687
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityMeta })
|
|
688
|
+
export class AuthSwitchAuthorityMetaModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityMetaModel, IStoredAuthorityMeta> {
|
|
689
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityMetaModel>;
|
|
690
|
+
@plugins.nosqldb.unI() public id!: 'authswitch-authority';
|
|
691
|
+
@plugins.nosqldb.svDb() public epoch!: string;
|
|
692
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
693
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
708
694
|
}
|
|
709
695
|
|
|
710
|
-
@plugins.
|
|
711
|
-
@plugins.
|
|
712
|
-
@plugins.
|
|
713
|
-
export class AuthSwitchAuthorityAccountModel extends plugins.
|
|
714
|
-
declare static exact: plugins.
|
|
715
|
-
@plugins.
|
|
716
|
-
@plugins.
|
|
717
|
-
@plugins.
|
|
718
|
-
@plugins.
|
|
719
|
-
@plugins.
|
|
720
|
-
@plugins.
|
|
721
|
-
@plugins.
|
|
722
|
-
@plugins.
|
|
723
|
-
@plugins.
|
|
724
|
-
@plugins.
|
|
725
|
-
@plugins.
|
|
726
|
-
@plugins.
|
|
727
|
-
@plugins.
|
|
696
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_account_provider_id', key: { providerId: 1, id: 1 } })
|
|
697
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_accounts' })
|
|
698
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityAccount })
|
|
699
|
+
export class AuthSwitchAuthorityAccountModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityAccountModel, IStoredAuthorityAccount> {
|
|
700
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityAccountModel>;
|
|
701
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
702
|
+
@plugins.nosqldb.svDb() public providerId!: string;
|
|
703
|
+
@plugins.nosqldb.svDb() public issuer!: string;
|
|
704
|
+
@plugins.nosqldb.svDb() public subject!: string;
|
|
705
|
+
@plugins.nosqldb.svDb() public workspaceId!: string;
|
|
706
|
+
@plugins.nosqldb.svDb() public label!: string;
|
|
707
|
+
@plugins.nosqldb.svDb() public email!: string | null;
|
|
708
|
+
@plugins.nosqldb.svDb() public plan!: string | null;
|
|
709
|
+
@plugins.nosqldb.svDb() public primaryGrantId!: string | null;
|
|
710
|
+
@plugins.nosqldb.svDb() public removed!: boolean;
|
|
711
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
712
|
+
@plugins.nosqldb.svDb() public statusObservedAt!: string;
|
|
713
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
728
714
|
}
|
|
729
715
|
|
|
730
|
-
@plugins.
|
|
731
|
-
@plugins.
|
|
732
|
-
@plugins.
|
|
733
|
-
@plugins.
|
|
734
|
-
export class AuthSwitchAuthorityGrantModel extends plugins.
|
|
735
|
-
declare static exact: plugins.
|
|
736
|
-
@plugins.
|
|
737
|
-
@plugins.
|
|
738
|
-
@plugins.
|
|
739
|
-
@plugins.
|
|
740
|
-
@plugins.
|
|
741
|
-
@plugins.
|
|
742
|
-
@plugins.
|
|
743
|
-
@plugins.
|
|
744
|
-
@plugins.
|
|
745
|
-
@plugins.
|
|
746
|
-
@plugins.
|
|
747
|
-
@plugins.
|
|
748
|
-
@plugins.
|
|
749
|
-
@plugins.
|
|
750
|
-
@plugins.
|
|
751
|
-
@plugins.
|
|
752
|
-
@plugins.
|
|
753
|
-
@plugins.
|
|
716
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_grant_state_id', key: { state: 1, id: 1 } })
|
|
717
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_grant_account_id', key: { accountId: 1, id: 1 } })
|
|
718
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_grants' })
|
|
719
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityGrant })
|
|
720
|
+
export class AuthSwitchAuthorityGrantModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityGrantModel, IStoredAuthorityGrant> {
|
|
721
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityGrantModel>;
|
|
722
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
723
|
+
@plugins.nosqldb.svDb() public accountId!: string;
|
|
724
|
+
@plugins.nosqldb.svDb() public providerId!: string;
|
|
725
|
+
@plugins.nosqldb.svDb() public purpose!: TStoredGrantPurpose;
|
|
726
|
+
@plugins.nosqldb.svDb() public audience!: string;
|
|
727
|
+
@plugins.nosqldb.svDb() public state!: IStoredAuthorityGrant['state'];
|
|
728
|
+
@plugins.nosqldb.svDb() public owner!: IStoredAuthorityGrant['owner'];
|
|
729
|
+
@plugins.nosqldb.svDb() public grantGeneration!: number;
|
|
730
|
+
@plugins.nosqldb.svDb() public authorizationGeneration!: number;
|
|
731
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
732
|
+
@plugins.nosqldb.svDb() public ciphertext!: string | null;
|
|
733
|
+
@plugins.nosqldb.svDb() public accessExpiresAt!: string | null;
|
|
734
|
+
@plugins.nosqldb.svDb() public attemptId!: string | null;
|
|
735
|
+
@plugins.nosqldb.svDb() public retryAt!: string | null;
|
|
736
|
+
@plugins.nosqldb.svDb() public retryCount!: number;
|
|
737
|
+
@plugins.nosqldb.svDb() public problem!: IStoredAuthorityGrant['problem'];
|
|
738
|
+
@plugins.nosqldb.svDb() public statusObservedAt!: string;
|
|
739
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
754
740
|
}
|
|
755
741
|
|
|
756
|
-
@plugins.
|
|
757
|
-
@plugins.
|
|
758
|
-
@plugins.
|
|
759
|
-
export class AuthSwitchAuthorityUsageModel extends plugins.
|
|
760
|
-
declare static exact: plugins.
|
|
761
|
-
@plugins.
|
|
762
|
-
@plugins.
|
|
763
|
-
@plugins.
|
|
764
|
-
@plugins.
|
|
765
|
-
@plugins.
|
|
766
|
-
@plugins.
|
|
767
|
-
@plugins.
|
|
768
|
-
@plugins.
|
|
769
|
-
@plugins.
|
|
770
|
-
@plugins.
|
|
771
|
-
@plugins.
|
|
772
|
-
@plugins.
|
|
773
|
-
@plugins.
|
|
742
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_usage_account_login', key: { accountId: 1, loginId: 1 }, options: { unique: true } })
|
|
743
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_usage' })
|
|
744
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityUsage })
|
|
745
|
+
export class AuthSwitchAuthorityUsageModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityUsageModel, IStoredAuthorityUsage> {
|
|
746
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityUsageModel>;
|
|
747
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
748
|
+
@plugins.nosqldb.svDb() public accountId!: string;
|
|
749
|
+
@plugins.nosqldb.svDb() public loginId!: string;
|
|
750
|
+
@plugins.nosqldb.svDb() public context!: IAuthSwitchStoredUsage['context'];
|
|
751
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
752
|
+
@plugins.nosqldb.svDb() public reading!: IAuthSwitchStoredUsage['reading'];
|
|
753
|
+
@plugins.nosqldb.svDb() public observedAt!: string | null;
|
|
754
|
+
@plugins.nosqldb.svDb() public currentUntil!: string | null;
|
|
755
|
+
@plugins.nosqldb.svDb() public staleUntil!: string | null;
|
|
756
|
+
@plugins.nosqldb.svDb() public lastAttemptAt!: string;
|
|
757
|
+
@plugins.nosqldb.svDb() public nextAttemptAt!: string;
|
|
758
|
+
@plugins.nosqldb.svDb() public failures!: number;
|
|
759
|
+
@plugins.nosqldb.svDb() public problem!: IAuthSwitchStoredUsage['problem'];
|
|
774
760
|
}
|
|
775
761
|
|
|
776
|
-
@plugins.
|
|
777
|
-
@plugins.
|
|
778
|
-
@plugins.
|
|
779
|
-
export class AuthSwitchAuthorityBindingModel extends plugins.
|
|
780
|
-
declare static exact: plugins.
|
|
781
|
-
@plugins.
|
|
782
|
-
@plugins.
|
|
783
|
-
@plugins.
|
|
784
|
-
@plugins.
|
|
785
|
-
@plugins.
|
|
786
|
-
@plugins.
|
|
787
|
-
@plugins.
|
|
788
|
-
@plugins.
|
|
789
|
-
@plugins.
|
|
790
|
-
@plugins.
|
|
762
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_binding_account_id', key: { accountId: 1, id: 1 } })
|
|
763
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_bindings' })
|
|
764
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityBinding })
|
|
765
|
+
export class AuthSwitchAuthorityBindingModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityBindingModel, IStoredAuthorityBinding> {
|
|
766
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityBindingModel>;
|
|
767
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
768
|
+
@plugins.nosqldb.svDb() public accountId!: string;
|
|
769
|
+
@plugins.nosqldb.svDb() public grantId!: string;
|
|
770
|
+
@plugins.nosqldb.svDb() public runtime!: IStoredAuthorityBinding['runtime'];
|
|
771
|
+
@plugins.nosqldb.svDb() public scopeId!: string;
|
|
772
|
+
@plugins.nosqldb.svDb() public incarnationId!: string;
|
|
773
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
774
|
+
@plugins.nosqldb.svDb() public grantAuthorizationGeneration!: number;
|
|
775
|
+
@plugins.nosqldb.svDb() public capabilityHash!: string;
|
|
776
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
791
777
|
}
|
|
792
778
|
|
|
793
|
-
@plugins.
|
|
794
|
-
@plugins.
|
|
795
|
-
@plugins.
|
|
796
|
-
export class AuthSwitchAuthorityEnrollmentModel extends plugins.
|
|
797
|
-
declare static exact: plugins.
|
|
798
|
-
@plugins.
|
|
799
|
-
@plugins.
|
|
800
|
-
@plugins.
|
|
801
|
-
@plugins.
|
|
802
|
-
@plugins.
|
|
779
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_enrollment_account_id', key: { accountId: 1, id: 1 } })
|
|
780
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_enrollments' })
|
|
781
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityEnrollment })
|
|
782
|
+
export class AuthSwitchAuthorityEnrollmentModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityEnrollmentModel, IStoredAuthorityEnrollment> {
|
|
783
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityEnrollmentModel>;
|
|
784
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
785
|
+
@plugins.nosqldb.svDb() public accountId!: string;
|
|
786
|
+
@plugins.nosqldb.svDb() public ciphertext!: string;
|
|
787
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
788
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
803
789
|
}
|
|
804
790
|
|
|
805
|
-
@plugins.
|
|
806
|
-
@plugins.
|
|
807
|
-
@plugins.
|
|
808
|
-
export class AuthSwitchAuthorityCodexHomeModel extends plugins.
|
|
809
|
-
declare static exact: plugins.
|
|
810
|
-
@plugins.
|
|
811
|
-
@plugins.
|
|
812
|
-
@plugins.
|
|
813
|
-
@plugins.
|
|
814
|
-
@plugins.
|
|
815
|
-
@plugins.
|
|
816
|
-
@plugins.
|
|
791
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_codex_home_account_id', key: { accountId: 1, id: 1 } })
|
|
792
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_codex_homes' })
|
|
793
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityCodexHome })
|
|
794
|
+
export class AuthSwitchAuthorityCodexHomeModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityCodexHomeModel, IStoredAuthorityCodexHome> {
|
|
795
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityCodexHomeModel>;
|
|
796
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
797
|
+
@plugins.nosqldb.svDb() public accountId!: string;
|
|
798
|
+
@plugins.nosqldb.svDb() public grantId!: string;
|
|
799
|
+
@plugins.nosqldb.svDb() public scopeId!: string;
|
|
800
|
+
@plugins.nosqldb.svDb() public activeRun!: IStoredAuthorityCodexHome['activeRun'];
|
|
801
|
+
@plugins.nosqldb.svDb() public createdAt!: string;
|
|
802
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
817
803
|
}
|
|
818
804
|
|
|
819
|
-
@plugins.
|
|
820
|
-
@plugins.
|
|
821
|
-
export class AuthSwitchAuthorityClaudeHomeModel extends plugins.
|
|
822
|
-
declare static exact: plugins.
|
|
823
|
-
@plugins.
|
|
824
|
-
@plugins.
|
|
825
|
-
@plugins.
|
|
826
|
-
@plugins.
|
|
827
|
-
@plugins.
|
|
828
|
-
@plugins.
|
|
829
|
-
@plugins.
|
|
830
|
-
@plugins.
|
|
805
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_claude_homes' })
|
|
806
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityClaudeHome })
|
|
807
|
+
export class AuthSwitchAuthorityClaudeHomeModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityClaudeHomeModel, IStoredAuthorityClaudeHome> {
|
|
808
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityClaudeHomeModel>;
|
|
809
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
810
|
+
@plugins.nosqldb.svDb() public activeAccountId!: string;
|
|
811
|
+
@plugins.nosqldb.index({ unique: true }) public activeGrantId!: string;
|
|
812
|
+
@plugins.nosqldb.svDb() public pendingOperationId!: string | null;
|
|
813
|
+
@plugins.nosqldb.svDb() public status!: IStoredAuthorityClaudeHome['status'];
|
|
814
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
815
|
+
@plugins.nosqldb.svDb() public createdAt!: string;
|
|
816
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
831
817
|
}
|
|
832
818
|
|
|
833
|
-
@plugins.
|
|
834
|
-
@plugins.
|
|
835
|
-
@plugins.
|
|
836
|
-
@plugins.
|
|
837
|
-
export class AuthSwitchAuthorityClaudeHandoffModel extends plugins.
|
|
838
|
-
declare static exact: plugins.
|
|
839
|
-
@plugins.
|
|
840
|
-
@plugins.
|
|
841
|
-
@plugins.
|
|
842
|
-
@plugins.
|
|
843
|
-
@plugins.
|
|
844
|
-
@plugins.
|
|
845
|
-
@plugins.
|
|
846
|
-
@plugins.
|
|
847
|
-
@plugins.
|
|
848
|
-
@plugins.
|
|
849
|
-
@plugins.
|
|
850
|
-
@plugins.
|
|
851
|
-
@plugins.
|
|
852
|
-
@plugins.
|
|
853
|
-
@plugins.
|
|
854
|
-
@plugins.
|
|
855
|
-
@plugins.
|
|
856
|
-
@plugins.
|
|
857
|
-
@plugins.
|
|
858
|
-
@plugins.
|
|
819
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_claude_handoff_home_phase', key: { homeId: 1, phase: 1, id: 1 } })
|
|
820
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_claude_handoff_phase_id', key: { phase: 1, id: 1 } })
|
|
821
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_claude_handoffs' })
|
|
822
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityClaudeHandoff })
|
|
823
|
+
export class AuthSwitchAuthorityClaudeHandoffModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityClaudeHandoffModel, IStoredAuthorityClaudeHandoff> {
|
|
824
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityClaudeHandoffModel>;
|
|
825
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
826
|
+
@plugins.nosqldb.svDb() public homeId!: string;
|
|
827
|
+
@plugins.nosqldb.svDb() public outgoingAccountId!: string;
|
|
828
|
+
@plugins.nosqldb.svDb() public outgoingGrantId!: string;
|
|
829
|
+
@plugins.nosqldb.svDb() public incomingAccountId!: string;
|
|
830
|
+
@plugins.nosqldb.svDb() public incomingGrantId!: string;
|
|
831
|
+
@plugins.nosqldb.svDb() public phase!: IStoredAuthorityClaudeHandoff['phase'];
|
|
832
|
+
@plugins.nosqldb.svDb() public before!: IStoredAuthorityNativePair | null;
|
|
833
|
+
@plugins.nosqldb.svDb() public after!: IStoredAuthorityNativePair | null;
|
|
834
|
+
@plugins.nosqldb.svDb() public sourceIdentity!: IStoredAuthorityNativeIdentity;
|
|
835
|
+
@plugins.nosqldb.svDb() public targetIdentity!: IStoredAuthorityNativeIdentity;
|
|
836
|
+
@plugins.nosqldb.svDb() public sourceAccessDigest!: string | null;
|
|
837
|
+
@plugins.nosqldb.svDb() public targetAccessDigest!: string | null;
|
|
838
|
+
@plugins.nosqldb.svDb() public sealedOutgoing!: string | null;
|
|
839
|
+
@plugins.nosqldb.svDb() public runningEffectiveAuth!: IStoredAuthorityClaudeHandoff['runningEffectiveAuth'];
|
|
840
|
+
@plugins.nosqldb.svDb() public problem!: IStoredAuthorityClaudeHandoff['problem'];
|
|
841
|
+
@plugins.nosqldb.svDb() public startedAt!: string;
|
|
842
|
+
@plugins.nosqldb.svDb() public updatedAt!: string;
|
|
843
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
844
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
859
845
|
}
|
|
860
846
|
|
|
861
|
-
@plugins.
|
|
862
|
-
@plugins.
|
|
863
|
-
@plugins.
|
|
864
|
-
export class AuthSwitchAuthorityHandoffModel extends plugins.
|
|
865
|
-
declare static exact: plugins.
|
|
866
|
-
@plugins.
|
|
867
|
-
@plugins.
|
|
868
|
-
@plugins.
|
|
869
|
-
@plugins.
|
|
870
|
-
@plugins.
|
|
871
|
-
@plugins.
|
|
872
|
-
@plugins.
|
|
873
|
-
@plugins.
|
|
874
|
-
@plugins.
|
|
875
|
-
@plugins.
|
|
876
|
-
@plugins.
|
|
877
|
-
@plugins.
|
|
878
|
-
@plugins.smartdata.svDb() public updateId!: string;
|
|
847
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_handoff_grant_id', key: { grantId: 1, id: 1 } })
|
|
848
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_handoffs' })
|
|
849
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityHandoff })
|
|
850
|
+
export class AuthSwitchAuthorityHandoffModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityHandoffModel, IStoredAuthorityHandoff> {
|
|
851
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityHandoffModel>;
|
|
852
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
853
|
+
@plugins.nosqldb.svDb() public accountId!: string;
|
|
854
|
+
@plugins.nosqldb.svDb() public grantId!: string;
|
|
855
|
+
@plugins.nosqldb.svDb() public nativeHomeId!: string;
|
|
856
|
+
@plugins.nosqldb.svDb() public direction!: IStoredAuthorityHandoff['direction'];
|
|
857
|
+
@plugins.nosqldb.svDb() public phase!: IStoredAuthorityHandoff['phase'];
|
|
858
|
+
@plugins.nosqldb.svDb() public operationId!: string;
|
|
859
|
+
@plugins.nosqldb.svDb() public sourceDigest!: string;
|
|
860
|
+
@plugins.nosqldb.svDb() public verifiedSourceDigest!: string | null;
|
|
861
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
862
|
+
@plugins.nosqldb.svDb() public statusObservedAt!: string;
|
|
863
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
879
864
|
}
|
|
880
865
|
|
|
881
|
-
@plugins.
|
|
882
|
-
@plugins.
|
|
883
|
-
@plugins.
|
|
884
|
-
@plugins.
|
|
885
|
-
export class AuthSwitchAuthorityMigrationLedgerModel extends plugins.
|
|
886
|
-
declare static exact: plugins.
|
|
887
|
-
@plugins.
|
|
888
|
-
@plugins.
|
|
889
|
-
@plugins.
|
|
890
|
-
@plugins.
|
|
891
|
-
@plugins.
|
|
892
|
-
@plugins.
|
|
893
|
-
@plugins.
|
|
894
|
-
@plugins.
|
|
895
|
-
@plugins.
|
|
896
|
-
@plugins.
|
|
897
|
-
@plugins.
|
|
898
|
-
@plugins.smartdata.svDb() public updateId!: string;
|
|
866
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_migration_status_id', key: { status: 1, id: 1 } })
|
|
867
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_migration_grant_status_id', key: { grantId: 1, status: 1, id: 1 } })
|
|
868
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_migration_ledger' })
|
|
869
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityMigrationLedger })
|
|
870
|
+
export class AuthSwitchAuthorityMigrationLedgerModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityMigrationLedgerModel, IStoredAuthorityMigrationLedger> {
|
|
871
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityMigrationLedgerModel>;
|
|
872
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
873
|
+
@plugins.nosqldb.svDb() public version!: number;
|
|
874
|
+
@plugins.nosqldb.svDb() public sourceKind!: IStoredAuthorityMigrationLedger['sourceKind'];
|
|
875
|
+
@plugins.nosqldb.svDb() public sourcePathHash!: string;
|
|
876
|
+
@plugins.nosqldb.svDb() public sourceDigest!: string;
|
|
877
|
+
@plugins.nosqldb.svDb() public status!: IStoredAuthorityMigrationLedger['status'];
|
|
878
|
+
@plugins.nosqldb.svDb() public accountId!: string | null;
|
|
879
|
+
@plugins.nosqldb.svDb() public grantId!: string | null;
|
|
880
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
881
|
+
@plugins.nosqldb.svDb() public statusObservedAt!: string;
|
|
882
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
899
883
|
}
|
|
900
884
|
|
|
901
|
-
@plugins.
|
|
902
|
-
@plugins.
|
|
903
|
-
@plugins.
|
|
904
|
-
export class AuthSwitchAuthorityEventModel extends plugins.
|
|
905
|
-
declare static exact: plugins.
|
|
906
|
-
@plugins.
|
|
907
|
-
@plugins.
|
|
908
|
-
@plugins.
|
|
909
|
-
@plugins.
|
|
910
|
-
@plugins.
|
|
885
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_event_revision_id', key: { revision: 1, id: 1 } })
|
|
886
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_events' })
|
|
887
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityEvent })
|
|
888
|
+
export class AuthSwitchAuthorityEventModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityEventModel, IStoredAuthorityEvent> {
|
|
889
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityEventModel>;
|
|
890
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
891
|
+
@plugins.nosqldb.svDb() public epoch!: string;
|
|
892
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
893
|
+
@plugins.nosqldb.svDb() public kind!: IStoredAuthorityEvent['kind'];
|
|
894
|
+
@plugins.nosqldb.svDb() public accountId!: string;
|
|
911
895
|
}
|
|
912
896
|
|
|
913
|
-
@plugins.
|
|
914
|
-
@plugins.
|
|
915
|
-
@plugins.
|
|
916
|
-
@plugins.
|
|
917
|
-
@plugins.
|
|
918
|
-
export class AuthSwitchAuthorityOperationModel extends plugins.
|
|
919
|
-
declare static exact: plugins.
|
|
920
|
-
@plugins.
|
|
921
|
-
@plugins.
|
|
922
|
-
@plugins.
|
|
923
|
-
@plugins.
|
|
924
|
-
@plugins.
|
|
925
|
-
@plugins.
|
|
926
|
-
@plugins.
|
|
927
|
-
@plugins.
|
|
928
|
-
@plugins.
|
|
929
|
-
@plugins.
|
|
930
|
-
@plugins.
|
|
931
|
-
@plugins.
|
|
932
|
-
@plugins.
|
|
933
|
-
@plugins.
|
|
934
|
-
@plugins.
|
|
935
|
-
@plugins.
|
|
936
|
-
@plugins.
|
|
937
|
-
@plugins.
|
|
938
|
-
@plugins.
|
|
939
|
-
@plugins.
|
|
940
|
-
@plugins.
|
|
941
|
-
@plugins.
|
|
897
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_operation_state_id', key: { state: 1, id: 1 } })
|
|
898
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_operation_account_id', key: { accountId: 1, id: 1 } })
|
|
899
|
+
@plugins.nosqldb.compoundIndex({ name: 'authority_operation_kind_id', key: { kind: 1, id: 1 } })
|
|
900
|
+
@plugins.nosqldb.managed({ collectionName: 'authswitch_authority_operations' })
|
|
901
|
+
@plugins.nosqldb.exactPersistence({ assertDocument: assertStoredAuthorityOperationDocument })
|
|
902
|
+
export class AuthSwitchAuthorityOperationModel extends plugins.nosqldb.SmartDataDbDoc<AuthSwitchAuthorityOperationModel, IStoredAuthorityOperationDocument> {
|
|
903
|
+
declare static exact: plugins.nosqldb.TExact<AuthSwitchAuthorityOperationModel>;
|
|
904
|
+
@plugins.nosqldb.unI() public id!: string;
|
|
905
|
+
@plugins.nosqldb.svDb() public kind!: IStoredAuthorityOperationDocument['kind'];
|
|
906
|
+
@plugins.nosqldb.svDb() public purpose!: IStoredAuthorityOperation['purpose'];
|
|
907
|
+
@plugins.nosqldb.svDb() public accountId!: string | null;
|
|
908
|
+
@plugins.nosqldb.svDb() public grantId!: string | null;
|
|
909
|
+
@plugins.nosqldb.svDb() public expectedGrantGeneration?: number | null;
|
|
910
|
+
@plugins.nosqldb.svDb() public state!: IStoredAuthorityOperationDocument['state'];
|
|
911
|
+
@plugins.nosqldb.svDb() public prompt?: TAuthSwitchLoginPrompt | null;
|
|
912
|
+
@plugins.nosqldb.svDb() public result!: IStoredAuthorityOperationDocument['result'];
|
|
913
|
+
@plugins.nosqldb.svDb() public error?: string | null;
|
|
914
|
+
@plugins.nosqldb.svDb() public commitId?: string | null;
|
|
915
|
+
@plugins.nosqldb.svDb() public requestHash?: string;
|
|
916
|
+
@plugins.nosqldb.svDb() public requestedModel?: string | null;
|
|
917
|
+
@plugins.nosqldb.svDb() public model?: string | null;
|
|
918
|
+
@plugins.nosqldb.svDb() public authorizationGeneration?: number;
|
|
919
|
+
@plugins.nosqldb.svDb() public grantGeneration?: number | null;
|
|
920
|
+
@plugins.nosqldb.svDb() public problem?: TStoredAuthorityPreuseProblem;
|
|
921
|
+
@plugins.nosqldb.svDb() public createdAt!: string;
|
|
922
|
+
@plugins.nosqldb.svDb() public updatedAt!: string;
|
|
923
|
+
@plugins.nosqldb.svDb() public finishedAt!: string | null;
|
|
924
|
+
@plugins.nosqldb.svDb() public revision!: number;
|
|
925
|
+
@plugins.nosqldb.svDb() public updateId!: string;
|
|
942
926
|
}
|