@bwi-mentorspaces/application-utils-npm 0.0.6 → 0.0.7

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 (114) hide show
  1. package/chat/index.d.ts +36 -36
  2. package/chat/index.js +58 -58
  3. package/chat/stream/enum/index.d.ts +33 -27
  4. package/chat/stream/enum/index.js +41 -34
  5. package/chat/stream/enum/index.js.map +1 -1
  6. package/chat/stream/index.d.ts +9 -9
  7. package/chat/stream/index.js +17 -17
  8. package/chat/stream/models/_/channel.data.d.ts +19 -19
  9. package/chat/stream/models/_/channel.data.js +2 -2
  10. package/chat/stream/models/_/channel.member.d.ts +14 -14
  11. package/chat/stream/models/_/channel.member.js +11 -11
  12. package/chat/stream/models/_/channel.response.d.ts +8 -8
  13. package/chat/stream/models/_/channel.response.js +2 -2
  14. package/chat/stream/models/_/event.data.d.ts +16 -0
  15. package/chat/stream/models/_/event.data.js +4 -0
  16. package/chat/stream/models/_/event.data.js.map +1 -0
  17. package/chat/stream/models/_/message.response.d.ts +8 -8
  18. package/chat/stream/models/_/message.response.js +2 -2
  19. package/chat/stream/models/_/stream.config.d.ts +22 -22
  20. package/chat/stream/models/_/stream.config.js +2 -2
  21. package/chat/stream/models/_/user.response.d.ts +8 -8
  22. package/chat/stream/models/_/user.response.js +2 -2
  23. package/chat/stream/models/index.d.ts +9 -7
  24. package/chat/stream/models/index.js +5 -5
  25. package/chat/stream/models/index.js.map +1 -1
  26. package/chat/stream/stream.api.d.ts +63 -63
  27. package/chat/stream/stream.api.js +76 -76
  28. package/chat/stream/stream.auth.d.ts +70 -70
  29. package/chat/stream/stream.auth.js +80 -80
  30. package/chat/stream/stream.base.d.ts +56 -56
  31. package/chat/stream/stream.base.js +93 -93
  32. package/chat/stream/stream.channel.d.ts +132 -118
  33. package/chat/stream/stream.channel.js +306 -285
  34. package/chat/stream/stream.channel.js.map +1 -1
  35. package/chat/stream/stream.error.d.ts +19 -19
  36. package/chat/stream/stream.error.js +17 -17
  37. package/chat/stream/stream.member.d.ts +75 -75
  38. package/chat/stream/stream.member.js +175 -175
  39. package/chat/stream/stream.message.d.ts +59 -59
  40. package/chat/stream/stream.message.js +112 -112
  41. package/chat/stream/stream.user.d.ts +49 -49
  42. package/chat/stream/stream.user.js +90 -90
  43. package/core/_/api-error.d.ts +24 -24
  44. package/core/_/api-error.js +21 -21
  45. package/core/_/api-response.d.ts +25 -25
  46. package/core/_/api-response.js +21 -21
  47. package/core/_/cors-headers.d.ts +16 -16
  48. package/core/_/cors-headers.js +32 -32
  49. package/core/_/model.d.ts +39 -31
  50. package/core/_/model.js +2 -2
  51. package/core/_/service-request.d.ts +66 -66
  52. package/core/_/service-request.js +104 -104
  53. package/core/_/service-request.js.map +1 -1
  54. package/core/index.d.ts +10 -10
  55. package/core/index.js +11 -11
  56. package/deployment/_/serverless.d.ts +26 -26
  57. package/deployment/_/serverless.js +43 -43
  58. package/deployment/index.d.ts +2 -2
  59. package/deployment/index.js +5 -5
  60. package/endpoint-test-factory/_/test-factory.d.ts +45 -45
  61. package/endpoint-test-factory/_/test-factory.js +91 -91
  62. package/endpoint-test-factory/index.d.ts +2 -2
  63. package/endpoint-test-factory/index.js +5 -5
  64. package/enums/index.d.ts +92 -92
  65. package/enums/index.js +2 -2
  66. package/meet/index.d.ts +36 -36
  67. package/meet/index.js +58 -58
  68. package/meet/twilio/enum/index.d.ts +6 -6
  69. package/meet/twilio/enum/index.js +10 -10
  70. package/meet/twilio/index.d.ts +5 -5
  71. package/meet/twilio/index.js +11 -11
  72. package/meet/twilio/models/_/room.data.d.ts +6 -6
  73. package/meet/twilio/models/_/room.data.js +2 -2
  74. package/meet/twilio/models/_/twilio.config.d.ts +29 -29
  75. package/meet/twilio/models/_/twilio.config.js +2 -2
  76. package/meet/twilio/models/index.d.ts +3 -3
  77. package/meet/twilio/models/index.js +2 -2
  78. package/meet/twilio/twilio.api.d.ts +28 -28
  79. package/meet/twilio/twilio.api.js +45 -45
  80. package/meet/twilio/twilio.auth.d.ts +55 -55
  81. package/meet/twilio/twilio.auth.js +83 -83
  82. package/meet/twilio/twilio.base.d.ts +41 -41
  83. package/meet/twilio/twilio.base.js +53 -53
  84. package/meet/twilio/twilio.room.d.ts +46 -46
  85. package/meet/twilio/twilio.room.js +124 -124
  86. package/package.json +57 -57
  87. package/swagger/_/swagger.config.d.ts +21 -21
  88. package/swagger/_/swagger.config.js +2 -2
  89. package/swagger/_/swagger.d.ts +37 -37
  90. package/swagger/_/swagger.js +78 -78
  91. package/swagger/index.d.ts +3 -3
  92. package/swagger/index.js +5 -5
  93. package/types/index.d.ts +19 -19
  94. package/types/index.js +2 -2
  95. package/utils/_/encoder.d.ts +19 -19
  96. package/utils/_/encoder.js +27 -27
  97. package/utils/_/encryptor.d.ts +26 -26
  98. package/utils/_/encryptor.js +67 -67
  99. package/utils/_/hasher.d.ts +25 -25
  100. package/utils/_/hasher.js +63 -63
  101. package/utils/_/object-mapper.d.ts +12 -12
  102. package/utils/_/object-mapper.js +22 -22
  103. package/utils/_/string-formatter.d.ts +34 -34
  104. package/utils/_/string-formatter.js +49 -49
  105. package/utils/_/utc-date.d.ts +35 -35
  106. package/utils/_/utc-date.js +84 -84
  107. package/utils/index.d.ts +7 -7
  108. package/utils/index.js +15 -15
  109. package/validators/_/checker.d.ts +62 -62
  110. package/validators/_/checker.js +98 -98
  111. package/validators/_/regex.d.ts +98 -98
  112. package/validators/_/regex.js +142 -142
  113. package/validators/index.d.ts +3 -3
  114. package/validators/index.js +7 -7
