@common-grants/core 0.1.0-alpha.10 → 0.1.0-alpha.11

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.
@@ -3,6 +3,8 @@ import "./metadata.tsp";
3
3
  import "./money.tsp";
4
4
  import "./event.tsp";
5
5
 
6
+ using TypeSpec.JsonSchema;
7
+
6
8
  /** A standard set of fields, e.g. `money` that can be reused across models
7
9
  *
8
10
  * @example How to use the `Fields` namespace
@@ -17,4 +19,5 @@ import "./event.tsp";
17
19
  * }
18
20
  * ```
19
21
  */
22
+ @jsonSchema
20
23
  namespace CommonGrants.Fields;
@@ -71,6 +71,7 @@ enum AllOperators {
71
71
  model DefaultFilter {
72
72
  /** The operator to apply to the filter value */
73
73
  operator:
74
+ | EquivalenceOperators
74
75
  | ComparisonOperators
75
76
  | ArrayOperators
76
77
  | StringOperators
@@ -4,6 +4,8 @@ import "./numeric.tsp";
4
4
  import "./money.tsp";
5
5
  import "./string.tsp";
6
6
 
7
+ using TypeSpec.JsonSchema;
8
+
7
9
  /** A standard set of filters, e.g. `StringArrayFilter`, that can be reused across models
8
10
  *
9
11
  * @example How to use the `Filters` namespace
@@ -34,4 +36,5 @@ import "./string.tsp";
34
36
  * }
35
37
  * ```
36
38
  */
39
+ @jsonSchema
37
40
  namespace CommonGrants.Filters;
@@ -1,8 +1,9 @@
1
1
  import "@typespec/http";
2
2
 
3
3
  using TypeSpec.Http;
4
-
4
+ using TypeSpec.JsonSchema;
5
5
  /** Models and utilities for pagination */
6
+ @jsonSchema
6
7
  namespace CommonGrants.Pagination;
7
8
 
8
9
  /** Query parameters for paginated routes */
@@ -3,6 +3,8 @@ import "@typespec/http";
3
3
  import "./error.tsp";
4
4
  import "./success.tsp";
5
5
 
6
+ using TypeSpec.JsonSchema;
7
+
6
8
  /** A standardized set of response schemas for CommonGrants API routes
7
9
  *
8
10
  * @example How to use the `Responses` namespace
@@ -21,4 +23,5 @@ import "./success.tsp";
21
23
  * }
22
24
  * ```
23
25
  */
26
+ @jsonSchema
24
27
  namespace CommonGrants.Responses;
@@ -1,7 +1,7 @@
1
1
  import "@typespec/http";
2
2
 
3
3
  using TypeSpec.Http;
4
-
4
+ using TypeSpec.JsonSchema;
5
5
  /** Models for sorting
6
6
  *
7
7
  * @example How to use the `Sorting` namespace
@@ -15,6 +15,7 @@ using TypeSpec.Http;
15
15
  * op list(sorting: Sorting.SortQueryParams): Responses.Sorted<MyModel>;
16
16
  * ```
17
17
  */
18
+ @jsonSchema
18
19
  namespace CommonGrants.Sorting;
19
20
 
20
21
  enum SortOrder {
@@ -27,7 +28,7 @@ model SortQueryParams {
27
28
  /** The field to sort by */
28
29
  @query
29
30
  @example("lastModifiedAt")
30
- sortBy: string;
31
+ sortBy: unknown;
31
32
 
32
33
  /** Implementation-defined sort key */
33
34
  @query
@@ -1,3 +1,5 @@
1
+ using TypeSpec.JsonSchema;
2
+
1
3
  /** A collection of base data types used throughout the CommonGrants API
2
4
  *
3
5
  * @example How to use the `Types` namespace
@@ -16,6 +18,7 @@
16
18
  * }
17
19
  * ```
18
20
  */
21
+ @jsonSchema
19
22
  namespace CommonGrants.Types;
20
23
 
21
24
  /** A time on a clock, without a timezone, in ISO 8601 format HH:mm:ss */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-grants/core",
3
- "version": "0.1.0-alpha.10",
3
+ "version": "0.1.0-alpha.11",
4
4
  "description": "TypeSpec library for defining grant opportunity data models and APIs",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",