npm package diff

Package: @forge/util

Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31

File: package/packages/ari/chunk-AGU6IVS5.mjs

Index: package/packages/ari/chunk-AGU6IVS5.mjs
===================================================================
--- package/packages/ari/chunk-AGU6IVS5.mjs
+++ package/packages/ari/chunk-AGU6IVS5.mjs
@@ -0,0 +1,70 @@
+import {
+  ProformaProjectFormAriResourceOwner,
+  ProformaProjectFormAriResourceType
+} from "./chunk-GBX2XPCH.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/proforma/project-form/manifest.ts
+var proformaProjectFormAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  // eslint-disable-line no-useless-escape
+  resourceOwner: ProformaProjectFormAriResourceOwner,
+  resourceType: ProformaProjectFormAriResourceType,
+  resourceIdSlug: "activation/{activationId}/{formId}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    formId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+    // eslint-disable-line no-useless-escape
+  }
+};
+
+// src/proforma/project-form/index.ts
+var ProformaProjectFormAri = class _ProformaProjectFormAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts);
+    this._activationId = opts.resourceIdSegmentValues.activationId, this._formId = opts.resourceIdSegmentValues.formId;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get formId() {
+    return this._formId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: proformaProjectFormAriStaticOpts.qualifier,
+      platformQualifier: proformaProjectFormAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: proformaProjectFormAriStaticOpts.resourceOwner,
+      resourceType: proformaProjectFormAriStaticOpts.resourceType,
+      resourceId: `activation/${opts.activationId}/${opts.formId}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        formId: opts.formId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, proformaProjectFormAriStaticOpts);
+    return new _ProformaProjectFormAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, proformaProjectFormAriStaticOpts);
+    return new _ProformaProjectFormAri(opts);
+  }
+  getVariables() {
+    return {
+      activationId: this.activationId,
+      formId: this.formId
+    };
+  }
+};
+
+export {
+  ProformaProjectFormAri
+};