@forge/util
2.0.1-experimental-78908582.0.1-experimental-04cc2b9
packages/ari/chunk-TGJYRWYI.mjs−
packages/ari/chunk-TGJYRWYI.mjsDeleted−71
Index: package/packages/ari/chunk-TGJYRWYI.mjs
===================================================================
--- package/packages/ari/chunk-TGJYRWYI.mjs
+++ package/packages/ari/chunk-TGJYRWYI.mjs
@@ -1,71 +0,0 @@
-import {
- MercuryCostTypeAriResourceOwner,
- MercuryCostTypeAriResourceType
-} from "./chunk-YKTIL2LF.mjs";
-import {
- RegisteredAri
-} from "./chunk-AB4PPISI.mjs";
-import {
- AriParser
-} from "./chunk-S7RIZVFI.mjs";
-
-// src/mercury/cost-type/manifest.ts
-var mercuryCostTypeAriStaticOpts = {
- qualifier: "ari",
- platformQualifier: "cloud",
- cloudId: new RegExp("^[a-zA-Z0-9_\\-.]{1,255}$"),
- resourceOwner: MercuryCostTypeAriResourceOwner,
- resourceType: MercuryCostTypeAriResourceType,
- resourceIdSlug: "workspace/{workspaceId}/{costTypeId}",
- resourceIdSegmentFormats: {
- workspaceId: /[a-zA-Z0-9\-]+/,
- // eslint-disable-line no-useless-escape
- costTypeId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
- }
-};
-
-// src/mercury/cost-type/index.ts
-var MercuryCostTypeAri = class _MercuryCostTypeAri extends RegisteredAri {
- constructor(opts) {
- super(opts), this._siteId = opts.cloudId || "", this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._costTypeId = opts.resourceIdSegmentValues.costTypeId;
- }
- get siteId() {
- return this._siteId;
- }
- get workspaceId() {
- return this._workspaceId;
- }
- get costTypeId() {
- return this._costTypeId;
- }
- static create(opts) {
- let derivedOpts = {
- qualifier: mercuryCostTypeAriStaticOpts.qualifier,
- platformQualifier: mercuryCostTypeAriStaticOpts.platformQualifier,
- cloudId: opts.siteId,
- resourceOwner: mercuryCostTypeAriStaticOpts.resourceOwner,
- resourceType: mercuryCostTypeAriStaticOpts.resourceType,
- resourceId: `workspace/${opts.workspaceId}/${opts.costTypeId}`,
- resourceIdSegmentValues: {
- workspaceId: opts.workspaceId,
- costTypeId: opts.costTypeId
- }
- }, ariOpts = AriParser.fromOpts(derivedOpts, mercuryCostTypeAriStaticOpts);
- return new _MercuryCostTypeAri(ariOpts);
- }
- static parse(maybeAri) {
- let opts = AriParser.fromString(maybeAri, mercuryCostTypeAriStaticOpts);
- return new _MercuryCostTypeAri(opts);
- }
- getVariables() {
- return {
- siteId: this.siteId,
- workspaceId: this.workspaceId,
- costTypeId: this.costTypeId
- };
- }
-};
-
-export {
- MercuryCostTypeAri
-};