@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-2A4EPTY6.mjs
+packages/ari/chunk-2A4EPTY6.mjsNew file
+66
Index: package/packages/ari/chunk-2A4EPTY6.mjs
===================================================================
--- package/packages/ari/chunk-2A4EPTY6.mjs
+++ package/packages/ari/chunk-2A4EPTY6.mjs
@@ -0,0 +1,66 @@
+import {
+  GoogleGoogleDriveLiteDocumentAriResourceOwner,
+  GoogleGoogleDriveLiteDocumentAriResourceType
+} from "./chunk-WBN74GAV.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/google.google-drive-lite/document/manifest.ts
+var googleGoogleDriveLiteDocumentAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "third-party",
+  cloudId: new RegExp("^$"),
+  resourceOwner: GoogleGoogleDriveLiteDocumentAriResourceOwner,
+  resourceType: GoogleGoogleDriveLiteDocumentAriResourceType,
+  resourceIdSlug: "{googleDriveDocumentIdType}/{docId}",
+  resourceIdSegmentFormats: {
+    googleDriveDocumentIdType: /(documentId|spreadsheetId|presentationId|formId|folderId|imageId|audioId|videoId|pdfId|shortcutId|codeId|archiveId|web-pageId|pageId|blogpostId|otherId)/,
+    docId: /[a-zA-Z0-9_-]+/
+  }
+};
+
+// src/google.google-drive-lite/document/index.ts
+var GoogleGoogleDriveLiteDocumentAri = class _GoogleGoogleDriveLiteDocumentAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._googleDriveDocumentIdType = opts.resourceIdSegmentValues.googleDriveDocumentIdType, this._docId = opts.resourceIdSegmentValues.docId;
+  }
+  get googleDriveDocumentIdType() {
+    return this._googleDriveDocumentIdType;
+  }
+  get docId() {
+    return this._docId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: googleGoogleDriveLiteDocumentAriStaticOpts.qualifier,
+      platformQualifier: googleGoogleDriveLiteDocumentAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: googleGoogleDriveLiteDocumentAriStaticOpts.resourceOwner,
+      resourceType: googleGoogleDriveLiteDocumentAriStaticOpts.resourceType,
+      resourceId: `${opts.googleDriveDocumentIdType}/${opts.docId}`,
+      resourceIdSegmentValues: {
+        googleDriveDocumentIdType: opts.googleDriveDocumentIdType,
+        docId: opts.docId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, googleGoogleDriveLiteDocumentAriStaticOpts);
+    return new _GoogleGoogleDriveLiteDocumentAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, googleGoogleDriveLiteDocumentAriStaticOpts);
+    return new _GoogleGoogleDriveLiteDocumentAri(opts);
+  }
+  getVariables() {
+    return {
+      googleDriveDocumentIdType: this.googleDriveDocumentIdType,
+      docId: this.docId
+    };
+  }
+};
+
+export {
+  GoogleGoogleDriveLiteDocumentAri
+};