@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-YGYHDWLF.mjs+
packages/ari/chunk-YGYHDWLF.mjsNew file+60
Index: package/packages/ari/chunk-YGYHDWLF.mjs
===================================================================
--- package/packages/ari/chunk-YGYHDWLF.mjs
+++ package/packages/ari/chunk-YGYHDWLF.mjs
@@ -0,0 +1,60 @@
+import {
+ TrelloEnterpriseAriResourceOwner,
+ TrelloEnterpriseAriResourceType
+} from "./chunk-A3QGWDCS.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/trello/enterprise/manifest.ts
+var trelloEnterpriseAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: TrelloEnterpriseAriResourceOwner,
+ resourceType: TrelloEnterpriseAriResourceType,
+ resourceIdSlug: "{enterpriseId}",
+ resourceIdSegmentFormats: {
+ enterpriseId: /[a-zA-Z0-9\-_.]*/
+ }
+};
+
+// src/trello/enterprise/index.ts
+var TrelloEnterpriseAri = class _TrelloEnterpriseAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._enterpriseId = opts.resourceIdSegmentValues.enterpriseId;
+ }
+ get enterpriseId() {
+ return this._enterpriseId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: trelloEnterpriseAriStaticOpts.qualifier,
+ platformQualifier: trelloEnterpriseAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: trelloEnterpriseAriStaticOpts.resourceOwner,
+ resourceType: trelloEnterpriseAriStaticOpts.resourceType,
+ resourceId: `${opts.enterpriseId}`,
+ resourceIdSegmentValues: {
+ enterpriseId: opts.enterpriseId || ""
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, trelloEnterpriseAriStaticOpts);
+ return new _TrelloEnterpriseAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, trelloEnterpriseAriStaticOpts);
+ return new _TrelloEnterpriseAri(opts);
+ }
+ getVariables() {
+ return {
+ enterpriseId: this.enterpriseId
+ };
+ }
+};
+
+export {
+ TrelloEnterpriseAri
+};