@api-client/core 0.18.34 → 0.18.35

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.
@@ -18,7 +18,7 @@ export class TrashSdk extends SdkBase {
18
18
  */
19
19
  async list(
20
20
  oid: string,
21
- options: ContextListOptions,
21
+ options: ContextListOptions = {},
22
22
  request: SdkOptions = {}
23
23
  ): Promise<ContextListResult<TrashEntry>> {
24
24
  const { token } = request
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable max-len */
2
2
  import { test } from '@japa/runner'
3
- import { DOMParser, type Element, Node } from '@xmldom/xmldom'
3
+ import { DOMParser } from '@xmldom/xmldom'
4
4
  import { ApiSchemaGenerator } from '../../../src/amf/ApiSchemaGenerator.js'
5
5
  import { AmfLoader } from './AmfLoader.js'
6
6
  import { IAmfDocument } from '../../../src/amf/definitions/Amf.js'
@@ -75,8 +75,7 @@ test.group('XML serialization', (group) => {
75
75
 
76
76
  const objectElement = schema.getElementsByTagName('XmlSimpleArrayWrapped')[0]
77
77
  assert.ok(objectElement, 'has the XmlSimpleArrayWrapped element')
78
-
79
- const wrapped = objectElement.childNodes.filter((n) => n.nodeType === Node.ELEMENT_NODE)[0] as Element
78
+ const wrapped = Array.from(objectElement.childNodes).filter((n) => n.nodeType === 1)[0] as Element
80
79
  assert.ok(wrapped, 'has the wrapped node')
81
80
  assert.equal(wrapped.localName, 'books', 'has the wrapped element name')
82
81
 
@@ -105,7 +104,7 @@ test.group('XML serialization', (group) => {
105
104
  const objectElement = schema.getElementsByTagName('XmlSimpleArrayWrapped')[0]
106
105
  assert.ok(objectElement, 'has the XmlSimpleArrayWrapped element')
107
106
 
108
- const wrapped = objectElement.childNodes.filter((n) => n.nodeType === Node.ELEMENT_NODE)[0] as Element
107
+ const wrapped = Array.from(objectElement.childNodes).filter((n) => n.nodeType === 1)[0] as Element
109
108
  assert.ok(wrapped, 'has the wrapped node')
110
109
 
111
110
  const books = wrapped.getElementsByTagName('books')
@@ -650,8 +649,8 @@ test.group('XML serialization', (group) => {
650
649
  const root = schema.getElementsByTagName('XmlArray')[0]
651
650
  assert.ok(root, 'has the XmlArray node')
652
651
  assert.lengthOf(root.childNodes, 2, 'has 2 children')
653
- assert.equal(root.childNodes[0].localName, 'street', 'has the street child')
654
- assert.equal(root.childNodes[1].localName, 'city', 'has the city child')
652
+ assert.equal(root.childNodes[0].nodeName.toLowerCase(), 'street', 'has the street child')
653
+ assert.equal(root.childNodes[1].nodeName.toLowerCase(), 'city', 'has the city child')
655
654
  }).skip()
656
655
 
657
656
  test('serializes wrapped and renamed root array', async ({ assert }) => {
@@ -677,8 +676,8 @@ test.group('XML serialization', (group) => {
677
676
  const item = root.getElementsByTagName('address')[0]
678
677
  assert.ok(item, 'has the wrapped item')
679
678
  assert.lengthOf(item.childNodes, 2, 'has 2 children')
680
- assert.equal(item.childNodes[0].localName, 'city', 'has the city child')
681
- assert.equal(item.childNodes[1].localName, 'street', 'has the street child')
679
+ assert.equal(item.childNodes[0].nodeName.toLowerCase(), 'city', 'has the city child')
680
+ assert.equal(item.childNodes[1].nodeName.toLowerCase(), 'street', 'has the street child')
682
681
  }).skip()
683
682
 
684
683
  test('serializes schema from a library', async ({ assert }) => {