@aws-amplify/api-graphql 4.0.29-unstable.f37faeb.0 → 4.0.29

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 (129) hide show
  1. package/dist/cjs/internals/generateClient.js +4 -14
  2. package/dist/cjs/internals/generateClient.js.map +1 -1
  3. package/dist/cjs/internals/server/generateClientWithAmplifyInstance.js +3 -8
  4. package/dist/cjs/internals/server/generateClientWithAmplifyInstance.js.map +1 -1
  5. package/dist/cjs/internals/v6.js +6 -3
  6. package/dist/cjs/internals/v6.js.map +1 -1
  7. package/dist/cjs/types/index.js +11 -1
  8. package/dist/cjs/types/index.js.map +1 -1
  9. package/dist/cjs/utils/index.js +1 -5
  10. package/dist/cjs/utils/index.js.map +1 -1
  11. package/dist/esm/GraphQLAPI.d.ts +1 -1
  12. package/dist/esm/Providers/AWSAppSyncRealTimeProvider/index.d.ts +1 -1
  13. package/dist/esm/index.mjs +1 -1
  14. package/dist/esm/internals/InternalGraphQLAPI.d.ts +1 -1
  15. package/dist/esm/internals/generateClient.mjs +5 -15
  16. package/dist/esm/internals/generateClient.mjs.map +1 -1
  17. package/dist/esm/internals/server/generateClientWithAmplifyInstance.mjs +4 -9
  18. package/dist/esm/internals/server/generateClientWithAmplifyInstance.mjs.map +1 -1
  19. package/dist/esm/internals/types.d.ts +1 -1
  20. package/dist/esm/internals/v6.d.ts +1 -1
  21. package/dist/esm/internals/v6.mjs +7 -4
  22. package/dist/esm/internals/v6.mjs.map +1 -1
  23. package/dist/esm/types/index.d.ts +10 -40
  24. package/dist/esm/types/index.mjs +10 -1
  25. package/dist/esm/types/index.mjs.map +1 -1
  26. package/dist/esm/utils/index.d.ts +0 -2
  27. package/dist/esm/utils/index.mjs +0 -2
  28. package/dist/esm/utils/index.mjs.map +1 -1
  29. package/package.json +5 -6
  30. package/src/GraphQLAPI.ts +1 -1
  31. package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +4 -1
  32. package/src/internals/InternalGraphQLAPI.ts +4 -1
  33. package/src/internals/generateClient.ts +8 -36
  34. package/src/internals/server/generateClientWithAmplifyInstance.ts +6 -16
  35. package/src/internals/types.ts +1 -1
  36. package/src/internals/v6.ts +7 -7
  37. package/src/server/generateClient.ts +1 -1
  38. package/src/types/index.ts +36 -60
  39. package/src/utils/index.ts +0 -2
  40. package/dist/cjs/internals/APIClient.js +0 -733
  41. package/dist/cjs/internals/APIClient.js.map +0 -1
  42. package/dist/cjs/internals/clientUtils.js +0 -29
  43. package/dist/cjs/internals/clientUtils.js.map +0 -1
  44. package/dist/cjs/internals/generateCustomOperationsProperty.js +0 -50
  45. package/dist/cjs/internals/generateCustomOperationsProperty.js.map +0 -1
  46. package/dist/cjs/internals/operations/custom.js +0 -356
  47. package/dist/cjs/internals/operations/custom.js.map +0 -1
  48. package/dist/cjs/internals/operations/get.js +0 -62
  49. package/dist/cjs/internals/operations/get.js.map +0 -1
  50. package/dist/cjs/internals/operations/indexQuery.js +0 -75
  51. package/dist/cjs/internals/operations/indexQuery.js.map +0 -1
  52. package/dist/cjs/internals/operations/list.js +0 -74
  53. package/dist/cjs/internals/operations/list.js.map +0 -1
  54. package/dist/cjs/internals/operations/observeQuery.js +0 -121
  55. package/dist/cjs/internals/operations/observeQuery.js.map +0 -1
  56. package/dist/cjs/internals/operations/subscription.js +0 -31
  57. package/dist/cjs/internals/operations/subscription.js.map +0 -1
  58. package/dist/cjs/internals/server/generateModelsProperty.js +0 -53
  59. package/dist/cjs/internals/server/generateModelsProperty.js.map +0 -1
  60. package/dist/cjs/internals/utils/clientProperties/generateEnumsProperty.js +0 -21
  61. package/dist/cjs/internals/utils/clientProperties/generateEnumsProperty.js.map +0 -1
  62. package/dist/cjs/internals/utils/clientProperties/generateModelsProperty.js +0 -45
  63. package/dist/cjs/internals/utils/clientProperties/generateModelsProperty.js.map +0 -1
  64. package/dist/cjs/utils/findIndexByFields.js +0 -25
  65. package/dist/cjs/utils/findIndexByFields.js.map +0 -1
  66. package/dist/cjs/utils/resolveOwnerFields.js +0 -48
  67. package/dist/cjs/utils/resolveOwnerFields.js.map +0 -1
  68. package/dist/cjs/utils/resolvePKFields.js +0 -17
  69. package/dist/cjs/utils/resolvePKFields.js.map +0 -1
  70. package/dist/esm/internals/APIClient.d.ts +0 -126
  71. package/dist/esm/internals/APIClient.mjs +0 -721
  72. package/dist/esm/internals/APIClient.mjs.map +0 -1
  73. package/dist/esm/internals/clientUtils.d.ts +0 -6
  74. package/dist/esm/internals/clientUtils.mjs +0 -26
  75. package/dist/esm/internals/clientUtils.mjs.map +0 -1
  76. package/dist/esm/internals/generateCustomOperationsProperty.d.ts +0 -9
  77. package/dist/esm/internals/generateCustomOperationsProperty.mjs +0 -45
  78. package/dist/esm/internals/generateCustomOperationsProperty.mjs.map +0 -1
  79. package/dist/esm/internals/operations/custom.d.ts +0 -63
  80. package/dist/esm/internals/operations/custom.mjs +0 -354
  81. package/dist/esm/internals/operations/custom.mjs.map +0 -1
  82. package/dist/esm/internals/operations/get.d.ts +0 -5
  83. package/dist/esm/internals/operations/get.mjs +0 -60
  84. package/dist/esm/internals/operations/get.mjs.map +0 -1
  85. package/dist/esm/internals/operations/indexQuery.d.ts +0 -9
  86. package/dist/esm/internals/operations/indexQuery.mjs +0 -73
  87. package/dist/esm/internals/operations/indexQuery.mjs.map +0 -1
  88. package/dist/esm/internals/operations/list.d.ts +0 -4
  89. package/dist/esm/internals/operations/list.mjs +0 -72
  90. package/dist/esm/internals/operations/list.mjs.map +0 -1
  91. package/dist/esm/internals/operations/observeQuery.d.ts +0 -3
  92. package/dist/esm/internals/operations/observeQuery.mjs +0 -121
  93. package/dist/esm/internals/operations/observeQuery.mjs.map +0 -1
  94. package/dist/esm/internals/operations/subscription.d.ts +0 -3
  95. package/dist/esm/internals/operations/subscription.mjs +0 -29
  96. package/dist/esm/internals/operations/subscription.mjs.map +0 -1
  97. package/dist/esm/internals/server/generateModelsProperty.d.ts +0 -3
  98. package/dist/esm/internals/server/generateModelsProperty.mjs +0 -51
  99. package/dist/esm/internals/server/generateModelsProperty.mjs.map +0 -1
  100. package/dist/esm/internals/utils/clientProperties/generateEnumsProperty.d.ts +0 -3
  101. package/dist/esm/internals/utils/clientProperties/generateEnumsProperty.mjs +0 -18
  102. package/dist/esm/internals/utils/clientProperties/generateEnumsProperty.mjs.map +0 -1
  103. package/dist/esm/internals/utils/clientProperties/generateModelsProperty.d.ts +0 -4
  104. package/dist/esm/internals/utils/clientProperties/generateModelsProperty.mjs +0 -43
  105. package/dist/esm/internals/utils/clientProperties/generateModelsProperty.mjs.map +0 -1
  106. package/dist/esm/utils/findIndexByFields.d.ts +0 -9
  107. package/dist/esm/utils/findIndexByFields.mjs +0 -22
  108. package/dist/esm/utils/findIndexByFields.mjs.map +0 -1
  109. package/dist/esm/utils/resolveOwnerFields.d.ts +0 -12
  110. package/dist/esm/utils/resolveOwnerFields.mjs +0 -45
  111. package/dist/esm/utils/resolveOwnerFields.mjs.map +0 -1
  112. package/dist/esm/utils/resolvePKFields.d.ts +0 -13
  113. package/dist/esm/utils/resolvePKFields.mjs +0 -14
  114. package/dist/esm/utils/resolvePKFields.mjs.map +0 -1
  115. package/src/internals/APIClient.ts +0 -1076
  116. package/src/internals/clientUtils.ts +0 -37
  117. package/src/internals/generateCustomOperationsProperty.ts +0 -112
  118. package/src/internals/operations/custom.ts +0 -492
  119. package/src/internals/operations/get.ts +0 -140
  120. package/src/internals/operations/indexQuery.ts +0 -170
  121. package/src/internals/operations/list.ts +0 -135
  122. package/src/internals/operations/observeQuery.ts +0 -146
  123. package/src/internals/operations/subscription.ts +0 -75
  124. package/src/internals/server/generateModelsProperty.ts +0 -97
  125. package/src/internals/utils/clientProperties/generateEnumsProperty.ts +0 -34
  126. package/src/internals/utils/clientProperties/generateModelsProperty.ts +0 -81
  127. package/src/utils/findIndexByFields.ts +0 -31
  128. package/src/utils/resolveOwnerFields.ts +0 -77
  129. package/src/utils/resolvePKFields.ts +0 -23
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/api-graphql",
3
- "version": "4.0.29-unstable.f37faeb.0+f37faeb",
3
+ "version": "4.0.29",
4
4
  "description": "Api-graphql category of aws-amplify",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -72,7 +72,6 @@
