@egose/n8n-client 0.1.1 → 0.1.2

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.
Files changed (116) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/{chunk-ZEQL5KU2.js → chunk-2DSU5F3J.js} +8 -7
  3. package/{chunk-DJCG37LZ.js → chunk-2H3GEKKO.js} +7 -4
  4. package/{chunk-4FXZT5HT.js → chunk-2JBRCS53.js} +6 -6
  5. package/chunk-4QPHBRTA.js +15 -0
  6. package/{chunk-TRHGCMFH.cjs → chunk-5WH4FOE2.cjs} +7 -7
  7. package/{chunk-CUO2M75Z.js → chunk-6L3JVMUK.js} +6 -6
  8. package/{chunk-I7NGIQIM.cjs → chunk-75AXCCWF.cjs} +7 -7
  9. package/chunk-ACVK7R2L.cjs +12 -0
  10. package/{chunk-QYAIEIF5.js → chunk-BI6R6RFB.js} +6 -6
  11. package/{chunk-SK4VCTMD.js → chunk-CDYFI72K.js} +8 -7
  12. package/{chunk-TCPZWXKM.js → chunk-DO5OI6ZU.js} +6 -6
  13. package/{chunk-4AODYIOB.cjs → chunk-FKHPF5R5.cjs} +9 -8
  14. package/{chunk-5FIB7YIT.js → chunk-GYCE5P4Y.js} +6 -6
  15. package/chunk-HDN3VTQ4.cjs +15 -0
  16. package/{chunk-NAZ5MLBL.cjs → chunk-HYJ7KYNG.cjs} +8 -5
  17. package/{chunk-5SY4KM4Q.js → chunk-IDD662MQ.js} +6 -6
  18. package/chunk-JUWY746V.cjs +15 -0
  19. package/{chunk-BWLFUF76.js → chunk-JWSD43W3.js} +6 -6
  20. package/{chunk-5PHEDSSO.cjs → chunk-L36NK3EC.cjs} +7 -7
  21. package/{chunk-U7PGEXKS.cjs → chunk-LBBJ6MTN.cjs} +7 -7
  22. package/{chunk-5DYA4LAX.cjs → chunk-LC3TKRMX.cjs} +1 -1
  23. package/{chunk-MNL65GQB.js → chunk-NMKH2J77.js} +6 -6
  24. package/chunk-OHQBXLTJ.js +12 -0
  25. package/{chunk-QLAAM7TG.cjs → chunk-ONBMQHLH.cjs} +9 -8
  26. package/chunk-R3HQQ6JP.cjs +15 -0
  27. package/{chunk-DK5NLZ6U.js → chunk-RMEH2UPX.js} +1 -1
  28. package/{chunk-FZX275Y3.js → chunk-RXHHER7R.js} +6 -6
  29. package/{chunk-JR7A75YV.js → chunk-THVPKRZ6.js} +6 -6
  30. package/{chunk-CES6KIG5.cjs → chunk-UKWCRX4F.cjs} +7 -7
  31. package/chunk-UPL3BYDO.js +15 -0
  32. package/chunk-UU6H6FNY.cjs +15 -0
  33. package/{chunk-ZAZJHB3O.cjs → chunk-VS6V3PD6.cjs} +7 -7
  34. package/{chunk-OOMGKLOT.cjs → chunk-XHPNV55G.cjs} +7 -7
  35. package/{chunk-YPK2BDPO.cjs → chunk-YONLN7XM.cjs} +7 -7
  36. package/handles/audit.cjs +3 -2
  37. package/handles/audit.d.cts +3 -4
  38. package/handles/audit.d.ts +3 -4
  39. package/handles/audit.js +2 -1
  40. package/handles/base.cjs +7 -0
  41. package/handles/base.d.cts +10 -0
  42. package/handles/base.d.ts +10 -0
  43. package/handles/base.js +7 -0
  44. package/handles/community-package.cjs +3 -2
  45. package/handles/community-package.d.cts +5 -9
  46. package/handles/community-package.d.ts +5 -9
  47. package/handles/community-package.js +2 -1
  48. package/handles/credential.cjs +3 -2
  49. package/handles/credential.d.cts +5 -6
  50. package/handles/credential.d.ts +5 -6
  51. package/handles/credential.js +2 -1
  52. package/handles/data-table.cjs +3 -2
  53. package/handles/data-table.d.cts +7 -15
  54. package/handles/data-table.d.ts +7 -15
  55. package/handles/data-table.js +2 -1
  56. package/handles/discover.cjs +3 -2
  57. package/handles/discover.d.cts +5 -10
  58. package/handles/discover.d.ts +5 -10
  59. package/handles/discover.js +2 -1
  60. package/handles/execution.cjs +3 -2
  61. package/handles/execution.d.cts +8 -20
  62. package/handles/execution.d.ts +8 -20
  63. package/handles/execution.js +2 -1
  64. package/handles/folder.cjs +3 -2
  65. package/handles/folder.d.cts +6 -13
  66. package/handles/folder.d.ts +6 -13
  67. package/handles/folder.js +2 -1
  68. package/handles/insights.cjs +3 -2
  69. package/handles/insights.d.cts +5 -10
  70. package/handles/insights.d.ts +5 -10
  71. package/handles/insights.js +2 -1
  72. package/handles/n8n-package.cjs +3 -2
  73. package/handles/n8n-package.d.cts +5 -12
  74. package/handles/n8n-package.d.ts +5 -12
  75. package/handles/n8n-package.js +2 -1
  76. package/handles/project.cjs +3 -2
  77. package/handles/project.d.cts +7 -15
  78. package/handles/project.d.ts +7 -15
  79. package/handles/project.js +2 -1
  80. package/handles/source-control.cjs +3 -2
  81. package/handles/source-control.d.cts +3 -4
  82. package/handles/source-control.d.ts +3 -4
  83. package/handles/source-control.js +2 -1
  84. package/handles/tag.cjs +3 -2
  85. package/handles/tag.d.cts +6 -11
  86. package/handles/tag.d.ts +6 -11
  87. package/handles/tag.js +2 -1
  88. package/handles/user.cjs +3 -2
  89. package/handles/user.d.cts +7 -14
  90. package/handles/user.d.ts +7 -14
  91. package/handles/user.js +2 -1
  92. package/handles/variable.cjs +3 -2
  93. package/handles/variable.d.cts +6 -10
  94. package/handles/variable.d.ts +6 -10
  95. package/handles/variable.js +2 -1
  96. package/handles/workflow.cjs +3 -2
  97. package/handles/workflow.d.cts +8 -21
  98. package/handles/workflow.d.ts +8 -21
  99. package/handles/workflow.js +2 -1
  100. package/http-client.cjs +2 -2
  101. package/http-client.d.cts +6 -18
  102. package/http-client.d.ts +6 -18
  103. package/http-client.js +1 -1
  104. package/index.cjs +35 -34
  105. package/index.d.cts +7 -16
  106. package/index.d.ts +7 -16
  107. package/index.js +21 -20
  108. package/package.json +16 -16
  109. package/types.d.cts +201 -55
  110. package/types.d.ts +201 -55
  111. package/chunk-3SBD4UJS.js +0 -15
  112. package/chunk-FHAZIAHR.js +0 -15
  113. package/chunk-M7GX3MEN.cjs +0 -15
  114. package/chunk-NM6A7DX4.cjs +0 -15
  115. package/chunk-NSCKTOQK.cjs +0 -15
  116. package/chunk-RATHO5IW.cjs +0 -15
