@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-DPKBZMJD.mjs+
packages/ari/chunk-DPKBZMJD.mjsNew file+71
Index: package/packages/ari/chunk-DPKBZMJD.mjs
===================================================================
--- package/packages/ari/chunk-DPKBZMJD.mjs
+++ package/packages/ari/chunk-DPKBZMJD.mjs
@@ -0,0 +1,71 @@
+import {
+ FeedbackSectionAriResourceOwner,
+ FeedbackSectionAriResourceType
+} from "./chunk-QG6VACSL.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/feedback/section/manifest.ts
+var feedbackSectionAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^[a-zA-Z0-9_\\-.]{1,255}$"),
+ resourceOwner: FeedbackSectionAriResourceOwner,
+ resourceType: FeedbackSectionAriResourceType,
+ resourceIdSlug: "workspace/{activationId}/{sectionId}",
+ resourceIdSegmentFormats: {
+ activationId: /[a-zA-Z0-9\-]+/,
+ // eslint-disable-line no-useless-escape
+ sectionId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+ }
+};
+
+// src/feedback/section/index.ts
+var FeedbackSectionAri = class _FeedbackSectionAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._siteId = opts.cloudId || "", this._activationId = opts.resourceIdSegmentValues.activationId, this._sectionId = opts.resourceIdSegmentValues.sectionId;
+ }
+ get siteId() {
+ return this._siteId;
+ }
+ get activationId() {
+ return this._activationId;
+ }
+ get sectionId() {
+ return this._sectionId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: feedbackSectionAriStaticOpts.qualifier,
+ platformQualifier: feedbackSectionAriStaticOpts.platformQualifier,
+ cloudId: opts.siteId,
+ resourceOwner: feedbackSectionAriStaticOpts.resourceOwner,
+ resourceType: feedbackSectionAriStaticOpts.resourceType,
+ resourceId: `workspace/${opts.activationId}/${opts.sectionId}`,
+ resourceIdSegmentValues: {
+ activationId: opts.activationId,
+ sectionId: opts.sectionId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, feedbackSectionAriStaticOpts);
+ return new _FeedbackSectionAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, feedbackSectionAriStaticOpts);
+ return new _FeedbackSectionAri(opts);
+ }
+ getVariables() {
+ return {
+ siteId: this.siteId,
+ activationId: this.activationId,
+ sectionId: this.sectionId
+ };
+ }
+};
+
+export {
+ FeedbackSectionAri
+};