@sap/cds 8.4.2 → 8.5.0

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 (70) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/_i18n/messages.properties +99 -0
  3. package/bin/serve.js +2 -2
  4. package/lib/compile/cdsc.js +9 -4
  5. package/lib/compile/to/srvinfo.js +4 -4
  6. package/lib/core/entities.js +1 -0
  7. package/lib/core/types.js +1 -1
  8. package/lib/dbs/cds-deploy.js +4 -1
  9. package/lib/env/defaults.js +7 -6
  10. package/lib/env/schemas/cds-rc.js +132 -22
  11. package/lib/i18n/bundles.js +111 -0
  12. package/lib/i18n/files.js +134 -0
  13. package/lib/i18n/index.js +63 -0
  14. package/lib/i18n/localize.js +101 -237
  15. package/lib/i18n/resources.js +150 -0
  16. package/lib/index.js +1 -0
  17. package/lib/log/format/aspects/cls.js +6 -1
  18. package/lib/log/format/json.js +1 -1
  19. package/lib/ql/CREATE.js +1 -0
  20. package/lib/ql/DELETE.js +1 -0
  21. package/lib/ql/DROP.js +1 -0
  22. package/lib/ql/INSERT.js +9 -8
  23. package/lib/ql/Query.js +18 -8
  24. package/lib/ql/SELECT.js +1 -0
  25. package/lib/ql/UPDATE.js +2 -1
  26. package/lib/ql/UPSERT.js +1 -1
  27. package/lib/ql/Whereable.js +3 -3
  28. package/lib/ql/cds-ql.js +12 -18
  29. package/lib/req/user.js +1 -0
  30. package/lib/req/validate.js +12 -3
  31. package/lib/srv/factory.js +2 -2
  32. package/lib/{auth → srv/middlewares/auth}/basic-auth.js +1 -1
  33. package/lib/{auth → srv/middlewares/auth}/dummy-auth.js +1 -1
  34. package/lib/srv/middlewares/auth/ias-auth.js +96 -0
  35. package/lib/{auth → srv/middlewares/auth}/index.js +2 -2
  36. package/lib/srv/middlewares/auth/jwt-auth.js +62 -0
  37. package/lib/{auth → srv/middlewares/auth}/mocked-users.js +1 -1
  38. package/lib/srv/middlewares/auth/xssec.js +7 -0
  39. package/lib/srv/middlewares/index.js +1 -1
  40. package/lib/utils/cds-utils.js +15 -19
  41. package/lib/utils/tar.js +2 -2
  42. package/libx/_runtime/cds-services/adapter/odata-v4/OData.js +2 -2
  43. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/read.js +1 -0
  44. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/update.js +1 -1
  45. package/libx/_runtime/common/error/frontend.js +2 -6
  46. package/libx/_runtime/common/error/log.js +7 -8
  47. package/libx/_runtime/common/error/utils.js +3 -7
  48. package/libx/_runtime/common/generic/auth/capabilities.js +1 -1
  49. package/libx/_runtime/common/generic/input.js +41 -6
  50. package/libx/_runtime/common/i18n/index.js +8 -15
  51. package/libx/_runtime/common/utils/compareJson.js +10 -1
  52. package/libx/_runtime/common/utils/resolveView.js +1 -1
  53. package/libx/_runtime/fiori/lean-draft.js +77 -26
  54. package/libx/_runtime/messaging/enterprise-messaging-utils/registerEndpoints.js +5 -1
  55. package/libx/_runtime/messaging/kafka.js +1 -1
  56. package/libx/odata/index.js +3 -0
  57. package/libx/odata/middleware/create.js +8 -6
  58. package/libx/odata/middleware/update.js +24 -21
  59. package/libx/odata/parse/afterburner.js +15 -2
  60. package/libx/odata/parse/grammar.peggy +24 -7
  61. package/libx/odata/parse/parser.js +1 -1
  62. package/libx/odata/utils/postProcess.js +4 -1
  63. package/libx/rest/RestAdapter.js +2 -1
  64. package/libx/rest/middleware/error.js +0 -50
  65. package/package.json +1 -1
  66. package/lib/auth/ias-auth.js +0 -68
  67. package/lib/auth/ias-claims.js +0 -34
  68. package/lib/auth/jwt-auth.js +0 -70
  69. package/libx/_runtime/common/i18n/messages.properties +0 -99
  70. package/libx/_runtime/common/utils/require.js +0 -9
