@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-CPDGLINT.mjs
+packages/ari/chunk-CPDGLINT.mjsNew file
+64
Index: package/packages/ari/chunk-CPDGLINT.mjs
===================================================================
--- package/packages/ari/chunk-CPDGLINT.mjs
+++ package/packages/ari/chunk-CPDGLINT.mjs
@@ -0,0 +1,64 @@
+import {
+  TownsquareLearningAriResourceOwner,
+  TownsquareLearningAriResourceType
+} from "./chunk-4J5O222V.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/townsquare/learning/manifest.ts
+var townsquareLearningAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^[a-zA-Z0-9_\\-.]{1,255}$"),
+  resourceOwner: TownsquareLearningAriResourceOwner,
+  resourceType: TownsquareLearningAriResourceType,
+  resourceIdSlug: "{learningUuid}",
+  resourceIdSegmentFormats: {
+    learningUuid: /[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/learning/index.ts
+var TownsquareLearningAri = class _TownsquareLearningAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._siteId = opts.cloudId || "", this._learningUuid = opts.resourceIdSegmentValues.learningUuid;
+  }
+  get siteId() {
+    return this._siteId;
+  }
+  get learningUuid() {
+    return this._learningUuid;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: townsquareLearningAriStaticOpts.qualifier,
+      platformQualifier: townsquareLearningAriStaticOpts.platformQualifier,
+      cloudId: opts.siteId,
+      resourceOwner: townsquareLearningAriStaticOpts.resourceOwner,
+      resourceType: townsquareLearningAriStaticOpts.resourceType,
+      resourceId: `${opts.learningUuid}`,
+      resourceIdSegmentValues: {
+        learningUuid: opts.learningUuid
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, townsquareLearningAriStaticOpts);
+    return new _TownsquareLearningAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, townsquareLearningAriStaticOpts);
+    return new _TownsquareLearningAri(opts);
+  }
+  getVariables() {
+    return {
+      siteId: this.siteId,
+      learningUuid: this.learningUuid
+    };
+  }
+};
+
+export {
+  TownsquareLearningAri
+};