@antcde/connect-ts 0.4.38 → 0.4.39-rc.1
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/build/AntConnect.d.ts +4 -1
- package/build/AntConnect.d.ts.map +1 -1
- package/build/AntConnect.js +4 -15
- package/build/comms/models.d.ts +7 -0
- package/build/comms/models.d.ts.map +1 -1
- package/build/comms/signalTypes.d.ts +5 -0
- package/build/comms/signalTypes.d.ts.map +1 -1
- package/build/index.d.ts +7 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- package/build/service-types-app.d.ts +1 -1
- package/build/service-types-app.d.ts.map +1 -1
- package/build/service-types.d.ts +6 -4
- package/build/service-types.d.ts.map +1 -1
- package/build/services/AppService/factory/resourceAccess.d.ts +1 -1
- package/build/services/AppService/factory/resourceAccess.d.ts.map +1 -1
- package/build/services/AppService/factory/resourceAccess.js +2 -0
- package/build/services/AppService/index.d.ts.map +1 -1
- package/build/services/AppService/types/accessRequests.d.ts +3 -1
- package/build/services/AppService/types/accessRequests.d.ts.map +1 -1
- package/build/services/AppService/types/app.d.ts +3 -0
- package/build/services/AppService/types/app.d.ts.map +1 -1
- package/build/services/AppService/types/appDevices.d.ts +3 -0
- package/build/services/AppService/types/appDevices.d.ts.map +1 -0
- package/build/services/AppService/types/appDevices.js +1 -0
- package/build/services/AppService/types/appList.d.ts +3 -0
- package/build/services/AppService/types/appList.d.ts.map +1 -1
- package/build/services/AppService/types/appRequests.d.ts +3 -0
- package/build/services/AppService/types/appRequests.d.ts.map +1 -1
- package/build/services/AppService/types/appScopes.d.ts +2 -2
- package/build/services/AppService/types/appScopes.d.ts.map +1 -1
- package/build/services/AppService/types/resourceEntitlements.d.ts +6 -0
- package/build/services/AppService/types/resourceEntitlements.d.ts.map +1 -1
- package/build/services/AppService/types.d.ts +1 -0
- package/build/services/AppService/types.d.ts.map +1 -1
- package/build/services/AppService/types.js +1 -0
- package/build/services/BroadcastingService.d.ts +11 -0
- package/build/services/BroadcastingService.d.ts.map +1 -0
- package/build/services/BroadcastingService.js +7 -0
- package/build/services/DeviceService.d.ts +96 -0
- package/build/services/DeviceService.d.ts.map +1 -0
- package/build/services/DeviceService.js +35 -0
- package/build/services/LicenseCompanyPeople.types.d.ts +34 -0
- package/build/services/LicenseCompanyPeople.types.d.ts.map +1 -0
- package/build/services/LicenseCompanyPeople.types.js +3 -0
- package/build/services/LicenseMemberErrors.types.d.ts +42 -0
- package/build/services/LicenseMemberErrors.types.d.ts.map +1 -0
- package/build/services/LicenseMemberErrors.types.js +27 -0
- package/build/services/LicenseService.d.ts +61 -9
- package/build/services/LicenseService.d.ts.map +1 -1
- package/build/services/LicenseService.js +12 -2
- package/build/services/LicenseService.types.d.ts +139 -0
- package/build/services/LicenseService.types.d.ts.map +1 -0
- package/build/services/LicenseService.types.js +15 -0
- package/build/services/Notifications/NotificationService.d.ts +7 -2
- package/build/services/Notifications/NotificationService.d.ts.map +1 -1
- package/build/services/Project/ProjectUserService.d.ts +0 -5
- package/build/services/Project/ProjectUserService.d.ts.map +1 -1
- package/build/services/Project/ProjectUserService.js +0 -1
- package/build/services/ProjectService.d.ts +18 -0
- package/build/services/ProjectService.d.ts.map +1 -1
- package/build/services/ProjectService.js +1 -0
- package/build/services/PropagationService.d.ts +5 -1
- package/build/services/PropagationService.d.ts.map +1 -1
- package/build/services/RBAC/PermissionService.d.ts +2 -2
- package/build/services/RBAC/PermissionService.d.ts.map +1 -1
- package/build/services/RBAC/PermissionService.js +1 -1
- package/build/services/RBAC/RoleService.d.ts +2 -1
- package/build/services/RBAC/RoleService.d.ts.map +1 -1
- package/build/services/RBAC/RoleService.js +0 -1
- package/build/services/ResellerService.d.ts +17 -3
- package/build/services/ResellerService.d.ts.map +1 -1
- package/build/services/ResellerService.js +8 -0
- package/build/services/ResellerService.types.d.ts +112 -0
- package/build/services/ResellerService.types.d.ts.map +1 -0
- package/build/services/ResellerService.types.js +22 -0
- package/build/services/ScriptsService.d.ts +3 -9
- package/build/services/ScriptsService.d.ts.map +1 -1
- package/build/services/TableService.types.d.ts +18 -1
- package/build/services/TableService.types.d.ts.map +1 -1
- package/build/services/TokenService.d.ts +8 -2
- package/build/services/TokenService.d.ts.map +1 -1
- package/build/services/TokenService.js +1 -1
- package/build/services/Trigger/TriggerDatasetResponses.types.d.ts +12 -6
- package/build/services/Trigger/TriggerDatasetResponses.types.d.ts.map +1 -1
- package/build/services/Trigger/TriggerDatasetResponses.types.js +3 -0
- package/build/services/Trigger/TriggerHistoryService.d.ts +19 -19
- package/build/services/Trigger/TriggerHistoryService.d.ts.map +1 -1
- package/build/services/Trigger/TriggerLastRun.types.d.ts +10 -14
- package/build/services/Trigger/TriggerLastRun.types.d.ts.map +1 -1
- package/build/services/Trigger/TriggerRefusalDetail.types.d.ts +12 -6
- package/build/services/Trigger/TriggerRefusalDetail.types.d.ts.map +1 -1
- package/build/services/UserService.d.ts +17 -9
- package/build/services/UserService.d.ts.map +1 -1
- package/build/types.d.ts +1 -126
- package/build/types.d.ts.map +1 -1
- package/build/types.js +2 -19
- package/package.json +3 -3
package/build/types.d.ts
CHANGED
|
@@ -71,132 +71,7 @@ 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
|
-
}
|
|
74
|
+
export * from './services/LicenseService.types';
|
|
200
75
|
/**
|
|
201
76
|
* Status of a long-running job.
|
|
202
77
|
*/
|
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,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,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AAM,GAAG,IAAI,CAAA;IAE5B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;QACX,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;QAClB,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,OAAO,CAAA;KAChB,CAAC,CAAA;CACH;AAGD,cAAc,iCAAiC,CAAA;AAM/C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE5F;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,gBAAgB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClE,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAA;IACd,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAA;IAChB,+EAA+E;IAC/E,aAAa,EAAE,MAAM,CAAA;IACrB,sDAAsD;IACtD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,yBAAyB;IACzB,MAAM,EAAE,iBAAiB,CAAA;IACzB,6EAA6E;IAC7E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6CAA6C;IAC7C,OAAO,CAAC,EAAE,QAAQ,CAAA;CACnB"}
|
package/build/types.js
CHANGED
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
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
|
-
}
|
|
1
|
+
// License plans, limits and the limit-exceeded error live with the license service.
|
|
2
|
+
export * from './services/LicenseService.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antcde/connect-ts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.39-rc.1",
|
|
4
4
|
"description": "Helper to connect to the ANT api",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"axios": "^1.20.0",
|
|
40
40
|
"comlink": "^4.4.2",
|
|
41
41
|
"post-robot": "10.0.46",
|
|
42
|
-
"qs": "^6.16.
|
|
42
|
+
"qs": "^6.16.1",
|
|
43
43
|
"rxjs": "^7.8.2",
|
|
44
44
|
"zod": "^4.6.7"
|
|
45
45
|
},
|
|
@@ -52,6 +52,6 @@
|
|
|
52
52
|
"ts-patch": "^4.0.1",
|
|
53
53
|
"typescript": "~6.0.3",
|
|
54
54
|
"typescript-transform-paths": "^4.0.0",
|
|
55
|
-
"vitest": "^5.0.
|
|
55
|
+
"vitest": "^5.0.5"
|
|
56
56
|
}
|
|
57
57
|
}
|