@aws-amplify/api 4.0.58-unstable.3 → 4.0.58

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.0.58](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api@4.0.57...@aws-amplify/api@4.0.58) (2022-10-25)
7
+
8
+ **Note:** Version bump only for package @aws-amplify/api
9
+
10
+
11
+
12
+
13
+
6
14
  ## [4.0.57](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api@4.0.56...@aws-amplify/api@4.0.57) (2022-10-14)
7
15
 
8
16
  **Note:** Version bump only for package @aws-amplify/api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/api",
3
- "version": "4.0.58-unstable.3+a6679eddc",
3
+ "version": "4.0.58",
4
4
  "description": "Api category of aws-amplify",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",
@@ -51,8 +51,8 @@
51
51
  "@types/zen-observable": "^0.8.0"
52
52
  },
53
53
  "dependencies": {
54
- "@aws-amplify/api-graphql": "2.3.22-unstable.3+a6679eddc",
55
- "@aws-amplify/api-rest": "2.0.58-unstable.3+a6679eddc"
54
+ "@aws-amplify/api-graphql": "2.3.22",
55
+ "@aws-amplify/api-rest": "2.0.58"
56
56
  },
57
57
  "jest": {
58
58
  "globals": {
@@ -98,5 +98,5 @@
98
98
  "lib-esm"
99
99
  ]
100
100
  },
101
- "gitHead": "a6679eddc6a33e57d541661988f26845e49dd896"
101
+ "gitHead": "be5bf2dc68c9c011c3876f003c14bc98b392c82d"
102
102
  }
