@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-AGHNW72N.mjs+
packages/ari/chunk-AGHNW72N.mjsNew file+67
Index: package/packages/ari/chunk-AGHNW72N.mjs
===================================================================
--- package/packages/ari/chunk-AGHNW72N.mjs
+++ package/packages/ari/chunk-AGHNW72N.mjs
@@ -0,0 +1,67 @@
+import {
+ GrowthPlatformContentEvaluationAriResourceOwner,
+ GrowthPlatformContentEvaluationAriResourceType
+} from "./chunk-RURRVQ3K.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/growth-platform/content-evaluation/manifest.ts
+var growthPlatformContentEvaluationAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: GrowthPlatformContentEvaluationAriResourceOwner,
+ resourceType: GrowthPlatformContentEvaluationAriResourceType,
+ resourceIdSlug: "activation/{activationId}/{contentId}",
+ resourceIdSegmentFormats: {
+ activationId: /[a-zA-Z0-9\-]+/,
+ // eslint-disable-line no-useless-escape
+ contentId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+ }
+};
+
+// src/growth-platform/content-evaluation/index.ts
+var GrowthPlatformContentEvaluationAri = class _GrowthPlatformContentEvaluationAri 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: growthPlatformContentEvaluationAriStaticOpts.qualifier,
+ platformQualifier: growthPlatformContentEvaluationAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: growthPlatformContentEvaluationAriStaticOpts.resourceOwner,
+ resourceType: growthPlatformContentEvaluationAriStaticOpts.resourceType,
+ resourceId: `activation/${opts.activationId}/${opts.contentId}`,
+ resourceIdSegmentValues: {
+ activationId: opts.activationId,
+ contentId: opts.contentId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, growthPlatformContentEvaluationAriStaticOpts);
+ return new _GrowthPlatformContentEvaluationAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, growthPlatformContentEvaluationAriStaticOpts);
+ return new _GrowthPlatformContentEvaluationAri(opts);
+ }
+ getVariables() {
+ return {
+ activationId: this.activationId,
+ contentId: this.contentId
+ };
+ }
+};
+
+export {
+ GrowthPlatformContentEvaluationAri
+};