npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/chunk-YFTWHSFQ.mjs
Index: package/packages/ari/chunk-YFTWHSFQ.mjs
===================================================================
--- package/packages/ari/chunk-YFTWHSFQ.mjs
+++ package/packages/ari/chunk-YFTWHSFQ.mjs
@@ -0,0 +1,84 @@
+import {
+ OpsgenieAlertRecipientLinkAriResourceOwner,
+ OpsgenieAlertRecipientLinkAriResourceType
+} from "./chunk-JXI5TFG4.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/opsgenie/alert-recipient-link/manifest.ts
+var opsgenieAlertRecipientLinkAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
+ resourceOwner: OpsgenieAlertRecipientLinkAriResourceOwner,
+ resourceType: OpsgenieAlertRecipientLinkAriResourceType,
+ resourceIdSlug: "{workspaceId}/{alertId}/{recipientType}/{recipientId}",
+ resourceIdSegmentFormats: {
+ workspaceId: /[a-zA-Z0-9\-]+/,
+ // eslint-disable-line no-useless-escape
+ alertId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}(-[0-9]*)?/,
+ // eslint-disable-line no-useless-escape
+ recipientType: /(?:user|team)/,
+ // eslint-disable-line no-useless-escape
+ recipientId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+ // eslint-disable-line no-useless-escape
+ }
+};
+
+// src/opsgenie/alert-recipient-link/index.ts
+var OpsgenieAlertRecipientLinkAri = class _OpsgenieAlertRecipientLinkAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts);
+ this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._alertId = opts.resourceIdSegmentValues.alertId, this._recipientType = opts.resourceIdSegmentValues.recipientType, this._recipientId = opts.resourceIdSegmentValues.recipientId;
+ }
+ get workspaceId() {
+ return this._workspaceId;
+ }
+ get alertId() {
+ return this._alertId;
+ }
+ get recipientType() {
+ return this._recipientType;
+ }
+ get recipientId() {
+ return this._recipientId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: opsgenieAlertRecipientLinkAriStaticOpts.qualifier,
+ platformQualifier: opsgenieAlertRecipientLinkAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: opsgenieAlertRecipientLinkAriStaticOpts.resourceOwner,
+ resourceType: opsgenieAlertRecipientLinkAriStaticOpts.resourceType,
+ resourceId: `${opts.workspaceId}/${opts.alertId}/${opts.recipientType}/${opts.recipientId}`,
+ resourceIdSegmentValues: {
+ workspaceId: opts.workspaceId,
+ alertId: opts.alertId,
+ recipientType: opts.recipientType,
+ recipientId: opts.recipientId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, opsgenieAlertRecipientLinkAriStaticOpts);
+ return new _OpsgenieAlertRecipientLinkAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, opsgenieAlertRecipientLinkAriStaticOpts);
+ return new _OpsgenieAlertRecipientLinkAri(opts);
+ }
+ getVariables() {
+ return {
+ workspaceId: this.workspaceId,
+ alertId: this.alertId,
+ recipientType: this.recipientType,
+ recipientId: this.recipientId
+ };
+ }
+};
+
+export {
+ OpsgenieAlertRecipientLinkAri
+};