oblien 1.2.3 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,13 +15,17 @@ npm install oblien
15
15
  import { OblienClient } from 'oblien';
16
16
 
17
17
  // Import modules (tree-shakeable)
18
- import { OblienAgents } from 'oblien/agents';
19
- import { OblienChat } from 'oblien/chat';
20
- import { OblienSandboxes } from 'oblien/sandbox';
21
- import { OblienSearch } from 'oblien/search';
22
- import { OblienIcons } from 'oblien/icons';
23
- import { OblienNamespaces } from 'oblien/namespaces';
24
- import { OblienCredits } from 'oblien/credits';
18
+ import { OblienAgents } from 'oblien/agents'; // agent creation
19
+ import { OblienChat } from 'oblien/chat'; // agent chat managment
20
+ import { OblienSandboxes } from 'oblien/sandbox'; // sandbox for agent code execution
21
+ import { OblienEmbeddings } from 'oblien/embeddings'; // embeddings store for semantic search
22
+ import { OblienSearch } from 'oblien/search'; // search gateway for your agent
23
+ import { OblienIcons } from 'oblien/icons'; // sematic based icons fetch
24
+ import { OblienNamespaces } from 'oblien/namespaces'; // user and guest management
25
+ import { OblienCredits } from 'oblien/credits'; // credits managemnt for your user
26
+ import { OblienCDN } from 'oblien/cdn'; // cdn upload for your app
27
+ import { OblienBrowser } from 'oblien/browser'; // browser api for scrap or any task
28
+ import { OblienDeployments } from 'oblien/deployments'; // deployments gateway
25
29
 
26
30
  // Initialize client