@@ -1,15 +1,10 @@
1
- import { HttpClient } from '../http-client.cjs';
2
- import { InsightsSummary } from '../types.cjs';
1
+ import { InsightsSummaryParams, InsightsSummary } from '../types.cjs';
2
+ import BaseHandle from './base.cjs';
3
3
  import '../pagination.cjs';
4
+ import '../http-client.cjs';
4
5
 
5
- declare class InsightsHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
8
- getSummary(params?: {
9
- startDate?: string;
10
- endDate?: string;
11
- projectId?: string;
12
- }): Promise<InsightsSummary>;
6
+ declare class InsightsHandle extends BaseHandle {
7
+ getSummary(params?: InsightsSummaryParams): Promise<InsightsSummary>;
13
8
  }
14
9
 
15
10
  export { InsightsHandle as default };
@@ -1,15 +1,10 @@
1
- import { HttpClient } from '../http-client.js';
2
- import { InsightsSummary } from '../types.js';
1
+ import { InsightsSummaryParams, InsightsSummary } from '../types.js';
2
+ import BaseHandle from './base.js';
3
3
  import '../pagination.js';
4
+ import '../http-client.js';
4
5
 
5
- declare class InsightsHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
8
- getSummary(params?: {
9
- startDate?: string;
10
- endDate?: string;
11
- projectId?: string;
12
- }): Promise<InsightsSummary>;
6
+ declare class InsightsHandle extends BaseHandle {
7
+ getSummary(params?: InsightsSummaryParams): Promise<InsightsSummary>;
13
8
  }
