@forge/util

2.0.1-experimental-78908582.0.1-experimental-04cc2b9
packages/ari/chunk-JRBUNJCS.mjs
+packages/ari/chunk-JRBUNJCS.mjsNew file
+70
Index: package/packages/ari/chunk-JRBUNJCS.mjs
===================================================================
--- package/packages/ari/chunk-JRBUNJCS.mjs
+++ package/packages/ari/chunk-JRBUNJCS.mjs
@@ -0,0 +1,70 @@
+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("^$"),
+  // eslint-disable-line no-useless-escape
+  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\-_.~@:;{}=]+)*/
+    // eslint-disable-line no-useless-escape
+  }
+};
+
+// 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
+};