@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-WNJS7KLN.mjs
+packages/ari/chunk-WNJS7KLN.mjsNew file
+67
Index: package/packages/ari/chunk-WNJS7KLN.mjs
===================================================================
--- package/packages/ari/chunk-WNJS7KLN.mjs
+++ package/packages/ari/chunk-WNJS7KLN.mjs
@@ -0,0 +1,67 @@
+import {
+  PlatformCustomEmailFooterAriResourceOwner,
+  PlatformCustomEmailFooterAriResourceType
+} from "./chunk-WWIZM4L4.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/platform/custom-email-footer/manifest.ts
+var platformCustomEmailFooterAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  resourceOwner: PlatformCustomEmailFooterAriResourceOwner,
+  resourceType: PlatformCustomEmailFooterAriResourceType,
+  resourceIdSlug: "{orgId}/{appName}",
+  resourceIdSegmentFormats: {
+    orgId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    appName: /[a-z]+(?:-[a-z]+)*/
+  }
+};
+
+// src/platform/custom-email-footer/index.ts
+var PlatformCustomEmailFooterAri = class _PlatformCustomEmailFooterAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._orgId = opts.resourceIdSegmentValues.orgId, this._appName = opts.resourceIdSegmentValues.appName;
+  }
+  get orgId() {
+    return this._orgId;
+  }
+  get appName() {
+    return this._appName;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: platformCustomEmailFooterAriStaticOpts.qualifier,
+      platformQualifier: platformCustomEmailFooterAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: platformCustomEmailFooterAriStaticOpts.resourceOwner,
+      resourceType: platformCustomEmailFooterAriStaticOpts.resourceType,
+      resourceId: `${opts.orgId}/${opts.appName}`,
+      resourceIdSegmentValues: {
+        orgId: opts.orgId,
+        appName: opts.appName
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, platformCustomEmailFooterAriStaticOpts);
+    return new _PlatformCustomEmailFooterAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, platformCustomEmailFooterAriStaticOpts);
+    return new _PlatformCustomEmailFooterAri(opts);
+  }
+  getVariables() {
+    return {
+      orgId: this.orgId,
+      appName: this.appName
+    };
+  }
+};
+
+export {
+  PlatformCustomEmailFooterAri
+};