@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-L2W4VGML.mjs+
packages/ari/chunk-L2W4VGML.mjsNew file+60
Index: package/packages/ari/chunk-L2W4VGML.mjs
===================================================================
--- package/packages/ari/chunk-L2W4VGML.mjs
+++ package/packages/ari/chunk-L2W4VGML.mjs
@@ -0,0 +1,60 @@
+import {
+ PlatformGoalAriResourceOwner,
+ PlatformGoalAriResourceType
+} from "./chunk-DXM7JJX4.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/platform/goal/manifest.ts
+var platformGoalAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: PlatformGoalAriResourceOwner,
+ resourceType: PlatformGoalAriResourceType,
+ resourceIdSlug: "{productEntityId}",
+ resourceIdSegmentFormats: {
+ productEntityId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+ }
+};
+
+// src/platform/goal/index.ts
+var PlatformGoalAri = class _PlatformGoalAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._productEntityId = opts.resourceIdSegmentValues.productEntityId;
+ }
+ get productEntityId() {
+ return this._productEntityId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: platformGoalAriStaticOpts.qualifier,
+ platformQualifier: platformGoalAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: platformGoalAriStaticOpts.resourceOwner,
+ resourceType: platformGoalAriStaticOpts.resourceType,
+ resourceId: `${opts.productEntityId}`,
+ resourceIdSegmentValues: {
+ productEntityId: opts.productEntityId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, platformGoalAriStaticOpts);
+ return new _PlatformGoalAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, platformGoalAriStaticOpts);
+ return new _PlatformGoalAri(opts);
+ }
+ getVariables() {
+ return {
+ productEntityId: this.productEntityId
+ };
+ }
+};
+
+export {
+ PlatformGoalAri
+};