@antcde/connect-ts 0.4.16 → 0.4.17-rc.0c67d53

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.
Files changed (68) hide show
  1. package/README.md +377 -0
  2. package/build/AntConnect.d.ts +2 -0
  3. package/build/AntConnect.d.ts.map +1 -1
  4. package/build/AntConnect.js +2 -0
  5. package/build/comms/client.d.ts +4 -1
  6. package/build/comms/client.d.ts.map +1 -1
  7. package/build/comms/client.js +59 -21
  8. package/build/comms/host.d.ts +7 -4
  9. package/build/comms/host.d.ts.map +1 -1
  10. package/build/comms/host.js +47 -22
  11. package/build/comms/models.d.ts +1 -0
  12. package/build/comms/models.d.ts.map +1 -1
  13. package/build/comms/signal.d.ts +138 -13
  14. package/build/comms/signal.d.ts.map +1 -1
  15. package/build/comms/signal.js +12 -10
  16. package/build/index.d.ts +13 -12
  17. package/build/index.d.ts.map +1 -1
  18. package/build/index.js +2 -2
  19. package/build/services/AppService.d.ts +59 -10
  20. package/build/services/AppService.d.ts.map +1 -1
  21. package/build/services/AppService.js +0 -1
  22. package/build/services/ColumnService.d.ts +60 -3
  23. package/build/services/ColumnService.d.ts.map +1 -1
  24. package/build/services/ColumnService.js +1 -0
  25. package/build/services/DmsService.d.ts +122 -21
  26. package/build/services/DmsService.d.ts.map +1 -1
  27. package/build/services/DmsService.js +60 -16
  28. package/build/services/LabelService.d.ts +4 -2
  29. package/build/services/LabelService.d.ts.map +1 -1
  30. package/build/services/LabelService.js +1 -1
  31. package/build/services/LicenseService.d.ts +42 -0
  32. package/build/services/LicenseService.d.ts.map +1 -1
  33. package/build/services/LicenseService.js +1 -0
  34. package/build/services/ProjectService.d.ts +20 -1
  35. package/build/services/ProjectService.d.ts.map +1 -1
  36. package/build/services/PropagationService.d.ts +15 -4
  37. package/build/services/PropagationService.d.ts.map +1 -1
  38. package/build/services/PropagationService.js +2 -2
  39. package/build/services/RBAC/PermissionService.d.ts +10 -3
  40. package/build/services/RBAC/PermissionService.d.ts.map +1 -1
  41. package/build/services/RBAC/PermissionService.js +1 -0
  42. package/build/services/RecordService.d.ts +94 -3
  43. package/build/services/RecordService.d.ts.map +1 -1
  44. package/build/services/RecordService.js +17 -10
  45. package/build/services/ReleaseService.d.ts +18 -0
  46. package/build/services/ReleaseService.d.ts.map +1 -0
  47. package/build/services/ReleaseService.js +5 -0
  48. package/build/services/TableService.d.ts +58 -20
  49. package/build/services/TableService.d.ts.map +1 -1
  50. package/build/services/TableService.js +3 -0
  51. package/build/services/TaskService.d.ts +14 -3
  52. package/build/services/TaskService.d.ts.map +1 -1
  53. package/build/services/TaskService.js +1 -3
  54. package/build/services/TaskServiceQueries.d.ts +2 -2
  55. package/build/services/TaskServiceQueries.d.ts.map +1 -1
  56. package/build/services/TaskServiceQueries.js +2 -2
  57. package/build/services/UserService.d.ts +0 -2
  58. package/build/services/UserService.d.ts.map +1 -1
  59. package/build/services/Websockets/DmsEvents.d.ts +25 -0
  60. package/build/services/Websockets/DmsEvents.d.ts.map +1 -0
  61. package/build/services/Websockets/DmsEvents.js +6 -0
  62. package/build/services/WorkflowServiceQueries.js +1 -1
  63. package/build/tsconfig.esm.tsbuildinfo +1 -1
  64. package/build/types.d.ts +169 -0
  65. package/build/types.d.ts.map +1 -1
  66. package/build/types.js +19 -1
  67. package/package.json +18 -20
  68. package/schemas/app-config.schema.json +165 -0
package/build/types.js CHANGED
@@ -1 +1,19 @@
1
- export {};
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.16",
3
+ "version": "0.4.17-rc.0c67d53",
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
- "publishConfig": {
9
- "registry": "https://npm.antcde.io"
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,19 @@
26
32
  }
27
33
  },
28
34
  "dependencies": {
29
- "axios": "^1.7.9",
35
+ "axios": "^1.15.0",
30
36
  "post-robot": "10.0.46",
31
- "qs": "^6.13.1",
32
- "rxjs": "^7.8.1"
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.9.3",
42
+ "@types/node": "^22.19.17",
37
43
  "@types/post-robot": "^10.0.6",
38
- "happy-dom": "^15.11.7",
39
- "ts-patch": "^3.0.2",
44
+ "happy-dom": "^20.9.0",
45
+ "ts-patch": "^3.3.0",
40
46
  "typescript": "~5.9.3",
41
- "typescript-transform-paths": "^3.5.2",
42
- "vitest": "^4.0.6"
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"
47
+ "typescript-transform-paths": "^3.5.6",
48
+ "vitest": "^4.1.4"
51
49
  }
52
- }
50
+ }
@@ -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
+ }