@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-VEHW7LDU.mjs+
packages/ari/chunk-VEHW7LDU.mjsNew file+67
Index: package/packages/ari/chunk-VEHW7LDU.mjs
===================================================================
--- package/packages/ari/chunk-VEHW7LDU.mjs
+++ package/packages/ari/chunk-VEHW7LDU.mjs
@@ -0,0 +1,67 @@
+import {
+ GraphCustomerOrgAriResourceOwner,
+ GraphCustomerOrgAriResourceType
+} from "./chunk-UMWZ4TML.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/graph/customer-org/manifest.ts
+var graphCustomerOrgAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: GraphCustomerOrgAriResourceOwner,
+ resourceType: GraphCustomerOrgAriResourceType,
+ resourceIdSlug: "activation/{activationId}/{customerOrgId}",
+ resourceIdSegmentFormats: {
+ activationId: /[a-zA-Z0-9\-]+/,
+ // eslint-disable-line no-useless-escape
+ customerOrgId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+ }
+};
+
+// src/graph/customer-org/index.ts
+var GraphCustomerOrgAri = class _GraphCustomerOrgAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._activationId = opts.resourceIdSegmentValues.activationId, this._customerOrgId = opts.resourceIdSegmentValues.customerOrgId;
+ }
+ get activationId() {
+ return this._activationId;
+ }
+ get customerOrgId() {
+ return this._customerOrgId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: graphCustomerOrgAriStaticOpts.qualifier,
+ platformQualifier: graphCustomerOrgAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: graphCustomerOrgAriStaticOpts.resourceOwner,
+ resourceType: graphCustomerOrgAriStaticOpts.resourceType,
+ resourceId: `activation/${opts.activationId}/${opts.customerOrgId}`,
+ resourceIdSegmentValues: {
+ activationId: opts.activationId,
+ customerOrgId: opts.customerOrgId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, graphCustomerOrgAriStaticOpts);
+ return new _GraphCustomerOrgAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, graphCustomerOrgAriStaticOpts);
+ return new _GraphCustomerOrgAri(opts);
+ }
+ getVariables() {
+ return {
+ activationId: this.activationId,
+ customerOrgId: this.customerOrgId
+ };
+ }
+};
+
+export {
+ GraphCustomerOrgAri
+};