@uploadista/expo 0.0.9 → 0.0.11

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/dist/index.d.mts CHANGED
@@ -1,7 +1,9 @@
1
+ import * as _uploadista_client_core0 from "@uploadista/client-core";
1
2
  import { Base64Service, Base64Service as Base64Service$1, ConnectionPoolConfig, ConnectionPoolConfig as ConnectionPoolConfig$1, FileReaderService, FileReaderService as FileReaderService$1, FileSource, HttpClient, HttpClient as HttpClient$1, HttpRequestOptions, HttpResponse, IdGenerationService, IdGenerationService as IdGenerationService$1, ServiceContainer, ServiceContainer as ServiceContainer$1, SliceResult, StorageService, StorageService as StorageService$1, UploadistaClientOptions as UploadistaClientOptions$1 } from "@uploadista/client-core";
2
3
  import { CameraOptions, CameraOptions as CameraOptions$1, FileInfo, FileInfo as FileInfo$1, FilePickResult, FilePickResult as FilePickResult$1, FileSystemProvider, FileSystemProvider as FileSystemProvider$1, PickerOptions, PickerOptions as PickerOptions$1, ReactNativeUploadInput } from "@uploadista/react-native-core";
3
4
  import React from "react";
4
5
  import * as react_jsx_runtime0 from "react/jsx-runtime";
6
+ import * as _uploadista_core0 from "@uploadista/core";
5
7
  import { UploadistaContextType } from "@uploadista/react-native-core/hooks";
6
8
 
7
9
  //#region src/types/upload-input.d.ts
@@ -41,7 +43,125 @@ interface UploadistaClientOptions extends Omit<UploadistaClientOptions$1<ExpoUpl
41
43
  * });
