@fedify/vocab 2.3.0-pr.809.39 → 2.3.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/mod.cjs CHANGED
@@ -33,7 +33,7 @@ let _fedify_vocab_runtime_temporal = require("@fedify/vocab-runtime/temporal");
33
33
  let es_toolkit = require("es-toolkit");
34
34
  //#region deno.json
35
35
  var name = "@fedify/vocab";
36
- var version = "2.3.0-pr.809.39+f65f60c0";
36
+ var version = "2.3.0";
37
37
  //#endregion
38
38
  //#region src/type.ts
39
39
  function getTypeId(object) {
@@ -5230,6 +5230,7 @@ var Object$1 = class Object$1 {
5230
5230
  if (values["@type"].includes("https://gotosocial.org/ns#LikeApproval")) return await LikeAuthorization.fromJsonLd(json, options);
5231
5231
  if (values["@type"].includes("https://gotosocial.org/ns#ReplyAuthorization")) return await ReplyAuthorization.fromJsonLd(json, options);
5232
5232
  if (values["@type"].includes("https://w3id.org/fep/044f#QuoteAuthorization")) return await QuoteAuthorization.fromJsonLd(json, options);
5233
+ if (values["@type"].includes("https://w3id.org/valueflows/ont/vf#Agreement")) return await Agreement.fromJsonLd(json, options);
5233
5234
  if (values["@type"].includes("https://w3id.org/valueflows/ont/vf#Proposal")) return await Proposal.fromJsonLd(json, options);
5234
5235
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Activity")) return await Activity.fromJsonLd(json, options);
5235
5236
  if (values["@type"].includes("http://litepub.social/ns#EmojiReact")) return await EmojiReact.fromJsonLd(json, options);
@@ -5307,6 +5308,7 @@ var Object$1 = class Object$1 {
5307
5308
  "https://gotosocial.org/ns#LikeApproval",
5308
5309
  "https://gotosocial.org/ns#ReplyAuthorization",
5309
5310
  "https://w3id.org/fep/044f#QuoteAuthorization",
5311
+ "https://w3id.org/valueflows/ont/vf#Agreement",
5310
5312
  "https://w3id.org/valueflows/ont/vf#Proposal",
5311
5313
  "https://www.w3.org/ns/activitystreams#Activity",
5312
5314
  "http://litepub.social/ns#EmojiReact",
@@ -5454,6 +5456,7 @@ var Object$1 = class Object$1 {
5454
5456
  "https://gotosocial.org/ns#LikeApproval",
5455
5457
  "https://gotosocial.org/ns#ReplyAuthorization",
5456
5458
  "https://w3id.org/fep/044f#QuoteAuthorization",
5459
+ "https://w3id.org/valueflows/ont/vf#Agreement",
5457
5460
  "https://w3id.org/valueflows/ont/vf#Proposal",
5458
5461
  "https://www.w3.org/ns/activitystreams#Activity",
5459
5462
  "http://litepub.social/ns#EmojiReact",
@@ -5561,6 +5564,7 @@ var Object$1 = class Object$1 {
5561
5564
  "https://gotosocial.org/ns#LikeApproval",
5562
5565
  "https://gotosocial.org/ns#ReplyAuthorization",
5563
5566
  "https://w3id.org/fep/044f#QuoteAuthorization",
5567
+ "https://w3id.org/valueflows/ont/vf#Agreement",
5564
5568
  "https://w3id.org/valueflows/ont/vf#Proposal",
5565
5569
  "https://www.w3.org/ns/activitystreams#Activity",
5566
5570
  "http://litepub.social/ns#EmojiReact",
@@ -5718,6 +5722,7 @@ var Object$1 = class Object$1 {
5718
5722
  "https://gotosocial.org/ns#LikeApproval",
5719
5723
  "https://gotosocial.org/ns#ReplyAuthorization",
5720
5724
  "https://w3id.org/fep/044f#QuoteAuthorization",
5725
+ "https://w3id.org/valueflows/ont/vf#Agreement",
5721
5726
  "https://w3id.org/valueflows/ont/vf#Proposal",
5722
5727
  "https://www.w3.org/ns/activitystreams#Activity",
5723
5728
  "http://litepub.social/ns#EmojiReact",
@@ -5807,6 +5812,7 @@ var Object$1 = class Object$1 {
5807
5812
  "https://gotosocial.org/ns#LikeApproval",
5808
5813
  "https://gotosocial.org/ns#ReplyAuthorization",
5809
5814
  "https://w3id.org/fep/044f#QuoteAuthorization",
5815
+ "https://w3id.org/valueflows/ont/vf#Agreement",
5810
5816
  "https://w3id.org/valueflows/ont/vf#Proposal",
5811
5817
  "https://www.w3.org/ns/activitystreams#Activity",
5812
5818
  "http://litepub.social/ns#EmojiReact",
@@ -5903,6 +5909,7 @@ var Object$1 = class Object$1 {
5903
5909
  "https://gotosocial.org/ns#LikeApproval",
5904
5910
  "https://gotosocial.org/ns#ReplyAuthorization",
5905
5911
  "https://w3id.org/fep/044f#QuoteAuthorization",
5912
+ "https://w3id.org/valueflows/ont/vf#Agreement",
5906
5913
  "https://w3id.org/valueflows/ont/vf#Proposal",
5907
5914
  "https://www.w3.org/ns/activitystreams#Activity",
5908
5915
  "http://litepub.social/ns#EmojiReact",
@@ -6080,6 +6087,7 @@ var Object$1 = class Object$1 {
6080
6087
  "https://gotosocial.org/ns#LikeApproval",
6081
6088
  "https://gotosocial.org/ns#ReplyAuthorization",
6082
6089
  "https://w3id.org/fep/044f#QuoteAuthorization",
6090
+ "https://w3id.org/valueflows/ont/vf#Agreement",
6083
6091
  "https://w3id.org/valueflows/ont/vf#Proposal",
6084
6092
  "https://www.w3.org/ns/activitystreams#Activity",
6085
6093
  "http://litepub.social/ns#EmojiReact",
@@ -14880,6 +14888,618 @@ Multikey.prototype[Symbol.for("Deno.customInspect")] = function(inspect, options
14880
14888
  Multikey.prototype[Symbol.for("nodejs.util.inspect.custom")] = function(_depth, options, inspect) {
14881
14889
  return "Multikey " + inspect(this._getCustomInspectProxy(), options);
14882
14890
  };
14891
+ /** The agreement reached between parties responding to a {@link Proposal}.
14892
+ *
14893
+ * An interested party sends an `Agreement` wrapped in an {@link Offer}
14894
+ * activity. The proposing party then either finalizes the agreement by
14895
+ * sending an {@link Accept} activity with the finalized `Agreement` as
14896
+ * its `result`, or sends a {@link Reject} activity.
14897
+ *
14898
+ * Note: This type extends ActivityStreams `Object` for practical
14899
+ * interoperability within ActivityPub federation, even though FEP-0837
14900
+ * defines `Agreement` as a pure ValueFlows type. Extending `Object`
14901
+ * provides useful inherited properties such as `id`, `attributedTo`,
14902
+ * `url`, `to`, and `published` without needing to redefine them.
14903
+ */
14904
+ var Agreement = class Agreement extends Object$1 {
14905
+ /**
14906
+ * The type URI of {@link Agreement}: `https://w3id.org/valueflows/ont/vf#Agreement`.
14907
+ */
14908
+ static get typeId() {
14909
+ return new URL("https://w3id.org/valueflows/ont/vf#Agreement");
14910
+ }
14911
+ #_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates = [];
14912
+ #_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal = [];
14913
+ /**
14914
+ * Constructs a new instance of Agreement with the given values.
14915
+ * @param values The values to initialize the instance with.
14916
+ * @param options The options to use for initialization.
14917
+ */
14918
+ constructor(values, options = {}) {
14919
+ super(values, options);
14920
+ if ("stipulates" in values && values.stipulates != null) if (values.stipulates instanceof Commitment) this.#_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates = [values.stipulates];
14921
+ else throw new TypeError("The stipulates must be of type Commitment.");
14922
+ if ("stipulatesReciprocal" in values && values.stipulatesReciprocal != null) if (values.stipulatesReciprocal instanceof Commitment) this.#_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal = [values.stipulatesReciprocal];
14923
+ else throw new TypeError("The stipulatesReciprocal must be of type Commitment.");
14924
+ }
14925
+ /**
14926
+ * Clones this instance, optionally updating it with the given values.
14927
+ * @param values The values to update the clone with.
14928
+ * @param options The options to use for cloning.
14929
+ * @returns The cloned instance.
14930
+ */
14931
+ clone(values = {}, options = {}) {
14932
+ if (this._warning != null) {
14933
+ (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
14934
+ options = {
14935
+ ...options,
14936
+ $warning: this._warning
14937
+ };
14938
+ }
14939
+ const clone = super.clone(values, options);
14940
+ clone.#_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates = this.#_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates;
14941
+ if ("stipulates" in values && values.stipulates != null) if (values.stipulates instanceof Commitment) clone.#_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates = [values.stipulates];
14942
+ else throw new TypeError("The stipulates must be of type Commitment.");
14943
+ clone.#_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal = this.#_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal;
14944
+ if ("stipulatesReciprocal" in values && values.stipulatesReciprocal != null) if (values.stipulatesReciprocal instanceof Commitment) clone.#_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal = [values.stipulatesReciprocal];
14945
+ else throw new TypeError("The stipulatesReciprocal must be of type Commitment.");
14946
+ return clone;
14947
+ }
14948
+ /** The primary {@link Commitment} associated with the agreement. This
14949
+ * commitment satisfies the primary {@link Intent} of the corresponding
14950
+ * {@link Proposal}.
14951
+ */
14952
+ get stipulates() {
14953
+ if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
14954
+ if (this.#_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates.length < 1) return null;
14955
+ return this.#_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates[0];
14956
+ }
14957
+ /** The reciprocal {@link Commitment} associated with the agreement.
14958
+ * Required if the corresponding {@link Proposal} has a reciprocal
14959
+ * {@link Intent}.
14960
+ */
14961
+ get stipulatesReciprocal() {
14962
+ if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
14963
+ if (this.#_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal.length < 1) return null;
14964
+ return this.#_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal[0];
14965
+ }
14966
+ /**
14967
+ * Converts this object to a JSON-LD structure.
14968
+ * @param options The options to use.
14969
+ * - `format`: The format of the output: `compact` or
14970
+ `expand`.
14971
+ * - `contextLoader`: The loader for remote JSON-LD contexts.
14972
+ * - `context`: The JSON-LD context to use. Not applicable
14973
+ when `format` is set to `'expand'`.
14974
+ * @returns The JSON-LD representation of this object.
14975
+ */
14976
+ async toJsonLd(options = {}) {
14977
+ if (options.format == null && this._cachedJsonLd != null) return this._cachedJsonLd;
14978
+ if (options.format !== "compact" && options.context != null) throw new TypeError("The context option can only be used when the format option is set to 'compact'.");
14979
+ options = {
14980
+ ...options,
14981
+ contextLoader: options.contextLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)()
14982
+ };
14983
+ if (options.format == null && this.isCompactable()) {
14984
+ const result = await super.toJsonLd({
14985
+ ...options,
14986
+ format: void 0,
14987
+ context: void 0
14988
+ });
14989
+ let compactItems = [];
14990
+ for (const v of this.#_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates) {
14991
+ const item = await v.toJsonLd({
14992
+ ...options,
14993
+ format: void 0,
14994
+ context: void 0
14995
+ });
14996
+ compactItems.push(item);
14997
+ }
14998
+ if (compactItems.length > 0) result["stipulates"] = compactItems.length > 1 ? compactItems : compactItems[0];
14999
+ compactItems = [];
15000
+ for (const v of this.#_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal) {
15001
+ const item = await v.toJsonLd({
15002
+ ...options,
15003
+ format: void 0,
15004
+ context: void 0
15005
+ });
15006
+ compactItems.push(item);
15007
+ }
15008
+ if (compactItems.length > 0) result["stipulatesReciprocal"] = compactItems.length > 1 ? compactItems : compactItems[0];
15009
+ result["type"] = "Agreement";
15010
+ if (this.id != null) result["id"] = this.id.href;
15011
+ result["@context"] = [
15012
+ "https://www.w3.org/ns/activitystreams",
15013
+ "https://w3id.org/security/data-integrity/v1",
15014
+ "https://gotosocial.org/ns",
15015
+ {
15016
+ "vf": "https://w3id.org/valueflows/ont/vf#",
15017
+ "om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/",
15018
+ "fedibird": "http://fedibird.com/ns#",
15019
+ "sensitive": "as:sensitive",
15020
+ "emojiReactions": {
15021
+ "@id": "fedibird:emojiReactions",
15022
+ "@type": "@id"
15023
+ },
15024
+ "Agreement": "vf:Agreement",
15025
+ "Commitment": "vf:Commitment",
15026
+ "stipulates": "vf:stipulates",
15027
+ "stipulatesReciprocal": "vf:stipulatesReciprocal",
15028
+ "satisfies": {
15029
+ "@id": "vf:satisfies",
15030
+ "@type": "@id"
15031
+ },
15032
+ "resourceQuantity": "vf:resourceQuantity",
15033
+ "hasUnit": "om2:hasUnit",
15034
+ "hasNumericalValue": "om2:hasNumericalValue"
15035
+ }
15036
+ ];
15037
+ return result;
15038
+ }
15039
+ let array;
15040
+ const values = (await super.toJsonLd({
15041
+ ...options,
15042
+ format: "expand",
15043
+ context: void 0
15044
+ }))[0];
15045
+ array = [];
15046
+ for (const v of this.#_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates) {
15047
+ const element = await v.toJsonLd(options);
15048
+ array.push(element);
15049
+ }
15050
+ if (array.length > 0) values["https://w3id.org/valueflows/ont/vf#stipulates"] = array;
15051
+ array = [];
15052
+ for (const v of this.#_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal) {
15053
+ const element = await v.toJsonLd(options);
15054
+ array.push(element);
15055
+ }
15056
+ if (array.length > 0) values["https://w3id.org/valueflows/ont/vf#stipulatesReciprocal"] = array;
15057
+ values["@type"] = ["https://w3id.org/valueflows/ont/vf#Agreement"];
15058
+ if (this.id != null) values["@id"] = this.id.href;
15059
+ if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
15060
+ const docContext = options.context ?? [
15061
+ "https://www.w3.org/ns/activitystreams",
15062
+ "https://w3id.org/security/data-integrity/v1",
15063
+ "https://gotosocial.org/ns",
15064
+ {
15065
+ "vf": "https://w3id.org/valueflows/ont/vf#",
15066
+ "om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/",
15067
+ "fedibird": "http://fedibird.com/ns#",
15068
+ "sensitive": "as:sensitive",
15069
+ "emojiReactions": {
15070
+ "@id": "fedibird:emojiReactions",
15071
+ "@type": "@id"
15072
+ },
15073
+ "Agreement": "vf:Agreement",
15074
+ "Commitment": "vf:Commitment",
15075
+ "stipulates": "vf:stipulates",
15076
+ "stipulatesReciprocal": "vf:stipulatesReciprocal",
15077
+ "satisfies": {
15078
+ "@id": "vf:satisfies",
15079
+ "@type": "@id"
15080
+ },
15081
+ "resourceQuantity": "vf:resourceQuantity",
15082
+ "hasUnit": "om2:hasUnit",
15083
+ "hasNumericalValue": "om2:hasNumericalValue"
15084
+ }
15085
+ ];
15086
+ const compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
15087
+ if (docContext != null) {
15088
+ if ("proof" in compacted && compacted.proof != null) if (Array.isArray(compacted.proof)) for (const element of compacted.proof) element["@context"] = docContext;
15089
+ else compacted.proof["@context"] = docContext;
15090
+ }
15091
+ return compacted;
15092
+ }
15093
+ isCompactable() {
15094
+ return super.isCompactable();
15095
+ }
15096
+ /**
15097
+ * Converts a JSON-LD structure to an object of this type.
15098
+ * @param json The JSON-LD structure to convert.
15099
+ * @param options The options to use.
15100
+ * - `documentLoader`: The loader for remote JSON-LD documents.
15101
+ * - `contextLoader`: The loader for remote JSON-LD contexts.
15102
+ * - `tracerProvider`: The OpenTelemetry tracer provider to use.
15103
+ * If omitted, the global tracer provider is used.
15104
+ * @returns The object of this type.
15105
+ * @throws {TypeError} If the given `json` is invalid.
15106
+ */
15107
+ static async fromJsonLd(json, options = {}) {
15108
+ return await (options.tracerProvider ?? _opentelemetry_api.trace.getTracerProvider()).getTracer("@fedify/vocab-tools", "2.3.0").startActiveSpan("activitypub.parse_object", async (span) => {
15109
+ try {
15110
+ const object = await this.__fromJsonLd__Agreement__(json, span, options);
15111
+ if (object.id != null) span.setAttribute("activitypub.object.id", object.id.href);
15112
+ return object;
15113
+ } catch (error) {
15114
+ span.setStatus({
15115
+ code: _opentelemetry_api.SpanStatusCode.ERROR,
15116
+ message: String(error)
15117
+ });
15118
+ throw error;
15119
+ } finally {
15120
+ span.end();
15121
+ }
15122
+ });
15123
+ }
15124
+ static async __fromJsonLd__Agreement__(json, span, options = {}) {
15125
+ if (typeof json === "undefined") throw new TypeError("Invalid JSON-LD: undefined.");
15126
+ else if (json === null) throw new TypeError("Invalid JSON-LD: null.");
15127
+ options = {
15128
+ ...options,
15129
+ documentLoader: options.documentLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)(),
15130
+ contextLoader: options.contextLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)(),
15131
+ tracerProvider: options.tracerProvider ?? _opentelemetry_api.trace.getTracerProvider()
15132
+ };
15133
+ let values;
15134
+ if (globalThis.Object.keys(json).length == 0) values = {};
15135
+ else values = (await _fedify_vocab_runtime_jsonld.default.expand(json, {
15136
+ documentLoader: options.contextLoader,
15137
+ keepFreeFloatingNodes: true
15138
+ }))[0] ?? {};
15139
+ if (values["@id"] != null && !values["@id"].startsWith("_:") && !URL.canParse(values["@id"], options.baseUrl)) throw new TypeError("Invalid @id: " + values["@id"]);
15140
+ if (options.baseUrl == null && values["@id"] != null && !values["@id"].startsWith("_:") && URL.canParse(values["@id"])) options = {
15141
+ ...options,
15142
+ baseUrl: new URL(values["@id"])
15143
+ };
15144
+ if ("@type" in values) span.setAttribute("activitypub.object.type", values["@type"]);
15145
+ if ("@type" in values && !values["@type"].every((t) => t.startsWith("_:"))) {
15146
+ if (!values["@type"].includes("https://w3id.org/valueflows/ont/vf#Agreement")) throw new TypeError("Invalid type: " + values["@type"]);
15147
+ }
15148
+ delete values["@type"];
15149
+ const instance = await super.fromJsonLd(values, {
15150
+ ...options,
15151
+ _fromSubclass: true
15152
+ });
15153
+ if (!(instance instanceof Agreement)) throw new TypeError("Unexpected type: " + instance.constructor.name);
15154
+ const _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates = [];
15155
+ let _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates__array = values["https://w3id.org/valueflows/ont/vf#stipulates"];
15156
+ for (const v of _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates__array == null ? [] : _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates__array.length === 1 && "@list" in _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates__array[0] ? _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates__array[0]["@list"] : _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates__array) {
15157
+ if (v == null) continue;
15158
+ const decoded = await Commitment.fromJsonLd(v, {
15159
+ ...options,
15160
+ baseUrl: options.baseUrl
15161
+ });
15162
+ if (typeof decoded === "undefined") continue;
15163
+ _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates.push(decoded);
15164
+ }
15165
+ instance.#_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates = _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates;
15166
+ const _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal = [];
15167
+ let _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal__array = values["https://w3id.org/valueflows/ont/vf#stipulatesReciprocal"];
15168
+ for (const v of _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal__array == null ? [] : _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal__array.length === 1 && "@list" in _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal__array[0] ? _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal__array[0]["@list"] : _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal__array) {
15169
+ if (v == null) continue;
15170
+ const decoded = await Commitment.fromJsonLd(v, {
15171
+ ...options,
15172
+ baseUrl: options.baseUrl
15173
+ });
15174
+ if (typeof decoded === "undefined") continue;
15175
+ _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal.push(decoded);
15176
+ }
15177
+ instance.#_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal = _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal;
15178
+ if (!("_fromSubclass" in options) || !options._fromSubclass) try {
15179
+ instance._cachedJsonLd = structuredClone(json);
15180
+ } catch {
15181
+ (0, _logtape_logtape.getLogger)(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
15182
+ }
15183
+ return instance;
15184
+ }
15185
+ _getCustomInspectProxy() {
15186
+ const proxy = super._getCustomInspectProxy();
15187
+ const _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates = this.#_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates.map((v) => v instanceof URL ? {
15188
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
15189
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
15190
+ } : v);
15191
+ if (_37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates.length == 1) proxy.stipulates = _37zeAJ2NVyecrDdP8os69FGAn9Q6_stipulates[0];
15192
+ const _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal = this.#_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal.map((v) => v instanceof URL ? {
15193
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
15194
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
15195
+ } : v);
15196
+ if (_4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal.length == 1) proxy.stipulatesReciprocal = _4Vhx9DcywF65XWUQ4KZ35475FaJm_stipulatesReciprocal[0];
15197
+ return proxy;
15198
+ }
15199
+ };
15200
+ Agreement.prototype[Symbol.for("Deno.customInspect")] = function(inspect, options) {
15201
+ return "Agreement " + inspect(this._getCustomInspectProxy(), options);
15202
+ };
15203
+ Agreement.prototype[Symbol.for("nodejs.util.inspect.custom")] = function(_depth, options, inspect) {
15204
+ return "Agreement " + inspect(this._getCustomInspectProxy(), options);
15205
+ };
15206
+ /** A promised economic transaction, referenced by an {@link Agreement}.
15207
+ *
15208
+ * A commitment satisfies an {@link Intent} of a {@link Proposal} and
15209
+ * specifies the actual amount of the economic resource being committed.
15210
+ */
15211
+ var Commitment = class {
15212
+ #documentLoader;
15213
+ #contextLoader;
15214
+ #tracerProvider;
15215
+ #warning;
15216
+ #cachedJsonLd;
15217
+ #_baseUrl;
15218
+ id;
15219
+ get _documentLoader() {
15220
+ return this.#documentLoader;
15221
+ }
15222
+ get _contextLoader() {
15223
+ return this.#contextLoader;
15224
+ }
15225
+ get _tracerProvider() {
15226
+ return this.#tracerProvider;
15227
+ }
15228
+ get _warning() {
15229
+ return this.#warning;
15230
+ }
15231
+ get _cachedJsonLd() {
15232
+ return this.#cachedJsonLd;
15233
+ }
15234
+ set _cachedJsonLd(value) {
15235
+ this.#cachedJsonLd = value;
15236
+ }
15237
+ get _baseUrl() {
15238
+ return this.#_baseUrl;
15239
+ }
15240
+ /**
15241
+ * The type URI of {@link Commitment}: `https://w3id.org/valueflows/ont/vf#Commitment`.
15242
+ */
15243
+ static get typeId() {
15244
+ return new URL("https://w3id.org/valueflows/ont/vf#Commitment");
15245
+ }
15246
+ #_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies = [];
15247
+ #_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity = [];
15248
+ /**
15249
+ * Constructs a new instance of Commitment with the given values.
15250
+ * @param values The values to initialize the instance with.
15251
+ * @param options The options to use for initialization.
15252
+ */
15253
+ constructor(values, options = {}) {
15254
+ this.#documentLoader = options.documentLoader;
15255
+ this.#contextLoader = options.contextLoader;
15256
+ this.#tracerProvider = options.tracerProvider;
15257
+ const baseUrl = options.baseUrl;
15258
+ this.#_baseUrl = baseUrl == null ? void 0 : new URL(baseUrl.href);
15259
+ if ("$warning" in options) this.#warning = options.$warning;
15260
+ if (values.id == null || values.id instanceof URL) this.id = values.id ?? null;
15261
+ else throw new TypeError("The id must be a URL.");
15262
+ if ("satisfies" in values && values.satisfies != null) if (values.satisfies instanceof URL) this.#_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies = [values.satisfies];
15263
+ else throw new TypeError("The satisfies must be of type URL.");
15264
+ if ("resourceQuantity" in values && values.resourceQuantity != null) if (values.resourceQuantity instanceof Measure) this.#_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity = [values.resourceQuantity];
15265
+ else throw new TypeError("The resourceQuantity must be of type Measure.");
15266
+ }
15267
+ /**
15268
+ * Clones this instance, optionally updating it with the given values.
15269
+ * @param values The values to update the clone with.
15270
+ * @param options The options to use for cloning.
15271
+ * @returns The cloned instance.
15272
+ */
15273
+ clone(values = {}, options = {}) {
15274
+ if (this._warning != null) {
15275
+ (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
15276
+ options = {
15277
+ ...options,
15278
+ $warning: this._warning
15279
+ };
15280
+ }
15281
+ const clone = new this.constructor({ id: values.id ?? this.id }, options);
15282
+ clone.#_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies = this.#_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies;
15283
+ if ("satisfies" in values && values.satisfies != null) if (values.satisfies instanceof URL) clone.#_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies = [values.satisfies];
15284
+ else throw new TypeError("The satisfies must be of type URL.");
15285
+ clone.#_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity = this.#_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity;
15286
+ if ("resourceQuantity" in values && values.resourceQuantity != null) if (values.resourceQuantity instanceof Measure) clone.#_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity = [values.resourceQuantity];
15287
+ else throw new TypeError("The resourceQuantity must be of type Measure.");
15288
+ return clone;
15289
+ }
15290
+ /** The {@link Intent} of a {@link Proposal} that this commitment
15291
+ * satisfies. The value is the proposal's URI with a
15292
+ * [fragment](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Fragment)
15293
+ * appended to identify the intent. Recommended fragments are
15294
+ * `primary` and `reciprocal`.
15295
+ */
15296
+ get satisfies() {
15297
+ if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
15298
+ if (this.#_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies.length < 1) return null;
15299
+ return this.#_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies[0];
15300
+ }
15301
+ /** The amount and unit of the economic resource being committed. The
15302
+ * unit must match the unit specified in the corresponding {@link Intent}
15303
+ * of the proposal.
15304
+ */
15305
+ get resourceQuantity() {
15306
+ if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
15307
+ if (this.#_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity.length < 1) return null;
15308
+ return this.#_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity[0];
15309
+ }
15310
+ /**
15311
+ * Converts this object to a JSON-LD structure.
15312
+ * @param options The options to use.
15313
+ * - `format`: The format of the output: `compact` or
15314
+ `expand`.
15315
+ * - `contextLoader`: The loader for remote JSON-LD contexts.
15316
+ * - `context`: The JSON-LD context to use. Not applicable
15317
+ when `format` is set to `'expand'`.
15318
+ * @returns The JSON-LD representation of this object.
15319
+ */
15320
+ async toJsonLd(options = {}) {
15321
+ if (options.format == null && this._cachedJsonLd != null) return this._cachedJsonLd;
15322
+ if (options.format !== "compact" && options.context != null) throw new TypeError("The context option can only be used when the format option is set to 'compact'.");
15323
+ options = {
15324
+ ...options,
15325
+ contextLoader: options.contextLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)()
15326
+ };
15327
+ if (options.format == null && this.isCompactable()) {
15328
+ const result = {};
15329
+ let compactItems = [];
15330
+ for (const v of this.#_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies) {
15331
+ const item = v.href;
15332
+ compactItems.push(item);
15333
+ }
15334
+ if (compactItems.length > 0) result["satisfies"] = compactItems.length > 1 ? compactItems : compactItems[0];
15335
+ compactItems = [];
15336
+ for (const v of this.#_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity) {
15337
+ const item = await v.toJsonLd({
15338
+ ...options,
15339
+ format: void 0,
15340
+ context: void 0
15341
+ });
15342
+ compactItems.push(item);
15343
+ }
15344
+ if (compactItems.length > 0) result["resourceQuantity"] = compactItems.length > 1 ? compactItems : compactItems[0];
15345
+ result["type"] = "Commitment";
15346
+ if (this.id != null) result["id"] = this.id.href;
15347
+ result["@context"] = ["https://www.w3.org/ns/activitystreams", {
15348
+ "vf": "https://w3id.org/valueflows/ont/vf#",
15349
+ "om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/",
15350
+ "Commitment": "vf:Commitment",
15351
+ "satisfies": {
15352
+ "@id": "vf:satisfies",
15353
+ "@type": "@id"
15354
+ },
15355
+ "resourceQuantity": "vf:resourceQuantity",
15356
+ "hasUnit": "om2:hasUnit",
15357
+ "hasNumericalValue": "om2:hasNumericalValue"
15358
+ }];
15359
+ return result;
15360
+ }
15361
+ let array;
15362
+ const values = {};
15363
+ array = [];
15364
+ for (const v of this.#_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies) {
15365
+ const element = { "@id": v.href };
15366
+ array.push(element);
15367
+ }
15368
+ if (array.length > 0) values["https://w3id.org/valueflows/ont/vf#satisfies"] = array;
15369
+ array = [];
15370
+ for (const v of this.#_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity) {
15371
+ const element = await v.toJsonLd(options);
15372
+ array.push(element);
15373
+ }
15374
+ if (array.length > 0) values["https://w3id.org/valueflows/ont/vf#resourceQuantity"] = array;
15375
+ values["@type"] = ["https://w3id.org/valueflows/ont/vf#Commitment"];
15376
+ if (this.id != null) values["@id"] = this.id.href;
15377
+ if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
15378
+ const docContext = options.context ?? ["https://www.w3.org/ns/activitystreams", {
15379
+ "vf": "https://w3id.org/valueflows/ont/vf#",
15380
+ "om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/",
15381
+ "Commitment": "vf:Commitment",
15382
+ "satisfies": {
15383
+ "@id": "vf:satisfies",
15384
+ "@type": "@id"
15385
+ },
15386
+ "resourceQuantity": "vf:resourceQuantity",
15387
+ "hasUnit": "om2:hasUnit",
15388
+ "hasNumericalValue": "om2:hasNumericalValue"
15389
+ }];
15390
+ const compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
15391
+ if (docContext != null) {}
15392
+ return compacted;
15393
+ }
15394
+ isCompactable() {
15395
+ return true;
15396
+ }
15397
+ /**
15398
+ * Converts a JSON-LD structure to an object of this type.
15399
+ * @param json The JSON-LD structure to convert.
15400
+ * @param options The options to use.
15401
+ * - `documentLoader`: The loader for remote JSON-LD documents.
15402
+ * - `contextLoader`: The loader for remote JSON-LD contexts.
15403
+ * - `tracerProvider`: The OpenTelemetry tracer provider to use.
15404
+ * If omitted, the global tracer provider is used.
15405
+ * @returns The object of this type.
15406
+ * @throws {TypeError} If the given `json` is invalid.
15407
+ */
15408
+ static async fromJsonLd(json, options = {}) {
15409
+ return await (options.tracerProvider ?? _opentelemetry_api.trace.getTracerProvider()).getTracer("@fedify/vocab-tools", "2.3.0").startActiveSpan("activitypub.parse_object", async (span) => {
15410
+ try {
15411
+ const object = await this.__fromJsonLd__Commitment__(json, span, options);
15412
+ if (object.id != null) span.setAttribute("activitypub.object.id", object.id.href);
15413
+ return object;
15414
+ } catch (error) {
15415
+ span.setStatus({
15416
+ code: _opentelemetry_api.SpanStatusCode.ERROR,
15417
+ message: String(error)
15418
+ });
15419
+ throw error;
15420
+ } finally {
15421
+ span.end();
15422
+ }
15423
+ });
15424
+ }
15425
+ static async __fromJsonLd__Commitment__(json, span, options = {}) {
15426
+ if (typeof json === "undefined") throw new TypeError("Invalid JSON-LD: undefined.");
15427
+ else if (json === null) throw new TypeError("Invalid JSON-LD: null.");
15428
+ options = {
15429
+ ...options,
15430
+ documentLoader: options.documentLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)(),
15431
+ contextLoader: options.contextLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)(),
15432
+ tracerProvider: options.tracerProvider ?? _opentelemetry_api.trace.getTracerProvider()
15433
+ };
15434
+ let values;
15435
+ if (globalThis.Object.keys(json).length == 0) values = {};
15436
+ else values = (await _fedify_vocab_runtime_jsonld.default.expand(json, {
15437
+ documentLoader: options.contextLoader,
15438
+ keepFreeFloatingNodes: true
15439
+ }))[0] ?? {};
15440
+ if (values["@id"] != null && !values["@id"].startsWith("_:") && !URL.canParse(values["@id"], options.baseUrl)) throw new TypeError("Invalid @id: " + values["@id"]);
15441
+ if (options.baseUrl == null && values["@id"] != null && !values["@id"].startsWith("_:") && URL.canParse(values["@id"])) options = {
15442
+ ...options,
15443
+ baseUrl: new URL(values["@id"])
15444
+ };
15445
+ if ("@type" in values) span.setAttribute("activitypub.object.type", values["@type"]);
15446
+ if ("@type" in values && !values["@type"].every((t) => t.startsWith("_:"))) {
15447
+ if (!values["@type"].includes("https://w3id.org/valueflows/ont/vf#Commitment")) throw new TypeError("Invalid type: " + values["@type"]);
15448
+ }
15449
+ const instance = new this({ id: values["@id"] != null && !values["@id"].startsWith("_:") && URL.canParse(values["@id"], options.baseUrl) ? new URL(values["@id"], options.baseUrl) : void 0 }, options);
15450
+ const _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies = [];
15451
+ let _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies__array = values["https://w3id.org/valueflows/ont/vf#satisfies"];
15452
+ for (const v of _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies__array == null ? [] : _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies__array.length === 1 && "@list" in _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies__array[0] ? _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies__array[0]["@list"] : _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies__array) {
15453
+ if (v == null) continue;
15454
+ const decoded = v["@id"].startsWith("at://") ? new URL("at://" + encodeURIComponent(v["@id"].includes("/", 5) ? v["@id"].slice(5, v["@id"].indexOf("/", 5)) : v["@id"].slice(5)) + (v["@id"].includes("/", 5) ? v["@id"].slice(v["@id"].indexOf("/", 5)) : "")) : URL.canParse(v["@id"]) && options.baseUrl ? new URL(v["@id"]) : new URL(v["@id"], options.baseUrl);
15455
+ if (typeof decoded === "undefined") continue;
15456
+ _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies.push(decoded);
15457
+ }
15458
+ instance.#_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies = _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies;
15459
+ const _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity = [];
15460
+ let _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity__array = values["https://w3id.org/valueflows/ont/vf#resourceQuantity"];
15461
+ for (const v of _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity__array == null ? [] : _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity__array.length === 1 && "@list" in _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity__array[0] ? _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity__array[0]["@list"] : _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity__array) {
15462
+ if (v == null) continue;
15463
+ const decoded = await Measure.fromJsonLd(v, {
15464
+ ...options,
15465
+ baseUrl: options.baseUrl
15466
+ });
15467
+ if (typeof decoded === "undefined") continue;
15468
+ _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity.push(decoded);
15469
+ }
15470
+ instance.#_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity = _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity;
15471
+ if (!("_fromSubclass" in options) || !options._fromSubclass) try {
15472
+ instance._cachedJsonLd = structuredClone(json);
15473
+ } catch {
15474
+ (0, _logtape_logtape.getLogger)(["fedify", "vocab"]).warn("Failed to cache JSON-LD: {json}", { json });
15475
+ }
15476
+ return instance;
15477
+ }
15478
+ _getCustomInspectProxy() {
15479
+ const proxy = {};
15480
+ if (this.id != null) proxy.id = {
15481
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(this.id.href, options),
15482
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(this.id.href, options)
15483
+ };
15484
+ const _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies = this.#_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies.map((v) => v instanceof URL ? {
15485
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
15486
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
15487
+ } : v);
15488
+ if (_aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies.length == 1) proxy.satisfies = _aCyzDK9TkXtLxrZs7JC8emuYisv_satisfies[0];
15489
+ const _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity = this.#_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity.map((v) => v instanceof URL ? {
15490
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
15491
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
15492
+ } : v);
15493
+ if (_2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity.length == 1) proxy.resourceQuantity = _2dLfqTbbRiggEcMQWbHpxkQrtmrc_resourceQuantity[0];
15494
+ return proxy;
15495
+ }
15496
+ };
15497
+ Commitment.prototype[Symbol.for("Deno.customInspect")] = function(inspect, options) {
15498
+ return "Commitment " + inspect(this._getCustomInspectProxy(), options);
15499
+ };
15500
+ Commitment.prototype[Symbol.for("nodejs.util.inspect.custom")] = function(_depth, options, inspect) {
15501
+ return "Commitment " + inspect(this._getCustomInspectProxy(), options);
15502
+ };
14883
15503
  /** A proposed economic transaction describing what is being offered or requested
14884
15504
  * in a {@link Proposal}.
14885
15505
  */
@@ -23359,6 +23979,7 @@ var Collection = class Collection extends Object$1 {
23359
23979
  "https://gotosocial.org/ns#LikeApproval",
23360
23980
  "https://gotosocial.org/ns#ReplyAuthorization",
23361
23981
  "https://w3id.org/fep/044f#QuoteAuthorization",
23982
+ "https://w3id.org/valueflows/ont/vf#Agreement",
23362
23983
  "https://w3id.org/valueflows/ont/vf#Proposal",
23363
23984
  "https://www.w3.org/ns/activitystreams#Activity",
23364
23985
  "http://litepub.social/ns#EmojiReact",
@@ -29833,6 +30454,7 @@ var Link = class Link {
29833
30454
  "https://gotosocial.org/ns#LikeApproval",
29834
30455
  "https://gotosocial.org/ns#ReplyAuthorization",
29835
30456
  "https://w3id.org/fep/044f#QuoteAuthorization",
30457
+ "https://w3id.org/valueflows/ont/vf#Agreement",
29836
30458
  "https://w3id.org/valueflows/ont/vf#Proposal",
29837
30459
  "https://www.w3.org/ns/activitystreams#Activity",
29838
30460
  "http://litepub.social/ns#EmojiReact",
@@ -32498,6 +33120,7 @@ var OrderedCollection = class OrderedCollection extends Collection {
32498
33120
  "https://gotosocial.org/ns#LikeApproval",
32499
33121
  "https://gotosocial.org/ns#ReplyAuthorization",
32500
33122
  "https://w3id.org/fep/044f#QuoteAuthorization",
33123
+ "https://w3id.org/valueflows/ont/vf#Agreement",
32501
33124
  "https://w3id.org/valueflows/ont/vf#Proposal",
32502
33125
  "https://www.w3.org/ns/activitystreams#Activity",
32503
33126
  "http://litepub.social/ns#EmojiReact",
@@ -33011,6 +33634,7 @@ var OrderedCollectionPage = class OrderedCollectionPage extends CollectionPage {
33011
33634
  "https://gotosocial.org/ns#LikeApproval",
33012
33635
  "https://gotosocial.org/ns#ReplyAuthorization",
33013
33636
  "https://w3id.org/fep/044f#QuoteAuthorization",
33637
+ "https://w3id.org/valueflows/ont/vf#Agreement",
33014
33638
  "https://w3id.org/valueflows/ont/vf#Proposal",
33015
33639
  "https://www.w3.org/ns/activitystreams#Activity",
33016
33640
  "http://litepub.social/ns#EmojiReact",
@@ -48116,6 +48740,7 @@ const entityTypeSet = new Set([
48116
48740
  DataIntegrityProof,
48117
48741
  CryptographicKey,
48118
48742
  Multikey,
48743
+ Agreement,
48119
48744
  Proposal,
48120
48745
  Accept,
48121
48746
  Add,
@@ -48187,6 +48812,7 @@ const entityTypeIds = new Map([
48187
48812
  ["https://w3id.org/security#DataIntegrityProof", DataIntegrityProof],
48188
48813
  ["https://w3id.org/security#Key", CryptographicKey],
48189
48814
  ["https://w3id.org/security#Multikey", Multikey],
48815
+ ["https://w3id.org/valueflows/ont/vf#Agreement", Agreement],
48190
48816
  ["https://w3id.org/valueflows/ont/vf#Proposal", Proposal],
48191
48817
  ["https://www.w3.org/ns/activitystreams#Accept", Accept],
48192
48818
  ["https://www.w3.org/ns/activitystreams#Add", Add],
@@ -48733,6 +49359,7 @@ async function* traverseCollection(collection, options = {}) {
48733
49359
  exports.Accept = Accept;
48734
49360
  exports.Activity = Activity;
48735
49361
  exports.Add = Add;
49362
+ exports.Agreement = Agreement;
48736
49363
  exports.Announce = Announce;
48737
49364
  exports.AnnounceAuthorization = AnnounceAuthorization;
48738
49365
  exports.AnnounceRequest = AnnounceRequest;
@@ -48744,6 +49371,7 @@ exports.Block = Block;
48744
49371
  exports.ChatMessage = ChatMessage;
48745
49372
  exports.Collection = Collection;
48746
49373
  exports.CollectionPage = CollectionPage;
49374
+ exports.Commitment = Commitment;
48747
49375
  exports.Create = Create;
48748
49376
  exports.CryptographicKey = CryptographicKey;
48749
49377
  exports.DataIntegrityProof = DataIntegrityProof;