@api-client/core 0.6.13 → 0.6.16

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 (155) hide show
  1. package/build/browser.d.ts +9 -2
  2. package/build/browser.js +12 -2
  3. package/build/browser.js.map +1 -1
  4. package/build/index.d.ts +9 -2
  5. package/build/index.js +12 -2
  6. package/build/index.js.map +1 -1
  7. package/build/src/amf/AmfMixin.d.ts +395 -0
  8. package/build/src/amf/AmfMixin.js +1146 -0
  9. package/build/src/amf/AmfMixin.js.map +1 -0
  10. package/build/src/amf/AmfSerializer.d.ts +136 -0
  11. package/build/src/amf/AmfSerializer.js +1913 -0
  12. package/build/src/amf/AmfSerializer.js.map +1 -0
  13. package/build/src/amf/AmfShapeGenerator.d.ts +85 -0
  14. package/build/src/amf/AmfShapeGenerator.js +385 -0
  15. package/build/src/amf/AmfShapeGenerator.js.map +1 -0
  16. package/build/src/amf/AmfTypes.d.ts +24 -0
  17. package/build/src/amf/AmfTypes.js +122 -0
  18. package/build/src/amf/AmfTypes.js.map +1 -0
  19. package/build/src/amf/ApiExampleGenerator.d.ts +36 -0
  20. package/build/src/amf/ApiExampleGenerator.js +109 -0
  21. package/build/src/amf/ApiExampleGenerator.js.map +1 -0
  22. package/build/src/amf/ApiMonacoSchemaGenerator.d.ts +67 -0
  23. package/build/src/amf/ApiMonacoSchemaGenerator.js +243 -0
  24. package/build/src/amf/ApiMonacoSchemaGenerator.js.map +1 -0
  25. package/build/src/amf/ApiSchemaGenerator.d.ts +55 -0
  26. package/build/src/amf/ApiSchemaGenerator.js +94 -0
  27. package/build/src/amf/ApiSchemaGenerator.js.map +1 -0
  28. package/build/src/amf/ApiSchemaValues.d.ts +98 -0
  29. package/build/src/amf/ApiSchemaValues.js +382 -0
  30. package/build/src/amf/ApiSchemaValues.js.map +1 -0
  31. package/build/src/amf/Utils.d.ts +41 -0
  32. package/build/src/amf/Utils.js +176 -0
  33. package/build/src/amf/Utils.js.map +1 -0
  34. package/build/src/amf/data-node/DataNodeBase.d.ts +31 -0
  35. package/build/src/amf/data-node/DataNodeBase.js +77 -0
  36. package/build/src/amf/data-node/DataNodeBase.js.map +1 -0
  37. package/build/src/amf/data-node/JsonDataNodeGenerator.d.ts +15 -0
  38. package/build/src/amf/data-node/JsonDataNodeGenerator.js +24 -0
  39. package/build/src/amf/data-node/JsonDataNodeGenerator.js.map +1 -0
  40. package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.d.ts +13 -0
  41. package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js +42 -0
  42. package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js.map +1 -0
  43. package/build/src/amf/data-node/XmlDataNodeGenerator.d.ts +21 -0
  44. package/build/src/amf/data-node/XmlDataNodeGenerator.js +30 -0
  45. package/build/src/amf/data-node/XmlDataNodeGenerator.js.map +1 -0
  46. package/build/src/amf/definitions/Amf.d.ts +362 -0
  47. package/build/src/amf/definitions/Amf.js +2 -0
  48. package/build/src/amf/definitions/Amf.js.map +1 -0
  49. package/build/src/amf/definitions/Api.d.ts +381 -0
  50. package/build/src/amf/definitions/Api.js +2 -0
  51. package/build/src/amf/definitions/Api.js.map +1 -0
  52. package/build/src/amf/definitions/Base.d.ts +11 -0
  53. package/build/src/amf/definitions/Base.js +2 -0
  54. package/build/src/amf/definitions/Base.js.map +1 -0
  55. package/build/src/amf/definitions/Namespace.d.ts +311 -0
  56. package/build/src/amf/definitions/Namespace.js +330 -0
  57. package/build/src/amf/definitions/Namespace.js.map +1 -0
  58. package/build/src/amf/definitions/Shapes.d.ts +309 -0
  59. package/build/src/amf/definitions/Shapes.js +87 -0
  60. package/build/src/amf/definitions/Shapes.js.map +1 -0
  61. package/build/src/amf/models/AmfDataNode.d.ts +68 -0
  62. package/build/src/amf/models/AmfDataNode.js +188 -0
  63. package/build/src/amf/models/AmfDataNode.js.map +1 -0
  64. package/build/src/amf/shape/ShapeBase.d.ts +75 -0
  65. package/build/src/amf/shape/ShapeBase.js +90 -0
  66. package/build/src/amf/shape/ShapeBase.js.map +1 -0
  67. package/build/src/amf/shape/ShapeJsonSchemaGenerator.d.ts +46 -0
  68. package/build/src/amf/shape/ShapeJsonSchemaGenerator.js +406 -0
  69. package/build/src/amf/shape/ShapeJsonSchemaGenerator.js.map +1 -0
  70. package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts +84 -0
  71. package/build/src/amf/shape/ShapeXmlSchemaGenerator.js +820 -0
  72. package/build/src/amf/shape/ShapeXmlSchemaGenerator.js.map +1 -0
  73. package/build/src/models/Thing.d.ts +17 -0
  74. package/build/src/models/Thing.js +19 -1
  75. package/build/src/models/Thing.js.map +1 -1
  76. package/build/src/models/data/Bindings.d.ts +161 -0
  77. package/build/src/models/data/Bindings.js +2 -0
  78. package/build/src/models/data/Bindings.js.map +1 -0
  79. package/build/src/models/data/DataAssociation.d.ts +135 -14
  80. package/build/src/models/data/DataAssociation.js +154 -21
  81. package/build/src/models/data/DataAssociation.js.map +1 -1
  82. package/build/src/models/data/DataAssociationSchema.d.ts +36 -0
  83. package/build/src/models/data/DataEntity.d.ts +76 -4
  84. package/build/src/models/data/DataEntity.js +136 -9
  85. package/build/src/models/data/DataEntity.js.map +1 -1
  86. package/build/src/models/data/DataFile.d.ts +3 -0
  87. package/build/src/models/data/DataFile.js +3 -0
  88. package/build/src/models/data/DataFile.js.map +1 -1
  89. package/build/src/models/data/DataModel.d.ts +1 -1
  90. package/build/src/models/data/DataModel.js.map +1 -1
  91. package/build/src/models/data/DataNamespace.d.ts +6 -0
  92. package/build/src/models/data/DataNamespace.js +11 -1
  93. package/build/src/models/data/DataNamespace.js.map +1 -1
  94. package/build/src/models/data/DataProperty.d.ts +131 -36
  95. package/build/src/models/data/DataProperty.js +200 -17
  96. package/build/src/models/data/DataProperty.js.map +1 -1
  97. package/data/apis/oas-date/oas-date.yaml +28 -0
  98. package/data/apis/oas-types/oas-types.yaml +159 -0
  99. package/data/apis/oas-unions/oas-unions.yaml +75 -0
  100. package/data/apis/raml-date/raml-date.raml +28 -0
  101. package/data/apis/recursive/recursive.raml +14 -0
  102. package/data/apis/schema-api/examples/person.json +14 -0
  103. package/data/apis/schema-api/examples/person.raml +14 -0
  104. package/data/apis/schema-api/examples/person.url.encoded +1 -0
  105. package/data/apis/schema-api/examples/person.xml +14 -0
  106. package/data/apis/schema-api/library/demo-types.raml +43 -0
  107. package/data/apis/schema-api/schema-api.raml +644 -0
  108. package/data/apis/schema-api/schemas/person.json +104 -0
  109. package/data/apis/schema-api/schemas/person.xsd +26 -0
  110. package/data/apis/schema-api/types/DemoPerson.raml +67 -0
  111. package/data/model.js +106 -0
  112. package/data/models/oas-date.json +637 -0
  113. package/data/models/oas-types.json +5352 -0
  114. package/data/models/oas-unions.json +1881 -0
  115. package/data/models/raml-date.json +1096 -0
  116. package/data/models/recursive.json +610 -0
  117. package/data/models/schema-api.json +37319 -0
  118. package/package.json +9 -6
  119. package/src/amf/AmfMixin.ts +1623 -0
  120. package/src/amf/AmfSerializer.ts +2028 -0
  121. package/src/amf/AmfShapeGenerator.ts +400 -0
  122. package/src/amf/AmfTypes.ts +126 -0
  123. package/src/amf/ApiExampleGenerator.ts +112 -0
  124. package/src/amf/ApiMonacoSchemaGenerator.ts +296 -0
  125. package/src/amf/ApiSchemaGenerator.ts +108 -0
  126. package/src/amf/ApiSchemaValues.ts +411 -0
  127. package/src/amf/Utils.ts +182 -0
  128. package/src/amf/data-node/DataNodeBase.ts +81 -0
  129. package/src/amf/data-node/JsonDataNodeGenerator.ts +26 -0
  130. package/src/amf/data-node/README.md +3 -0
  131. package/src/amf/data-node/UrlEncodedDataNodeGenerator.ts +43 -0
  132. package/src/amf/data-node/XmlDataNodeGenerator.ts +38 -0
  133. package/src/amf/definitions/Amf.ts +443 -0
  134. package/src/amf/definitions/Api.ts +427 -0
  135. package/src/amf/definitions/Base.ts +13 -0
  136. package/src/amf/definitions/Namespace.ts +341 -0
  137. package/src/amf/definitions/Shapes.ts +414 -0
  138. package/src/amf/models/AmfDataNode.ts +200 -0
  139. package/src/amf/shape/README.md +4 -0
  140. package/src/amf/shape/ShapeBase.ts +160 -0
  141. package/src/amf/shape/ShapeJsonSchemaGenerator.ts +422 -0
  142. package/src/amf/shape/ShapeXmlSchemaGenerator.ts +876 -0
  143. package/src/models/Thing.ts +25 -1
  144. package/src/models/data/Bindings.ts +186 -0
  145. package/src/models/data/DataAssociation.ts +226 -29
  146. package/src/models/data/DataAssociationSchema.ts +38 -0
  147. package/src/models/data/DataEntity.ts +170 -13
  148. package/src/models/data/DataFile.ts +3 -0
  149. package/src/models/data/DataModel.ts +1 -1
  150. package/src/models/data/DataNamespace.ts +16 -1
  151. package/src/models/data/DataProperty.ts +250 -47
  152. package/build/src/models/data/DataPropertySchema.d.ts +0 -125
  153. package/build/src/models/data/DataPropertySchema.js +0 -33
  154. package/build/src/models/data/DataPropertySchema.js.map +0 -1
  155. package/src/models/data/DataPropertySchema.ts +0 -156
