@researchdatabox/sails-hook-redbox-servicenow-catalog 0.0.14 → 1.0.0-beta.45

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 (162) hide show
  1. package/README.md +290 -74
  2. package/dist/api/configmodels/ServiceNowCatalogAppConfig.d.ts +1045 -0
  3. package/dist/api/configmodels/ServiceNowCatalogAppConfig.d.ts.map +1 -0
  4. package/dist/api/configmodels/ServiceNowCatalogAppConfig.js +269 -0
  5. package/dist/api/controllers/CatalogController.d.ts +24 -0
  6. package/dist/api/controllers/CatalogController.d.ts.map +1 -0
  7. package/dist/api/controllers/CatalogController.js +206 -0
  8. package/dist/api/controllers/index.d.ts +8 -0
  9. package/dist/api/controllers/index.d.ts.map +1 -0
  10. package/dist/api/controllers/index.js +16 -0
  11. package/dist/api/models/ServicenowCatalogIdempotency.d.ts +18 -0
  12. package/dist/api/models/ServicenowCatalogIdempotency.d.ts.map +1 -0
  13. package/dist/api/models/ServicenowCatalogIdempotency.js +76 -0
  14. package/dist/api/models/index.d.ts +5 -0
  15. package/dist/api/models/index.d.ts.map +1 -0
  16. package/dist/api/models/index.js +23 -0
  17. package/dist/api/services/ServicenowCatalogService.d.ts +60 -0
  18. package/dist/api/services/ServicenowCatalogService.d.ts.map +1 -0
  19. package/dist/api/services/ServicenowCatalogService.js +848 -0
  20. package/dist/api/services/index.d.ts +8 -0
  21. package/dist/api/services/index.d.ts.map +1 -0
  22. package/dist/api/services/index.js +16 -0
  23. package/dist/api/services/servicenow/audit.d.ts +91 -0
  24. package/dist/api/services/servicenow/audit.d.ts.map +1 -0
  25. package/dist/api/services/servicenow/audit.js +230 -0
  26. package/dist/api/services/servicenow/configuration.d.ts +26 -0
  27. package/dist/api/services/servicenow/configuration.d.ts.map +1 -0
  28. package/dist/api/services/servicenow/configuration.js +105 -0
  29. package/dist/api/services/servicenow/context.d.ts +29 -0
  30. package/dist/api/services/servicenow/context.d.ts.map +1 -0
  31. package/dist/api/services/servicenow/context.js +7 -0
  32. package/dist/api/services/servicenow/errors.d.ts +133 -0
  33. package/dist/api/services/servicenow/errors.d.ts.map +1 -0
  34. package/dist/api/services/servicenow/errors.js +204 -0
  35. package/dist/api/services/servicenow/http.d.ts +16 -0
  36. package/dist/api/services/servicenow/http.d.ts.map +1 -0
  37. package/dist/api/services/servicenow/http.js +168 -0
  38. package/dist/api/services/servicenow/idempotency.d.ts +29 -0
  39. package/dist/api/services/servicenow/idempotency.d.ts.map +1 -0
  40. package/dist/api/services/servicenow/idempotency.js +119 -0
  41. package/dist/api/services/servicenow/mapping.d.ts +27 -0
  42. package/dist/api/services/servicenow/mapping.d.ts.map +1 -0
  43. package/dist/api/services/servicenow/mapping.js +145 -0
  44. package/dist/api/services/servicenow/normalizeResponse.d.ts +4 -0
  45. package/dist/api/services/servicenow/normalizeResponse.d.ts.map +1 -0
  46. package/dist/api/services/servicenow/normalizeResponse.js +16 -0
  47. package/dist/api/services/servicenow/runtime.d.ts +8 -0
  48. package/dist/api/services/servicenow/runtime.d.ts.map +1 -0
  49. package/dist/api/services/servicenow/runtime.js +44 -0
  50. package/dist/config/auth.d.ts +3 -0
  51. package/dist/config/auth.d.ts.map +1 -0
  52. package/dist/config/auth.js +13 -0
  53. package/dist/config/servicenow.d.ts +7 -0
  54. package/dist/config/servicenow.d.ts.map +1 -0
  55. package/dist/config/servicenow.js +10 -0
  56. package/dist/index.d.ts +3 -0
  57. package/dist/index.d.ts.map +1 -0
  58. package/dist/index.js +111 -0
  59. package/language-defaults/.gitkeep +1 -0
  60. package/{locales → language-defaults}/en/translation.json +8 -3
  61. package/package.json +39 -41
  62. package/.circleci/config.yml +0 -33
  63. package/.editorconfig +0 -13
  64. package/.nvmrc +0 -1
  65. package/angular/catalog/.angular-cli.json +0 -60
  66. package/angular/catalog/.editorconfig +0 -13
  67. package/angular/catalog/README.md +0 -27
  68. package/angular/catalog/buildAngularProd.sh +0 -3
  69. package/angular/catalog/dist/3rdpartylicenses.txt +0 -2215
  70. package/angular/catalog/dist/assets/images/aws_ec2.png +0 -0
  71. package/angular/catalog/dist/assets/images/catalog.png +0 -0
  72. package/angular/catalog/dist/assets/images/cloudstor.png +0 -0
  73. package/angular/catalog/dist/assets/images/limesurvey.png +0 -0
  74. package/angular/catalog/dist/assets/images/omeka.png +0 -0
  75. package/angular/catalog/dist/assets/images/qualtrics.png +0 -0
  76. package/angular/catalog/dist/assets/images/storage.png +0 -0
  77. package/angular/catalog/dist/assets/images/uts_hpcc.png +0 -0
  78. package/angular/catalog/dist/assets/images/uts_hpcs.png +0 -0
  79. package/angular/catalog/dist/assets/images/uts_ihpc.png +0 -0
  80. package/angular/catalog/dist/favicon.ico +0 -0
  81. package/angular/catalog/dist/index.html +0 -1
  82. package/angular/catalog/dist/inline.bundle.js +0 -1
  83. package/angular/catalog/dist/main.bundle.js +0 -1
  84. package/angular/catalog/dist/polyfills.bundle.js +0 -1
  85. package/angular/catalog/dist/styles.bundle.css +0 -0
  86. package/angular/catalog/e2e/app.e2e-spec.ts +0 -14
  87. package/angular/catalog/e2e/app.po.ts +0 -11
  88. package/angular/catalog/e2e/tsconfig.e2e.json +0 -14
  89. package/angular/catalog/karma.conf.js +0 -33
  90. package/angular/catalog/package-lock.json +0 -11967
  91. package/angular/catalog/package.json +0 -71
  92. package/angular/catalog/protractor.conf.js +0 -28
  93. package/angular/catalog/src/app/catalog-form.component.css +0 -6
  94. package/angular/catalog/src/app/catalog-form.component.spec.ts +0 -27
  95. package/angular/catalog/src/app/catalog-form.component.ts +0 -201
  96. package/angular/catalog/src/app/catalog-form.html +0 -24
  97. package/angular/catalog/src/app/catalog.module.ts +0 -30
  98. package/angular/catalog/src/app/catalog.service.ts +0 -97
  99. package/angular/catalog/src/app/components/catalog-display.component.ts +0 -212
  100. package/angular/catalog/src/app/components/request-box.component.ts +0 -489
  101. package/angular/catalog/src/assets/.gitkeep +0 -0
  102. package/angular/catalog/src/assets/images/aws_ec2.png +0 -0
  103. package/angular/catalog/src/assets/images/catalog.png +0 -0
  104. package/angular/catalog/src/assets/images/cloudstor.png +0 -0
  105. package/angular/catalog/src/assets/images/limesurvey.png +0 -0
  106. package/angular/catalog/src/assets/images/omeka.png +0 -0
  107. package/angular/catalog/src/assets/images/qualtrics.png +0 -0
  108. package/angular/catalog/src/assets/images/storage.png +0 -0
  109. package/angular/catalog/src/assets/images/uts_hpcc.png +0 -0
  110. package/angular/catalog/src/assets/images/uts_hpcs.png +0 -0
  111. package/angular/catalog/src/assets/images/uts_ihpc.png +0 -0
  112. package/angular/catalog/src/environments/environment.prod.ts +0 -3
  113. package/angular/catalog/src/environments/environment.ts +0 -8
  114. package/angular/catalog/src/favicon.ico +0 -0
  115. package/angular/catalog/src/index.html +0 -14
  116. package/angular/catalog/src/main.ts +0 -12
  117. package/angular/catalog/src/polyfills.ts +0 -79
  118. package/angular/catalog/src/styles.css +0 -1
  119. package/angular/catalog/src/test.ts +0 -20
  120. package/angular/catalog/src/tsconfig.app.json +0 -13
  121. package/angular/catalog/src/tsconfig.spec.json +0 -19
  122. package/angular/catalog/src/typings.d.ts +0 -5
  123. package/angular/catalog/tsconfig.json +0 -31
  124. package/angular/catalog/tslint.json +0 -143
  125. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/assets/images/catalog.png +0 -0
  126. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/favicon.ico +0 -0
  127. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/index.html +0 -14
  128. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/inline.bundle.js +0 -102
  129. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/inline.bundle.js.map +0 -1
  130. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/main.bundle.js +0 -9817
  131. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/main.bundle.js.map +0 -1
  132. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/polyfills.bundle.js +0 -5057
  133. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/polyfills.bundle.js.map +0 -1
  134. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/styles.bundle.js +0 -520
  135. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/styles.bundle.js.map +0 -1
  136. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/vendor.bundle.js +0 -232274
  137. package/angular/catalog/~/source/code.research/redbox-portal/.tmp/public/angular/catalog/vendor.bundle.js.map +0 -1
  138. package/api/Config.js +0 -42
  139. package/api/controllers/CatalogController.js +0 -211
  140. package/api/services/ServicenowCatalogService.js +0 -218
  141. package/assets/images/blank.png +0 -0
  142. package/config/auth.js +0 -82
  143. package/config/env/docker.js +0 -34
  144. package/config/servicenow-catalog-general.js +0 -58
  145. package/config/servicenow-catalog-recordtype.js +0 -36
  146. package/config/servicenow-catalog-routes.js +0 -17
  147. package/config/servicenow-catalog-workflow.js +0 -79
  148. package/config/servicenow-catalog-workspacetype.js +0 -9
  149. package/form-config/servicenow-catalog-1.0.js +0 -195
  150. package/index.js +0 -20
  151. package/runForDev.sh +0 -97
  152. package/support/development/docker-compose.yml +0 -43
  153. package/support/development/linkHook.sh +0 -9
  154. package/support/development/monitorSailsWorkingDir.sh +0 -46
  155. package/support/doc/images/service-catalog-in-rdmp.png +0 -0
  156. package/support/doc/images/service-catalog-storage.png +0 -0
  157. package/support/doc/images/service-catalog.png +0 -0
  158. package/test/dependencies.spec.js +0 -71
  159. package/tsconfig.json +0 -45
  160. package/typescript/api/Config.ts +0 -62
  161. package/typescript/api/controllers/CatalogController.ts +0 -248
  162. package/typescript/api/services/ServicenowCatalogService.ts +0 -206
