@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-ZLBQ3CQ3.mjs+
packages/ari/chunk-ZLBQ3CQ3.mjsNew file+64
Index: package/packages/ari/chunk-ZLBQ3CQ3.mjs
===================================================================
--- package/packages/ari/chunk-ZLBQ3CQ3.mjs
+++ package/packages/ari/chunk-ZLBQ3CQ3.mjs
@@ -0,0 +1,64 @@
+import {
+ TownsquareCommentAriResourceOwner,
+ TownsquareCommentAriResourceType
+} from "./chunk-GVAPRDNZ.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/townsquare/comment/manifest.ts
+var townsquareCommentAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^[a-zA-Z0-9_\\-.]{1,255}$"),
+ resourceOwner: TownsquareCommentAriResourceOwner,
+ resourceType: TownsquareCommentAriResourceType,
+ resourceIdSlug: "{commentUuid}",
+ resourceIdSegmentFormats: {
+ commentUuid: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+ }
+};
+
+// src/townsquare/comment/index.ts
+var TownsquareCommentAri = class _TownsquareCommentAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._siteId = opts.cloudId || "", this._commentUuid = opts.resourceIdSegmentValues.commentUuid;
+ }
+ get siteId() {
+ return this._siteId;
+ }
+ get commentUuid() {
+ return this._commentUuid;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: townsquareCommentAriStaticOpts.qualifier,
+ platformQualifier: townsquareCommentAriStaticOpts.platformQualifier,
+ cloudId: opts.siteId,
+ resourceOwner: townsquareCommentAriStaticOpts.resourceOwner,
+ resourceType: townsquareCommentAriStaticOpts.resourceType,
+ resourceId: `${opts.commentUuid}`,
+ resourceIdSegmentValues: {
+ commentUuid: opts.commentUuid
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, townsquareCommentAriStaticOpts);
+ return new _TownsquareCommentAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, townsquareCommentAriStaticOpts);
+ return new _TownsquareCommentAri(opts);
+ }
+ getVariables() {
+ return {
+ siteId: this.siteId,
+ commentUuid: this.commentUuid
+ };
+ }
+};
+
+export {
+ TownsquareCommentAri
+};