@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-CDW5PKXG.mjs
+packages/ari/chunk-CDW5PKXG.mjsNew file
+60
Index: package/packages/ari/chunk-CDW5PKXG.mjs
===================================================================
--- package/packages/ari/chunk-CDW5PKXG.mjs
+++ package/packages/ari/chunk-CDW5PKXG.mjs
@@ -0,0 +1,60 @@
+import {
+  MicrosoftAccountAriResourceOwner,
+  MicrosoftAccountAriResourceType
+} from "./chunk-YIHJDIS5.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/microsoft/account/manifest.ts
+var microsoftAccountAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "third-party",
+  cloudId: new RegExp("^$"),
+  resourceOwner: MicrosoftAccountAriResourceOwner,
+  resourceType: MicrosoftAccountAriResourceType,
+  resourceIdSlug: "{accountId}",
+  resourceIdSegmentFormats: {
+    accountId: /[a-zA-Z0-9\-_.~@;{}=]{0,255}/
+  }
+};
+
+// src/microsoft/account/index.ts
+var MicrosoftAccountAri = class _MicrosoftAccountAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._accountId = opts.resourceIdSegmentValues.accountId;
+  }
+  get accountId() {
+    return this._accountId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: microsoftAccountAriStaticOpts.qualifier,
+      platformQualifier: microsoftAccountAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: microsoftAccountAriStaticOpts.resourceOwner,
+      resourceType: microsoftAccountAriStaticOpts.resourceType,
+      resourceId: `${opts.accountId}`,
+      resourceIdSegmentValues: {
+        accountId: opts.accountId || ""
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, microsoftAccountAriStaticOpts);
+    return new _MicrosoftAccountAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, microsoftAccountAriStaticOpts);
+    return new _MicrosoftAccountAri(opts);
+  }
+  getVariables() {
+    return {
+      accountId: this.accountId
+    };
+  }
+};
+
+export {
+  MicrosoftAccountAri
+};