14
9
 
15
10
  export { InsightsHandle as default };
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  InsightsHandle
3
- } from "../chunk-5SY4KM4Q.js";
3
+ } from "../chunk-IDD662MQ.js";
4
+ import "../chunk-OHQBXLTJ.js";
4
5
  export {
5
6
  InsightsHandle as default
6
7
  };
@@ -1,7 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkTRHGCMFHcjs = require('../chunk-TRHGCMFH.cjs');
3
+ var _chunk5WH4FOE2cjs = require('../chunk-5WH4FOE2.cjs');
4
+ require('../chunk-ACVK7R2L.cjs');
4
5
 
5
6
 
6
- exports.default = _chunkTRHGCMFHcjs.N8nPackageHandle;
7
+ exports.default = _chunk5WH4FOE2cjs.N8nPackageHandle;
7
8
  //# sourceMappingURL=n8n-package.cjs.map
@@ -1,18 +1,11 @@
1
- import { HttpClient } from '../http-client.cjs';
2
- import { ExportWorkflowsRequest, ImportPackageResponse } from '../types.cjs';
1
+ import { ExportWorkflowsRequest, ImportPackageOptions, ImportPackageResponse } from '../types.cjs';
2
+ import BaseHandle from './base.cjs';
3
3
  import '../pagination.cjs';
4
+ import '../http-client.cjs';
4
5
 
5
- declare class N8nPackageHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
6
+ declare class N8nPackageHandle extends BaseHandle {
8
7
  exportWorkflows(data: ExportWorkflowsRequest): Promise<ArrayBuffer>;
9
- importPackage(pkg: File | Blob, options: {
10
- projectId?: string;
11
- folderId?: string;
12
- credentialMatchingMode?: 'id-only';
13
- credentialMissingMode?: 'must-preexist';
14
- workflowConflictPolicy: 'new-version' | 'fail' | 'skip';
15
- }): Promise<ImportPackageResponse>;
8
+ importPackage(pkg: File | Blob, options: ImportPackageOptions): Promise<ImportPackageResponse>;
16
9
  }
17
10
 
18
11
  export { N8nPackageHandle as default };
@@ -1,18 +1,11 @@
1
- import { HttpClient } from '../http-client.js';
2
- import { ExportWorkflowsRequest, ImportPackageResponse } from '../types.js';
1
+ import { ExportWorkflowsRequest, ImportPackageOptions, ImportPackageResponse } from '../types.js';
2
+ import BaseHandle from './base.js';
3
3
  import '../pagination.js';
4
+ import '../http-client.js';
4
5
 
5
- declare class N8nPackageHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
6
+ declare class N8nPackageHandle extends BaseHandle {
8
7
  exportWorkflows(data: ExportWorkflowsRequest): Promise<ArrayBuffer>;
9
- importPackage(pkg: File | Blob, options: {
10
- projectId?: string;
11
- folderId?: string;
12
- credentialMatchingMode?: 'id-only';
13
- credentialMissingMode?: 'must-preexist';
14
- workflowConflictPolicy: 'new-version' | 'fail' | 'skip';
15
- }): Promise<ImportPackageResponse>;
8
+ importPackage(pkg: File | Blob, options: ImportPackageOptions): Promise<ImportPackageResponse>;
16
9
  }
17
10
 
18
11
  export { N8nPackageHandle as default };
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  N8nPackageHandle
3
- } from "../chunk-CUO2M75Z.js";
3
+ } from "../chunk-6L3JVMUK.js";
4
+ import "../chunk-OHQBXLTJ.js";
4
5
  export {
5
6
  N8nPackageHandle as default
6
7
  };
@@ -1,7 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk4AODYIOBcjs = require('../chunk-4AODYIOB.cjs');
3
+ var _chunkFKHPF5R5cjs = require('../chunk-FKHPF5R5.cjs');
4
+ require('../chunk-ACVK7R2L.cjs');
4
5
 
5
6
 
