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.js CHANGED
@@ -46,6 +46,7 @@ __export(index_exports, {
46
46
  default: () => NotteClient,
47
47
  deleteSecret: () => deleteSecret,
48
48
  fileDownload: () => fileDownload,
49
+ fileDownloadUploadedFile: () => fileDownloadUploadedFile,
49
50
  fileListDownloads: () => fileListDownloads,
50
51
  fileListUploads: () => fileListUploads,
51
52
  fileUpload: () => fileUpload,
@@ -89,6 +90,7 @@ __export(index_exports, {
89
90
  profileCookiesSet: () => profileCookiesSet,
90
91
  profileCreate: () => profileCreate,
91
92
  profileDelete: () => profileDelete,
93
+ profileDuplicate: () => profileDuplicate,
92
94
  profileGet: () => profileGet,
93
95
  profileList: () => profileList,
94
96
  readyCheck: () => readyCheck,
@@ -119,7 +121,7 @@ __export(index_exports, {
119
121
  module.exports = __toCommonJS(index_exports);
120
122
 
121
123
  // src/version.ts
122
- var SDK_VERSION = true ? "0.0.16" : "dev";
124
+ var SDK_VERSION = true ? "0.0.18" : "dev";
123
125
  var SDK_PACKAGE_NAME = true ? "notte-sdk" : "notte-sdk";
124
126
 
125
127
  // src/version-check.ts
@@ -1333,6 +1335,15 @@ var profileGet = (options) => (options.client ?? client).get({
1333
1335
  url: "/profiles/{profile_id}",
1334
1336
  ...options
1335
1337
  });
1338
+ var profileDuplicate = (options) => (options.client ?? client).post({
1339
+ security: [{ scheme: "bearer", type: "http" }],
1340
+ url: "/profiles/{profile_id}/duplicate",
1341
+ ...options,
1342
+ headers: {
1343
+ "Content-Type": "application/json",
1344
+ ...options.headers
1345
+ }
1346
+ });
1336
1347
  var profileCookiesGet = (options) => (options.client ?? client).get({
1337
1348
  security: [{ scheme: "bearer", type: "http" }],
1338
1349
  url: "/profiles/{profile_id}/cookies",
@@ -1432,6 +1443,11 @@ var fileListDownloads = (options) => (options.client ?? client).get({
1432
1443
  url: "/storage/{session_id}/downloads",
1433
1444
  ...options
1434
1445
  });
1446
+ var fileDownloadUploadedFile = (options) => (options.client ?? client).get({
1447
+ security: [{ scheme: "bearer", type: "http" }],
1448
+ url: "/storage/uploads/{filename}",
1449
+ ...options
1450
+ });
1435
1451
  var fileUpload = (options) => (options.client ?? client).post({
1436
1452
  ...formDataBodySerializer,
1437
1453
  security: [{ scheme: "bearer", type: "http" }],
@@ -2254,11 +2270,12 @@ var NotteVault = class {
2254
2270
  constructor(client2, options = {}) {
2255
2271
  this._vaultId = null;
2256
2272
  this.initPromise = null;
2273
+ this.createData = null;
2257
2274
  this.client = client2;
2258
2275
  if (options && "vault_id" in options && options.vault_id) {
2259
2276
  this.initPromise = this.initExistingVault(options.vault_id);
2260
2277
  } else {
2261
- this.initPromise = this.initNewVault(options || {});
2278
+ this.createData = options || {};
2262
2279
  }
2263
2280
  }
2264
2281
  async initExistingVault(vaultId) {
@@ -2300,6 +2317,12 @@ var NotteVault = class {
2300
2317
  if (this.initPromise) {
2301
2318
  return await this.initPromise;
2302
2319
  }
2320
+ if (this.createData) {
2321
+ const createData = this.createData;
2322
+ this.createData = null;
2323
+ this.initPromise = this.initNewVault(createData);
2324
+ return await this.initPromise;
2325
+ }
2303
2326
  throw new Error("Vault not initialized");
2304
2327
  }
2305
2328
  get vaultId() {
@@ -3042,6 +3065,7 @@ var createClient2 = (config) => {
3042
3065
  createClient,
3043
3066
  deleteSecret,
3044
3067
  fileDownload,
3068
+ fileDownloadUploadedFile,
3045
3069
  fileListDownloads,
3046
3070
  fileListUploads,
3047
3071
  fileUpload,
@@ -3085,6 +3109,7 @@ var createClient2 = (config) => {
3085
3109
  profileCookiesSet,
3086
3110
  profileCreate,
3087
3111
  profileDelete,
3112
+ profileDuplicate,
3088
3113
  profileGet,
3089
3114
  profileList,
3090
3115
  readyCheck,