npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/chunk-V6I3GHKK.mjs
Index: package/packages/ari/chunk-V6I3GHKK.mjs
===================================================================
--- package/packages/ari/chunk-V6I3GHKK.mjs
+++ package/packages/ari/chunk-V6I3GHKK.mjs
@@ -0,0 +1,70 @@
+import {
+ GraphServiceRelationshipAriResourceOwner,
+ GraphServiceRelationshipAriResourceType
+} from "./chunk-JNGK7AYM.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/graph/service-relationship/manifest.ts
+var graphServiceRelationshipAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
+ resourceOwner: GraphServiceRelationshipAriResourceOwner,
+ resourceType: GraphServiceRelationshipAriResourceType,
+ resourceIdSlug: "{workspaceId}/{relationshipId}",
+ resourceIdSegmentFormats: {
+ workspaceId: /[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
+ relationshipId: /[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/graph/service-relationship/index.ts
+var GraphServiceRelationshipAri = class _GraphServiceRelationshipAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts);
+ this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._relationshipId = opts.resourceIdSegmentValues.relationshipId;
+ }
+ get workspaceId() {
+ return this._workspaceId;
+ }
+ get relationshipId() {
+ return this._relationshipId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: graphServiceRelationshipAriStaticOpts.qualifier,
+ platformQualifier: graphServiceRelationshipAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: graphServiceRelationshipAriStaticOpts.resourceOwner,
+ resourceType: graphServiceRelationshipAriStaticOpts.resourceType,
+ resourceId: `${opts.workspaceId}/${opts.relationshipId}`,
+ resourceIdSegmentValues: {
+ workspaceId: opts.workspaceId,
+ relationshipId: opts.relationshipId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, graphServiceRelationshipAriStaticOpts);
+ return new _GraphServiceRelationshipAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, graphServiceRelationshipAriStaticOpts);
+ return new _GraphServiceRelationshipAri(opts);
+ }
+ getVariables() {
+ return {
+ workspaceId: this.workspaceId,
+ relationshipId: this.relationshipId
+ };
+ }
+};
+
+export {
+ GraphServiceRelationshipAri
+};