@fedify/vocab 2.2.0-dev.635 → 2.2.0-dev.700
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/deno.json +1 -1
- package/dist/mod.cjs +1080 -1
- package/dist/mod.d.cts +422 -2
- package/dist/mod.d.ts +422 -2
- package/dist/mod.js +1079 -3
- package/dist-tests/actor.test.mjs +2 -2
- package/dist-tests/{deno-BFydpyWl.mjs → deno-Ds6NDIzV.mjs} +2 -2
- package/dist-tests/intent.yaml +72 -0
- package/dist-tests/lookup.test.mjs +2 -2
- package/dist-tests/measure.yaml +32 -0
- package/dist-tests/proposal.yaml +90 -0
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/{vocab-ZNOT6nzY.mjs → vocab-CGZuHaxe.mjs} +1080 -1
- package/dist-tests/vocab.test.mjs +3 -2
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +198 -0
- package/src/intent.yaml +72 -0
- package/src/measure.yaml +32 -0
- package/src/proposal.yaml +90 -0
- package/src/vocab.test.ts +6 -1
package/dist/mod.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocumentLoader, DocumentLoader as DocumentLoader$1, GetUserAgentOptions, GetUserAgentOptions as GetUserAgentOptions$1, LanguageString, LanguageString as LanguageString$1, RemoteDocument } from "@fedify/vocab-runtime";
|
|
1
|
+
import { Decimal, DocumentLoader, DocumentLoader as DocumentLoader$1, GetUserAgentOptions, GetUserAgentOptions as GetUserAgentOptions$1, LanguageString, LanguageString as LanguageString$1, RemoteDocument } from "@fedify/vocab-runtime";
|
|
2
2
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
|
3
3
|
|
|
4
4
|
//#region src/vocab.d.ts
|
|
@@ -1959,6 +1959,102 @@ declare class PropertyValue {
|
|
|
1959
1959
|
}): Promise<PropertyValue>;
|
|
1960
1960
|
protected _getCustomInspectProxy(): Record<string, unknown>;
|
|
1961
1961
|
}
|
|
1962
|
+
/** A quantity with a unit of measure.
|
|
1963
|
+
*/
|
|
1964
|
+
declare class Measure {
|
|
1965
|
+
#private;
|
|
1966
|
+
readonly id: URL | null;
|
|
1967
|
+
protected get _documentLoader(): DocumentLoader$1 | undefined;
|
|
1968
|
+
protected get _contextLoader(): DocumentLoader$1 | undefined;
|
|
1969
|
+
protected get _tracerProvider(): TracerProvider | undefined;
|
|
1970
|
+
protected get _warning(): {
|
|
1971
|
+
category: string[];
|
|
1972
|
+
message: string;
|
|
1973
|
+
values?: Record<string, unknown>;
|
|
1974
|
+
} | undefined;
|
|
1975
|
+
protected get _cachedJsonLd(): unknown | undefined;
|
|
1976
|
+
protected set _cachedJsonLd(value: unknown | undefined);
|
|
1977
|
+
/**
|
|
1978
|
+
* The type URI of {@link Measure}: `http://www.ontology-of-units-of-measure.org/resource/om-2/Measure`.
|
|
1979
|
+
*/
|
|
1980
|
+
static get typeId(): URL;
|
|
1981
|
+
/**
|
|
1982
|
+
* Constructs a new instance of Measure with the given values.
|
|
1983
|
+
* @param values The values to initialize the instance with.
|
|
1984
|
+
* @param options The options to use for initialization.
|
|
1985
|
+
*/
|
|
1986
|
+
constructor(values: {
|
|
1987
|
+
id?: URL | null;
|
|
1988
|
+
unit?: string | null;
|
|
1989
|
+
numericalValue?: Decimal | null;
|
|
1990
|
+
}, options?: {
|
|
1991
|
+
documentLoader?: DocumentLoader$1;
|
|
1992
|
+
contextLoader?: DocumentLoader$1;
|
|
1993
|
+
tracerProvider?: TracerProvider;
|
|
1994
|
+
});
|
|
1995
|
+
/**
|
|
1996
|
+
* Clones this instance, optionally updating it with the given values.
|
|
1997
|
+
* @param values The values to update the clone with.
|
|
1998
|
+
* @param options The options to use for cloning.
|
|
1999
|
+
* @returns The cloned instance.
|
|
2000
|
+
*/
|
|
2001
|
+
clone(values?: {
|
|
2002
|
+
id?: URL | null;
|
|
2003
|
+
unit?: string | null;
|
|
2004
|
+
numericalValue?: Decimal | null;
|
|
2005
|
+
}, options?: {
|
|
2006
|
+
documentLoader?: DocumentLoader$1;
|
|
2007
|
+
contextLoader?: DocumentLoader$1;
|
|
2008
|
+
}): Measure;
|
|
2009
|
+
/** The name of the unit, according to the Ontology of units of Measure
|
|
2010
|
+
* classification. The recommended unit for countable items is `"one"`.
|
|
2011
|
+
*/
|
|
2012
|
+
get unit(): string | null;
|
|
2013
|
+
/** The amount of the resource. If not specified, arbitrary amounts can be
|
|
2014
|
+
* used when responding to the proposal.
|
|
2015
|
+
*/
|
|
2016
|
+
get numericalValue(): Decimal | null;
|
|
2017
|
+
/**
|
|
2018
|
+
* Converts this object to a JSON-LD structure.
|
|
2019
|
+
* @param options The options to use.
|
|
2020
|
+
* - `format`: The format of the output: `compact` or
|
|
2021
|
+
`expand`.
|
|
2022
|
+
* - `contextLoader`: The loader for remote JSON-LD contexts.
|
|
2023
|
+
* - `context`: The JSON-LD context to use. Not applicable
|
|
2024
|
+
when `format` is set to `'expand'`.
|
|
2025
|
+
* @returns The JSON-LD representation of this object.
|
|
2026
|
+
*/
|
|
2027
|
+
toJsonLd(options?: {
|
|
2028
|
+
format?: "compact" | "expand";
|
|
2029
|
+
contextLoader?: DocumentLoader$1;
|
|
2030
|
+
context?: string | Record<string, string> | (string | Record<string, string>)[];
|
|
2031
|
+
}): Promise<unknown>;
|
|
2032
|
+
protected isCompactable(): boolean;
|
|
2033
|
+
/**
|
|
2034
|
+
* Converts a JSON-LD structure to an object of this type.
|
|
2035
|
+
* @param json The JSON-LD structure to convert.
|
|
2036
|
+
* @param options The options to use.
|
|
2037
|
+
* - `documentLoader`: The loader for remote JSON-LD documents.
|
|
2038
|
+
* - `contextLoader`: The loader for remote JSON-LD contexts.
|
|
2039
|
+
* - `tracerProvider`: The OpenTelemetry tracer provider to use.
|
|
2040
|
+
* If omitted, the global tracer provider is used.
|
|
2041
|
+
* @returns The object of this type.
|
|
2042
|
+
* @throws {TypeError} If the given `json` is invalid.
|
|
2043
|
+
*/
|
|
2044
|
+
static fromJsonLd(json: unknown, options?: {
|
|
2045
|
+
documentLoader?: DocumentLoader$1;
|
|
2046
|
+
contextLoader?: DocumentLoader$1;
|
|
2047
|
+
tracerProvider?: TracerProvider;
|
|
2048
|
+
baseUrl?: URL;
|
|
2049
|
+
}): Promise<Measure>;
|
|
2050
|
+
protected static __fromJsonLd__Measure__(json: unknown, span: Span, options?: {
|
|
2051
|
+
documentLoader?: DocumentLoader$1;
|
|
2052
|
+
contextLoader?: DocumentLoader$1;
|
|
2053
|
+
tracerProvider?: TracerProvider;
|
|
2054
|
+
baseUrl?: URL;
|
|
2055
|
+
}): Promise<Measure>;
|
|
2056
|
+
protected _getCustomInspectProxy(): Record<string, unknown>;
|
|
2057
|
+
}
|
|
1962
2058
|
/** Proves that an {@link Announce} interaction has been approved by
|
|
1963
2059
|
* the post author.
|
|
1964
2060
|
*
|
|
@@ -4021,6 +4117,330 @@ declare class Multikey {
|
|
|
4021
4117
|
}): Promise<Multikey>;
|
|
4022
4118
|
protected _getCustomInspectProxy(): Record<string, unknown>;
|
|
4023
4119
|
}
|
|
4120
|
+
/** A proposed economic transaction describing what is being offered or requested
|
|
4121
|
+
* in a {@link Proposal}.
|
|
4122
|
+
*/
|
|
4123
|
+
declare class Intent {
|
|
4124
|
+
#private;
|
|
4125
|
+
readonly id: URL | null;
|
|
4126
|
+
protected get _documentLoader(): DocumentLoader$1 | undefined;
|
|
4127
|
+
protected get _contextLoader(): DocumentLoader$1 | undefined;
|
|
4128
|
+
protected get _tracerProvider(): TracerProvider | undefined;
|
|
4129
|
+
protected get _warning(): {
|
|
4130
|
+
category: string[];
|
|
4131
|
+
message: string;
|
|
4132
|
+
values?: Record<string, unknown>;
|
|
4133
|
+
} | undefined;
|
|
4134
|
+
protected get _cachedJsonLd(): unknown | undefined;
|
|
4135
|
+
protected set _cachedJsonLd(value: unknown | undefined);
|
|
4136
|
+
/**
|
|
4137
|
+
* The type URI of {@link Intent}: `https://w3id.org/valueflows/ont/vf#Intent`.
|
|
4138
|
+
*/
|
|
4139
|
+
static get typeId(): URL;
|
|
4140
|
+
/**
|
|
4141
|
+
* Constructs a new instance of Intent with the given values.
|
|
4142
|
+
* @param values The values to initialize the instance with.
|
|
4143
|
+
* @param options The options to use for initialization.
|
|
4144
|
+
*/
|
|
4145
|
+
constructor(values: {
|
|
4146
|
+
id?: URL | null;
|
|
4147
|
+
action?: string | null;
|
|
4148
|
+
resourceConformsTo?: URL | null;
|
|
4149
|
+
resourceQuantity?: Measure | null;
|
|
4150
|
+
availableQuantity?: Measure | null;
|
|
4151
|
+
minimumQuantity?: Measure | null;
|
|
4152
|
+
}, options?: {
|
|
4153
|
+
documentLoader?: DocumentLoader$1;
|
|
4154
|
+
contextLoader?: DocumentLoader$1;
|
|
4155
|
+
tracerProvider?: TracerProvider;
|
|
4156
|
+
});
|
|
4157
|
+
/**
|
|
4158
|
+
* Clones this instance, optionally updating it with the given values.
|
|
4159
|
+
* @param values The values to update the clone with.
|
|
4160
|
+
* @param options The options to use for cloning.
|
|
4161
|
+
* @returns The cloned instance.
|
|
4162
|
+
*/
|
|
4163
|
+
clone(values?: {
|
|
4164
|
+
id?: URL | null;
|
|
4165
|
+
action?: string | null;
|
|
4166
|
+
resourceConformsTo?: URL | null;
|
|
4167
|
+
resourceQuantity?: Measure | null;
|
|
4168
|
+
availableQuantity?: Measure | null;
|
|
4169
|
+
minimumQuantity?: Measure | null;
|
|
4170
|
+
}, options?: {
|
|
4171
|
+
documentLoader?: DocumentLoader$1;
|
|
4172
|
+
contextLoader?: DocumentLoader$1;
|
|
4173
|
+
}): Intent;
|
|
4174
|
+
/** The type of economic transaction. The value of this property should be
|
|
4175
|
+
* either `"deliverService"` or `"transfer"`.
|
|
4176
|
+
*/
|
|
4177
|
+
get action(): string | null;
|
|
4178
|
+
/** The type of an economic resource. Could be any URI.
|
|
4179
|
+
*/
|
|
4180
|
+
get resourceConformsTo(): URL | null;
|
|
4181
|
+
/** The amount and unit of the economic resource.
|
|
4182
|
+
*/
|
|
4183
|
+
get resourceQuantity(): Measure | null;
|
|
4184
|
+
/** The quantity of the offered resource currently available.
|
|
4185
|
+
*/
|
|
4186
|
+
get availableQuantity(): Measure | null;
|
|
4187
|
+
/** The minimum possible quantity of the resource.
|
|
4188
|
+
*/
|
|
4189
|
+
get minimumQuantity(): Measure | null;
|
|
4190
|
+
/**
|
|
4191
|
+
* Converts this object to a JSON-LD structure.
|
|
4192
|
+
* @param options The options to use.
|
|
4193
|
+
* - `format`: The format of the output: `compact` or
|
|
4194
|
+
`expand`.
|
|
4195
|
+
* - `contextLoader`: The loader for remote JSON-LD contexts.
|
|
4196
|
+
* - `context`: The JSON-LD context to use. Not applicable
|
|
4197
|
+
when `format` is set to `'expand'`.
|
|
4198
|
+
* @returns The JSON-LD representation of this object.
|
|
4199
|
+
*/
|
|
4200
|
+
toJsonLd(options?: {
|
|
4201
|
+
format?: "compact" | "expand";
|
|
4202
|
+
contextLoader?: DocumentLoader$1;
|
|
4203
|
+
context?: string | Record<string, string> | (string | Record<string, string>)[];
|
|
4204
|
+
}): Promise<unknown>;
|
|
4205
|
+
protected isCompactable(): boolean;
|
|
4206
|
+
/**
|
|
4207
|
+
* Converts a JSON-LD structure to an object of this type.
|
|
4208
|
+
* @param json The JSON-LD structure to convert.
|
|
4209
|
+
* @param options The options to use.
|
|
4210
|
+
* - `documentLoader`: The loader for remote JSON-LD documents.
|
|
4211
|
+
* - `contextLoader`: The loader for remote JSON-LD contexts.
|
|
4212
|
+
* - `tracerProvider`: The OpenTelemetry tracer provider to use.
|
|
4213
|
+
* If omitted, the global tracer provider is used.
|
|
4214
|
+
* @returns The object of this type.
|
|
4215
|
+
* @throws {TypeError} If the given `json` is invalid.
|
|
4216
|
+
*/
|
|
4217
|
+
static fromJsonLd(json: unknown, options?: {
|
|
4218
|
+
documentLoader?: DocumentLoader$1;
|
|
4219
|
+
contextLoader?: DocumentLoader$1;
|
|
4220
|
+
tracerProvider?: TracerProvider;
|
|
4221
|
+
baseUrl?: URL;
|
|
4222
|
+
}): Promise<Intent>;
|
|
4223
|
+
protected static __fromJsonLd__Intent__(json: unknown, span: Span, options?: {
|
|
4224
|
+
documentLoader?: DocumentLoader$1;
|
|
4225
|
+
contextLoader?: DocumentLoader$1;
|
|
4226
|
+
tracerProvider?: TracerProvider;
|
|
4227
|
+
baseUrl?: URL;
|
|
4228
|
+
}): Promise<Intent>;
|
|
4229
|
+
protected _getCustomInspectProxy(): Record<string, unknown>;
|
|
4230
|
+
}
|
|
4231
|
+
/** A published request or offer, sometimes with what is expected in return.
|
|
4232
|
+
*
|
|
4233
|
+
* Proposals contain a primary {@link Intent} (via `publishes`) describing
|
|
4234
|
+
* what is being offered or requested, and optionally a reciprocal
|
|
4235
|
+
* {@link Intent} describing what is expected or offered in return.
|
|
4236
|
+
*
|
|
4237
|
+
* Note: This type extends ActivityStreams `Object` for practical
|
|
4238
|
+
* interoperability within ActivityPub federation, even though FEP-0837
|
|
4239
|
+
* defines `Proposal` as a pure ValueFlows type. Extending `Object`
|
|
4240
|
+
* provides useful inherited properties such as `name`, `content`,
|
|
4241
|
+
* `attributedTo`, `published`, `to`, and `location` without needing to
|
|
4242
|
+
* redefine them.
|
|
4243
|
+
*/
|
|
4244
|
+
declare class Proposal extends Object$1 {
|
|
4245
|
+
#private;
|
|
4246
|
+
/**
|
|
4247
|
+
* The type URI of {@link Proposal}: `https://w3id.org/valueflows/ont/vf#Proposal`.
|
|
4248
|
+
*/
|
|
4249
|
+
static override get typeId(): URL;
|
|
4250
|
+
/**
|
|
4251
|
+
* Constructs a new instance of Proposal with the given values.
|
|
4252
|
+
* @param values The values to initialize the instance with.
|
|
4253
|
+
* @param options The options to use for initialization.
|
|
4254
|
+
*/
|
|
4255
|
+
constructor(values: {
|
|
4256
|
+
id?: URL | null;
|
|
4257
|
+
attachments?: (Object$1 | Link | PropertyValue | URL)[];
|
|
4258
|
+
attribution?: Application | Group | Organization | Person | Service | URL | null;
|
|
4259
|
+
attributions?: (Application | Group | Organization | Person | Service | URL)[];
|
|
4260
|
+
audience?: Object$1 | URL | null;
|
|
4261
|
+
audiences?: (Object$1 | URL)[];
|
|
4262
|
+
content?: string | LanguageString$1 | null;
|
|
4263
|
+
contents?: ((string | LanguageString$1))[];
|
|
4264
|
+
contexts?: (Object$1 | Link | URL)[];
|
|
4265
|
+
name?: string | LanguageString$1 | null;
|
|
4266
|
+
names?: ((string | LanguageString$1))[];
|
|
4267
|
+
endTime?: Temporal.Instant | null;
|
|
4268
|
+
generators?: (Object$1 | Link | URL)[];
|
|
4269
|
+
icon?: Image | URL | null;
|
|
4270
|
+
icons?: (Image | URL)[];
|
|
4271
|
+
image?: Image | URL | null;
|
|
4272
|
+
images?: (Image | URL)[];
|
|
4273
|
+
replyTarget?: Object$1 | Link | URL | null;
|
|
4274
|
+
replyTargets?: (Object$1 | Link | URL)[];
|
|
4275
|
+
location?: Object$1 | Link | URL | null;
|
|
4276
|
+
locations?: (Object$1 | Link | URL)[];
|
|
4277
|
+
preview?: Link | Object$1 | URL | null;
|
|
4278
|
+
previews?: (Link | Object$1 | URL)[];
|
|
4279
|
+
published?: Temporal.Instant | null;
|
|
4280
|
+
replies?: Collection | URL | null;
|
|
4281
|
+
shares?: Collection | URL | null;
|
|
4282
|
+
likes?: Collection | URL | null;
|
|
4283
|
+
emojiReactions?: Collection | URL | null;
|
|
4284
|
+
startTime?: Temporal.Instant | null;
|
|
4285
|
+
summary?: string | LanguageString$1 | null;
|
|
4286
|
+
summaries?: ((string | LanguageString$1))[];
|
|
4287
|
+
tags?: (Object$1 | Link | URL)[];
|
|
4288
|
+
updated?: Temporal.Instant | null;
|
|
4289
|
+
url?: URL | Link | null;
|
|
4290
|
+
urls?: ((URL | Link))[];
|
|
4291
|
+
to?: Object$1 | URL | null;
|
|
4292
|
+
tos?: (Object$1 | URL)[];
|
|
4293
|
+
bto?: Object$1 | URL | null;
|
|
4294
|
+
btos?: (Object$1 | URL)[];
|
|
4295
|
+
cc?: Object$1 | URL | null;
|
|
4296
|
+
ccs?: (Object$1 | URL)[];
|
|
4297
|
+
bcc?: Object$1 | URL | null;
|
|
4298
|
+
bccs?: (Object$1 | URL)[];
|
|
4299
|
+
mediaType?: string | null;
|
|
4300
|
+
duration?: Temporal.Duration | null;
|
|
4301
|
+
sensitive?: boolean | null;
|
|
4302
|
+
source?: Source | null;
|
|
4303
|
+
proof?: DataIntegrityProof | URL | null;
|
|
4304
|
+
proofs?: (DataIntegrityProof | URL)[];
|
|
4305
|
+
interactionPolicy?: InteractionPolicy | null;
|
|
4306
|
+
approvedBy?: URL | null;
|
|
4307
|
+
likeAuthorization?: LikeAuthorization | URL | null;
|
|
4308
|
+
replyAuthorization?: ReplyAuthorization | URL | null;
|
|
4309
|
+
announceAuthorization?: AnnounceAuthorization | URL | null;
|
|
4310
|
+
purpose?: string | null;
|
|
4311
|
+
publishes?: Intent | null;
|
|
4312
|
+
reciprocal?: Intent | null;
|
|
4313
|
+
unitBased?: boolean | null;
|
|
4314
|
+
}, options?: {
|
|
4315
|
+
documentLoader?: DocumentLoader$1;
|
|
4316
|
+
contextLoader?: DocumentLoader$1;
|
|
4317
|
+
tracerProvider?: TracerProvider;
|
|
4318
|
+
});
|
|
4319
|
+
/**
|
|
4320
|
+
* Clones this instance, optionally updating it with the given values.
|
|
4321
|
+
* @param values The values to update the clone with.
|
|
4322
|
+
* @param options The options to use for cloning.
|
|
4323
|
+
* @returns The cloned instance.
|
|
4324
|
+
*/
|
|
4325
|
+
override clone(values?: {
|
|
4326
|
+
id?: URL | null;
|
|
4327
|
+
attachments?: (Object$1 | Link | PropertyValue | URL)[];
|
|
4328
|
+
attribution?: Application | Group | Organization | Person | Service | URL | null;
|
|
4329
|
+
attributions?: (Application | Group | Organization | Person | Service | URL)[];
|
|
4330
|
+
audience?: Object$1 | URL | null;
|
|
4331
|
+
audiences?: (Object$1 | URL)[];
|
|
4332
|
+
content?: string | LanguageString$1 | null;
|
|
4333
|
+
contents?: ((string | LanguageString$1))[];
|
|
4334
|
+
contexts?: (Object$1 | Link | URL)[];
|
|
4335
|
+
name?: string | LanguageString$1 | null;
|
|
4336
|
+
names?: ((string | LanguageString$1))[];
|
|
4337
|
+
endTime?: Temporal.Instant | null;
|
|
4338
|
+
generators?: (Object$1 | Link | URL)[];
|
|
4339
|
+
icon?: Image | URL | null;
|
|
4340
|
+
icons?: (Image | URL)[];
|
|
4341
|
+
image?: Image | URL | null;
|
|
4342
|
+
images?: (Image | URL)[];
|
|
4343
|
+
replyTarget?: Object$1 | Link | URL | null;
|
|
4344
|
+
replyTargets?: (Object$1 | Link | URL)[];
|
|
4345
|
+
location?: Object$1 | Link | URL | null;
|
|
4346
|
+
locations?: (Object$1 | Link | URL)[];
|
|
4347
|
+
preview?: Link | Object$1 | URL | null;
|
|
4348
|
+
previews?: (Link | Object$1 | URL)[];
|
|
4349
|
+
published?: Temporal.Instant | null;
|
|
4350
|
+
replies?: Collection | URL | null;
|
|
4351
|
+
shares?: Collection | URL | null;
|
|
4352
|
+
likes?: Collection | URL | null;
|
|
4353
|
+
emojiReactions?: Collection | URL | null;
|
|
4354
|
+
startTime?: Temporal.Instant | null;
|
|
4355
|
+
summary?: string | LanguageString$1 | null;
|
|
4356
|
+
summaries?: ((string | LanguageString$1))[];
|
|
4357
|
+
tags?: (Object$1 | Link | URL)[];
|
|
4358
|
+
updated?: Temporal.Instant | null;
|
|
4359
|
+
url?: URL | Link | null;
|
|
4360
|
+
urls?: ((URL | Link))[];
|
|
4361
|
+
to?: Object$1 | URL | null;
|
|
4362
|
+
tos?: (Object$1 | URL)[];
|
|
4363
|
+
bto?: Object$1 | URL | null;
|
|
4364
|
+
btos?: (Object$1 | URL)[];
|
|
4365
|
+
cc?: Object$1 | URL | null;
|
|
4366
|
+
ccs?: (Object$1 | URL)[];
|
|
4367
|
+
bcc?: Object$1 | URL | null;
|
|
4368
|
+
bccs?: (Object$1 | URL)[];
|
|
4369
|
+
mediaType?: string | null;
|
|
4370
|
+
duration?: Temporal.Duration | null;
|
|
4371
|
+
sensitive?: boolean | null;
|
|
4372
|
+
source?: Source | null;
|
|
4373
|
+
proof?: DataIntegrityProof | URL | null;
|
|
4374
|
+
proofs?: (DataIntegrityProof | URL)[];
|
|
4375
|
+
interactionPolicy?: InteractionPolicy | null;
|
|
4376
|
+
approvedBy?: URL | null;
|
|
4377
|
+
likeAuthorization?: LikeAuthorization | URL | null;
|
|
4378
|
+
replyAuthorization?: ReplyAuthorization | URL | null;
|
|
4379
|
+
announceAuthorization?: AnnounceAuthorization | URL | null;
|
|
4380
|
+
purpose?: string | null;
|
|
4381
|
+
publishes?: Intent | null;
|
|
4382
|
+
reciprocal?: Intent | null;
|
|
4383
|
+
unitBased?: boolean | null;
|
|
4384
|
+
}, options?: {
|
|
4385
|
+
documentLoader?: DocumentLoader$1;
|
|
4386
|
+
contextLoader?: DocumentLoader$1;
|
|
4387
|
+
}): Proposal;
|
|
4388
|
+
/** The type of proposal. Possible values are `"offer"` and `"request"`.
|
|
4389
|
+
*/
|
|
4390
|
+
get purpose(): string | null;
|
|
4391
|
+
/** The primary intent of this proposal, describing what is being offered
|
|
4392
|
+
* or requested.
|
|
4393
|
+
*/
|
|
4394
|
+
get publishes(): Intent | null;
|
|
4395
|
+
/** The reciprocal intent of this proposal, describing what is expected
|
|
4396
|
+
* or offered in return.
|
|
4397
|
+
*/
|
|
4398
|
+
get reciprocal(): Intent | null;
|
|
4399
|
+
/** Indicates whether the quantities expressed in the proposal can be
|
|
4400
|
+
* multiplied or not. The default is `false`.
|
|
4401
|
+
*/
|
|
4402
|
+
get unitBased(): boolean | null;
|
|
4403
|
+
/**
|
|
4404
|
+
* Converts this object to a JSON-LD structure.
|
|
4405
|
+
* @param options The options to use.
|
|
4406
|
+
* - `format`: The format of the output: `compact` or
|
|
4407
|
+
`expand`.
|
|
4408
|
+
* - `contextLoader`: The loader for remote JSON-LD contexts.
|
|
4409
|
+
* - `context`: The JSON-LD context to use. Not applicable
|
|
4410
|
+
when `format` is set to `'expand'`.
|
|
4411
|
+
* @returns The JSON-LD representation of this object.
|
|
4412
|
+
*/
|
|
4413
|
+
override toJsonLd(options?: {
|
|
4414
|
+
format?: "compact" | "expand";
|
|
4415
|
+
contextLoader?: DocumentLoader$1;
|
|
4416
|
+
context?: string | Record<string, string> | (string | Record<string, string>)[];
|
|
4417
|
+
}): Promise<unknown>;
|
|
4418
|
+
protected override isCompactable(): boolean;
|
|
4419
|
+
/**
|
|
4420
|
+
* Converts a JSON-LD structure to an object of this type.
|
|
4421
|
+
* @param json The JSON-LD structure to convert.
|
|
4422
|
+
* @param options The options to use.
|
|
4423
|
+
* - `documentLoader`: The loader for remote JSON-LD documents.
|
|
4424
|
+
* - `contextLoader`: The loader for remote JSON-LD contexts.
|
|
4425
|
+
* - `tracerProvider`: The OpenTelemetry tracer provider to use.
|
|
4426
|
+
* If omitted, the global tracer provider is used.
|
|
4427
|
+
* @returns The object of this type.
|
|
4428
|
+
* @throws {TypeError} If the given `json` is invalid.
|
|
4429
|
+
*/
|
|
4430
|
+
static override fromJsonLd(json: unknown, options?: {
|
|
4431
|
+
documentLoader?: DocumentLoader$1;
|
|
4432
|
+
contextLoader?: DocumentLoader$1;
|
|
4433
|
+
tracerProvider?: TracerProvider;
|
|
4434
|
+
baseUrl?: URL;
|
|
4435
|
+
}): Promise<Proposal>;
|
|
4436
|
+
protected static __fromJsonLd__Proposal__(json: unknown, span: Span, options?: {
|
|
4437
|
+
documentLoader?: DocumentLoader$1;
|
|
4438
|
+
contextLoader?: DocumentLoader$1;
|
|
4439
|
+
tracerProvider?: TracerProvider;
|
|
4440
|
+
baseUrl?: URL;
|
|
4441
|
+
}): Promise<Proposal>;
|
|
4442
|
+
protected override _getCustomInspectProxy(): Record<string, unknown>;
|
|
4443
|
+
}
|
|
4024
4444
|
/** Indicates that the `actor` accepts the `object`. The `target` property can be
|
|
4025
4445
|
* used in certain circumstances to indicate the context into which the `object`
|
|
4026
4446
|
* has been accepted.
|
|
@@ -17478,4 +17898,4 @@ declare function getTypeId(object: Object$1 | Link | null): URL | null;
|
|
|
17478
17898
|
*/
|
|
17479
17899
|
declare function getTypeId(object: Object$1 | Link | null | undefined): URL | null | undefined;
|
|
17480
17900
|
//#endregion
|
|
17481
|
-
export { Accept, Activity, Actor, ActorTypeName, Add, Announce, AnnounceAuthorization, AnnounceRequest, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, type DocumentLoader, Emoji, EmojiReact, Endpoints, Event, Export, FediverseHandle, Flag, Follow, GetActorHandleOptions, type GetUserAgentOptions, Group, Hashtag, Ignore, Image, InteractionPolicy, InteractionRule, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, LikeAuthorization, LikeRequest, Link, Listen, LookupObjectOptions, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Recipient, Reject, Relationship, type RemoteDocument, Remove, ReplyAuthorization, ReplyRequest, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, toAcctUrl, traverseCollection };
|
|
17901
|
+
export { Accept, Activity, Actor, ActorTypeName, Add, Announce, AnnounceAuthorization, AnnounceRequest, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, type DocumentLoader, Emoji, EmojiReact, Endpoints, Event, Export, FediverseHandle, Flag, Follow, GetActorHandleOptions, type GetUserAgentOptions, Group, Hashtag, Ignore, Image, Intent, InteractionPolicy, InteractionRule, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, LikeAuthorization, LikeRequest, Link, Listen, LookupObjectOptions, Measure, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Proposal, Question, Read, Recipient, Reject, Relationship, type RemoteDocument, Remove, ReplyAuthorization, ReplyRequest, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, toAcctUrl, traverseCollection };
|