@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-4JZJGF27.mjs+
packages/ari/chunk-4JZJGF27.mjsNew file+66
Index: package/packages/ari/chunk-4JZJGF27.mjs
===================================================================
--- package/packages/ari/chunk-4JZJGF27.mjs
+++ package/packages/ari/chunk-4JZJGF27.mjs
@@ -0,0 +1,66 @@
+import {
+ TrelloLabelAriResourceOwner,
+ TrelloLabelAriResourceType
+} from "./chunk-JOW7TB5R.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/trello/label/manifest.ts
+var trelloLabelAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: TrelloLabelAriResourceOwner,
+ resourceType: TrelloLabelAriResourceType,
+ resourceIdSlug: "workspace/{workspaceId}/{labelId}",
+ resourceIdSegmentFormats: {
+ workspaceId: /[a-zA-Z0-9\-_.]*/,
+ labelId: /[a-zA-Z0-9\-_.]*/
+ }
+};
+
+// src/trello/label/index.ts
+var TrelloLabelAri = class _TrelloLabelAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._labelId = opts.resourceIdSegmentValues.labelId;
+ }
+ get workspaceId() {
+ return this._workspaceId;
+ }
+ get labelId() {
+ return this._labelId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: trelloLabelAriStaticOpts.qualifier,
+ platformQualifier: trelloLabelAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: trelloLabelAriStaticOpts.resourceOwner,
+ resourceType: trelloLabelAriStaticOpts.resourceType,
+ resourceId: `workspace/${opts.workspaceId}/${opts.labelId}`,
+ resourceIdSegmentValues: {
+ workspaceId: opts.workspaceId || "",
+ labelId: opts.labelId || ""
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, trelloLabelAriStaticOpts);
+ return new _TrelloLabelAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, trelloLabelAriStaticOpts);
+ return new _TrelloLabelAri(opts);
+ }
+ getVariables() {
+ return {
+ workspaceId: this.workspaceId,
+ labelId: this.labelId
+ };
+ }
+};
+
+export {
+ TrelloLabelAri
+};