@libgot/whatsapp-bridge-sdk 1.0.2 → 1.0.4

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 (76) hide show
  1. package/README.md +2 -2
  2. package/api.ts +1 -0
  3. package/apis/messages-api.ts +117 -0
  4. package/dist/api.d.ts +17 -0
  5. package/dist/api.js +31 -0
  6. package/dist/apis/auth-api.d.ts +121 -0
  7. package/dist/apis/auth-api.js +418 -0
  8. package/dist/apis/contacts-api.d.ts +66 -0
  9. package/dist/apis/contacts-api.js +203 -0
  10. package/dist/apis/default-api.d.ts +90 -0
  11. package/dist/apis/default-api.js +287 -0
  12. package/dist/apis/healthchecks-api.d.ts +90 -0
  13. package/dist/apis/healthchecks-api.js +287 -0
  14. package/dist/apis/messages-api.d.ts +66 -0
  15. package/dist/apis/messages-api.js +203 -0
  16. package/dist/apis/users-api.d.ts +179 -0
  17. package/dist/apis/users-api.js +586 -0
  18. package/dist/base.d.ts +55 -0
  19. package/dist/base.js +80 -0
  20. package/dist/configuration.d.ts +65 -0
  21. package/dist/configuration.js +29 -0
  22. package/dist/index.d.ts +14 -0
  23. package/dist/index.js +28 -0
  24. package/dist/models/api-request-user-update-password-dto.d.ts +25 -0
  25. package/dist/models/api-request-user-update-password-dto.js +15 -0
  26. package/dist/models/api-response-auth-dto.d.ts +25 -0
  27. package/dist/models/api-response-auth-dto.js +15 -0
  28. package/dist/models/api-response-user-dto.d.ts +25 -0
  29. package/dist/models/api-response-user-dto.js +15 -0
  30. package/dist/models/attributes.d.ts +31 -0
  31. package/dist/models/attributes.js +15 -0
  32. package/dist/models/auth-dto.d.ts +31 -0
  33. package/dist/models/auth-dto.js +15 -0
  34. package/dist/models/contacts-response-dto.d.ts +25 -0
  35. package/dist/models/contacts-response-dto.js +15 -0
  36. package/dist/models/conversation-message-dto.d.ts +25 -0
  37. package/dist/models/conversation-message-dto.js +15 -0
  38. package/dist/models/data-dto.d.ts +25 -0
  39. package/dist/models/data-dto.js +15 -0
  40. package/dist/models/data-unauthorized-dto.d.ts +29 -0
  41. package/dist/models/data-unauthorized-dto.js +15 -0
  42. package/dist/models/index.d.ts +21 -0
  43. package/dist/models/index.js +33 -0
  44. package/dist/models/inline-response503-info.d.ts +24 -0
  45. package/dist/models/inline-response503-info.js +15 -0
  46. package/dist/models/inline-response503.d.ts +50 -0
  47. package/dist/models/inline-response503.js +15 -0
  48. package/dist/models/message-dto.d.ts +19 -0
  49. package/dist/models/message-dto.js +15 -0
  50. package/dist/models/message-response-dto.d.ts +25 -0
  51. package/dist/models/message-response-dto.js +15 -0
  52. package/dist/models/role-dto.d.ts +37 -0
  53. package/dist/models/role-dto.js +15 -0
  54. package/dist/models/status-dto.d.ts +31 -0
  55. package/dist/models/status-dto.js +15 -0
  56. package/dist/models/tokens-dto.d.ts +31 -0
  57. package/dist/models/tokens-dto.js +15 -0
  58. package/dist/models/unauthorized-dto.d.ts +25 -0
  59. package/dist/models/unauthorized-dto.js +15 -0
  60. package/dist/models/unauthorized-token-dto.d.ts +29 -0
  61. package/dist/models/unauthorized-token-dto.js +15 -0
  62. package/dist/models/user-detail-dto.d.ts +49 -0
  63. package/dist/models/user-detail-dto.js +15 -0
  64. package/dist/models/user-update-password-dto.d.ts +37 -0
  65. package/dist/models/user-update-password-dto.js +15 -0
  66. package/dist/models/whatsapp-contact-dto.d.ts +43 -0
  67. package/dist/models/whatsapp-contact-dto.js +15 -0
  68. package/dist/models/whatsapp-message-dto.d.ts +43 -0
  69. package/dist/models/whatsapp-message-dto.js +15 -0
  70. package/models/conversation-message-dto.ts +29 -0
  71. package/models/index.ts +3 -1
  72. package/models/message-response-dto.ts +29 -0
  73. package/models/whatsapp-contact-dto.ts +1 -1
  74. package/models/whatsapp-message-dto.ts +50 -0
  75. package/package.json +1 -1
  76. package/publish.sh +1 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @1.0.2
