@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.
- package/dist/cjs/internals/generateClient.js +4 -14
- package/dist/cjs/internals/generateClient.js.map +1 -1
- package/dist/cjs/internals/server/generateClientWithAmplifyInstance.js +3 -8
- package/dist/cjs/internals/server/generateClientWithAmplifyInstance.js.map +1 -1
- package/dist/cjs/internals/v6.js +6 -3
- package/dist/cjs/internals/v6.js.map +1 -1
- package/dist/cjs/types/index.js +11 -1
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/index.js +1 -5
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/esm/GraphQLAPI.d.ts +1 -1
- package/dist/esm/Providers/AWSAppSyncRealTimeProvider/index.d.ts +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internals/InternalGraphQLAPI.d.ts +1 -1
- package/dist/esm/internals/generateClient.mjs +5 -15
- package/dist/esm/internals/generateClient.mjs.map +1 -1
- package/dist/esm/internals/server/generateClientWithAmplifyInstance.mjs +4 -9
- package/dist/esm/internals/server/generateClientWithAmplifyInstance.mjs.map +1 -1
- package/dist/esm/internals/types.d.ts +1 -1
- package/dist/esm/internals/v6.d.ts +1 -1
- package/dist/esm/internals/v6.mjs +7 -4
- package/dist/esm/internals/v6.mjs.map +1 -1
- package/dist/esm/types/index.d.ts +10 -40
- package/dist/esm/types/index.mjs +10 -1
- package/dist/esm/types/index.mjs.map +1 -1
- package/dist/esm/utils/index.d.ts +0 -2
- package/dist/esm/utils/index.mjs +0 -2
- package/dist/esm/utils/index.mjs.map +1 -1
- package/package.json +5 -6
- package/src/GraphQLAPI.ts +1 -1
- package/src/Providers/AWSAppSyncRealTimeProvider/index.ts +4 -1
- package/src/internals/InternalGraphQLAPI.ts +4 -1
- package/src/internals/generateClient.ts +8 -36
- package/src/internals/server/generateClientWithAmplifyInstance.ts +6 -16
- package/src/internals/types.ts +1 -1
- package/src/internals/v6.ts +7 -7
- package/src/server/generateClient.ts +1 -1
- package/src/types/index.ts +36 -60
- package/src/utils/index.ts +0 -2
- package/dist/cjs/internals/APIClient.js +0 -733
- package/dist/cjs/internals/APIClient.js.map +0 -1
- package/dist/cjs/internals/clientUtils.js +0 -29
- package/dist/cjs/internals/clientUtils.js.map +0 -1
- package/dist/cjs/internals/generateCustomOperationsProperty.js +0 -50
- package/dist/cjs/internals/generateCustomOperationsProperty.js.map +0 -1
- package/dist/cjs/internals/operations/custom.js +0 -356
- package/dist/cjs/internals/operations/custom.js.map +0 -1
- package/dist/cjs/internals/operations/get.js +0 -62
- package/dist/cjs/internals/operations/get.js.map +0 -1
- package/dist/cjs/internals/operations/indexQuery.js +0 -75
- package/dist/cjs/internals/operations/indexQuery.js.map +0 -1
- package/dist/cjs/internals/operations/list.js +0 -74
- package/dist/cjs/internals/operations/list.js.map +0 -1
- package/dist/cjs/internals/operations/observeQuery.js +0 -121
- package/dist/cjs/internals/operations/observeQuery.js.map +0 -1
- package/dist/cjs/internals/operations/subscription.js +0 -31
- package/dist/cjs/internals/operations/subscription.js.map +0 -1
- package/dist/cjs/internals/server/generateModelsProperty.js +0 -53
- package/dist/cjs/internals/server/generateModelsProperty.js.map +0 -1
- package/dist/cjs/internals/utils/clientProperties/generateEnumsProperty.js +0 -21
- package/dist/cjs/internals/utils/clientProperties/generateEnumsProperty.js.map +0 -1
- package/dist/cjs/internals/utils/clientProperties/generateModelsProperty.js +0 -45
- package/dist/cjs/internals/utils/clientProperties/generateModelsProperty.js.map +0 -1
- package/dist/cjs/utils/findIndexByFields.js +0 -25
- package/dist/cjs/utils/findIndexByFields.js.map +0 -1
- package/dist/cjs/utils/resolveOwnerFields.js +0 -48
- package/dist/cjs/utils/resolveOwnerFields.js.map +0 -1
- package/dist/cjs/utils/resolvePKFields.js +0 -17
- package/dist/cjs/utils/resolvePKFields.js.map +0 -1
- package/dist/esm/internals/APIClient.d.ts +0 -126
- package/dist/esm/internals/APIClient.mjs +0 -721
- package/dist/esm/internals/APIClient.mjs.map +0 -1
- package/dist/esm/internals/clientUtils.d.ts +0 -6
- package/dist/esm/internals/clientUtils.mjs +0 -26
- package/dist/esm/internals/clientUtils.mjs.map +0 -1
- package/dist/esm/internals/generateCustomOperationsProperty.d.ts +0 -9
- package/dist/esm/internals/generateCustomOperationsProperty.mjs +0 -45
- package/dist/esm/internals/generateCustomOperationsProperty.mjs.map +0 -1
- package/dist/esm/internals/operations/custom.d.ts +0 -63
- package/dist/esm/internals/operations/custom.mjs +0 -354
- package/dist/esm/internals/operations/custom.mjs.map +0 -1
- package/dist/esm/internals/operations/get.d.ts +0 -5
- package/dist/esm/internals/operations/get.mjs +0 -60
- package/dist/esm/internals/operations/get.mjs.map +0 -1
- package/dist/esm/internals/operations/indexQuery.d.ts +0 -9
- package/dist/esm/internals/operations/indexQuery.mjs +0 -73
- package/dist/esm/internals/operations/indexQuery.mjs.map +0 -1
- package/dist/esm/internals/operations/list.d.ts +0 -4
- package/dist/esm/internals/operations/list.mjs +0 -72
- package/dist/esm/internals/operations/list.mjs.map +0 -1
- package/dist/esm/internals/operations/observeQuery.d.ts +0 -3
- package/dist/esm/internals/operations/observeQuery.mjs +0 -121
- package/dist/esm/internals/operations/observeQuery.mjs.map +0 -1
- package/dist/esm/internals/operations/subscription.d.ts +0 -3
- package/dist/esm/internals/operations/subscription.mjs +0 -29
- package/dist/esm/internals/operations/subscription.mjs.map +0 -1
- package/dist/esm/internals/server/generateModelsProperty.d.ts +0 -3
- package/dist/esm/internals/server/generateModelsProperty.mjs +0 -51
- package/dist/esm/internals/server/generateModelsProperty.mjs.map +0 -1
- package/dist/esm/internals/utils/clientProperties/generateEnumsProperty.d.ts +0 -3
- package/dist/esm/internals/utils/clientProperties/generateEnumsProperty.mjs +0 -18
- package/dist/esm/internals/utils/clientProperties/generateEnumsProperty.mjs.map +0 -1
- package/dist/esm/internals/utils/clientProperties/generateModelsProperty.d.ts +0 -4
- package/dist/esm/internals/utils/clientProperties/generateModelsProperty.mjs +0 -43
- package/dist/esm/internals/utils/clientProperties/generateModelsProperty.mjs.map +0 -1
- package/dist/esm/utils/findIndexByFields.d.ts +0 -9
- package/dist/esm/utils/findIndexByFields.mjs +0 -22
- package/dist/esm/utils/findIndexByFields.mjs.map +0 -1
- package/dist/esm/utils/resolveOwnerFields.d.ts +0 -12
- package/dist/esm/utils/resolveOwnerFields.mjs +0 -45
- package/dist/esm/utils/resolveOwnerFields.mjs.map +0 -1
- package/dist/esm/utils/resolvePKFields.d.ts +0 -13
- package/dist/esm/utils/resolvePKFields.mjs +0 -14
- package/dist/esm/utils/resolvePKFields.mjs.map +0 -1
- package/src/internals/APIClient.ts +0 -1076
- package/src/internals/clientUtils.ts +0 -37
- package/src/internals/generateCustomOperationsProperty.ts +0 -112
- package/src/internals/operations/custom.ts +0 -492
- package/src/internals/operations/get.ts +0 -140
- package/src/internals/operations/indexQuery.ts +0 -170
- package/src/internals/operations/list.ts +0 -135
- package/src/internals/operations/observeQuery.ts +0 -146
- package/src/internals/operations/subscription.ts +0 -75
- package/src/internals/server/generateModelsProperty.ts +0 -97
- package/src/internals/utils/clientProperties/generateEnumsProperty.ts +0 -34
- package/src/internals/utils/clientProperties/generateModelsProperty.ts +0 -81
- package/src/utils/findIndexByFields.ts +0 -31
- package/src/utils/resolveOwnerFields.ts +0 -77
- package/src/utils/resolvePKFields.ts +0 -23
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.resolveOwnerFields = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Given an introspection schema model, returns all owner fields.
|
|
7
|
-
*
|
|
8
|
-
* @param model Model from an introspection schema
|
|
9
|
-
* @returns List of owner field names
|
|
10
|
-
*/
|
|
11
|
-
function resolveOwnerFields(model) {
|
|
12
|
-
const ownerFields = new Set();
|
|
13
|
-
for (const attr of model.attributes || []) {
|
|
14
|
-
if (isAuthAttribute(attr)) {
|
|
15
|
-
for (const rule of attr.properties.rules) {
|
|
16
|
-
if (rule.allow === 'owner') {
|
|
17
|
-
ownerFields.add(rule.ownerField || 'owner');
|
|
18
|
-
}
|
|
19
|
-
else if (rule.allow === 'groups' && rule.groupsField !== undefined) {
|
|
20
|
-
// only valid for dynamic group(s)
|
|
21
|
-
// static group auth will have an array of predefined groups in the attribute, groups: string[]
|
|
22
|
-
// but `groupsField` will be undefined
|
|
23
|
-
ownerFields.add(rule.groupsField);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return Array.from(ownerFields);
|
|
29
|
-
}
|
|
30
|
-
exports.resolveOwnerFields = resolveOwnerFields;
|
|
31
|
-
/**
|
|
32
|
-
* Type guard that identifies an auth attribute with an attached rules list that
|
|
33
|
-
* specifies an `allow` attribute at a minimum.
|
|
34
|
-
*
|
|
35
|
-
* @param attribute Any object. Ideally a model introspection schema model attribute
|
|
36
|
-
* @returns True if given object is an auth attribute
|
|
37
|
-
*/
|
|
38
|
-
function isAuthAttribute(attribute) {
|
|
39
|
-
if (attribute?.type === 'auth') {
|
|
40
|
-
if (typeof attribute?.properties === 'object') {
|
|
41
|
-
if (Array.isArray(attribute?.properties?.rules)) {
|
|
42
|
-
return (attribute?.properties?.rules).every(rule => !!rule.allow);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=resolveOwnerFields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveOwnerFields.js","sources":["../../../src/utils/resolveOwnerFields.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveOwnerFields = void 0;\n/**\n * Given an introspection schema model, returns all owner fields.\n *\n * @param model Model from an introspection schema\n * @returns List of owner field names\n */\nfunction resolveOwnerFields(model) {\n const ownerFields = new Set();\n for (const attr of model.attributes || []) {\n if (isAuthAttribute(attr)) {\n for (const rule of attr.properties.rules) {\n if (rule.allow === 'owner') {\n ownerFields.add(rule.ownerField || 'owner');\n }\n else if (rule.allow === 'groups' && rule.groupsField !== undefined) {\n // only valid for dynamic group(s)\n // static group auth will have an array of predefined groups in the attribute, groups: string[]\n // but `groupsField` will be undefined\n ownerFields.add(rule.groupsField);\n }\n }\n }\n }\n return Array.from(ownerFields);\n}\nexports.resolveOwnerFields = resolveOwnerFields;\n/**\n * Type guard that identifies an auth attribute with an attached rules list that\n * specifies an `allow` attribute at a minimum.\n *\n * @param attribute Any object. Ideally a model introspection schema model attribute\n * @returns True if given object is an auth attribute\n */\nfunction isAuthAttribute(attribute) {\n if (attribute?.type === 'auth') {\n if (typeof attribute?.properties === 'object') {\n if (Array.isArray(attribute?.properties?.rules)) {\n return (attribute?.properties?.rules).every(rule => !!rule.allow);\n }\n }\n }\n return false;\n}\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,KAAK,CAAC,CAAC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,KAAK,EAAE;AACnC,IAAI,MAAM,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;AAClC,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,UAAU,IAAI,EAAE,EAAE;AAC/C,QAAQ,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE;AACnC,YAAY,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE;AACtD,gBAAgB,IAAI,IAAI,CAAC,KAAK,KAAK,OAAO,EAAE;AAC5C,oBAAoB,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,OAAO,CAAC,CAAC;AAChE,iBAAiB;AACjB,qBAAqB,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE;AACpF;AACA;AACA;AACA,oBAAoB,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACtD,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL,IAAI,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACnC,CAAC;AACD,OAAO,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,eAAe,CAAC,SAAS,EAAE;AACpC,IAAI,IAAI,SAAS,EAAE,IAAI,KAAK,MAAM,EAAE;AACpC,QAAQ,IAAI,OAAO,SAAS,EAAE,UAAU,KAAK,QAAQ,EAAE;AACvD,YAAY,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE;AAC7D,gBAAgB,OAAO,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClF,aAAa;AACb,SAAS;AACT,KAAK;AACL,IAAI,OAAO,KAAK,CAAC;AACjB;;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.resolvePKFields = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Given a SchemaModel from a ModelIntrospectionSchema, returns the primary key
|
|
7
|
-
* as an array of field names.
|
|
8
|
-
*
|
|
9
|
-
* @param model The model object
|
|
10
|
-
* @returns Array of field names
|
|
11
|
-
*/
|
|
12
|
-
function resolvePKFields(model) {
|
|
13
|
-
const { primaryKeyFieldName, sortKeyFieldNames } = model.primaryKeyInfo;
|
|
14
|
-
return [primaryKeyFieldName, ...sortKeyFieldNames];
|
|
15
|
-
}
|
|
16
|
-
exports.resolvePKFields = resolvePKFields;
|
|
17
|
-
//# sourceMappingURL=resolvePKFields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolvePKFields.js","sources":["../../../src/utils/resolvePKFields.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolvePKFields = void 0;\n/**\n * Given a SchemaModel from a ModelIntrospectionSchema, returns the primary key\n * as an array of field names.\n *\n * @param model The model object\n * @returns Array of field names\n */\nfunction resolvePKFields(model) {\n const { primaryKeyFieldName, sortKeyFieldNames } = model.primaryKeyInfo;\n return [primaryKeyFieldName, ...sortKeyFieldNames];\n}\nexports.resolvePKFields = resolvePKFields;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,eAAe,GAAG,KAAK,CAAC,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,eAAe,CAAC,KAAK,EAAE;AAChC,IAAI,MAAM,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC,cAAc,CAAC;AAC5E,IAAI,OAAO,CAAC,mBAAmB,EAAE,GAAG,iBAAiB,CAAC,CAAC;AACvD,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,eAAe;;"}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { GraphQLAuthMode, ModelIntrospectionSchema, SchemaModel, SchemaNonModel } from '@aws-amplify/core/internals/utils';
|
|
2
|
-
import { CustomHeaders } from '@aws-amplify/data-schema-types';
|
|
3
|
-
import { AuthModeParams, ClientWithModels, ListArgs, QueryArgs, V6Client } from '../types';
|
|
4
|
-
import type { IndexMeta } from './operations/indexQuery';
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* @param GraphQL response object
|
|
8
|
-
* @returns response object with `items` properties flattened
|
|
9
|
-
*/
|
|
10
|
-
export declare const flattenItems: (obj: Record<string, any>) => Record<string, any>;
|
|
11
|
-
export declare function initializeModel(client: ClientWithModels, modelName: string, result: any[], modelIntrospection: ModelIntrospectionSchema, authMode: GraphQLAuthMode | undefined, authToken: string | undefined, context?: boolean): any[];
|
|
12
|
-
export declare const graphQLOperationsInfo: {
|
|
13
|
-
readonly CREATE: {
|
|
14
|
-
readonly operationPrefix: "create";
|
|
15
|
-
readonly usePlural: false;
|
|
16
|
-
};
|
|
17
|
-
readonly READ: {
|
|
18
|
-
readonly operationPrefix: "get";
|
|
19
|
-
readonly usePlural: false;
|
|
20
|
-
};
|
|
21
|
-
readonly UPDATE: {
|
|
22
|
-
readonly operationPrefix: "update";
|
|
23
|
-
readonly usePlural: false;
|
|
24
|
-
};
|
|
25
|
-
readonly DELETE: {
|
|
26
|
-
readonly operationPrefix: "delete";
|
|
27
|
-
readonly usePlural: false;
|
|
28
|
-
};
|
|
29
|
-
readonly LIST: {
|
|
30
|
-
readonly operationPrefix: "list";
|
|
31
|
-
readonly usePlural: true;
|
|
32
|
-
};
|
|
33
|
-
readonly INDEX_QUERY: {
|
|
34
|
-
readonly operationPrefix: "";
|
|
35
|
-
readonly usePlural: false;
|
|
36
|
-
};
|
|
37
|
-
readonly ONCREATE: {
|
|
38
|
-
readonly operationPrefix: "onCreate";
|
|
39
|
-
readonly usePlural: false;
|
|
40
|
-
};
|
|
41
|
-
readonly ONUPDATE: {
|
|
42
|
-
readonly operationPrefix: "onUpdate";
|
|
43
|
-
readonly usePlural: false;
|
|
44
|
-
};
|
|
45
|
-
readonly ONDELETE: {
|
|
46
|
-
readonly operationPrefix: "onDelete";
|
|
47
|
-
readonly usePlural: false;
|
|
48
|
-
};
|
|
49
|
-
readonly OBSERVE_QUERY: {
|
|
50
|
-
readonly operationPrefix: "observeQuery";
|
|
51
|
-
readonly usePlural: false;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
export type ModelOperation = keyof typeof graphQLOperationsInfo;
|
|
55
|
-
export declare const getDefaultSelectionSetForNonModelWithIR: (nonModelDefinition: SchemaNonModel, modelIntrospection: ModelIntrospectionSchema) => Record<string, unknown>;
|
|
56
|
-
/**
|
|
57
|
-
* Generates nested Custom Selection Set IR from path
|
|
58
|
-
*
|
|
59
|
-
* @param modelDefinitions
|
|
60
|
-
* @param modelName
|
|
61
|
-
* @param selectionSet - array of object paths
|
|
62
|
-
* @example
|
|
63
|
-
* ### Given
|
|
64
|
-
* `selectionSet = ['id', 'comments.post.id']`
|
|
65
|
-
* ### Returns
|
|
66
|
-
* ```ts
|
|
67
|
-
* {
|
|
68
|
-
* id: '',
|
|
69
|
-
* comments: {
|
|
70
|
-
* items: { post: { id: '' } }
|
|
71
|
-
* }
|
|
72
|
-
* }
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
export declare function customSelectionSetToIR(modelIntrospection: ModelIntrospectionSchema, modelName: string, selectionSet: string[]): Record<string, string | object>;
|
|
76
|
-
/**
|
|
77
|
-
* Stringifies selection set IR
|
|
78
|
-
* * @example
|
|
79
|
-
* ### Given
|
|
80
|
-
* ```ts
|
|
81
|
-
* {
|
|
82
|
-
* id: '',
|
|
83
|
-
* comments: {
|
|
84
|
-
* items: { post: { id: '' } }
|
|
85
|
-
* }
|
|
86
|
-
* }
|
|
87
|
-
* ```
|
|
88
|
-
* ### Returns
|
|
89
|
-
* `'id comments { items { post { id } } }'`
|
|
90
|
-
*/
|
|
91
|
-
export declare function selectionSetIRToString(obj: Record<string, string | any>): string;
|
|
92
|
-
export declare function generateSelectionSet(modelIntrospection: ModelIntrospectionSchema, modelName: string, selectionSet?: string[]): string;
|
|
93
|
-
export declare function generateGraphQLDocument(modelIntrospection: ModelIntrospectionSchema, modelName: string, modelOperation: ModelOperation, listArgs?: ListArgs | QueryArgs, indexMeta?: IndexMeta): string;
|
|
94
|
-
export declare function buildGraphQLVariables(modelDefinition: SchemaModel, operation: ModelOperation, arg: QueryArgs | undefined, modelIntrospection: ModelIntrospectionSchema, indexMeta?: IndexMeta): object;
|
|
95
|
-
/**
|
|
96
|
-
* Iterates over mutation input values and resolves any model inputs to their corresponding join fields/values
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* ### Usage
|
|
100
|
-
* ```ts
|
|
101
|
-
* const result = normalizeMutationInput({ post: post }, model, modelDefinition);
|
|
102
|
-
* ```
|
|
103
|
-
* ### Result
|
|
104
|
-
* ```ts
|
|
105
|
-
* { postId: "abc123" }
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
*/
|
|
109
|
-
export declare function normalizeMutationInput(mutationInput: QueryArgs, model: SchemaModel, modelIntrospection: ModelIntrospectionSchema): QueryArgs;
|
|
110
|
-
/**
|
|
111
|
-
* Produces a parameter object that can contains auth mode/token overrides
|
|
112
|
-
* only if present in either `options` (first) or configured on the `client`
|
|
113
|
-
* as a fallback.
|
|
114
|
-
*
|
|
115
|
-
* @param client Configured client from `generateClient`
|
|
116
|
-
* @param options Args/Options object from call site.
|
|
117
|
-
* @returns
|
|
118
|
-
*/
|
|
119
|
-
export declare function authModeParams(client: ClientWithModels, options?: AuthModeParams): AuthModeParams;
|
|
120
|
-
/**
|
|
121
|
-
* Retrieves custom headers from either the client or request options.
|
|
122
|
-
* @param client V6Client | V6ClientSSRRequest | V6ClientSSRCookies - for extracting client headers
|
|
123
|
-
* @param requestHeaders {@link CustomHeaders} - request headers
|
|
124
|
-
* @returns custom headers as {@link CustomHeaders}
|
|
125
|
-
*/
|
|
126
|
-
export declare function getCustomHeaders(client: V6Client | ClientWithModels, requestHeaders?: CustomHeaders): CustomHeaders;
|