6
- exports.default = _chunk4AODYIOBcjs.ProjectHandle;
7
+ exports.default = _chunkFKHPF5R5cjs.ProjectHandle;
7
8
  //# sourceMappingURL=project.cjs.map
@@ -1,23 +1,15 @@
1
- import { HttpClient } from '../http-client.cjs';
2
- import { ProjectListResponse, ProjectMemberListResponse } from '../types.cjs';
1
+ import { ProjectListResponse, ProjectMutation, ProjectMemberListResponse, ProjectMemberRelation } from '../types.cjs';
2
+ import BaseHandle from './base.cjs';
3
3
  import { PaginationParams } from '../pagination.cjs';
4
+ import '../http-client.cjs';
4
5
 
5
- declare class ProjectHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
6
+ declare class ProjectHandle extends BaseHandle {
8
7
  list(params?: PaginationParams): Promise<ProjectListResponse>;
9
- create(data: {
10
- name: string;
11
- }): Promise<void>;
12
- update(id: string, data: {
13
- name: string;
14
- }): Promise<void>;
8
+ create(data: ProjectMutation): Promise<void>;
9
+ update(id: string, data: ProjectMutation): Promise<void>;
15
10
  delete(id: string): Promise<void>;
16
11
  listMembers(projectId: string, params?: PaginationParams): Promise<ProjectMemberListResponse>;
17
- addMembers(projectId: string, relations: Array<{
18
- userId: string;
19
- role: string;
20
- }>): Promise<void>;
12
+ addMembers(projectId: string, relations: ProjectMemberRelation[]): Promise<void>;
21
13
  removeMember(projectId: string, userId: string): Promise<void>;
22
14
  changeMemberRole(projectId: string, userId: string, role: string): Promise<void>;
23
15
  }
@@ -1,23 +1,15 @@
1
- import { HttpClient } from '../http-client.js';
2
- import { ProjectListResponse, ProjectMemberListResponse } from '../types.js';
1
+ import { ProjectListResponse, ProjectMutation, ProjectMemberListResponse, ProjectMemberRelation } from '../types.js';
2
+ import BaseHandle from './base.js';
3
3
  import { PaginationParams } from '../pagination.js';
4
+ import '../http-client.js';
4
5
 
5
- declare class ProjectHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
6
+ declare class ProjectHandle extends BaseHandle {
8
7
  list(params?: PaginationParams): Promise<ProjectListResponse>;
9
- create(data: {
10
- name: string;
11
- }): Promise<void>;
12
- update(id: string, data: {
13
- name: string;
14
- }): Promise<void>;
8
+ create(data: ProjectMutation): Promise<void>;
9
+ update(id: string, data: ProjectMutation): Promise<void>;
15
10
  delete(id: string): Promise<void>;
16
11
  listMembers(projectId: string, params?: PaginationParams): Promise<ProjectMemberListResponse>;
17
- addMembers(projectId: string, relations: Array<{
18
- userId: string;
19
- role: string;
20
- }>): Promise<void>;
12
+ addMembers(projectId: string, relations: ProjectMemberRelation[]): Promise<void>;
21
13
  removeMember(projectId: string, userId: string): Promise<void>;
22
14
  changeMemberRole(projectId: string, userId: string, role: string): Promise<void>;
23
15
  }
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  ProjectHandle
3
- } from "../chunk-ZEQL5KU2.js";
3
+ } from "../chunk-2DSU5F3J.js";
4
+ import "../chunk-OHQBXLTJ.js";
4
5
  export {
5
6
  ProjectHandle as default
6
7
  };
@@ -1,7 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkNM6A7DX4cjs = require('../chunk-NM6A7DX4.cjs');
3
+ var _chunkJUWY746Vcjs = require('../chunk-JUWY746V.cjs');
4
+ require('../chunk-ACVK7R2L.cjs');
4
5
 
5
6
 
6
- exports.default = _chunkNM6A7DX4cjs.SourceControlHandle;
7
+ exports.default = _chunkJUWY746Vcjs.SourceControlHandle;
7
8
  //# sourceMappingURL=source-control.cjs.map
@@ -1,10 +1,9 @@
1
- import { HttpClient } from '../http-client.cjs';
2
1
  import { PullRequest, SourceControlledFile } from '../types.cjs';
2
+ import BaseHandle from './base.cjs';
3
3
  import '../pagination.cjs';
4
+ import '../http-client.cjs';
4
5
 