@@ -1,105 +1,105 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ServiceRequest = void 0;
16
- const axios_1 = __importDefault(require("axios"));
17
- /**
18
- * Implementation of service request model declarations
19
- */
20
- class ServiceRequest {
21
- constructor() {
22
- // properties
23
- this._url = "";
24
- this._method = "";
25
- this._headers = undefined;
26
- this._body = undefined;
27
- }
28
- /**
29
- * Setter for url property
30
- */
31
- set url(value) {
32
- this._url = value;
33
- }
34
- /**
35
- * Setter for method property
36
- */
37
- set method(value) {
38
- this._method = value;
39
- }
40
- /**
41
- * Setter for headers property
42
- */
43
- set headers(value) {
44
- this._headers = value;
45
- }
46
- /**
47
- * Setter for body property
48
- */
49
- set body(value) {
50
- this._body = value;
51
- }
52
- /**
53
- * Send method
54
- * Call after setting up url, method, headers and body if applicable
55
- *
56
- * @returns {Promise<TResponse>} promise of API Response object of type TResponse
57
- */
58
- send() {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
61
- // set config / options
62
- const options = {
63
- url: this._url,
64
- method: this._method
65
- };
66
- // set headers
67
- options.headers = this.setHeaders();
68
- // set body (if exists)
69
- if (this._body) {
70
- options.headers["Content-Type" /* ContentType */] = this._body.contentType;
71
- options.data = this._body.value;
72
- }
73
- // exec
74
- yield (0, axios_1.default)(options)
75
- .then((xr) => {
76
- resolve(xr.data);
77
- })
78
- .catch((xe) => {
79
- reject(xe.response.data);
80
- });
81
- }));
82
- });
83
- }
84
- /**
85
- * Setup request headers map
86
- *
87
- * @returns {Record<string, string>} map of request headers
88
- */
89
- setHeaders() {
90
- const map = {};
91
- if (this._headers) {
92
- this._headers.forEach((header) => {
93
- map[header.name] = header.value;
94
- });
95
- }
96
- // set default headers
97
- map["Content-Type" /* ContentType */] = "application/json" /* ApplicationJson */;
98
- map["Accept" /* Accept */] = "*";
99
- map["Accept-Charset" /* AcceptCharset */] = "*";
100
- map["Accept-Encoding" /* AcceptEncoding */] = "*";
101
- return map;
102
- }
103
- }
104
- exports.ServiceRequest = ServiceRequest;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ServiceRequest = void 0;
16
+ const axios_1 = __importDefault(require("axios"));
17
+ /**
18
+ * Implementation of service request model declarations
19
+ */
20
+ class ServiceRequest {
21
+ constructor() {
22
+ // properties
23
+ this._url = "";
24
+ this._method = "";
25
+ this._headers = undefined;
26
+ this._body = undefined;
27
+ }
28
+ /**
29
+ * Setter for url property
30
+ */
31
+ set url(value) {
32
+ this._url = value;
33
+ }
34
+ /**
35
+ * Setter for method property
36
+ */
37
+ set method(value) {
38
+ this._method = value;
39
+ }
40
+ /**
41
+ * Setter for headers property
42
+ */
43
+ set headers(value) {
44
+ this._headers = value;
45
+ }
46
+ /**
47
+ * Setter for body property
48
+ */
49
+ set body(value) {
50
+ this._body = value;
51
+ }
52
+ /**
53
+ * Send method
54
+ * Call after setting up url, method, headers and body if applicable
55
+ *
56
+ * @returns {Promise<TResponse>} promise of API Response object of type TResponse
57
+ */
58
+ send() {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
61
+ // set config / options
62
+ const options = {
63
+ url: this._url,
64
+ method: this._method
65
+ };
66
+ // set headers
67
+ options.headers = this.setHeaders();
68
+ // set body (if exists)
69
+ if (this._body) {
70
+ options.headers["Content-Type" /* ContentType */] = this._body.contentType;
71
+ options.data = this._body.value;
72
+ }
73
+ // exec
74
+ yield (0, axios_1.default)(options)
75
+ .then((xr) => {
76
+ resolve(xr.data);
77
+ })
78
+ .catch((xe) => {
79
+ reject(xe.response.data);
80
+ });
81
+ }));
82
+ });
83
+ }
84
+ /**
85
+ * Setup request headers map
86
+ *
87
+ * @returns {Record<string, string>} map of request headers
88
+ */
89
+ setHeaders() {
90
+ const map = {};
91
+ if (this._headers) {
92
+ this._headers.forEach((header) => {
93
+ map[header.name] = header.value;
94
+ });
95
+ }
96
+ // set default headers
97
+ map["Content-Type" /* ContentType */] = "application/json" /* ApplicationJson */;
98
+ map["Accept" /* Accept */] = "*";
99
+ map["Accept-Charset" /* AcceptCharset */] = "*";
100
+ map["Accept-Encoding" /* AcceptEncoding */] = "*";
101
+ return map;
102
+ }
103
+ }
104
+ exports.ServiceRequest = ServiceRequest;
105
105
  //# sourceMappingURL=service-request.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"service-request.js","sourceRoot":"","sources":["../../../core/_/service-request.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAAqF;AAwCrF;;GAEG;AACH,MAAa,cAAc;IAA3B;QACI,aAAa;QACL,SAAI,GAAW,EAAE,CAAC;QAClB,YAAO,GAAW,EAAE,CAAC;QACrB,aAAQ,GAAwC,SAAS,CAAC;QAC1D,UAAK,GAA8C,SAAS,CAAC;IAqFzE,CAAC;IAnFG;;OAEG;IACH,IAAI,GAAG,CAAC,KAAa;QACjB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAI,MAAM,CAAC,KAAa;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI,OAAO,CAAC,KAA8B;QACtC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,IAAI,IAAI,CAAC,KAAoC;QACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACG,IAAI;;YACN,OAAO,IAAI,OAAO,CAAC,CAAO,OAA4B,EAAE,MAA2B,EAAE,EAAE;gBACnF,uBAAuB;gBACvB,MAAM,OAAO,GAAuB;oBAChC,GAAG,EAAE,IAAI,CAAC,IAAI;oBACd,MAAM,EAAE,IAAI,CAAC,OAAiB;iBACjC,CAAC;gBAEF,cAAc;gBACd,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;gBAEpC,uBAAuB;gBACvB,IAAI,IAAI,CAAC,KAAK,EAAE;oBACZ,OAAO,CAAC,OAAO,kCAAoB,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;oBAC7D,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;iBACnC;gBAED,OAAO;gBACP,MAAM,IAAA,eAAK,EAAC,OAAO,CAAC;qBACf,IAAI,CAAC,CAAC,EAAiB,EAAE,EAAE;oBACxB,OAAO,CAAC,EAAE,CAAC,IAAiB,CAAC,CAAC;gBAClC,CAAC,CAAC;qBACD,KAAK,CAAC,CAAC,EAAc,EAAE,EAAE;oBACtB,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAiB,CAAC,CAAC;gBAC1C,CAAC,CAAC,CAAC;YACX,CAAC,CAAA,CAAC,CAAC;QACP,CAAC;KAAA;IAED;;;;OAIG;IACK,UAAU;QACd,MAAM,GAAG,GAA2B,EAAE,CAAC;QACvC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,MAA6B,EAAE,EAAE;gBACpD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;YACpC,CAAC,CAAC,CAAC;SACN;QAED,sBAAsB;QACtB,GAAG,kCAAoB,2CAA2B,CAAC;QACnD,GAAG,uBAAe,GAAG,GAAG,CAAC;QACzB,GAAG,sCAAsB,GAAG,GAAG,CAAC;QAChC,GAAG,wCAAuB,GAAG,GAAG,CAAC;QAEjC,OAAO,GAAG,CAAC;IACf,CAAC;CACJ;AA1FD,wCA0FC"}
