npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/chunk-635QZO4I.mjs
Index: package/packages/ari/chunk-635QZO4I.mjs
===================================================================
--- package/packages/ari/chunk-635QZO4I.mjs
+++ package/packages/ari/chunk-635QZO4I.mjs
@@ -0,0 +1,70 @@
+import {
+ TrelloCheckItemAriResourceOwner,
+ TrelloCheckItemAriResourceType
+} from "./chunk-SPJON63N.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/trello/check-item/manifest.ts
+var trelloCheckItemAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
+ resourceOwner: TrelloCheckItemAriResourceOwner,
+ resourceType: TrelloCheckItemAriResourceType,
+ resourceIdSlug: "workspace/{workspaceId}/{checkItemId}",
+ resourceIdSegmentFormats: {
+ workspaceId: /[a-zA-Z0-9\-_.]*/,
+ // eslint-disable-line no-useless-escape
+ checkItemId: /[a-zA-Z0-9\-_.]*/
+ // eslint-disable-line no-useless-escape
+ }
+};
+
+// src/trello/check-item/index.ts
+var TrelloCheckItemAri = class _TrelloCheckItemAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts);
+ this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._checkItemId = opts.resourceIdSegmentValues.checkItemId;
+ }
+ get workspaceId() {
+ return this._workspaceId;
+ }
+ get checkItemId() {
+ return this._checkItemId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: trelloCheckItemAriStaticOpts.qualifier,
+ platformQualifier: trelloCheckItemAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: trelloCheckItemAriStaticOpts.resourceOwner,
+ resourceType: trelloCheckItemAriStaticOpts.resourceType,
+ resourceId: `workspace/${opts.workspaceId}/${opts.checkItemId}`,
+ resourceIdSegmentValues: {
+ workspaceId: opts.workspaceId || "",
+ checkItemId: opts.checkItemId || ""
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, trelloCheckItemAriStaticOpts);
+ return new _TrelloCheckItemAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, trelloCheckItemAriStaticOpts);
+ return new _TrelloCheckItemAri(opts);
+ }
+ getVariables() {
+ return {
+ workspaceId: this.workspaceId,
+ checkItemId: this.checkItemId
+ };
+ }
+};
+
+export {
+ TrelloCheckItemAri
+};