@reximo/cli 0.1.0-alpha.3 → 0.1.0-alpha.5
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/README.md +162 -0
- package/package.json +3 -3
- package/src/client/generated/index.d.ts +1 -1
- package/src/client/generated/index.js +2 -4
- package/src/client/generated/index.js.map +1 -1
- package/src/client/generated/reximo-api-client.generated.d.ts +253 -0
- package/src/client/generated/reximo-api-client.generated.js +285 -0
- package/src/client/generated/reximo-api-client.generated.js.map +1 -1
- package/src/client/reximo-client.d.ts +113 -1
- package/src/client/reximo-client.js +262 -0
- package/src/client/reximo-client.js.map +1 -1
- package/src/lib/run-cli.js +610 -0
- package/src/lib/run-cli.js.map +1 -1
- package/src/lib/runtime-deps.d.ts +10 -0
- package/src/lib/runtime-deps.js +80 -0
- package/src/lib/runtime-deps.js.map +1 -0
package/README.md
CHANGED
|
@@ -22,6 +22,21 @@ For a project-local install, use `npx reximo`, `npm exec reximo`, or `./node_mod
|
|
|
22
22
|
```bash
|
|
23
23
|
pnpm reximo:cli:dev -- info --json
|
|
24
24
|
pnpm reximo:cli:dev -- login --email user@example.com --password 'secret' --organization-id 123
|
|
25
|
+
pnpm reximo:cli:dev -- auth status --json
|
|
26
|
+
pnpm reximo:cli:dev -- doctor
|
|
27
|
+
pnpm reximo:cli:dev -- issues search --search restore --page-size 10
|
|
28
|
+
pnpm reximo:cli:dev -- issues get 77
|
|
29
|
+
pnpm reximo:cli:dev -- issues comment 77 --body-markdown "Looks good"
|
|
30
|
+
pnpm reximo:cli:dev -- issues transition 77 --status done
|
|
31
|
+
pnpm reximo:cli:dev -- issues link 77 --target-issue-id 88 --relation-type blocks
|
|
32
|
+
pnpm reximo:cli:dev -- issues create --title "Restore CLI issue workflow" --project-id 34
|
|
33
|
+
pnpm reximo:cli:dev -- issues update 77 --priority high --clear-due-at
|
|
34
|
+
pnpm reximo:cli:dev -- issues delete 77
|
|
35
|
+
pnpm reximo:cli:dev -- content list --scope project --project-id 34
|
|
36
|
+
pnpm reximo:cli:dev -- content create --title "Incident handbook" --content-markdown "# Incident handbook"
|
|
37
|
+
pnpm reximo:cli:dev -- content update 51 --title "Updated handbook"
|
|
38
|
+
pnpm reximo:cli:dev -- content delete 51
|
|
39
|
+
pnpm reximo:cli:dev -- projects list --visibility public
|
|
25
40
|
pnpm reximo:cli:dev -- me
|
|
26
41
|
pnpm reximo:cli:dev -- logout
|
|
27
42
|
pnpm reximo:cli:build
|
|
@@ -32,15 +47,49 @@ pnpm reximo:cli:pack
|
|
|
32
47
|
- `pnpm reximo:cli:build` compiles the package into `dist/packages/reximo-cli` using the Nx build target.
|
|
33
48
|
- `pnpm reximo:cli:pack` runs `npm pack --dry-run` against the built package in `dist/` so you can inspect the exact tarball contents that would be published to npm without actually publishing anything.
|
|
34
49
|
|
|
50
|
+
## Local verification
|
|
51
|
+
|
|
52
|
+
Use the package-local loop while changing the command surface:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pnpm --dir packages/reximo-cli lint
|
|
56
|
+
pnpm --dir packages/reximo-cli typecheck
|
|
57
|
+
pnpm --dir packages/reximo-cli test
|
|
58
|
+
pnpm --dir packages/reximo-cli build
|
|
59
|
+
pnpm --dir packages/reximo-cli pack:dry-run
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
When checking automation behavior, prefer `reximo doctor --json` and keep its structured capability report aligned with the real command surface. Issue capabilities currently include `search`, `list`, `get`, `create`, `update`, `delete`, `comment`, `transition`, and `link`.
|
|
63
|
+
|
|
35
64
|
## Commands
|
|
36
65
|
|
|
37
66
|
- `reximo info`
|
|
67
|
+
- `reximo auth status`
|
|
68
|
+
- `reximo doctor`
|
|
38
69
|
- `reximo login`
|
|
39
70
|
- `reximo login --email <email> --password <password>`
|
|
40
71
|
- `reximo login --organization-id <organizationId>`
|
|
41
72
|
- `reximo me`
|
|
42
73
|
- `reximo profile`
|
|
43
74
|
- `reximo logout`
|
|
75
|
+
- `reximo issues search`
|
|
76
|
+
- `reximo issues list`
|
|
77
|
+
- `reximo issues get <issueId>`
|
|
78
|
+
- `reximo issues show <issueId>`
|
|
79
|
+
- `reximo issues create --title <title>`
|
|
80
|
+
- `reximo issues update <issueId>`
|
|
81
|
+
- `reximo issues delete <issueId>`
|
|
82
|
+
- `reximo issues comment <issueId> --body-markdown <markdown>`
|
|
83
|
+
- `reximo issues transition <issueId> --status <status>`
|
|
84
|
+
- `reximo issues link <issueId> --target-issue-id <issueId> --relation-type <type>`
|
|
85
|
+
- `reximo content list`
|
|
86
|
+
- `reximo content get <contentId>`
|
|
87
|
+
- `reximo content create --title <title> --content-markdown <markdown>`
|
|
88
|
+
- `reximo content update <contentId>`
|
|
89
|
+
- `reximo content delete <contentId>`
|
|
90
|
+
- `reximo content publish <contentId>`
|
|
91
|
+
- `reximo content attach <contentId>`
|
|
92
|
+
- `reximo projects list`
|
|
44
93
|
- `reximo config show`
|
|
45
94
|
- `reximo --help`
|
|
46
95
|
|
|
@@ -110,6 +159,119 @@ Behavior:
|
|
|
110
159
|
- if multiple active organizations are available, it prompts for selection in an interactive terminal
|
|
111
160
|
- in non-interactive use, pass `--organization-id` when multiple organizations are possible
|
|
112
161
|
|
|
162
|
+
## Auth And Doctor
|
|
163
|
+
|
|
164
|
+
Use these commands before agent-driven automation to verify profile readiness and the currently supported command surface.
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
reximo auth status
|
|
168
|
+
reximo auth status --json
|
|
169
|
+
reximo doctor
|
|
170
|
+
reximo doctor --json
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Behavior:
|
|
174
|
+
|
|
175
|
+
- `auth status` reports whether the active profile has the access token, refresh token, organization, and base URL needed for authenticated operations
|
|
176
|
+
- `doctor` reports whether the active profile is ready for authenticated commands and which issue or content capabilities are currently available in the installed CLI/API surface
|
|
177
|
+
|
|
178
|
+
## Issues
|
|
179
|
+
|
|
180
|
+
Authenticated issue commands require both an access token and an organization id in the active CLI profile or environment.
|
|
181
|
+
|
|
182
|
+
Search issues:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
reximo issues search --search restore --project-id 34 --status in_progress --page-size 25
|
|
186
|
+
reximo issues list --json
|
|
187
|
+
reximo issues get 77
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Create an issue:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
reximo issues create \
|
|
194
|
+
--title "Restore CLI issue workflow" \
|
|
195
|
+
--description-markdown "Bring issue management to the CLI." \
|
|
196
|
+
--project-id 34 \
|
|
197
|
+
--status backlog \
|
|
198
|
+
--priority high
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Update an issue by numeric id:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
reximo issues update 77 --title "Restore CLI issue workflow" --priority low
|
|
205
|
+
reximo issues update 77 --clear-estimate --clear-due-at
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Delete an issue by numeric id:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
reximo issues delete 77
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Comment, transition, and link an issue:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
reximo issues comment 77 --body-markdown "Looks good"
|
|
218
|
+
reximo issues transition 77 --status done
|
|
219
|
+
reximo issues link 77 --target-issue-id 88 --relation-type blocks
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Notes:
|
|
223
|
+
|
|
224
|
+
- `issues search` and `issues list` are the same command surface
|
|
225
|
+
- by default, `issues search` and `issues list` exclude issues with status `done`
|
|
226
|
+
- pass `--status done` or `--statuses ...` to override the default status filter
|
|
227
|
+
- `issues get` fetches one issue by id
|
|
228
|
+
- `issues update` requires at least one update flag
|
|
229
|
+
- `issues transition` requires either `--status` or `--status-definition-id`
|
|
230
|
+
- `issues create` requires `--title`
|
|
231
|
+
- `issues comment` requires `--body-markdown`
|
|
232
|
+
- `issues link` requires both `--target-issue-id` and `--relation-type`
|
|
233
|
+
- `--json` is supported for scripting on all commands
|
|
234
|
+
|
|
235
|
+
## Content
|
|
236
|
+
|
|
237
|
+
Authenticated content commands require both an access token and an organization id in the active CLI profile or environment.
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
reximo content list --scope project --project-id 34
|
|
241
|
+
reximo content get <contentId>
|
|
242
|
+
reximo content create --title "Incident handbook" --content-markdown "# Incident handbook"
|
|
243
|
+
reximo content update <contentId>
|
|
244
|
+
reximo content delete <contentId>
|
|
245
|
+
reximo content publish <contentId>
|
|
246
|
+
reximo content attach <contentId>
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Current behavior:
|
|
250
|
+
|
|
251
|
+
- the current API exposes create and update for content entries but does not expose a separate publish endpoint
|
|
252
|
+
- for now, creating or updating content is the publish action for remote knowledge entries
|
|
253
|
+
- `content create` requires both `--title` and `--content-markdown`
|
|
254
|
+
- `content update` requires at least one update field
|
|
255
|
+
- `content list` supports `--scope`, `--project-id`, `--parent-id`, and `--slug`
|
|
256
|
+
- `content publish` and `content attach` are explicit capability placeholders today and fail with a clear unsupported-capability error
|
|
257
|
+
|
|
258
|
+
## Projects
|
|
259
|
+
|
|
260
|
+
`reximo projects list` returns projects visible to the current user in the configured organization.
|
|
261
|
+
|
|
262
|
+
Visibility behavior:
|
|
263
|
+
|
|
264
|
+
- public projects are listed for the organization
|
|
265
|
+
- private projects are listed only when the current user is a member
|
|
266
|
+
|
|
267
|
+
Examples:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
reximo projects list
|
|
271
|
+
reximo projects list --visibility private --page-size 50
|
|
272
|
+
reximo projects list --json
|
|
273
|
+
```
|
|
274
|
+
|
|
113
275
|
## Generated Client
|
|
114
276
|
|
|
115
277
|
The CLI API client is generated from the API OpenAPI spec emitted at `.agentic/docs/reference/api/openapi-v1.json`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reximo/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.5",
|
|
4
4
|
"description": "Command-line interface for Reximo.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"license": "ISC",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"dev": "pnpm exec tsx src/cli.ts",
|
|
49
49
|
"generate:client": "pnpm -C ../.. docs:openapi && pnpm exec tsx scripts/generate-client.ts",
|
|
50
50
|
"lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint src --ext .ts",
|
|
51
|
-
"pack:dry-run": "pnpm run build && cd ../../dist/packages/reximo-cli && npm pack --dry-run",
|
|
52
|
-
"test": "pnpm exec tsx --test src/run-cli.test.ts src/lib/config.test.ts",
|
|
51
|
+
"pack:dry-run": "pnpm run build && pnpm exec tsx scripts/verify-runtime-deps.ts && cd ../../dist/packages/reximo-cli && npm pack --dry-run",
|
|
52
|
+
"test": "pnpm exec tsx --test src/run-cli.test.ts src/lib/config.test.ts src/lib/runtime-deps.test.ts",
|
|
53
53
|
"typecheck": "tsc --noEmit",
|
|
54
54
|
"verify": "pnpm run lint && pnpm run typecheck && pnpm run test"
|
|
55
55
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './reximo-api-client.generated';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "ReximoApiClient", { enumerable: true, get: function () { return reximo_api_client_generated_1.ReximoApiClient; } });
|
|
6
|
-
Object.defineProperty(exports, "ReximoApiError", { enumerable: true, get: function () { return reximo_api_client_generated_1.ReximoApiError; } });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./reximo-api-client.generated"), exports);
|
|
7
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/reximo-cli/src/client/generated/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/reximo-cli/src/client/generated/index.ts"],"names":[],"mappings":";;;AAAA,wEAA8C"}
|
|
@@ -46,6 +46,193 @@ export interface UserOrganizationDto {
|
|
|
46
46
|
isDefault: boolean;
|
|
47
47
|
isActive: boolean;
|
|
48
48
|
}
|
|
49
|
+
export interface CreateIssueDto {
|
|
50
|
+
title: string;
|
|
51
|
+
descriptionMarkdown?: string;
|
|
52
|
+
status?: "backlog" | "in_progress" | "blocked" | "done";
|
|
53
|
+
statusDefinitionId?: number | null;
|
|
54
|
+
priority?: "urgent" | "high" | "medium" | "low";
|
|
55
|
+
projectId?: number;
|
|
56
|
+
parentIssueId?: number;
|
|
57
|
+
position?: number;
|
|
58
|
+
estimate?: number;
|
|
59
|
+
dueAt?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface UpdateIssueDto {
|
|
62
|
+
title?: string;
|
|
63
|
+
descriptionMarkdown?: string;
|
|
64
|
+
status?: "backlog" | "in_progress" | "blocked" | "done";
|
|
65
|
+
statusDefinitionId?: number | null;
|
|
66
|
+
priority?: "urgent" | "high" | "medium" | "low";
|
|
67
|
+
parentIssueId?: number;
|
|
68
|
+
position?: number;
|
|
69
|
+
estimate?: number | null;
|
|
70
|
+
dueAt?: string | null;
|
|
71
|
+
baseRevision?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface IssueListItemDto {
|
|
74
|
+
id: number;
|
|
75
|
+
organizationId: number;
|
|
76
|
+
projectId?: number | null;
|
|
77
|
+
project?: IssueProjectDto;
|
|
78
|
+
parentIssueId?: number | null;
|
|
79
|
+
parentIssue?: IssueParentSummaryDto;
|
|
80
|
+
issueNumber: number;
|
|
81
|
+
title: string;
|
|
82
|
+
descriptionMarkdown: string;
|
|
83
|
+
status: string;
|
|
84
|
+
statusDefinition: IssueStatusDefinitionDto;
|
|
85
|
+
priority: string;
|
|
86
|
+
position: number;
|
|
87
|
+
estimate?: number | null;
|
|
88
|
+
dueAt?: string | null;
|
|
89
|
+
resolvedAt?: Record<string, unknown> | null;
|
|
90
|
+
createdBy: number;
|
|
91
|
+
updatedBy: number;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
updatedAt: string;
|
|
94
|
+
assignees: Array<IssueParticipantDto>;
|
|
95
|
+
labels: Array<IssueLabelDto>;
|
|
96
|
+
commentsCount: number;
|
|
97
|
+
attachmentsCount: number;
|
|
98
|
+
watchersCount: number;
|
|
99
|
+
subtaskCount: number;
|
|
100
|
+
completedSubtaskCount: number;
|
|
101
|
+
activity?: Array<IssueActivityDto>;
|
|
102
|
+
}
|
|
103
|
+
export interface IssueProjectDto {
|
|
104
|
+
id: number;
|
|
105
|
+
key: string;
|
|
106
|
+
name: string;
|
|
107
|
+
visibility: string;
|
|
108
|
+
}
|
|
109
|
+
export interface IssueParentSummaryDto {
|
|
110
|
+
id: number;
|
|
111
|
+
identifier: string;
|
|
112
|
+
title: string;
|
|
113
|
+
}
|
|
114
|
+
export interface IssueStatusDefinitionDto {
|
|
115
|
+
id?: number | null;
|
|
116
|
+
key: string;
|
|
117
|
+
name: string;
|
|
118
|
+
color?: string | null;
|
|
119
|
+
description?: string | null;
|
|
120
|
+
baseStatus: string;
|
|
121
|
+
projectId?: number | null;
|
|
122
|
+
position?: number | null;
|
|
123
|
+
}
|
|
124
|
+
export interface IssueParticipantDto {
|
|
125
|
+
userId: number;
|
|
126
|
+
displayName?: string | null;
|
|
127
|
+
photoUrl?: string | null;
|
|
128
|
+
}
|
|
129
|
+
export interface IssueLabelDto {
|
|
130
|
+
id: number;
|
|
131
|
+
name: string;
|
|
132
|
+
color?: string | null;
|
|
133
|
+
description?: string | null;
|
|
134
|
+
projectId?: number | null;
|
|
135
|
+
}
|
|
136
|
+
export interface IssueActivityDto {
|
|
137
|
+
id: number;
|
|
138
|
+
activityType: string;
|
|
139
|
+
actorUserId?: number | null;
|
|
140
|
+
actorDisplayName?: string | null;
|
|
141
|
+
actorPhotoUrl?: string | null;
|
|
142
|
+
metadata: Record<string, unknown>;
|
|
143
|
+
createdAt: string;
|
|
144
|
+
}
|
|
145
|
+
export interface IssueDetailDto {
|
|
146
|
+
id: number;
|
|
147
|
+
organizationId: number;
|
|
148
|
+
projectId?: number | null;
|
|
149
|
+
project?: IssueProjectDto;
|
|
150
|
+
parentIssueId?: number | null;
|
|
151
|
+
parentIssue?: IssueParentSummaryDto;
|
|
152
|
+
issueNumber: number;
|
|
153
|
+
title: string;
|
|
154
|
+
descriptionMarkdown: string;
|
|
155
|
+
status: string;
|
|
156
|
+
statusDefinition: IssueStatusDefinitionDto;
|
|
157
|
+
priority: string;
|
|
158
|
+
position: number;
|
|
159
|
+
estimate?: number | null;
|
|
160
|
+
dueAt?: string | null;
|
|
161
|
+
resolvedAt?: Record<string, unknown> | null;
|
|
162
|
+
createdBy: number;
|
|
163
|
+
updatedBy: number;
|
|
164
|
+
createdAt: string;
|
|
165
|
+
updatedAt: string;
|
|
166
|
+
assignees: Array<IssueParticipantDto>;
|
|
167
|
+
labels: Array<IssueLabelDto>;
|
|
168
|
+
commentsCount: number;
|
|
169
|
+
attachmentsCount: number;
|
|
170
|
+
watchersCount: number;
|
|
171
|
+
subtaskCount: number;
|
|
172
|
+
completedSubtaskCount: number;
|
|
173
|
+
activity?: Array<IssueActivityDto>;
|
|
174
|
+
watchers: Array<IssueParticipantDto>;
|
|
175
|
+
comments: Array<IssueCommentDto>;
|
|
176
|
+
relations: Array<IssueRelationDto>;
|
|
177
|
+
subtasks: Array<IssueListItemDto>;
|
|
178
|
+
}
|
|
179
|
+
export interface IssueCommentDto {
|
|
180
|
+
id: number;
|
|
181
|
+
authorUserId: number;
|
|
182
|
+
authorDisplayName?: string | null;
|
|
183
|
+
authorPhotoUrl?: string | null;
|
|
184
|
+
bodyMarkdown: string;
|
|
185
|
+
createdAt: string;
|
|
186
|
+
updatedAt: string;
|
|
187
|
+
}
|
|
188
|
+
export interface IssueRelationDto {
|
|
189
|
+
id: number;
|
|
190
|
+
relationType: string;
|
|
191
|
+
relatedIssueId: number;
|
|
192
|
+
relatedIssueTitle: string;
|
|
193
|
+
relatedIssueNumber: number;
|
|
194
|
+
}
|
|
195
|
+
export interface CreateIssueCommentDto {
|
|
196
|
+
bodyMarkdown: string;
|
|
197
|
+
parentCommentId?: number;
|
|
198
|
+
}
|
|
199
|
+
export interface CreateIssueRelationDto {
|
|
200
|
+
targetIssueId: number;
|
|
201
|
+
relationType: "blocks" | "blocked_by" | "related" | "duplicate_of";
|
|
202
|
+
}
|
|
203
|
+
export interface ContentEntryDto {
|
|
204
|
+
id: number;
|
|
205
|
+
organizationId: number;
|
|
206
|
+
projectId?: number | null;
|
|
207
|
+
parentId?: number | null;
|
|
208
|
+
title: string;
|
|
209
|
+
slug: string;
|
|
210
|
+
revision: string;
|
|
211
|
+
contentMarkdown: string;
|
|
212
|
+
position: number;
|
|
213
|
+
createdBy: number;
|
|
214
|
+
updatedBy: number;
|
|
215
|
+
updatedByDisplayName?: string | null;
|
|
216
|
+
updatedByPhotoUrl?: string | null;
|
|
217
|
+
createdAt: string;
|
|
218
|
+
updatedAt: string;
|
|
219
|
+
}
|
|
220
|
+
export interface CreateContentEntryDto {
|
|
221
|
+
title: string;
|
|
222
|
+
contentMarkdown: string;
|
|
223
|
+
slug?: string;
|
|
224
|
+
projectId?: number;
|
|
225
|
+
parentId?: number;
|
|
226
|
+
position?: number;
|
|
227
|
+
}
|
|
228
|
+
export interface UpdateContentEntryDto {
|
|
229
|
+
title?: string;
|
|
230
|
+
contentMarkdown?: string;
|
|
231
|
+
slug?: string;
|
|
232
|
+
parentId?: number;
|
|
233
|
+
position?: number;
|
|
234
|
+
baseRevision?: string;
|
|
235
|
+
}
|
|
49
236
|
export type LoginRequest = LoginDto;
|
|
50
237
|
export type LoginResponse = AuthResponseDto;
|
|
51
238
|
export type RefreshTokenRequest = RefreshTokenDto;
|
|
@@ -74,6 +261,25 @@ export type GetMeResponse = {
|
|
|
74
261
|
export type LogoutResponse = {
|
|
75
262
|
"message": string;
|
|
76
263
|
};
|
|
264
|
+
export type ListIssuesResponse = Array<IssueListItemDto>;
|
|
265
|
+
export type CreateIssueRequest = CreateIssueDto;
|
|
266
|
+
export type CreateIssueResponse = IssueDetailDto;
|
|
267
|
+
export type GetIssueResponse = IssueDetailDto;
|
|
268
|
+
export type UpdateIssueRequest = UpdateIssueDto;
|
|
269
|
+
export type UpdateIssueResponse = IssueDetailDto;
|
|
270
|
+
export type CreateIssueCommentRequest = CreateIssueCommentDto;
|
|
271
|
+
export type CreateIssueCommentResponse = IssueDetailDto;
|
|
272
|
+
export type CreateIssueRelationRequest = CreateIssueRelationDto;
|
|
273
|
+
export type CreateIssueRelationResponse = IssueDetailDto;
|
|
274
|
+
export type DeleteIssueResponse = void;
|
|
275
|
+
export type ListProjectsResponse = unknown;
|
|
276
|
+
export type ListContentResponse = Array<ContentEntryDto>;
|
|
277
|
+
export type CreateContentRequest = CreateContentEntryDto;
|
|
278
|
+
export type CreateContentResponse = ContentEntryDto;
|
|
279
|
+
export type GetContentResponse = ContentEntryDto;
|
|
280
|
+
export type UpdateContentRequest = UpdateContentEntryDto;
|
|
281
|
+
export type UpdateContentResponse = ContentEntryDto;
|
|
282
|
+
export type DeleteContentResponse = void;
|
|
77
283
|
export declare class ReximoApiError extends Error {
|
|
78
284
|
readonly status: number;
|
|
79
285
|
readonly body: unknown;
|
|
@@ -106,6 +312,40 @@ export type LogoutOptions = {
|
|
|
106
312
|
accessToken: string;
|
|
107
313
|
tenantId: string;
|
|
108
314
|
};
|
|
315
|
+
export type AuthenticatedRequestOptions = {
|
|
316
|
+
signal?: AbortSignal;
|
|
317
|
+
accessToken: string;
|
|
318
|
+
tenantId?: string | null;
|
|
319
|
+
};
|
|
320
|
+
export type ListIssuesOptions = AuthenticatedRequestOptions & {
|
|
321
|
+
page?: number;
|
|
322
|
+
pageSize?: number;
|
|
323
|
+
projectId?: number;
|
|
324
|
+
labelId?: number;
|
|
325
|
+
assigneeUserId?: number;
|
|
326
|
+
watcherUserId?: number;
|
|
327
|
+
activityActorUserId?: number;
|
|
328
|
+
search?: string;
|
|
329
|
+
status?: 'backlog' | 'in_progress' | 'blocked' | 'done';
|
|
330
|
+
statuses?: Array<'backlog' | 'in_progress' | 'blocked' | 'done'>;
|
|
331
|
+
priority?: 'urgent' | 'high' | 'medium' | 'low';
|
|
332
|
+
sortBy?: 'updatedAt' | 'createdAt' | 'priority' | 'dueAt' | 'position';
|
|
333
|
+
sortOrder?: 'asc' | 'desc';
|
|
334
|
+
};
|
|
335
|
+
export type ListProjectsOptions = AuthenticatedRequestOptions & {
|
|
336
|
+
page?: number;
|
|
337
|
+
pageSize?: number;
|
|
338
|
+
search?: string;
|
|
339
|
+
visibility?: 'public' | 'private';
|
|
340
|
+
sortBy?: 'name' | 'createdAt' | 'updatedAt' | 'visibility';
|
|
341
|
+
sortOrder?: 'asc' | 'desc';
|
|
342
|
+
};
|
|
343
|
+
export type ListContentOptions = AuthenticatedRequestOptions & {
|
|
344
|
+
scope?: string;
|
|
345
|
+
projectId?: number;
|
|
346
|
+
parentId?: number;
|
|
347
|
+
slug?: string;
|
|
348
|
+
};
|
|
109
349
|
export declare class ReximoApiClient {
|
|
110
350
|
private readonly baseUrl;
|
|
111
351
|
private readonly fetchFn;
|
|
@@ -115,4 +355,17 @@ export declare class ReximoApiClient {
|
|
|
115
355
|
getMe(options: GetMeOptions): Promise<GetMeResponse>;
|
|
116
356
|
refreshToken(body: RefreshTokenRequest, options?: RefreshTokenOptions): Promise<RefreshTokenResponse>;
|
|
117
357
|
logout(body: RefreshTokenRequest, options: LogoutOptions): Promise<LogoutResponse>;
|
|
358
|
+
listIssues(options: ListIssuesOptions): Promise<ListIssuesResponse>;
|
|
359
|
+
createIssue(body: CreateIssueRequest, options: AuthenticatedRequestOptions): Promise<CreateIssueResponse>;
|
|
360
|
+
getIssue(issueId: string, options: AuthenticatedRequestOptions): Promise<GetIssueResponse>;
|
|
361
|
+
updateIssue(issueId: string, body: UpdateIssueRequest, options: AuthenticatedRequestOptions): Promise<UpdateIssueResponse>;
|
|
362
|
+
createIssueComment(issueId: string, body: CreateIssueCommentRequest, options: AuthenticatedRequestOptions): Promise<CreateIssueCommentResponse>;
|
|
363
|
+
createIssueRelation(issueId: string, body: CreateIssueRelationRequest, options: AuthenticatedRequestOptions): Promise<CreateIssueRelationResponse>;
|
|
364
|
+
deleteIssue(issueId: string, options: AuthenticatedRequestOptions): Promise<void>;
|
|
365
|
+
listProjects(options: ListProjectsOptions): Promise<ListProjectsResponse>;
|
|
366
|
+
listContent(options: ListContentOptions): Promise<ListContentResponse>;
|
|
367
|
+
createContent(body: CreateContentRequest, options: AuthenticatedRequestOptions): Promise<CreateContentResponse>;
|
|
368
|
+
getContent(contentId: string, options: AuthenticatedRequestOptions): Promise<GetContentResponse>;
|
|
369
|
+
updateContent(contentId: string, body: UpdateContentRequest, options: AuthenticatedRequestOptions): Promise<UpdateContentResponse>;
|
|
370
|
+
deleteContent(contentId: string, options: AuthenticatedRequestOptions): Promise<void>;
|
|
118
371
|
}
|