1
+ {"version":3,"file":"service-request.js","sourceRoot":"","sources":["../../../core/_/service-request.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAAqF;AAwCrF;;GAEG;AACH,MAAa,cAAc;IAA3B;QACI,aAAa;QACL,SAAI,GAAW,EAAE,CAAC;QAClB,YAAO,GAAW,EAAE,CAAC;QACrB,aAAQ,GAAwC,SAAS,CAAC;QAC1D,UAAK,GAA8C,SAAS,CAAC;IAoFzE,CAAC;IAlFG;;OAEG;IACH,IAAI,GAAG,CAAC,KAAa;QACjB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAI,MAAM,CAAC,KAAa;QACpB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI,OAAO,CAAC,KAA8B;QACtC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,IAAI,IAAI,CAAC,KAAoC;QACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACG,IAAI;;YACN,OAAO,IAAI,OAAO,CAAC,CAAO,OAA4B,EAAE,MAA2B,EAAE,EAAE;gBACnF,uBAAuB;gBACvB,MAAM,OAAO,GAAuB;oBAChC,GAAG,EAAE,IAAI,CAAC,IAAI;oBACd,MAAM,EAAE,IAAI,CAAC,OAAiB;iBACjC,CAAC;gBAEF,cAAc;gBACd,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;gBAEpC,uBAAuB;gBACvB,IAAI,IAAI,CAAC,KAAK,EAAE;oBACZ,OAAO,CAAC,OAAO,kCAAoB,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;oBAC7D,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;iBACnC;gBAED,OAAO;gBACP,MAAM,IAAA,eAAK,EAAC,OAAO,CAAC;qBACf,IAAI,CAAC,CAAC,EAAiB,EAAE,EAAE;oBACxB,OAAO,CAAC,EAAE,CAAC,IAAiB,CAAC,CAAC;gBAClC,CAAC,CAAC;qBACD,KAAK,CAAC,CAAC,EAAc,EAAE,EAAE;oBACtB,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAiB,CAAC,CAAC;gBAC1C,CAAC,CAAC,CAAC;YACX,CAAC,CAAA,CAAC,CAAC;QACP,CAAC;KAAA;IAED;;;;OAIG;IACK,UAAU;QACd,MAAM,GAAG,GAA2B,EAAE,CAAC;QACvC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,MAA6B,EAAE,EAAE;gBACpD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;YACpC,CAAC,CAAC,CAAC;SACN;QAED,sBAAsB;QACtB,GAAG,kCAAoB,2CAA2B,CAAC;QACnD,GAAG,uBAAe,GAAG,GAAG,CAAC;QACzB,GAAG,sCAAsB,GAAG,GAAG,CAAC;QAChC,GAAG,wCAAuB,GAAG,GAAG,CAAC;QACjC,OAAO,GAAG,CAAC;IACf,CAAC;CACJ;AAzFD,wCAyFC"}
package/core/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { IApiResponse, ApiResponse } from "./_/api-response";
2
- import { IApiError, ApiError } from "./_/api-error";
3
- import { IStatus, IDataFilter, IPaginationResponse, IPaginationRequest } from "./_/model";
4
- import { IServiceRequestHeader, IServiceRequestBody, ServiceRequest } from "./_/service-request";
5
- import { CorsHeaders } from "./_/cors-headers";
6
- export { IApiResponse, ApiResponse };
7
- export { IApiError, ApiError };
8
- export { IStatus, IDataFilter, IPaginationRequest, IPaginationResponse };
9
- export { IServiceRequestHeader, IServiceRequestBody, ServiceRequest };
10
- export { CorsHeaders };
1
+ import { IApiResponse, ApiResponse } from "./_/api-response";
2
+ import { IApiError, ApiError } from "./_/api-error";
3
+ import { IStatus, IDataFilter, IPaginationResponse, IPaginationRequest } from "./_/model";
4
+ import { IServiceRequestHeader, IServiceRequestBody, ServiceRequest } from "./_/service-request";
5
+ import { CorsHeaders } from "./_/cors-headers";
6
+ export { IApiResponse, ApiResponse };
7
+ export { IApiError, ApiError };
8
+ export { IStatus, IDataFilter, IPaginationRequest, IPaginationResponse };
9
+ export { IServiceRequestHeader, IServiceRequestBody, ServiceRequest };
10
+ export { CorsHeaders };
package/core/index.js CHANGED
@@ -1,12 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CorsHeaders = exports.ServiceRequest = exports.ApiError = exports.ApiResponse = void 0;
4
- const api_response_1 = require("./_/api-response");
5
- Object.defineProperty(exports, "ApiResponse", { enumerable: true, get: function () { return api_response_1.ApiResponse; } });
6
- const api_error_1 = require("./_/api-error");
7
- Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return api_error_1.ApiError; } });
8
- const service_request_1 = require("./_/service-request");
9
- Object.defineProperty(exports, "ServiceRequest", { enumerable: true, get: function () { return service_request_1.ServiceRequest; } });
10
- const cors_headers_1 = require("./_/cors-headers");
11
- Object.defineProperty(exports, "CorsHeaders", { enumerable: true, get: function () { return cors_headers_1.CorsHeaders; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CorsHeaders = exports.ServiceRequest = exports.ApiError = exports.ApiResponse = void 0;
4
+ const api_response_1 = require("./_/api-response");
5
+ Object.defineProperty(exports, "ApiResponse", { enumerable: true, get: function () { return api_response_1.ApiResponse; } });
6
+ const api_error_1 = require("./_/api-error");
7
+ Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return api_error_1.ApiError; } });
8
+ const service_request_1 = require("./_/service-request");
9
+ Object.defineProperty(exports, "ServiceRequest", { enumerable: true, get: function () { return service_request_1.ServiceRequest; } });
10
+ const cors_headers_1 = require("./_/cors-headers");
11
+ Object.defineProperty(exports, "CorsHeaders", { enumerable: true, get: function () { return cors_headers_1.CorsHeaders; } });
12
12
  //# sourceMappingURL=index.js.map