1
+ ## @1.0.4
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @libgot/whatsapp-bridge-sdk@1.0.2 --save
39
+ npm install @libgot/whatsapp-bridge-sdk@1.0.4 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/api.ts CHANGED
@@ -15,5 +15,6 @@ export * from './apis/auth-api';
15
15
  export * from './apis/contacts-api';
16
16
  export * from './apis/default-api';
17
17
  export * from './apis/healthchecks-api';
18
+ export * from './apis/messages-api';
18
19
  export * from './apis/users-api';
19
20
 
@@ -0,0 +1,117 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * whatsapp-bridge Node Api
5
+ * The whatsapp-bridge API description
6
+ *
7
+ * OpenAPI spec version: 0.0.1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by the swagger code generator program.
11
+ * https://github.com/swagger-api/swagger-codegen.git
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
16
+ import { Configuration } from '../configuration';
17
+ // Some imports not used depending on template conditions
18
+ // @ts-ignore
19
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
20
+ import { MessageResponseDto } from '../models';
21
+ /**
22
+ * MessagesApi - axios parameter creator
23
+ * @export
24
+ */
25
+ export const MessagesApiAxiosParamCreator = function (configuration?: Configuration) {
26
+ return {
27
+ /**
28
+ *
29
+ * @param {*} [options] Override http request option.
30
+ * @throws {RequiredError}
31
+ */
32
+ getMessages: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
33
+ const localVarPath = `/api/messages`;
34
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
35
+ const localVarUrlObj = new URL(localVarPath, 'https://example.com');
36
+ let baseOptions;
37
+ if (configuration) {
38
+ baseOptions = configuration.baseOptions;
39
+ }
40
+ const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
41
+ const localVarHeaderParameter = {} as any;
42
+ const localVarQueryParameter = {} as any;
43
+
44
+ const query = new URLSearchParams(localVarUrlObj.search);
45
+ for (const key in localVarQueryParameter) {
46
+ query.set(key, localVarQueryParameter[key]);
47
+ }
48
+ for (const key in options.params) {
49
+ query.set(key, options.params[key]);
50
+ }
51
+ localVarUrlObj.search = (new URLSearchParams(query)).toString();
52
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
53
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
54
+
55
+ return {
56
+ url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
57
+ options: localVarRequestOptions,
58
+ };
59
+ },
60
+ }
61
+ };
62
+
63
+ /**
64
+ * MessagesApi - functional programming interface
65
+ * @export
66
+ */
67
+ export const MessagesApiFp = function(configuration?: Configuration) {
68
+ return {
69
+ /**
70
+ *
71
+ * @param {*} [options] Override http request option.
72
+ * @throws {RequiredError}
73
+ */
74
+ async getMessages(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MessageResponseDto>>> {
75
+ const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).getMessages(options);
76
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
77
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
78
+ return axios.request(axiosRequestArgs);
79
+ };
80
+ },
81
+ }
82
+ };
83
+
84
+ /**
85
+ * MessagesApi - factory interface
86
+ * @export
87
+ */
88
+ export const MessagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
89
+ return {
90
+ /**
91
+ *
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ async getMessages(options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>> {
96
+ return MessagesApiFp(configuration).getMessages(options).then((request) => request(axios, basePath));
97
+ },
98
+ };
99
+ };
100
+
101
+ /**
102
+ * MessagesApi - object-oriented interface
103
+ * @export
104
+ * @class MessagesApi
105
+ * @extends {BaseAPI}
106
+ */
107
+ export class MessagesApi extends BaseAPI {
108
+ /**
109
+ *
110
+ * @param {*} [options] Override http request option.
111
+ * @throws {RequiredError}
112
+ * @memberof MessagesApi
113
+ */
114
+ public async getMessages(options?: AxiosRequestConfig) : Promise<AxiosResponse<MessageResponseDto>> {
115
+ return MessagesApiFp(this.configuration).getMessages(options).then((request) => request(this.axios, this.basePath));
116
+ }
117
+ }
package/dist/api.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ /**
2
+ * whatsapp-bridge Node Api
3
+ * The whatsapp-bridge API description
4
+ *
5
+ * OpenAPI spec version: 0.0.1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by the swagger code generator program.
9
+ * https://github.com/swagger-api/swagger-codegen.git
10
+ * Do not edit the class manually.
11
+ */
12
+ export * from './apis/auth-api';
13
+ export * from './apis/contacts-api';
14
+ export * from './apis/default-api';
15
+ export * from './apis/healthchecks-api';
16
+ export * from './apis/messages-api';
17
+ export * from './apis/users-api';
package/dist/api.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ /* tslint:disable */
14
+ /* eslint-disable */
15
+ /**
16
+ * whatsapp-bridge Node Api
17
+ * The whatsapp-bridge API description
18
+ *
19
+ * OpenAPI spec version: 0.0.1
20
+ *
21
+ *
22
+ * NOTE: This class is auto generated by the swagger code generator program.
23
+ * https://github.com/swagger-api/swagger-codegen.git
24
+ * Do not edit the class manually.
25
+ */
26
+ __exportStar(require("./apis/auth-api"), exports);
27
+ __exportStar(require("./apis/contacts-api"), exports);
28
+ __exportStar(require("./apis/default-api"), exports);
29
+ __exportStar(require("./apis/healthchecks-api"), exports);
30
+ __exportStar(require("./apis/messages-api"), exports);
31
+ __exportStar(require("./apis/users-api"), exports);
@@ -0,0 +1,121 @@
1
+ /**
2
+ * whatsapp-bridge Node Api
3
+ * The whatsapp-bridge API description
4
+ *
5
+ * OpenAPI spec version: 0.0.1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by the swagger code generator program.
9
+ * https://github.com/swagger-api/swagger-codegen.git
10
+ * Do not edit the class manually.
11
+ */
12
+ import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { ApiResponseAuthDto } from '../models';
16
+ import { AuthDto } from '../models';
17
+ /**
18
+ * AuthApi - axios parameter creator
19
+ * @export
20
+ */
21
+ export declare const AuthApiAxiosParamCreator: (configuration?: Configuration) => {
22
+ /**
23
+ *
24
+ * @param {AuthDto} body
25
+ * @param {*} [options] Override http request option.
26
+ * @throws {RequiredError}
27
+ */
28
+ login: (body: AuthDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
29
+ /**
30
+ *
31
+ * @param {*} [options] Override http request option.
32
+ * @throws {RequiredError}
33
+ */
34
+ logout: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
35
+ /**
36
+ *
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ refreshToken: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
41
+ };
42
+ /**
43
+ * AuthApi - functional programming interface
44
+ * @export
45
+ */
46
+ export declare const AuthApiFp: (configuration?: Configuration) => {
47
+ /**
48
+ *
49
+ * @param {AuthDto} body
50
+ * @param {*} [options] Override http request option.
51
+ * @throws {RequiredError}
52
+ */
53
+ login(body: AuthDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ApiResponseAuthDto>>>;
54
+ /**
55
+ *
56
+ * @param {*} [options] Override http request option.
57
+ * @throws {RequiredError}
58
+ */
59
+ logout(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
60
+ /**
61
+ *
62
+ * @param {*} [options] Override http request option.
63
+ * @throws {RequiredError}
64
+ */
65
+ refreshToken(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ApiResponseAuthDto>>>;
66
+ };
67
+ /**
68
+ * AuthApi - factory interface
69
+ * @export
70
+ */
71
+ export declare const AuthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
72
+ /**
73
+ *
74
+ * @param {AuthDto} body
75
+ * @param {*} [options] Override http request option.
76
+ * @throws {RequiredError}
77
+ */
78
+ login(body: AuthDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ApiResponseAuthDto>>;
79
+ /**
80
+ *
81
+ * @param {*} [options] Override http request option.
82
+ * @throws {RequiredError}
83
+ */
84
+ logout(options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
85
+ /**
86
+ *
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ refreshToken(options?: AxiosRequestConfig): Promise<AxiosResponse<ApiResponseAuthDto>>;
91
+ };
92
+ /**
93
+ * AuthApi - object-oriented interface
94
+ * @export
95
+ * @class AuthApi
96
+ * @extends {BaseAPI}
97
+ */
98
+ export declare class AuthApi extends BaseAPI {
99
+ /**
100
+ *
101
+ * @param {AuthDto} body
102
+ * @param {*} [options] Override http request option.
103
+ * @throws {RequiredError}
104
+ * @memberof AuthApi
105
+ */
106
+ login(body: AuthDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ApiResponseAuthDto>>;
107
+ /**
108
+ *
109
+ * @param {*} [options] Override http request option.
110
+ * @throws {RequiredError}
111
+ * @memberof AuthApi
112
+ */
113
+ logout(options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
114
+ /**
115
+ *
116
+ * @param {*} [options] Override http request option.
117
+ * @throws {RequiredError}
118
+ * @memberof AuthApi
119
+ */
120
+ refreshToken(options?: AxiosRequestConfig): Promise<AxiosResponse<ApiResponseAuthDto>>;
121
+ }