27
31
  const client = new OblienClient({
package/browser.js ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Browser Module Export
3
+ */
4
+
5
+ export { OblienBrowser } from './src/browser/index.js';
6
+
package/cdn.js ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * CDN Module Export
3
+ */
4
+
5
+ export { OblienCDN } from './src/cdn/index.js';
6
+
package/index.d.ts CHANGED
@@ -308,7 +308,7 @@ export class OblienChat {
308
308
  // Session Creation
309
309
  createSession(options: CreateSessionOptions): Promise<SessionData>;
310
310
  createGuestSession(options: CreateGuestSessionOptions): Promise<GuestSessionData>;
311
- getGuest(options: GetGuestOptions | string): Promise<Guest | null>; // From Oblien API (string = namespace)
311
+ getGuest(options: GetGuestOptions | string, getSessions?: boolean): Promise<Guest | null>; // From Oblien API (string = namespace)
312
312
  getGuestFromCache(ip: string, fingerprint?: string): Promise<Guest | null>; // From local cache
313
313
 
314
314
  // Session Token Management (Server-side)
@@ -649,6 +649,225 @@ export class OblienCredits {
649
649
  cancelPurchase(purchaseId: string): Promise<any>;
650
650
  }
651
651
 
652
+ // ============ CDN Types ============
653
+
654
+ export interface CDNConfig {
655
+ cdnURL?: string;
656
+ }
657
+
658
+ // ============ Browser Types ============
659
+
660
+ export interface BrowserConfig {
661
+ browserURL?: string;
662
+ }
663
+
664
+ export interface BrowserTokenResponse {
665
+ success: boolean;
666
+ token: string;
667
+ expiresIn: string;
668
+ message: string;
669
+ }
670
+
671
+ export interface PageContentOptions {
672
+ url: string;
673
+ token?: string;
674
+ waitFor?: number;
675
+ selector?: string;
676
+ extract?: 'html' | 'text' | 'both';
677
+ waitForFullLoad?: boolean;
678
+ useProxy?: boolean;
679
+ }
680
+
681
+ export interface PageContentResult {
682
+ success: boolean;
683
+ url: string;
684
+ html?: string;
685
+ text?: string;
686
+ title?: string;
687
+ }
688
+
689
+ export interface ScreenshotOptions {
690
+ url: string;
691
+ token?: string;
692
+ fullPage?: boolean;
693
+ format?: 'png' | 'jpeg';
694
+ quality?: number;
695
+ viewport?: { width: number; height: number };
696
+ device?: string;
697
+ useProxy?: boolean;
698
+ }
699
+
700
+ export interface ScreenshotResult {
701
+ success: boolean;
702
+ screenshot: string;
703
+ format: string;
704
+ width: number;
705
+ height: number;
706
+ }
707
+
708
+ export interface PdfOptions {
709
+ url: string;
710
+ token?: string;
711
+ format?: string;
712
+ landscape?: boolean;
713
+ printBackground?: boolean;
714
+ margin?: { top?: string; right?: string; bottom?: string; left?: string };
715
+ useProxy?: boolean;
716
+ }
717
+
718
+ export interface PdfResult {
719
+ success: boolean;
720
+ pdf: string;
721
+ format: string;
722
+ pages: number;
723
+ }
724
+
725
+ export interface MonitorRequestsOptions {
726
+ url: string;
727
+ token?: string;
728
+ duration?: number;
729
+ filterTypes?: string[];
730
+ useProxy?: boolean;
731
+ }
732
+
733
+ export interface MonitorRequestsResult {
734
+ success: boolean;
735
+ requests: Array<{
736
+ url: string;
737
+ method: string;
738
+ type: string;
739
+ status?: number;
740
+ }>;
741
+ count: number;
742
+ }
743
+
744
+ export interface ConsoleLogsOptions {
745
+ url: string;
746
+ token?: string;
747
+ duration?: number;
748
+ useProxy?: boolean;
749
+ }
750
+
751
+ export interface ConsoleLogsResult {
752
+ success: boolean;
753
+ logs: Array<{
754
+ type: string;
755
+ text: string;
756
+ timestamp: string;
757
+ }>;
758
+ }
759
+
760
+ export class OblienBrowser {
761
+ constructor(client: OblienClient, config?: BrowserConfig);
762
+
763
+ // Token Management
764
+ generateToken(): Promise<BrowserTokenResponse>;
765
+ clearTokenCache(): void;
766
+
767
+ // Browser Operations
768
+ getPageContent(options: PageContentOptions): Promise<PageContentResult>;
769
+ screenshot(options: ScreenshotOptions): Promise<ScreenshotResult>;
770
+ pdf(options: PdfOptions): Promise<PdfResult>;
771
+ monitorRequests(options: MonitorRequestsOptions): Promise<MonitorRequestsResult>;
772
+ getConsoleLogs(options: ConsoleLogsOptions): Promise<ConsoleLogsResult>;
773
+ getDevicePresets(options?: { token?: string }): Promise<any>;
774
+ getStatus(options?: { token?: string }): Promise<any>;
775
+ }
776
+
777
+ export interface TokenResponse {
778
+ success: boolean;
779
+ token: string;
780
+ scope: 'user' | 'admin';
781
+ permissions: string[];
782
+ expiresIn: string;
783
+ message: string;
784
+ }
785
+
786
+ export interface MulterFile {
787
+ buffer: Buffer;
788
+ originalname: string;
789
+ mimetype: string;
790
+ size: number;
791
+ }
792
+
793
+ export interface UploadOptions {
794
+ token?: string;
795
+ filename?: string;
796
+ mimetype?: string;
797
+ scope?: 'user' | 'admin';
798
+ }
799
+
800
+ export interface MultiUploadOptions {
801
+ token?: string;
802
+ filenames?: string[];
803
+ scope?: 'user' | 'admin';
804
+ }
805
+
806
+ export interface UploadFromUrlsOptions {
807
+ token?: string;
808
+ scope?: 'user' | 'admin';
809
+ }
810
+
811
+ export interface FileInfoOptions {
812
+ token?: string;
813
+ }
814
+
815
+ export interface UploadResult {
816
+ success: boolean;
817
+ file: {
818
+ url: string;
819
+ filename: string;
820
+ size: number;
821
+ mimetype: string;
822
+ variants?: Record<string, string>;
823
+ };
824
+ }
825
+
826
+ export interface MultiUploadResult {
827
+ success: boolean;
828
+ files: Array<{
829
+ url: string;
830
+ filename: string;
831
+ size: number;
832
+ mimetype: string;
833
+ variants?: Record<string, string>;
834
+ }>;
835
+ }
836
+
837
+ export interface FileInfo {
838
+ success: boolean;
839
+ file: {
840
+ path: string;
841
+ size: number;
842
+ mimetype: string;
843
+ created: string;
844
+ variants?: Record<string, string>;
845
+ };
846
+ }
847
+
848
+ export class OblienCDN {
849
+ constructor(client: OblienClient, config?: CDNConfig);
850
+
851
+ // Token Management
852
+ generateUserToken(): Promise<TokenResponse>;
853
+ generateAdminToken(): Promise<TokenResponse>;
854
+ clearTokenCache(scope?: 'user' | 'admin' | 'all'): void;
855
+
856
+ // File Upload
857
+ upload(file: Buffer | string | MulterFile, options?: UploadOptions): Promise<UploadResult>;
858
+ uploadMultiple(files: Array<Buffer | string | MulterFile>, options?: MultiUploadOptions): Promise<MultiUploadResult>;
859
+
860
+ // URL Upload
861
+ uploadFromUrls(urls: string[], options?: UploadFromUrlsOptions): Promise<MultiUploadResult>;
862
+
863
+ // File Info (Admin Only)
864
+ getFileInfo(filePath: string, options?: FileInfoOptions): Promise<FileInfo>;
865
+
866
+ // Metadata
867
+ getVariants(options?: { token?: string }): Promise<any>;
868
+ getLimits(options?: { token?: string }): Promise<any>;
869
+ }
870
+
652
871
  // ============ Exports ============
653
872
 
654
873
  declare const _default: {
@@ -658,6 +877,8 @@ declare const _default: {
658
877
  OblienNamespaces: typeof OblienNamespaces;
659
878
  Namespace: typeof Namespace;
660
879
  OblienCredits: typeof OblienCredits;
880
+ OblienCDN: typeof OblienCDN;
881
+ OblienBrowser: typeof OblienBrowser;
661
882
  GuestManager: typeof GuestManager;
662
883
  NodeCacheStorage: typeof NodeCacheStorage;
663
884
  InMemoryStorage: typeof InMemoryStorage;
package/index.js CHANGED
@@ -9,6 +9,8 @@ import { OblienAgents, Agent, Tools, AgentSettings } from './src/agents/index.js
9
9
  import { OblienSandboxes, Sandbox } from './src/sandbox/index.js';
10
10
  import { OblienSearch } from './src/search/index.js';
11
11
  import { OblienIcons } from './src/icons/index.js';
12
+ import { OblienCDN } from './src/cdn/index.js';
13
+ import { OblienBrowser } from './src/browser/index.js';
12
14
  import { OblienNamespaces, Namespace } from './src/namespaces/index.js';
13
15
  import { OblienCredits } from './src/credits/index.js';
14
16
  import {
@@ -25,6 +27,8 @@ export { OblienAgents, Agent, Tools, AgentSettings };
25
27
  export { OblienSandboxes, Sandbox };
26
28
  export { OblienSearch };
27
29
  export { OblienIcons };
30
+ export { OblienCDN };
31
+ export { OblienBrowser };
28
32
  export { OblienNamespaces, Namespace };
29
33
  export { OblienCredits };
30
34
  export {
@@ -47,6 +51,8 @@ export default {
47
51
  Sandbox,
48
52
  OblienSearch,
49
53
  OblienIcons,
54
+ OblienCDN,
55
+ OblienBrowser,
50
56
  OblienNamespaces,
51
57
  Namespace,
52
58
  OblienCredits,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oblien",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Server-side SDK for Oblien AI Platform - Build AI-powered applications with chat, agents, and workflows",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -13,7 +13,9 @@
13
13
  "./agents": "./agents.js",
14
14
  "./sandbox": "./sandbox.js",
15
15
  "./search": "./search.js",
16
- "./icons": "./icons.js"
16
+ "./icons": "./icons.js",
17
+ "./cdn": "./cdn.js",
18
+ "./browser": "./browser.js"
17
19
  },
18
20
  "scripts": {
19
21
  "test": "node --test tests/**/*.test.js"
@@ -28,7 +30,13 @@
28
30
  "api",
29
31
  "server-side",
30
32
  "llm",
31
- "assistant"
33
+ "assistant",
34
+ "cdn",
35
+ "file-upload",
36
+ "image-processing",
37
+ "browser-automation",
38
+ "puppeteer",
39
+ "scraping"
32
40
  ],
33
41
  "author": "Oblien",
34
42
  "license": "MIT",
@@ -68,6 +76,8 @@
68
76
  "sandbox.js",
69
77
  "search.js",
70
78
  "icons.js",
79
+ "cdn.js",
80
+ "browser.js",
71
81
  "workflows.js",
72
82
  "README.md",
73
83
  "LICENSE"