@@ -1,26 +1,26 @@
1
- /// <reference types="express-serve-static-core" />
2
- /**
3
- * Serverless handler declarations
4
- */
5
- interface IServerless {
6
- handler: Function;
7
- }
8
- /**
9
- * Serverless Handler implementation
10
- */
11
- export declare class Serverless implements IServerless {
12
- private _app;
13
- /**
14
- * Serverless handler constructor
15
- *
16
- * @param {Express.Application} app express instance
17
- */
18
- constructor(app: Express.Application);
19
- /**
20
- * handler getter
21
- *
22
- * @returns {Handler} serverless handler
23
- */
24
- get handler(): Function;
25
- }
26
- export {};
1
+ /// <reference types="express-serve-static-core" />
2
+ /**
3
+ * Serverless handler declarations
4
+ */
5
+ interface IServerless {
6
+ handler: Function;
7
+ }
8
+ /**
9
+ * Serverless Handler implementation
10
+ */
11
+ export declare class Serverless implements IServerless {
12
+ private _app;
13
+ /**
14
+ * Serverless handler constructor
15
+ *
16
+ * @param {Express.Application} app express instance
17
+ */
18
+ constructor(app: Express.Application);
19
+ /**
20
+ * handler getter
21
+ *
22
+ * @returns {Handler} serverless handler
23
+ */
24
+ get handler(): Function;
25
+ }
26
+ export {};
@@ -1,44 +1,44 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.Serverless = void 0;
16
- const serverless_http_1 = __importDefault(require("serverless-http"));
17
- /**
18
- * Serverless Handler implementation
19
- */
20
- class Serverless {
21
- /**
22
- * Serverless handler constructor
23
- *
24
- * @param {Express.Application} app express instance
25
- */
26
- constructor(app) {
27
- this._app = app;
28
- }
29
- // getter / setter
30
- /**
31
- * handler getter
32
- *
33
- * @returns {Handler} serverless handler
34
- */
35
- get handler() {
36
- const handler = (0, serverless_http_1.default)(this._app);
37
- return (event, context) => __awaiter(this, void 0, void 0, function* () {
38
- const result = yield handler(event, context);
39
- return result;
40
- });
41
- }
42
- }
43
- exports.Serverless = Serverless;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Serverless = void 0;
16
+ const serverless_http_1 = __importDefault(require("serverless-http"));
17
+ /**
18
+ * Serverless Handler implementation
19
+ */
20
+ class Serverless {
21
+ /**
22
+ * Serverless handler constructor
23
+ *
24
+ * @param {Express.Application} app express instance
25
+ */
26
+ constructor(app) {
27
+ this._app = app;
28
+ }
29
+ // getter / setter
30
+ /**
31
+ * handler getter
32
+ *
33
+ * @returns {Handler} serverless handler
34
+ */
35
+ get handler() {
36
+ const handler = (0, serverless_http_1.default)(this._app);
37
+ return (event, context) => __awaiter(this, void 0, void 0, function* () {
38
+ const result = yield handler(event, context);
39
+ return result;
40
+ });
41
+ }
42
+ }
43
+ exports.Serverless = Serverless;
44
44
  //# sourceMappingURL=serverless.js.map
