@api-client/core 0.19.32 → 0.19.33

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 (210) hide show
  1. package/build/src/authorization/index.d.ts +10 -0
  2. package/build/src/authorization/index.d.ts.map +1 -0
  3. package/build/src/authorization/index.js +10 -0
  4. package/build/src/authorization/index.js.map +1 -0
  5. package/build/src/browser.d.ts +13 -143
  6. package/build/src/browser.d.ts.map +1 -1
  7. package/build/src/browser.js +10 -144
  8. package/build/src/browser.js.map +1 -1
  9. package/build/src/data/DataExtractor.d.ts +1 -2
  10. package/build/src/data/DataExtractor.d.ts.map +1 -1
  11. package/build/src/data/DataExtractor.js.map +1 -1
  12. package/build/src/data/index.d.ts +10 -0
  13. package/build/src/data/index.d.ts.map +1 -0
  14. package/build/src/data/index.js +10 -0
  15. package/build/src/data/index.js.map +1 -0
  16. package/build/src/events/Events.d.ts +3 -3
  17. package/build/src/events/index.d.ts +11 -0
  18. package/build/src/events/index.d.ts.map +1 -0
  19. package/build/src/events/index.js +4 -0
  20. package/build/src/events/index.js.map +1 -0
  21. package/build/src/exceptions/index.d.ts +8 -0
  22. package/build/src/exceptions/index.d.ts.map +1 -0
  23. package/build/src/exceptions/index.js +8 -0
  24. package/build/src/exceptions/index.js.map +1 -0
  25. package/build/src/index.d.ts +10 -138
  26. package/build/src/index.d.ts.map +1 -1
  27. package/build/src/index.js +11 -142
  28. package/build/src/index.js.map +1 -1
  29. package/build/src/mocking/lib/User.d.ts.map +1 -1
  30. package/build/src/mocking/lib/User.js +1 -1
  31. package/build/src/mocking/lib/User.js.map +1 -1
  32. package/build/src/modeling/ai/DataDomainDelta.d.ts +3 -3
  33. package/build/src/modeling/ai/DataDomainDelta.d.ts.map +1 -1
  34. package/build/src/modeling/ai/DataDomainDelta.js +3 -3
  35. package/build/src/modeling/ai/DataDomainDelta.js.map +1 -1
  36. package/build/src/modeling/amf/index.d.ts +4 -0
  37. package/build/src/modeling/amf/index.d.ts.map +1 -0
  38. package/build/src/modeling/amf/index.js +4 -0
  39. package/build/src/modeling/amf/index.js.map +1 -0
  40. package/build/src/modeling/index.d.ts +18 -1
  41. package/build/src/modeling/index.d.ts.map +1 -1
  42. package/build/src/modeling/index.js +14 -1
  43. package/build/src/modeling/index.js.map +1 -1
  44. package/build/src/models/index.d.ts +64 -0
  45. package/build/src/models/index.d.ts.map +1 -0
  46. package/build/src/models/index.js +68 -0
  47. package/build/src/models/index.js.map +1 -0
  48. package/build/src/models/store/CustomDomain.d.ts +1 -1
  49. package/build/src/models/store/CustomDomain.d.ts.map +1 -1
  50. package/build/src/models/store/CustomDomain.js +2 -2
  51. package/build/src/models/store/CustomDomain.js.map +1 -1
  52. package/build/src/models/store/{data_catalog.d.ts → DataCatalog.d.ts} +1 -1
  53. package/build/src/models/store/DataCatalog.d.ts.map +1 -0
  54. package/build/src/models/store/DataCatalog.js +2 -0
  55. package/build/src/models/store/DataCatalog.js.map +1 -0
  56. package/build/src/models/store/DeploymentCustomDomain.d.ts +1 -1
  57. package/build/src/models/store/DeploymentCustomDomain.d.ts.map +1 -1
  58. package/build/src/models/store/DeploymentCustomDomain.js +2 -2
  59. package/build/src/models/store/DeploymentCustomDomain.js.map +1 -1
  60. package/build/src/models/store/File.d.ts.map +1 -1
  61. package/build/src/models/store/File.js +1 -2
  62. package/build/src/models/store/File.js.map +1 -1
  63. package/build/src/models/store/User.d.ts +3 -3
  64. package/build/src/models/store/User.d.ts.map +1 -1
  65. package/build/src/models/store/User.js +1 -1
  66. package/build/src/models/store/User.js.map +1 -1
  67. package/build/src/models/store/index.d.ts +17 -0
  68. package/build/src/models/store/index.d.ts.map +1 -0
  69. package/build/src/models/store/index.js +10 -0
  70. package/build/src/models/store/index.js.map +1 -0
  71. package/build/src/patch/index.d.ts +3 -0
  72. package/build/src/patch/index.d.ts.map +1 -0
  73. package/build/src/patch/index.js +2 -0
  74. package/build/src/patch/index.js.map +1 -0
  75. package/build/src/sdk/GroupsSdk.d.ts +1 -1
  76. package/build/src/sdk/GroupsSdk.d.ts.map +1 -1
  77. package/build/src/sdk/GroupsSdk.js.map +1 -1
  78. package/build/src/sdk/StoreSdkNode.d.ts +0 -4
  79. package/build/src/sdk/StoreSdkNode.d.ts.map +1 -1
  80. package/build/src/sdk/StoreSdkNode.js.map +1 -1
  81. package/build/src/sdk/StoreSdkWeb.d.ts +1 -5
  82. package/build/src/sdk/StoreSdkWeb.d.ts.map +1 -1
  83. package/build/src/sdk/StoreSdkWeb.js +1 -1
  84. package/build/src/sdk/StoreSdkWeb.js.map +1 -1
  85. package/build/src/sdk/index.d.ts +8 -0
  86. package/build/src/sdk/index.d.ts.map +1 -0
  87. package/build/src/sdk/index.js +3 -0
  88. package/build/src/sdk/index.js.map +1 -0
  89. package/build/tsconfig.tsbuildinfo +1 -1
  90. package/package.json +1 -1
  91. package/src/data/DataExtractor.ts +1 -1
  92. package/src/mocking/lib/User.ts +2 -1
  93. package/src/modeling/ai/DataDomainDelta.ts +5 -11
  94. package/src/models/store/CustomDomain.ts +2 -2
  95. package/src/models/store/DeploymentCustomDomain.ts +2 -2
  96. package/src/models/store/File.ts +2 -2
  97. package/src/models/store/User.ts +3 -4
  98. package/src/sdk/GroupsSdk.ts +1 -1
  99. package/src/sdk/StoreSdkNode.ts +0 -11
  100. package/src/sdk/StoreSdkWeb.ts +1 -12
  101. package/tests/unit/authorization/SecurityProcessor.spec.ts +2 -1
  102. package/tests/unit/data/JmesparthReader.spec.ts +1 -1
  103. package/tests/unit/data/JsonReader.spec.ts +1 -1
  104. package/tests/unit/data/PayloadPointer.spec.ts +1 -1
  105. package/tests/unit/data/RequestDataExtractor.spec.ts +9 -13
  106. package/tests/unit/data/UrlEncodedReader.spec.ts +1 -1
  107. package/tests/unit/data/XmlReader.spec.ts +1 -1
  108. package/tests/unit/mocking/current/Certificates.spec.ts +1 -1
  109. package/tests/unit/mocking/current/HostRules.spec.ts +1 -1
  110. package/tests/unit/mocking/current/Urls.spec.ts +1 -1
  111. package/tests/unit/mocking/current/User.spec.ts +2 -2
  112. package/tests/unit/modeling/ai/DataDomainDelta.spec.ts +1 -1
  113. package/tests/unit/modeling/ai/DomainSerialization.spec.ts +1 -1
  114. package/tests/unit/modeling/ai/tools/DataDomain.tools.spec.ts +1 -1
  115. package/tests/unit/modeling/amf/shape_generator.spec.ts +1 -1
  116. package/tests/unit/modeling/api_model.spec.ts +2 -3
  117. package/tests/unit/modeling/api_model_expose_entity.spec.ts +1 -1
  118. package/tests/unit/modeling/api_model_remove_entity.spec.ts +1 -1
  119. package/tests/unit/modeling/data_domain.spec.ts +2 -1
  120. package/tests/unit/modeling/data_domain_change_observers.spec.ts +1 -1
  121. package/tests/unit/modeling/data_domain_serialization.spec.ts +2 -2
  122. package/tests/unit/modeling/definitions/phone.spec.ts +1 -1
  123. package/tests/unit/modeling/domain_asociation.spec.ts +34 -34
  124. package/tests/unit/modeling/domain_asociation_targets.spec.ts +1 -1
  125. package/tests/unit/modeling/domain_entity.spec.ts +3 -9
  126. package/tests/unit/modeling/domain_entity_associations.spec.ts +1 -1
  127. package/tests/unit/modeling/domain_entity_example_generator_json.spec.ts +1 -1
  128. package/tests/unit/modeling/domain_entity_example_generator_xml.spec.ts +1 -1
  129. package/tests/unit/modeling/domain_entity_fields.spec.ts +1 -1
  130. package/tests/unit/modeling/domain_entity_generators.spec.ts +1 -1
  131. package/tests/unit/modeling/domain_entity_parents.spec.ts +1 -1
  132. package/tests/unit/modeling/domain_entity_properties.spec.ts +2 -1
  133. package/tests/unit/modeling/domain_file.spec.ts +2 -1
  134. package/tests/unit/modeling/domain_impact_analysis.spec.ts +5 -3
  135. package/tests/unit/modeling/domain_model.spec.ts +3 -8
  136. package/tests/unit/modeling/domain_model_entities.spec.ts +2 -1
  137. package/tests/unit/modeling/domain_namespace.spec.ts +3 -9
  138. package/tests/unit/modeling/domain_namespace_models.spec.ts +1 -1
  139. package/tests/unit/modeling/domain_namespace_namespaces.spec.ts +1 -1
  140. package/tests/unit/modeling/domain_property.spec.ts +3 -1
  141. package/tests/unit/modeling/domain_validation.spec.ts +1 -1
  142. package/tests/unit/modeling/domain_versioning.spec.ts +1 -1
  143. package/tests/unit/modeling/exposed_entity.spec.ts +1 -1
  144. package/tests/unit/modeling/exposed_entity_setter_validation.spec.ts +1 -1
  145. package/tests/unit/modeling/helpers/intellisense.spec.ts +1 -1
  146. package/tests/unit/modeling/importers/json_schema_importer.spec.ts +1 -1
  147. package/tests/unit/modeling/validation/association_validation.spec.ts +1 -1
  148. package/tests/unit/modeling/validation/entity_validation.spec.ts +1 -1
  149. package/tests/unit/modeling/validation/property_validation.spec.ts +1 -1
  150. package/tests/unit/models/Certificate/from_name.spec.ts +2 -1
  151. package/tests/unit/models/File/addLabel.spec.ts +1 -1
  152. package/tests/unit/models/File/constructor.spec.ts +2 -1
  153. package/tests/unit/models/File/createFileCapabilities.spec.ts +1 -1
  154. package/tests/unit/models/File/new.spec.ts +2 -1
  155. package/tests/unit/models/File/setDeleted.spec.ts +1 -1
  156. package/tests/unit/models/File/setLastModified.spec.ts +1 -1
  157. package/tests/unit/models/File/shortcutTo.spec.ts +1 -1
  158. package/tests/unit/models/File/toJSON.spec.ts +2 -1
  159. package/tests/unit/models/File/updateByMeMeta.spec.ts +1 -1
  160. package/tests/unit/models/Folder/consume.spec.ts +2 -1
  161. package/tests/unit/models/Folder/create.spec.ts +2 -1
  162. package/tests/unit/models/Permission/all.spec.ts +1 -1
  163. package/tests/unit/models/Project/consume.spec.ts +1 -1
  164. package/tests/unit/models/Project/create.spec.ts +1 -1
  165. package/tests/unit/models/certificate.spec.ts +2 -7
  166. package/tests/unit/models/host_rule.spec.ts +1 -1
  167. package/tests/unit/models/http_project.spec.ts +1 -1
  168. package/tests/unit/models/http_request.spec.ts +2 -9
  169. package/tests/unit/models/http_response.spec.ts +2 -1
  170. package/tests/unit/models/license.spec.ts +1 -1
  171. package/tests/unit/models/response.spec.ts +2 -2
  172. package/tests/unit/models/store/CustomDomain.spec.ts +8 -8
  173. package/tests/unit/models/store/DeploymentCustomDomain.spec.ts +9 -9
  174. package/tests/unit/models/store/Invitation.spec.ts +1 -1
  175. package/tests/unit/runtime/http-engine/abort.spec.ts +2 -8
  176. package/tests/unit/runtime/http-engine/auth.spec.ts +2 -1
  177. package/tests/unit/runtime/http-engine/certificates.spec.ts +2 -1
  178. package/tests/unit/runtime/http-engine/cleanup.spec.ts +2 -1
  179. package/tests/unit/runtime/http-engine/compression.spec.ts +2 -1
  180. package/tests/unit/runtime/http-engine/core_engine.spec.ts +7 -11
  181. package/tests/unit/runtime/http-engine/events.spec.ts +2 -1
  182. package/tests/unit/runtime/http-engine/headers.spec.ts +2 -9
  183. package/tests/unit/runtime/http-engine/hosts.spec.ts +2 -1
  184. package/tests/unit/runtime/http-engine/http-get.spec.ts +2 -1
  185. package/tests/unit/runtime/http-engine/http-post.spec.ts +2 -9
  186. package/tests/unit/runtime/http-engine/logger.spec.ts +2 -1
  187. package/tests/unit/runtime/http-engine/message.spec.ts +2 -8
  188. package/tests/unit/runtime/http-engine/params.spec.ts +2 -10
  189. package/tests/unit/runtime/http-engine/proxy.spec.ts +2 -10
  190. package/tests/unit/runtime/http-engine/redirects.spec.ts +4 -6
  191. package/tests/unit/runtime/http-engine/request_utils.spec.ts +2 -1
  192. package/tests/unit/runtime/http-engine/responses.spec.ts +2 -10
  193. package/tests/unit/runtime/http-engine/timeout.spec.ts +2 -8
  194. package/tests/unit/runtime/http-engine/timings.spec.ts +2 -1
  195. package/tests/unit/runtime/proxy/HttpProjectProxy.spec.ts +3 -8
  196. package/tests/unit/runtime/proxy/RequestProxy.spec.ts +6 -7
  197. package/tests/unit/runtime/reporters/project_run_cli_reporter.spec.ts +2 -7
  198. package/tests/unit/runtime/runners/http_assertion_runner.spec.ts +2 -2
  199. package/tests/unit/runtime/runners/http_flow_runner.spec.ts +2 -2
  200. package/tests/unit/runtime/runners/parallel_runner.spec.ts +2 -2
  201. package/tests/unit/runtime/runners/project_runner.spec.ts +2 -5
  202. package/tests/unit/runtime/runners/request_runner.spec.ts +2 -5
  203. package/tests/unit/runtime/runners/serial_runner.spec.ts +2 -3
  204. package/tests/unit/runtime/variables/variables_processor.spec.ts +2 -1
  205. package/tsconfig.browser.json +3 -4
  206. package/tsconfig.node.json +1 -3
  207. package/build/src/models/store/data_catalog.d.ts.map +0 -1
  208. package/build/src/models/store/data_catalog.js +0 -2
  209. package/build/src/models/store/data_catalog.js.map +0 -1
  210. /package/src/models/store/{data_catalog.ts → DataCatalog.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { test } from '@japa/runner'
2
- import { Project, ProjectKind } from '../../../../src/index.js'
2
+ import { Project, ProjectKind } from '../../../../src/models/index.js'
3
3
 
4
4
  test.group('Project.toJSON()', () => {
5
5
  test('serializes the kind', ({ assert }) => {
@@ -1,5 +1,5 @@
1
1
  import { test } from '@japa/runner'
2
- import { HttpProject, IProject, Project, ProjectKind, ThingKind } from '../../../../src/index.js'
2
+ import { HttpProject, IProject, Project, ProjectKind, ThingKind } from '../../../../src/models/index.js'
3
3
 
4
4
  test.group('Project.fromProject()', () => {
5
5
  test('sets the kind', ({ assert }) => {
@@ -1,11 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import {
3
- Certificate,
4
- CertificateKind,
5
- IP12Certificate,
6
- IPemCertificate,
7
- Buffer as CoreBuffer,
8
- } from '../../../src/index.js'
2
+ import { Certificate, CertificateKind, IP12Certificate, IPemCertificate } from '../../../src/models/index.js'
3
+ import { Buffer as CoreBuffer } from '../../../src/index.js'
9
4
  import { fileToBuffer } from '../../../src/lib/Buffer.js'
10
5
 
11
6
  const { bufferToBase64 } = CoreBuffer
@@ -1,5 +1,5 @@
1
1
  import { test } from '@japa/runner'
2
- import { HostRule, HostRuleKind, IHostRule } from '../../../src/index.js'
2
+ import { HostRule, HostRuleKind, IHostRule } from '../../../src/models/index.js'
3
3
 
4
4
  test.group('Default project initialization', () => {
5
5
  test('initializes a default rule', ({ assert }) => {
@@ -14,7 +14,7 @@ import {
14
14
  ProviderKind,
15
15
  ServerKind,
16
16
  ThingKind,
17
- } from '../../../src/index.js'
17
+ } from '../../../src/models/index.js'
18
18
  import { ArcLegacyProject, ARCSavedRequest, LegacyMock } from '../../../src/legacy.js'
19
19
 
20
20
  const generator = new LegacyMock()
@@ -1,13 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import {
3
- HeadersArray,
4
- HttpRequest,
5
- HttpRequestKind,
6
- IHttpRequest,
7
- ISafePayload,
8
- PayloadSerializer,
9
- Property,
10
- } from '../../../src/index.js'
2
+ import { HeadersArray, HttpRequest, HttpRequestKind, IHttpRequest, Property } from '../../../src/models/index.js'
3
+ import { ISafePayload, PayloadSerializer } from '../../../src/index.js'
11
4
 
12
5
  test.group('Default request initialization', () => {
13
6
  test('initializes a default project', ({ assert }) => {
@@ -1,5 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import { HttpResponse, HttpResponseKind, IHttpResponse, ISafePayload, PayloadSerializer } from '../../../src/index.js'
2
+ import { HttpResponse, HttpResponseKind, IHttpResponse } from '../../../src/models/index.js'
3
+ import { ISafePayload, PayloadSerializer } from '../../../src/index.js'
3
4
 
4
5
  test.group('Default response initialization', () => {
5
6
  test('initializes a default project', ({ assert }) => {
@@ -1,5 +1,5 @@
1
1
  import { test } from '@japa/runner'
2
- import { ILicense, License, LicenseKind, Property } from '../../../src/index.js'
2
+ import { ILicense, License, LicenseKind, Property } from '../../../src/models/index.js'
3
3
 
4
4
  test.group('Default project initialization', () => {
5
5
  test('initializes a default rule', ({ assert }) => {
@@ -3,10 +3,10 @@ import {
3
3
  ErrorResponse,
4
4
  Response,
5
5
  IResponse,
6
- ISafePayload,
7
6
  ResponseAuthorizationKind,
8
7
  ResponseKind,
9
- } from '../../../src/index.js'
8
+ } from '../../../src/models/index.js'
9
+ import { ISafePayload } from '../../../src/index.js'
10
10
 
11
11
  test.group('Default response initialization', () => {
12
12
  test('initializes a default project', ({ assert }) => {
@@ -1,10 +1,10 @@
1
1
  import { test } from '@japa/runner'
2
- import { CustomDomainModel } from '../../../../src/models/store/CustomDomain.js'
2
+ import { CustomDomain } from '../../../../src/models/store/CustomDomain.js'
3
3
  import type { CustomDomainSchema } from '../../../../src/models/store/CustomDomain.js'
4
4
 
5
5
  test.group('CustomDomain model', () => {
6
6
  test('createSchema() returns default values', ({ assert }) => {
7
- const result = CustomDomainModel.createSchema()
7
+ const result = CustomDomain.createSchema()
8
8
  assert.isString(result.id)
9
9
  assert.equal(result.orgId, '')
10
10
  assert.equal(result.domain, '')
@@ -26,7 +26,7 @@ test.group('CustomDomain model', () => {
26
26
  createdAt: 12345,
27
27
  updatedAt: 67890,
28
28
  }
29
- const result = CustomDomainModel.createSchema(init)
29
+ const result = CustomDomain.createSchema(init)
30
30
  assert.equal(result.id, 'test-id')
31
31
  assert.equal(result.orgId, 'org-1')
32
32
  assert.equal(result.domain, 'api.example.com')
@@ -38,7 +38,7 @@ test.group('CustomDomain model', () => {
38
38
  })
39
39
 
40
40
  test('constructor() initializes with default values', ({ assert }) => {
41
- const model = new CustomDomainModel()
41
+ const model = new CustomDomain()
42
42
  assert.isString(model.id)
43
43
  assert.equal(model.orgId, '')
44
44
  assert.equal(model.domain, '')
@@ -55,7 +55,7 @@ test.group('CustomDomain model', () => {
55
55
  domain: 'api.example.com',
56
56
  dnsVerified: true,
57
57
  }
58
- const model = new CustomDomainModel(init)
58
+ const model = new CustomDomain(init)
59
59
  assert.equal(model.orgId, 'org-1')
60
60
  assert.equal(model.domain, 'api.example.com')
61
61
  assert.isTrue(model.dnsVerified)
@@ -72,7 +72,7 @@ test.group('CustomDomain model', () => {
72
72
  createdAt: 12345,
73
73
  updatedAt: 67890,
74
74
  }
75
- const model = new CustomDomainModel(init)
75
+ const model = new CustomDomain(init)
76
76
  const result = model.toJSON()
77
77
  assert.deepEqual(result, {
78
78
  id: 'test-id',
@@ -87,7 +87,7 @@ test.group('CustomDomain model', () => {
87
87
  })
88
88
 
89
89
  test('validate() returns errors for empty fields', ({ assert }) => {
90
- const model = new CustomDomainModel({
90
+ const model = new CustomDomain({
91
91
  domain: '',
92
92
  orgId: '',
93
93
  dnsTarget: '',
@@ -100,7 +100,7 @@ test.group('CustomDomain model', () => {
100
100
  })
101
101
 
102
102
  test('validate() returns no errors for valid model', ({ assert }) => {
103
- const model = new CustomDomainModel({
103
+ const model = new CustomDomain({
104
104
  domain: 'api.example.com',
105
105
  orgId: 'org-1',
106
106
  dnsTarget: 'target.example.com',
@@ -1,10 +1,10 @@
1
1
  import { test } from '@japa/runner'
2
- import { DeploymentCustomDomainModel, SslStatus } from '../../../../src/models/store/DeploymentCustomDomain.js'
2
+ import { DeploymentCustomDomain, SslStatus } from '../../../../src/models/store/DeploymentCustomDomain.js'
3
3
  import type { DeploymentCustomDomainSchema } from '../../../../src/models/store/DeploymentCustomDomain.js'
4
4
 
5
5
  test.group('DeploymentCustomDomain model', () => {
6
6
  test('createSchema() returns default values', ({ assert }) => {
7
- const result = DeploymentCustomDomainModel.createSchema()
7
+ const result = DeploymentCustomDomain.createSchema()
8
8
  assert.isString(result.id)
9
9
  assert.equal(result.deploymentId, '')
10
10
  assert.equal(result.customDomainId, '')
@@ -24,7 +24,7 @@ test.group('DeploymentCustomDomain model', () => {
24
24
  createdAt: 12345,
25
25
  updatedAt: 67890,
26
26
  }
27
- const result = DeploymentCustomDomainModel.createSchema(init)
27
+ const result = DeploymentCustomDomain.createSchema(init)
28
28
  assert.equal(result.id, 'test-id')
29
29
  assert.equal(result.deploymentId, 'dep-1')
30
30
  assert.equal(result.customDomainId, 'dom-1')
@@ -35,7 +35,7 @@ test.group('DeploymentCustomDomain model', () => {
35
35
  })
36
36
 
37
37
  test('constructor() initializes with default values', ({ assert }) => {
38
- const model = new DeploymentCustomDomainModel()
38
+ const model = new DeploymentCustomDomain()
39
39
  assert.isString(model.id)
40
40
  assert.equal(model.deploymentId, '')
41
41
  assert.equal(model.customDomainId, '')
@@ -51,7 +51,7 @@ test.group('DeploymentCustomDomain model', () => {
51
51
  customDomainId: 'dom-1',
52
52
  basePath: '/api',
53
53
  }
54
- const model = new DeploymentCustomDomainModel(init)
54
+ const model = new DeploymentCustomDomain(init)
55
55
  assert.equal(model.deploymentId, 'dep-1')
56
56
  assert.equal(model.customDomainId, 'dom-1')
57
57
  assert.equal(model.basePath, '/api')
@@ -67,7 +67,7 @@ test.group('DeploymentCustomDomain model', () => {
67
67
  createdAt: 12345,
68
68
  updatedAt: 67890,
69
69
  }
70
- const model = new DeploymentCustomDomainModel(init)
70
+ const model = new DeploymentCustomDomain(init)
71
71
  const result = model.toJSON()
72
72
  assert.deepEqual(result, {
73
73
  id: 'test-id',
@@ -81,7 +81,7 @@ test.group('DeploymentCustomDomain model', () => {
81
81
  })
82
82
 
83
83
  test('validate() returns errors for empty and invalid fields', ({ assert }) => {
84
- const model = new DeploymentCustomDomainModel({
84
+ const model = new DeploymentCustomDomain({
85
85
  basePath: '',
86
86
  deploymentId: '',
87
87
  customDomainId: '',
@@ -96,7 +96,7 @@ test.group('DeploymentCustomDomain model', () => {
96
96
  rule: 'notEmpty',
97
97
  })
98
98
 
99
- const modelInvalidPath = new DeploymentCustomDomainModel({
99
+ const modelInvalidPath = new DeploymentCustomDomain({
100
100
  basePath: 'api/path',
101
101
  deploymentId: 'dep-1',
102
102
  customDomainId: 'dom-1',
@@ -111,7 +111,7 @@ test.group('DeploymentCustomDomain model', () => {
111
111
  })
112
112
 
113
113
  test('validate() returns no errors for valid model', ({ assert }) => {
114
- const model = new DeploymentCustomDomainModel({
114
+ const model = new DeploymentCustomDomain({
115
115
  deploymentId: 'dep-1',
116
116
  customDomainId: 'dom-1',
117
117
  basePath: '/api',
@@ -1,5 +1,5 @@
1
1
  import { test } from '@japa/runner'
2
- import { Invitation, InvitationKind, type InvitationSchema, type DeletionSchema } from '../../../../src/index.js'
2
+ import { Invitation, InvitationKind, type InvitationSchema, type DeletionSchema } from '../../../../src/models/index.js'
3
3
  import { OperationType } from '@api-client/json/patch/types.js'
4
4
 
5
5
  const baseInput: Partial<InvitationSchema> = {
@@ -1,13 +1,7 @@
1
1
  import { test } from '@japa/runner'
2
2
  import net from 'net'
3
- import {
4
- createLogger,
5
- CoreEngine,
6
- IHttpRequest,
7
- HttpEngineOptions,
8
- IErrorResponse,
9
- ISerializedError,
10
- } from '../../../../src/index.js'
3
+ import { createLogger, CoreEngine, HttpEngineOptions } from '../../../../src/index.js'
4
+ import { IErrorResponse, IHttpRequest, ISerializedError } from '../../../../src/models/index.js'
11
5
 
12
6
  const logger = createLogger()
13
7
 
@@ -1,5 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import { CoreEngine, createLogger, IResponse, Response, RequestAuthorizationKind } from '../../../../src/index.js'
2
+ import { CoreEngine, createLogger } from '../../../../src/index.js'
3
+ import { IResponse, Response, RequestAuthorizationKind } from '../../../../src/models/index.js'
3
4
 
4
5
  const logger = createLogger()
5
6
 
@@ -1,6 +1,7 @@
1
1
  import { test } from '@japa/runner'
2
2
  import fs from 'fs'
3
- import { IResponse, Response, CoreEngine, HttpCertificate, createLogger } from '../../../../src/index.js'
3
+ import { CoreEngine, createLogger } from '../../../../src/index.js'
4
+ import { HttpCertificate, IResponse, Response } from '../../../../src/models/index.js'
4
5
 
5
6
  const logger = createLogger()
6
7
 
@@ -1,5 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import { Response, CoreEngine, IHttpRequest, Headers, ResponseRedirect } from '../../../../src/index.js'
2
+ import { CoreEngine, Headers } from '../../../../src/index.js'
3
+ import { IHttpRequest, Response, ResponseRedirect } from '../../../../src/models/index.js'
3
4
 
4
5
  test.group('Cleaning up', (group) => {
5
6
  let request: IHttpRequest
@@ -1,6 +1,7 @@
1
1
  import { test } from '@japa/runner'
2
2
  import zlib from 'zlib'
3
- import { IResponse, Response, createLogger, CoreEngine, IHttpRequest, Headers } from '../../../../src/index.js'
3
+ import { CoreEngine, createLogger, Headers } from '../../../../src/index.js'
4
+ import { IHttpRequest, IResponse, Response } from '../../../../src/models/index.js'
4
5
 
5
6
  const logger = createLogger()
6
7
 
@@ -1,20 +1,16 @@
1
1
  import { test } from '@japa/runner'
2
+ import { CoreEngine, HttpEngineOptions, Headers, PayloadSerializer, createLogger } from '../../../../src/index.js'
3
+ import { HttpEngineErrorFactory } from '../../../../src/runtime/http-engine/errors/index.js'
4
+ import { MessageBuilder } from '../../../../src/runtime/http-engine/message/index.js'
5
+ import { AuthManager } from '../../../../src/runtime/http-engine/auth/index.js'
6
+ import { ConnectionManager } from '../../../../src/runtime/http-engine/connections/index.js'
2
7
  import {
8
+ IHttpRequest,
3
9
  IResponse,
4
10
  Response,
5
- IHttpRequest,
6
11
  RequestTime,
7
- CoreEngine,
8
- HttpEngineOptions,
9
- Headers,
10
- PayloadSerializer,
11
12
  RequestAuthorizationKind,
12
- createLogger,
13
- } from '../../../../src/index.js'
14
- import { HttpEngineErrorFactory } from '../../../../src/runtime/http-engine/errors/index.js'
15
- import { MessageBuilder } from '../../../../src/runtime/http-engine/message/index.js'
16
- import { AuthManager } from '../../../../src/runtime/http-engine/auth/index.js'
17
- import { ConnectionManager } from '../../../../src/runtime/http-engine/connections/index.js'
13
+ } from '../../../../src/models/index.js'
18
14
 
19
15
  const logger = createLogger()
20
16
 
@@ -1,6 +1,7 @@
1
1
  import { test } from '@japa/runner'
2
2
  import sinon from 'sinon'
3
- import { createLogger, CoreEngine, IHttpRequest, HttpEngineOptions } from '../../../../src/index.js'
3
+ import { CoreEngine, createLogger, HttpEngineOptions } from '../../../../src/index.js'
4
+ import { IHttpRequest } from '../../../../src/models/index.js'
4
5
 
5
6
  const logger = createLogger()
6
7
 
@@ -1,13 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import {
3
- IResponse,
4
- Response,
5
- createLogger,
6
- CoreEngine,
7
- IHttpRequest,
8
- HttpEngineOptions,
9
- Headers,
10
- } from '../../../../src/index.js'
2
+ import { createLogger, CoreEngine, HttpEngineOptions, Headers } from '../../../../src/index.js'
3
+ import { IHttpRequest, IResponse, Response } from '../../../../src/models/index.js'
11
4
 
12
5
  const logger = createLogger()
13
6
 
@@ -1,5 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import { createLogger, CoreEngine, IHttpRequest, HttpEngineOptions, HostRuleKind } from '../../../../src/index.js'
2
+ import { CoreEngine, createLogger, HttpEngineOptions } from '../../../../src/index.js'
3
+ import { HostRuleKind, IHttpRequest } from '../../../../src/models/index.js'
3
4
 
4
5
  const logger = createLogger()
5
6
 
@@ -1,5 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import { createLogger, CoreEngine, IHttpRequest, HttpEngineOptions } from '../../../../src/index.js'
2
+ import { CoreEngine, createLogger, HttpEngineOptions } from '../../../../src/index.js'
3
+ import { IHttpRequest } from '../../../../src/models/index.js'
3
4
 
4
5
  const logger = createLogger()
5
6
 
@@ -1,13 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import {
3
- ISentRequest,
4
- IResponse,
5
- Response,
6
- createLogger,
7
- CoreEngine,
8
- IHttpRequest,
9
- HttpEngineOptions,
10
- } from '../../../../src/index.js'
2
+ import { CoreEngine, createLogger, HttpEngineOptions } from '../../../../src/index.js'
3
+ import { IHttpRequest, IResponse, Response, ISentRequest } from '../../../../src/models/index.js'
11
4
 
12
5
  const logger = createLogger()
13
6
 
@@ -1,5 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import { CoreEngine, IHttpRequest } from '../../../../src/index.js'
2
+ import { CoreEngine } from '../../../../src/index.js'
3
+ import { IHttpRequest } from '../../../../src/models/index.js'
3
4
 
4
5
  test.group('Logger', (group) => {
5
6
  let request: IHttpRequest
@@ -1,12 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import {
3
- createLogger,
4
- CoreEngine,
5
- IHttpRequest,
6
- HttpEngineOptions,
7
- RequestAuthorizationKind,
8
- PayloadSerializer,
9
- } from '../../../../src/index.js'
2
+ import { createLogger, CoreEngine, HttpEngineOptions, PayloadSerializer } from '../../../../src/index.js'
3
+ import { IHttpRequest, RequestAuthorizationKind } from '../../../../src/models/index.js'
10
4
 
11
5
  const logger = createLogger()
12
6
 
@@ -1,14 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import {
3
- IResponse,
4
- Response,
5
- createLogger,
6
- CoreEngine,
7
- IHttpRequest,
8
- HttpEngineOptions,
9
- HostRuleKind,
10
- IHostRule,
11
- } from '../../../../src/index.js'
2
+ import { createLogger, CoreEngine, HttpEngineOptions } from '../../../../src/index.js'
3
+ import { IResponse, Response, IHttpRequest, HostRuleKind, IHostRule } from '../../../../src/models/index.js'
12
4
 
13
5
  const logger = createLogger()
14
6
 
@@ -1,14 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import {
3
- IResponse,
4
- Response,
5
- IHttpRequest,
6
- RequestTime,
7
- CoreEngine,
8
- ResponseRedirect,
9
- HttpEngineOptions,
10
- createLogger,
11
- } from '../../../../src/index.js'
2
+ import { CoreEngine, HttpEngineOptions, createLogger } from '../../../../src/index.js'
3
+ import { IResponse, Response, IHttpRequest, RequestTime, ResponseRedirect } from '../../../../src/models/index.js'
12
4
 
13
5
  const logger = createLogger({ minLevel: 5 })
14
6
 
@@ -1,16 +1,14 @@
1
1
  import { test } from '@japa/runner'
2
+ import { CoreEngine, HttpEngineOptions, createLogger } from '../../../../src/index.js'
2
3
  import {
3
4
  ISentRequest,
5
+ IResponseRedirect,
6
+ HttpResponse,
4
7
  IResponse,
5
8
  Response,
6
- createLogger,
7
- CoreEngine,
8
9
  IHttpRequest,
9
- HttpEngineOptions,
10
10
  ResponseRedirect,
11
- IResponseRedirect,
12
- HttpResponse,
13
- } from '../../../../src/index.js'
11
+ } from '../../../../src/models/index.js'
14
12
 
15
13
  const logger = createLogger()
16
14
 
@@ -1,5 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import { IHttpRequest, Headers, HttpResponse, ResponseRedirect } from '../../../../src/index.js'
2
+ import { Headers } from '../../../../src/index.js'
3
+ import { IHttpRequest, HttpResponse, ResponseRedirect } from '../../../../src/models/index.js'
3
4
  import * as RequestUtils from '../../../../src/runtime/http-engine/RequestUtils.js'
4
5
 
5
6
  const requests: IHttpRequest[] = [
@@ -1,14 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import {
3
- IResponse,
4
- Response,
5
- createLogger,
6
- CoreEngine,
7
- IHttpRequest,
8
- HttpEngineOptions,
9
- Headers,
10
- IRequestsSize,
11
- } from '../../../../src/index.js'
2
+ import { createLogger, CoreEngine, HttpEngineOptions, Headers } from '../../../../src/index.js'
3
+ import { IResponse, Response, IHttpRequest, IRequestsSize } from '../../../../src/models/index.js'
12
4
 
13
5
  const logger = createLogger()
14
6
 
@@ -1,13 +1,7 @@
1
1
  import { test } from '@japa/runner'
2
2
  import sinon from 'sinon'
3
- import {
4
- createLogger,
5
- CoreEngine,
6
- IHttpRequest,
7
- HttpEngineOptions,
8
- IErrorResponse,
9
- ISerializedError,
10
- } from '../../../../src/index.js'
3
+ import { createLogger, CoreEngine, HttpEngineOptions } from '../../../../src/index.js'
4
+ import { IHttpRequest, IErrorResponse, ISerializedError } from '../../../../src/models/index.js'
11
5
 
12
6
  const logger = createLogger()
13
7
 
@@ -1,5 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import { IResponse, createLogger, CoreEngine, IRequestTime } from '../../../../src/index.js'
2
+ import { createLogger, CoreEngine } from '../../../../src/index.js'
3
+ import { IResponse, IRequestTime } from '../../../../src/models/index.js'
3
4
 
4
5
  const logger = createLogger()
5
6
 
@@ -1,15 +1,10 @@
1
1
  import { test } from '@japa/runner'
2
2
  import sinon from 'sinon'
3
3
  import { nanoid } from '../../../../src/nanoid.js'
4
- import {
5
- HttpProject,
6
- HttpProjectKind,
7
- IHttpProjectStoreProxyInit,
8
- IHttpProjectProxyInit,
9
- ProxyService,
10
- Exception,
11
- } from '../../../../src/index.js'
4
+ import { IHttpProjectStoreProxyInit, IHttpProjectProxyInit, ProxyService } from '../../../../src/index.js'
5
+ import { Exception } from '../../../../src/exceptions/index.js'
12
6
  import { HttpNode } from '../../../../src/sdk/HttpNode.js'
7
+ import { HttpProject, HttpProjectKind } from '../../../../src/models/index.js'
13
8
 
14
9
  test.group('net-store project', (group) => {
15
10
  let project: HttpProject
@@ -1,14 +1,13 @@
1
1
  import { test } from '@japa/runner'
2
+ import { IRequestProxyInit, ProxyService } from '../../../../src/index.js'
3
+ import { Exception } from '../../../../src/exceptions/index.js'
2
4
  import {
3
- IRequestProxyInit,
4
- HttpRequestKind,
5
5
  RequestLog,
6
- IBasicAuthorization,
7
- ProxyService,
8
- Exception,
9
- SetDataStep,
6
+ HttpRequestKind,
10
7
  SetVariableStep,
11
- } from '../../../../src/index.js'
8
+ SetDataStep,
9
+ IBasicAuthorization,
10
+ } from '../../../../src/models/index.js'
12
11
 
13
12
  test.group('RequestProxy', (group) => {
14
13
  let message: IRequestProxyInit
@@ -1,11 +1,6 @@
1
1
  import { test } from '@japa/runner'
2
- import {
3
- ProjectRunCliReporter,
4
- IProjectExecutionLog,
5
- IProjectExecutionIteration,
6
- TestCliHelper,
7
- ProjectMock,
8
- } from '../../../../src/index.js'
2
+ import { ProjectRunCliReporter, TestCliHelper, ProjectMock } from '../../../../src/index.js'
3
+ import { IProjectExecutionLog, IProjectExecutionIteration } from '../../../../src/models/index.js'
9
4
 
10
5
  test.group('ProjectRunCliReporter', () => {
11
6
  const mock = new ProjectMock()
@@ -21,12 +21,12 @@ import {
21
21
  NotOkAssertion,
22
22
  NotToBeAssertion,
23
23
  OkAssertion,
24
- PayloadSerializer,
25
24
  ReadDataSourceStep,
26
25
  ReadValueStep,
27
26
  ToBeAssertion,
28
27
  ToBeTypes,
29
- } from '../../../../src/index.js'
28
+ } from '../../../../src/models/index.js'
29
+ import { PayloadSerializer } from '../../../../src/index.js'
30
30
  import { HttpAssertionRunner } from '../../../../src/runtime/http-runner/HttpAssertionRunner.js'
31
31
  import driveList from '../../../resources/http/drive-list.js'
32
32
  import { AmfNamespace as ns } from '@api-client/amf-core'
@@ -7,7 +7,6 @@ import {
7
7
  ReadDataStep,
8
8
  SetVariableStep,
9
9
  FlowRequestDataEnum,
10
- InMemoryCookieJar,
11
10
  IHttpRequest,
12
11
  ISentRequest,
13
12
  Property,
@@ -20,7 +19,8 @@ import {
20
19
  OkAssertion,
21
20
  ReadDataSourceStep,
22
21
  ReadValueStep,
23
- } from '../../../../src/index.js'
22
+ } from '../../../../src/models/index.js'
23
+ import { InMemoryCookieJar } from '../../../../src/index.js'
24
24
  import { clearStore } from '../../../../src/cookies/InMemoryCookieJar.js'
25
25
  import { HttpFlowRunner } from '../../../../src/runtime/http-runner/HttpFlowRunner.js'
26
26
  import { AmfNamespace as ns } from '@api-client/amf-core'
@@ -8,8 +8,8 @@ import {
8
8
  ISentRequest,
9
9
  IResponse,
10
10
  ProjectFolder,
11
- ProjectParallelRunner,
12
- } from '../../../../src/index.js'
11
+ } from '../../../../src/models/index.js'
12
+ import { ProjectParallelRunner } from '../../../../src/index.js'
13
13
 
14
14
  test.group('Execution', (group) => {
15
15
  group.each.timeout(1000 * 15)