package/CHANGELOG.md CHANGED
@@ -4,6 +4,38 @@
4
4
  - The format is based on [Keep a Changelog](http://keepachangelog.com/).
5
5
  - This project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## Version 8.5.0 - 2024-11-25
8
+
9
+ ### Added
10
+
11
+ - New `cds.i18n` module used consistently for both, UI labels and runtime messages.
12
+ - Enhanced `cds.validate` to support open intervals for: `@assert.range:[(0),(Infinity)]` -> `0 < x < ∞`
13
+ - `package.json` validation and suggestions for messaging services.
14
+ - `cds.log()`: Detect binding to SAP Cloud Logging via user provided service. The user provided service must have tag `cloud-logging`.
15
+ - Support for function parameters via query component (example: `GET /foo?bar=baz` instead of `GET /foo(bar='baz')`)
16
+ - Experimental support for programmatic draft actions `srv.new(MyEntity, data)`, `srv.cancel(MyEntity.drafts, keys)`, `srv.edit(MyEntity, data)` and `srv.save(MyEntity.drafts, keys)`
17
+
18
+ ### Changed
19
+
20
+ - `cds-deploy` script has a non-zero exit code on deployment failure
21
+ - Properties of type `cds.Binary` in URLs as well as request payload are converted to `Buffer`s.
22
+ Properties of type `cds.LargeBinary` in request payload are converted to `Readable`s.
23
+ Previously, both were provided as Base64-encoded strings.
24
+ This change can be deactivated via `cds.env.features.base64_binaries = true`, which is set by default for profile `attic`.
25
+
26
+ ### Fixed
27
+
28
+ - `cds.validate` should not delete readonly keys from `req.data`
29
+ - `cds.validate` should not reject imported associations
30
+ - Readonly fields must not be set when creating draft entities
31
+ - Validation of mandatory properties caused streams to be rejected for new OData adapter
32
+ - `cds.log` with null parameters and JSON format
33
+ - `cds.compile.to.sql` proper replacement for sqlite session variables in java projects
34
+ - `cds.compile.to.serviceinfo` ignores only the `endpoints` property for unknown protocols
35
+ - `Preference-Applied` header is returned in OData adapter if requested
36
+ - No location header is returned on OData update requests if `minimal` preference is set
37
+ - Handling of invalid requests for views with parameters
38
+
7
39
  ## Version 8.4.2 - 2024-11-13
8
40
 
9
41
  ### Fixed
@@ -29,8 +61,9 @@
29
61
 
30
62
  ### Changed
31
63
 
64
+ - Internal API `srv.endpoints` now always is an array of endpoint objects, an empty one if the service is not served to any protocol.
65
+ - Property `.cmd` of `cds.ql.Query` (and subclasses thereof) is deprecated → use `.kind` instead
32
66
  - For remote service calls to OData v2 services, less conversions are performed on the returned data
33
- - Internal API `srv.endpoints` now always is an array of endpoint objects, an empty one if the service is not served to any protocol
34
67
 
35
68
  ### Fixed
36
69
 
@@ -215,6 +248,7 @@
215
248
  - Allow programmatic operations on draft-enabled entities (`NEW`, `CREATE`, `UPDATE`, `DELETE`)
216
249
 
217
250
  ### Removed
251
+
218
252
  - Allow deviating response types for `$batch`, e. g. input `multipart` and output `json`
219
253
 
220
254
  ## Version 8.0.2 - 2024-07-09
@@ -0,0 +1,99 @@
1
+ 400 = Bad Request
2
+ 401 = Unauthorized
3
+ 403 = Forbidden
4
+ 404 = Not Found
5
+ 405 = Method Not Allowed
6
+ 406 = Not Acceptable
7
+ 407 = Proxy Authentication Required
8
+ 408 = Request Timeout
9
+ 409 = Conflict
10
+ 410 = Gone
11
+ 411 = Length Required
12
+ 412 = Precondition Failed
13
+ 413 = Payload Too Large
14
+ 414 = URI Too Long
15
+ 415 = Unsupported Media Type
16
+ 416 = Range Not Satisfiable
17
+ 417 = Expectation Failed
18
+ 422 = Unprocessable Content
19
+ 424 = Failed Dependency
20
+ 428 = Precondition Required
21
+ 429 = Too Many Requests
22
+ 431 = Request Header Fields Too Large
23
+ 451 = Unavailable For Legal Reasons
24
+ 500 = Internal Server Error
25
+ 501 = The server does not support the functionality required to fulfill the request
26
+ 502 = Bad Gateway
27
+ 503 = Service Unavailable
28
+ 504 = Gateway Timeout
29
+
30
+ MULTIPLE_ERRORS = Multiple errors occurred. Please see the details for more information.
31
+
32
+ # -------------------------------------------------------------------------------------------------
33
+ # all texts below are subject to change!
34
+ # -------------------------------------------------------------------------------------------------
35
+
36
+ # fragments
37
+ ENTITY = entity
38
+ TYPE = type
39
+ FUNCTION = function
40
+ ACTION = action
41
+
42
+ # assert
43
+ ASSERT_VALID_ELEMENT = Element is not valid
44
+ ASSERT_RANGE = Value {0} is not in specified range [{1}, {2}]
45
+ ASSERT_FORMAT = Value "{0}" is not in specified format "{1}"
46
+ ASSERT_DATA_TYPE = Value {0} is not a valid {1}
47
+ ASSERT_ARRAY = Value must be an array
48
+ ASSERT_ENUM = Value {0} is invalid according to enum declaration {{1}}
49
+ ASSERT_NOT_NULL = Value is required
50
+ ASSERT_TARGET = "Value doesn't exist"
51
+
52
+ # db
53
+ NO_DATABASE_CONNECTION = No database connection
54
+ ENTITY_ALREADY_EXISTS = Entity already exists
55
+ ENTITY_LOCKED = Entity locked
56
+ UNIQUE_CONSTRAINT_VIOLATION = Unique constraint violation
57
+ FK_CONSTRAINT_VIOLATION = Foreign key constraint violation
58
+
59
+ # remote
60
+ INVALID_CONTENT_TYPE_ONLY_JSON = Invalid content type. Only "application/json" is supported.
61
+
62
+ # access control
63
+ INSERTABLE = insertable
64
+ READABLE = readable
65
+ UPDATABLE = updatable
66
+ DELETABLE = deletable
67
+ ENTITY_IS_INSERT_ONLY = Entity "{0}" is insert-only
68
+ ENTITY_IS_READ_ONLY = Entity "{0}" is read-only
69
+ ENTITY_IS_NOT_CRUD = Entity "{0}" is not {1}
70
+ ENTITY_IS_NOT_CRUD_VIA_NAVIGATION = Entity "{0}" is not {1} via navigation "{2}"
71
+ ENTITY_IS_AUTOEXPOSED = Entity "{0}" is not explicitly exposed as part of the service
72
+ ENTITY_IS_AUTOEXPOSE_READONLY = Entity "{0}" is explicitly exposed as readonly
73
+ EXPAND_IS_RESTRICTED = Navigation property "{0}" is not allowed for expand operation
74
+
75
+ # rest protocol adapter
76
+ INVALID_RESOURCE = "{0}" is not a valid resource
77
+ INVALID_PARAMETER = "{0}" is not a valid parameter
78
+ INVALID_PARAMETER_VALUE_TYPE = Parameter value for "{0}" must be of type "{1}"
79
+ INVALID_OPERATION_FOR_ENTITY = Entity "{0}" has no {1} "{2}"
80
+ NO_MATCHING_RESOURCE = The server has not found a resource matching the requested URI
81
+ INVALID_POST = POST is only allowed on resource collections and actions
82
+ INVALID_PUT = PUT is only allowed on a specific resource
83
+ INVALID_PATCH = PATCH is only allowed on a specific resource
84
+ INVALID_DELETE = DELETE is only supported on a specific resource
85
+ CRUD_VIA_NAVIGATION_NOT_SUPPORTED = CRUD via navigations is not yet supported
86
+
87
+ # OData protocol adapter
88
+ BATCH_TOO_MANY_REQ = Batch request contains too many requests
89
+
90
+ # draft
91
+ DRAFT_ALREADY_EXISTS = A draft for this entity already exists
92
+ DRAFT_NOT_EXISTING = No draft for this entity exists
93
+ DRAFT_LOCKED_BY_ANOTHER_USER = The entity is locked by user "{0}"
94
+ DRAFT_MODIFICATION_ONLY_VIA_ROOT = A draft-enabled entity can only be modified via its root entity
95
+ ACTIVE_MODIFICATION_VIA_DRAFT = Active entities cannot be modified via draft request
96
+ DRAFT_ACTIVE_DELETE_FORBIDDEN_DRAFT_EXISTS = Entity cannot be deleted because a draft exists
97
+
98
+ # singleton
99
+ SINGLETON_NOT_NULLABLE = The singleton entity is not nullable
package/bin/serve.js CHANGED
@@ -135,7 +135,7 @@ module.exports = exports = Object.assign ( serve, {
135
135
  `})
136
136
 
137
137
 
138
- const cds = require('../lib'), { exists, isfile, local, path, _redacted } = cds.utils
138
+ const cds = require('../lib'), { exists, isfile, local, redacted, path } = cds.utils
139
139
  const COLORS = process.stdout.isTTY && !process.env.NO_COLOR || process.env.FORCE_COLOR
140
140
 
141
141
  /* eslint-disable no-console */
@@ -287,7 +287,7 @@ function _prepare_logging () { // NOSONAR
287
287
 
288
288
  // print information about each connected service
289
289
  cds.on ('connect', ({name,kind,options:{use,credentials,impl}})=>{
290
- LOG.info (`connect to ${name} > ${use||kind||impl}`, credentials ? _redacted(credentials) : '')
290
+ LOG.info (`connect to ${name} > ${use||kind||impl}`, credentials ? redacted(credentials) : '')
291
291
  })
292
292
 
293
293
  // print information about each provided service
@@ -61,7 +61,7 @@ const _options = {for: Object.assign (_options4, {
61
61
  })
62
62
  },
63
63
 
64
- sql (_o, _env, _conf = cds.requires.db || cds.requires.kinds.sql) {
64
+ sql (_o, _env, _conf = cds.requires.db) {
65
65
  // REVISIT: compiler requires to only provide assertIntegrityType if defined
66
66
  if (_o?._4sql) return _o
67
67
  const o = _options4 ({ ..._env||cds.env.sql, ..._o, _4sql: true }, {
@@ -73,12 +73,17 @@ const _options = {for: Object.assign (_options4, {
73
73
  })
74
74
 
75
75
  if (!o.sqlDialect) {
76
- let dialect = _conf.dialect || _conf.kind
76
+ let conf = _conf || cds.requires.kinds.sql
77
+ let dialect = conf.dialect || conf.kind
77
78
  if (dialect) o.sqlDialect = dialect
78
79
  }
79
80
 
80
- const legacy = '@sap/cds/libx/_runtime/' // includes legacy sqlite and hana
81
- if (_conf.impl.includes(legacy)) {
81
+ const _using_legacy_db = (()=>{
82
+ if (_conf?.impl) return _conf.impl.includes('@sap/cds/libx/_runtime/')
83
+ if (cds.requires.kinds.sqlite.impl === '@cap-js/sqlite') return false
84
+ else try { return require('sqlite3', { paths:[cds.root] }) } catch {/* ignore */}
85
+ })()
86
+ if (_using_legacy_db) {
82
87
  o.betterSqliteSessionVariables = false
83
88
  o.fewerLocalizedViews = false
84
89
  }
@@ -46,15 +46,15 @@ module.exports = (model, options={}) => {
46
46
  // make a fake runtime object for the service, adding a `definition` property
47
47
  if (!service.definition) Object.defineProperty(service, 'definition', { value: service, enumerable: false })
48
48
  const endpoints = cds.service.protocols.endpoints4(service).map?.(e => Object.assign({}, e, { path: _url4(e.path) }))
49
- if (!endpoints || !endpoints.length) return
50
-
51
49
  return {
52
50
  name: service.name,
53
- urlPath: endpoints[0].path, // legacy
54
51
  destination: 'srv-api', // the name to register in xs-app.json
55
- endpoints,
56
52
  runtime: 'Node.js',
57
53
  location: service.$location,
54
+ ...endpoints?.[0] && {
55
+ urlPath: endpoints[0].path, // legacy
56
+ endpoints
57
+ }
58
58
  }
59
59
  }
60
60
 
@@ -54,6 +54,7 @@ class Association extends type {
54
54
  set foreignKeys(k) { this.set('foreignKeys', k) }
55
55
  get foreignKeys() {
56
56
  const keys = this.keys; if (!keys) return this.foreignKeys = undefined
57
+ if (!Object.keys(keys).length) return this.foreignKeys = null
57
58
  const foreignKeys = new LinkedDefinitions
58
59
  for (const k of keys) {
59
60
  const el = k.ref.reduce((target,n)=> target.elements[n], this._target)
package/lib/core/types.js CHANGED
@@ -28,7 +28,7 @@ Object.assign (protos, types.hana = {
28
28
  'cds.hana.CHAR': new classes.String,
29
29
  'cds.hana.CLOB': new classes.LargeString,
30
30
  'cds.hana.NCHAR': new classes.String,
31
- 'cds.hana.BINARY': new classes.String,
31
+ 'cds.hana.BINARY': new classes.Binary,
32
32
  'cds.hana.ST_POINT': new classes.type,
33
33
  'cds.hana.ST_GEOMETRY': new classes.type,
34
34
  })
@@ -410,4 +410,7 @@ if (!module.parent) (async function CLI () {
410
410
  } finally {
411
411
  await db?.disconnect?.()
412
412
  }
413
- })().catch(console.error)
413
+ })().catch((e) => {
414
+ console.error(e)
415
+ process.exitCode = 1
416
+ })
@@ -18,6 +18,7 @@ const defaults = module.exports = {
18
18
  pre_compile_edmxs: false,
19
19
  odata_new_adapter: false,
20
20
  odata_new_parser: false,
21
+ base64_binaries: true
21
22
  },
22
23
  requires: {
23
24
  kinds: {
@@ -133,12 +134,9 @@ const defaults = module.exports = {
133
134
 
134
135
  i18n: {
135
136
  file: 'i18n', // file basename w/o extension
136
- folders: ['_i18n', 'i18n', 'assets/i18n'],
137
- for_sqlite: ['de', 'fr'],
138
- for_sql: ['de', 'fr'],
139
- languages: 'all', // or array. 'all': whatever language files are found next to models
137
+ folders: [ '_i18n', 'i18n' ],
138
+ languages: 'all', // or ['en','de',...]
140
139
  default_language: 'en',
141
- fallback_bundle: '',
142
140
  preserved_locales: [
143
141
  // IMPORTANT: Never, never modify this list, as that would break existing projects !!!!
144
142
  // Projects can and have to override if they want something different.
@@ -150,7 +148,10 @@ const defaults = module.exports = {
150
148
  'zh_CN',
151
149
  'zh_HK',
152
150
  'zh_TW'
153
- ]
151
+ ],
152
+ /** @deprecated */ for_sqlite: ['de', 'fr'],
153
+ /** @deprecated */ for_sql: ['de', 'fr'],
154
+ /** @deprecated */ fallback_bundle: '',
154
155
  },
155
156
 
156
157
  odata: {
@@ -125,7 +125,7 @@ module.exports = {
125
125
  type: 'string'
126
126
  },
127
127
  folders: {
128
- description: 'Define the list of folders containing language files. Defaults are \'_i18n/\', \'i18n/\', and \'assets/i18n/\'. First valid entry wins.',
128
+ description: 'Define the list of folders containing language files. Defaults are \'_i18n/\', and \'i18n/\'. First valid entry wins.',
129
129
  default: [],
130
130
  $ref: '#/$defs/foldersStringArray'
131
131
  }
@@ -134,7 +134,7 @@ module.exports = {
134
134
  requires: {
135
135
  type: 'object',
136
136
  default: {},
137
- description: 'List CDS dependencies to databases and services within the requires section.',
137
+ description: 'Define all required services.',
138
138
  additionalProperties: true,
139
139
  properties: {
140
140
  auth: {
@@ -198,10 +198,10 @@ module.exports = {
198
198
  oneOf: [
199
199
  {
200
200
  type: 'string',
201
- description: 'Use standard database-specific settings via shortcut.',
201
+ description: 'Settings for the primary database (shortcut).',
202
202
  anyOf: [
203
203
  {
204
- $ref: '#/$defs/databaseType'
204
+ $ref: '#/$defs/databaseKind'
205
205
  },
206
206
  {
207
207
  minLength: 1
@@ -210,7 +210,7 @@ module.exports = {
210
210
  },
211
211
  {
212
212
  type: 'object',
213
- description: 'Use custom database-specific settings.',
213
+ description: 'Settings for the primary database.',
214
214
  default: {},
215
215
  additionalProperties: true,
216
216
  patternProperties: {
@@ -221,10 +221,10 @@ module.exports = {
221
221
  properties: {
222
222
  kind: {
223
223
  type: 'string',
224
- description: 'Define the kind of dependency.',
224
+ description: 'Service kind',
225
225
  anyOf: [
226
226
  {
227
- $ref: '#/$defs/databaseType'
227
+ $ref: '#/$defs/databaseKind'
228
228
  },
229
229
  {
230
230
  minLength: 1
@@ -327,11 +327,74 @@ module.exports = {
327
327
  type: 'boolean',
328
328
  description: 'Shortcut to enable feature toggles.'
329
329
  },
330
+ messaging: {
331
+ oneOf: [
332
+ {
333
+ type: 'string',
334
+ description: 'Settings for the primary messaging service (shortcut).',
335
+ anyOf: [
336
+ {
337
+ $ref: '#/$defs/messagingKind'
338
+ },
339
+ {
340
+ minLength: 1
341
+ }
342
+ ]
343
+ },
344
+ {
345
+ type: 'object',
346
+ description: 'Settings for the primary messaging service.',
347
+ default: {},
348
+ additionalProperties: true,
349
+ patternProperties: {
350
+ '\\[.+\\]': {
351
+ $ref: '#/$defs/cdsRoot/properties/requires/properties/messaging'
352
+ }
353
+ },
354
+ properties: {
355
+ kind: {
356
+ type: 'string',
357
+ description: 'Service kind',
358
+ anyOf: [
359
+ {
360
+ $ref: '#/$defs/messagingKind'
361
+ },
362
+ {
363
+ minLength: 1
364
+ }
365
+ ]
366
+ },
367
+ credentials: {
368
+ type: 'object',
369
+ description: 'You can explicitly configure credentials, but this is overruled by VCAP_SERVICES if a matching entry is found therein.',
370
+ additionalProperties: true,
371
+ properties: {
372
+ database: {
373
+ type: 'string',
374
+ format: 'uri-reference'
375
+ }
376
+ }
377
+ },
378
+ vcap: {
379
+ type: 'object',
380
+ description: 'Optional: Used to select an entry in VCAP_SERVICES.',
381
+ additionalProperties: true,
382
+ properties: {
383
+ name: {
384
+ type: 'string',
385
+ minLength: 1
386
+ }
387
+ }
388
+ }
389
+ }
390
+ }
391
+ ]
392
+ },
330
393
  'cds.xt.ModelProviderService': {
331
394
  description: 'Configure if/how the ModelProviderService serves model variants that may include tenant-specific extensions and/or feature-toggled aspects.',
332
395
  oneOf: [
333
396
  {
334
- $ref: '#/$defs/serviceActivation'
397
+ type: 'boolean'
335
398
  },
336
399
  {
337
400
  $ref: '#/$defs/servicePresetSidecar'
@@ -359,7 +422,7 @@ module.exports = {
359
422
  description: 'Configure if/how the ExtensibilityService allows to add and activate tenant-specific extensions at runtime.',
360
423
  oneOf: [
361
424
  {
362
- $ref: '#/$defs/serviceActivation'
425
+ type: 'boolean'
363
426
  },
364
427
  {
365
428
  $ref: '#/$defs/extensionRestrictions'
@@ -370,7 +433,7 @@ module.exports = {
370
433
  description: 'Configure if/how the DeploymentService handles subscribe, unsubscribe, and upgrade events for single tenants and single apps/micro-services.',
371
434
  oneOf: [
372
435
  {
373
- $ref: '#/$defs/serviceActivation'
436
+ type: 'boolean'
374
437
  },
375
438
  {
376
439
  $ref: '#/$defs/servicePresetSidecar'
@@ -419,10 +482,10 @@ module.exports = {
419
482
  ]
420
483
  },
421
484
  'cds.xt.SaasProvisioningService': {
422
- description: 'De-/Activate the facade for the DeploymentService to adapt to the API expected by SAP BTP’s SaaS Provisioning Service, hence providing out-of-the-box integration.',
485
+ description: 'Out-of-the-box integration with SAP BTP SaaS Provisioning service.',
423
486
  oneOf: [
424
487
  {
425
- $ref: '#/$defs/serviceActivation'
488
+ type: 'boolean'
426
489
  },
427
490
  {
428
491
  type: 'object',
@@ -452,6 +515,24 @@ module.exports = {
452
515
  }
453
516
  }
454
517
  ]
518
+ },
519
+ 'cds.xt.SmsProvisioningService': {
520
+ description: 'Out-of-the-box integration with SAP BTP Subscription Management service.',
521
+ oneOf: [
522
+ {
523
+ type: 'boolean'
524
+ },
525
+ {
526
+ type: 'object',
527
+ description: 'SmsProvisioningService configuration options.',
528
+ additionalProperties: true,
529
+ patternProperties: {
530
+ '\\[.+\\]': {
531
+ $ref: '#/$defs/cdsRoot/properties/requires/properties/cds.xt.SmsProvisioningService'
532
+ }
533
+ }
534
+ }
535
+ ]
455
536
  }
456
537
  },
457
538
  patternProperties: {
@@ -474,7 +555,7 @@ module.exports = {
474
555
  $ref: '#/$defs/authType'
475
556
  },
476
557
  {
477
- $ref: '#/$defs/databaseType'
558
+ $ref: '#/$defs/databaseKind'
478
559
  },
479
560
  {
480
561
  $ref: '#/$defs/serviceType'
@@ -491,13 +572,13 @@ module.exports = {
491
572
  properties: {
492
573
  kind: {
493
574
  type: 'string',
494
- description: 'Kind of dependency.',
575
+ description: 'Service kind',
495
576
  anyOf: [
496
577
  {
497
578
  $ref: '#/$defs/authType'
498
579
  },
499
580
  {
500
- $ref: '#/$defs/databaseType'
581
+ $ref: '#/$defs/databaseKind'
501
582
  },
502
583
  {
503
584
  $ref: '#/$defs/serviceType'
@@ -508,7 +589,7 @@ module.exports = {
508
589
  ]
509
590
  },
510
591
  model: {
511
- description: 'Assigned model. Interpreted like Node.js \'requires\' logic.',
592
+ description: 'A relative path to the model definition.',
512
593
  $ref: '#/$defs/foldersStringArray'
513
594
  }
514
595
  }
@@ -655,7 +736,7 @@ module.exports = {
655
736
  }
656
737
  },
657
738
 
658
- databaseType: {
739
+ databaseKind: {
659
740
  default: 'sqlite',
660
741
  enum: [
661
742
  'hana',
@@ -669,6 +750,28 @@ module.exports = {
669
750
  ]
670
751
  },
671
752
 
753
+ messagingKind: {
754
+ default: 'local-messaging',
755
+ enum: [
756
+ 'file-based-messaging',
757
+ 'enterprise-messaging',
758
+ 'enterprise-messaging-shared',
759
+ 'event-broker',
760
+ 'redis-messaging',
761
+ 'local-messaging',
762
+ 'composite-messaging'
763
+ ],
764
+ enumDescriptions: [
765
+ 'File-based messaging',
766
+ 'SAP Event Mesh',
767
+ 'SAP Event Mesh (shared)',
768
+ 'SAP Cloud Application Event Hub',
769
+ 'Redis messaging',
770
+ 'Local messaging',
771
+ 'Composite messaging'
772
+ ]
773
+ },
774
+
672
775
  foldersStringArray: {
673
776
  oneOf: [
674
777
  {
@@ -687,8 +790,7 @@ module.exports = {
687
790
  },
688
791
 
689
792
  serviceActivation: {
690
- type: 'boolean',
691
- description: 'De-/Activate this service.'
793
+ type: 'boolean'
692
794
  },
693
795
 
694
796
  servicePresetSidecar: {
@@ -702,7 +804,7 @@ module.exports = {
702
804
 
703
805
  extensionRestrictions: {
704
806
  type: 'object',
705
- description: 'Extension restrictions',
807
+ description: 'Extensibility settings',
706
808
  additionalProperties: false,
707
809
  properties: {
708
810
  'element-prefix': {
@@ -731,7 +833,7 @@ module.exports = {
731
833
  properties: {
732
834
  for: {
733
835
  type: 'array',
734
- description: 'Restriction applies to these namespaces.',
836
+ description: 'Restriction applies to these services.',
735
837
  uniqueItems: true,
736
838
  items: {
737
839
  type: 'string'
@@ -766,8 +868,16 @@ module.exports = {
766
868
  },
767
869
  'new-entities': {
768
870
  type: 'integer',
769
- description: 'Number of entities to be added at most',
871
+ description: 'Number of entities to be added at most.',
770
872
  minimum: 1
873
+ },
874
+ 'annotations': {
875
+ type: 'array',
876
+ description: 'Annotations that are allowed for entities, services and fields.',
877
+ uniqueItems: true,
878
+ items: {
879
+ type: 'string'
880
+ }
771
881
  }
772
882
  }
773
883
  }