72
72
  },
73
73
  "homepage": "https://aws-amplify.github.io/",
74
74
  "devDependencies": {
75
- "@aws-amplify/data-schema": "^0.14.8",
76
75
  "@rollup/plugin-typescript": "11.1.5",
77
76
  "rollup": "^4.9.6",
78
77
  "typescript": "5.0.2"
@@ -85,9 +84,9 @@
85
84
  "server"
86
85
  ],
87
86
  "dependencies": {
88
- "@aws-amplify/api-rest": "4.0.28-unstable.f37faeb.0+f37faeb",
89
- "@aws-amplify/core": "6.0.28-unstable.f37faeb.0+f37faeb",
90
- "@aws-amplify/data-schema-types": "^0.7.14",
87
+ "@aws-amplify/api-rest": "4.0.28",
88
+ "@aws-amplify/core": "6.0.28",
89
+ "@aws-amplify/data-schema": "^0.16.1",
91
90
  "@aws-sdk/types": "3.387.0",
92
91
  "graphql": "15.8.0",
93
92
  "rxjs": "^7.8.1",
@@ -102,5 +101,5 @@
102
101
  "limit": "91.7 kB"
103
102
  }
104
103
  ],
105
- "gitHead": "f37faebacddeed66ce5bc1d7f78b8d1d46aecb17"
104
+ "gitHead": "672417ff6e9823f8b92c5d43585acf6ad9e43264"
106
105
  }