package/README.md CHANGED
@@ -1,85 +1,301 @@
1
- ## A Sails Hook Redbox Catalog
2
-
3
- A sails hook that adds service-now integration into redbox-portal
4
-
5
- ## api
6
-
7
- Main API of your Hook can be stored in controllers and services
8
-
9
- - controllers
10
- - services
11
-
12
- ## config & form-config
13
-
14
- This configurations are redbox-portal dependent. They will allow redbox to be available as a record
15
- If you require to have a form in your portal
16
-
17
- - `config/recordtype`
18
- - `config/workflow`
19
- - `form-config/catalog-1.0-draft`
20
-
21
- ## index
22
-
23
- Main entry point for the hook
24
-
25
- ### initialize
26
-
27
- Init code before it gets hooked.
28
-
29
- ### routes
30
-
31
- Controller routes exposed to the sails front-end
32
-
33
- ```javascript
34
- 'post /:branding/:portal/ws/catalog/rdmp': CatalogController.rdmpInfo,
35
- 'post /:branding/:portal/ws/catalog/request': CatalogController.request
1
+ # ServiceNow Catalog Hook for ReDBox v5
2
+
3
+ This hook provides reusable ServiceNow catalog submission mechanics for ReDBox.
4
+ Customer hooks own record types, forms, workflows, and the decision to submit.
5
+ This hook owns named catalog configuration, mapping, OAuth, HTTP retries and
6
+ timeouts, optional parent association, response write-back, auditing, and
7
+ opt-in idempotency.
8
+
9
+ The hook does not register a `servicenow-catalog` record type, workspace type,
10
+ workflow, form, Angular application, view, or navigation entry.
11
+
12
+ ## Configuration
13
+
14
+ `servicenowCatalog` is brand-aware and disabled by default. It contains any
15
+ number of named catalog definitions:
16
+
17
+ ```json
18
+ {
19
+ "enabled": true,
20
+ "catalogs": {
21
+ "storage-new": {
22
+ "enabled": true,
23
+ "connection": {
24
+ "url": "https://example.service-now.com/api/sn_sc/servicecatalog/items/ITEM_ID/order_now",
25
+ "method": "post",
26
+ "headers": {
27
+ "Authorization": "Basic BASE64_CREDENTIALS"
28
+ },
29
+ "timeoutMs": 30000,
30
+ "totalTimeoutMs": 120000,
31
+ "retry": {
32
+ "maxAttempts": 3,
33
+ "baseDelayMs": 1000,
34
+ "maxDelayMs": 10000,
35
+ "retryOnStatusCodes": [408, 429, 500, 502, 503, 504]
36
+ }
37
+ },
38
+ "oauth": {
39
+ "enabled": false,
40
+ "url": "",
41
+ "clientId": "",
42
+ "clientSecret": "",
43
+ "grantType": "client_credentials"
44
+ },
45
+ "bodyTemplate": {
46
+ "sysparm_quantity": "1",
47
+ "get_portal_messages": "true",
48
+ "variables": {}
49
+ },
50
+ "requestFields": [
51
+ {
52
+ "destination": "variables.short_description",
53
+ "source": {
54
+ "kind": "handlebars",
55
+ "template": "{{workspace.metadata.title}}"
56
+ }
57
+ },
58
+ {
59
+ "destination": "variables.requested_size",
60
+ "source": {
61
+ "kind": "jsonata",
62
+ "expression": "workspace.metadata.storage_size"
63
+ }
64
+ }
65
+ ],
66
+ "responseFields": {
67
+ "workspace": [
68
+ {
69
+ "destination": "metadata.servicenow_number",
70
+ "source": {
71
+ "kind": "path",
72
+ "path": "response.result.number"
73
+ }
74
+ },
75
+ {
76
+ "destination": "metadata.status",
77
+ "source": {
78
+ "kind": "path",
79
+ "path": "response.result.state",
80
+ "defaultValue": "Provisioning"
81
+ }
82
+ }
83
+ ],
84
+ "parentRecord": [
85
+ {
86
+ "destination": "metadata.storage_request_number",
87
+ "source": {
88
+ "kind": "path",
89
+ "path": "response.result.number"
90
+ }
91
+ }
92
+ ]
93
+ },
94
+ "parentRecord": {
95
+ "oid": {
96
+ "kind": "path",
97
+ "path": "workspace.metadata.parentOid"
98
+ }
99
+ },
100
+ "responseNormalization": {
101
+ "parseJsonString": true
102
+ },
103
+ "idempotency": {
104
+ "enabled": true,
105
+ "key": {
106
+ "kind": "handlebars",
107
+ "template": "{{oid}}:{{trigger.event}}:storage-new"
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
36
113
  ```
37
114
 
38
- ### configure
39
-
40
- Configuration and services to your sails app
41
-
42
- ```javascript
43
- sails.services['CatalogService'] = CatalogService;
115
+ Hook defaults are merged with brand configuration, with the brand values taking
116
+ precedence. New configuration must use named catalogs. The previous
117
+ single-catalog shape is temporarily accepted as a catalog named `default` and
118
+ emits a deprecation warning.
119
+
120
+ The application-configuration model declares the Authorization header, OAuth
121
+ client secret, password, and refresh token as secrets. Do not put credentials
122
+ in mappings, audit summaries, source control, or trigger options.
123
+
124
+ ### OAuth
125
+
126
+ OAuth client-credentials, password, and refresh-token grants are supported.
127
+ When OAuth is enabled, the access token is fetched through the shared HTTP
128
+ runtime and reused across retries for one submission. Additional connection
129
+ headers are still applied, with the OAuth bearer token taking precedence over
130
+ an Authorization header.
131
+
132
+ ## Calling the service
133
+
134
+ A customer-owned save hook calls the standard exported service:
135
+
136
+ ```ts
137
+ const result = await sails.services.servicenowcatalogservice.submitRequest(
138
+ oid,
139
+ workspaceData,
140
+ {
141
+ catalog: 'storage-new',
142
+ event: 'create',
143
+ // Optional when the catalog's idempotency binding resolves a key.
144
+ idempotencyKey: oid + ':create:storage-new',
145
+ // Optional when the caller has already resolved the relationship.
146
+ parentRecordOid: workspaceData.metadata.parentOid
147
+ },
148
+ req.user,
149
+ response
150
+ );
44
151
  ```
45
152
 
46
- ## Development in redbox-portal
47
-
48
- A docker-compose.yml file is present in support/development and is setup to run the full ReDBox stack and install the hook. To run the stack there is a ReDBox Sails Hook Run Utility in the root of the project
49
-
50
- ### Usage #1
153
+ `catalog` and `event` are required. Runtime options cannot replace catalog
154
+ URLs, credentials, body templates, retry policy, or mappings. An integration or
155
+ catalog that is explicitly disabled returns the incoming trigger response
156
+ unchanged. Validation, duplicate, mapping, parent, OAuth, request, timeout, and
157
+ write-back failures return the normal structured trigger failure without
158
+ deleting the saved workspace.
159
+
160
+ ## Mapping contract
161
+
162
+ Request and response fields use the core `ValueBinding` model:
163
+
164
+ - `path`: read a dot-notation path;
165
+ - `handlebars`: render a Handlebars template;
166
+ - `jsonata`: evaluate a JSONata expression.
167
+
168
+ Every request mapping receives this stable context:
169
+
170
+ ```ts
171
+ {
172
+ workspace,
173
+ parentRecord, // undefined when the catalog has no parent
174
+ oid,
175
+ brand, // resolved brand name
176
+ trigger: {
177
+ catalog,
178
+ event,
179
+ idempotencyKey?,
180
+ parentRecordOid?
181
+ },
182
+ now, // ISO-8601 string
183
+ translationService
184
+ }
51
185
  ```
52
- ReDBox Sails Hook Run Utility
53
- Usage: ./runForDev.sh [-a|--(no-)angular] [-h|--help]
54
- -a,--angular,--no-angular: Angular mode. Will ensure permissions are set correctly on the Sails working directory so that changes can be applied (off by default)
55
- -h,--help: Prints help
56
- ```
57
-
58
- Note: The first time the stack runs it may take some time as yarn initialises the hook within ReDBox Portal. All subsequent runs should be faster
59
-
60
- ### Usage #2
61
-
62
- Using Vagrant : https://github.com/moisbo/vagrant-redbox-dev
63
-
64
- And configure sync
65
-
66
- config.vm.synced_folder "{source}/sails-hook-redbox-catalog", "/opt/hooks/sails-hook-redbox-catalog", id: "catalog"
67
186
 
68
- ## Example:
69
-
70
- Service Catalog as stand alone hook:
71
-
72
- http://localhost:1500/default/{branding}/catalog/edit?rdmp={redbox_oid}
73
-
74
- ![](./support/doc/images/service-catalog.png)
75
-
76
- Or integrated into rdmp
77
-
78
- ![](./support/doc/images/service-catalog-in-rdmp.png)
187
+ Response mappings receive the same values plus `response`, containing the
188
+ normalized ServiceNow response. New response mappings should use paths such as
189
+ `response.result.number`. A temporary raw-response root alias is retained for
190
+ older `result.*` mappings.
191
+
192
+ Mappings are applied to clones and reject prototype-polluting destination
193
+ paths. Workspace and parent mappings are independent. Metadata is written only
194
+ when the corresponding mapping list is non-empty. The service never assigns a
195
+ hard-coded status; status changes must be expressed as ordinary response
196
+ mappings, binding defaults, or expressions.
197
+
198
+ ## Parent records
199
+
200
+ Parent handling is optional and relationship-neutral. A caller can supply
201
+ `parentRecordOid`, or the catalog can resolve it from `parentRecord.oid`.
202
+ When configured, the OID must be non-empty and the record must exist. The
203
+ service loads the parent through `RecordsService`, associates the workspace
204
+ through `WorkspaceService.addWorkspaceToRecord`, and applies optional parent
205
+ response mappings through `RecordsService.updateMeta`.
206
+
207
+ Catalogs without a parent binding perform no parent lookup, association, or
208
+ parent update. No generic code assumes `metadata.rdmpOid`.
209
+
210
+ ## Response normalization
211
+
212
+ With `responseNormalization.parseJsonString` enabled (the default), an HTTP
213
+ response whose root value is a JSON-encoded string is parsed before response
214
+ mapping. Object and array responses are unchanged. A root string that is not
215
+ valid JSON is preserved as a string.
216
+
217
+ ## Auditing and idempotency
218
+
219
+ The integration audit records the overall submission and nested phases for
220
+ parent lookup, association, ServiceNow HTTP work, workspace update, parent
221
+ update, and idempotency decisions. Request summaries include the selected
222
+ catalog, trigger event, optional parent OID, and stable idempotency key, but not
223
+ credentials or full request bodies.
224
+
225
+ Idempotency is disabled by default. When enabled, a key must come from the
226
+ trigger or the configured binding. The hook-owned
227
+ `ServicenowCatalogIdempotency` Waterline model is the atomic durable claim
228
+ ledger. Its primary key is derived from an unambiguous JSON-array encoding of
229
+ brand ID, record OID, catalog, and idempotency key. Integration audit history
230
+ provides the submission evidence used to reconcile claim state:
231
+
232
+ - a prior completed key is rejected as a duplicate;
233
+ - a prior started/interrupted key is rejected because ServiceNow may have
234
+ accepted the request;
235
+ - a prior failed trace can be retried;
236
+ - an in-process guard also rejects concurrent duplicates in one portal process.
237
+
238
+ Claims move through `claimed`, `completed`, `failed`, and `uncertain`.
239
+ A `claimed` row is leased for the greater of five minutes or the configured
240
+ `totalTimeoutMs` plus a one-minute safety margin, so the lease covers the
241
+ complete orchestration side-effect window. After expiry, one process atomically
242
+ takes reconciliation ownership and checks ServiceNow-scoped audit history
243
+ before doing anything external: a successful trace becomes `completed`, a
244
+ started or interrupted trace becomes `uncertain`, and a clear trace may be
245
+ submitted again. If reconciliation lookup itself fails, a recovered stale
246
+ claim becomes `uncertain` rather than retryable.
247
+
248
+ Completed and uncertain rows have no automatic retention expiry because deleting
249
+ them re-enables their keys. Operators may remove them only when the corresponding
250
+ idempotency-key protection window has deliberately ended. Failed rows are
251
+ retained until atomically reclaimed by a later attempt.
252
+
253
+ ## Legacy compatibility endpoints
254
+
255
+ These routes remain for compatibility only and are not the reusable save-hook
256
+ API:
257
+
258
+ - `POST /:branding/:portal/ws/catalog/rdmp`
259
+ - `POST /:branding/:portal/ws/catalog/request`
260
+ - `GET /:branding/:portal/ws/catalog/info`
261
+
262
+ They continue to use the isolated legacy `sails.config.workspaces.catalog`
263
+ settings and their existing authorization/response conventions. The request
264
+ endpoint no longer falls back to hook-owned record or workflow names:
265
+ `workspaces.catalog.recordType` and `workspaces.catalog.workflowStage` must
266
+ be configured when that endpoint creates a workspace.
267
+
268
+ The historical `legacy-form-config/` and `angular/catalog/` directories are
269
+ migration evidence only. They are not compiled, registered, or included in the
270
+ published package.
271
+
272
+ ## Development
273
+
274
+ Use the hook archetype scripts:
275
+
276
+ ```bash
277
+ npm install --include=dev
278
+ npm run compile
279
+ npm run test:unit
280
+ npm run test:integration:mocha
281
+ npm run test:integration:bruno
282
+ ```
79
283
 
80
- Example: eResearch Storage
284
+ The integration suites build and lift a real ReDBox portal with MongoDB and
285
+ Solr. Mocha covers the service orchestration and Bruno covers authorization for
286
+ every retained compatibility route. Clean their Docker resources when needed:
81
287
 
82
- ![](./support/doc/images/service-catalog-storage.png)
288
+ ```bash
289
+ npm run test:integration:mocha:clean
290
+ npm run test:integration:bruno:clean
291
+ ```
83
292
 
293
+ ## CI and releases
84
294
 
295
+ CircleCI compiles and runs the unit suite for every branch. Stable Git tags
296
+ matching `vMAJOR.MINOR.PATCH` publish the matching package version with the npm
297
+ `latest` dist-tag.
85
298
 
299
+ Beta packages are published by triggering a CircleCI pipeline with
300
+ `npm_publish_mode=beta`, a stable base `npm_publish_version`, and an
301
+ `npm_publish_dist_tag` such as `beta`, `next`, or `alpha`.