@antcde/connect-ts 0.4.16 → 0.4.17-rc.0c54737
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 +377 -0
- package/build/AntConnect.d.ts +2 -0
- package/build/AntConnect.d.ts.map +1 -1
- package/build/AntConnect.js +10 -6
- package/build/AntHttpClient.js +24 -49
- package/build/comms/client.d.ts +4 -1
- package/build/comms/client.d.ts.map +1 -1
- package/build/comms/client.js +62 -37
- package/build/comms/host.d.ts +7 -4
- package/build/comms/host.d.ts.map +1 -1
- package/build/comms/host.js +57 -42
- package/build/comms/models.d.ts +1 -0
- package/build/comms/models.d.ts.map +1 -1
- package/build/comms/recordServiceCalls.js +6 -15
- package/build/comms/signal.d.ts +138 -13
- package/build/comms/signal.d.ts.map +1 -1
- package/build/comms/signal.js +12 -11
- package/build/comms/utils.js +6 -15
- package/build/index.d.ts +13 -12
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -2
- package/build/services/AppService.d.ts +59 -10
- package/build/services/AppService.d.ts.map +1 -1
- package/build/services/AppService.js +0 -1
- package/build/services/ColumnService.d.ts +60 -3
- package/build/services/ColumnService.d.ts.map +1 -1
- package/build/services/ColumnService.js +1 -0
- package/build/services/DmsService.d.ts +122 -21
- package/build/services/DmsService.d.ts.map +1 -1
- package/build/services/DmsService.js +60 -16
- package/build/services/LabelService.d.ts +4 -2
- package/build/services/LabelService.d.ts.map +1 -1
- package/build/services/LabelService.js +6 -1
- package/build/services/LicenseService.d.ts +42 -0
- package/build/services/LicenseService.d.ts.map +1 -1
- package/build/services/LicenseService.js +1 -0
- package/build/services/ProjectService.d.ts +20 -1
- package/build/services/ProjectService.d.ts.map +1 -1
- package/build/services/PropagationService.d.ts +15 -4
- package/build/services/PropagationService.d.ts.map +1 -1
- package/build/services/PropagationService.js +2 -2
- package/build/services/RBAC/PermissionService.d.ts +10 -3
- package/build/services/RBAC/PermissionService.d.ts.map +1 -1
- package/build/services/RBAC/PermissionService.js +1 -0
- package/build/services/RecordService.d.ts +94 -3
- package/build/services/RecordService.d.ts.map +1 -1
- package/build/services/RecordService.js +24 -13
- package/build/services/ReleaseService.d.ts +18 -0
- package/build/services/ReleaseService.d.ts.map +1 -0
- package/build/services/ReleaseService.js +5 -0
- package/build/services/SbsService.js +8 -2
- package/build/services/ScriptsService.d.ts.map +1 -1
- package/build/services/ScriptsService.js +4 -3
- package/build/services/TableService.d.ts +58 -20
- package/build/services/TableService.d.ts.map +1 -1
- package/build/services/TableService.js +13 -2
- package/build/services/TaskQueryService.js +1 -1
- package/build/services/TaskService.d.ts +18 -7
- package/build/services/TaskService.d.ts.map +1 -1
- package/build/services/TaskService.js +3 -5
- package/build/services/TaskServiceQueries.d.ts +1 -1
- package/build/services/TaskServiceQueries.js +2 -2
- package/build/services/TokenService.js +5 -15
- package/build/services/UserService.d.ts +0 -2
- package/build/services/UserService.d.ts.map +1 -1
- package/build/services/Websockets/DmsEvents.d.ts +25 -0
- package/build/services/Websockets/DmsEvents.d.ts.map +1 -0
- package/build/services/Websockets/DmsEvents.js +6 -0
- package/build/services/WorkflowService.d.ts +5 -3
- package/build/services/WorkflowService.d.ts.map +1 -1
- package/build/services/WorkflowService.js +21 -20
- package/build/services/WorkflowServiceQueries.js +1 -1
- package/build/types.d.ts +169 -0
- package/build/types.d.ts.map +1 -1
- package/build/types.js +19 -1
- package/package.json +20 -21
- package/schemas/app-config.schema.json +165 -0
- package/build/tsconfig.esm.tsbuildinfo +0 -1
package/build/types.d.ts
CHANGED
|
@@ -71,4 +71,173 @@ export interface PaginatedResponse<T> {
|
|
|
71
71
|
active: boolean;
|
|
72
72
|
}>;
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* License types supported by the system.
|
|
76
|
+
* Must match the 'type' column values in the licenses table.
|
|
77
|
+
*/
|
|
78
|
+
export type LicenseType = 'community' | 'enterprise';
|
|
79
|
+
/**
|
|
80
|
+
* Details about a license limit that has been exceeded.
|
|
81
|
+
*/
|
|
82
|
+
export interface LicenseLimitDetails {
|
|
83
|
+
/** Resource type that hit the limit (e.g., 'project', 'table') */
|
|
84
|
+
resource: string;
|
|
85
|
+
/** Current license type */
|
|
86
|
+
license_type: LicenseType;
|
|
87
|
+
/** Name of the license that hit the limit */
|
|
88
|
+
license_name: string;
|
|
89
|
+
/** Maximum allowed for this license type */
|
|
90
|
+
limit: number;
|
|
91
|
+
/** Current usage count */
|
|
92
|
+
usage: number;
|
|
93
|
+
/** Whether upgrading the license would resolve this limit */
|
|
94
|
+
upgrade_required: boolean;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Error response returned when a license limit is exceeded.
|
|
98
|
+
*
|
|
99
|
+
* HTTP Status: 403 Forbidden
|
|
100
|
+
*
|
|
101
|
+
* This error is returned when attempting to create a resource that would
|
|
102
|
+
* exceed the license's allowed limit (e.g., creating a 4th project on a
|
|
103
|
+
* community license that allows only 3 projects).
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```typescript
|
|
107
|
+
* try {
|
|
108
|
+
* await projectService.createProject(data)
|
|
109
|
+
* } catch (error) {
|
|
110
|
+
* if (isLicenseLimitError(error.response?.data)) {
|
|
111
|
+
* const { limit, usage, license_type } = error.response.data.details
|
|
112
|
+
* showUpgradeDialog({ limit, usage, licenseType: license_type })
|
|
113
|
+
* }
|
|
114
|
+
* }
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
export interface LicenseLimitExceededError {
|
|
118
|
+
/** Error code identifying this as a license limit error */
|
|
119
|
+
error: 'LICENSE_LIMIT_EXCEEDED';
|
|
120
|
+
/** Human-readable error message */
|
|
121
|
+
message: string;
|
|
122
|
+
/** Detailed information about the limit */
|
|
123
|
+
details: LicenseLimitDetails;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Type guard to check if an error response is a license limit exceeded error.
|
|
127
|
+
*
|
|
128
|
+
* @param error - The error response data to check
|
|
129
|
+
* @returns True if the error is a LicenseLimitExceededError
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```typescript
|
|
133
|
+
* if (isLicenseLimitError(error.response?.data)) {
|
|
134
|
+
* // Handle license limit exceeded
|
|
135
|
+
* }
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
export declare function isLicenseLimitError(error: unknown): error is LicenseLimitExceededError;
|
|
139
|
+
/**
|
|
140
|
+
* Resource types that can have limits.
|
|
141
|
+
*/
|
|
142
|
+
export type LimitResourceType = 'records' | 'total_records' | 'tables' | 'projects' | 'users' | 'rbac_roles' | 'dms_storage_mb' | 'sbs_records' | 'triggers';
|
|
143
|
+
/**
|
|
144
|
+
* Scope at which a limit applies.
|
|
145
|
+
*/
|
|
146
|
+
export type LimitScope = 'table' | 'project' | 'license';
|
|
147
|
+
/**
|
|
148
|
+
* Current state of a resource limit.
|
|
149
|
+
*
|
|
150
|
+
* Units depend on the resource type:
|
|
151
|
+
* - Most resources: count (number of items)
|
|
152
|
+
* - `dms_storage_mb`: megabytes (MB)
|
|
153
|
+
*/
|
|
154
|
+
export interface ResourceLimitInfo {
|
|
155
|
+
/** Maximum allowed (null = unlimited) */
|
|
156
|
+
limit: number | null;
|
|
157
|
+
/** Current usage (count or MB depending on resource type) */
|
|
158
|
+
usage: number;
|
|
159
|
+
/** Remaining capacity (null = unlimited) */
|
|
160
|
+
remaining: number | null;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* WebSocket event for real-time resource limit changes.
|
|
164
|
+
*
|
|
165
|
+
* Notifies the frontend when resource limits change (e.g., record created/deleted).
|
|
166
|
+
* Enables real-time UI updates without page refreshes.
|
|
167
|
+
*
|
|
168
|
+
* Channels:
|
|
169
|
+
* - App.License.{licenseId}.Limits
|
|
170
|
+
* - App.Project.{projectId}.Limits
|
|
171
|
+
* - App.Table.{tableId}.Limits
|
|
172
|
+
*
|
|
173
|
+
* Event: limit.change
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```typescript
|
|
177
|
+
* // Listen for limit changes
|
|
178
|
+
* signal.receive((s) => {
|
|
179
|
+
* if (s.limitChange) {
|
|
180
|
+
* const { resource_type, resource_id, limits } = s.limitChange
|
|
181
|
+
* if (resource_type === 'records' && resource_id === currentTableId) {
|
|
182
|
+
* updateTableLimits('records', limits)
|
|
183
|
+
* }
|
|
184
|
+
* }
|
|
185
|
+
* })
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
export interface LimitChangeEvent {
|
|
189
|
+
/** Type of resource limit that changed */
|
|
190
|
+
resource_type: LimitResourceType;
|
|
191
|
+
/** ID of the resource whose limit changed (table_id, project_id, license_id) */
|
|
192
|
+
resource_id: string;
|
|
193
|
+
/** Level at which this limit applies */
|
|
194
|
+
scope: LimitScope;
|
|
195
|
+
/** ID of the scope container (table_id, project_id, or license_id) */
|
|
196
|
+
scope_id: string;
|
|
197
|
+
/** Updated limit values */
|
|
198
|
+
limits: ResourceLimitInfo;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Status of a long-running job.
|
|
202
|
+
*/
|
|
203
|
+
export type JobProgressStatus = 'started' | 'progress' | 'completed' | 'failed' | 'canceled';
|
|
204
|
+
/**
|
|
205
|
+
* Generic WebSocket event for long-running job progress updates.
|
|
206
|
+
*
|
|
207
|
+
* Used for any async operation that needs to report progress:
|
|
208
|
+
* - Table record imports
|
|
209
|
+
* - DHME element/object generation
|
|
210
|
+
* - Data exports
|
|
211
|
+
* - Validation jobs
|
|
212
|
+
* - etc.
|
|
213
|
+
*
|
|
214
|
+
* Channel: private-App.User.{userId}
|
|
215
|
+
* Event: job.progress
|
|
216
|
+
*/
|
|
217
|
+
export interface JobProgressEvent<TSummary = Record<string, unknown>> {
|
|
218
|
+
/** Unique identifier for this job instance */
|
|
219
|
+
job_id: string;
|
|
220
|
+
/** Type of job: 'import', 'generation', 'export', 'validation', etc. */
|
|
221
|
+
job_type: string;
|
|
222
|
+
/** Type of resource being processed: 'records', 'modules', 'elements', etc. */
|
|
223
|
+
resource_type: string;
|
|
224
|
+
/** ID of the resource (table_id, project_id, etc.) */
|
|
225
|
+
resource_id: string | null;
|
|
226
|
+
/** Current job status */
|
|
227
|
+
status: JobProgressStatus;
|
|
228
|
+
/** Optional phase within the job (e.g., 'modules', 'elements', 'objects') */
|
|
229
|
+
phase: string | null;
|
|
230
|
+
/** Number of items processed so far */
|
|
231
|
+
processed: number;
|
|
232
|
+
/** Total number of items to process */
|
|
233
|
+
total: number;
|
|
234
|
+
/** App/feature name for notification context (e.g., 'Manual Import', 'Tables') */
|
|
235
|
+
source?: string;
|
|
236
|
+
/** Optional status message */
|
|
237
|
+
message?: string;
|
|
238
|
+
/** Error message (when status is 'failed') */
|
|
239
|
+
error?: string;
|
|
240
|
+
/** Summary data (typically on completion) */
|
|
241
|
+
summary?: TSummary;
|
|
242
|
+
}
|
|
74
243
|
//# sourceMappingURL=types.d.ts.map
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,QAAQ,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAA;CACR;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;OAEG;IACH,IAAI,EAAE,CAAC,EAAE,CAAA;IAET;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,IAAI,EA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8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6CAA6C;IAC7C,OAAO,CAAC,EAAE,QAAQ,CAAA;CACnB"}
|
package/build/types.js
CHANGED
|
@@ -1 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Type guard to check if an error response is a license limit exceeded error.
|
|
3
|
+
*
|
|
4
|
+
* @param error - The error response data to check
|
|
5
|
+
* @returns True if the error is a LicenseLimitExceededError
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* if (isLicenseLimitError(error.response?.data)) {
|
|
10
|
+
* // Handle license limit exceeded
|
|
11
|
+
* }
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export function isLicenseLimitError(error) {
|
|
15
|
+
return (typeof error === 'object'
|
|
16
|
+
&& error !== null
|
|
17
|
+
&& 'error' in error
|
|
18
|
+
&& error.error === 'LICENSE_LIMIT_EXCEEDED');
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antcde/connect-ts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.17-rc.0c54737",
|
|
4
4
|
"description": "Helper to connect to the ANT api",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"types": "build/index.d.ts",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tspc -b ./tsconfig.esm.json",
|
|
10
|
+
"build:watch": "tspc -b ./tsconfig.esm.json --watch",
|
|
11
|
+
"build:clean": "rm -rf ./build && tspc -b ./tsconfig.esm.json",
|
|
12
|
+
"build:all": "tspc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",
|
|
13
|
+
"build:all:clean": "rm -rf ./build && tspc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",
|
|
14
|
+
"test": "vitest"
|
|
10
15
|
},
|
|
11
16
|
"files": [
|
|
12
17
|
"/build",
|
|
18
|
+
"/schemas",
|
|
13
19
|
"README.md",
|
|
14
20
|
"package.json"
|
|
15
21
|
],
|
|
@@ -26,27 +32,20 @@
|
|
|
26
32
|
}
|
|
27
33
|
},
|
|
28
34
|
"dependencies": {
|
|
29
|
-
"axios": "^1.
|
|
35
|
+
"axios": "^1.15.2",
|
|
30
36
|
"post-robot": "10.0.46",
|
|
31
|
-
"qs": "^6.
|
|
32
|
-
"rxjs": "^7.8.
|
|
37
|
+
"qs": "^6.15.1",
|
|
38
|
+
"rxjs": "^7.8.2"
|
|
33
39
|
},
|
|
34
40
|
"devDependencies": {
|
|
35
41
|
"@faker-js/faker": "^9.9.0",
|
|
36
|
-
"@types/node": "^22.
|
|
42
|
+
"@types/node": "^22.19.17",
|
|
37
43
|
"@types/post-robot": "^10.0.6",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"typescript
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "tspc -b ./tsconfig.esm.json",
|
|
46
|
-
"build:watch": "tspc -b ./tsconfig.esm.json --watch",
|
|
47
|
-
"build:clean": "rm -rf ./build && tspc -b ./tsconfig.esm.json",
|
|
48
|
-
"build:all": "tspc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",
|
|
49
|
-
"build:all:clean": "rm -rf ./build && tspc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",
|
|
50
|
-
"test": "vitest"
|
|
44
|
+
"@types/qs": "^6.15.0",
|
|
45
|
+
"happy-dom": "^20.9.0",
|
|
46
|
+
"ts-patch": "^3.3.0",
|
|
47
|
+
"typescript": "~6.0.3",
|
|
48
|
+
"typescript-transform-paths": "^3.5.6",
|
|
49
|
+
"vitest": "^4.1.5"
|
|
51
50
|
}
|
|
52
|
-
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://antcde.io/schemas/app-config.schema.json",
|
|
4
|
+
"title": "ANT App Manifest",
|
|
5
|
+
"description": "Shape of app-config.json shipped inside an ANT app's distribution. Read by ant-os and the App Store to discover what an app declares about itself.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Reference to this schema for editor validation."
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "App version (semver)."
|
|
16
|
+
},
|
|
17
|
+
"tagline": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Short description surfaced in the App Store."
|
|
20
|
+
},
|
|
21
|
+
"tables": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"description": "Tables the app ships with. Created in the project when the app is installed.",
|
|
24
|
+
"items": { "$ref": "#/$defs/tableEntry" }
|
|
25
|
+
},
|
|
26
|
+
"signals": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"description": "Declares the comms signals this app sends and receives.",
|
|
29
|
+
"properties": {
|
|
30
|
+
"topics": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"description": "Generic topic pub/sub capabilities keyed by topic name.",
|
|
33
|
+
"patternProperties": {
|
|
34
|
+
"^[A-Za-z0-9_-]+$": { "$ref": "#/$defs/topicEntry" }
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": false
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"$defs": {
|
|
42
|
+
"tableEntry": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"description": "A table the app declares. Columns are created when the app is added to a project.",
|
|
45
|
+
"required": ["name", "columns"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"name": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "Table name. Must be unique within the app."
|
|
50
|
+
},
|
|
51
|
+
"master_table": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"default": false,
|
|
54
|
+
"description": "Whether this is the app's primary table."
|
|
55
|
+
},
|
|
56
|
+
"columns": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"description": "Column definitions for the table.",
|
|
59
|
+
"items": { "$ref": "#/$defs/columnEntry" },
|
|
60
|
+
"minItems": 1
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"additionalProperties": false
|
|
64
|
+
},
|
|
65
|
+
"columnEntry": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"description": "A column within a table.",
|
|
68
|
+
"required": ["name", "type"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"name": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "Column name. Reserved names: id, session, created_at, updated_at, deleted_at."
|
|
73
|
+
},
|
|
74
|
+
"type": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": [
|
|
77
|
+
"integer",
|
|
78
|
+
"text",
|
|
79
|
+
"text-field",
|
|
80
|
+
"boolean",
|
|
81
|
+
"date",
|
|
82
|
+
"link",
|
|
83
|
+
"email",
|
|
84
|
+
"dropdown",
|
|
85
|
+
"document",
|
|
86
|
+
"float",
|
|
87
|
+
"sbscode",
|
|
88
|
+
"table"
|
|
89
|
+
],
|
|
90
|
+
"description": "Column data type."
|
|
91
|
+
},
|
|
92
|
+
"required": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"default": false,
|
|
95
|
+
"description": "Whether the column is required."
|
|
96
|
+
},
|
|
97
|
+
"is_unique": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"default": false,
|
|
100
|
+
"description": "Whether values must be unique."
|
|
101
|
+
},
|
|
102
|
+
"is_indexed": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"default": false,
|
|
105
|
+
"description": "Whether the column is indexed. Max 2 indexed columns per table. Not allowed for text-field or link types."
|
|
106
|
+
},
|
|
107
|
+
"default_value": {
|
|
108
|
+
"description": "Default value for new records. For dropdowns, must be one of options_value."
|
|
109
|
+
},
|
|
110
|
+
"options_value": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": { "type": "string" },
|
|
113
|
+
"description": "Allowed values for dropdown columns."
|
|
114
|
+
},
|
|
115
|
+
"hint": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "User-facing hint or help text."
|
|
118
|
+
},
|
|
119
|
+
"field_name": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"description": "Display name for the column in the UI."
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"additionalProperties": false,
|
|
125
|
+
"if": {
|
|
126
|
+
"properties": { "type": { "const": "dropdown" } }
|
|
127
|
+
},
|
|
128
|
+
"then": {
|
|
129
|
+
"required": ["options_value"]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"topicEntry": {
|
|
133
|
+
"type": "object",
|
|
134
|
+
"description": "A single topic this app declares.",
|
|
135
|
+
"properties": {
|
|
136
|
+
"scope": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"enum": ["project", "license"],
|
|
139
|
+
"default": "project",
|
|
140
|
+
"description": "Echo channel scope. Defaults to 'project'."
|
|
141
|
+
},
|
|
142
|
+
"description": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "Human-readable description for the App Store."
|
|
145
|
+
},
|
|
146
|
+
"direction": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"items": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"enum": ["send", "receive"]
|
|
151
|
+
},
|
|
152
|
+
"uniqueItems": true,
|
|
153
|
+
"minItems": 1,
|
|
154
|
+
"default": ["receive"],
|
|
155
|
+
"description": "Directions the app participates in. Defaults to ['receive'] if omitted."
|
|
156
|
+
},
|
|
157
|
+
"schema": {
|
|
158
|
+
"$ref": "https://json-schema.org/draft/2020-12/schema",
|
|
159
|
+
"description": "JSON Schema describing the topic payload shape."
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"additionalProperties": false
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["../src/AntConnect.ts","../src/AntHttpClient.ts","../src/index.ts","../src/types.ts","../src/comms/client.ts","../src/comms/host.ts","../src/comms/models.ts","../src/comms/recordServiceCalls.ts","../src/comms/signal.ts","../src/comms/utils.ts","../src/services/AppService.ts","../src/services/ClientService.ts","../src/services/ColumnService.ts","../src/services/DmsService.ts","../src/services/DownloadService.ts","../src/services/LabelService.ts","../src/services/LaravelQueueService.ts","../src/services/LicenseService.ts","../src/services/ProjectService.ts","../src/services/PropagationService.ts","../src/services/RecordLockService.ts","../src/services/RecordService.ts","../src/services/ResellerService.ts","../src/services/RevisionService.ts","../src/services/SbsService.ts","../src/services/ScriptsService.ts","../src/services/TableQueryService.ts","../src/services/TableService.ts","../src/services/TaskQueryService.ts","../src/services/TaskService.ts","../src/services/TaskServiceQueries.ts","../src/services/TokenService.ts","../src/services/UserService.ts","../src/services/WorkflowService.ts","../src/services/WorkflowServiceQueries.ts","../src/services/Notifications/NotificationService.ts","../src/services/Project/ProjectUserService.ts","../src/services/RBAC/PermissionService.ts","../src/services/RBAC/RoleService.ts","../src/services/Table/ColumnRelationService.ts","../src/services/Webhook/ConfigService.ts","../src/services/Webhook/EventService.ts","../src/services/Webhook/TriggerHistoryService.ts","../src/services/Webhook/TriggerService.ts"],"version":"5.9.3"}
|