@leisuresaas/react-native 0.6.4-dev.3 → 0.6.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leisuresaas/react-native",
3
- "version": "0.6.4-dev.3",
3
+ "version": "0.6.4",
4
4
  "description": "React Native SDK for LeisureSaas: OAuth, Public Ads/App Config, Drive User Plane (publishable keys). Frontend-only — no Integration Key.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -49,7 +49,7 @@ export type UploadProgress = {
49
49
  phase?: "put" | "storing" | "finishing" | "done";
50
50
  };
51
51
 
52
- /** Tenant Drive occupancy vs Plan byte Limit (same ledger as Complete). */
52
+ /** The user's Drive occupancy vs the active workspace's per-member byte limit. */
53
53
  export type FsStorageUsage = {
54
54
  product_id: string;
55
55
  tenant_id: string;
@@ -59,4 +59,8 @@ export type FsStorageUsage = {
59
59
  bytes_limit: number;
60
60
  /** null when bytes_limit < 0 (unlimited) */
61
61
  bytes_remaining: number | null;
62
+ /** The user the Drive bytes belong to; tenant_id is the active workspace that supplies the limit. */
63
+ user_id?: string;
64
+ /** Drive single-file limit of the product; -1 = unlimited. Check before picking a file. */
65
+ max_file_bytes?: number;
62
66
  };
package/src/errors.ts CHANGED
@@ -29,6 +29,11 @@ export const ErrorReason = {
29
29
  SubscriptionActiveOtherSource: "SUBSCRIPTION_ACTIVE_OTHER_SOURCE",
30
30
  // The token's workspace is no longer the user's active one: refresh the token, then retry.
31
31
  ActiveWorkspaceChanged: "ACTIVE_WORKSPACE_CHANGED",
32
+ // Drive uploads: the user's plan storage is used up / the product's storage is full / the file is
33
+ // over the product's single-file limit.
34
+ QuotaExceeded: "QUOTA_EXCEEDED",
35
+ CapacityExceeded: "CAPACITY_EXCEEDED",
36
+ FileTooLarge: "FILE_TOO_LARGE",
32
37
  Network: "NETWORK",
33
38
  Unknown: "UNKNOWN",
34
39
  } as const;