@microsoft/rayfin-data 1.32.0 → 1.33.0-beta.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.
- package/dist/client/DataApi.d.ts +2 -2
- package/dist/client/DataApi.js +2 -2
- package/dist/graphql/GraphQLEntityClient.d.ts +1 -1
- package/dist/graphql/GraphQLEntityClient.js +1 -1
- package/dist/graphql/GraphQLQueryBuilder.d.ts +2 -2
- package/dist/graphql/GraphQLQueryBuilder.js +2 -2
- package/dist/graphql/types.d.ts +2 -2
- package/package.json +3 -3
package/dist/client/DataApi.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export type TypedDataClients<TSchema extends EntitySchema> = {
|
|
|
12
12
|
*
|
|
13
13
|
* Use the `createDataApi` factory function to create instances instead of instantiating directly.
|
|
14
14
|
*
|
|
15
|
-
* @
|
|
15
|
+
* @typeParam TSchema - Object type mapping entity names to their types
|
|
16
16
|
*/
|
|
17
17
|
export declare class DataApi<TSchema extends EntitySchema = Record<string, any>> {
|
|
18
18
|
private apiClient;
|
|
@@ -35,7 +35,7 @@ export declare class DataApi<TSchema extends EntitySchema = Record<string, any>>
|
|
|
35
35
|
/**
|
|
36
36
|
* Create a type-safe DataApi instance for interacting with Data API Builder GraphQL endpoints.
|
|
37
37
|
*
|
|
38
|
-
* @
|
|
38
|
+
* @typeParam TSchema - Object type mapping entity names to their types
|
|
39
39
|
* @param apiClient - The ApiClient instance for making HTTP requests
|
|
40
40
|
* @returns A fully typed DataApi instance with direct entity access
|
|
41
41
|
*
|
package/dist/client/DataApi.js
CHANGED
|
@@ -5,7 +5,7 @@ import { GraphQLEntityClient } from '../graphql/GraphQLEntityClient.js';
|
|
|
5
5
|
*
|
|
6
6
|
* Use the `createDataApi` factory function to create instances instead of instantiating directly.
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
8
|
+
* @typeParam TSchema - Object type mapping entity names to their types
|
|
9
9
|
*/
|
|
10
10
|
export class DataApi {
|
|
11
11
|
apiClient;
|
|
@@ -78,7 +78,7 @@ export class DataApi {
|
|
|
78
78
|
/**
|
|
79
79
|
* Create a type-safe DataApi instance for interacting with Data API Builder GraphQL endpoints.
|
|
80
80
|
*
|
|
81
|
-
* @
|
|
81
|
+
* @typeParam TSchema - Object type mapping entity names to their types
|
|
82
82
|
* @param apiClient - The ApiClient instance for making HTTP requests
|
|
83
83
|
* @returns A fully typed DataApi instance with direct entity access
|
|
84
84
|
*
|
|
@@ -39,7 +39,7 @@ export declare class GraphQLEntityClient<TSchema extends EntitySchema, TEntity e
|
|
|
39
39
|
private extractMutationResult;
|
|
40
40
|
/**
|
|
41
41
|
* Transforms flat FK fields (e.g. category_id) in mutation responses back into
|
|
42
|
-
* nested relationship objects (e.g. category: { id: "..." }) based on the
|
|
42
|
+
* nested relationship objects (e.g. `category: { id: "..." }`) based on the
|
|
43
43
|
* relationship keys present in the original input.
|
|
44
44
|
*/
|
|
45
45
|
private nestRelationshipFields;
|
|
@@ -237,7 +237,7 @@ export class GraphQLEntityClient {
|
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
239
|
* Transforms flat FK fields (e.g. category_id) in mutation responses back into
|
|
240
|
-
* nested relationship objects (e.g. category: { id: "..." }) based on the
|
|
240
|
+
* nested relationship objects (e.g. `category: { id: "..." }`) based on the
|
|
241
241
|
* relationship keys present in the original input.
|
|
242
242
|
*/
|
|
243
243
|
nestRelationshipFields(responseData, inputData) {
|
|
@@ -3,8 +3,8 @@ import type { EntitySchema, FilterInput, OrderByInput, PagedResult, FieldSelecti
|
|
|
3
3
|
/**
|
|
4
4
|
* Fluent GraphQL query builder for constructing and executing complex queries.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
7
|
-
* @
|
|
6
|
+
* @typeParam TSchema - The entity schema type
|
|
7
|
+
* @typeParam TEntity - The specific entity name
|
|
8
8
|
*/
|
|
9
9
|
export declare class GraphQLQueryBuilder<TSchema extends EntitySchema, TEntity extends keyof TSchema> {
|
|
10
10
|
private graphqlClient;
|
|
@@ -5,8 +5,8 @@ import { formatGraphQLValue } from './formatValue.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* Fluent GraphQL query builder for constructing and executing complex queries.
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
9
|
-
* @
|
|
8
|
+
* @typeParam TSchema - The entity schema type
|
|
9
|
+
* @typeParam TEntity - The specific entity name
|
|
10
10
|
*/
|
|
11
11
|
export class GraphQLQueryBuilder {
|
|
12
12
|
graphqlClient;
|
package/dist/graphql/types.d.ts
CHANGED
|
@@ -120,7 +120,7 @@ export type OrderByInput<T> = {
|
|
|
120
120
|
[K in keyof T]?: 'asc' | 'desc';
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
123
|
-
* Extracts the primary key field from an entity using the centralized
|
|
123
|
+
* Extracts the primary key field from an entity using the centralized `PrimaryKeyField` type.
|
|
124
124
|
*
|
|
125
125
|
* @see {@link RelationshipInput} for usage in mutation input types
|
|
126
126
|
*/
|
|
@@ -157,7 +157,7 @@ export type RelationshipInput<T> = T | PrimaryKeyOnly<T>;
|
|
|
157
157
|
* Detects if a type is a relationship (object with a primary key that's not a primitive wrapper).
|
|
158
158
|
*
|
|
159
159
|
* @remarks
|
|
160
|
-
* A relationship is detected as an object type that has a
|
|
160
|
+
* A relationship is detected as an object type that has a `PrimaryKeyField` property,
|
|
161
161
|
* but is not a Date or Array (which are object types but not relationships).
|
|
162
162
|
*/
|
|
163
163
|
export type IsRelationship<T> = PrimaryKeyField extends keyof T ? T extends Date | Array<any> ? false : true : false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/rayfin-data",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.0-beta.1",
|
|
4
4
|
"description": "Type-safe client library for Data API Builder endpoints",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"assets/docs"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@microsoft/rayfin-lib": "1.
|
|
17
|
-
"@microsoft/rayfin-core": "1.
|
|
16
|
+
"@microsoft/rayfin-lib": "1.33.0-beta.1",
|
|
17
|
+
"@microsoft/rayfin-core": "1.33.0-beta.1"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/node": "^20.0.0",
|