package/src/GraphQLAPI.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { AmplifyClassV6 } from '@aws-amplify/core';
4
4
  import { ApiAction, Category } from '@aws-amplify/core/internals/utils';
5
- import { CustomHeaders } from '@aws-amplify/data-schema-types';
5
+ import { CustomHeaders } from '@aws-amplify/data-schema/runtime';
6
6
  import { Observable } from 'rxjs';
7
7
 
8
8
  import { GraphQLOptions, GraphQLResult } from './types';
@@ -22,7 +22,10 @@ import {
22
22
  isNonRetryableError,
23
23
  jitteredExponentialRetry,
24
24
  } from '@aws-amplify/core/internals/utils';
25
- import { CustomHeaders, RequestOptions } from '@aws-amplify/data-schema-types';
25
+ import {
26
+ CustomHeaders,
27
+ RequestOptions,
28
+ } from '@aws-amplify/data-schema/runtime';
26
29
 
27
30
  import {
28
31
  CONTROL_MSG,
@@ -21,7 +21,10 @@ import {
21
21
  post,
22
22
  updateRequestToBeCancellable,
23
23
  } from '@aws-amplify/api-rest/internals';
24
- import { CustomHeaders, RequestOptions } from '@aws-amplify/data-schema-types';
24
+ import {
25
+ CustomHeaders,
26
+ RequestOptions,
27
+ } from '@aws-amplify/data-schema/runtime';
25
28
 
26
29
  import { AWSAppSyncRealTimeProvider } from '../Providers/AWSAppSyncRealTimeProvider';
27
30
  import { GraphQLOperation, GraphQLOptions, GraphQLResult } from '../types';
@@ -7,7 +7,8 @@ import {
7
7
  CustomSubscriptions,
8
8
  EnumTypes,
9
9
  ModelTypes,
10
- } from '@aws-amplify/data-schema-types';
10
+ addSchemaToClient,
11
+ } from '@aws-amplify/data-schema/runtime';
11
12
 
