@jsb188/mday 1.1.6 → 1.1.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/package.json +3 -3
- package/src/types/organization.d.ts +2 -1
- package/src/types/report.d.ts +30 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsb188/mday",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.7",
|
|
4
|
+
"description": "Functions and constants for Marketday app only.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "jsb188",
|
|
7
7
|
"type": "module",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"zod": "^3.25.67"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@jsb188/app": "1.1.
|
|
32
|
+
"@jsb188/app": "1.1.7"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
} from '../constants/organization.ts';
|
|
8
8
|
import { PRODUCT_FEATURES } from '../constants/product.ts';
|
|
9
9
|
|
|
10
|
-
import type { AddressObj
|
|
10
|
+
import type { AddressObj } from '@jsb188/app/types/other.d';
|
|
11
|
+
import type { StorageData } from '@jsb188/app/types/storage.d';
|
|
11
12
|
import type { LogTypeEnum } from '../types/log.d';
|
|
12
13
|
|
|
13
14
|
/*
|
package/src/types/report.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { REPORT_SORT_OPTS, REPORT_TYPES, REPORT_ROW_PRESETS } from '../constants/report';
|
|
2
|
+
import type { StorageData, StorageGQL } from '@jsb188/app/types/storage.d';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Enums
|
|
@@ -46,6 +47,8 @@ interface ReportFieldsSection {
|
|
|
46
47
|
title: string;
|
|
47
48
|
description: string;
|
|
48
49
|
rows?: ReportFieldsRow[];
|
|
50
|
+
requireFileUploads?: boolean;
|
|
51
|
+
files?: StorageData[];
|
|
49
52
|
|
|
50
53
|
__prompt_section?: string; // Server-only; full prompt for this section - this is the only prompt that allows {{variable}} regex
|
|
51
54
|
__prompt_examples?: string; // Server-only; for examples of what the output should be
|
|
@@ -115,10 +118,22 @@ export interface ReportGQL {
|
|
|
115
118
|
evidencesCount: number;
|
|
116
119
|
activityAt: string | null; // ISO date string
|
|
117
120
|
|
|
118
|
-
sections?:
|
|
121
|
+
sections?: ReportSectionGQL[];
|
|
119
122
|
rows?: ReportRowGQL[];
|
|
120
123
|
}
|
|
121
124
|
|
|
125
|
+
interface ReportSectionGQL {
|
|
126
|
+
id: string;
|
|
127
|
+
isGroupTitle?: boolean;
|
|
128
|
+
sectionKey: string;
|
|
129
|
+
sectionName: string;
|
|
130
|
+
title: string;
|
|
131
|
+
description: string;
|
|
132
|
+
rows?: ReportRowGQL[];
|
|
133
|
+
requireFileUploads?: boolean;
|
|
134
|
+
files?: StorageGQL[];
|
|
135
|
+
}
|
|
136
|
+
|
|
122
137
|
/**
|
|
123
138
|
* Report submission data
|
|
124
139
|
*/
|
|
@@ -146,6 +161,7 @@ export interface ReportSubmissionGQL {
|
|
|
146
161
|
activityAt: string | null; // ISO date string
|
|
147
162
|
rows: ReportRowGQL[];
|
|
148
163
|
evidences: string[];
|
|
164
|
+
requireFileUploads: boolean;
|
|
149
165
|
}
|
|
150
166
|
|
|
151
167
|
export interface ReportLogRelData {
|
|
@@ -155,6 +171,15 @@ export interface ReportLogRelData {
|
|
|
155
171
|
sectionKey: string;
|
|
156
172
|
}
|
|
157
173
|
|
|
174
|
+
export interface ReportStorageRelData {
|
|
175
|
+
__table: 'report_storage_rels';
|
|
176
|
+
reportSubmissionId: number | bigint;
|
|
177
|
+
storageId: number | bigint;
|
|
178
|
+
sectionKey: string;
|
|
179
|
+
order: number;
|
|
180
|
+
file: StorageData;
|
|
181
|
+
}
|
|
182
|
+
|
|
158
183
|
export interface ReportSubmissionData {
|
|
159
184
|
__table: 'report_submissions';
|
|
160
185
|
id: number;
|
|
@@ -163,6 +188,7 @@ export interface ReportSubmissionData {
|
|
|
163
188
|
period: Date; // YYYY-MM-DD in database, Date object in server via ORM
|
|
164
189
|
answers: Record<string, any>; // key-value pairs of answers
|
|
165
190
|
logRels?: ReportLogRelData[];
|
|
191
|
+
storageRels?: ReportStorageRelData[];
|
|
166
192
|
activityAt: Date;
|
|
167
193
|
}
|
|
168
194
|
|
|
@@ -171,7 +197,7 @@ export interface ReportSubmissionData {
|
|
|
171
197
|
*/
|
|
172
198
|
|
|
173
199
|
export interface ReportAvailabilityGQL {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
200
|
+
id: string;
|
|
201
|
+
type: ReportTypeEnum;
|
|
202
|
+
periods: string[]; // YYYY-MM-DD
|
|
177
203
|
}
|