5
- declare class SourceControlHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
6
+ declare class SourceControlHandle extends BaseHandle {
8
7
  pull(data: PullRequest): Promise<SourceControlledFile[]>;
9
8
  }
10
9
 
@@ -1,10 +1,9 @@
1
- import { HttpClient } from '../http-client.js';
2
1
  import { PullRequest, SourceControlledFile } from '../types.js';
2
+ import BaseHandle from './base.js';
3
3
  import '../pagination.js';
4
+ import '../http-client.js';
4
5
 
5
- declare class SourceControlHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
6
+ declare class SourceControlHandle extends BaseHandle {
8
7
  pull(data: PullRequest): Promise<SourceControlledFile[]>;
9
8
  }
10
9
 
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  SourceControlHandle
3
- } from "../chunk-JR7A75YV.js";
3
+ } from "../chunk-THVPKRZ6.js";
4
+ import "../chunk-OHQBXLTJ.js";
4
5
  export {
5
6
  SourceControlHandle as default
6
7
  };
package/handles/tag.cjs CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk5PHEDSSOcjs = require('../chunk-5PHEDSSO.cjs');
3
+ var _chunkL36NK3ECcjs = require('../chunk-L36NK3EC.cjs');
4
+ require('../chunk-ACVK7R2L.cjs');
4
5
 
5
6
 
6
- exports.default = _chunk5PHEDSSOcjs.TagHandle;
7
+ exports.default = _chunkL36NK3ECcjs.TagHandle;
7
8
  //# sourceMappingURL=tag.cjs.map
package/handles/tag.d.cts CHANGED
@@ -1,18 +1,13 @@
1
- import { HttpClient } from '../http-client.cjs';
2
- import { TagListResponse, Tag } from '../types.cjs';
1
+ import { TagListResponse, Tag, TagMutation } from '../types.cjs';
2
+ import BaseHandle from './base.cjs';
3
3
  import { PaginationParams } from '../pagination.cjs';
4
+ import '../http-client.cjs';
4
5
 
5
- declare class TagHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
6
+ declare class TagHandle extends BaseHandle {
8
7
  list(params?: PaginationParams): Promise<TagListResponse>;
9
8
  get(id: string): Promise<Tag>;
10
- create(data: {
11
- name: string;
12
- }): Promise<Tag>;
13
- update(id: string, data: {
14
- name: string;
15
- }): Promise<Tag>;
9
+ create(data: TagMutation): Promise<Tag>;
10
+ update(id: string, data: TagMutation): Promise<Tag>;
16
11
  delete(id: string): Promise<Tag>;
17
12
  }
18
13
 
package/handles/tag.d.ts CHANGED
@@ -1,18 +1,13 @@
1
- import { HttpClient } from '../http-client.js';
2
- import { TagListResponse, Tag } from '../types.js';
1
+ import { TagListResponse, Tag, TagMutation } from '../types.js';
2
+ import BaseHandle from './base.js';
3
3
  import { PaginationParams } from '../pagination.js';
4
+ import '../http-client.js';
4
5
 
5
- declare class TagHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
6
+ declare class TagHandle extends BaseHandle {
8
7
  list(params?: PaginationParams): Promise<TagListResponse>;
9
8
  get(id: string): Promise<Tag>;
10
- create(data: {
11
- name: string;
12
- }): Promise<Tag>;
13
- update(id: string, data: {
14
- name: string;
15
- }): Promise<Tag>;
9
+ create(data: TagMutation): Promise<Tag>;
10
+ update(id: string, data: TagMutation): Promise<Tag>;
16
11
  delete(id: string): Promise<Tag>;
17
12
  }
18
13
 
package/handles/tag.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  TagHandle
3
- } from "../chunk-4FXZT5HT.js";
3
+ } from "../chunk-2JBRCS53.js";
4
+ import "../chunk-OHQBXLTJ.js";
4
5
  export {
5
6
  TagHandle as default
6
7
  };
package/handles/user.cjs CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkQLAAM7TGcjs = require('../chunk-QLAAM7TG.cjs');
3
+ var _chunkONBMQHLHcjs = require('../chunk-ONBMQHLH.cjs');
4
+ require('../chunk-ACVK7R2L.cjs');
4
5
 
5
6
 
6
- exports.default = _chunkQLAAM7TGcjs.UserHandle;
7
+ exports.default = _chunkONBMQHLHcjs.UserHandle;
7
8
  //# sourceMappingURL=user.cjs.map
