@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-EWUR4RVQ.mjs
+packages/ari/chunk-EWUR4RVQ.mjsNew file
+67
Index: package/packages/ari/chunk-EWUR4RVQ.mjs
===================================================================
--- package/packages/ari/chunk-EWUR4RVQ.mjs
+++ package/packages/ari/chunk-EWUR4RVQ.mjs
@@ -0,0 +1,67 @@
+import {
+  GraphContentAriResourceOwner,
+  GraphContentAriResourceType
+} from "./chunk-PBJGJF43.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/graph/content/manifest.ts
+var graphContentAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  resourceOwner: GraphContentAriResourceOwner,
+  resourceType: GraphContentAriResourceType,
+  resourceIdSlug: "activation/{activationId}/{contentId}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    contentId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+  }
+};
+
+// src/graph/content/index.ts
+var GraphContentAri = class _GraphContentAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._activationId = opts.resourceIdSegmentValues.activationId, this._contentId = opts.resourceIdSegmentValues.contentId;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get contentId() {
+    return this._contentId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: graphContentAriStaticOpts.qualifier,
+      platformQualifier: graphContentAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: graphContentAriStaticOpts.resourceOwner,
+      resourceType: graphContentAriStaticOpts.resourceType,
+      resourceId: `activation/${opts.activationId}/${opts.contentId}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        contentId: opts.contentId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, graphContentAriStaticOpts);
+    return new _GraphContentAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, graphContentAriStaticOpts);
+    return new _GraphContentAri(opts);
+  }
+  getVariables() {
+    return {
+      activationId: this.activationId,
+      contentId: this.contentId
+    };
+  }
+};
+
+export {
+  GraphContentAri
+};