42
44
  * ```
43
45
  */
44
- declare function createUploadistaClient(options: UploadistaClientOptions): any;
46
+ declare function createUploadistaClient(options: UploadistaClientOptions): {
47
+ upload: (file: ExpoUploadInput, {
48
+ uploadLengthDeferred,
49
+ uploadSize,
50
+ onProgress,
51
+ onChunkComplete,
52
+ onSuccess,
53
+ onShouldRetry,
54
+ onError
55
+ }?: _uploadista_client_core0.UploadistaUploadOptions) => Promise<{
56
+ abort: () => void;
57
+ }>;
58
+ uploadWithFlow: (file: ExpoUploadInput, flowConfig: _uploadista_client_core0.FlowUploadConfig, {
59
+ onProgress,
60
+ onChunkComplete,
61
+ onSuccess,
62
+ onShouldRetry,
63
+ onJobStart,
64
+ onError
65
+ }?: Omit<_uploadista_client_core0.UploadistaUploadOptions, "uploadLengthDeferred" | "uploadSize" | "metadata">) => Promise<{
66
+ abort: () => Promise<void>;
67
+ pause: () => Promise<_uploadista_core0.FlowJob>;
68
+ jobId: string;
69
+ }>;
70
+ abort: (params: Parameters<({
71
+ uploadId,
72
+ uploadIdStorageKey,
73
+ retryTimeout,
74
+ shouldTerminate,
75
+ abortController,
76
+ uploadistaApi,
77
+ platformService,
78
+ retryDelays,
79
+ clientStorage
80
+ }: {
81
+ uploadId: string;
82
+ uploadIdStorageKey: string | undefined;
83
+ retryTimeout: _uploadista_client_core0.Timeout | null;
84
+ shouldTerminate: boolean;
85
+ abortController: _uploadista_client_core0.AbortControllerLike;
86
+ uploadistaApi: _uploadista_client_core0.UploadistaApi;
87
+ platformService: _uploadista_client_core0.PlatformService;
88
+ retryDelays?: number[];
89
+ clientStorage: _uploadista_client_core0.ClientStorage;
90
+ }) => Promise<void>>[0]) => Promise<void>;
91
+ getFlow: (flowId: string) => Promise<{
92
+ status: number;
93
+ flow: _uploadista_core0.FlowData;
94
+ }>;
95
+ runFlow: ({
96
+ flowId,
97
+ inputs,
98
+ storageId: flowStorageId
99
+ }: {
100
+ flowId: string;
101
+ inputs: Record<string, unknown>;
102
+ storageId?: string;
103
+ }) => Promise<{
104
+ status: number;
105
+ job: _uploadista_core0.FlowJob;
106
+ }>;
107
+ resumeFlow: ({
108
+ jobId,
109
+ nodeId,
110
+ newData,
111
+ contentType
112
+ }: {
113
+ jobId: string;
114
+ nodeId: string;
115
+ newData: unknown;
116
+ contentType?: "application/json" | "application/octet-stream";
117
+ }) => Promise<_uploadista_core0.FlowJob>;
118
+ pauseFlow: (jobId: string) => Promise<_uploadista_core0.FlowJob>;
119
+ cancelFlow: (jobId: string) => Promise<_uploadista_core0.FlowJob>;
120
+ getJobStatus: (jobId: string) => Promise<_uploadista_core0.FlowJob>;
121
+ openUploadWebSocket: (uploadId: string) => Promise<_uploadista_client_core0.WebSocketLike>;
122
+ openFlowWebSocket: (jobId: string) => Promise<_uploadista_client_core0.WebSocketLike>;
123
+ openWebSocket: (id: string) => Promise<_uploadista_client_core0.WebSocketLike>;
124
+ closeWebSocket: (id: string) => void;
125
+ closeAllWebSockets: () => void;
126
+ sendPing: (jobId: string) => boolean;
127
+ isWebSocketConnected: (id: string) => boolean;
128
+ getWebSocketConnectionCount: () => number;
129
+ getWebSocketConnectionCountByType: () => {
130
+ upload: number;
131
+ flow: number;
132
+ total: number;
133
+ };
134
+ getNetworkMetrics: () => _uploadista_client_core0.NetworkMetrics;
135
+ getNetworkCondition: () => _uploadista_client_core0.NetworkCondition;
136
+ getChunkingInsights: () => _uploadista_client_core0.PerformanceInsights;
137
+ exportMetrics: () => {
138
+ session: Partial<_uploadista_client_core0.UploadSessionMetrics>;
139
+ chunks: _uploadista_client_core0.ChunkMetrics[];
140
+ insights: _uploadista_client_core0.PerformanceInsights;
141
+ };
142
+ getConnectionMetrics: () => _uploadista_client_core0.ConnectionMetrics;
143
+ getDetailedConnectionMetrics: () => _uploadista_client_core0.DetailedConnectionMetrics;
144
+ warmupConnections: (urls: string[]) => Promise<void>;
145
+ getConnectionPoolingInsights: () => Promise<{
146
+ isOptimized: boolean;
147
+ reuseRate: number;
148
+ recommendedMinChunkSize: number;
149
+ connectionOverhead: number;
150
+ }>;
151
+ resetMetrics: () => Promise<void>;
152
+ validateConfiguration: (options: UploadistaClientOptions$1<ExpoUploadInput>) => {
153
+ valid: boolean;
154
+ errors: string[];
155
+ warnings: string[];
156
+ };
157
+ validateConfigurationAsync: (options: UploadistaClientOptions$1<ExpoUploadInput>) => Promise<{
158
+ valid: boolean;
159
+ errors: string[];
160
+ warnings: string[];
161
+ capabilities: _uploadista_core0.DataStoreCapabilities;
162
+ }>;
163
+ getCapabilities: () => Promise<_uploadista_core0.DataStoreCapabilities>;
164
+ };
45
165
  //#endregion
46
166
  //#region src/hooks/use-uploadista-client.d.ts
47
167
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/upload-input.ts","../src/client/create-uploadista-client.ts","../src/hooks/use-uploadista-client.ts","../src/components/uploadista-provider.tsx","../src/services/base64-service.ts","../src/services/create-expo-services.ts","../src/services/file-reader-service.ts","../src/services/http-client.ts","../src/services/id-generation-service.ts","../src/services/storage-service.ts","../src/services/expo-file-system-provider.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAKY,eAAA,GAAkB,OAAO;;;;;UCKpB,uBAAA,SACP,KACN,0BAA4B;sBAaV;;;;ADpBtB;;;;ACKA;;;;;;AA2CA;;;;AC/BA;AAaA;;;;;AA4EA;;iBD1DgB,sBAAA,UAAgC;;;;;;;;;ADhDhD;;;;ACKA;;;;;;AA2CgB,UC/BC,0BAAA,SAAmC,uBD+BmB,CAAA;;;;EC/BtD,OAAA,CAAA,EAIL,uBAJgC,CAAA,SAIhC,CAAA;AASZ;;;;;AA4EA;;UA5EiB,yBAAA;;ACZjB;AAoDA;EACE,MAAA,EDrCQ,UCqCR,CAAA,ODrC0B,sBCqC1B,CAAA;EAEC;;;EAkGa,MAAA,EDpIN,0BCoI8B;;;;ACzKxC;;;;ACUA;AAkCA;;;;;;;;ACxCA;;;;ACKA;;;;ACTA;;;;ACDA;;;;ACSA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBRgGgB,mBAAA,UACL,6BACR;;;;;;;AF5GH;;;;ACKA;;;AAesB,UEFL,uBAAA,SAAgC,0BFE3B,CAAA;EAdZ;;AA0CV;YE1BY,KAAA,CAAM;;;ADLlB;AAaA;;;;;AA4EA;;;;ACxFA;AAoDA;;;;;AAqGA;;;;ACzKA;;;;ACUA;AAkCA;;;;;;;;ACxCA;;;;ACKA;;;;ACTA;;;iBLoEgB,kBAAA;;;GAGb,0BAAuB,kBAAA,CAAA,GAAA,CAAA;AMxE1B;;;;ACSA;;;;;;;;;;;;;;;;;;;;;;;;;;iBPiKgB,oBAAA,CAAA,GAAwB;;;;;;;iBCzKxB,uBAAA,CAAA,GAA2B;;;UCU1B,kBAAA;;;;sBAIK;ELhBV;;;;ACKZ;EAEgC,eAAA,CAAA,EAAA,OAAA;;;;;AAyChC;;;;AC/BA;AAaA;;;;;AA4EA;;;;ACxFA;AAoDA;;AAGG,iBE3Ba,kBAAA,CF2Bb,OAAA,CAAA,EE1BQ,kBF0BR,CAAA,EEzBA,kBFyBA,CEzBiB,sBFyBjB,CAAA;;;;;;;iBGnEa,2BAAA,CAAA,GAA+B,oBAAkB;;;;;;;iBCKjD,oBAAA,UACL,yBACR;;;;;;;iBCXa,6BAAA,CAAA,GAAiC;;;;;;;iBCDjC,yBAAA,CAAA,GAA6B;;;;;;;cCShC,sBAAA,YAAkC;yBAChB,kBAAgB,QAAQ;EVX3C,SAAA,CAAA,OAAkB,CAAH,EUyDC,eVzDE,CAAA,EUyDc,OVzDH,CUyDW,gBVzDX,CAAA;sBU0Gb,kBAAgB,QAAQ;uBAgDvB,kBAAgB,QAAQ;yBAgDtB,QAAQ;ETrMtB,cAAA,CAAA,QAAA,EAAA,MACf,CAAA,ESoNwC,OTpNxC,CAAA,MAAA,CAAA;EAC8B,WAAA,CAAA,GAAA,EAAA,MAAA,CAAA,ESwNE,OTxNF,CSwNU,UTxNV,CAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/upload-input.ts","../src/client/create-uploadista-client.ts","../src/hooks/use-uploadista-client.ts","../src/components/uploadista-provider.tsx","../src/services/base64-service.ts","../src/services/create-expo-services.ts","../src/services/file-reader-service.ts","../src/services/http-client.ts","../src/services/id-generation-service.ts","../src/services/storage-service.ts","../src/services/expo-file-system-provider.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAKY,eAAA,GAAkB,OAAO;;;;;UCKpB,uBAAA,SACP,KACN,0BAA4B;sBAaV;;;;;;EDpBV,eAAA,CA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AA,CAAA,OAAkB,CAAH,EU0JE,eV1JC,CAAA,EU0Je,OV1JJ,CU0JY,gBV1JZ,CAAA;yBU0MV,QAAQ;oCAgBG;4BAKR,QAAQ;AT1N1C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uploadista/expo",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "type": "module",
5
5
  "description": "Expo client for Uploadista with managed workflow support",
6
6
  "license": "MIT",
@@ -12,9 +12,9 @@
12
12
  "dependencies": {
13
13
  "uuid": "^13.0.0",
14
14
  "js-base64": "^3.7.7",
15
- "@uploadista/core": "0.0.9",
16
- "@uploadista/client-core": "0.0.9",
17
- "@uploadista/react-native-core": "0.0.9"
15
+ "@uploadista/core": "0.0.11",
16
+ "@uploadista/client-core": "0.0.11",
17
+ "@uploadista/react-native-core": "0.0.11"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@react-native-async-storage/async-storage": ">=1.17.0",
@@ -35,7 +35,7 @@
35
35
  "devDependencies": {
36
36
  "@types/react": ">=18.0.0",
37
37
  "tsdown": "0.16.0",
38
- "@uploadista/typescript-config": "0.0.9"
38
+ "@uploadista/typescript-config": "0.0.11"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsdown",