angular-odata 0.126.0 → 0.128.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 (283) hide show
  1. package/esm2022/lib/annotations.mjs +140 -0
  2. package/esm2022/lib/api.mjs +211 -166
  3. package/esm2022/lib/cache/cache.mjs +1 -1
  4. package/esm2022/lib/cache/memory.mjs +1 -1
  5. package/esm2022/lib/client.mjs +8 -48
  6. package/esm2022/lib/constants.mjs +4 -1
  7. package/esm2022/lib/index.mjs +3 -1
  8. package/esm2022/lib/loaders.mjs +23 -17
  9. package/esm2022/lib/metadata/csdl/csdl-annotation.mjs +95 -0
  10. package/esm2022/lib/metadata/csdl/csdl-entity-container.mjs +27 -0
  11. package/esm2022/lib/metadata/csdl/csdl-entity-set.mjs +24 -0
  12. package/esm2022/lib/metadata/csdl/csdl-enum-type.mjs +37 -0
  13. package/esm2022/lib/metadata/csdl/csdl-function-action.mjs +94 -0
  14. package/esm2022/lib/metadata/csdl/csdl-navigation-property-binding.mjs +7 -0
  15. package/esm2022/lib/metadata/csdl/csdl-reference.mjs +23 -0
  16. package/esm2022/lib/metadata/csdl/csdl-schema.mjs +39 -0
  17. package/esm2022/lib/metadata/csdl/csdl-singleton.mjs +15 -0
  18. package/esm2022/lib/metadata/csdl/csdl-structural-property.mjs +70 -0
  19. package/esm2022/lib/metadata/csdl/csdl-structured-type.mjs +92 -0
  20. package/esm2022/lib/metadata/csdl/csdl-type-definition.mjs +15 -0
  21. package/esm2022/lib/metadata/index.mjs +3 -0
  22. package/esm2022/lib/metadata/metadata.mjs +14 -0
  23. package/esm2022/lib/metadata/parser.mjs +563 -0
  24. package/esm2022/lib/models/collection.mjs +202 -207
  25. package/esm2022/lib/models/model.mjs +48 -52
  26. package/esm2022/lib/models/options.mjs +172 -137
  27. package/esm2022/lib/module.mjs +21 -8
  28. package/esm2022/lib/options.mjs +2 -1
  29. package/esm2022/lib/resources/index.mjs +2 -2
  30. package/esm2022/lib/resources/options.mjs +56 -0
  31. package/esm2022/lib/resources/path/handlers.mjs +14 -4
  32. package/esm2022/lib/resources/path/segments.mjs +29 -11
  33. package/esm2022/lib/resources/query/builder.mjs +14 -2
  34. package/esm2022/lib/resources/query/expressions/apply.mjs +236 -0
  35. package/esm2022/lib/resources/query/expressions/base.mjs +1 -1
  36. package/esm2022/lib/resources/query/expressions/compute.mjs +2 -2
  37. package/esm2022/lib/resources/query/expressions/count.mjs +6 -6
  38. package/esm2022/lib/resources/query/expressions/expand.mjs +7 -7
  39. package/esm2022/lib/resources/query/expressions/filter.mjs +6 -6
  40. package/esm2022/lib/resources/query/expressions/index.mjs +2 -1
  41. package/esm2022/lib/resources/query/expressions/orderby.mjs +3 -3
  42. package/esm2022/lib/resources/query/expressions/search.mjs +6 -6
  43. package/esm2022/lib/resources/query/expressions/select.mjs +6 -2
  44. package/esm2022/lib/resources/query/expressions/syntax.mjs +161 -8
  45. package/esm2022/lib/resources/query/handlers.mjs +89 -54
  46. package/esm2022/lib/resources/query/options.mjs +91 -77
  47. package/esm2022/lib/resources/request.mjs +5 -5
  48. package/esm2022/lib/resources/resource.mjs +118 -88
  49. package/esm2022/lib/resources/response.mjs +174 -0
  50. package/esm2022/lib/resources/types/action.mjs +29 -26
  51. package/esm2022/lib/resources/types/batch.mjs +18 -16
  52. package/esm2022/lib/resources/types/count.mjs +7 -7
  53. package/esm2022/lib/resources/types/entity-set.mjs +38 -25
  54. package/esm2022/lib/resources/types/entity.mjs +14 -11
  55. package/esm2022/lib/resources/types/function.mjs +25 -28
  56. package/esm2022/lib/resources/types/metadata.mjs +9 -5
  57. package/esm2022/lib/resources/types/navigation-property.mjs +37 -31
  58. package/esm2022/lib/resources/types/property.mjs +32 -50
  59. package/esm2022/lib/resources/types/reference.mjs +6 -7
  60. package/esm2022/lib/resources/types/singleton.mjs +11 -7
  61. package/esm2022/lib/resources/types/value.mjs +16 -12
  62. package/esm2022/lib/schema/callable.mjs +10 -10
  63. package/esm2022/lib/schema/element.mjs +15 -9
  64. package/esm2022/lib/schema/entity-container.mjs +4 -2
  65. package/esm2022/lib/schema/enum-type.mjs +6 -7
  66. package/esm2022/lib/schema/index.mjs +2 -1
  67. package/esm2022/lib/schema/parsers/callable.mjs +10 -7
  68. package/esm2022/lib/schema/parsers/edm.mjs +6 -4
  69. package/esm2022/lib/schema/parsers/enum-type.mjs +15 -8
  70. package/esm2022/lib/schema/parsers/structured-type.mjs +66 -55
  71. package/esm2022/lib/schema/schema.mjs +18 -34
  72. package/esm2022/lib/schema/singleton.mjs +9 -0
  73. package/esm2022/lib/schema/structured-type.mjs +18 -23
  74. package/esm2022/lib/services/base.mjs +4 -4
  75. package/esm2022/lib/services/entity-set.mjs +12 -2
  76. package/esm2022/lib/services/entity.mjs +2 -2
  77. package/esm2022/lib/services/factory.mjs +22 -11
  78. package/esm2022/lib/services/singleton.mjs +8 -2
  79. package/esm2022/lib/settings.mjs +7 -99
  80. package/esm2022/lib/types.mjs +12 -1
  81. package/esm2022/lib/utils/http.mjs +8 -6
  82. package/fesm2022/angular-odata.mjs +7413 -6579
  83. package/fesm2022/angular-odata.mjs.map +1 -1
  84. package/lib/{resources/responses/annotations.d.ts → annotations.d.ts} +3 -2
  85. package/lib/api.d.ts +29 -26
  86. package/lib/cache/memory.d.ts +1 -1
  87. package/lib/client.d.ts +0 -20
  88. package/lib/constants.d.ts +3 -0
  89. package/lib/index.d.ts +1 -0
  90. package/lib/loaders.d.ts +7 -1
  91. package/lib/metadata/csdl/csdl-annotation.d.ts +123 -0
  92. package/lib/metadata/csdl/csdl-entity-container.d.ts +26 -0
  93. package/lib/metadata/csdl/csdl-entity-set.d.ts +20 -0
  94. package/lib/metadata/csdl/csdl-enum-type.d.ts +29 -0
  95. package/lib/metadata/csdl/csdl-function-action.d.ts +105 -0
  96. package/lib/metadata/csdl/csdl-navigation-property-binding.d.ts +8 -0
  97. package/lib/metadata/csdl/csdl-reference.d.ts +30 -0
  98. package/lib/metadata/csdl/csdl-schema.d.ts +34 -0
  99. package/lib/metadata/csdl/csdl-singleton.d.ts +16 -0
  100. package/lib/metadata/csdl/csdl-structural-property.d.ts +70 -0
  101. package/lib/metadata/csdl/csdl-structured-type.d.ts +73 -0
  102. package/lib/metadata/csdl/csdl-type-definition.d.ts +22 -0
  103. package/lib/metadata/index.d.ts +2 -0
  104. package/lib/metadata/metadata.d.ts +10 -0
  105. package/lib/{resources/responses/metadata.d.ts → metadata/parser.d.ts} +19 -7
  106. package/lib/models/collection.d.ts +23 -12
  107. package/lib/models/model.d.ts +19 -19
  108. package/lib/models/options.d.ts +43 -27
  109. package/lib/module.d.ts +2 -1
  110. package/lib/options.d.ts +5 -0
  111. package/lib/resources/index.d.ts +1 -1
  112. package/lib/resources/{responses/options.d.ts → options.d.ts} +2 -2
  113. package/lib/resources/path/handlers.d.ts +4 -2
  114. package/lib/resources/path/segments.d.ts +13 -1
  115. package/lib/resources/query/builder.d.ts +6 -5
  116. package/lib/resources/query/expressions/apply.d.ts +125 -0
  117. package/lib/resources/query/expressions/base.d.ts +1 -1
  118. package/lib/resources/query/expressions/compute.d.ts +4 -4
  119. package/lib/resources/query/expressions/count.d.ts +3 -3
  120. package/lib/resources/query/expressions/expand.d.ts +8 -8
  121. package/lib/resources/query/expressions/filter.d.ts +3 -3
  122. package/lib/resources/query/expressions/index.d.ts +1 -0
  123. package/lib/resources/query/expressions/orderby.d.ts +7 -6
  124. package/lib/resources/query/expressions/search.d.ts +2 -2
  125. package/lib/resources/query/expressions/select.d.ts +4 -3
  126. package/lib/resources/query/expressions/syntax.d.ts +77 -4
  127. package/lib/resources/query/handlers.d.ts +32 -9
  128. package/lib/resources/query/options.d.ts +20 -10
  129. package/lib/resources/resource.d.ts +32 -16
  130. package/lib/resources/{responses/response.d.ts → response.d.ts} +17 -5
  131. package/lib/resources/types/action.d.ts +12 -10
  132. package/lib/resources/types/batch.d.ts +12 -6
  133. package/lib/resources/types/count.d.ts +1 -5
  134. package/lib/resources/types/entity-set.d.ts +13 -6
  135. package/lib/resources/types/entity.d.ts +3 -4
  136. package/lib/resources/types/function.d.ts +11 -11
  137. package/lib/resources/types/metadata.d.ts +1 -1
  138. package/lib/resources/types/navigation-property.d.ts +13 -7
  139. package/lib/resources/types/property.d.ts +15 -8
  140. package/lib/resources/types/reference.d.ts +2 -4
  141. package/lib/resources/types/singleton.d.ts +4 -6
  142. package/lib/resources/types/value.d.ts +2 -6
  143. package/lib/schema/callable.d.ts +5 -7
  144. package/lib/schema/element.d.ts +11 -4
  145. package/lib/schema/entity-container.d.ts +2 -0
  146. package/lib/schema/enum-type.d.ts +4 -7
  147. package/lib/schema/index.d.ts +1 -0
  148. package/lib/schema/parsers/callable.d.ts +7 -8
  149. package/lib/schema/parsers/enum-type.d.ts +15 -5
  150. package/lib/schema/parsers/structured-type.d.ts +6 -8
  151. package/lib/schema/schema.d.ts +6 -9
  152. package/lib/schema/singleton.d.ts +10 -0
  153. package/lib/schema/structured-type.d.ts +5 -8
  154. package/lib/services/entity-set.d.ts +7 -3
  155. package/lib/services/factory.d.ts +14 -2
  156. package/lib/services/singleton.d.ts +4 -2
  157. package/lib/settings.d.ts +0 -10
  158. package/lib/types.d.ts +23 -3
  159. package/lib/utils/http.d.ts +1 -1
  160. package/package.json +5 -1
  161. package/schematics/apigen/angular/api-config.d.ts +15 -0
  162. package/schematics/apigen/angular/api-config.js +34 -0
  163. package/schematics/apigen/angular/api-config.js.map +1 -0
  164. package/schematics/apigen/angular/base.d.ts +51 -0
  165. package/schematics/apigen/angular/base.js +200 -0
  166. package/schematics/apigen/angular/base.js.map +1 -0
  167. package/schematics/apigen/angular/entity.d.ts +24 -0
  168. package/schematics/apigen/angular/entity.js +71 -0
  169. package/schematics/apigen/angular/entity.js.map +1 -0
  170. package/schematics/apigen/angular/enum.d.ts +25 -0
  171. package/schematics/apigen/angular/enum.js +56 -0
  172. package/schematics/apigen/angular/enum.js.map +1 -0
  173. package/schematics/apigen/angular/import.d.ts +6 -0
  174. package/schematics/apigen/angular/import.js +18 -0
  175. package/schematics/apigen/angular/import.js.map +1 -0
  176. package/schematics/apigen/angular/module.d.ts +18 -0
  177. package/schematics/apigen/angular/module.js +41 -0
  178. package/schematics/apigen/angular/module.js.map +1 -0
  179. package/schematics/apigen/angular/service.d.ts +20 -0
  180. package/schematics/apigen/angular/service.js +76 -0
  181. package/schematics/apigen/angular/service.js.map +1 -0
  182. package/schematics/apigen/files/api-config/__fileName__.ts +9 -0
  183. package/schematics/apigen/files/entity/__fileName__.ts +7 -0
  184. package/schematics/apigen/files/entitycontainer-service/__fileName__.ts +18 -0
  185. package/schematics/apigen/files/entityset-service/__fileName__.ts +27 -0
  186. package/schematics/apigen/files/enum/__fileName__.ts +4 -0
  187. package/schematics/apigen/files/index/__fileName__.ts +2 -0
  188. package/schematics/apigen/files/module/__fileName__.ts +9 -0
  189. package/schematics/apigen/files/singleton-service/__fileName__.ts +18 -0
  190. package/schematics/apigen/index.d.ts +3 -0
  191. package/schematics/apigen/index.js +106 -0
  192. package/schematics/apigen/index.js.map +1 -0
  193. package/schematics/apigen/metadata/csdl/csdl-annotation.d.ts +120 -0
  194. package/schematics/apigen/metadata/csdl/csdl-annotation.js +98 -0
  195. package/schematics/apigen/metadata/csdl/csdl-annotation.js.map +1 -0
  196. package/schematics/apigen/metadata/csdl/csdl-entity-container.d.ts +26 -0
  197. package/schematics/apigen/metadata/csdl/csdl-entity-container.js +30 -0
  198. package/schematics/apigen/metadata/csdl/csdl-entity-container.js.map +1 -0
  199. package/schematics/apigen/metadata/csdl/csdl-entity-set.d.ts +20 -0
  200. package/schematics/apigen/metadata/csdl/csdl-entity-set.js +26 -0
  201. package/schematics/apigen/metadata/csdl/csdl-entity-set.js.map +1 -0
  202. package/schematics/apigen/metadata/csdl/csdl-enum-type.d.ts +28 -0
  203. package/schematics/apigen/metadata/csdl/csdl-enum-type.js +33 -0
  204. package/schematics/apigen/metadata/csdl/csdl-enum-type.js.map +1 -0
  205. package/schematics/apigen/metadata/csdl/csdl-function-action.d.ts +103 -0
  206. package/schematics/apigen/metadata/csdl/csdl-function-action.js +84 -0
  207. package/schematics/apigen/metadata/csdl/csdl-function-action.js.map +1 -0
  208. package/schematics/apigen/metadata/csdl/csdl-navigation-property-binding.d.ts +8 -0
  209. package/schematics/apigen/metadata/csdl/csdl-navigation-property-binding.js +11 -0
  210. package/schematics/apigen/metadata/csdl/csdl-navigation-property-binding.js.map +1 -0
  211. package/schematics/apigen/metadata/csdl/csdl-reference.d.ts +30 -0
  212. package/schematics/apigen/metadata/csdl/csdl-reference.js +29 -0
  213. package/schematics/apigen/metadata/csdl/csdl-reference.js.map +1 -0
  214. package/schematics/apigen/metadata/csdl/csdl-schema.d.ts +32 -0
  215. package/schematics/apigen/metadata/csdl/csdl-schema.js +26 -0
  216. package/schematics/apigen/metadata/csdl/csdl-schema.js.map +1 -0
  217. package/schematics/apigen/metadata/csdl/csdl-singleton.d.ts +18 -0
  218. package/schematics/apigen/metadata/csdl/csdl-singleton.js +25 -0
  219. package/schematics/apigen/metadata/csdl/csdl-singleton.js.map +1 -0
  220. package/schematics/apigen/metadata/csdl/csdl-structural-property.d.ts +63 -0
  221. package/schematics/apigen/metadata/csdl/csdl-structural-property.js +50 -0
  222. package/schematics/apigen/metadata/csdl/csdl-structural-property.js.map +1 -0
  223. package/schematics/apigen/metadata/csdl/csdl-structured-type.d.ts +64 -0
  224. package/schematics/apigen/metadata/csdl/csdl-structured-type.js +71 -0
  225. package/schematics/apigen/metadata/csdl/csdl-structured-type.js.map +1 -0
  226. package/schematics/apigen/metadata/csdl/csdl-type-definition.d.ts +22 -0
  227. package/schematics/apigen/metadata/csdl/csdl-type-definition.js +19 -0
  228. package/schematics/apigen/metadata/csdl/csdl-type-definition.js.map +1 -0
  229. package/schematics/apigen/metadata/index.d.ts +1 -0
  230. package/schematics/apigen/metadata/index.js +18 -0
  231. package/schematics/apigen/metadata/index.js.map +1 -0
  232. package/schematics/apigen/metadata/metadata.d.ts +11 -0
  233. package/schematics/apigen/metadata/metadata.js +30 -0
  234. package/schematics/apigen/metadata/metadata.js.map +1 -0
  235. package/schematics/apigen/metadata/parser.d.ts +110 -0
  236. package/schematics/apigen/metadata/parser.js +568 -0
  237. package/schematics/apigen/metadata/parser.js.map +1 -0
  238. package/schematics/apigen/schema.d.ts +8 -0
  239. package/schematics/apigen/schema.js +3 -0
  240. package/schematics/apigen/schema.js.map +1 -0
  241. package/schematics/apigen/schema.json +36 -0
  242. package/schematics/apigen/utils.d.ts +1 -0
  243. package/schematics/apigen/utils.js +75 -0
  244. package/schematics/apigen/utils.js.map +1 -0
  245. package/schematics/collection.json +14 -0
  246. package/schematics/ng-add/index.d.ts +2 -0
  247. package/schematics/ng-add/index.js +13 -0
  248. package/schematics/ng-add/index.js.map +1 -0
  249. package/schematics/random.d.ts +1 -0
  250. package/schematics/random.js +604 -0
  251. package/schematics/random.js.map +1 -0
  252. package/esm2022/lib/resources/responses/annotations.mjs +0 -137
  253. package/esm2022/lib/resources/responses/csdl/csdl-annotation.mjs +0 -33
  254. package/esm2022/lib/resources/responses/csdl/csdl-entity-container.mjs +0 -11
  255. package/esm2022/lib/resources/responses/csdl/csdl-entity-set.mjs +0 -9
  256. package/esm2022/lib/resources/responses/csdl/csdl-enum-type.mjs +0 -15
  257. package/esm2022/lib/resources/responses/csdl/csdl-function-action.mjs +0 -56
  258. package/esm2022/lib/resources/responses/csdl/csdl-navigation-property-binding.mjs +0 -7
  259. package/esm2022/lib/resources/responses/csdl/csdl-reference.mjs +0 -23
  260. package/esm2022/lib/resources/responses/csdl/csdl-schema.mjs +0 -18
  261. package/esm2022/lib/resources/responses/csdl/csdl-singleton.mjs +0 -8
  262. package/esm2022/lib/resources/responses/csdl/csdl-structural-property.mjs +0 -39
  263. package/esm2022/lib/resources/responses/csdl/csdl-structured-type.mjs +0 -34
  264. package/esm2022/lib/resources/responses/csdl/csdl-type-definition.mjs +0 -14
  265. package/esm2022/lib/resources/responses/index.mjs +0 -5
  266. package/esm2022/lib/resources/responses/metadata.mjs +0 -547
  267. package/esm2022/lib/resources/responses/options.mjs +0 -56
  268. package/esm2022/lib/resources/responses/response.mjs +0 -174
  269. package/esm2022/lib/resources/responses/types.mjs +0 -2
  270. package/lib/resources/responses/csdl/csdl-annotation.d.ts +0 -27
  271. package/lib/resources/responses/csdl/csdl-entity-container.d.ts +0 -12
  272. package/lib/resources/responses/csdl/csdl-entity-set.d.ts +0 -8
  273. package/lib/resources/responses/csdl/csdl-enum-type.d.ts +0 -12
  274. package/lib/resources/responses/csdl/csdl-function-action.d.ts +0 -49
  275. package/lib/resources/responses/csdl/csdl-navigation-property-binding.d.ts +0 -5
  276. package/lib/resources/responses/csdl/csdl-reference.d.ts +0 -18
  277. package/lib/resources/responses/csdl/csdl-schema.d.ts +0 -20
  278. package/lib/resources/responses/csdl/csdl-singleton.d.ts +0 -7
  279. package/lib/resources/responses/csdl/csdl-structural-property.d.ts +0 -31
  280. package/lib/resources/responses/csdl/csdl-structured-type.d.ts +0 -27
  281. package/lib/resources/responses/csdl/csdl-type-definition.d.ts +0 -11
  282. package/lib/resources/responses/index.d.ts +0 -4
  283. package/lib/resources/responses/types.d.ts +0 -13
