@fedify/interaction-controls@2.4.5Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
fedify-dev/fedifyWorks with
•JSR Score70%•This package works with Cloudflare Workers, Node.js, Deno, Bun



License
•MIT
Downloads21/wk
•Publisheda week ago (2.4.5)
Interaction control helpers for Fedify
Functions
f
formatInteractionKey(key: InteractionKey): string
No documentation available
Interfaces
I
No documentation available
- authorizationTypeId: URLNo documentation available
- createAccept: (options: InteractionAcceptOptions<TRequest, TAuthorization, TInteracting, TTarget>) => AcceptNo documentation available
- createAuthorization: (options: InteractionAuthorizationCreationOptions<TInteracting, TTarget>) => TAuthorizationNo documentation available
- createReject: (options: InteractionRejectOptions<TRequest, TInteracting, TTarget>) => RejectNo documentation available
- createRequest: (options: InteractionRequestCreationOptions<TInteracting, TTarget>) => TRequestNo documentation available
- createRevocation: (options: InteractionRevocationCreationOptions<TAuthorization>) => DeleteNo documentation available
- evaluatePolicy: <TContextData>() => Promise<InteractionPolicyDecision>context: Context<TContextData>,options: InteractionPolicyEvaluationOptions<TContextData, TTarget>No documentation available
- getAuthorizationKey: (input: InteractionAuthorizationKeyInput<TAuthorization>) => InteractionAuthorizationKeyNo documentation available
- getInteractionKey: (input: InteractionKeyInput<TInteracting, TTarget>) => InteractionKeyNo documentation available
- name: InteractionNameNo documentation available
- policyProperty: InteractionPolicyPropertyNo documentation available
- recognizeImpolite: (source: TImpoliteSource) =>RecognizedImpoliteInteraction<TInteracting, TTarget, TImpoliteSource>
| nullNo documentation available - requestTypeId: URLNo documentation available
- verifyAuthorization: <TContextData>() => Promise<InteractionAuthorizationVerification<TAuthorization>>context: Context<TContextData>,options: InteractionAuthorizationVerificationOptions<TContextData, TAuthorization, TInteracting, TTarget>No documentation available
- verifyRequest: <TContextData>() => Promise<context: Context<TContextData>,options: InteractionRequestVerificationOptions<TRequest>>InteractionRequestVerification<TRequest, TInteracting, TTarget>No documentation available
I
No documentation available
- interactingObjectId: URLNo documentation available
- interaction: stringNo documentation available
- interactionTargetId: URLNo documentation available
- requester: URLNo documentation available
I
No documentation available
- interactingObject: TInteracting | URLNo documentation available
- interactionTarget: TTarget | URLNo documentation available
- requester: URLNo documentation available
I
No documentation available
- documentLoader: DocumentLoaderNo documentation available
- matchesApprovalCollection: MatchesApprovalCollection<TContextData>No documentation available
- requester: URLNo documentation available
- subject: TTargetNo documentation available
I
No documentation available
I
No documentation available
- documentLoader: DocumentLoaderNo documentation available
- request: TRequest | URLNo documentation available
I
No documentation available
- actor: URLNo documentation available
- authorization: TAuthorization | URLNo documentation available
- cc: URL | readonly URL[]No documentation available
- id: URLNo documentation available
- to: URL | readonly URL[]No documentation available
I
No documentation available
- evidence: ImpoliteInteractionEvidenceNo documentation available
- interactingObject: TInteractingNo documentation available
- interactingObjectId: URLNo documentation available
- interactionTarget: TTargetNo documentation available
- interactionTargetId: URLNo documentation available
- requester: URLNo documentation available
- source: TImpoliteSourceNo documentation available
Type Aliases
T
ImpoliteInteractionEvidence =
{ readonly type: "activity"; readonly activityType: URL; }
| { readonly type: "property"; readonly property: URL; }
| { readonly type: "linkRel"; readonly rel: URL; }
| { readonly type: "property"; readonly property: URL; }
| { readonly type: "linkRel"; readonly rel: URL; }
No documentation available
T
InteractionAcceptOptions<> =
TRequest extends Activity,
TAuthorization extends ASObject,
TInteracting extends ASObject,
TTarget extends ASObject
{ readonly mode: "polite"; readonly id: URL; readonly actor: URL; readonly request: TRequest | URL; readonly authorization: TAuthorization | URL; readonly to: URL | readonly URL[]; readonly cc?: URL | readonly URL[]; }
| { readonly mode: "impolite"; readonly id: URL; readonly actor: URL; readonly interactingObject: TInteracting | URL; readonly interactionTarget: TTarget | URL; readonly authorization: TAuthorization | URL; readonly to: URL | readonly URL[]; readonly cc?: URL | readonly URL[]; }
| { readonly mode: "impolite"; readonly id: URL; readonly actor: URL; readonly interactingObject: TInteracting | URL; readonly interactionTarget: TTarget | URL; readonly authorization: TAuthorization | URL; readonly to: URL | readonly URL[]; readonly cc?: URL | readonly URL[]; }
No documentation available
T
InteractionName = "like" | "reply" | "announce" | "quote" | "feature"
No documentation available
T
InteractionPolicyDecision =
{ readonly result: "automatic"; readonly reason: InteractionPolicyMatchReason; }
| { readonly result: "manual"; readonly reason: InteractionPolicyMatchReason; }
| { readonly result: "denied"; readonly reason: InteractionPolicyDenialReason; }
| { readonly result: "manual"; readonly reason: InteractionPolicyMatchReason; }
| { readonly result: "denied"; readonly reason: InteractionPolicyDenialReason; }
No documentation available
T
InteractionPolicyDenialReason =
{ readonly type: "missingPolicy"; }
| { readonly type: "missingRule"; }
| { readonly type: "noMatch"; }
| { readonly type: "unverifiableCollection"; readonly collection: URL; }
| { readonly type: "missingRule"; }
| { readonly type: "noMatch"; }
| { readonly type: "unverifiableCollection"; readonly collection: URL; }
No documentation available
T
InteractionPolicyMatchReason =
{ readonly type: "self"; }
| { readonly type: "default"; readonly default: "publicAutomatic"; }
| { readonly type: "public"; }
| { readonly type: "actor"; readonly actor: URL; }
| { readonly type: "collection"; readonly collection: URL; }
| { readonly type: "default"; readonly default: "publicAutomatic"; }
| { readonly type: "public"; }
| { readonly type: "actor"; readonly actor: URL; }
| { readonly type: "collection"; readonly collection: URL; }
No documentation available
T
InteractionPolicyProperty =
"canLike"
| "canReply"
| "canAnnounce"
| "canQuote"
| "canFeature"
| "canReply"
| "canAnnounce"
| "canQuote"
| "canFeature"
No documentation available
T
InteractionRejectOptions<> =
TRequest extends Activity,
TInteracting extends ASObject,
TTarget extends ASObject
{ readonly mode: "polite"; readonly id: URL; readonly actor: URL; readonly request: TRequest | URL; readonly to: URL | readonly URL[]; readonly cc?: URL | readonly URL[]; }
| { readonly mode: "impolite"; readonly id: URL; readonly actor: URL; readonly interactingObject: TInteracting | URL; readonly interactionTarget: TTarget | URL; readonly to: URL | readonly URL[]; readonly cc?: URL | readonly URL[]; }
| { readonly mode: "impolite"; readonly id: URL; readonly actor: URL; readonly interactingObject: TInteracting | URL; readonly interactionTarget: TTarget | URL; readonly to: URL | readonly URL[]; readonly cc?: URL | readonly URL[]; }
No documentation available
T
InteractionRequestVerification<> =
TRequest extends Activity,
TInteracting extends ASObject,
TTarget extends ASObject
{ readonly verified: true; readonly request: TRequest; readonly requestId: URL; readonly requester: URL; readonly interactingObject: TInteracting; readonly interactingObjectId: URL; readonly interactionTarget: TTarget; readonly interactionTargetId: URL; }
| { readonly verified: false; readonly failure: InteractionRequestVerificationFailure; readonly request?: TRequest; readonly requestId?: URL; }
| { readonly verified: false; readonly failure: InteractionRequestVerificationFailure; readonly request?: TRequest; readonly requestId?: URL; }
No documentation available
T
InteractionRequestVerificationFailure =
{ readonly category: "unverifiable"; readonly type: "notDereferenceable"; readonly url: URL; readonly cause?: unknown; }
| { readonly category: "unverifiable"; readonly type: "unauthorizedFetchRequired"; readonly url: URL; }
| { readonly category: "unverifiable"; readonly type: "invalidJsonLd"; readonly cause?: unknown; }
| { readonly category: "invalid"; readonly type: "wrongType"; readonly expectedType: URL; readonly actualTypes: readonly URL[]; }
| { readonly category: "invalid"; readonly type: "wrongInstrumentType"; readonly expectedTypes: readonly URL[]; readonly actualTypes: readonly URL[]; }
| { readonly category: "invalid"; readonly type: "wrongObjectType"; readonly expectedTypes: readonly URL[]; readonly actualTypes: readonly URL[]; }
| { readonly category: "invalid"; readonly type:
| { readonly category: "invalid"; readonly type: "idMismatch" | "objectMismatch" | "instrumentMismatch"; readonly expected: URL; readonly actual?: URL; }
| { readonly category: "unauthorized"; readonly type: "requesterMismatch"; readonly expected: URL; readonly actual?: URL; }
| { readonly category: "unverifiable"; readonly type: "unauthorizedFetchRequired"; readonly url: URL; }
| { readonly category: "unverifiable"; readonly type: "invalidJsonLd"; readonly cause?: unknown; }
| { readonly category: "invalid"; readonly type: "wrongType"; readonly expectedType: URL; readonly actualTypes: readonly URL[]; }
| { readonly category: "invalid"; readonly type: "wrongInstrumentType"; readonly expectedTypes: readonly URL[]; readonly actualTypes: readonly URL[]; }
| { readonly category: "invalid"; readonly type: "wrongObjectType"; readonly expectedTypes: readonly URL[]; readonly actualTypes: readonly URL[]; }
| { readonly category: "invalid"; readonly type:
"missingId"
| "missingActor"
| "missingObject"
| "missingObjectId"
| "missingInstrument"
| "missingInstrumentId"
; }| "missingActor"
| "missingObject"
| "missingObjectId"
| "missingInstrument"
| "missingInstrumentId"
| { readonly category: "invalid"; readonly type: "idMismatch" | "objectMismatch" | "instrumentMismatch"; readonly expected: URL; readonly actual?: URL; }
| { readonly category: "unauthorized"; readonly type: "requesterMismatch"; readonly expected: URL; readonly actual?: URL; }
No documentation available
T
MatchesApprovalCollection<TContextData> = () => boolean | Promise<boolean>
collection: URL,
actor: URL,
context: Context<TContextData>
No documentation available
T
QuoteImpoliteSource = Create | QuotePost
No documentation available
T
QuotePost = Note | Article | Question | ChatMessage
No documentation available
T
ReplyImpoliteSource = Create | ReplyPost
No documentation available
T
ReplyPost = Note | Article | Question | ChatMessage
No documentation available
Variables
v
announceInteraction: InteractionControl<>
AnnounceRequest,
AnnounceAuthorization,
Announce,
ASObject,
Announce
No documentation available
v
featureInteraction: InteractionControl<>
FeatureRequest,
FeatureAuthorization,
FeaturedCollection,
Actor,
ASObject
No documentation available
v
likeInteraction: InteractionControl<LikeRequest, LikeAuthorization, Like, ASObject, Like>
No documentation available
v
quoteInteraction: InteractionControl<>
QuoteRequest,
QuoteAuthorization,
QuotePost,
ASObject,
QuoteImpoliteSource
No documentation available
v
replyInteraction: InteractionControl<>
ReplyRequest,
ReplyAuthorization,
ReplyPost,
ASObject,
ReplyImpoliteSource
No documentation available