@nu-art/bug-report-shared 0.400.7
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/api.d.ts +55 -0
- package/api.js +31 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +70 -0
package/api.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ApiDefResolver, BodyApi, QueryApi } from '@nu-art/thunderstorm-shared';
|
|
2
|
+
import { Auditable, DB_Object } from '@nu-art/ts-common';
|
|
3
|
+
export type TicketDetails = {
|
|
4
|
+
platform: string;
|
|
5
|
+
issueId: string;
|
|
6
|
+
};
|
|
7
|
+
export type BugReport = {
|
|
8
|
+
name: string;
|
|
9
|
+
log: string[];
|
|
10
|
+
};
|
|
11
|
+
export declare const Platform_Jira = "jira";
|
|
12
|
+
export declare const Platform_Slack = "slack";
|
|
13
|
+
export type Request_BugReport = {
|
|
14
|
+
subject: string;
|
|
15
|
+
description: string;
|
|
16
|
+
reports: BugReport[];
|
|
17
|
+
platforms?: string[];
|
|
18
|
+
};
|
|
19
|
+
export type ReportMetaData = {
|
|
20
|
+
description: string;
|
|
21
|
+
path: string;
|
|
22
|
+
minPath: string;
|
|
23
|
+
};
|
|
24
|
+
export type DB_BugReport = DB_Object & Auditable & {
|
|
25
|
+
subject: string;
|
|
26
|
+
description: string;
|
|
27
|
+
reports: ReportLogFile[];
|
|
28
|
+
bucket?: string;
|
|
29
|
+
tickets?: TicketDetails[];
|
|
30
|
+
};
|
|
31
|
+
export type ReportLogFile = {
|
|
32
|
+
name: string;
|
|
33
|
+
path: string;
|
|
34
|
+
};
|
|
35
|
+
export type Paths = {
|
|
36
|
+
path: string;
|
|
37
|
+
};
|
|
38
|
+
export type SignedUrl = {
|
|
39
|
+
fileName: string;
|
|
40
|
+
signedUrl: string;
|
|
41
|
+
publicUrl: string;
|
|
42
|
+
};
|
|
43
|
+
export type ApiStruct_AdminBugReport = {
|
|
44
|
+
v1: {
|
|
45
|
+
downloadLogs: BodyApi<SignedUrl, Paths>;
|
|
46
|
+
retrieveLogs: QueryApi<DB_BugReport[]>;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const ApiDef_AdminBugReport: ApiDefResolver<ApiStruct_AdminBugReport>;
|
|
50
|
+
export type ApiStruct_BugReport = {
|
|
51
|
+
v1: {
|
|
52
|
+
sendBugReport: BodyApi<TicketDetails[], Request_BugReport>;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export declare const ApiDef_BugReport: ApiDefResolver<ApiStruct_BugReport>;
|
package/api.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Allow the user to file a bug report directly from your app
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2020 Adam van der Kruk aka TacB0sS
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { HttpMethod } from '@nu-art/thunderstorm-shared';
|
|
19
|
+
export const Platform_Jira = 'jira';
|
|
20
|
+
export const Platform_Slack = 'slack';
|
|
21
|
+
export const ApiDef_AdminBugReport = {
|
|
22
|
+
v1: {
|
|
23
|
+
downloadLogs: { method: HttpMethod.POST, path: 'v1/bug-reports/download-logs' },
|
|
24
|
+
retrieveLogs: { method: HttpMethod.GET, path: 'v1/bug-reports/get-logs' },
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export const ApiDef_BugReport = {
|
|
28
|
+
v1: {
|
|
29
|
+
sendBugReport: { method: HttpMethod.POST, path: 'v1/bug-reports/report' }
|
|
30
|
+
}
|
|
31
|
+
};
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api.js';
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nu-art/bug-report-shared",
|
|
3
|
+
"version": "0.400.7",
|
|
4
|
+
"description": "Bug Report Shared",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"TacB0sS",
|
|
7
|
+
"express",
|
|
8
|
+
"infra",
|
|
9
|
+
"bug-report",
|
|
10
|
+
"nu-art",
|
|
11
|
+
"thunderstorm",
|
|
12
|
+
"typescript"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/nu-art-js/bug-report",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/nu-art-js/bug-report/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+ssh://git@github.com:nu-art-js/bug-report.git"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"directory": "dist",
|
|
24
|
+
"linkDirectory": true
|
|
25
|
+
},
|
|
26
|
+
"license": "Apache-2.0",
|
|
27
|
+
"author": "TacB0sS",
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsc"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@nu-art/ts-common": "0.400.7",
|
|
33
|
+
"@nu-art/firebase-shared": "0.400.7",
|
|
34
|
+
"@nu-art/slack-shared": "0.400.7",
|
|
35
|
+
"@nu-art/thunderstorm-shared": "0.400.7",
|
|
36
|
+
"@nu-art/user-account-shared": "0.400.7",
|
|
37
|
+
"@nu-art/jira-shared": "0.400.7",
|
|
38
|
+
"firebase": "^11.9.0",
|
|
39
|
+
"firebase-admin": "13.4.0",
|
|
40
|
+
"react": "^18.0.0",
|
|
41
|
+
"react-dom": "^18.0.0",
|
|
42
|
+
"react-router-dom": "^6.9.0",
|
|
43
|
+
"express": "^4.18.2",
|
|
44
|
+
"jszip": "^3.3.0",
|
|
45
|
+
"request": "^2.88.0",
|
|
46
|
+
"moment": "^2.29.4"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/express": "^4.17.17",
|
|
50
|
+
"@types/file-saver": "^2.0.1",
|
|
51
|
+
"@types/history": "^4.7.2",
|
|
52
|
+
"@types/jszip": "^3.1.7",
|
|
53
|
+
"@types/react": "^18.0.0",
|
|
54
|
+
"@types/request": "^2.48.1"
|
|
55
|
+
},
|
|
56
|
+
"unitConfig": {
|
|
57
|
+
"type": "typescript-lib"
|
|
58
|
+
},
|
|
59
|
+
"type": "module",
|
|
60
|
+
"exports": {
|
|
61
|
+
".": {
|
|
62
|
+
"types": "./index.d.ts",
|
|
63
|
+
"import": "./index.js"
|
|
64
|
+
},
|
|
65
|
+
"./*": {
|
|
66
|
+
"types": "./*.d.ts",
|
|
67
|
+
"import": "./*.js"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|