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