@base44-preview/sdk 0.8.52-pr.295.865dd57 → 0.8.52-pr.296.452f327

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.
@@ -127,7 +127,7 @@ export interface UploadPrivateFileResult {
127
127
  export interface CreateFileSignedUrlParams {
128
128
  /** URI of the uploaded private file. */
129
129
  file_uri: string;
130
- /** How long the signed URL should be valid for, in seconds.
130
+ /** How long the signed URL should be valid for, in seconds. Must be between `60` (1 minute) and `3600` (1 hour).
131
131
  * @default 300 (5 minutes)
132
132
  */
133
133
  expires_in?: number;
@@ -352,7 +352,7 @@ export interface CoreIntegrations {
352
352
  * // Create a signed URL for a private file
353
353
  * const { signed_url } = await base44.integrations.Core.CreateFileSignedUrl({
354
354
  * file_uri: "private/user123/document.pdf",
355
- * expires_in: 7200 // URL expires in 2 hours
355
+ * expires_in: 1800 // URL expires in 30 minutes
356
356
  * });
357
357
  * console.log(signed_url); // https://...?signature=...
358
358
  * ```
@@ -101,38 +101,6 @@ function safeErrorLog(prefix, error) {
101
101
  console.error(`${prefix} ${error instanceof Error ? error.message : String(error)}`);
102
102
  }
103
103
  }
104
- const CREDENTIAL_HEADERS = new Set([
105
- "authorization",
106
- "on-behalf-of",
107
- "base44-service-authorization",
108
- ]);
109
- /**
110
- * Removes credentials from a failed request's error before app code sees it.
111
- *
112
- * An axios error carries its request config and the raw Node request, so
113
- * logging it (for example `console.log(error)`) printed the bearer token.
114
- *
115
- * @param error - The axios error to scrub in place
116
- * @internal
117
- */
118
- function redactCredentials(error) {
119
- var _a;
120
- const headers = (_a = error === null || error === void 0 ? void 0 : error.config) === null || _a === void 0 ? void 0 : _a.headers;
121
- if (headers) {
122
- const names = Object.keys(typeof headers.toJSON === "function" ? headers.toJSON() : headers);
123
- for (const name of names) {
124
- if (CREDENTIAL_HEADERS.has(name.toLowerCase())) {
125
- headers[name] = "[REDACTED]";
126
- }
127
- }
128
- }
129
- // The Node request object also holds the raw header block (`_header`).
130
- for (const target of [error, error === null || error === void 0 ? void 0 : error.response]) {
131
- if (target && "request" in target) {
132
- Object.defineProperty(target, "request", { enumerable: false });
133
- }
134
- }
135
- }
136
104
  /**
137
105
  * Creates an axios client with default configuration and interceptors.
138
106
  *
@@ -160,11 +128,6 @@ export function createAxiosClient({ baseURL, headers = {}, token, interceptRespo
160
128
  if (token) {
161
129
  client.defaults.headers.common["Authorization"] = `Bearer ${token}`;
162
130
  }
163
- // Registered first so it also covers clients that skip the Base44Error wrapper.
164
- client.interceptors.response.use(undefined, (error) => {
165
- redactCredentials(error);
166
- return Promise.reject(error);
167
- });
168
131
  // Add origin URL in browser environment
169
132
  client.interceptors.request.use((config) => {
170
133
  // `window.location` is absent on React Native (where `window` still exists),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.52-pr.295.865dd57",
3
+ "version": "0.8.52-pr.296.452f327",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",