@forge/util
2.0.1-experimental-78908582.0.1-experimental-04cc2b9
packages/ari/chunk-UK4SY7E5.mjs+
packages/ari/chunk-UK4SY7E5.mjsNew file+70
Index: package/packages/ari/chunk-UK4SY7E5.mjs
===================================================================
--- package/packages/ari/chunk-UK4SY7E5.mjs
+++ package/packages/ari/chunk-UK4SY7E5.mjs
@@ -0,0 +1,70 @@
+import {
+ OpsgenieNotificationAriResourceOwner,
+ OpsgenieNotificationAriResourceType
+} from "./chunk-WBXUDE5Y.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/opsgenie/notification/manifest.ts
+var opsgenieNotificationAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
+ resourceOwner: OpsgenieNotificationAriResourceOwner,
+ resourceType: OpsgenieNotificationAriResourceType,
+ resourceIdSlug: "{workspaceId}/{notificationId}",
+ resourceIdSegmentFormats: {
+ workspaceId: /[a-zA-Z0-9\-]+/,
+ // eslint-disable-line no-useless-escape
+ notificationId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+ // eslint-disable-line no-useless-escape
+ }
+};
+
+// src/opsgenie/notification/index.ts
+var OpsgenieNotificationAri = class _OpsgenieNotificationAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts);
+ this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._notificationId = opts.resourceIdSegmentValues.notificationId;
+ }
+ get workspaceId() {
+ return this._workspaceId;
+ }
+ get notificationId() {
+ return this._notificationId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: opsgenieNotificationAriStaticOpts.qualifier,
+ platformQualifier: opsgenieNotificationAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: opsgenieNotificationAriStaticOpts.resourceOwner,
+ resourceType: opsgenieNotificationAriStaticOpts.resourceType,
+ resourceId: `${opts.workspaceId}/${opts.notificationId}`,
+ resourceIdSegmentValues: {
+ workspaceId: opts.workspaceId,
+ notificationId: opts.notificationId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, opsgenieNotificationAriStaticOpts);
+ return new _OpsgenieNotificationAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, opsgenieNotificationAriStaticOpts);
+ return new _OpsgenieNotificationAri(opts);
+ }
+ getVariables() {
+ return {
+ workspaceId: this.workspaceId,
+ notificationId: this.notificationId
+ };
+ }
+};
+
+export {
+ OpsgenieNotificationAri
+};