@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-KNRWG3IL.mjs+
packages/ari/chunk-KNRWG3IL.mjsNew file+72
Index: package/packages/ari/chunk-KNRWG3IL.mjs
===================================================================
--- package/packages/ari/chunk-KNRWG3IL.mjs
+++ package/packages/ari/chunk-KNRWG3IL.mjs
@@ -0,0 +1,72 @@
+import {
+ IdentityScopedGroupAriResourceOwner,
+ IdentityScopedGroupAriResourceType
+} from "./chunk-CJOJ5VQB.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/identity/scoped-group/manifest.ts
+var identityScopedGroupAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: IdentityScopedGroupAriResourceOwner,
+ resourceType: IdentityScopedGroupAriResourceType,
+ resourceIdSlug: "{scopeType}/{scopeId}/{groupId}",
+ resourceIdSegmentFormats: {
+ scopeType: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/,
+ scopeId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/,
+ groupId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+ }
+};
+
+// src/identity/scoped-group/index.ts
+var IdentityScopedGroupAri = class _IdentityScopedGroupAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._scopeType = opts.resourceIdSegmentValues.scopeType, this._scopeId = opts.resourceIdSegmentValues.scopeId, this._groupId = opts.resourceIdSegmentValues.groupId;
+ }
+ get scopeType() {
+ return this._scopeType;
+ }
+ get scopeId() {
+ return this._scopeId;
+ }
+ get groupId() {
+ return this._groupId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: identityScopedGroupAriStaticOpts.qualifier,
+ platformQualifier: identityScopedGroupAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: identityScopedGroupAriStaticOpts.resourceOwner,
+ resourceType: identityScopedGroupAriStaticOpts.resourceType,
+ resourceId: `${opts.scopeType}/${opts.scopeId}/${opts.groupId}`,
+ resourceIdSegmentValues: {
+ scopeType: opts.scopeType,
+ scopeId: opts.scopeId,
+ groupId: opts.groupId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, identityScopedGroupAriStaticOpts);
+ return new _IdentityScopedGroupAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, identityScopedGroupAriStaticOpts);
+ return new _IdentityScopedGroupAri(opts);
+ }
+ getVariables() {
+ return {
+ scopeType: this.scopeType,
+ scopeId: this.scopeId,
+ groupId: this.groupId
+ };
+ }
+};
+
+export {
+ IdentityScopedGroupAri
+};