@@ -2,7 +2,9 @@ import { EntityContainerConfig } from '../types';
2
2
  import { ODataSchemaElement } from './element';
3
3
  import { ODataEntitySet } from './entity-set';
4
4
  import { ODataSchema } from './schema';
5
+ import { ODataSingleton } from './singleton';
5
6
  export declare class ODataEntityContainer extends ODataSchemaElement {
6
7
  entitySets: ODataEntitySet[];
8
+ singletons: ODataSingleton[];
7
9
  constructor(config: EntityContainerConfig, schema: ODataSchema);
8
10
  }
@@ -1,19 +1,16 @@
1
- import { EnumTypeConfig, Parser, ParserOptions } from '../types';
2
- import { ODataSchemaElement } from './element';
1
+ import { EnumTypeConfig, ParserOptions } from '../types';
2
+ import { ODataParserSchemaElement } from './element';
3
3
  import { ODataEnumTypeFieldParser, ODataEnumTypeParser } from './parsers';
4
4
  import { ODataSchema } from './schema';
5
- export declare class ODataEnumType<E> extends ODataSchemaElement {
6
- parser: ODataEnumTypeParser<E>;
5
+ export declare class ODataEnumType<E> extends ODataParserSchemaElement<E, ODataEnumTypeParser<E>> {
7
6
  members: {
8
7
  [name: string]: E;
9
8
  } | {
10
9
  [value: number]: string;
11
10
  };
12
11
  constructor(config: EnumTypeConfig<E>, schema: ODataSchema);
13
- configure({ options, parserForType, findOptionsForType, }: {
12
+ configure({ options }: {
14
13
  options: ParserOptions;
15
- parserForType: (type: string) => Parser<any>;
16
- findOptionsForType: (type: string) => any;
17
14
  }): void;
18
15
  /**
19
16
  * Returns the fields of the enum type.
@@ -4,4 +4,5 @@ export * from './callable';
4
4
  export * from './enum-type';
5
5
  export * from './structured-type';
6
6
  export * from './entity-set';
7
+ export * from './singleton';
7
8
  export * from './parsers';
@@ -1,4 +1,4 @@
1
- import { CallableConfig, ParserOptions, Parameter, Parser } from '../../types';
1
+ import { CallableConfig, ParserOptions, ParameterConfig, Parser } from '../../types';
2
2
  import { ODataEnumTypeParser } from './enum-type';
3
3
  import { ODataStructuredTypeParser } from './structured-type';
4
4
  export declare class ODataParameterParser<T> {
@@ -8,19 +8,18 @@ export declare class ODataParameterParser<T> {
8
8
  collection?: boolean;
9
9
  nullable?: boolean;
10
10
  parserOptions?: ParserOptions;
11
- constructor(name: string, parameter: Parameter);
11
+ constructor(name: string, parameter: ParameterConfig);
12
12
  serialize(value: T, options?: ParserOptions): any;
13
13
  encode(value: any, options?: ParserOptions): string;
14
- configure({ options, parserForType, findOptionsForType, }: {
14
+ configure({ options, parserForType, }: {
15
15
  options: ParserOptions;
16
16
  parserForType: (type: string) => Parser<any>;
17
- findOptionsForType: (type: string) => any;
18
17
  }): void;
19
18
  isEdmType(): boolean;
20
19
  isEnumType(): boolean;
21
- enum(): ODataEnumTypeParser<T>;
20
+ enumType(): ODataEnumTypeParser<T>;
22
21
  isStructuredType(): boolean;
23
- structured(): ODataStructuredTypeParser<T>;
22
+ structuredType(): ODataStructuredTypeParser<T>;
24
23
  field<F>(name: string): import("./structured-type").ODataStructuredTypeFieldParser<F>;
25
24
  }
26
25
  export declare class ODataCallableParser<R> implements Parser<R> {
@@ -39,10 +38,10 @@ export declare class ODataCallableParser<R> implements Parser<R> {
39
38
  deserialize(value: any, options?: ParserOptions): R;
40
39
  serialize(params: any, options?: ParserOptions): any;
41
40
  encode(params: any, options?: ParserOptions): any;
42
- configure({ options, parserForType, findOptionsForType, }: {
41
+ configure({ options, parserForType, }: {
43
42
  options: ParserOptions;
44
43
  parserForType: (type: string) => Parser<any>;
45
- findOptionsForType: (type: string) => any;
46
44
  }): void;
47
45
  binding(): ODataParameterParser<any> | undefined;
46
+ returnType(): string | undefined;
48
47
  }
@@ -1,4 +1,4 @@
1
- import { EnumTypeConfig, EnumTypeFieldConfig, ParserOptions, Parser, FieldParser } from '../../types';
1
+ import { EnumTypeConfig, EnumTypeFieldConfig, ParserOptions, FieldParser, JsonType } from '../../types';
2
2
  import { ODataAnnotatable } from '../annotation';
3
3
  export declare class ODataEnumTypeFieldParser<E> extends ODataAnnotatable {
4
4
  name: string;
@@ -19,10 +19,8 @@ export declare class ODataEnumTypeParser<E> extends ODataAnnotatable implements
19
19
  private _fields;
20
20
  parserOptions?: ParserOptions;
21
21
  constructor(config: EnumTypeConfig<E>, namespace: string, alias?: string);
22
- configure({ options, parserForType, findOptionsForType, }: {
22
+ configure({ options }: {
23
23
  options: ParserOptions;
24
- parserForType: (type: string) => Parser<any>;
25
- findOptionsForType: (type: string) => any;
26
24
  }): void;
27
25
  isTypeOf(type: string): boolean;
28
26
  fields(value?: E): ODataEnumTypeFieldParser<E>[];
@@ -36,7 +34,19 @@ export declare class ODataEnumTypeParser<E> extends ODataAnnotatable implements
36
34
  deserialize(value: string, options?: ParserOptions): E;
37
35
  serialize(value: E, options?: ParserOptions): string | undefined;
38
36
  encode(value: E, options?: ParserOptions): any;
39
- toJsonSchema(): any;
37
+ toJsonSchema(): {
38
+ title: string;
39
+ type: JsonType;
40
+ items: {
41
+ type: JsonType;
42
+ };
43
+ enum?: undefined;
44
+ } | {
45
+ type: JsonType;
46
+ enum: E[];
47
+ title?: undefined;
48
+ items?: undefined;
49
+ };
40
50
  validate(member: string | number, { method, navigation, }?: {
41
51
  method?: 'create' | 'update' | 'modify';
42
52
  navigation?: boolean;
@@ -35,7 +35,7 @@ export declare class ODataReferential {
35
35
  }
36
36
  export declare class ODataStructuredTypeFieldParser<T> extends ODataAnnotatable implements FieldParser<T> {
37
37
  name: string;
38
- private structuredType;
38
+ private structured;
39
39
  type: string | EdmType;
40
40
  private parser;
41
41
  collection: boolean;
@@ -47,7 +47,7 @@ export declare class ODataStructuredTypeFieldParser<T> extends ODataAnnotatable
47
47
  scale?: number | 'variable';
48
48
  referentials: ODataReferential[];
49
49
  parserOptions?: ParserOptions;
50
- constructor(name: string, structuredType: ODataStructuredTypeParser<any>, field: StructuredTypeFieldConfig);
50
+ constructor(name: string, structured: ODataStructuredTypeParser<any>, field: StructuredTypeFieldConfig);
51
51
  validate(value: any, { method, navigation, }?: {
52
52
  method?: 'create' | 'update' | 'modify';
53
53
  navigation?: boolean;
@@ -61,19 +61,18 @@ export declare class ODataStructuredTypeFieldParser<T> extends ODataAnnotatable
61
61
  private toJson;
62
62
  serialize(value: T, options?: ParserOptions): any;
63
63
  encode(value: T, options?: ParserOptions): string;
64
- configure({ options, parserForType, findOptionsForType, }: {
64
+ configure({ options, parserForType, }: {
65
65
  options: ParserOptions;
66
66
  parserForType: (type: string) => Parser<any>;
67
- findOptionsForType: (type: string) => any;
68
67
  }): void;
69
68
  toJsonSchema(options?: JsonSchemaOptions<T>): any;
70
69
  isKey(): boolean;
71
70
  hasReferentials(): boolean;
72
71
  isEdmType(): boolean;
73
72
  isEnumType(): boolean;
74
- enum(): ODataEnumTypeParser<T>;
73
+ enumType(): ODataEnumTypeParser<T>;
75
74
  isStructuredType(): boolean;
76
- structured(): ODataStructuredTypeParser<T>;
75
+ structuredType(): ODataStructuredTypeParser<T>;
77
76
  field<F>(name: string): ODataStructuredTypeFieldParser<F>;
78
77
  }
79
78
  export declare class ODataStructuredTypeParser<T> extends ODataAnnotatable implements Parser<T> {
@@ -105,10 +104,9 @@ export declare class ODataStructuredTypeParser<T> extends ODataAnnotatable imple
105
104
  deserialize(value: any, options?: ParserOptions): T;
106
105
  serialize(value: Partial<T>, options?: ParserOptions): any;
107
106
  encode(value: T, options?: ParserOptions): any;
108
- configure({ options, parserForType, findOptionsForType, }: {
107
+ configure({ options, parserForType, }: {
109
108
  options: ParserOptions;
110
109
  parserForType: (type: string) => Parser<any>;
111
- findOptionsForType: (type: string) => any;
112
110
  }): void;
113
111
  /**
114
112
  * Returns all fields of the structured type.
@@ -1,10 +1,11 @@
1
1
  import { ODataApi } from '../api';
2
- import { Parser, ParserOptions, SchemaConfig } from '../types';
2
+ import { ParserOptions, SchemaConfig, StructuredTypeConfig } from '../types';
3
3
  import { ODataAnnotatable } from './annotation';
4
4
  import { ODataCallable } from './callable';
5
5
  import { ODataEntityContainer } from './entity-container';
6
6
  import { ODataEntitySet } from './entity-set';
7
7
  import { ODataEnumType } from './enum-type';
8
+ import { ODataSingleton } from './singleton';
8
9
  import { ODataStructuredType } from './structured-type';
9
10
  export declare class ODataSchema extends ODataAnnotatable {
10
11
  api: ODataApi;
@@ -15,15 +16,11 @@ export declare class ODataSchema extends ODataAnnotatable {
15
16
  callables: ODataCallable<any>[];
16
17
  containers: ODataEntityContainer[];
17
18
  constructor(config: SchemaConfig, api: ODataApi);
18
- isNamespaceOf(type: string): boolean | "" | undefined;
19
+ isNamespaceOf(type: string): boolean;
19
20
  get entitySets(): ODataEntitySet[];
20
- findEnumTypeForType<T>(type: string): ODataEnumType<T> | undefined;
21
- findStructuredTypeForType<T>(type: string): ODataStructuredType<T> | undefined;
22
- findCallableForType<T>(type: string, bindingType?: string): ODataCallable<T> | undefined;
23
- findEntitySetForType(type: string): ODataEntitySet | undefined;
24
- configure({ options, parserForType, findOptionsForType, }: {
21
+ get singletons(): ODataSingleton[];
22
+ createStructuredType<T>(config: StructuredTypeConfig<T>): ODataStructuredType<T>;
23
+ configure({ options }: {
25
24
  options: ParserOptions;
26
- parserForType: (type: string) => Parser<any>;
27
- findOptionsForType: (type: string) => any;
28
25
  }): void;
29
26
  }
@@ -0,0 +1,10 @@
1
+ import { SingletonConfig } from '../types';
2
+ import { ODataSchemaElement } from './element';
3
+ import { ODataSchema } from './schema';
4
+ export declare class ODataSingleton extends ODataSchemaElement {
5
+ singletonType: string;
6
+ service: {
7
+ new (...params: any[]): any;
8
+ };
9
+ constructor(config: SingletonConfig, schema: ODataSchema);
10
+ }
@@ -1,21 +1,18 @@
1
- import { ODataCollection } from '../models';
1
+ import { ODataCollection } from '../models/collection';
2
2
  import { ODataModel } from '../models/model';
3
- import { Parser, ParserOptions, StructuredTypeConfig, StructuredTypeFieldConfig } from '../types';
4
- import { ODataSchemaElement } from './element';
3
+ import { ParserOptions, StructuredTypeConfig, StructuredTypeFieldConfig } from '../types';
4
+ import { ODataParserSchemaElement } from './element';
5
5
  import { JsonSchemaOptions, ODataEntityTypeKey, ODataStructuredTypeFieldParser, ODataStructuredTypeParser } from './parsers';
6
6
  import { ODataSchema } from './schema';
7
- export declare class ODataStructuredType<T> extends ODataSchemaElement {
7
+ export declare class ODataStructuredType<T> extends ODataParserSchemaElement<T, ODataStructuredTypeParser<T>> {
8
8
  base?: string;
9
9
  parent?: ODataStructuredType<any>;
10
10
  children: ODataStructuredType<any>[];
11
11
  model?: typeof ODataModel;
12
12
  collection?: typeof ODataCollection;
13
- parser: ODataStructuredTypeParser<T>;
14
13
  constructor(config: StructuredTypeConfig<T>, schema: ODataSchema);
15
- configure({ options, parserForType, findOptionsForType, }: {
14
+ configure({ options }: {
16
15
  options: ParserOptions;
17
- parserForType: (type: string) => Parser<any>;
18
- findOptionsForType: (type: string) => any;
19
16
  }): void;
20
17
  /**
21
18
  * Returns a boolean indicating if the structured type is a subtype of the given type.
@@ -4,6 +4,10 @@ import { ODataModel } from '../models/model';
4
4
  import { EntityKey, ODataEntity, ODataEntityResource, ODataEntitySetResource, ODataOptions } from '../resources';
5
5
  import { ODataEntityService } from './entity';
6
6
  export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
7
+ static Model?: typeof ODataModel;
8
+ static Collection?: typeof ODataCollection;
9
+ model(entity?: Partial<T>): ODataModel<T>;
10
+ collection(entities?: Partial<T>[]): ODataCollection<T, ODataModel<T>>;
7
11
  /**
8
12
  * Get the entity set resource for this service.
9
13
  */
@@ -29,7 +33,7 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
29
33
  */
30
34
  fetchAll(options?: ODataOptions): Observable<{
31
35
  entities: T[];
32
- annots: import("../resources").ODataEntitiesAnnotations<T>;
36
+ annots: import("../annotations").ODataEntitiesAnnotations<T>;
33
37
  }>;
34
38
  /**
35
39
  * Get entities from the entity set.
@@ -40,7 +44,7 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
40
44
  withCount?: boolean;
41
45
  }): Observable<{
42
46
  entities: T[];
43
- annots: import("../resources").ODataEntitiesAnnotations<T>;
47
+ annots: import("../annotations").ODataEntitiesAnnotations<T>;
44
48
  }>;
45
49
  /**
46
50
  * Get an entity from the entity set.
@@ -52,7 +56,7 @@ export declare class ODataEntitySetService<T> extends ODataEntityService<T> {
52
56
  etag?: string;
53
57
  }): Observable<{
54
58
  entity: T | null;
55
- annots: import("../resources").ODataEntitiesAnnotations<T>;
59
+ annots: import("../annotations").ODataEntitiesAnnotations<T>;
56
60
  }>;
57
61
  /**
58
62
  * Create an entity in the entity set.
@@ -1,6 +1,7 @@
1
1
  import { ODataClient } from '../client';
2
2
  import { ODataEntitySetService } from './entity-set';
3
3
  import { ODataSingletonService } from './singleton';
4
+ import { ODataCollection, ODataModel } from '../models';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class ODataServiceFactory {
6
7
  protected client: ODataClient;
@@ -10,12 +11,23 @@ export declare class ODataServiceFactory {
10
11
  * @param entitySetName Name of the entity set.
11
12
  * @param apiNameOrEntityType Name of the API or the type of the entity.
12
13
  */
13
- entitySet<T>(entitySetName: string, apiNameOrEntityType?: string): ODataEntitySetService<T>;
14
+ entitySet<T>(entitySetName: string, apiNameOrEntityType?: string, options?: {
15
+ Model?: {
16
+ new (...params: any[]): ODataModel<T>;
17
+ };
18
+ Collection?: {
19
+ new (...params: any[]): ODataCollection<T, ODataModel<T>>;
20
+ };
21
+ }): ODataEntitySetService<T>;
14
22
  /** Factory method to create a singleton service.
15
23
  * @param singletonName Name of the singleton.
16
24
  * @param apiNameOrEntityType Name of the API or the type of the entity.
17
25
  */
18
- singleton<T>(singletonName: string, apiNameOrEntityType?: string): ODataSingletonService<T>;
26
+ singleton<T>(singletonName: string, apiNameOrEntityType?: string, options?: {
27
+ Model?: {
28
+ new (...params: any[]): ODataModel<T>;
29
+ };
30
+ }): ODataSingletonService<T>;
19
31
  static ɵfac: i0.ɵɵFactoryDeclaration<ODataServiceFactory, never>;
20
32
  static ɵprov: i0.ɵɵInjectableDeclaration<ODataServiceFactory>;
21
33
  }
@@ -1,12 +1,14 @@
1
1
  import { Observable } from 'rxjs';
2
- import type { ODataModel } from '../models/model';
3
- import type { ODataEntity, ODataOptions, ODataSingletonResource } from '../resources';
2
+ import { ODataModel } from '../models/model';
3
+ import { ODataEntity, ODataOptions, ODataSingletonResource } from '../resources';
4
4
  import { ODataEntityService } from './entity';
5
5
  /**
6
6
  * OData Singleton Service
7
7
  * www.odata.org/getting-started/advanced-tutorial/#singleton
8
8
  */
9
9
  export declare class ODataSingletonService<T> extends ODataEntityService<T> {
10
+ static Model?: typeof ODataModel;
11
+ model(entity?: Partial<T>): ODataModel<T>;
10
12
  /**
11
13
  * Get the entity resource for this service.
12
14
  * @param key The entity key.
package/lib/settings.d.ts CHANGED
@@ -3,7 +3,6 @@ import { ODataApi } from './api';
3
3
  import { ODataCollection, ODataModel } from './models';
4
4
  import { ODataRequest } from './resources';
5
5
  import { ODataCallable, ODataEntitySet, ODataEnumType, ODataStructuredType } from './schema';
6
- import { ODataEntityService } from './services/entity';
7
6
  import { ApiConfig, EdmType, Parser } from './types';
8
7
  export declare class ODataSettings {
9
8
  apis: ODataApi[];
@@ -24,13 +23,4 @@ export declare class ODataSettings {
24
23
  parserForType<T>(type: string | EdmType): Parser<T>;
25
24
  modelForType(type: string): typeof ODataModel;
26
25
  collectionForType(type: string): typeof ODataCollection;
27
- serviceForType(type: string): typeof ODataEntityService;
28
- serviceForEntityType(type: string): typeof ODataEntityService;
29
- enumTypeByName<T>(name: string): ODataEnumType<T>;
30
- structuredTypeByName<T>(name: string): ODataStructuredType<T>;
31
- callableByName<T>(name: string, bindingType?: string): ODataCallable<T>;
32
- entitySetByName(name: string): ODataEntitySet;
33
- modelByName(name: string): typeof ODataModel;
34
- collectionByName(name: string): typeof ODataCollection;
35
- serviceByName(name: string): typeof ODataEntityService;
36
26
  }
package/lib/types.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare enum QueryOption {
21
21
  select = "select",
22
22
  expand = "expand",
23
23
  compute = "compute",
24
+ apply = "apply",
24
25
  filter = "filter",
25
26
  search = "search",
26
27
  transform = "transform",
@@ -67,6 +68,15 @@ export declare enum EdmType {
67
68
  GeometryMultiPolygon = "Edm.GeometryMultiPolygon",
68
69
  GeometryCollection = "Edm.GeometryCollection"
69
70
  }
71
+ export declare enum JsonType {
72
+ string = "string",
73
+ number = "number",
74
+ integer = "integer",
75
+ object = "object",
76
+ array = "array",
77
+ boolean = "boolean",
78
+ null = "null"
79
+ }
70
80
  export interface ApiOptions {
71
81
  version?: ODataVersion;
72
82
  params?: {
@@ -99,6 +109,7 @@ export interface ApiOptions {
99
109
  deleteRefBy?: 'path' | 'id';
100
110
  nonParenthesisForEmptyParameterFunction?: boolean;
101
111
  jsonBatchFormat?: boolean;
112
+ relativeUrls?: boolean;
102
113
  }
103
114
  export interface ParserOptions {
104
115
  version?: ODataVersion;
@@ -169,6 +180,7 @@ export type EntityContainerConfig = {
169
180
  name: string;
170
181
  annotations?: AnnotationConfig[];
171
182
  entitySets?: EntitySetConfig[];
183
+ singletons?: SingletonConfig[];
172
184
  };
173
185
  export type EnumTypeFieldConfig<E> = {
174
186
  value: E;
@@ -220,11 +232,11 @@ export type StructuredTypeConfig<T> = {
220
232
  name: string;
221
233
  alias?: string;
222
234
  }[];
223
- fields: {
235
+ fields?: {
224
236
  [P in keyof T]?: StructuredTypeFieldConfig;
225
237
  };
226
238
  };
227
- export type Parameter = {
239
+ export type ParameterConfig = {
228
240
  type: string;
229
241
  nullable?: boolean;
230
242
  collection?: boolean;
@@ -235,7 +247,7 @@ export type CallableConfig = {
235
247
  bound?: boolean;
236
248
  composable?: boolean;
237
249
  parameters?: {
238
- [name: string]: Parameter;
250
+ [name: string]: ParameterConfig;
239
251
  };
240
252
  return?: {
241
253
  type: string;
@@ -250,3 +262,11 @@ export type EntitySetConfig = {
250
262
  };
251
263
  annotations?: AnnotationConfig[];
252
264
  };
265
+ export type SingletonConfig = {
266
+ name: string;
267
+ type: string;
268
+ service: {
269
+ new (...params: any[]): any;
270
+ };
271
+ annotations?: AnnotationConfig[];
272
+ };
@@ -12,7 +12,7 @@ export declare const Http: {
12
12
  [param: string]: string | string[];
13
13
  }, options: string[]): string | undefined;
14
14
  headerValue(header: string): string;
15
- parseResponseStatus(statusLine: string): {
15
+ parseResponseStatus(line: string): {
16
16
  status: string;
17
17
  code: number;
18
18
  message: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-odata",
3
- "version": "0.126.0",
3
+ "version": "0.128.0",
4
4
  "license": "MIT",
5
5
  "description": "Client side OData typescript library for Angular",
6
6
  "repository": {
@@ -28,6 +28,10 @@
28
28
  "@angular/common": ">=14.0.0",
29
29
  "@angular/core": ">=14.0.0"
30
30
  },
31
+ "schematics": "./schematics/collection.json",
32
+ "ng-add": {
33
+ "save": "dependencies"
34
+ },
31
35
  "dependencies": {
32
36
  "tslib": "^2.3.0"
33
37
  },
@@ -0,0 +1,15 @@
1
+ import { Base } from './base';
2
+ import { Source } from '@angular-devkit/schematics';
3
+ import { Schema as ApiGenSchema } from '../schema';
4
+ export declare class ApiConfig extends Base {
5
+ constructor(options: ApiGenSchema);
6
+ template(): Source;
7
+ variables(): {
8
+ [name: string]: any;
9
+ };
10
+ name(): string;
11
+ fileName(): string;
12
+ directory(): string;
13
+ fullName(): string;
14
+ importTypes(): string[];
15
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiConfig = void 0;
4
+ const core_1 = require("@angular-devkit/core");
5
+ const base_1 = require("./base");
6
+ const schematics_1 = require("@angular-devkit/schematics");
7
+ class ApiConfig extends base_1.Base {
8
+ constructor(options) {
9
+ super(options);
10
+ }
11
+ template() {
12
+ return (0, schematics_1.url)('./files/api-config');
13
+ }
14
+ variables() {
15
+ return Object.assign({}, this.options);
16
+ }
17
+ name() {
18
+ return core_1.strings.classify(this.options.name) + 'Config';
19
+ }
20
+ fileName() {
21
+ return core_1.strings.dasherize(this.options.name) + '.config';
22
+ }
23
+ directory() {
24
+ return '';
25
+ }
26
+ fullName() {
27
+ return this.name();
28
+ }
29
+ importTypes() {
30
+ return [];
31
+ }
32
+ }
33
+ exports.ApiConfig = ApiConfig;
34
+ //# sourceMappingURL=api-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-config.js","sourceRoot":"","sources":["../../../../../projects/angular-odata/schematics/apigen/angular/api-config.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,iCAA8B;AAC9B,2DAAyD;AAGzD,MAAa,SAAU,SAAQ,WAAI;IACjC,YAAY,OAAqB;QAC/B,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IACe,QAAQ;QACtB,OAAO,IAAA,gBAAG,EAAC,oBAAoB,CAAC,CAAC;IACnC,CAAC;IACe,SAAS;QACvB,yBAAY,IAAI,CAAC,OAAO,EAAG;IAC7B,CAAC;IACe,IAAI;QAClB,OAAO,cAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IACxD,CAAC;IACe,QAAQ;QACtB,OAAO,cAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1D,CAAC;IACe,SAAS;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IACe,QAAQ;QACtB,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IACe,WAAW;QACzB,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAzBD,8BAyBC"}
@@ -0,0 +1,51 @@
1
+ import { Import } from './import';
2
+ import { Source } from '@angular-devkit/schematics';
3
+ import { Schema as ApiGenSchema } from '../schema';
4
+ import { CsdlCallable, CsdlParameter } from '../metadata/csdl/csdl-function-action';
5
+ export declare class Callable {
6
+ protected callable: CsdlCallable;
7
+ constructor(callable: CsdlCallable);
8
+ name(): string;
9
+ isBound(): boolean | undefined;
10
+ bindingParameter(): CsdlParameter | undefined;
11
+ parameters(): CsdlParameter[];
12
+ returnType(): import("../metadata/csdl/csdl-function-action").CsdlReturnType | undefined;
13
+ fullName(): string;
14
+ resourceFunction(): string;
15
+ callableFunction(): string;
16
+ }
17
+ export declare abstract class Base {
18
+ protected options: ApiGenSchema;
19
+ constructor(options: ApiGenSchema);
20
+ abstract name(): string;
21
+ abstract fileName(): string;
22
+ abstract fullName(): string;
23
+ abstract directory(): string;
24
+ abstract importTypes(): string[];
25
+ abstract template(): Source;
26
+ abstract variables(): {
27
+ [name: string]: any;
28
+ };
29
+ path(): string;
30
+ imports(): Import[];
31
+ importedName?: string;
32
+ cleanImportedNames(): void;
33
+ protected dependencies: [string, Base][];
34
+ addDependency(renderable: Base): void;
35
+ addDependencies(renderables: Base[]): void;
36
+ protected callables: Callable[];
37
+ addCallable(callable: Callable): void;
38
+ addCallables(callables: Callable[]): void;
39
+ }
40
+ export declare class Index extends Base {
41
+ constructor(options: ApiGenSchema);
42
+ template(): Source;
43
+ variables(): {
44
+ [name: string]: any;
45
+ };
46
+ name(): string;
47
+ fileName(): string;
48
+ directory(): string;
49
+ fullName(): string;
50
+ importTypes(): string[];
51
+ }