@oxy.so/contracts 2.2.0 → 4.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/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/accountEmail.js +21 -25
- package/dist/cjs/deviceBoot.js +2 -2
- package/dist/cjs/deviceSession.js +73 -16
- package/dist/cjs/externalIdentity.js +9 -3
- package/dist/cjs/identity.js +1 -3
- package/dist/cjs/identityLink.js +22 -19
- package/dist/cjs/identityProof.js +2 -2
- package/dist/cjs/index.js +59 -28
- package/dist/cjs/reputation.js +10 -55
- package/dist/cjs/signIn.js +304 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/accountEmail.js +21 -25
- package/dist/esm/deviceBoot.js +2 -2
- package/dist/esm/deviceSession.js +72 -15
- package/dist/esm/externalIdentity.js +8 -2
- package/dist/esm/identity.js +1 -3
- package/dist/esm/identityLink.js +21 -18
- package/dist/esm/identityProof.js +2 -2
- package/dist/esm/index.js +11 -11
- package/dist/esm/reputation.js +9 -54
- package/dist/esm/signIn.js +299 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/accountEmail.d.ts +20 -28
- package/dist/types/accountGraph.d.ts +4 -4
- package/dist/types/deviceBoot.d.ts +2 -2
- package/dist/types/deviceSession.d.ts +127 -15
- package/dist/types/externalIdentity.d.ts +53 -46
- package/dist/types/identity.d.ts +4 -8
- package/dist/types/identityLink.d.ts +54 -118
- package/dist/types/identityProof.d.ts +3 -3
- package/dist/types/index.d.ts +8 -8
- package/dist/types/inference/entitlement.d.ts +2 -2
- package/dist/types/oauth.d.ts +16 -16
- package/dist/types/reputation.d.ts +32 -127
- package/dist/types/signIn.d.ts +717 -0
- package/dist/types/userResponse.d.ts +2 -2
- package/package.json +1 -1
- package/dist/cjs/webauthn.js +0 -114
- package/dist/esm/webauthn.js +0 -111
- package/dist/types/webauthn.d.ts +0 -173
package/dist/types/index.d.ts
CHANGED
|
@@ -32,13 +32,13 @@ export { chainHeadResponseSchema, logPageResponseSchema, } from './protocol';
|
|
|
32
32
|
export type { LexiconRecord, ChainHeadResponse, LogPageResponse } from './protocol';
|
|
33
33
|
export { publicCardSchema, signedPublicCardSchema, realLifeAttestationRecordSchema, realLifeAttestationResultSchema, validationVerdictRecordSchema, validationOpenRequestSchema, validationOpenResultSchema, validationRequestSummarySchema, validationVoteResultSchema, personhoodVouchRecordSchema, personhoodBreakdownSchema, personhoodStatusResultSchema, vouchResultSchema, credentialRecordSchema, verifiableCredentialResponseSchema, credentialIssueResultSchema, credentialListResultSchema, credentialVerifyResultSchema, } from './civic';
|
|
34
34
|
export type { CardTrustTier, PersonhoodStatus, PublicCard, SignedPublicCard, RealLifeAttestationRecord, RealLifeAttestationResult, ValidationVerdict, ValidationRequestStatus, ValidationVerdictRecord, ValidationOpenRequest, ValidationOpenResult, ValidationRequestSummary, ValidationVoteResult, PersonhoodVouchRecord, PersonhoodBreakdown, PersonhoodStatusResult, VouchResult, CredentialStatus, CredentialRecord, VerifiableCredentialResponse, CredentialIssueResult, CredentialListResult, CredentialVerifyResult, } from './civic';
|
|
35
|
-
export { REPUTATION_CATEGORIES, REPUTATION_TRANSACTION_STATUSES, TRUST_TIERS, REPUTATION_TARGET_ENTITY_TYPES,
|
|
36
|
-
export type { ReputationCategory, ReputationTransactionStatus, TrustTier, ReputationTargetEntityType,
|
|
35
|
+
export { REPUTATION_CATEGORIES, REPUTATION_TRANSACTION_STATUSES, TRUST_TIERS, REPUTATION_TARGET_ENTITY_TYPES, REPUTATION_INFLUENCE_CONTEXTS, reputationCategorySchema, reputationTransactionStatusSchema, trustTierSchema, reputationTargetEntityTypeSchema, reputationInfluenceContextSchema, reputationTransactionSchema, reputationBalanceBreakdownSchema, reputationInfluenceSchema, reputationReliabilitySchema, reputationBalanceSummarySchema, reputationBalanceSchema, reputationRuleSchema, reputationRulesResponseSchema, reputationLeaderboardUserSchema, reputationLeaderboardEntrySchema, reputationInfluenceResultSchema, awardReputationSchema, isFullReputationBalance, } from './reputation';
|
|
36
|
+
export type { ReputationCategory, ReputationTransactionStatus, TrustTier, ReputationTargetEntityType, ReputationInfluenceContext, ReputationTransaction, ReputationBalanceBreakdown, ReputationInfluence, ReputationReliability, ReputationBalanceSummary, ReputationBalance, ReputationBalanceView, ReputationRule, ReputationRulesResponse, ReputationLeaderboardUser, ReputationLeaderboardEntry, ReputationInfluenceResult, AwardReputationInput, } from './reputation';
|
|
37
37
|
export { MODERATION_SEVERITIES, MODERATION_FINDING_SCOPES, MODERATION_ATTRIBUTIONS, MODERATION_DECISION_STATUSES, MODERATION_EFFECT_TYPES, MODERATION_EFFECT_STATUSES, MODERATION_EFFECT_SKIP_REASONS, CONDUCT_STRIKE_STATUSES, CONDUCT_STANDINGS, CONTRIBUTION_TIERS, PERSONHOOD_STATUSES, IDENTITY_BINDING_TYPES, IDENTITY_BINDING_STATUSES, APPLICATION_MODERATION_STANDINGS, moderationSeveritySchema, moderationFindingScopeSchema, moderationAttributionSchema, moderationDecisionStatusSchema, moderationEffectTypeSchema, moderationEffectStatusSchema, moderationEffectSkipReasonSchema, conductStrikeStatusSchema, conductStandingSchema, contributionTierSchema, personhoodStatusSchema, identityBindingTypeSchema, identityBindingStatusSchema, applicationModerationStandingSchema, moderationFindingSchema, moderationDecisionEventSubjectSchema, moderationPolicyVersionsSchema, moderationDecisionEventSchema, finalizeModerationDecisionSchema, reverseModerationEffectSchema, moderationEffectSchema, applyModerationDecisionResultSchema, reverseModerationEffectResultSchema, registerIdentityBindingSchema, identityBindingSchema, reputationPersonhoodSchema, reputationContributionSchema, reputationConductSchema, reputationReportingSchema, reputationReviewingSchema, reputationContextualInfluenceSchema, applicationModerationTrustSchema, } from './moderationReputation';
|
|
38
38
|
export type { ModerationSeverity, ModerationFindingScope, ModerationAttribution, ModerationDecisionStatus, ModerationEffectType, ModerationEffectStatus, ModerationEffectSkipReason, ConductStrikeStatus, ConductStanding, ContributionTier, PersonhoodStatusValue, IdentityBindingType, IdentityBindingStatus, ApplicationModerationStanding, ModerationFinding, ModerationDecisionEventSubject, ModerationPolicyVersions, ModerationDecisionEvent, FinalizeModerationDecisionInput, ReverseModerationEffectInput, ModerationEffect, ApplyModerationDecisionResult, ReverseModerationEffectResult, RegisterIdentityBindingInput, IdentityBinding, ReputationPersonhood, ReputationContribution, ReputationConduct, ReputationReporting, ReputationReviewing, ReputationContextualInfluence, ApplicationModerationTrust, } from './moderationReputation';
|
|
39
39
|
export type { FollowTargetKind, FollowState, FollowEffectiveState, FollowApplicationMode, FollowTarget, FollowRecord, FollowStatus, FollowMutation, UnfollowMutation, FollowListPage, FollowOptions, } from './followGraph';
|
|
40
|
-
export { sessionAccountSchema, deviceSessionStateSchema, activeTokenSchema, deviceSessionSyncSchema, deviceTokenMintRequestSchema, deviceTokenMintResponseSchema, deviceBackgroundCredentialResponseSchema, deviceBackgroundTokenRequestSchema, deviceBackgroundTokenResponseSchema, SESSION_ACCOUNTS_CHANGED_EVENT, sessionAccountsChangedReasonSchema, sessionAccountsChangedEventSchema, } from './deviceSession';
|
|
41
|
-
export type { SessionAccount, DeviceSessionState, ActiveToken, DeviceSessionSync, DeviceTokenMintRequest, DeviceTokenMintResponse, DeviceBackgroundCredentialResponse, DeviceBackgroundTokenRequest, DeviceBackgroundTokenResponse, SessionAccountsChangedReason, SessionAccountsChangedEvent, } from './deviceSession';
|
|
40
|
+
export { sessionAccountSchema, deviceSessionStateSchema, activeTokenSchema, deviceSessionSyncSchema, deviceTokenMintRequestSchema, deviceTokenMintResponseSchema, deviceBackgroundCredentialResponseSchema, deviceBackgroundTokenRequestSchema, deviceBackgroundTokenResponseSchema, deviceProofSchema, deviceRegisterResponseSchema, deviceJoinCodeRequestSchema, deviceJoinCodeResponseSchema, deviceJoinRequestSchema, deviceJoinResponseSchema, SESSION_ACCOUNTS_CHANGED_EVENT, sessionAccountsChangedReasonSchema, sessionAccountsChangedEventSchema, } from './deviceSession';
|
|
41
|
+
export type { SessionAccount, DeviceSessionState, ActiveToken, DeviceSessionSync, DeviceTokenMintRequest, DeviceTokenMintResponse, DeviceBackgroundCredentialResponse, DeviceBackgroundTokenRequest, DeviceBackgroundTokenResponse, DeviceProof, DeviceRegisterResponse, DeviceJoinCodeRequest, DeviceJoinCodeResponse, DeviceJoinRequest, DeviceJoinResponse, SessionAccountsChangedReason, SessionAccountsChangedEvent, } from './deviceSession';
|
|
42
42
|
export { deviceContextRelationshipSchema, deviceDirectoryProfileSchema, deviceAccountContextSchema, devicePrincipalSchema, deviceDirectorySchema, deviceActivateRequestSchema, deviceActivateResponseSchema, deviceDirectorySyncSchema, } from './deviceDirectory';
|
|
43
43
|
export type { DeviceContextRelationship, DeviceDirectoryProfile, DeviceAccountContext, DevicePrincipal, DeviceDirectory, DeviceActivateRequest, DeviceActivateResponse, DeviceDirectorySync, } from './deviceDirectory';
|
|
44
44
|
export { oauthConsentDecisionSchema, oauthAuthorizeCodeResponseSchema, mcpOAuthClientApplicationSchema, mcpOAuthWriteActionSchema, mcpOAuthConsentContextSchema, mcpOAuthClientInfoResponseSchema, mcpOAuthConsentResponseSchema, } from './oauth';
|
|
@@ -53,11 +53,11 @@ export { IDENTITY_PROOF_VERSION, IDENTITY_PROOF_DOMAIN, IDENTITY_PROOF_AUDIENCE,
|
|
|
53
53
|
export type { IdentityProofAction, IdentityErrorCode, IdentityProofClaims, IdentityProof, IdentityProofChallengeRequest, IdentityProofChallengeResponse, IdentityRootStatus, } from './identityProof';
|
|
54
54
|
export { updatePlatformSchema, updateStatusSchema, updateAssetStatusSchema, sha256HexSchema, channelNameSchema, runtimeVersionSchema, rolloutPercentSchema, assetInitItemSchema, assetInitRequestSchema, assetUploadTicketSchema, assetInitResponseSchema, assetCompleteRequestSchema, assetCompleteResultItemSchema, assetCompleteResponseSchema, updateAssetRefSchema, createUpdateRequestSchema, updateSchema, createUpdateResponseSchema, rollbackToEmbeddedEntrySchema, channelSchema, channelListResponseSchema, updateListResponseSchema, rollbackRequestSchema, rollbackToEmbeddedRequestSchema, promoteRequestSchema, updateRolloutPatchSchema, } from './updates';
|
|
55
55
|
export type { UpdatePlatform, UpdateStatus, UpdateAssetStatus, AssetInitItem, AssetInitRequest, AssetUploadTicket, AssetInitResponse, AssetCompleteRequest, AssetCompleteResultItem, AssetCompleteResponse, UpdateAssetRef, CreateUpdateRequest, Update, CreateUpdateResponse, RollbackToEmbeddedEntry, Channel, ChannelListResponse, UpdateListResponse, RollbackRequest, RollbackToEmbeddedRequest, PromoteRequest, UpdateRolloutPatch, } from './updates';
|
|
56
|
-
export { webauthnRegisterOptionsRequestSchema, webauthnLoginOptionsRequestSchema, webauthnRegisterVerifyRequestSchema, webauthnLoginVerifyRequestSchema, webauthnCredentialIdSchema, webauthnAssertionResponseSchema, } from './webauthn';
|
|
57
|
-
export type { WebauthnRegisterOptionsRequest, WebauthnLoginOptionsRequest, WebauthnRegisterVerifyRequest, WebauthnLoginVerifyRequest, WebauthnAssertionResponse, } from './webauthn';
|
|
58
56
|
export { EMAIL_VERIFICATION_PURPOSES, EMAIL_CODE_LENGTH, EMAIL_CODE_TTL_MS, EMAIL_CODE_MAX_ATTEMPTS, EMAIL_TICKET_TTL_MS, EMAIL_VERIFICATION_ERROR_CODES, emailAddressSchema, emailTicketSchema, emailVerificationStartRequestSchema, emailVerificationStartResponseSchema, emailVerificationConfirmRequestSchema, emailVerificationConfirmResponseSchema, } from './accountEmail';
|
|
59
|
-
export {
|
|
60
|
-
export type {
|
|
57
|
+
export { EMAIL_SIGNIN_LINK_TTL_MS, SIGNIN_SECOND_FACTOR_TTL_MS, SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS, PASSWORD_MIN_LENGTH, PASSWORD_MAX_LENGTH, TOTP_DIGITS, TOTP_PERIOD_SECONDS, TOTP_BACKUP_CODE_COUNT, SIGN_IN_ERROR_CODES, signInIdentifierSchema, passwordInputSchema, newPasswordSchema, secondFactorCodeSchema, emailSignInStartRequestSchema, emailSignInStartResponseSchema, emailSignInConfirmRequestSchema, emailSignInCodeSchema, normalizeEmailSignInCode, EMAIL_SIGNIN_LONG_CODE_ALPHABET, EMAIL_SIGNIN_LONG_CODE_LENGTH, emailSignInCollectRequestSchema, emailSignInLinkRequestSchema, emailSignInLinkResponseSchema, emailSignInPendingSchema, passwordSignInRequestSchema, secondFactorSignInRequestSchema, secondFactorRequiredSchema, signUpRequestSchema, isSecondFactorRequired, reauthProofSchema, emailReauthProofSchema, REAUTH_ACTIONS, reauthEmailStartRequestSchema, passwordSetRequestSchema, signInMethodsSchema, totpEnrollResponseSchema, totpConfirmRequestSchema, totpReauthRequestSchema, totpBackupCodesResponseSchema, } from './signIn';
|
|
58
|
+
export type { EmailSignInStartRequest, EmailSignInStartResponse, EmailSignInConfirmRequest, EmailSignInCollectRequest, EmailSignInLinkRequest, EmailSignInLinkResponse, EmailSignInPending, PasswordSignInRequest, SecondFactorSignInRequest, SecondFactorRequired, SignInStepResult, SignUpRequest, ReauthProof, EmailReauthProof, ReauthAction, ReauthEmailStartRequest, PasswordSetRequest, SignInMethods, TotpEnrollResponse, TotpConfirmRequest, TotpReauthRequest, TotpBackupCodesResponse, SignInErrorCode, } from './signIn';
|
|
59
|
+
export { IDENTITY_LINK_STATUSES, IDENTITY_LINK_QR_PREFIX, identityLinkIdSchema, buildIdentityLinkQrPayload, parseIdentityLinkQrPayload, identityLinkCreateResponseSchema, identityLinkStateSchema, identityLinkProofRequestSchema, identityLinkCompleteRequestSchema, } from './identityLink';
|
|
60
|
+
export type { IdentityLinkStatus, IdentityLinkCreateResponse, IdentityLinkState, IdentityLinkProofRequest, IdentityLinkCompleteRequest, } from './identityLink';
|
|
61
61
|
export type { EmailVerificationPurpose, EmailVerificationStartRequest, EmailVerificationStartResponse, EmailVerificationConfirmRequest, EmailVerificationConfirmResponse, EmailVerificationErrorCode, } from './accountEmail';
|
|
62
62
|
export { transparencyCheckpointSignatureSchema, transparencyAnchorSchema, transparencyCheckpointSchema, transparencyInclusionProofSchema, transparencyCheckpointListSchema, } from './transparency';
|
|
63
63
|
export type { TransparencyCheckpointSignature, TransparencyAnchor, TransparencyCheckpoint, TransparencyInclusionProof, TransparencyCheckpointList, } from './transparency';
|
|
@@ -429,7 +429,6 @@ export declare const productEntitlementSchema: z.ZodObject<{
|
|
|
429
429
|
}, "strict", z.ZodTypeAny, {
|
|
430
430
|
accountId: string & z.BRAND<"OxyAccountId">;
|
|
431
431
|
schemaVersion: 1;
|
|
432
|
-
resolvedAt: string;
|
|
433
432
|
allowances: {
|
|
434
433
|
key: string;
|
|
435
434
|
included: number;
|
|
@@ -467,10 +466,10 @@ export declare const productEntitlementSchema: z.ZodObject<{
|
|
|
467
466
|
availableToSpend: string & z.BRAND<"ExactDecimal">;
|
|
468
467
|
canSpend: boolean;
|
|
469
468
|
} | null;
|
|
469
|
+
resolvedAt: string;
|
|
470
470
|
}, {
|
|
471
471
|
accountId: string;
|
|
472
472
|
schemaVersion: 1;
|
|
473
|
-
resolvedAt: string;
|
|
474
473
|
allowances: {
|
|
475
474
|
key: string;
|
|
476
475
|
included: number;
|
|
@@ -508,6 +507,7 @@ export declare const productEntitlementSchema: z.ZodObject<{
|
|
|
508
507
|
availableToSpend: string;
|
|
509
508
|
canSpend: boolean;
|
|
510
509
|
} | null;
|
|
510
|
+
resolvedAt: string;
|
|
511
511
|
}>;
|
|
512
512
|
export type ProductPlanStatus = z.infer<typeof productPlanStatusSchema>;
|
|
513
513
|
export type PlanAllowance = z.infer<typeof planAllowanceSchema>;
|
package/dist/types/oauth.d.ts
CHANGED
|
@@ -106,10 +106,10 @@ export declare const mcpOAuthClientApplicationSchema: z.ZodObject<{
|
|
|
106
106
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
107
107
|
name: string;
|
|
108
108
|
id: string;
|
|
109
|
+
clientId: string;
|
|
109
110
|
isOfficial: boolean;
|
|
110
111
|
isInternal: boolean;
|
|
111
112
|
scopes: string[];
|
|
112
|
-
clientId: string;
|
|
113
113
|
description?: string | undefined;
|
|
114
114
|
icon?: string | undefined;
|
|
115
115
|
websiteUrl?: string | undefined;
|
|
@@ -120,10 +120,10 @@ export declare const mcpOAuthClientApplicationSchema: z.ZodObject<{
|
|
|
120
120
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
121
121
|
name: string;
|
|
122
122
|
id: string;
|
|
123
|
+
clientId: string;
|
|
123
124
|
isOfficial: boolean;
|
|
124
125
|
isInternal: boolean;
|
|
125
126
|
scopes: string[];
|
|
126
|
-
clientId: string;
|
|
127
127
|
description?: string | undefined;
|
|
128
128
|
icon?: string | undefined;
|
|
129
129
|
websiteUrl?: string | undefined;
|
|
@@ -215,10 +215,10 @@ export declare const mcpOAuthConsentContextSchema: z.ZodObject<{
|
|
|
215
215
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
216
216
|
name: string;
|
|
217
217
|
id: string;
|
|
218
|
+
clientId: string;
|
|
218
219
|
isOfficial: boolean;
|
|
219
220
|
isInternal: boolean;
|
|
220
221
|
scopes: string[];
|
|
221
|
-
clientId: string;
|
|
222
222
|
description?: string | undefined;
|
|
223
223
|
icon?: string | undefined;
|
|
224
224
|
websiteUrl?: string | undefined;
|
|
@@ -229,10 +229,10 @@ export declare const mcpOAuthConsentContextSchema: z.ZodObject<{
|
|
|
229
229
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
230
230
|
name: string;
|
|
231
231
|
id: string;
|
|
232
|
+
clientId: string;
|
|
232
233
|
isOfficial: boolean;
|
|
233
234
|
isInternal: boolean;
|
|
234
235
|
scopes: string[];
|
|
235
|
-
clientId: string;
|
|
236
236
|
description?: string | undefined;
|
|
237
237
|
icon?: string | undefined;
|
|
238
238
|
websiteUrl?: string | undefined;
|
|
@@ -423,10 +423,10 @@ export declare const mcpOAuthConsentContextSchema: z.ZodObject<{
|
|
|
423
423
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
424
424
|
name: string;
|
|
425
425
|
id: string;
|
|
426
|
+
clientId: string;
|
|
426
427
|
isOfficial: boolean;
|
|
427
428
|
isInternal: boolean;
|
|
428
429
|
scopes: string[];
|
|
429
|
-
clientId: string;
|
|
430
430
|
description?: string | undefined;
|
|
431
431
|
icon?: string | undefined;
|
|
432
432
|
websiteUrl?: string | undefined;
|
|
@@ -471,10 +471,10 @@ export declare const mcpOAuthConsentContextSchema: z.ZodObject<{
|
|
|
471
471
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
472
472
|
name: string;
|
|
473
473
|
id: string;
|
|
474
|
+
clientId: string;
|
|
474
475
|
isOfficial: boolean;
|
|
475
476
|
isInternal: boolean;
|
|
476
477
|
scopes: string[];
|
|
477
|
-
clientId: string;
|
|
478
478
|
description?: string | undefined;
|
|
479
479
|
icon?: string | undefined;
|
|
480
480
|
websiteUrl?: string | undefined;
|
|
@@ -510,10 +510,10 @@ export declare const mcpOAuthClientInfoResponseSchema: z.ZodObject<{
|
|
|
510
510
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
511
511
|
name: string;
|
|
512
512
|
id: string;
|
|
513
|
+
clientId: string;
|
|
513
514
|
isOfficial: boolean;
|
|
514
515
|
isInternal: boolean;
|
|
515
516
|
scopes: string[];
|
|
516
|
-
clientId: string;
|
|
517
517
|
description?: string | undefined;
|
|
518
518
|
icon?: string | undefined;
|
|
519
519
|
websiteUrl?: string | undefined;
|
|
@@ -524,10 +524,10 @@ export declare const mcpOAuthClientInfoResponseSchema: z.ZodObject<{
|
|
|
524
524
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
525
525
|
name: string;
|
|
526
526
|
id: string;
|
|
527
|
+
clientId: string;
|
|
527
528
|
isOfficial: boolean;
|
|
528
529
|
isInternal: boolean;
|
|
529
530
|
scopes: string[];
|
|
530
|
-
clientId: string;
|
|
531
531
|
description?: string | undefined;
|
|
532
532
|
icon?: string | undefined;
|
|
533
533
|
websiteUrl?: string | undefined;
|
|
@@ -540,10 +540,10 @@ export declare const mcpOAuthClientInfoResponseSchema: z.ZodObject<{
|
|
|
540
540
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
541
541
|
name: string;
|
|
542
542
|
id: string;
|
|
543
|
+
clientId: string;
|
|
543
544
|
isOfficial: boolean;
|
|
544
545
|
isInternal: boolean;
|
|
545
546
|
scopes: string[];
|
|
546
|
-
clientId: string;
|
|
547
547
|
description?: string | undefined;
|
|
548
548
|
icon?: string | undefined;
|
|
549
549
|
websiteUrl?: string | undefined;
|
|
@@ -556,10 +556,10 @@ export declare const mcpOAuthClientInfoResponseSchema: z.ZodObject<{
|
|
|
556
556
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
557
557
|
name: string;
|
|
558
558
|
id: string;
|
|
559
|
+
clientId: string;
|
|
559
560
|
isOfficial: boolean;
|
|
560
561
|
isInternal: boolean;
|
|
561
562
|
scopes: string[];
|
|
562
|
-
clientId: string;
|
|
563
563
|
description?: string | undefined;
|
|
564
564
|
icon?: string | undefined;
|
|
565
565
|
websiteUrl?: string | undefined;
|
|
@@ -590,10 +590,10 @@ export declare const mcpOAuthConsentResponseSchema: z.ZodObject<{
|
|
|
590
590
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
591
591
|
name: string;
|
|
592
592
|
id: string;
|
|
593
|
+
clientId: string;
|
|
593
594
|
isOfficial: boolean;
|
|
594
595
|
isInternal: boolean;
|
|
595
596
|
scopes: string[];
|
|
596
|
-
clientId: string;
|
|
597
597
|
description?: string | undefined;
|
|
598
598
|
icon?: string | undefined;
|
|
599
599
|
websiteUrl?: string | undefined;
|
|
@@ -604,10 +604,10 @@ export declare const mcpOAuthConsentResponseSchema: z.ZodObject<{
|
|
|
604
604
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
605
605
|
name: string;
|
|
606
606
|
id: string;
|
|
607
|
+
clientId: string;
|
|
607
608
|
isOfficial: boolean;
|
|
608
609
|
isInternal: boolean;
|
|
609
610
|
scopes: string[];
|
|
610
|
-
clientId: string;
|
|
611
611
|
description?: string | undefined;
|
|
612
612
|
icon?: string | undefined;
|
|
613
613
|
websiteUrl?: string | undefined;
|
|
@@ -798,10 +798,10 @@ export declare const mcpOAuthConsentResponseSchema: z.ZodObject<{
|
|
|
798
798
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
799
799
|
name: string;
|
|
800
800
|
id: string;
|
|
801
|
+
clientId: string;
|
|
801
802
|
isOfficial: boolean;
|
|
802
803
|
isInternal: boolean;
|
|
803
804
|
scopes: string[];
|
|
804
|
-
clientId: string;
|
|
805
805
|
description?: string | undefined;
|
|
806
806
|
icon?: string | undefined;
|
|
807
807
|
websiteUrl?: string | undefined;
|
|
@@ -846,10 +846,10 @@ export declare const mcpOAuthConsentResponseSchema: z.ZodObject<{
|
|
|
846
846
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
847
847
|
name: string;
|
|
848
848
|
id: string;
|
|
849
|
+
clientId: string;
|
|
849
850
|
isOfficial: boolean;
|
|
850
851
|
isInternal: boolean;
|
|
851
852
|
scopes: string[];
|
|
852
|
-
clientId: string;
|
|
853
853
|
description?: string | undefined;
|
|
854
854
|
icon?: string | undefined;
|
|
855
855
|
websiteUrl?: string | undefined;
|
|
@@ -896,10 +896,10 @@ export declare const mcpOAuthConsentResponseSchema: z.ZodObject<{
|
|
|
896
896
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
897
897
|
name: string;
|
|
898
898
|
id: string;
|
|
899
|
+
clientId: string;
|
|
899
900
|
isOfficial: boolean;
|
|
900
901
|
isInternal: boolean;
|
|
901
902
|
scopes: string[];
|
|
902
|
-
clientId: string;
|
|
903
903
|
description?: string | undefined;
|
|
904
904
|
icon?: string | undefined;
|
|
905
905
|
websiteUrl?: string | undefined;
|
|
@@ -947,10 +947,10 @@ export declare const mcpOAuthConsentResponseSchema: z.ZodObject<{
|
|
|
947
947
|
type: "system" | "internal" | "first_party" | "third_party";
|
|
948
948
|
name: string;
|
|
949
949
|
id: string;
|
|
950
|
+
clientId: string;
|
|
950
951
|
isOfficial: boolean;
|
|
951
952
|
isInternal: boolean;
|
|
952
953
|
scopes: string[];
|
|
953
|
-
clientId: string;
|
|
954
954
|
description?: string | undefined;
|
|
955
955
|
icon?: string | undefined;
|
|
956
956
|
websiteUrl?: string | undefined;
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SINGLE SOURCE OF TRUTH for the reputation ledger's wire shapes: the closed
|
|
5
5
|
* value sets (`REPUTATION_CATEGORIES`, `TRUST_TIERS`, …), the response entities
|
|
6
|
-
* (`ReputationTransaction`, the two balance views, `
|
|
7
|
-
*
|
|
8
|
-
* endpoints accept. The API validates its OUTPUT against these schemas and its
|
|
6
|
+
* (`ReputationTransaction`, the two balance views, `ReputationRule`, the
|
|
7
|
+
* leaderboard entry) and the award body. The API validates its OUTPUT against these schemas and its
|
|
9
8
|
* INPUT with the same request schemas the SDK's input types are derived from;
|
|
10
9
|
* `@oxy.so/core`'s reputation mixin imports every type from here rather than
|
|
11
10
|
* declaring its own.
|
|
@@ -61,13 +60,13 @@ export declare const reputationCategorySchema: z.ZodEnum<["content", "social", "
|
|
|
61
60
|
* Transaction lifecycle status.
|
|
62
61
|
*
|
|
63
62
|
* - `active` — counts toward the balance.
|
|
64
|
-
* - `
|
|
65
|
-
* -
|
|
66
|
-
*
|
|
63
|
+
* - `reversed` — superseded by a compensating reversal transaction (written
|
|
64
|
+
* only by policy-driven code, never by a person); the pair nets
|
|
65
|
+
* to zero.
|
|
67
66
|
*/
|
|
68
|
-
export declare const REPUTATION_TRANSACTION_STATUSES: readonly ["active", "
|
|
67
|
+
export declare const REPUTATION_TRANSACTION_STATUSES: readonly ["active", "reversed"];
|
|
69
68
|
export type ReputationTransactionStatus = (typeof REPUTATION_TRANSACTION_STATUSES)[number];
|
|
70
|
-
export declare const reputationTransactionStatusSchema: z.ZodEnum<["active", "
|
|
69
|
+
export declare const reputationTransactionStatusSchema: z.ZodEnum<["active", "reversed"]>;
|
|
71
70
|
/**
|
|
72
71
|
* Trust tiers, lowest → highest trust, plus the punitive `restricted`.
|
|
73
72
|
*
|
|
@@ -82,22 +81,16 @@ export declare const trustTierSchema: z.ZodEnum<["restricted", "new", "trusted",
|
|
|
82
81
|
export declare const REPUTATION_TARGET_ENTITY_TYPES: readonly ["post", "comment", "report", "purchase", "event", "check_in", "manual_review", "user", "other"];
|
|
83
82
|
export type ReputationTargetEntityType = (typeof REPUTATION_TARGET_ENTITY_TYPES)[number];
|
|
84
83
|
export declare const reputationTargetEntityTypeSchema: z.ZodEnum<["post", "comment", "report", "purchase", "event", "check_in", "manual_review", "user", "other"]>;
|
|
85
|
-
/** Dispute lifecycle status. */
|
|
86
|
-
export declare const REPUTATION_DISPUTE_STATUSES: readonly ["open", "accepted", "rejected", "needs_review"];
|
|
87
|
-
export type ReputationDisputeStatus = (typeof REPUTATION_DISPUTE_STATUSES)[number];
|
|
88
|
-
export declare const reputationDisputeStatusSchema: z.ZodEnum<["open", "accepted", "rejected", "needs_review"]>;
|
|
89
|
-
/** Influence context selecting which capped weight axis to read. */
|
|
90
84
|
export declare const REPUTATION_INFLUENCE_CONTEXTS: readonly ["default", "report", "moderation", "ranking"];
|
|
91
85
|
export type ReputationInfluenceContext = (typeof REPUTATION_INFLUENCE_CONTEXTS)[number];
|
|
92
86
|
export declare const reputationInfluenceContextSchema: z.ZodEnum<["default", "report", "moderation", "ranking"]>;
|
|
93
87
|
/**
|
|
94
88
|
* A single immutable entry in the reputation ledger.
|
|
95
89
|
*
|
|
96
|
-
* The ledger is append-only: transactions are NEVER deleted. A correction is
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* marked `voided` and excluded from the balance, with no compensating entry).
|
|
90
|
+
* The ledger is append-only: transactions are NEVER deleted. A correction is a
|
|
91
|
+
* compensating REVERSAL (the original is marked `reversed` and a new `active`
|
|
92
|
+
* transaction with negated points and `reversedTransactionId` pointing at it is
|
|
93
|
+
* appended), written only by policy-driven code — never by a person.
|
|
101
94
|
*/
|
|
102
95
|
export interface ReputationTransaction {
|
|
103
96
|
/** The transaction's Mongo `_id` as a string. */
|
|
@@ -136,12 +129,12 @@ export interface ReputationTransaction {
|
|
|
136
129
|
*
|
|
137
130
|
* Names third parties (the attestor who physically met the subject, the
|
|
138
131
|
* staking voucher, a resolved validation's juror roster), which is why the
|
|
139
|
-
* ledger
|
|
132
|
+
* ledger is readable by its subject alone.
|
|
140
133
|
*/
|
|
141
134
|
metadata?: Record<string, unknown>;
|
|
142
|
-
/** The user who caused this change (the liker, the reporting user
|
|
135
|
+
/** The user who caused this change (the liker, the reporting user). */
|
|
143
136
|
createdByUserId?: string;
|
|
144
|
-
/**
|
|
137
|
+
/** The principal whose policy-driven action reversed this transaction. */
|
|
145
138
|
reviewedByUserId?: string;
|
|
146
139
|
/** ISO 8601 timestamp the transaction was reviewed at, if reviewed. */
|
|
147
140
|
reviewedAt?: string;
|
|
@@ -194,8 +187,8 @@ export interface ReputationReliability {
|
|
|
194
187
|
}
|
|
195
188
|
export declare const reputationReliabilitySchema: z.ZodType<ReputationReliability>;
|
|
196
189
|
/**
|
|
197
|
-
* The PUBLIC view of a user's reputation — everything a caller who is
|
|
198
|
-
*
|
|
190
|
+
* The PUBLIC view of a user's reputation — everything a caller who is not the
|
|
191
|
+
* subject receives from `GET /reputation/:userId/balance`.
|
|
199
192
|
*
|
|
200
193
|
* Deliberately limited to the two signals the already-public
|
|
201
194
|
* `GET /reputation/leaderboard` publishes per user, so an untokened read of a
|
|
@@ -210,7 +203,7 @@ export interface ReputationBalanceSummary {
|
|
|
210
203
|
export declare const reputationBalanceSummarySchema: z.ZodType<ReputationBalanceSummary>;
|
|
211
204
|
/**
|
|
212
205
|
* The SUBJECT view of a user's reputation — the cached, recomputable snapshot in
|
|
213
|
-
* full, served only to the subject themselves
|
|
206
|
+
* full, served only to the subject themselves.
|
|
214
207
|
*
|
|
215
208
|
* Everything beyond {@link ReputationBalanceSummary} is the platform's internal
|
|
216
209
|
* judgement about the person and is withheld from third parties: `reliability`
|
|
@@ -219,9 +212,8 @@ export declare const reputationBalanceSummarySchema: z.ZodType<ReputationBalance
|
|
|
219
212
|
* decomposition (which exposes sanction history the total alone hides), and the
|
|
220
213
|
* timestamps (a timing oracle for the subject's last reputation event).
|
|
221
214
|
*
|
|
222
|
-
* Reach this type by reading YOUR OWN balance (`
|
|
223
|
-
* narrowing a {@link ReputationBalanceView} with {@link isFullReputationBalance}
|
|
224
|
-
* or from the staff-only `recalculateReputation`.
|
|
215
|
+
* Reach this type by reading YOUR OWN balance (`oxy.reputation.balance()`), or
|
|
216
|
+
* by narrowing a {@link ReputationBalanceView} with {@link isFullReputationBalance}.
|
|
225
217
|
*/
|
|
226
218
|
export interface ReputationBalance extends ReputationBalanceSummary {
|
|
227
219
|
/** Sum of positive points only. */
|
|
@@ -254,7 +246,7 @@ export interface ReputationBalance extends ReputationBalanceSummary {
|
|
|
254
246
|
export declare const reputationBalanceSchema: z.ZodType<ReputationBalance>;
|
|
255
247
|
/**
|
|
256
248
|
* What `GET /reputation/:userId/balance` may return for an ARBITRARY subject:
|
|
257
|
-
* the full {@link ReputationBalance} when the caller is that subject
|
|
249
|
+
* the full {@link ReputationBalance} when the caller is that subject,
|
|
258
250
|
* the {@link ReputationBalanceSummary} otherwise.
|
|
259
251
|
*
|
|
260
252
|
* The server decides at request time from the caller's token, so a client asking
|
|
@@ -274,36 +266,11 @@ export type ReputationBalanceView = ReputationBalance | ReputationBalanceSummary
|
|
|
274
266
|
* @param balance - A balance from `getReputationBalance`.
|
|
275
267
|
*/
|
|
276
268
|
export declare function isFullReputationBalance(balance: ReputationBalanceView): balance is ReputationBalance;
|
|
277
|
-
/** A user-initiated dispute against a specific reputation transaction. */
|
|
278
|
-
export interface ReputationDispute {
|
|
279
|
-
/** The dispute's Mongo `_id` as a string. */
|
|
280
|
-
id: string;
|
|
281
|
-
/** The transaction being disputed. */
|
|
282
|
-
transactionId: string;
|
|
283
|
-
/** The user raising the dispute. */
|
|
284
|
-
userId: string;
|
|
285
|
-
/** Why the user believes the transaction is wrong. */
|
|
286
|
-
reason: string;
|
|
287
|
-
status: ReputationDisputeStatus;
|
|
288
|
-
/** Optional supporting evidence (URLs / references). */
|
|
289
|
-
evidence?: string[];
|
|
290
|
-
/** ISO 8601 timestamp the dispute was resolved at, if resolved. */
|
|
291
|
-
resolvedAt?: string;
|
|
292
|
-
/** Staff principal who resolved the dispute, if resolved. */
|
|
293
|
-
resolvedByUserId?: string;
|
|
294
|
-
/** ISO 8601 creation timestamp. */
|
|
295
|
-
createdAt: string;
|
|
296
|
-
/** ISO 8601 last-update timestamp. */
|
|
297
|
-
updatedAt: string;
|
|
298
|
-
}
|
|
299
|
-
export declare const reputationDisputeSchema: z.ZodType<ReputationDispute>;
|
|
300
269
|
/**
|
|
301
|
-
* A
|
|
302
|
-
*
|
|
270
|
+
* A reputation award/penalty rule, keyed by `actionType`. Rules are defined in
|
|
271
|
+
* Oxy's code and versioned; no endpoint edits them.
|
|
303
272
|
*/
|
|
304
273
|
export interface ReputationRule {
|
|
305
|
-
/** The rule's Mongo `_id` as a string. */
|
|
306
|
-
id: string;
|
|
307
274
|
/** Unique action key (e.g. `post_created`). */
|
|
308
275
|
actionType: string;
|
|
309
276
|
/** Signed points the rule awards (may be negative for penalties). */
|
|
@@ -313,9 +280,14 @@ export interface ReputationRule {
|
|
|
313
280
|
description: string;
|
|
314
281
|
/** Per (user, actionType) cooldown in minutes; 0 disables the cooldown. */
|
|
315
282
|
cooldownInMinutes: number;
|
|
316
|
-
isEnabled: boolean;
|
|
317
283
|
}
|
|
318
284
|
export declare const reputationRuleSchema: z.ZodType<ReputationRule>;
|
|
285
|
+
/** `GET /reputation/rules` — the rules in code and their version. */
|
|
286
|
+
export interface ReputationRulesResponse {
|
|
287
|
+
version: number;
|
|
288
|
+
rules: ReputationRule[];
|
|
289
|
+
}
|
|
290
|
+
export declare const reputationRulesResponseSchema: z.ZodType<ReputationRulesResponse>;
|
|
319
291
|
/**
|
|
320
292
|
* The user a {@link ReputationLeaderboardEntry} is about.
|
|
321
293
|
*
|
|
@@ -357,23 +329,13 @@ export interface ReputationInfluenceResult {
|
|
|
357
329
|
influence: ReputationInfluence;
|
|
358
330
|
}
|
|
359
331
|
export declare const reputationInfluenceResultSchema: z.ZodType<ReputationInfluenceResult>;
|
|
360
|
-
/**
|
|
361
|
-
* `POST /reputation/transactions/:id/reverse` — the now-`reversed` original plus
|
|
362
|
-
* the compensating `active` reversal entry.
|
|
363
|
-
*/
|
|
364
|
-
export interface ReverseReputationTransactionResult {
|
|
365
|
-
original: ReputationTransaction;
|
|
366
|
-
reversal: ReputationTransaction;
|
|
367
|
-
}
|
|
368
|
-
export declare const reverseReputationTransactionResultSchema: z.ZodType<ReverseReputationTransactionResult>;
|
|
369
332
|
/**
|
|
370
333
|
* `POST /reputation/award`.
|
|
371
334
|
*
|
|
372
|
-
*
|
|
373
|
-
* `reputation:write` scope
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
* from the token and any client-supplied values for those two are ignored.
|
|
335
|
+
* Only a source app awards: a service token carrying the privileged
|
|
336
|
+
* `reputation:write` scope reports an action, priced by the rule in code. No
|
|
337
|
+
* person — user or Oxy staff — may award. `applicationId` / `credentialId` are
|
|
338
|
+
* resolved from the token; client-supplied values for those two are ignored.
|
|
377
339
|
*/
|
|
378
340
|
export interface AwardReputationInput {
|
|
379
341
|
/** The subject whose reputation changes (`_id` or publicKey). */
|
|
@@ -398,60 +360,3 @@ export interface AwardReputationInput {
|
|
|
398
360
|
metadata?: Record<string, unknown>;
|
|
399
361
|
}
|
|
400
362
|
export declare const awardReputationSchema: z.ZodType<AwardReputationInput>;
|
|
401
|
-
/**
|
|
402
|
-
* `POST /reputation/disputes` — open a dispute. The disputer is the
|
|
403
|
-
* authenticated user and must be the disputed transaction's subject.
|
|
404
|
-
*/
|
|
405
|
-
export interface CreateReputationDisputeInput {
|
|
406
|
-
/** The transaction being disputed. */
|
|
407
|
-
transactionId: string;
|
|
408
|
-
/** Why the transaction is believed to be wrong (1..1000 chars). */
|
|
409
|
-
reason: string;
|
|
410
|
-
/** Optional supporting evidence (URLs / references; max 20). */
|
|
411
|
-
evidence?: string[];
|
|
412
|
-
}
|
|
413
|
-
export declare const createReputationDisputeSchema: z.ZodType<CreateReputationDisputeInput>;
|
|
414
|
-
/** `POST /reputation/disputes/:id/resolve` (staff). */
|
|
415
|
-
export interface ResolveReputationDisputeInput {
|
|
416
|
-
/** Accepting reverses the disputed transaction; rejecting restores it. */
|
|
417
|
-
status: 'accepted' | 'rejected';
|
|
418
|
-
}
|
|
419
|
-
export declare const resolveReputationDisputeSchema: z.ZodType<ResolveReputationDisputeInput>;
|
|
420
|
-
/**
|
|
421
|
-
* `POST /reputation/rules` (staff) — create or update a rule, keyed by
|
|
422
|
-
* `actionType`. `cooldownInMinutes` and `isEnabled` may be omitted; the server
|
|
423
|
-
* fills them in (see {@link UpsertReputationRuleRequest}).
|
|
424
|
-
*/
|
|
425
|
-
export interface UpsertReputationRuleInput {
|
|
426
|
-
/** Unique action key (e.g. `post_created`). */
|
|
427
|
-
actionType: string;
|
|
428
|
-
/** Signed points the rule awards (may be negative). */
|
|
429
|
-
points: number;
|
|
430
|
-
/** Category the resulting transaction is filed under. */
|
|
431
|
-
category: ReputationCategory;
|
|
432
|
-
/** Human-readable description (1..500 chars). */
|
|
433
|
-
description: string;
|
|
434
|
-
/** Per (user, actionType) cooldown in minutes; defaults to 0. */
|
|
435
|
-
cooldownInMinutes?: number;
|
|
436
|
-
/** Whether the rule is active; defaults to true. */
|
|
437
|
-
isEnabled?: boolean;
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* The upsert body AFTER the schema's defaults are applied — what the route
|
|
441
|
-
* handler actually receives. Distinct from {@link UpsertReputationRuleInput},
|
|
442
|
-
* where the defaulted fields are still optional.
|
|
443
|
-
*/
|
|
444
|
-
export interface UpsertReputationRuleRequest extends UpsertReputationRuleInput {
|
|
445
|
-
cooldownInMinutes: number;
|
|
446
|
-
isEnabled: boolean;
|
|
447
|
-
}
|
|
448
|
-
export declare const upsertReputationRuleSchema: z.ZodType<UpsertReputationRuleRequest, z.ZodTypeDef, UpsertReputationRuleInput>;
|
|
449
|
-
/**
|
|
450
|
-
* `POST /reputation/transactions/:id/reverse` and `.../void` (staff). The
|
|
451
|
-
* reviewing principal is the authenticated user.
|
|
452
|
-
*/
|
|
453
|
-
export interface ReverseReputationTransactionInput {
|
|
454
|
-
/** Optional human-readable reason (max 500 chars). */
|
|
455
|
-
reason?: string;
|
|
456
|
-
}
|
|
457
|
-
export declare const reverseReputationTransactionSchema: z.ZodType<ReverseReputationTransactionInput>;
|