@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-VSRKPTDF.mjs
+packages/ari/chunk-VSRKPTDF.mjsNew file
+66
Index: package/packages/ari/chunk-VSRKPTDF.mjs
===================================================================
--- package/packages/ari/chunk-VSRKPTDF.mjs
+++ package/packages/ari/chunk-VSRKPTDF.mjs
@@ -0,0 +1,66 @@
+import {
+  GithubGithubPullRequestAriResourceOwner,
+  GithubGithubPullRequestAriResourceType
+} from "./chunk-5L7TTH2V.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/github.github/pull-request/manifest.ts
+var githubGithubPullRequestAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "third-party",
+  cloudId: new RegExp("^$"),
+  resourceOwner: GithubGithubPullRequestAriResourceOwner,
+  resourceType: GithubGithubPullRequestAriResourceType,
+  resourceIdSlug: "repositoryId/{repositoryId}/pullRequestId/{pullRequestId}",
+  resourceIdSegmentFormats: {
+    repositoryId: /[0-9]+/,
+    pullRequestId: /[0-9]+/
+  }
+};
+
+// src/github.github/pull-request/index.ts
+var GithubGithubPullRequestAri = class _GithubGithubPullRequestAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._repositoryId = opts.resourceIdSegmentValues.repositoryId, this._pullRequestId = opts.resourceIdSegmentValues.pullRequestId;
+  }
+  get repositoryId() {
+    return this._repositoryId;
+  }
+  get pullRequestId() {
+    return this._pullRequestId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: githubGithubPullRequestAriStaticOpts.qualifier,
+      platformQualifier: githubGithubPullRequestAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: githubGithubPullRequestAriStaticOpts.resourceOwner,
+      resourceType: githubGithubPullRequestAriStaticOpts.resourceType,
+      resourceId: `repositoryId/${opts.repositoryId}/pullRequestId/${opts.pullRequestId}`,
+      resourceIdSegmentValues: {
+        repositoryId: opts.repositoryId,
+        pullRequestId: opts.pullRequestId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, githubGithubPullRequestAriStaticOpts);
+    return new _GithubGithubPullRequestAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, githubGithubPullRequestAriStaticOpts);
+    return new _GithubGithubPullRequestAri(opts);
+  }
+  getVariables() {
+    return {
+      repositoryId: this.repositoryId,
+      pullRequestId: this.pullRequestId
+    };
+  }
+};
+
+export {
+  GithubGithubPullRequestAri
+};