12
13
  import {
13
14
  V6Client,
@@ -15,19 +16,13 @@ import {
15
16
  __authMode,
16
17
  __authToken,
17
18
  __headers,
19
+ getInternals,
18
20
  } from '../types';
19
21
 
20
- import { cancel, graphql, isCancelError } from './v6';
21
- import { generateEnumsProperty } from './utils/clientProperties/generateEnumsProperty';
22
- import { generateModelsProperty } from './utils/clientProperties/generateModelsProperty';
23
22
  import { isApiGraphQLConfig } from './utils/runtimeTypeGuards/isApiGraphQLProviderConfig';
24
- import {
25
- generateCustomMutationsProperty,
26
- generateCustomQueriesProperty,
27
- generateCustomSubscriptionsProperty,
28
- } from './generateCustomOperationsProperty';
29
- import { ClientGenerationParams } from './types';
30
23
  import { isConfigureEventWithResourceConfig } from './utils/runtimeTypeGuards/isConfigureEventWithResourceConfig';
24
+ import { cancel, graphql, isCancelError } from './v6';
25
+ import { ClientGenerationParams } from './types';
31
26
 
32
27
  /**
33
28
  * @private
@@ -59,17 +54,7 @@ export function generateClient<T extends Record<any, any> = never>(
59
54
  const apiGraphqlConfig = params.amplify.getConfig().API?.GraphQL;
60
55
 
61
56
  if (isApiGraphQLConfig(apiGraphqlConfig)) {
62
- client.models = generateModelsProperty<T>(client, apiGraphqlConfig);
63
- client.enums = generateEnumsProperty<T>(apiGraphqlConfig);
64
- client.queries = generateCustomQueriesProperty<T>(client, apiGraphqlConfig);
65
- client.mutations = generateCustomMutationsProperty<T>(
66
- client,
67
- apiGraphqlConfig,
68
- );
69
- client.subscriptions = generateCustomSubscriptionsProperty(
70
- client,
71
- apiGraphqlConfig,
72
- );
57
+ addSchemaToClient(client, apiGraphqlConfig, getInternals);
73
58
  } else {
74
59
  // This happens when the `Amplify.configure()` call gets evaluated after the `generateClient()` call.
75
60
  //
@@ -86,7 +71,7 @@ export function generateClient<T extends Record<any, any> = never>(
86
71
  generateModelsPropertyOnAmplifyConfigure(client);
87
72
  }
88
73
 
89
- return client as V6Client<T>;
74
+ return client as any;
90
75
  }
91
76
 
92
77
  const generateModelsPropertyOnAmplifyConfigure = (clientRef: any) => {
@@ -98,20 +83,7 @@ const generateModelsPropertyOnAmplifyConfigure = (clientRef: any) => {
98
83
  const apiGraphQLConfig = coreEvent.payload.data.API?.GraphQL;
99
84
 
100
85
  if (isApiGraphQLConfig(apiGraphQLConfig)) {
101
- clientRef.models = generateModelsProperty(clientRef, apiGraphQLConfig);
102
- clientRef.enums = generateEnumsProperty(apiGraphQLConfig);
103
- clientRef.queries = generateCustomQueriesProperty(
104
- clientRef,
105
- apiGraphQLConfig,
106
- );
107
- clientRef.mutations = generateCustomMutationsProperty(
108
- clientRef,
109
- apiGraphQLConfig,
110
- );
111
- clientRef.subscriptions = generateCustomSubscriptionsProperty(
112
- clientRef,
113
- apiGraphQLConfig,
114
- );
86
+ addSchemaToClient(clientRef, apiGraphQLConfig, getInternals);
115
87
  }
116
88
  });
117
89
  };
@@ -1,7 +1,8 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { cancel, graphql, isCancelError } from '..';
4
+ import { addSchemaToClientWithInstance } from '@aws-amplify/data-schema/runtime';
5
+
5
6
  import {
6
7
  CommonPublicClientOptions,
7
8
  ServerClientGenerationParams,
@@ -11,15 +12,10 @@ import {
11
12
  __authMode,
12
13
  __authToken,
13
14
  __headers,
15
+ getInternals,
14
16
  } from '../../types';
15
17
  import { isApiGraphQLConfig } from '../utils/runtimeTypeGuards/isApiGraphQLProviderConfig';
16
- import { generateEnumsProperty } from '../utils/clientProperties/generateEnumsProperty';
17
- import {
18
- generateCustomMutationsProperty,
19
- generateCustomQueriesProperty,
20
- } from '../generateCustomOperationsProperty';
21
-
22
- import { generateModelsProperty } from './generateModelsProperty';
18
+ import { cancel, graphql, isCancelError } from '..';
23
19
 
24
20
  /**
25
21
  * @private
@@ -53,14 +49,8 @@ export function generateClientWithAmplifyInstance<
53
49
  const apiGraphqlConfig = params.config?.API?.GraphQL;
54
50
 
55
51
  if (isApiGraphQLConfig(apiGraphqlConfig)) {
56
- client.models = generateModelsProperty<T>(client, params);
57
- client.enums = generateEnumsProperty<T>(apiGraphqlConfig);
58
- client.queries = generateCustomQueriesProperty<T>(client, apiGraphqlConfig);
59
- client.mutations = generateCustomMutationsProperty<T>(
60
- client,
61
- apiGraphqlConfig,
62
- );
52
+ addSchemaToClientWithInstance<T>(client, params, getInternals);
63
53
  }
64
54
 
65
- return client as ClientType;
55
+ return client as any;
66
56
  }
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { AmplifyClassV6 } from '@aws-amplify/core';
4
4
  import { GraphQLAuthMode } from '@aws-amplify/core/internals/utils';
5
- import { CustomHeaders } from '@aws-amplify/data-schema-types';
5
+ import { CustomHeaders } from '@aws-amplify/data-schema/runtime';
6
6
 
7
7
  /**
8
8
  * @private
@@ -1,15 +1,13 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import { CustomHeaders } from '@aws-amplify/data-schema-types';
3
+ import { CustomHeaders } from '@aws-amplify/data-schema/runtime';
4
4
 
5
5
  import { GraphQLAPI } from '../GraphQLAPI';
6
6
  import {
7
7
  GraphQLOptionsV6,
8
8
  GraphQLResponseV6,
9
9
  V6Client,
10
- __amplify,
11
- __authMode,
12
- __authToken,
10
+ getInternals,
13
11
  } from '../types';
14
12
 
15
13
  /**
@@ -105,8 +103,9 @@ export function graphql<
105
103
  additionalHeaders?: CustomHeaders,
106
104
  ): GraphQLResponseV6<FALLBACK_TYPES, TYPED_GQL_STRING> {
107
105
  // inject client-level auth
108
- options.authMode = options.authMode || this[__authMode];
109
- options.authToken = options.authToken || this[__authToken];
106
+ const internals = getInternals(this as any);
107
+ options.authMode = options.authMode || internals.authMode;
108
+ options.authToken = options.authToken || internals.authToken;
110
109
 
111
110
  /**
112
111
  * The correctness of these typings depends on correct string branding or overrides.
@@ -114,7 +113,8 @@ export function graphql<
114
113
  * any validation or type-guarding here.
115
114
  */
116
115
  const result = GraphQLAPI.graphql(
117
- this[__amplify],
116
+ // TODO: move V6Client back into this package?
117
+ internals.amplify as any,
118
118
  options,
119
119
  additionalHeaders,
120
120
  );
@@ -5,7 +5,7 @@ import {
5
5
  AmplifyServer,
6
6
  getAmplifyServerContext,
7
7
  } from '@aws-amplify/core/internals/adapter-core';
8
- import { CustomHeaders } from '@aws-amplify/data-schema-types';
8
+ import { CustomHeaders } from '@aws-amplify/data-schema/runtime';
9
9
 
10
10
  import { generateClientWithAmplifyInstance } from '../internals/server';
11
11
  import {
@@ -2,14 +2,14 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { AmplifyClassV6, ResourcesConfig } from '@aws-amplify/core';
4
4
  import {
5
+ BaseClient,
6
+ ClientExtensions,
7
+ ClientExtensionsSSRCookies,
8
+ ClientExtensionsSSRRequest,
9
+ ClientInternals,
5
10
  CustomHeaders,
6
- CustomMutations,
7
- CustomQueries,
8
- CustomSubscriptions,
9
- EnumTypes,
10
11
  ModelSortDirection,
11
- ModelTypes,
12
- } from '@aws-amplify/data-schema-types';
12
+ } from '@aws-amplify/data-schema/runtime';
13
13
  import { DocumentNode, GraphQLError, Source } from 'graphql';
14
14
  import { Observable } from 'rxjs';
15
15
  import {
@@ -22,7 +22,7 @@ export { OperationTypeNode } from 'graphql';
22
22
 
23
23
  export { CONTROL_MSG, ConnectionState } from './PubSub';
24
24
 
25
- export { SelectionSet } from '@aws-amplify/data-schema-types';
25
+ export { SelectionSet } from '@aws-amplify/data-schema/runtime';
26
26
 
27
27
  export { CommonPublicClientOptions } from '../internals/types';
28
28
 
@@ -366,68 +366,44 @@ export type GeneratedSubscription<InputType, OutputType> = string & {
366
366
  __generatedSubscriptionOutput: OutputType;
367
367
  };
368
368
 
369
- type FilteredKeys<T> = {
370
- [P in keyof T]: T[P] extends never ? never : P;
371
- }[keyof T];
372
-
373
- type ExcludeNeverFields<O> = {
374
- [K in FilteredKeys<O>]: O[K];
375
- };
376
-
377
369
  export const __amplify = Symbol('amplify');
378
370
  export const __authMode = Symbol('authMode');
379
371
  export const __authToken = Symbol('authToken');
380
372
  export const __headers = Symbol('headers');
381
373
 
374
+ export function getInternals(client: BaseClient): ClientInternals {
375
+ const c = client as any;
376
+
377
+ return {
378
+ amplify: c[__amplify],
379
+ authMode: c[__authMode],
380
+ authToken: c[__authToken],
381
+ headers: c[__headers],
382
+ } as any;
383
+ }
384
+
382
385
  export type ClientWithModels =
383
- | V6Client<Record<string, any>>
384
- | V6ClientSSRRequest<Record<string, any>>
385
- | V6ClientSSRCookies<Record<string, any>>;
386
-
387
- export type V6Client<T extends Record<any, any> = never> = ExcludeNeverFields<{
388
- [__amplify]: AmplifyClassV6;
389
- [__authMode]?: GraphQLAuthMode;
390
- [__authToken]?: string;
391
- [__headers]?: CustomHeaders;
386
+ | V6Client
387
+ | V6ClientSSRRequest
388
+ | V6ClientSSRCookies;
389
+
390
+ export type V6Client<T extends Record<any, any> = never> = {
391
+ graphql: GraphQLMethod;
392
+ cancel(promise: Promise<any>, message?: string): boolean;
393
+ isCancelError(error: any): boolean;
394
+ } & ClientExtensions<T>;
395
+
396
+ export type V6ClientSSRRequest<T extends Record<any, any> = never> = {
397
+ graphql: GraphQLMethodSSR;
398
+ cancel(promise: Promise<any>, message?: string): boolean;
399
+ isCancelError(error: any): boolean;
400
+ } & ClientExtensionsSSRRequest<T>;
401
+
402
+ export type V6ClientSSRCookies<T extends Record<any, any> = never> = {
392
403
  graphql: GraphQLMethod;
393
404
  cancel(promise: Promise<any>, message?: string): boolean;
394
405
  isCancelError(error: any): boolean;
395
- models: ModelTypes<T>;
396
- enums: EnumTypes<T>;
397
- queries: CustomQueries<T>;
398
- mutations: CustomMutations<T>;
399
- subscriptions: CustomSubscriptions<T>;
400
- }>;
401
-
402
- export type V6ClientSSRRequest<T extends Record<any, any> = never> =
403
- ExcludeNeverFields<{
404
- [__amplify]: AmplifyClassV6;
405
- [__authMode]?: GraphQLAuthMode;
406
- [__authToken]?: string;
407
- [__headers]?: CustomHeaders;
408
- graphql: GraphQLMethodSSR;
409
- cancel(promise: Promise<any>, message?: string): boolean;
410
- isCancelError(error: any): boolean;
411
- models: ModelTypes<T, 'REQUEST'>;
412
- enums: EnumTypes<T>;
413
- queries: CustomQueries<T, 'REQUEST'>;
414
- mutations: CustomMutations<T, 'REQUEST'>;
415
- }>;
416
-
417
- export type V6ClientSSRCookies<T extends Record<any, any> = never> =
418
- ExcludeNeverFields<{
419
- [__amplify]: AmplifyClassV6;
420
- [__authMode]?: GraphQLAuthMode;
421
- [__authToken]?: string;
422
- [__headers]?: CustomHeaders;
423
- graphql: GraphQLMethod;
424
- cancel(promise: Promise<any>, message?: string): boolean;
425
- isCancelError(error: any): boolean;
426
- models: ModelTypes<T, 'COOKIES'>;
427
- enums: EnumTypes<T>;
428
- queries: CustomQueries<T, 'COOKIES'>;
429
- mutations: CustomMutations<T, 'COOKIES'>;
430
- }>;
406
+ } & ClientExtensionsSSRCookies<T>;
431
407
 
432
408
  export type GraphQLMethod = <
433
409
  FALLBACK_TYPES = unknown,
@@ -3,5 +3,3 @@
3
3
 
4
4
  export { resolveConfig } from './resolveConfig';
5
5
  export { resolveLibraryOptions } from './resolveLibraryOptions';
6
- export { resolvePKFields } from './resolvePKFields';
7
- export { findIndexByFields } from './findIndexByFields';