@@ -1,18 +1,11 @@
1
- import { HttpClient } from '../http-client.cjs';
2
- import { UserListResponse, User, UserCreate, UserCreateResponse } from '../types.cjs';
3
- import { PaginationParams } from '../pagination.cjs';
1
+ import { UserListParams, UserListResponse, UserGetParams, User, UserCreate, UserCreateResponse } from '../types.cjs';
2
+ import BaseHandle from './base.cjs';
3
+ import '../pagination.cjs';
4
+ import '../http-client.cjs';
4
5
 
5
- declare class UserHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
8
- list(params?: PaginationParams & {
9
- offset?: number;
10
- includeRole?: boolean;
11
- projectId?: string;
12
- }): Promise<UserListResponse>;
13
- get(id: string, params?: {
14
- includeRole?: boolean;
15
- }): Promise<User>;
6
+ declare class UserHandle extends BaseHandle {
7
+ list(params?: UserListParams): Promise<UserListResponse>;
8
+ get(id: string, params?: UserGetParams): Promise<User>;
16
9
  create(data: UserCreate[]): Promise<UserCreateResponse>;
17
10
  delete(id: string): Promise<void>;
18
11
  changeRole(id: string, newRoleName: string): Promise<void>;
package/handles/user.d.ts CHANGED
@@ -1,18 +1,11 @@
1
- import { HttpClient } from '../http-client.js';
2
- import { UserListResponse, User, UserCreate, UserCreateResponse } from '../types.js';
3
- import { PaginationParams } from '../pagination.js';
1
+ import { UserListParams, UserListResponse, UserGetParams, User, UserCreate, UserCreateResponse } from '../types.js';
2
+ import BaseHandle from './base.js';
3
+ import '../pagination.js';
4
+ import '../http-client.js';
4
5
 
5
- declare class UserHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
8
- list(params?: PaginationParams & {
9
- offset?: number;
10
- includeRole?: boolean;
11
- projectId?: string;
12
- }): Promise<UserListResponse>;
13
- get(id: string, params?: {
14
- includeRole?: boolean;
15
- }): Promise<User>;
6
+ declare class UserHandle extends BaseHandle {
7
+ list(params?: UserListParams): Promise<UserListResponse>;
8
+ get(id: string, params?: UserGetParams): Promise<User>;
16
9
  create(data: UserCreate[]): Promise<UserCreateResponse>;
17
10
  delete(id: string): Promise<void>;
18
11
  changeRole(id: string, newRoleName: string): Promise<void>;
package/handles/user.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  UserHandle
3
- } from "../chunk-SK4VCTMD.js";
3
+ } from "../chunk-CDYFI72K.js";
4
+ import "../chunk-OHQBXLTJ.js";
4
5
  export {
5
6
  UserHandle as default
6
7
  };
@@ -1,7 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZAZJHB3Ocjs = require('../chunk-ZAZJHB3O.cjs');
3
+ var _chunkVS6V3PD6cjs = require('../chunk-VS6V3PD6.cjs');
4
+ require('../chunk-ACVK7R2L.cjs');
4
5
 
5
6
 
6
- exports.default = _chunkZAZJHB3Ocjs.VariableHandle;
7
+ exports.default = _chunkVS6V3PD6cjs.VariableHandle;
7
8
  //# sourceMappingURL=variable.cjs.map
@@ -1,14 +1,10 @@
1
- import { HttpClient } from '../http-client.cjs';
2
- import { VariableListResponse, VariableCreate } from '../types.cjs';
3
- import { PaginationParams } from '../pagination.cjs';
1
+ import { VariableListParams, VariableListResponse, VariableCreate } from '../types.cjs';
2
+ import BaseHandle from './base.cjs';
3
+ import '../pagination.cjs';
4
+ import '../http-client.cjs';
4
5
 