@@ -1,2 +1,2 @@
1
- import { Serverless } from "./_/serverless";
2
- export { Serverless };
1
+ import { Serverless } from "./_/serverless";
2
+ export { Serverless };
@@ -1,6 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Serverless = void 0;
4
- const serverless_1 = require("./_/serverless");
5
- Object.defineProperty(exports, "Serverless", { enumerable: true, get: function () { return serverless_1.Serverless; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Serverless = void 0;
4
+ const serverless_1 = require("./_/serverless");
5
+ Object.defineProperty(exports, "Serverless", { enumerable: true, get: function () { return serverless_1.Serverless; } });
6
6
  //# sourceMappingURL=index.js.map
@@ -1,45 +1,45 @@
1
- /**
2
- * MUST READ Setup.md
3
- *
4
- * Access @ node_modules/application-utils-npm/endpoint-test-factory/_/Setup.md
5
- */
6
- import Express from "express";
7
- import { Response } from "supertest";
8
- import { Any } from "../../types";
9
- import { Method } from "../../enums";
10
- /**
11
- * Test factory class
12
- */
13
- export declare class TestFactory {
14
- private _xprs;
15
- private _debug;
16
- /**
17
- * Test Factor Constructor
18
- *
19
- * @param {Express.Application} app service express instance
20
- * @param {boolean?} debug flag for debugging
21
- */
22
- constructor(app: Express.Application, debug?: boolean);
23
- /**
24
- * getter for app
25
- *
26
- * @returns {Request.SuperTest<Request.Test>} supertest request
27
- */
28
- private get app();
29
- /**
30
- * Log message (this.log) if debug = true
31
- *
32
- * @param {any[]} msg message to log as arguments
33
- */
34
- log(...msg: Any[]): void;
35
- /**
36
- * Run test
37
- *
38
- * @param {Method} method enum value for GET, POST, PUT, DELETE
39
- * @param {string} path api call path
40
- * @param {object?} data post data
41
- * @param {Map?} headers map of headers to add to request
42
- * @returns {void}
43
- */
44
- test(method: Method, path: string, data?: object, headers?: Map<string, string>): Promise<Response>;
45
- }
1
+ /**
2
+ * MUST READ Setup.md
3
+ *
4
+ * Access @ node_modules/application-utils-npm/endpoint-test-factory/_/Setup.md
5
+ */
6
+ import Express from "express";
7
+ import { Response } from "supertest";
8
+ import { Any } from "../../types";
9
+ import { Method } from "../../enums";
10
+ /**
11
+ * Test factory class
12
+ */
13
+ export declare class TestFactory {
14
+ private _xprs;
15
+ private _debug;
16
+ /**
17
+ * Test Factor Constructor
18
+ *
19
+ * @param {Express.Application} app service express instance
20
+ * @param {boolean?} debug flag for debugging
21
+ */
22
+ constructor(app: Express.Application, debug?: boolean);
23
+ /**
24
+ * getter for app
25
+ *
26
+ * @returns {Request.SuperTest<Request.Test>} supertest request
27
+ */
28
+ private get app();
29
+ /**
30
+ * Log message (this.log) if debug = true
31
+ *
32
+ * @param {any[]} msg message to log as arguments
33
+ */
34
+ log(...msg: Any[]): void;
35
+ /**
36
+ * Run test
37
+ *
38
+ * @param {Method} method enum value for GET, POST, PUT, DELETE
39
+ * @param {string} path api call path
40
+ * @param {object?} data post data
41
+ * @param {Map?} headers map of headers to add to request
42
+ * @returns {void}
43
+ */
44
+ test(method: Method, path: string, data?: object, headers?: Map<string, string>): Promise<Response>;
45
+ }