@@ -1,156 +0,0 @@
1
- export type NumberFormat = 'integer' | 'float' | 'long' | 'double' | 'int32' | 'int64' | 'uint32' | 'uint64' |
2
- 'sint32' | 'sint64' | 'fixed32' | 'fixed64' | 'sfixed32' | 'sfixed64';
3
- export const NumberFormats: NumberFormat[] = [
4
- 'integer', 'float', 'long', 'double', 'int32', 'int64', 'uint32', 'uint64', 'sint32', 'sint64', 'fixed32', 'fixed64',
5
- 'sfixed32', 'sfixed64'
6
- ];
7
-
8
- export enum NumberFormatList {
9
- integer = 'integer',
10
- float = 'float',
11
- int32 = 'int32',
12
- int64 = 'int64',
13
- uint32 = 'uint32',
14
- uint64 = 'uint64',
15
- sint32 = 'sint32',
16
- sint64 = 'sint64',
17
- fixed32 = 'fixed32',
18
- fixed64 = 'fixed64',
19
- sfixed32 = 'sfixed32',
20
- sfixed64 = 'sfixed64',
21
- double = 'double',
22
- }
23
-
24
- export type DateFormat = 'rfc3339' | 'rfc2616';
25
- export const DateFormats: DateFormat[] = ['rfc3339', 'rfc2616'];
26
- export enum DateFormatList {
27
- /**
28
- * The "date-time" notation of RFC3339
29
- */
30
- rfc3339 = 'rfc3339',
31
- /**
32
- * The format defined in RFC2616.
33
- */
34
- rfc2616 = 'rfc2616',
35
- }
36
-
37
- /**
38
- * The difference between the DataProperty and this is that the `DataProperty` describes the general shape of
39
- * the data and `IDataPropertySchema` describes how this property is translated into a specific format
40
- * (like JSON, Protocol Buffer, XML, etc)
41
- */
42
- export interface IDataPropertySchema<T> {
43
- // Common
44
-
45
- /**
46
- * The default value for the property.
47
- */
48
- default?: T;
49
-
50
- /**
51
- * Enum values for the property.
52
- */
53
- enum?: T[];
54
-
55
- /**
56
- * The example value for the property.
57
- */
58
- examples?: T[];
59
-
60
- /**
61
- * The format of a `number` or `datetime` type.
62
- */
63
- format?: NumberFormat | DateFormat;
64
-
65
- /**
66
- * Minimum length of the string or a file. Value MUST be equal to or greater than 0.
67
- */
68
- minLength?: number;
69
-
70
- /**
71
- * The minimum length of the string or a file. Value MUST be equal to or greater than 0.
72
- */
73
- maxLength?: number;
74
-
75
-
76
- // STRING
77
-
78
- /**
79
- * Regular expression that this string MUST match.
80
- */
81
- pattern?: string;
82
-
83
- // NUMBER
84
-
85
- /**
86
- * The minimum value.
87
- */
88
- minimum?: number;
89
-
90
- /**
91
- * The maximum value.
92
- */
93
- maximum?: number;
94
-
95
- /**
96
- * A numeric instance is valid against "multipleOf" if the result of dividing the instance by this
97
- * value is an integer.
98
- */
99
- multipleOf?: number;
100
-
101
- // File
102
-
103
- /**
104
- * A list of valid content-type strings for the file. The file type `*\/*` is a valid value.
105
- */
106
- fileTypes?: string[];
107
-
108
- // XML serialization
109
-
110
- /**
111
- * Describes XML specific serialization.
112
- */
113
- xml?: {
114
- /**
115
- * Whether is property should be represented as an attribute of the parent entity.
116
- *
117
- * ```
118
- * <Person name="John Doe"></Person>
119
- * ```
120
- */
121
- attribute?: boolean;
122
-
123
- /**
124
- * The name of the attribute or a wrapped property to use when serializing the property.
125
- *
126
- * ```
127
- * <Person fullName="John Doe"></Person>
128
- * ```
129
- */
130
- name?: string;
131
-
132
- /**
133
- * When the property is an array (has the `multiple` set to true)
134
- * then it tells that the list of values should be wrapped with a parent
135
- * element:
136
- *
137
- * ```
138
- * <Person>
139
- * <Person fullName="John Doe"></Person>
140
- * </Person>
141
- * ```
142
- *
143
- * Use this with the combination with `name` to describe the name of the wrapped
144
- * element
145
- *
146
- * ```
147
- * <people>
148
- * <Person fullName="John Doe"></Person>
149
- * </people>
150
- * ```
151
- *
152
- * Note, this is mutually exclusive with `attribute`.
153
- */
154
- wrapped?: boolean;
155
- }
156
- }