@api-client/core 0.14.10 → 0.15.1

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 (95) hide show
  1. package/RELEASE.md +163 -0
  2. package/RELEASE_SETUP.md +235 -0
  3. package/build/src/events/authorization/AuthorizationEvents.d.ts +1 -1
  4. package/build/src/events/authorization/AuthorizationEvents.d.ts.map +1 -1
  5. package/build/src/events/authorization/AuthorizationEvents.js +1 -1
  6. package/build/src/events/authorization/AuthorizationEvents.js.map +1 -1
  7. package/build/src/events/cookies/CookieEvents.d.ts +1 -1
  8. package/build/src/events/cookies/CookieEvents.d.ts.map +1 -1
  9. package/build/src/events/cookies/CookieEvents.js +1 -1
  10. package/build/src/events/cookies/CookieEvents.js.map +1 -1
  11. package/build/src/modeling/DomainImpactAnalysis.d.ts +22 -119
  12. package/build/src/modeling/DomainImpactAnalysis.d.ts.map +1 -1
  13. package/build/src/modeling/DomainImpactAnalysis.js +49 -155
  14. package/build/src/modeling/DomainImpactAnalysis.js.map +1 -1
  15. package/build/src/modeling/DomainValidation.d.ts +8 -0
  16. package/build/src/modeling/DomainValidation.d.ts.map +1 -0
  17. package/build/src/modeling/DomainValidation.js +99 -0
  18. package/build/src/modeling/DomainValidation.js.map +1 -0
  19. package/build/src/modeling/types.d.ts +70 -0
  20. package/build/src/modeling/types.d.ts.map +1 -1
  21. package/build/src/modeling/types.js.map +1 -1
  22. package/build/src/modeling/validation/rules.d.ts +2 -3
  23. package/build/src/modeling/validation/rules.d.ts.map +1 -1
  24. package/build/src/modeling/validation/rules.js.map +1 -1
  25. package/build/src/modeling/validation/semantic_validation.d.ts +31 -0
  26. package/build/src/modeling/validation/semantic_validation.d.ts.map +1 -0
  27. package/build/src/modeling/validation/semantic_validation.js +126 -0
  28. package/build/src/modeling/validation/semantic_validation.js.map +1 -0
  29. package/build/tsconfig.tsbuildinfo +1 -1
  30. package/noop.ts +3 -0
  31. package/package.json +9 -4
  32. package/src/events/authorization/AuthorizationEvents.ts +1 -1
  33. package/src/events/cookies/CookieEvents.ts +1 -1
  34. package/src/modeling/DomainImpactAnalysis.ts +54 -239
  35. package/src/modeling/DomainValidation.ts +105 -0
  36. package/src/modeling/types.ts +86 -0
  37. package/src/modeling/validation/rules.ts +2 -4
  38. package/src/modeling/validation/semantic_validation.ts +145 -0
  39. package/tests/unit/events/EventsTestHelpers.ts +16 -0
  40. package/tests/unit/events/amf.spec.ts +151 -0
  41. package/tests/unit/events/authorization.spec.ts +150 -0
  42. package/tests/unit/events/cookie.spec.ts +274 -0
  43. package/tests/unit/events/encryption.spec.ts +108 -0
  44. package/tests/unit/events/events_polyfills.ts +77 -0
  45. package/tests/unit/events/process.spec.ts +120 -0
  46. package/tests/unit/events/reporting.spec.ts +82 -0
  47. package/tests/unit/events/telemetry.spec.ts +224 -0
  48. package/tests/unit/events/transport.spec.ts +139 -0
  49. package/tests/unit/modeling/domain_impact_analysis.spec.ts +0 -110
  50. package/tests/unit/modeling/domain_validation.spec.ts +94 -0
  51. package/tests/unit/modeling/validation/semantic_validation.spec.ts +91 -0
  52. package/tests/unit/models/environment.spec.ts +574 -0
  53. package/tests/unit/models/error_response.spec.ts +183 -0
  54. package/tests/unit/models/headers_array.spec.ts +86 -0
  55. package/tests/unit/models/http-actions/assertion/equal_assertion.spec.ts +103 -0
  56. package/tests/unit/models/http-actions/assertion/greater_than_assertion.spec.ts +91 -0
  57. package/tests/unit/models/http-actions/assertion/includes_assertion.spec.ts +71 -0
  58. package/tests/unit/models/http-actions/assertion/less_than_assertion.spec.ts +91 -0
  59. package/tests/unit/models/http-actions/assertion/matches_assertion.spec.ts +71 -0
  60. package/tests/unit/models/http-actions/assertion/matches_schema_assertion.spec.ts +117 -0
  61. package/tests/unit/models/http-actions/assertion/not_equal_assertion.spec.ts +103 -0
  62. package/tests/unit/models/http-actions/assertion/not_includes_assertion.spec.ts +71 -0
  63. package/tests/unit/models/http-actions/assertion/not_ok_assertion.spec.ts +47 -0
  64. package/tests/unit/models/http-actions/assertion/not_to_be_assertion.spec.ts +72 -0
  65. package/tests/unit/models/http-actions/assertion/ok_assertion.spec.ts +44 -0
  66. package/tests/unit/models/http-actions/assertion/to_be_assertion.spec.ts +71 -0
  67. package/tests/unit/models/http-actions/transformation/as_lower_case_step.spec.ts +47 -0
  68. package/tests/unit/models/http-actions/transformation/as_number_step.spec.ts +47 -0
  69. package/tests/unit/models/http-actions/transformation/as_upper_case_step.spec.ts +47 -0
  70. package/tests/unit/models/http-actions/transformation/round_step.spec.ts +69 -0
  71. package/tests/unit/models/http-actions/transformation/substring_step.spec.ts +85 -0
  72. package/tests/unit/models/http-actions/transformation/trim_step.spec.ts +44 -0
  73. package/tests/unit/models/http_cookie.spec.ts +516 -0
  74. package/tests/unit/models/http_history.spec.ts +443 -0
  75. package/tests/unit/models/project_folder.spec.ts +926 -0
  76. package/tests/unit/models/project_item.spec.ts +137 -0
  77. package/tests/unit/models/project_request.spec.ts +1047 -0
  78. package/tests/unit/models/project_schema.spec.ts +236 -0
  79. package/tests/unit/models/property.spec.ts +625 -0
  80. package/tests/unit/models/provider.spec.ts +102 -0
  81. package/tests/unit/models/request.spec.ts +1206 -0
  82. package/tests/unit/models/request_log.spec.ts +308 -0
  83. package/tests/unit/models/request_time.spec.ts +138 -0
  84. package/tests/unit/models/response_redirect.spec.ts +303 -0
  85. package/tests/unit/models/sent_request.spec.ts +206 -0
  86. package/tests/unit/models/server.spec.ts +195 -0
  87. package/tests/unit/models/thing.spec.ts +154 -0
  88. package/build/oauth-popup.html +0 -33
  89. /package/tests/unit/models/{Certificate.spec.ts → certificate.spec.ts} +0 -0
  90. /package/tests/unit/models/{HostRule.spec.ts → host_rule.spec.ts} +0 -0
  91. /package/tests/unit/models/{HttpProject.spec.ts → http_project.spec.ts} +0 -0
  92. /package/tests/unit/models/{HttpRequest.spec.ts → http_request.spec.ts} +0 -0
  93. /package/tests/unit/models/{HttpResponse.spec.ts → http_response.spec.ts} +0 -0
  94. /package/tests/unit/models/{License.spec.ts → license.spec.ts} +0 -0
  95. /package/tests/unit/models/{Response.spec.ts → response.spec.ts} +0 -0
