@scalemule/sdk 0.0.77 → 0.0.79
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 +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -16
- package/dist/index.mjs +8 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1034,8 +1034,15 @@ declare class AuthService extends ServiceModule {
|
|
|
1034
1034
|
}, options?: RequestOptions): Promise<ApiResponse<{
|
|
1035
1035
|
changed: boolean;
|
|
1036
1036
|
}>>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Verify an email with a link token or a 6-digit code. Pass `email` (the
|
|
1039
|
+
* address the code was sent to) with codes: ScaleMule then matches the code
|
|
1040
|
+
* only against that account; code-only verification has a tight per-app
|
|
1041
|
+
* attempt budget.
|
|
1042
|
+
*/
|
|
1037
1043
|
verifyEmail(data: {
|
|
1038
1044
|
token: string;
|
|
1045
|
+
email?: string;
|
|
1039
1046
|
}, options?: RequestOptions): Promise<ApiResponse<{
|
|
1040
1047
|
verified: boolean;
|
|
1041
1048
|
}>>;
|
|
@@ -8414,6 +8421,7 @@ declare class AgentSessionsService extends ServiceModule {
|
|
|
8414
8421
|
listArtifacts(sessionId: string, options?: RequestOptions): Promise<ApiResponse<SessionArtifact[]>>;
|
|
8415
8422
|
}
|
|
8416
8423
|
|
|
8424
|
+
/** Browser capture shared by applications. Capture starts only on a user gesture. */
|
|
8417
8425
|
declare function prepareCommunityMapAttachment(file: File): Promise<File>;
|
|
8418
8426
|
interface MediaCaptureSession {
|
|
8419
8427
|
stream: MediaStream;
|
package/dist/index.d.ts
CHANGED
|
@@ -1034,8 +1034,15 @@ declare class AuthService extends ServiceModule {
|
|
|
1034
1034
|
}, options?: RequestOptions): Promise<ApiResponse<{
|
|
1035
1035
|
changed: boolean;
|
|
1036
1036
|
}>>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Verify an email with a link token or a 6-digit code. Pass `email` (the
|
|
1039
|
+
* address the code was sent to) with codes: ScaleMule then matches the code
|
|
1040
|
+
* only against that account; code-only verification has a tight per-app
|
|
1041
|
+
* attempt budget.
|
|
1042
|
+
*/
|
|
1037
1043
|
verifyEmail(data: {
|
|
1038
1044
|
token: string;
|
|
1045
|
+
email?: string;
|
|
1039
1046
|
}, options?: RequestOptions): Promise<ApiResponse<{
|
|
1040
1047
|
verified: boolean;
|
|
1041
1048
|
}>>;
|
|
@@ -8414,6 +8421,7 @@ declare class AgentSessionsService extends ServiceModule {
|
|
|
8414
8421
|
listArtifacts(sessionId: string, options?: RequestOptions): Promise<ApiResponse<SessionArtifact[]>>;
|
|
8415
8422
|
}
|
|
8416
8423
|
|
|
8424
|
+
/** Browser capture shared by applications. Capture starts only on a user gesture. */
|
|
8417
8425
|
declare function prepareCommunityMapAttachment(file: File): Promise<File>;
|
|
8418
8426
|
interface MediaCaptureSession {
|
|
8419
8427
|
stream: MediaStream;
|
package/dist/index.js
CHANGED
|
@@ -240,6 +240,7 @@ async function maybeCompressImage(file, userConfig, sessionId, telemetry) {
|
|
|
240
240
|
maxWidthOrHeight: Math.max(config.maxWidth, config.maxHeight),
|
|
241
241
|
initialQuality: config.quality,
|
|
242
242
|
useWebWorker: true,
|
|
243
|
+
preserveExif: true,
|
|
243
244
|
fileType: type === "image/png" ? "image/webp" : void 0
|
|
244
245
|
});
|
|
245
246
|
if (compressed.size >= file.size * 0.95) {
|
|
@@ -2165,6 +2166,12 @@ var AuthService = class extends ServiceModule {
|
|
|
2165
2166
|
// --------------------------------------------------------------------------
|
|
2166
2167
|
// Email & Phone Management
|
|
2167
2168
|
// --------------------------------------------------------------------------
|
|
2169
|
+
/**
|
|
2170
|
+
* Verify an email with a link token or a 6-digit code. Pass `email` (the
|
|
2171
|
+
* address the code was sent to) with codes: ScaleMule then matches the code
|
|
2172
|
+
* only against that account; code-only verification has a tight per-app
|
|
2173
|
+
* attempt budget.
|
|
2174
|
+
*/
|
|
2168
2175
|
async verifyEmail(data, options) {
|
|
2169
2176
|
return this.post("/verify-email", data, options);
|
|
2170
2177
|
}
|
|
@@ -9313,7 +9320,6 @@ var AgentSessionsService = class extends ServiceModule {
|
|
|
9313
9320
|
};
|
|
9314
9321
|
|
|
9315
9322
|
// src/browser-capture.ts
|
|
9316
|
-
init_upload_compression();
|
|
9317
9323
|
async function prepareCommunityMapAttachment(file) {
|
|
9318
9324
|
const types = [
|
|
9319
9325
|
"image/jpeg",
|
|
@@ -9335,21 +9341,7 @@ async function prepareCommunityMapAttachment(file) {
|
|
|
9335
9341
|
);
|
|
9336
9342
|
if (!file.size || file.size > 25 * 1024 * 1024)
|
|
9337
9343
|
throw new Error("Choose a file up to 25 MiB. Record a shorter clip if needed.");
|
|
9338
|
-
|
|
9339
|
-
const compressed = await maybeCompressImage(
|
|
9340
|
-
file,
|
|
9341
|
-
{ maxWidth: 2400, maxHeight: 2400, maxSizeMB: 2, quality: 0.82 },
|
|
9342
|
-
"community-capture",
|
|
9343
|
-
null
|
|
9344
|
-
);
|
|
9345
|
-
const result = compressed ? new File(
|
|
9346
|
-
[compressed],
|
|
9347
|
-
file.name.replace(/\.[^.]+$/, "") + (compressed.type === "image/webp" ? ".webp" : ".jpg"),
|
|
9348
|
-
{ type: compressed.type, lastModified: file.lastModified }
|
|
9349
|
-
) : file;
|
|
9350
|
-
if (result.size > 8 * 1024 * 1024)
|
|
9351
|
-
throw new Error("This photo is too large. Choose a photo up to 8 MiB or use a smaller camera setting.");
|
|
9352
|
-
return result;
|
|
9344
|
+
return file;
|
|
9353
9345
|
}
|
|
9354
9346
|
async function startMediaCapture(kind, signal) {
|
|
9355
9347
|
const candidates = kind === "video" ? ["video/mp4;codecs=h264,aac", "video/mp4", "video/webm;codecs=vp8,opus", "video/webm"] : ["audio/mp4", "audio/webm;codecs=opus", "audio/ogg;codecs=opus", "audio/webm"];
|
package/dist/index.mjs
CHANGED
|
@@ -218,6 +218,7 @@ async function maybeCompressImage(file, userConfig, sessionId, telemetry) {
|
|
|
218
218
|
maxWidthOrHeight: Math.max(config.maxWidth, config.maxHeight),
|
|
219
219
|
initialQuality: config.quality,
|
|
220
220
|
useWebWorker: true,
|
|
221
|
+
preserveExif: true,
|
|
221
222
|
fileType: type === "image/png" ? "image/webp" : void 0
|
|
222
223
|
});
|
|
223
224
|
if (compressed.size >= file.size * 0.95) {
|
|
@@ -2029,6 +2030,12 @@ var AuthService = class extends ServiceModule {
|
|
|
2029
2030
|
// --------------------------------------------------------------------------
|
|
2030
2031
|
// Email & Phone Management
|
|
2031
2032
|
// --------------------------------------------------------------------------
|
|
2033
|
+
/**
|
|
2034
|
+
* Verify an email with a link token or a 6-digit code. Pass `email` (the
|
|
2035
|
+
* address the code was sent to) with codes: ScaleMule then matches the code
|
|
2036
|
+
* only against that account; code-only verification has a tight per-app
|
|
2037
|
+
* attempt budget.
|
|
2038
|
+
*/
|
|
2032
2039
|
async verifyEmail(data, options) {
|
|
2033
2040
|
return this.post("/verify-email", data, options);
|
|
2034
2041
|
}
|
|
@@ -9177,7 +9184,6 @@ var AgentSessionsService = class extends ServiceModule {
|
|
|
9177
9184
|
};
|
|
9178
9185
|
|
|
9179
9186
|
// src/browser-capture.ts
|
|
9180
|
-
init_upload_compression();
|
|
9181
9187
|
async function prepareCommunityMapAttachment(file) {
|
|
9182
9188
|
const types = [
|
|
9183
9189
|
"image/jpeg",
|
|
@@ -9199,21 +9205,7 @@ async function prepareCommunityMapAttachment(file) {
|
|
|
9199
9205
|
);
|
|
9200
9206
|
if (!file.size || file.size > 25 * 1024 * 1024)
|
|
9201
9207
|
throw new Error("Choose a file up to 25 MiB. Record a shorter clip if needed.");
|
|
9202
|
-
|
|
9203
|
-
const compressed = await maybeCompressImage(
|
|
9204
|
-
file,
|
|
9205
|
-
{ maxWidth: 2400, maxHeight: 2400, maxSizeMB: 2, quality: 0.82 },
|
|
9206
|
-
"community-capture",
|
|
9207
|
-
null
|
|
9208
|
-
);
|
|
9209
|
-
const result = compressed ? new File(
|
|
9210
|
-
[compressed],
|
|
9211
|
-
file.name.replace(/\.[^.]+$/, "") + (compressed.type === "image/webp" ? ".webp" : ".jpg"),
|
|
9212
|
-
{ type: compressed.type, lastModified: file.lastModified }
|
|
9213
|
-
) : file;
|
|
9214
|
-
if (result.size > 8 * 1024 * 1024)
|
|
9215
|
-
throw new Error("This photo is too large. Choose a photo up to 8 MiB or use a smaller camera setting.");
|
|
9216
|
-
return result;
|
|
9208
|
+
return file;
|
|
9217
9209
|
}
|
|
9218
9210
|
async function startMediaCapture(kind, signal) {
|
|
9219
9211
|
const candidates = kind === "video" ? ["video/mp4;codecs=h264,aac", "video/mp4", "video/webm;codecs=vp8,opus", "video/webm"] : ["audio/mp4", "audio/webm;codecs=opus", "audio/ogg;codecs=opus", "audio/webm"];
|