@limrun/api 0.33.0 → 0.33.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.33.1 (2026-06-18)
4
+
5
+ Full Changelog: [v0.33.0...v0.33.1](https://github.com/limrun-inc/typescript-sdk/compare/v0.33.0...v0.33.1)
6
+
3
7
  ## 0.33.0 (2026-06-18)
4
8
 
5
9
  Full Changelog: [v0.32.0...v0.33.0](https://github.com/limrun-inc/typescript-sdk/compare/v0.32.0...v0.33.0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limrun/api",
3
- "version": "0.33.0",
3
+ "version": "0.33.1",
4
4
  "description": "The official TypeScript library for the Limrun API",
5
5
  "author": "Limrun <contact@limrun.com>",
6
6
  "types": "./index.d.ts",
@@ -9,12 +9,19 @@ export interface AssetGetOrUploadParams {
9
9
  * The name for the asset. Defaults to the name of the file given in the filePath parameter.
10
10
  */
11
11
  name?: string;
12
+ /**
13
+ * Optional time-to-live as a Go duration string (e.g. "24h"). When set, the asset is deleted
14
+ * this long after now; minimum is 1m. Omit for no expiry. On re-upload of an existing asset,
15
+ * a value updates the expiry while omitting it leaves the current expiry unchanged.
16
+ */
17
+ ttl?: string;
12
18
  }
13
19
  export interface AssetGetOrUploadResponse {
14
20
  id: string;
15
21
  name: string;
16
22
  signedDownloadUrl: string;
17
23
  md5: string;
24
+ expiresAt?: string;
18
25
  }
19
26
  export declare class Assets extends GeneratedAssets {
20
27
  getOrUpload(body: AssetGetOrUploadParams, options?: RequestOptions): Promise<AssetGetOrUploadResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"assets-helpers.d.mts","sourceRoot":"","sources":["../src/resources/assets-helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,qBAAiB;AAErD,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,MAAO,SAAQ,eAAe;IACnC,WAAW,CACf,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,wBAAwB,CAAC;CAmCrC"}
1
+ {"version":3,"file":"assets-helpers.d.mts","sourceRoot":"","sources":["../src/resources/assets-helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,qBAAiB;AAErD,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,MAAO,SAAQ,eAAe;IACnC,WAAW,CACf,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,wBAAwB,CAAC;CAsCrC"}
@@ -9,12 +9,19 @@ export interface AssetGetOrUploadParams {
9
9
  * The name for the asset. Defaults to the name of the file given in the filePath parameter.
10
10
  */
11
11
  name?: string;
12
+ /**
13
+ * Optional time-to-live as a Go duration string (e.g. "24h"). When set, the asset is deleted
14
+ * this long after now; minimum is 1m. Omit for no expiry. On re-upload of an existing asset,
15
+ * a value updates the expiry while omitting it leaves the current expiry unchanged.
16
+ */
17
+ ttl?: string;
12
18
  }
13
19
  export interface AssetGetOrUploadResponse {
14
20
  id: string;
15
21
  name: string;
16
22
  signedDownloadUrl: string;
17
23
  md5: string;
24
+ expiresAt?: string;
18
25
  }
19
26
  export declare class Assets extends GeneratedAssets {
20
27
  getOrUpload(body: AssetGetOrUploadParams, options?: RequestOptions): Promise<AssetGetOrUploadResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"assets-helpers.d.ts","sourceRoot":"","sources":["../src/resources/assets-helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,oBAAiB;AAErD,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,MAAO,SAAQ,eAAe;IACnC,WAAW,CACf,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,wBAAwB,CAAC;CAmCrC"}
1
+ {"version":3,"file":"assets-helpers.d.ts","sourceRoot":"","sources":["../src/resources/assets-helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,oBAAiB;AAErD,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,MAAO,SAAQ,eAAe;IACnC,WAAW,CACf,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,wBAAwB,CAAC;CAsCrC"}
@@ -10,6 +10,7 @@ class Assets extends assets_1.Assets {
10
10
  async getOrUpload(body, options) {
11
11
  const creationResponse = await this.getOrCreate({
12
12
  name: body.name ?? (0, path_1.basename)(body.path),
13
+ ...(body.ttl && { ttl: body.ttl }),
13
14
  }, options);
14
15
  const data = await fs_1.promises.readFile(body.path);
15
16
  const md5 = (0, crypto_1.createHash)('md5').update(data).digest('hex');
@@ -19,6 +20,7 @@ class Assets extends assets_1.Assets {
19
20
  name: creationResponse.name,
20
21
  signedDownloadUrl: creationResponse.signedDownloadUrl,
21
22
  md5: creationResponse.md5,
23
+ ...(creationResponse.expiresAt && { expiresAt: creationResponse.expiresAt }),
22
24
  };
23
25
  }
24
26
  const uploadResponse = await proxy_transport_1.nodeProxyTransport.fetch(creationResponse.signedUploadUrl, {
@@ -37,6 +39,7 @@ class Assets extends assets_1.Assets {
37
39
  name: creationResponse.name,
38
40
  signedDownloadUrl: creationResponse.signedDownloadUrl,
39
41
  md5,
42
+ ...(creationResponse.expiresAt && { expiresAt: creationResponse.expiresAt }),
40
43
  };
41
44
  }
42
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"assets-helpers.js","sourceRoot":"","sources":["../src/resources/assets-helpers.ts"],"names":[],"mappings":";;;AAAA,+BAAgC;AAChC,mCAAoC;AACpC,2BAAoC;AAGpC,oEAAiE;AACjE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MAAM,cAAc,GAAG,MAAM,oCAAkB,CAAC,KAAK,CAAC,gBAAgB,CAAC,eAAe,EAAE;YACtF,OAAO,EAAE;gBACP,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBACxC,cAAc,EAAE,0BAA0B;aAC3C;YACD,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;QACH,IAAI,cAAc,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,2BAA2B,cAAc,CAAC,MAAM,IAAI,MAAM,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACrG,CAAC;QACD,OAAO;YACL,EAAE,EAAE,gBAAgB,CAAC,EAAE;YACvB,IAAI,EAAE,gBAAgB,CAAC,IAAI;YAC3B,iBAAiB,EAAE,gBAAgB,CAAC,iBAAiB;YACrD,GAAG;YACH,GAAG,CAAC,gBAAgB,CAAC,SAAS,IAAI,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC;SAC7E,CAAC;IACJ,CAAC;CACF;AA1CD,wBA0CC"}
@@ -7,6 +7,7 @@ export class Assets extends GeneratedAssets {
7
7
  async getOrUpload(body, options) {
8
8
  const creationResponse = await this.getOrCreate({
9
9
  name: body.name ?? basename(body.path),
10
+ ...(body.ttl && { ttl: body.ttl }),
10
11
  }, options);
11
12
  const data = await fs.readFile(body.path);
12
13
  const md5 = createHash('md5').update(data).digest('hex');
@@ -16,6 +17,7 @@ export class Assets extends GeneratedAssets {
16
17
  name: creationResponse.name,
17
18
  signedDownloadUrl: creationResponse.signedDownloadUrl,
18
19
  md5: creationResponse.md5,
20
+ ...(creationResponse.expiresAt && { expiresAt: creationResponse.expiresAt }),
19
21
  };
20
22
  }
21
23
  const uploadResponse = await nodeProxyTransport.fetch(creationResponse.signedUploadUrl, {
@@ -34,6 +36,7 @@ export class Assets extends GeneratedAssets {
34
36
  name: creationResponse.name,
35
37
  signedDownloadUrl: creationResponse.signedDownloadUrl,
36
38
  md5,
39
+ ...(creationResponse.expiresAt && { expiresAt: creationResponse.expiresAt }),
37
40
  };
38
41
  }
39
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"assets-helpers.mjs","sourceRoot":"","sources":["../src/resources/assets-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,wCAAoC;AACjE,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,qBAAiB;AAqBrD,MAAM,OAAO,MAAO,SAAQ,eAAe;IACzC,KAAK,CAAC,WAAW,CACf,IAA4B,EAC5B,OAAwB;QAExB,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,WAAW,CAC7C;YACE,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;SACvC,EACD,OAAO,CACR,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACzD,IAAI,gBAAgB,CAAC,GAAG,IAAI,gBAAgB,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;YACzD,OAAO;gBACL,EAAE,EAAE,gBAAgB,CAAC,EAAE;gBACvB,IAAI,EAAE,gBAAgB,CAAC,IAAI;gBAC3B,iBAAiB,EAAE,gBAAgB,CAAC,iBAAiB;gBACrD,GAAG,EAAE,gBAAgB,CAAC,GAAG;aAC1B,CAAC;QACJ,CAAC;QACD,MAAM,cAAc,GAAG,MAAM,kBA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gBAAgB,CAAC,SAAS,EAAE,CAAC;SAC7E,CAAC;IACJ,CAAC;CACF"}
@@ -16,6 +16,13 @@ export interface AssetGetOrUploadParams {
16
16
  * The name for the asset. Defaults to the name of the file given in the filePath parameter.
17
17
  */
18
18
  name?: string;
19
+
20
+ /**
21
+ * Optional time-to-live as a Go duration string (e.g. "24h"). When set, the asset is deleted
22
+ * this long after now; minimum is 1m. Omit for no expiry. On re-upload of an existing asset,
23
+ * a value updates the expiry while omitting it leaves the current expiry unchanged.
24
+ */
25
+ ttl?: string;
19
26
  }
20
27
 
21
28
  export interface AssetGetOrUploadResponse {
@@ -23,6 +30,7 @@ export interface AssetGetOrUploadResponse {
23
30
  name: string;
24
31
  signedDownloadUrl: string;
25
32
  md5: string;
33
+ expiresAt?: string;
26
34
  }
27
35
 
28
36
  export class Assets extends GeneratedAssets {
@@ -33,6 +41,7 @@ export class Assets extends GeneratedAssets {
33
41
  const creationResponse = await this.getOrCreate(
34
42
  {
35
43
  name: body.name ?? basename(body.path),
44
+ ...(body.ttl && { ttl: body.ttl }),
36
45
  },
37
46
  options,
38
47
  );
@@ -44,6 +53,7 @@ export class Assets extends GeneratedAssets {
44
53
  name: creationResponse.name,
45
54
  signedDownloadUrl: creationResponse.signedDownloadUrl,
46
55
  md5: creationResponse.md5,
56
+ ...(creationResponse.expiresAt && { expiresAt: creationResponse.expiresAt }),
47
57
  };
48
58
  }
49
59
  const uploadResponse = await nodeProxyTransport.fetch(creationResponse.signedUploadUrl, {
@@ -62,6 +72,7 @@ export class Assets extends GeneratedAssets {
62
72
  name: creationResponse.name,
63
73
  signedDownloadUrl: creationResponse.signedDownloadUrl,
64
74
  md5,
75
+ ...(creationResponse.expiresAt && { expiresAt: creationResponse.expiresAt }),
65
76
  };
66
77
  }
67
78
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.33.0'; // x-release-please-version
1
+ export const VERSION = '0.33.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.33.0";
1
+ export declare const VERSION = "0.33.1";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.33.0";
1
+ export declare const VERSION = "0.33.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.33.0'; // x-release-please-version
4
+ exports.VERSION = '0.33.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.33.0'; // x-release-please-version
1
+ export const VERSION = '0.33.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map