package/lib/API.d.ts DELETED
@@ -1,131 +0,0 @@
1
- import { AWSAppSyncRealTimeProvider } from '@aws-amplify/pubsub';
2
- import { GraphQLOptions, GraphQLResult, GraphQLOperation, OperationTypeNode } from '@aws-amplify/api-graphql';
3
- import Observable from 'zen-observable-ts';
4
- import { GraphQLQuery, GraphQLSubscription } from './types';
5
- /**
6
- * @deprecated
7
- * Use RestApi or GraphQLAPI to reduce your application bundle size
8
- * Export Cloud Logic APIs
9
- */
10
- export declare class APIClass {
11
- /**
12
- * Initialize API with AWS configuration
13
- * @param {Object} options - Configuration object for API
14
- */
15
- private _options;
16
- private _restApi;
17
- private _graphqlApi;
18
- Auth: import("@aws-amplify/auth/lib-esm/Auth").AuthClass;
19
- Cache: import("@aws-amplify/cache/lib-esm/types").ICache;
20
- Credentials: import("@aws-amplify/core").CredentialsClass;
21
- /**
22
- * Initialize API with AWS configuration
23
- * @param {Object} options - Configuration object for API
24
- */
25
- constructor(options: any);
26
- getModuleName(): string;
27
- /**
28
- * Configure API part with aws configurations
29
- * @param {Object} config - Configuration of the API
30
- * @return {Object} - The current configuration
31
- */
32
- configure(options: any): any;
33
- /**
34
- * Make a GET request
35
- * @param apiName - The api name of the request
36
- * @param path - The path of the request
37
- * @param [init] - Request extra params
38
- * @return A promise that resolves to an object with response status and JSON data, if successful.
39
- */
40
- get(apiName: string, path: string, init: {
41
- [key: string]: any;
42
- }): Promise<any>;
43
- /**
44
- * Make a POST request
45
- * @param apiName - The api name of the request
46
- * @param path - The path of the request
47
- * @param [init] - Request extra params
48
- * @return A promise that resolves to an object with response status and JSON data, if successful.
49
- */
50
- post(apiName: string, path: string, init: {
51
- [key: string]: any;
52
- }): Promise<any>;
53
- /**
54
- * Make a PUT request
55
- * @param apiName - The api name of the request
56
- * @param path - The path of the request
57
- * @param [init] - Request extra params
58
- * @return A promise that resolves to an object with response status and JSON data, if successful.
59
- */
60
- put(apiName: string, path: string, init: {
61
- [key: string]: any;
62
- }): Promise<any>;
63
- /**
64
- * Make a PATCH request
65
- * @param apiName - The api name of the request
66
- * @param path - The path of the request
67
- * @param [init] - Request extra params
68
- * @return A promise that resolves to an object with response status and JSON data, if successful.
69
- */
70
- patch(apiName: string, path: string, init: {
71
- [key: string]: any;
72
- }): Promise<any>;
73
- /**
74
- * Make a DEL request
75
- * @param apiName - The api name of the request
76
- * @param path - The path of the request
77
- * @param [init] - Request extra params
78
- * @return A promise that resolves to an object with response status and JSON data, if successful.
79
- */
80
- del(apiName: string, path: string, init: {
81
- [key: string]: any;
82
- }): Promise<any>;
83
- /**
84
- * Make a HEAD request
85
- * @param apiName - The api name of the request
86
- * @param path - The path of the request
87
- * @param [init] - Request extra params
88
- * @return A promise that resolves to an object with response status and JSON data, if successful.
89
- */
90
- head(apiName: string, path: string, init: {
91
- [key: string]: any;
92
- }): Promise<any>;
93
- /**
94
- * Checks to see if an error thrown is from an api request cancellation
95
- * @param error - Any error
96
- * @return If the error was from an api request cancellation
97
- */
98
- isCancel(error: any): boolean;
99
- /**
100
- * Cancels an inflight request for either a GraphQL request or a Rest API request.
101
- * @param request - request to cancel
102
- * @param [message] - custom error message
103
- * @return If the request was cancelled
104
- */
105
- cancel(request: Promise<any>, message?: string): boolean;
106
- /**
107
- * Getting endpoint for API
108
- * @param apiName - The name of the api
109
- * @return The endpoint of the api
110
- */
111
- endpoint(apiName: string): Promise<string>;
112
- /**
113
- * to get the operation type
114
- * @param operation
115
- */
116
- getGraphqlOperationType(operation: GraphQLOperation): OperationTypeNode;
117
- /**
118
- * Executes a GraphQL operation
119
- *
120
- * @param options - GraphQL Options
121
- * @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config
122
- * @returns An Observable if queryType is 'subscription', else a promise of the graphql result from the query.
123
- */
124
- graphql<T>(options: GraphQLOptions, additionalHeaders?: {
125
- [key: string]: string;
126
- }): T extends GraphQLQuery<T> ? Promise<GraphQLResult<T>> : T extends GraphQLSubscription<T> ? Observable<{
127
- provider: AWSAppSyncRealTimeProvider;
128
- value: GraphQLResult<T>;
129
- }> : Promise<GraphQLResult<any>> | Observable<object>;
130
- }
131
- export declare const API: APIClass;
package/lib/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { API } from './API';
2
- export { GraphQLQuery, GraphQLSubscription } from './types';
3
- export { API, APIClass } from './API';
4
- export { graphqlOperation, GraphQLAuthError, GRAPHQL_AUTH_MODE, } from '@aws-amplify/api-graphql';
5
- export type { GraphQLResult } from '@aws-amplify/api-graphql';
6
- export default API;
@@ -1,13 +0,0 @@
1
- /**
2
- * This exports from the types directory is a temporary workaround, since Amplify CLI currently
3
- * generates code that relies on this import path https://github.com/aws-amplify/amplify-cli/issues/3863
4
- * This will be removed in future release when CLI and customers moves to recommeneded import styles.
5
- */
6
- export { graphqlOperation, GraphQLAuthError, GraphQLResult, GRAPHQL_AUTH_MODE, } from '@aws-amplify/api-graphql';
7
- declare const queryType: unique symbol;
8
- export declare type GraphQLQuery<T> = T & {
9
- readonly [queryType]: 'query';
10
- };
11
- export declare type GraphQLSubscription<T> = T & {
12
- readonly [queryType]: 'subscription';
13
- };