notte-sdk 0.0.16 → 0.0.18
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 +404 -182
- package/dist/index.d.ts +404 -182
- package/dist/index.js +27 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -2
- package/dist/index.mjs.map +1 -1
- package/dist/proxy/core.js +2 -0
- package/dist/proxy/core.js.map +1 -1
- package/dist/proxy/core.mjs +2 -0
- package/dist/proxy/core.mjs.map +1 -1
- package/dist/proxy/next.js +2 -0
- package/dist/proxy/next.js.map +1 -1
- package/dist/proxy/next.mjs +2 -0
- package/dist/proxy/next.mjs.map +1 -1
- package/package.json +5 -2
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
// src/version.ts
|
|
9
|
-
var SDK_VERSION = true ? "0.0.
|
|
9
|
+
var SDK_VERSION = true ? "0.0.18" : "dev";
|
|
10
10
|
var SDK_PACKAGE_NAME = true ? "notte-sdk" : "notte-sdk";
|
|
11
11
|
|
|
12
12
|
// src/version-check.ts
|
|
@@ -1220,6 +1220,15 @@ var profileGet = (options) => (options.client ?? client).get({
|
|
|
1220
1220
|
url: "/profiles/{profile_id}",
|
|
1221
1221
|
...options
|
|
1222
1222
|
});
|
|
1223
|
+
var profileDuplicate = (options) => (options.client ?? client).post({
|
|
1224
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1225
|
+
url: "/profiles/{profile_id}/duplicate",
|
|
1226
|
+
...options,
|
|
1227
|
+
headers: {
|
|
1228
|
+
"Content-Type": "application/json",
|
|
1229
|
+
...options.headers
|
|
1230
|
+
}
|
|
1231
|
+
});
|
|
1223
1232
|
var profileCookiesGet = (options) => (options.client ?? client).get({
|
|
1224
1233
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1225
1234
|
url: "/profiles/{profile_id}/cookies",
|
|
@@ -1319,6 +1328,11 @@ var fileListDownloads = (options) => (options.client ?? client).get({
|
|
|
1319
1328
|
url: "/storage/{session_id}/downloads",
|
|
1320
1329
|
...options
|
|
1321
1330
|
});
|
|
1331
|
+
var fileDownloadUploadedFile = (options) => (options.client ?? client).get({
|
|
1332
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1333
|
+
url: "/storage/uploads/{filename}",
|
|
1334
|
+
...options
|
|
1335
|
+
});
|
|
1322
1336
|
var fileUpload = (options) => (options.client ?? client).post({
|
|
1323
1337
|
...formDataBodySerializer,
|
|
1324
1338
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -2141,11 +2155,12 @@ var NotteVault = class {
|
|
|
2141
2155
|
constructor(client2, options = {}) {
|
|
2142
2156
|
this._vaultId = null;
|
|
2143
2157
|
this.initPromise = null;
|
|
2158
|
+
this.createData = null;
|
|
2144
2159
|
this.client = client2;
|
|
2145
2160
|
if (options && "vault_id" in options && options.vault_id) {
|
|
2146
2161
|
this.initPromise = this.initExistingVault(options.vault_id);
|
|
2147
2162
|
} else {
|
|
2148
|
-
this.
|
|
2163
|
+
this.createData = options || {};
|
|
2149
2164
|
}
|
|
2150
2165
|
}
|
|
2151
2166
|
async initExistingVault(vaultId) {
|
|
@@ -2187,6 +2202,12 @@ var NotteVault = class {
|
|
|
2187
2202
|
if (this.initPromise) {
|
|
2188
2203
|
return await this.initPromise;
|
|
2189
2204
|
}
|
|
2205
|
+
if (this.createData) {
|
|
2206
|
+
const createData = this.createData;
|
|
2207
|
+
this.createData = null;
|
|
2208
|
+
this.initPromise = this.initNewVault(createData);
|
|
2209
|
+
return await this.initPromise;
|
|
2210
|
+
}
|
|
2190
2211
|
throw new Error("Vault not initialized");
|
|
2191
2212
|
}
|
|
2192
2213
|
get vaultId() {
|
|
@@ -2929,6 +2950,7 @@ export {
|
|
|
2929
2950
|
NotteClient as default,
|
|
2930
2951
|
deleteSecret,
|
|
2931
2952
|
fileDownload,
|
|
2953
|
+
fileDownloadUploadedFile,
|
|
2932
2954
|
fileListDownloads,
|
|
2933
2955
|
fileListUploads,
|
|
2934
2956
|
fileUpload,
|
|
@@ -2972,6 +2994,7 @@ export {
|
|
|
2972
2994
|
profileCookiesSet,
|
|
2973
2995
|
profileCreate,
|
|
2974
2996
|
profileDelete,
|
|
2997
|
+
profileDuplicate,
|
|
2975
2998
|
profileGet,
|
|
2976
2999
|
profileList,
|
|
2977
3000
|
readyCheck,
|