@testerpaykit/api-client 1.2.0 → 1.3.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/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +12 -0
- package/dist/index.mjs +12 -0
- package/package.json +7 -7
- package/src/TesterPayKitApiClient.ts +14 -0
- package/.turbo/turbo-build.log +0 -15
- package/.turbo/turbo-test.log +0 -12
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenManager, IApiClient, LoginRequest, LoginResponse, WeeklySummary, VoiceBugExtractResponse } from '@testerpaykit/core';
|
|
1
|
+
import { TokenManager, IApiClient, LoginRequest, LoginResponse, WeeklySummary, RemoteAiSession, VoiceBugExtractResponse } from '@testerpaykit/core';
|
|
2
2
|
|
|
3
3
|
interface ApiClientConfig {
|
|
4
4
|
baseURL?: string;
|
|
@@ -140,6 +140,11 @@ declare class TesterPayKitApiClient implements IApiClient {
|
|
|
140
140
|
markNotificationsRead(params?: {
|
|
141
141
|
id?: string;
|
|
142
142
|
}): Promise<number>;
|
|
143
|
+
/**
|
|
144
|
+
* Claim a remote AI-tester run waiting for this project.
|
|
145
|
+
* POST /v1/testers/me/ai-sessions/claim — 204 → null.
|
|
146
|
+
*/
|
|
147
|
+
claimRemoteAiSession(projectId: string): Promise<RemoteAiSession | null>;
|
|
143
148
|
/**
|
|
144
149
|
* Attach a file (screenshot, log, voice note) to an already-
|
|
145
150
|
* submitted bug report. Hits POST /v1/testers/me/bug-reports/
|
|
@@ -681,4 +686,5 @@ interface TaskStep {
|
|
|
681
686
|
estimatedMinutes?: number | null;
|
|
682
687
|
}
|
|
683
688
|
|
|
684
|
-
export {
|
|
689
|
+
export { TesterPayKitApiClient };
|
|
690
|
+
export type { AnonymousLoginResponse, ApiClientConfig, BugCategory, BugReportAttachmentInput, BugReportAttachmentResponse, BugReportPayload, BugReportResponse, BugReportType, BugSeverity, EarningsSummary, EndTesterSessionInput, EnrollmentResponse, FeedbackResponse, KnowledgeBaseAnswer, KnowledgeBaseCitation, KnowledgeFile, KnowledgeFileSummary, MyBugReportSummary, MyBugReportsResponse, NotificationsResult, PayoutRecord, RegisterDeviceInput, RetestItem, SessionBreadcrumbInput, SessionBreadcrumbsResponse, SessionEventInput, SessionEventsResponse, StartTesterSessionInput, SubmissionResponse, TaskListFilter, TaskListResponse, TaskPreset, TaskStep, TesterDeviceResponse, TesterPoints, TesterProfile, TesterSessionEndReason, TesterSessionResponse, TesterTask, TpkNotification };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenManager, IApiClient, LoginRequest, LoginResponse, WeeklySummary, VoiceBugExtractResponse } from '@testerpaykit/core';
|
|
1
|
+
import { TokenManager, IApiClient, LoginRequest, LoginResponse, WeeklySummary, RemoteAiSession, VoiceBugExtractResponse } from '@testerpaykit/core';
|
|
2
2
|
|
|
3
3
|
interface ApiClientConfig {
|
|
4
4
|
baseURL?: string;
|
|
@@ -140,6 +140,11 @@ declare class TesterPayKitApiClient implements IApiClient {
|
|
|
140
140
|
markNotificationsRead(params?: {
|
|
141
141
|
id?: string;
|
|
142
142
|
}): Promise<number>;
|
|
143
|
+
/**
|
|
144
|
+
* Claim a remote AI-tester run waiting for this project.
|
|
145
|
+
* POST /v1/testers/me/ai-sessions/claim — 204 → null.
|
|
146
|
+
*/
|
|
147
|
+
claimRemoteAiSession(projectId: string): Promise<RemoteAiSession | null>;
|
|
143
148
|
/**
|
|
144
149
|
* Attach a file (screenshot, log, voice note) to an already-
|
|
145
150
|
* submitted bug report. Hits POST /v1/testers/me/bug-reports/
|
|
@@ -681,4 +686,5 @@ interface TaskStep {
|
|
|
681
686
|
estimatedMinutes?: number | null;
|
|
682
687
|
}
|
|
683
688
|
|
|
684
|
-
export {
|
|
689
|
+
export { TesterPayKitApiClient };
|
|
690
|
+
export type { AnonymousLoginResponse, ApiClientConfig, BugCategory, BugReportAttachmentInput, BugReportAttachmentResponse, BugReportPayload, BugReportResponse, BugReportType, BugSeverity, EarningsSummary, EndTesterSessionInput, EnrollmentResponse, FeedbackResponse, KnowledgeBaseAnswer, KnowledgeBaseCitation, KnowledgeFile, KnowledgeFileSummary, MyBugReportSummary, MyBugReportsResponse, NotificationsResult, PayoutRecord, RegisterDeviceInput, RetestItem, SessionBreadcrumbInput, SessionBreadcrumbsResponse, SessionEventInput, SessionEventsResponse, StartTesterSessionInput, SubmissionResponse, TaskListFilter, TaskListResponse, TaskPreset, TaskStep, TesterDeviceResponse, TesterPoints, TesterProfile, TesterSessionEndReason, TesterSessionResponse, TesterTask, TpkNotification };
|
package/dist/index.js
CHANGED
|
@@ -246,6 +246,18 @@ var TesterPayKitApiClient = class {
|
|
|
246
246
|
);
|
|
247
247
|
return response.data.unreadCount;
|
|
248
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Claim a remote AI-tester run waiting for this project.
|
|
251
|
+
* POST /v1/testers/me/ai-sessions/claim — 204 → null.
|
|
252
|
+
*/
|
|
253
|
+
async claimRemoteAiSession(projectId) {
|
|
254
|
+
const response = await this.client.post(
|
|
255
|
+
"/v1/testers/me/ai-sessions/claim",
|
|
256
|
+
{ project_id: projectId }
|
|
257
|
+
);
|
|
258
|
+
if (response.status === 204 || !response.data?.sessionId) return null;
|
|
259
|
+
return response.data;
|
|
260
|
+
}
|
|
249
261
|
/**
|
|
250
262
|
* Attach a file (screenshot, log, voice note) to an already-
|
|
251
263
|
* submitted bug report. Hits POST /v1/testers/me/bug-reports/
|
package/dist/index.mjs
CHANGED
|
@@ -212,6 +212,18 @@ var TesterPayKitApiClient = class {
|
|
|
212
212
|
);
|
|
213
213
|
return response.data.unreadCount;
|
|
214
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Claim a remote AI-tester run waiting for this project.
|
|
217
|
+
* POST /v1/testers/me/ai-sessions/claim — 204 → null.
|
|
218
|
+
*/
|
|
219
|
+
async claimRemoteAiSession(projectId) {
|
|
220
|
+
const response = await this.client.post(
|
|
221
|
+
"/v1/testers/me/ai-sessions/claim",
|
|
222
|
+
{ project_id: projectId }
|
|
223
|
+
);
|
|
224
|
+
if (response.status === 204 || !response.data?.sessionId) return null;
|
|
225
|
+
return response.data;
|
|
226
|
+
}
|
|
215
227
|
/**
|
|
216
228
|
* Attach a file (screenshot, log, voice note) to an already-
|
|
217
229
|
* submitted bug report. Hits POST /v1/testers/me/bug-reports/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testerpaykit/api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "API client for TesterPayKit backend",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"axios": "^1.
|
|
17
|
-
"@testerpaykit/core": "1.0
|
|
16
|
+
"axios": "^1.20.0",
|
|
17
|
+
"@testerpaykit/core": "1.1.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@types/node": "^
|
|
21
|
-
"tsup": "^
|
|
22
|
-
"typescript": "^
|
|
23
|
-
"vitest": "^
|
|
20
|
+
"@types/node": "^26.6.5",
|
|
21
|
+
"tsup": "^9.0.0",
|
|
22
|
+
"typescript": "^6.0.3",
|
|
23
|
+
"vitest": "^5.0.5"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"testerpaykit",
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
WeeklySummary,
|
|
7
7
|
TokenManager,
|
|
8
8
|
VoiceBugExtractResponse,
|
|
9
|
+
RemoteAiSession,
|
|
9
10
|
} from '@testerpaykit/core';
|
|
10
11
|
|
|
11
12
|
export interface ApiClientConfig {
|
|
@@ -305,6 +306,19 @@ export class TesterPayKitApiClient implements IApiClient {
|
|
|
305
306
|
return response.data.unreadCount;
|
|
306
307
|
}
|
|
307
308
|
|
|
309
|
+
/**
|
|
310
|
+
* Claim a remote AI-tester run waiting for this project.
|
|
311
|
+
* POST /v1/testers/me/ai-sessions/claim — 204 → null.
|
|
312
|
+
*/
|
|
313
|
+
async claimRemoteAiSession(projectId: string): Promise<RemoteAiSession | null> {
|
|
314
|
+
const response = await this.client.post<RemoteAiSession>(
|
|
315
|
+
'/v1/testers/me/ai-sessions/claim',
|
|
316
|
+
{ project_id: projectId },
|
|
317
|
+
);
|
|
318
|
+
if (response.status === 204 || !response.data?.sessionId) return null;
|
|
319
|
+
return response.data;
|
|
320
|
+
}
|
|
321
|
+
|
|
308
322
|
/**
|
|
309
323
|
* Attach a file (screenshot, log, voice note) to an already-
|
|
310
324
|
* submitted bug report. Hits POST /v1/testers/me/bug-reports/
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
$ tsup src/index.ts --format cjs,esm --dts
|
|
2
|
-
CLI Building entry: src/index.ts
|
|
3
|
-
CLI Using tsconfig: tsconfig.json
|
|
4
|
-
CLI tsup v8.5.1
|
|
5
|
-
CLI Target: es2020
|
|
6
|
-
CJS Build start
|
|
7
|
-
ESM Build start
|
|
8
|
-
ESM dist/index.mjs 18.53 KB
|
|
9
|
-
ESM ⚡️ Build success in 15ms
|
|
10
|
-
CJS dist/index.js 20.18 KB
|
|
11
|
-
CJS ⚡️ Build success in 15ms
|
|
12
|
-
DTS Build start
|
|
13
|
-
DTS ⚡️ Build success in 444ms
|
|
14
|
-
DTS dist/index.d.ts 23.08 KB
|
|
15
|
-
DTS dist/index.d.mts 23.08 KB
|
package/.turbo/turbo-test.log
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
$ vitest --run
|
|
2
|
-
[33mThe CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.[39m
|
|
3
|
-
|
|
4
|
-
RUN v1.6.1 /Users/udi/work/moinsen/ideas/moinsen-infrastructure/TesterPayKit/sdks/typescript/packages/api-client
|
|
5
|
-
|
|
6
|
-
✓ tests/TesterPayKitApiClient.test.ts (14 tests) 6ms
|
|
7
|
-
|
|
8
|
-
Test Files 1 passed (1)
|
|
9
|
-
Tests 14 passed (14)
|
|
10
|
-
Start at 16:58:26
|
|
11
|
-
Duration 473ms (transform 72ms, setup 0ms, collect 157ms, tests 6ms, environment 0ms, prepare 114ms)
|
|
12
|
-
|