5
- declare class VariableHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
8
- list(params?: PaginationParams & {
9
- projectId?: string;
10
- state?: 'empty';
11
- }): Promise<VariableListResponse>;
6
+ declare class VariableHandle extends BaseHandle {
7
+ list(params?: VariableListParams): Promise<VariableListResponse>;
12
8
  create(data: VariableCreate): Promise<void>;
13
9
  update(id: string, data: VariableCreate): Promise<void>;
14
10
  delete(id: string): Promise<void>;
@@ -1,14 +1,10 @@
1
- import { HttpClient } from '../http-client.js';
2
- import { VariableListResponse, VariableCreate } from '../types.js';
3
- import { PaginationParams } from '../pagination.js';
1
+ import { VariableListParams, VariableListResponse, VariableCreate } from '../types.js';
2
+ import BaseHandle from './base.js';
3
+ import '../pagination.js';
4
+ import '../http-client.js';
4
5
 
5
- declare class VariableHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
8
- list(params?: PaginationParams & {
9
- projectId?: string;
10
- state?: 'empty';
11
- }): Promise<VariableListResponse>;
6
+ declare class VariableHandle extends BaseHandle {
7
+ list(params?: VariableListParams): Promise<VariableListResponse>;
12
8
  create(data: VariableCreate): Promise<void>;
13
9
  update(id: string, data: VariableCreate): Promise<void>;
14
10
  delete(id: string): Promise<void>;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  VariableHandle
3
- } from "../chunk-FZX275Y3.js";
3
+ } from "../chunk-RXHHER7R.js";
4
+ import "../chunk-OHQBXLTJ.js";
4
5
  export {
5
6
  VariableHandle as default
6
7
  };
@@ -1,7 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkI7NGIQIMcjs = require('../chunk-I7NGIQIM.cjs');
3
+ var _chunk75AXCCWFcjs = require('../chunk-75AXCCWF.cjs');
4
+ require('../chunk-ACVK7R2L.cjs');
4
5
 
5
6
 
6
- exports.default = _chunkI7NGIQIMcjs.WorkflowHandle;
7
+ exports.default = _chunk75AXCCWFcjs.WorkflowHandle;
7
8
  //# sourceMappingURL=workflow.cjs.map
@@ -1,28 +1,15 @@
1
- import { HttpClient } from '../http-client.cjs';
2
- import { WorkflowListResponse, Workflow, WorkflowCreate, WorkflowUpdate, Tag, TagId, WorkflowVersion } from '../types.cjs';
3
- import { PaginationParams } from '../pagination.cjs';
1
+ import { WorkflowListParams, WorkflowListResponse, WorkflowGetParams, Workflow, WorkflowCreate, WorkflowUpdate, WorkflowActivateRequest, Tag, TagId, WorkflowVersion } from '../types.cjs';
2
+ import BaseHandle from './base.cjs';
3
+ import '../pagination.cjs';
4
+ import '../http-client.cjs';
4
5
 