@@ -0,0 +1,47 @@
1
+ import { test } from '@japa/runner'
2
+ import { assert } from '@esm-bundle/chai'
3
+ import {
4
+ AsUpperCaseStep,
5
+ AsUpperCaseStepKind,
6
+ } from '../../../../../src/models/http-flows/steps/transformation/AsUpperCaseStep.js'
7
+
8
+ test.group('AsUpperCaseStep constructor()', () => {
9
+ test('initializes from the schema', () => {
10
+ const instance = new AsUpperCaseStep({
11
+ kind: AsUpperCaseStepKind,
12
+ enabled: false,
13
+ })
14
+ assert.isFalse(instance.enabled)
15
+ })
16
+
17
+ test('initializes empty class', () => {
18
+ const instance = new AsUpperCaseStep()
19
+ assert.equal(instance.kind, AsUpperCaseStepKind)
20
+ assert.isUndefined(instance.enabled)
21
+ })
22
+ })
23
+
24
+ test.group('AsUpperCaseStep checkValidity()', () => {
25
+ test('returns true', () => {
26
+ const instance = new AsUpperCaseStep()
27
+ assert.isTrue(instance.checkValidity())
28
+ })
29
+ })
30
+
31
+ test.group('AsUpperCaseStep toJSON()', () => {
32
+ test('serializes the kind', () => {
33
+ const instance = new AsUpperCaseStep()
34
+ assert.equal(instance.kind, AsUpperCaseStepKind)
35
+ })
36
+
37
+ test('serializes the enabled when set', () => {
38
+ const instance = new AsUpperCaseStep()
39
+ instance.enabled = true
40
+ assert.isTrue(instance.enabled)
41
+ })
42
+
43
+ test('ignores the enabled when not set', () => {
44
+ const instance = new AsUpperCaseStep()
45
+ assert.isUndefined(instance.enabled)
46
+ })
47
+ })
@@ -0,0 +1,69 @@
1
+ import { test } from '@japa/runner'
2
+ import { assert } from '@esm-bundle/chai'
3
+ import { RoundStep, RoundStepKind } from '../../../../../src/models/http-flows/steps/transformation/RoundStep.js'
4
+
5
+ test.group('RoundStep constructor()', () => {
6
+ test('initializes from values', () => {
7
+ const instance = new RoundStep(10)
8
+ assert.equal(instance.precision, 10)
9
+ assert.isTrue(instance.enabled)
10
+ })
11
+
12
+ test('initializes from the schema', () => {
13
+ const instance = new RoundStep({
14
+ kind: RoundStepKind,
15
+ precision: 5,
16
+ enabled: false,
17
+ })
18
+ assert.equal(instance.precision, 5)
19
+ assert.isFalse(instance.enabled)
20
+ })
21
+
22
+ test('initializes empty class', () => {
23
+ const instance = new RoundStep()
24
+ assert.equal(instance.kind, RoundStepKind)
25
+ assert.isUndefined(instance.enabled)
26
+ assert.isUndefined(instance.precision)
27
+ })
28
+ })
29
+
30
+ test.group('RoundStep checkValidity()', () => {
31
+ test('returns true with value', () => {
32
+ const instance = new RoundStep(10)
33
+ assert.isTrue(instance.checkValidity())
34
+ })
35
+
36
+ test('returns true when has no value', () => {
37
+ const instance = new RoundStep()
38
+ // default to 0
39
+ assert.isTrue(instance.checkValidity())
40
+ })
41
+ })
42
+
43
+ test.group('RoundStep toJSON()', () => {
44
+ test('serializes the kind', () => {
45
+ const instance = new RoundStep(10)
46
+ assert.equal(instance.kind, RoundStepKind)
47
+ })
48
+
49
+ test('serializes the precision when set', () => {
50
+ const instance = new RoundStep(10)
51
+ assert.equal(instance.precision, 10)
52
+ })
53
+
54
+ test('ignores the precision when not set', () => {
55
+ const instance = new RoundStep()
56
+ assert.isUndefined(instance.precision)
57
+ })
58
+
59
+ test('serializes the enabled when set', () => {
60
+ const instance = new RoundStep(10)
61
+ instance.enabled = true
62
+ assert.isTrue(instance.enabled)
63
+ })
64
+
65
+ test('ignores the enabled when not set', () => {
66
+ const instance = new RoundStep()
67
+ assert.isUndefined(instance.enabled)
68
+ })
69
+ })
@@ -0,0 +1,85 @@
1
+ import { test } from '@japa/runner'
2
+ import { assert } from '@esm-bundle/chai'
3
+ import {
4
+ SubstringStep,
5
+ SubstringStepKind,
6
+ } from '../../../../../src/models/http-flows/steps/transformation/SubstringStep.js'
7
+
8
+ test.group('SubstringStep constructor()', () => {
9
+ test('initializes from values', () => {
10
+ const instance = new SubstringStep(10, 20)
11
+ assert.equal(instance.start, 10)
12
+ assert.equal(instance.end, 20)
13
+ assert.isTrue(instance.enabled)
14
+ })
15
+
16
+ test('initializes from the schema', () => {
17
+ const instance = new SubstringStep({
18
+ kind: SubstringStepKind,
19
+ start: 5,
20
+ end: 10,
21
+ enabled: false,
22
+ })
23
+ assert.equal(instance.start, 5)
24
+ assert.equal(instance.end, 10)
25
+ assert.isFalse(instance.enabled)
26
+ })
27
+
28
+ test('initializes empty class', () => {
29
+ const instance = new SubstringStep()
30
+ assert.equal(instance.kind, SubstringStepKind)
31
+ assert.isUndefined(instance.enabled)
32
+ assert.isUndefined(instance.start)
33
+ assert.isUndefined(instance.end)
34
+ })
35
+ })
36
+
37
+ test.group('SubstringStep checkValidity()', () => {
38
+ test('returns true with start set', () => {
39
+ const instance = new SubstringStep(10)
40
+ assert.isTrue(instance.checkValidity())
41
+ })
42
+
43
+ test('returns false when has no start', () => {
44
+ const instance = new SubstringStep()
45
+ assert.isFalse(instance.checkValidity())
46
+ })
47
+ })
48
+
49
+ test.group('SubstringStep toJSON()', () => {
50
+ test('serializes the kind', () => {
51
+ const instance = new SubstringStep(10)
52
+ assert.equal(instance.kind, SubstringStepKind)
53
+ })
54
+
55
+ test('serializes the start when set', () => {
56
+ const instance = new SubstringStep(10)
57
+ assert.equal(instance.start, 10)
58
+ })
59
+
60
+ test('ignores the start when not set', () => {
61
+ const instance = new SubstringStep()
62
+ assert.isUndefined(instance.start)
63
+ })
64
+
65
+ test('serializes the end when set', () => {
66
+ const instance = new SubstringStep(10, 20)
67
+ assert.equal(instance.end, 20)
68
+ })
69
+
70
+ test('ignores the end when not set', () => {
71
+ const instance = new SubstringStep()
72
+ assert.isUndefined(instance.end)
73
+ })
74
+
75
+ test('serializes the enabled when set', () => {
76
+ const instance = new SubstringStep(10)
77
+ instance.enabled = true
78
+ assert.isTrue(instance.enabled)
79
+ })
80
+
81
+ test('ignores the enabled when not set', () => {
82
+ const instance = new SubstringStep()
83
+ assert.isUndefined(instance.enabled)
84
+ })
85
+ })
@@ -0,0 +1,44 @@
1
+ import { test } from '@japa/runner'
2
+ import { assert } from '@esm-bundle/chai'
3
+ import { TrimStep, TrimStepKind } from '../../../../../src/models/http-flows/steps/transformation/TrimStep.js'
4
+
5
+ test.group('TrimStep constructor()', () => {
6
+ test('initializes from the schema', () => {
7
+ const instance = new TrimStep({
8
+ kind: TrimStepKind,
9
+ enabled: false,
10
+ })
11
+ assert.isFalse(instance.enabled)
12
+ })
13
+
14
+ test('initializes empty class', () => {
15
+ const instance = new TrimStep()
16
+ assert.equal(instance.kind, TrimStepKind)
17
+ assert.isUndefined(instance.enabled)
18
+ })
19
+ })
20
+
21
+ test.group('TrimStep checkValidity()', () => {
22
+ test('returns true', () => {
23
+ const instance = new TrimStep()
24
+ assert.isTrue(instance.checkValidity())
25
+ })
26
+ })
27
+
28
+ test.group('TrimStep toJSON()', () => {
29
+ test('serializes the kind', () => {
30
+ const instance = new TrimStep()
31
+ assert.equal(instance.kind, TrimStepKind)
32
+ })
33
+
34
+ test('serializes the enabled when set', () => {
35
+ const instance = new TrimStep()
36
+ instance.enabled = true
37
+ assert.isTrue(instance.enabled)
38
+ })
39
+
40
+ test('ignores the enabled when not set', () => {
41
+ const instance = new TrimStep()
42
+ assert.isUndefined(instance.enabled)
43
+ })
44
+ })