@daytonaio/sdk 0.193.0 → 0.194.0
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/cjs/FileSystem.d.ts +11 -1
- package/cjs/FileSystem.js +13 -2
- package/cjs/FileSystem.js.map +1 -1
- package/cjs/Git.d.ts +157 -4
- package/cjs/Git.js +251 -3
- package/cjs/Git.js.map +1 -1
- package/cjs/Secret.d.ts +40 -7
- package/cjs/Secret.js +18 -8
- package/cjs/Secret.js.map +1 -1
- package/cjs/index.d.ts +2 -2
- package/cjs/index.js +3 -1
- package/cjs/index.js.map +1 -1
- package/esm/FileSystem.d.ts +11 -1
- package/esm/FileSystem.js +13 -2
- package/esm/FileSystem.js.map +1 -1
- package/esm/Git.d.ts +157 -4
- package/esm/Git.js +251 -3
- package/esm/Git.js.map +1 -1
- package/esm/Secret.d.ts +40 -7
- package/esm/Secret.js +18 -8
- package/esm/Secret.js.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/utils/Import.js +1 -1
- package/package.json +3 -3
package/esm/Secret.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SecretApi } from '@daytona/api-client';
|
|
2
|
-
import type { Secret as SecretModel } from '@daytona/api-client';
|
|
2
|
+
import type { Secret as SecretModel, ListSecretsResponse as ListSecretsResponseDto, ListSecretsPaginatedSortEnum, ListSecretsPaginatedOrderEnum } from '@daytona/api-client';
|
|
3
3
|
/**
|
|
4
4
|
* Represents an organization-scoped Secret.
|
|
5
5
|
*
|
|
@@ -51,6 +51,33 @@ export interface UpdateSecretParams {
|
|
|
51
51
|
description?: string;
|
|
52
52
|
hosts?: string[];
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Query parameters for listing Secrets with pagination.
|
|
56
|
+
*
|
|
57
|
+
* @interface
|
|
58
|
+
* @property {string} [cursor] - Pagination cursor from a previous response. Omit to fetch the first page.
|
|
59
|
+
* @property {number} [limit] - Number of results per page (1-200). Defaults to 100.
|
|
60
|
+
* @property {string} [name] - Filters the results to Secrets whose name partially matches the value
|
|
61
|
+
* @property {ListSecretsPaginatedSortEnum} [sort] - Field to sort by. Defaults to `createdAt`.
|
|
62
|
+
* @property {ListSecretsPaginatedOrderEnum} [order] - Direction to sort by. Defaults to `desc`.
|
|
63
|
+
*/
|
|
64
|
+
export interface ListSecretsQuery {
|
|
65
|
+
cursor?: string;
|
|
66
|
+
limit?: number;
|
|
67
|
+
name?: string;
|
|
68
|
+
sort?: ListSecretsPaginatedSortEnum;
|
|
69
|
+
order?: ListSecretsPaginatedOrderEnum;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Represents a paginated list of Daytona Secrets.
|
|
73
|
+
*
|
|
74
|
+
* @property {Secret[]} items - List of Secrets in the current page.
|
|
75
|
+
* @property {number} total - Total number of Secrets matching the filters.
|
|
76
|
+
* @property {string | null} nextCursor - Cursor for the next page of results. `null` when there are no more pages.
|
|
77
|
+
*/
|
|
78
|
+
export interface ListSecretsResponse extends Omit<ListSecretsResponseDto, 'items'> {
|
|
79
|
+
items: Secret[];
|
|
80
|
+
}
|
|
54
81
|
/**
|
|
55
82
|
* Service for managing organization-scoped Daytona Secrets.
|
|
56
83
|
*
|
|
@@ -65,17 +92,23 @@ export declare class SecretService {
|
|
|
65
92
|
private secretApi;
|
|
66
93
|
constructor(secretApi: SecretApi);
|
|
67
94
|
/**
|
|
68
|
-
* Lists
|
|
95
|
+
* Lists Secrets in the organization with cursor-based pagination.
|
|
69
96
|
*
|
|
70
|
-
* @
|
|
97
|
+
* @param {ListSecretsQuery} [query] - Optional filters, sorting, pagination cursor, and per-page size
|
|
98
|
+
* @returns {Promise<ListSecretsResponse>} A page of Secrets together with the total count and the
|
|
99
|
+
* cursor for the next page
|
|
71
100
|
*
|
|
72
101
|
* @example
|
|
73
102
|
* const daytona = new Daytona();
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
103
|
+
* let cursor: string | undefined = undefined;
|
|
104
|
+
* do {
|
|
105
|
+
* const page = await daytona.secret.list({ cursor, limit: 50 });
|
|
106
|
+
* console.log(`Fetched ${page.items.length} of ${page.total} secrets`);
|
|
107
|
+
* page.items.forEach(secret => console.log(`${secret.name} (${secret.id})`));
|
|
108
|
+
* cursor = page.nextCursor ?? undefined;
|
|
109
|
+
* } while (cursor);
|
|
77
110
|
*/
|
|
78
|
-
list(): Promise<
|
|
111
|
+
list(query?: ListSecretsQuery): Promise<ListSecretsResponse>;
|
|
79
112
|
/**
|
|
80
113
|
* Gets a Secret by its ID.
|
|
81
114
|
*
|
package/esm/Secret.js
CHANGED
|
@@ -41,19 +41,29 @@ let SecretService = (() => {
|
|
|
41
41
|
this.secretApi = secretApi;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Lists
|
|
44
|
+
* Lists Secrets in the organization with cursor-based pagination.
|
|
45
45
|
*
|
|
46
|
-
* @
|
|
46
|
+
* @param {ListSecretsQuery} [query] - Optional filters, sorting, pagination cursor, and per-page size
|
|
47
|
+
* @returns {Promise<ListSecretsResponse>} A page of Secrets together with the total count and the
|
|
48
|
+
* cursor for the next page
|
|
47
49
|
*
|
|
48
50
|
* @example
|
|
49
51
|
* const daytona = new Daytona();
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
52
|
+
* let cursor: string | undefined = undefined;
|
|
53
|
+
* do {
|
|
54
|
+
* const page = await daytona.secret.list({ cursor, limit: 50 });
|
|
55
|
+
* console.log(`Fetched ${page.items.length} of ${page.total} secrets`);
|
|
56
|
+
* page.items.forEach(secret => console.log(`${secret.name} (${secret.id})`));
|
|
57
|
+
* cursor = page.nextCursor ?? undefined;
|
|
58
|
+
* } while (cursor);
|
|
53
59
|
*/
|
|
54
|
-
async list() {
|
|
55
|
-
const response = await this.secretApi.
|
|
56
|
-
return
|
|
60
|
+
async list(query) {
|
|
61
|
+
const response = await this.secretApi.listSecretsPaginated(undefined, query?.cursor, query?.limit, query?.name, query?.sort, query?.order);
|
|
62
|
+
return {
|
|
63
|
+
items: response.data.items.map((secret) => secret),
|
|
64
|
+
total: response.data.total,
|
|
65
|
+
nextCursor: response.data.nextCursor,
|
|
66
|
+
};
|
|
57
67
|
}
|
|
58
68
|
/**
|
|
59
69
|
* Gets a Secret by its ID.
|
package/esm/Secret.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Secret.js","sourceRoot":"","sources":["../../../../sdk-typescript/src/Secret.ts"],"names":[],"mappings":"AAAA;;;GAGG;;
|
|
1
|
+
{"version":3,"file":"Secret.js","sourceRoot":"","sources":["../../../../sdk-typescript/src/Secret.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AASH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAmF5D;;;;;;;;;GASG;IACU,aAAa;;;;;;;iBAAb,aAAa;;;gCAoBvB,mBAAmB,EAAE;+BA6BrB,mBAAmB,EAAE;kCAsBrB,mBAAmB,EAAE;kCA0BrB,mBAAmB,EAAE;kCAsBrB,mBAAmB,EAAE;YAlGtB,+JAAM,IAAI,6DAcT;YAeD,4JAAM,GAAG,6DAGR;YAmBD,qKAAM,MAAM,6DAQX;YAkBD,qKAAM,MAAM,6DAOX;YAeD,qKAAM,MAAM,6DAEX;;;QAzHmB,SAAS,GADlB,mDAAa;QACxB,YAAoB,SAAoB;YAApB,cAAS,GAAT,SAAS,CAAW;QAAG,CAAC;QAE5C;;;;;;;;;;;;;;;;WAgBG;QAEH,KAAK,CAAC,IAAI,CAAC,KAAwB;YACjC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,oBAAoB,CACxD,SAAS,EACT,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,IAAI,EACX,KAAK,EAAE,IAAI,EACX,KAAK,EAAE,KAAK,CACb,CAAA;YACD,OAAO;gBACL,KA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C,CAAA;QAC7C,CAAC;;;SA1HU,aAAa"}
|
package/esm/index.d.ts
CHANGED
|
@@ -9,13 +9,13 @@ export { DaytonaAuthenticationError, DaytonaAuthorizationError, DaytonaConflictE
|
|
|
9
9
|
export { Image } from './Image.js';
|
|
10
10
|
export { Sandbox } from './Sandbox.js';
|
|
11
11
|
export type { ListSandboxesQuery } from './Sandbox.js';
|
|
12
|
-
export type { Secret, CreateSecretParams, UpdateSecretParams } from './Secret.js';
|
|
12
|
+
export type { Secret, CreateSecretParams, UpdateSecretParams, ListSecretsQuery, ListSecretsResponse } from './Secret.js';
|
|
13
13
|
export type { CreateSnapshotParams } from './Snapshot.js';
|
|
14
14
|
export { ComputerUse, Mouse, Keyboard, Screenshot, Display, Accessibility } from './ComputerUse.js';
|
|
15
15
|
export type { BarChart, BarData, BoxAndWhiskerChart, BoxAndWhiskerData, Chart, Chart2D, ChartElement, CompositeChart, LineChart, PieChart, PieData, PointChart, PointData, ScatterChart, } from './types/Charts.js';
|
|
16
16
|
export { ChartType } from './types/Charts.js';
|
|
17
17
|
export type { ExecutionError, ExecutionResult, OutputMessage, RunCodeOptions } from './types/CodeInterpreter.js';
|
|
18
|
-
export { GpuType, SandboxState, SandboxListSortField, SandboxListSortDirection, SandboxClass, } from '@daytona/api-client';
|
|
18
|
+
export { GpuType, SandboxState, SandboxListSortField, SandboxListSortDirection, SandboxClass, ListSecretsPaginatedSortEnum, ListSecretsPaginatedOrderEnum, } from '@daytona/api-client';
|
|
19
19
|
export type { FileInfo, GitStatus, ListBranchResponse, Match, ReplaceResult, SearchFilesResponse, } from '@daytona/toolbox-api-client';
|
|
20
20
|
export type { ScreenshotRegion, ScreenshotOptions, AccessibilityTreeOptions, AccessibilityFindOptions, } from './ComputerUse.js';
|
|
21
21
|
export * from './Process.js';
|
package/esm/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export { Image } from './Image.js';
|
|
|
14
14
|
export { Sandbox } from './Sandbox.js';
|
|
15
15
|
export { ComputerUse, Mouse, Keyboard, Screenshot, Display, Accessibility } from './ComputerUse.js';
|
|
16
16
|
export { ChartType } from './types/Charts.js';
|
|
17
|
-
export { GpuType, SandboxState, SandboxListSortField, SandboxListSortDirection, SandboxClass, } from '@daytona/api-client';
|
|
17
|
+
export { GpuType, SandboxState, SandboxListSortField, SandboxListSortDirection, SandboxClass, ListSecretsPaginatedSortEnum, ListSecretsPaginatedOrderEnum, } from '@daytona/api-client';
|
|
18
18
|
export * from './Process.js';
|
|
19
19
|
export * from './PtyHandle.js';
|
|
20
20
|
export * from './types/Pty.js';
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../sdk-typescript/src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AASjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAczC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,0CAA0C;AAC1C,6DAA6D;AAC7D,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACpB,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAInC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAiBhG,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG1C,OAAO,EACL,OAAO,EACP,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../sdk-typescript/src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AASjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAczC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,0CAA0C;AAC1C,6DAA6D;AAC7D,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACpB,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAInC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAiBhG,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG1C,OAAO,EACL,OAAO,EACP,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,qBAAqB,CAAA;AAiB5B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
|
package/esm/utils/Import.js
CHANGED
|
@@ -113,7 +113,7 @@ export function getPackageInfo() {
|
|
|
113
113
|
if (_packageInfo)
|
|
114
114
|
return _packageInfo;
|
|
115
115
|
try {
|
|
116
|
-
const pkg = {"name":"@daytona/sdk","version":"0.
|
|
116
|
+
const pkg = {"name":"@daytona/sdk","version":"0.194.0"};
|
|
117
117
|
_packageInfo = { name: pkg.name, version: pkg.version };
|
|
118
118
|
}
|
|
119
119
|
catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daytonaio/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.194.0",
|
|
4
4
|
"description": "Daytona TypeScript SDK for sandbox management and code execution",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"pathe": "^2.0.3",
|
|
91
91
|
"shell-quote": "^1.8.2",
|
|
92
92
|
"tar": "^7.5.11",
|
|
93
|
-
"@daytona/api-client": "0.
|
|
94
|
-
"@daytona/toolbox-api-client": "0.
|
|
93
|
+
"@daytona/api-client": "0.194.0",
|
|
94
|
+
"@daytona/toolbox-api-client": "0.194.0"
|
|
95
95
|
}
|
|
96
96
|
}
|