@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-B37ERWRM.mjs+
packages/ari/chunk-B37ERWRM.mjsNew file+67
Index: package/packages/ari/chunk-B37ERWRM.mjs
===================================================================
--- package/packages/ari/chunk-B37ERWRM.mjs
+++ package/packages/ari/chunk-B37ERWRM.mjs
@@ -0,0 +1,67 @@
+import {
+ HelpRequestFormAriResourceOwner,
+ HelpRequestFormAriResourceType
+} from "./chunk-QF6HVRWR.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/help/request-form/manifest.ts
+var helpRequestFormAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: HelpRequestFormAriResourceOwner,
+ resourceType: HelpRequestFormAriResourceType,
+ resourceIdSlug: "{activationId}/{helpObjectId}",
+ resourceIdSegmentFormats: {
+ activationId: /[a-zA-Z0-9\-]+/,
+ // eslint-disable-line no-useless-escape
+ helpObjectId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+ }
+};
+
+// src/help/request-form/index.ts
+var HelpRequestFormAri = class _HelpRequestFormAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._activationId = opts.resourceIdSegmentValues.activationId, this._helpObjectId = opts.resourceIdSegmentValues.helpObjectId;
+ }
+ get activationId() {
+ return this._activationId;
+ }
+ get helpObjectId() {
+ return this._helpObjectId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: helpRequestFormAriStaticOpts.qualifier,
+ platformQualifier: helpRequestFormAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: helpRequestFormAriStaticOpts.resourceOwner,
+ resourceType: helpRequestFormAriStaticOpts.resourceType,
+ resourceId: `${opts.activationId}/${opts.helpObjectId}`,
+ resourceIdSegmentValues: {
+ activationId: opts.activationId,
+ helpObjectId: opts.helpObjectId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, helpRequestFormAriStaticOpts);
+ return new _HelpRequestFormAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, helpRequestFormAriStaticOpts);
+ return new _HelpRequestFormAri(opts);
+ }
+ getVariables() {
+ return {
+ activationId: this.activationId,
+ helpObjectId: this.helpObjectId
+ };
+ }
+};
+
+export {
+ HelpRequestFormAri
+};