5
- declare class WorkflowHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
8
- list(params?: PaginationParams & {
9
- active?: boolean;
10
- tags?: string;
11
- name?: string;
12
- projectId?: string;
13
- excludePinnedData?: boolean;
14
- }): Promise<WorkflowListResponse>;
15
- get(id: string, params?: {
16
- excludePinnedData?: boolean;
17
- }): Promise<Workflow>;
6
+ declare class WorkflowHandle extends BaseHandle {
7
+ list(params?: WorkflowListParams): Promise<WorkflowListResponse>;
8
+ get(id: string, params?: WorkflowGetParams): Promise<Workflow>;
18
9
  create(data: WorkflowCreate): Promise<Workflow>;
19
10
  update(id: string, data: WorkflowUpdate): Promise<Workflow>;
20
11
  delete(id: string): Promise<Workflow>;
21
- activate(id: string, data?: {
22
- versionId?: string;
23
- name?: string;
24
- description?: string;
25
- }): Promise<Workflow>;
12
+ activate(id: string, data?: WorkflowActivateRequest): Promise<Workflow>;
26
13
  deactivate(id: string): Promise<Workflow>;
27
14
  archive(id: string): Promise<Workflow>;
28
15
  unarchive(id: string): Promise<Workflow>;
@@ -1,28 +1,15 @@
1
- import { HttpClient } from '../http-client.js';
2
- import { WorkflowListResponse, Workflow, WorkflowCreate, WorkflowUpdate, Tag, TagId, WorkflowVersion } from '../types.js';
3
- import { PaginationParams } from '../pagination.js';
1
+ import { WorkflowListParams, WorkflowListResponse, WorkflowGetParams, Workflow, WorkflowCreate, WorkflowUpdate, WorkflowActivateRequest, Tag, TagId, WorkflowVersion } from '../types.js';
2
+ import BaseHandle from './base.js';
3
+ import '../pagination.js';
4
+ import '../http-client.js';
4
5
 
5
- declare class WorkflowHandle {
6
- protected http: HttpClient;
7
- constructor(http: HttpClient);
8
- list(params?: PaginationParams & {
9
- active?: boolean;
10
- tags?: string;
11
- name?: string;
12
- projectId?: string;
13
- excludePinnedData?: boolean;
14
- }): Promise<WorkflowListResponse>;
15
- get(id: string, params?: {
16
- excludePinnedData?: boolean;
17
- }): Promise<Workflow>;
6
+ declare class WorkflowHandle extends BaseHandle {
7
+ list(params?: WorkflowListParams): Promise<WorkflowListResponse>;
8
+ get(id: string, params?: WorkflowGetParams): Promise<Workflow>;
18
9
  create(data: WorkflowCreate): Promise<Workflow>;
19
10
  update(id: string, data: WorkflowUpdate): Promise<Workflow>;
20
11
  delete(id: string): Promise<Workflow>;
21
- activate(id: string, data?: {
22
- versionId?: string;
23
- name?: string;
24
- description?: string;
25
- }): Promise<Workflow>;
12
+ activate(id: string, data?: WorkflowActivateRequest): Promise<Workflow>;
26
13
  deactivate(id: string): Promise<Workflow>;
27
14
  archive(id: string): Promise<Workflow>;
28
15
  unarchive(id: string): Promise<Workflow>;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  WorkflowHandle
3
- } from "../chunk-MNL65GQB.js";
3
+ } from "../chunk-NMKH2J77.js";
4
+ import "../chunk-OHQBXLTJ.js";
4
5
  export {
5
6
  WorkflowHandle as default
6
7
  };
package/http-client.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk5DYA4LAXcjs = require('./chunk-5DYA4LAX.cjs');
4
+ var _chunkLC3TKRMXcjs = require('./chunk-LC3TKRMX.cjs');
5
5
  require('./chunk-7B5DLJYY.cjs');
6
6
 
7
7
 
8
8
 
9
- exports.HttpClient = _chunk5DYA4LAXcjs.HttpClient; exports.HttpError = _chunk5DYA4LAXcjs.HttpError;
9
+ exports.HttpClient = _chunkLC3TKRMXcjs.HttpClient; exports.HttpError = _chunkLC3TKRMXcjs.HttpError;
10
10
  //# sourceMappingURL=http-client.cjs.map
package/http-client.d.cts CHANGED
@@ -10,9 +10,7 @@ interface RequestOptions {
10
10
  method: string;
11
11
  path: string;
12
12
  body?: unknown;
13
- query?: {
14
- [key: string]: unknown;
15
- };
13
+ query?: object;
16
14
  headers?: Record<string, string>;
17
15
  }
18
16
  declare class HttpClient {
@@ -23,21 +21,11 @@ declare class HttpClient {
23
21
  private buildHeaders;
24
22
  private parseResponseData;
25
23
  request<T>(options: RequestOptions): Promise<T>;
26
- get<T>(path: string, query?: {
27
- [key: string]: unknown;
28
- }, headers?: Record<string, string>): Promise<T>;
29
- post<T>(path: string, body?: unknown, query?: {
30
- [key: string]: unknown;
31
- }, headers?: Record<string, string>): Promise<T>;
32
- put<T>(path: string, body?: unknown, query?: {
33
- [key: string]: unknown;
34
- }, headers?: Record<string, string>): Promise<T>;
35
- patch<T>(path: string, body?: unknown, query?: {
36
- [key: string]: unknown;
37
- }, headers?: Record<string, string>): Promise<T>;
38
- delete<T>(path: string, query?: {
39
- [key: string]: unknown;
40
- }, headers?: Record<string, string>): Promise<T>;
24
+ get<T>(path: string, query?: object, headers?: Record<string, string>): Promise<T>;
25
+ post<T>(path: string, body?: unknown, query?: object, headers?: Record<string, string>): Promise<T>;
26
+ put<T>(path: string, body?: unknown, query?: object, headers?: Record<string, string>): Promise<T>;
27
+ patch<T>(path: string, body?: unknown, query?: object, headers?: Record<string, string>): Promise<T>;
28
+ delete<T>(path: string, query?: object, headers?: Record<string, string>): Promise<T>;
41
29
  }
42
30
 
43
31
  export { HttpClient, HttpError, type RequestOptions };