@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-PODJD6AN.mjs+
packages/ari/chunk-PODJD6AN.mjsNew file+66
Index: package/packages/ari/chunk-PODJD6AN.mjs
===================================================================
--- package/packages/ari/chunk-PODJD6AN.mjs
+++ package/packages/ari/chunk-PODJD6AN.mjs
@@ -0,0 +1,66 @@
+import {
+ SecodaEntityAriResourceOwner,
+ SecodaEntityAriResourceType
+} from "./chunk-FXKXZ5VU.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/secoda/entity/manifest.ts
+var secodaEntityAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: SecodaEntityAriResourceOwner,
+ resourceType: SecodaEntityAriResourceType,
+ resourceIdSlug: "{workspaceId}/{entityPath}",
+ resourceIdSegmentFormats: {
+ workspaceId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/,
+ entityPath: /(([0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12})\/([0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12})|([0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}))/
+ }
+};
+
+// src/secoda/entity/index.ts
+var SecodaEntityAri = class _SecodaEntityAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._entityPath = opts.resourceIdSegmentValues.entityPath;
+ }
+ get workspaceId() {
+ return this._workspaceId;
+ }
+ get entityPath() {
+ return this._entityPath;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: secodaEntityAriStaticOpts.qualifier,
+ platformQualifier: secodaEntityAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: secodaEntityAriStaticOpts.resourceOwner,
+ resourceType: secodaEntityAriStaticOpts.resourceType,
+ resourceId: `${opts.workspaceId}/${opts.entityPath}`,
+ resourceIdSegmentValues: {
+ workspaceId: opts.workspaceId,
+ entityPath: opts.entityPath
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, secodaEntityAriStaticOpts);
+ return new _SecodaEntityAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, secodaEntityAriStaticOpts);
+ return new _SecodaEntityAri(opts);
+ }
+ getVariables() {
+ return {
+ workspaceId: this.workspaceId,
+ entityPath: this.entityPath
+ };
+ }
+};
+
+export {
+ SecodaEntityAri
+};