@wenex/sdk 1.0.4 → 1.0.6

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 (79) hide show
  1. package/common/enums/touch/emails/index.d.ts +1 -0
  2. package/common/enums/touch/emails/index.js +18 -0
  3. package/common/enums/touch/emails/index.js.map +1 -0
  4. package/common/enums/touch/emails/provider.enum.d.ts +3 -0
  5. package/common/enums/touch/emails/provider.enum.js +8 -0
  6. package/common/enums/touch/emails/provider.enum.js.map +1 -0
  7. package/common/enums/touch/index.d.ts +2 -0
  8. package/common/enums/touch/index.js +19 -0
  9. package/common/enums/touch/index.js.map +1 -0
  10. package/common/enums/touch/smss/index.d.ts +1 -0
  11. package/common/enums/touch/smss/index.js +18 -0
  12. package/common/enums/touch/smss/index.js.map +1 -0
  13. package/common/enums/touch/smss/provider.enum.d.ts +4 -0
  14. package/common/enums/touch/smss/provider.enum.js +9 -0
  15. package/common/enums/touch/smss/provider.enum.js.map +1 -0
  16. package/common/interfaces/special/files/file.interface.d.ts +18 -0
  17. package/common/interfaces/special/files/file.interface.js +3 -0
  18. package/common/interfaces/special/files/file.interface.js.map +1 -0
  19. package/common/interfaces/special/files/index.d.ts +1 -0
  20. package/common/interfaces/special/files/index.js +18 -0
  21. package/common/interfaces/special/files/index.js.map +1 -0
  22. package/common/interfaces/special/index.d.ts +1 -0
  23. package/common/interfaces/special/index.js +1 -0
  24. package/common/interfaces/special/index.js.map +1 -1
  25. package/common/interfaces/touch/emails/email.interface.d.ts +22 -0
  26. package/common/interfaces/touch/emails/email.interface.js +3 -0
  27. package/common/interfaces/touch/emails/email.interface.js.map +1 -0
  28. package/common/interfaces/touch/emails/index.d.ts +2 -0
  29. package/common/interfaces/touch/emails/index.js +19 -0
  30. package/common/interfaces/touch/emails/index.js.map +1 -0
  31. package/common/interfaces/touch/emails/smtp.interface.d.ts +7 -0
  32. package/common/interfaces/touch/emails/smtp.interface.js +3 -0
  33. package/common/interfaces/touch/emails/smtp.interface.js.map +1 -0
  34. package/common/interfaces/touch/index.d.ts +2 -0
  35. package/common/interfaces/touch/index.js +19 -0
  36. package/common/interfaces/touch/index.js.map +1 -0
  37. package/common/interfaces/touch/smss/index.d.ts +1 -0
  38. package/common/interfaces/touch/smss/index.js +18 -0
  39. package/common/interfaces/touch/smss/index.js.map +1 -0
  40. package/common/interfaces/touch/smss/sms.interface.d.ts +13 -0
  41. package/common/interfaces/touch/smss/sms.interface.js +3 -0
  42. package/common/interfaces/touch/smss/sms.interface.js.map +1 -0
  43. package/common/utils/touch/constants/index.d.ts +1 -0
  44. package/common/utils/touch/constants/index.js +18 -0
  45. package/common/utils/touch/constants/index.js.map +1 -0
  46. package/common/utils/touch/constants/touch.constant.d.ts +1 -0
  47. package/common/utils/touch/constants/touch.constant.js +5 -0
  48. package/common/utils/touch/constants/touch.constant.js.map +1 -0
  49. package/common/utils/touch/index.d.ts +2 -0
  50. package/common/utils/touch/index.js +19 -0
  51. package/common/utils/touch/index.js.map +1 -0
  52. package/common/utils/touch/touch.spec.d.ts +1 -0
  53. package/common/utils/touch/touch.spec.js +15 -0
  54. package/common/utils/touch/touch.spec.js.map +1 -0
  55. package/common/utils/touch/touch.util.d.ts +2 -0
  56. package/common/utils/touch/touch.util.js +14 -0
  57. package/common/utils/touch/touch.util.js.map +1 -0
  58. package/index.d.ts +4 -2
  59. package/index.js +7 -4
  60. package/index.js.map +1 -1
  61. package/package.json +1 -1
  62. package/services/index.d.ts +1 -0
  63. package/services/index.js +1 -0
  64. package/services/index.js.map +1 -1
  65. package/services/special/files.service.d.ts +14 -0
  66. package/services/special/files.service.js +27 -0
  67. package/services/special/files.service.js.map +1 -0
  68. package/services/special/index.d.ts +4 -0
  69. package/services/special/index.js +5 -0
  70. package/services/special/index.js.map +1 -1
  71. package/services/touch/emails.service.d.ts +10 -0
  72. package/services/touch/emails.service.js +18 -0
  73. package/services/touch/emails.service.js.map +1 -0
  74. package/services/touch/index.d.ts +14 -0
  75. package/services/touch/index.js +37 -0
  76. package/services/touch/index.js.map +1 -0
  77. package/services/touch/smss.service.d.ts +10 -0
  78. package/services/touch/smss.service.js +18 -0
  79. package/services/touch/smss.service.js.map +1 -0
@@ -0,0 +1 @@
1
+ export * from './provider.enum';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./provider.enum"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/touch/emails/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
@@ -0,0 +1,3 @@
1
+ export declare enum EmailProvider {
2
+ NODEMAILER = "NODEMAILER"
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmailProvider = void 0;
4
+ var EmailProvider;
5
+ (function (EmailProvider) {
6
+ EmailProvider["NODEMAILER"] = "NODEMAILER";
7
+ })(EmailProvider || (exports.EmailProvider = EmailProvider = {}));
8
+ //# sourceMappingURL=provider.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/touch/emails/provider.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,0CAAyB,CAAA;AAC3B,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB"}
@@ -0,0 +1,2 @@
1
+ export * from './emails';
2
+ export * from './smss';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./emails"), exports);
18
+ __exportStar(require("./smss"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/enums/touch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB"}
@@ -0,0 +1 @@
1
+ export * from './provider.enum';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./provider.enum"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/touch/smss/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
@@ -0,0 +1,4 @@
1
+ export declare enum SmsProvider {
2
+ KAVENEGAR = "KAVENEGAR",
3
+ MELIPAYAMAK = "MELIPAYAMAK"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SmsProvider = void 0;
4
+ var SmsProvider;
5
+ (function (SmsProvider) {
6
+ SmsProvider["KAVENEGAR"] = "KAVENEGAR";
7
+ SmsProvider["MELIPAYAMAK"] = "MELIPAYAMAK";
8
+ })(SmsProvider || (exports.SmsProvider = SmsProvider = {}));
9
+ //# sourceMappingURL=provider.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/touch/smss/provider.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,0CAA2B,CAAA;AAC7B,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
@@ -0,0 +1,18 @@
1
+ import type { Document } from 'mongoose';
2
+ import { Core, Dto } from '../../../core/interfaces';
3
+ export interface File<Properties extends object = object> extends Core<Properties> {
4
+ field?: string;
5
+ original: string;
6
+ encoding?: string;
7
+ mimetype: string;
8
+ size: number;
9
+ bucket: string;
10
+ key: string;
11
+ acl: string;
12
+ content_type?: string;
13
+ storage_class?: string;
14
+ location: string;
15
+ etag?: string;
16
+ }
17
+ export type FileDoc<Properties extends object = object> = File<Properties> & Document;
18
+ export type FileDto<Properties extends object = object> = Dto<File<Properties>>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=file.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/special/files/file.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from './file.interface';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./file.interface"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/special/files/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
@@ -1 +1,2 @@
1
+ export * from './files';
1
2
  export * from './stats';
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./files"), exports);
17
18
  __exportStar(require("./stats"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/interfaces/special/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/interfaces/special/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,0CAAwB"}
@@ -0,0 +1,22 @@
1
+ import type { Document } from 'mongoose';
2
+ import { EmailProvider } from '../../../enums/touch';
3
+ import { Core, Dto, MakeOptional } from '../../../core/interfaces';
4
+ import { EmailSmtp } from './smtp.interface';
5
+ export interface Email<Properties extends object = object> extends Core<Properties> {
6
+ provider: EmailProvider;
7
+ to: string[];
8
+ cc?: string[];
9
+ bcc?: string[];
10
+ from: string;
11
+ subject: string;
12
+ html?: string;
13
+ text?: string;
14
+ date?: Date;
15
+ reply_to?: string[];
16
+ in_reply_to?: string;
17
+ attachments?: string[];
18
+ smtp?: EmailSmtp;
19
+ }
20
+ export type EmailDoc<Properties extends object = object> = Email<Properties> & Document;
21
+ export type EmailDto<Properties extends object = object> = Dto<Email<Properties>>;
22
+ export type EmailSendDto<Properties extends object = object> = MakeOptional<Omit<EmailDto<Properties>, 'smtp'>, 'provider'>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=email.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/touch/emails/email.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './email.interface';
2
+ export * from './smtp.interface';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./email.interface"), exports);
18
+ __exportStar(require("./smtp.interface"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/touch/emails/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,mDAAiC"}
@@ -0,0 +1,7 @@
1
+ export interface EmailSmtp {
2
+ identity: string;
3
+ response?: string;
4
+ accepted?: string[];
5
+ rejected?: string[];
6
+ }
7
+ export type EmailSmtpDto = EmailSmtp;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=smtp.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smtp.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/touch/emails/smtp.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './emails';
2
+ export * from './smss';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./emails"), exports);
18
+ __exportStar(require("./smss"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/interfaces/touch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB"}
@@ -0,0 +1 @@
1
+ export * from './sms.interface';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./sms.interface"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/touch/smss/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
@@ -0,0 +1,13 @@
1
+ import type { Document } from 'mongoose';
2
+ import { SmsProvider } from '../../../enums/touch';
3
+ import { Core, Dto, MakeOptional } from '../../../core/interfaces';
4
+ export interface Sms<T = any, Properties extends object = object> extends Core<Properties> {
5
+ provider: SmsProvider;
6
+ sender: string;
7
+ receptors: string[];
8
+ message: string;
9
+ res?: T;
10
+ }
11
+ export type SmsDoc<T = any, Properties extends object = object> = Sms<T, Properties> & Document;
12
+ export type SmsDto<T = any, Properties extends object = object> = Dto<Sms<T, Properties>>;
13
+ export type SmsSendDto<T = any, Properties extends object = object> = MakeOptional<Omit<SmsDto<T, Properties>, 'res'>, 'provider'>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=sms.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sms.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/touch/smss/sms.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from './touch.constant';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./touch.constant"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/utils/touch/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
@@ -0,0 +1 @@
1
+ export declare const OTP_SECRET: RegExp;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OTP_SECRET = void 0;
4
+ exports.OTP_SECRET = /\${secret:(\w+\.\w+)}/;
5
+ //# sourceMappingURL=touch.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touch.constant.js","sourceRoot":"","sources":["../../../../src/common/utils/touch/constants/touch.constant.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ export * from './touch.util';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./constants"), exports);
18
+ __exportStar(require("./touch.util"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/utils/touch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAE5B,+CAA6B"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const touch_util_1 = require("./touch.util");
4
+ describe('libs/common/src/utils/touch/sms.util.ts', () => {
5
+ const message = 'Hi, user\nthis is your otp code:${secret:my.secret}';
6
+ let secret;
7
+ it('findSecret', () => {
8
+ secret = (0, touch_util_1.findSecret)(message);
9
+ expect(secret).toBe('my.secret');
10
+ });
11
+ it('maskToken', () => {
12
+ expect((0, touch_util_1.maskToken)('514522')).toMatch(/^\d\*{4}\d$/);
13
+ });
14
+ });
15
+ //# sourceMappingURL=touch.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touch.spec.js","sourceRoot":"","sources":["../../../src/common/utils/touch/touch.spec.ts"],"names":[],"mappings":";;AAAA,6CAAqD;AAErD,QAAQ,CAAC,yCAAyC,EAAE,GAAG,EAAE;IACvD,MAAM,OAAO,GAAG,qDAAqD,CAAC;IAEtE,IAAI,MAAc,CAAC;IAEnB,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;QACpB,MAAM,GAAG,IAAA,uBAAU,EAAC,OAAO,CAAE,CAAC;QAC9B,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;QACnB,MAAM,CAAC,IAAA,sBAAS,EAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const maskToken: (token: string) => string;
2
+ export declare const findSecret: (message: string) => string | undefined;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findSecret = exports.maskToken = void 0;
4
+ const constants_1 = require("./constants");
5
+ const maskToken = (token) => {
6
+ return token.slice(0, 1) + '****' + token.slice(-1);
7
+ };
8
+ exports.maskToken = maskToken;
9
+ const findSecret = (message) => {
10
+ const match = message.match(constants_1.OTP_SECRET);
11
+ return match ? match[1] : undefined;
12
+ };
13
+ exports.findSecret = findSecret;
14
+ //# sourceMappingURL=touch.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touch.util.js","sourceRoot":"","sources":["../../../src/common/utils/touch/touch.util.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAElC,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,EAAE;IACzC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEK,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,EAAE;IAC5C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,sBAAU,CAAC,CAAC;IACxC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACtC,CAAC,CAAC;AAHW,QAAA,UAAU,cAGrB"}
package/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { AxiosInstance } from 'axios';
2
2
  import * as Services from './services';
3
3
  import { GraphqlService } from './common/core/classes';
4
4
  export * from './services';
5
- export declare class PlatformClient<Properties extends object = object> {
5
+ export declare class Platform<Properties extends object = object> {
6
6
  readonly axios: AxiosInstance;
7
7
  protected _graphql?: GraphqlService;
8
8
  protected _auth?: Services.AuthClient<Properties>;
@@ -11,6 +11,7 @@ export declare class PlatformClient<Properties extends object = object> {
11
11
  protected _essential?: Services.EssentialClient<Properties>;
12
12
  protected _identity?: Services.IdentityClient<Properties>;
13
13
  protected _special?: Services.SpecialClient<Properties>;
14
+ protected _touch?: Services.TouchClient<Properties>;
14
15
  constructor(axios: AxiosInstance);
15
16
  get auth(): Services.AuthClient<Properties>;
16
17
  get context(): Services.ContextClient<Properties>;
@@ -18,6 +19,7 @@ export declare class PlatformClient<Properties extends object = object> {
18
19
  get essential(): Services.EssentialClient<Properties>;
19
20
  get identity(): Services.IdentityClient<Properties>;
20
21
  get special(): Services.SpecialClient<Properties>;
22
+ get touch(): Services.TouchClient<Properties>;
21
23
  get graphql(): GraphqlService;
22
- static build<Properties extends object = object>(axios: AxiosInstance): PlatformClient<Properties>;
24
+ static build<Properties extends object = object>(axios: AxiosInstance): Platform<Properties>;
23
25
  }
package/index.js CHANGED
@@ -14,11 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.PlatformClient = void 0;
17
+ exports.Platform = void 0;
18
18
  const Services = require("./services");
19
19
  const classes_1 = require("./common/core/classes");
20
20
  __exportStar(require("./services"), exports);
21
- class PlatformClient {
21
+ class Platform {
22
22
  constructor(axios) {
23
23
  this.axios = axios;
24
24
  }
@@ -40,12 +40,15 @@ class PlatformClient {
40
40
  get special() {
41
41
  return (this._special = this._special ?? Services.SpecialClient.build(this.axios));
42
42
  }
43
+ get touch() {
44
+ return (this._touch = this._touch ?? Services.TouchClient.build(this.axios));
45
+ }
43
46
  get graphql() {
44
47
  return (this._graphql = this._graphql ?? classes_1.GraphqlService.build(this.axios));
45
48
  }
46
49
  static build(axios) {
47
- return new PlatformClient(axios);
50
+ return new Platform(axios);
48
51
  }
49
52
  }
50
- exports.PlatformClient = PlatformClient;
53
+ exports.Platform = Platform;
51
54
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,uCAAuC;AACvC,mDAAuD;AAEvD,6CAA2B;AAE3B,MAAa,cAAc;IAUzB,YAAqB,KAAoB;QAApB,UAAK,GAAL,KAAK,CAAe;IAAG,CAAC;IAE7C,IAAI,IAAI;QACN,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACxF,CAAC;IAED,IAAI,OAAO;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACjG,CAAC;IAED,IAAI,MAAM;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9F,CAAC;IAED,IAAI,SAAS;QACX,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACvG,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACpG,CAAC;IAED,IAAI,OAAO;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACjG,CAAC;IAED,IAAI,OAAO;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,wBAAc,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,cAAc,CAAa,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF;AA3CD,wCA2CC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,uCAAuC;AACvC,mDAAuD;AAEvD,6CAA2B;AAE3B,MAAa,QAAQ;IAWnB,YAAqB,KAAoB;QAApB,UAAK,GAAL,KAAK,CAAe;IAAG,CAAC;IAE7C,IAAI,IAAI;QACN,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACxF,CAAC;IAED,IAAI,OAAO;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACjG,CAAC;IAED,IAAI,MAAM;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9F,CAAC;IAED,IAAI,SAAS;QACX,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACvG,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACpG,CAAC;IAED,IAAI,OAAO;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACjG,CAAC;IAED,IAAI,KAAK;QACP,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3F,CAAC;IAED,IAAI,OAAO;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,wBAAc,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,QAAQ,CAAa,KAAK,CAAC,CAAC;IACzC,CAAC;CACF;AAhDD,4BAgDC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenex/sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Wenex SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -4,3 +4,4 @@ export * from './domain';
4
4
  export * from './essential';
5
5
  export * from './identity';
6
6
  export * from './special';
7
+ export * from './touch';
package/services/index.js CHANGED
@@ -20,4 +20,5 @@ __exportStar(require("./domain"), exports);
20
20
  __exportStar(require("./essential"), exports);
21
21
  __exportStar(require("./identity"), exports);
22
22
  __exportStar(require("./special"), exports);
23
+ __exportStar(require("./touch"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB;AACzB,8CAA4B;AAC5B,6CAA2B;AAC3B,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB;AACzB,8CAA4B;AAC5B,6CAA2B;AAC3B,4CAA0B;AAC1B,0CAAwB"}
@@ -0,0 +1,14 @@
1
+ import type { AxiosInstance, ResponseType } from 'axios';
2
+ import { Serializer } from '../../common/core/interfaces';
3
+ import { File, FileDto } from '../../common/interfaces/special';
4
+ import { RequestConfig, RestfulService } from '../../common/core/classes';
5
+ export declare class FilesService<Properties extends object = object> extends RestfulService<File<Properties>, FileDto<Properties>> {
6
+ protected axios: AxiosInstance;
7
+ constructor(axios: AxiosInstance);
8
+ download<T = any>(id: string, config?: RequestConfig<File<Properties>>, responseType?: ResponseType): Promise<T>;
9
+ upload(items: {
10
+ value: Blob;
11
+ filename?: string;
12
+ }[], scope: 'private' | 'public', config?: RequestConfig<File<Properties>>): Promise<Serializer<File<Properties>>[]>;
13
+ static build<Properties extends object = object>(axios: AxiosInstance): FilesService<Properties>;
14
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FilesService = void 0;
4
+ const classes_1 = require("../../common/core/classes");
5
+ class FilesService extends classes_1.RestfulService {
6
+ constructor(axios) {
7
+ super('files', axios);
8
+ this.axios = axios;
9
+ }
10
+ download(id, config = {}, responseType = 'blob') {
11
+ config.responseType = responseType;
12
+ const url = this.url(`download/${id}`);
13
+ return this.get(url, config);
14
+ }
15
+ upload(items, scope, config = {}) {
16
+ const form = new FormData();
17
+ items.forEach((item) => form.append('file', item.value, item.filename));
18
+ Object.assign(config, { headers: { 'Content-Type': 'multipart/form-data' } });
19
+ const url = this.url(`upload/${scope}`);
20
+ return this.post(url, form, config);
21
+ }
22
+ static build(axios) {
23
+ return new FilesService(axios);
24
+ }
25
+ }
26
+ exports.FilesService = FilesService;
27
+ //# sourceMappingURL=files.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.service.js","sourceRoot":"","sources":["../../src/services/special/files.service.ts"],"names":[],"mappings":";;;AAIA,uDAA0E;AAE1E,MAAa,YAAiD,SAAQ,wBAAqD;IACzH,YAAsB,KAAoB;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QADF,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,QAAQ,CAAU,EAAU,EAAE,SAA0C,EAAE,EAAE,eAA6B,MAAM;QAC7G,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,GAAG,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CACJ,KAA2C,EAC3C,KAA2B,EAC3B,SAA0C,EAAE;QAE5C,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC5B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE,EAAE,CAAC,CAAC;QAC9E,MAAM,GAAG,GAAW,IAAI,CAAC,GAAG,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC,IAAI,CAA2C,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,YAAY,CAAa,KAAK,CAAC,CAAC;IAC7C,CAAC;CACF;AA1BD,oCA0BC"}
@@ -1,10 +1,14 @@
1
1
  import type { AxiosInstance } from 'axios';
2
+ import { FilesService } from './files.service';
2
3
  import { StatsService } from './stats.service';
4
+ export * from './files.service';
3
5
  export * from './stats.service';
4
6
  export declare class SpecialClient<Properties extends object = object> {
5
7
  readonly axios: AxiosInstance;
8
+ protected _files?: FilesService<Properties>;
6
9
  protected _stats?: StatsService<Properties>;
7
10
  constructor(axios: AxiosInstance);
11
+ get files(): FilesService<Properties>;
8
12
  get stats(): StatsService<Properties>;
9
13
  static build<Properties extends object = object>(axios: AxiosInstance): SpecialClient<Properties>;
10
14
  }
@@ -15,12 +15,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.SpecialClient = void 0;
18
+ const files_service_1 = require("./files.service");
18
19
  const stats_service_1 = require("./stats.service");
20
+ __exportStar(require("./files.service"), exports);
19
21
  __exportStar(require("./stats.service"), exports);
20
22
  class SpecialClient {
21
23
  constructor(axios) {
22
24
  this.axios = axios;
23
25
  }
26
+ get files() {
27
+ return (this._files = this._files ?? new files_service_1.FilesService(this.axios));
28
+ }
24
29
  get stats() {
25
30
  return (this._stats = this._stats ?? new stats_service_1.StatsService(this.axios));
26
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/special/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,mDAA+C;AAE/C,kDAAgC;AAEhC,MAAa,aAAa;IAGxB,YAAqB,KAAoB;QAApB,UAAK,GAAL,KAAK,CAAe;IAAG,CAAC;IAE7C,IAAI,KAAK;QACP,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,4BAAY,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACjF,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,aAAa,CAAa,KAAK,CAAC,CAAC;IAC9C,CAAC;CACF;AAZD,sCAYC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/special/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,mDAA+C;AAC/C,mDAA+C;AAE/C,kDAAgC;AAChC,kDAAgC;AAEhC,MAAa,aAAa;IAIxB,YAAqB,KAAoB;QAApB,UAAK,GAAL,KAAK,CAAe;IAAG,CAAC;IAE7C,IAAI,KAAK;QACP,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,4BAAY,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACjF,CAAC;IAED,IAAI,KAAK;QACP,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,4BAAY,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACjF,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,aAAa,CAAa,KAAK,CAAC,CAAC;IAC9C,CAAC;CACF;AAjBD,sCAiBC"}
@@ -0,0 +1,10 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import { Serializer } from '../../common/core/interfaces';
3
+ import { RequestConfig, RestfulService } from '../../common/core/classes';
4
+ import { Email, EmailDto, EmailSendDto } from '../../common/interfaces/touch';
5
+ export declare class EmailsService<Properties extends object = object> extends RestfulService<Email<Properties>, EmailDto<Properties>> {
6
+ protected axios: AxiosInstance;
7
+ constructor(axios: AxiosInstance);
8
+ send(data: EmailSendDto<Properties>, config?: RequestConfig<Email<Properties>>): Promise<Serializer<Email<Properties>>>;
9
+ static build<Properties extends object = object>(axios: AxiosInstance): EmailsService<Properties>;
10
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmailsService = void 0;
4
+ const classes_1 = require("../../common/core/classes");
5
+ class EmailsService extends classes_1.RestfulService {
6
+ constructor(axios) {
7
+ super('emails', axios);
8
+ this.axios = axios;
9
+ }
10
+ async send(data, config) {
11
+ return (await this.post(this.url('send'), data, config)).data;
12
+ }
13
+ static build(axios) {
14
+ return new EmailsService(axios);
15
+ }
16
+ }
17
+ exports.EmailsService = EmailsService;
18
+ //# sourceMappingURL=emails.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emails.service.js","sourceRoot":"","sources":["../../src/services/touch/emails.service.ts"],"names":[],"mappings":";;;AAGA,uDAA0E;AAG1E,MAAa,aAAkD,SAAQ,wBAAuD;IAC5H,YAAsB,KAAoB;QACxC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QADH,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAA8B,EAAE,MAAyC;QAClF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAgE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/H,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,aAAa,CAAa,KAAK,CAAC,CAAC;IAC9C,CAAC;CACF;AAZD,sCAYC"}
@@ -0,0 +1,14 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import { SmssService } from './smss.service';
3
+ import { EmailsService } from './emails.service';
4
+ export * from './smss.service';
5
+ export * from './emails.service';
6
+ export declare class TouchClient<Properties extends object = object> {
7
+ readonly axios: AxiosInstance;
8
+ protected _smss?: SmssService<any, Properties>;
9
+ protected _emails?: EmailsService<Properties>;
10
+ constructor(axios: AxiosInstance);
11
+ get smss(): SmssService<any, Properties>;
12
+ get emails(): EmailsService<Properties>;
13
+ static build<Properties extends object = object>(axios: AxiosInstance): TouchClient<Properties>;
14
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.TouchClient = void 0;
18
+ const smss_service_1 = require("./smss.service");
19
+ const emails_service_1 = require("./emails.service");
20
+ __exportStar(require("./smss.service"), exports);
21
+ __exportStar(require("./emails.service"), exports);
22
+ class TouchClient {
23
+ constructor(axios) {
24
+ this.axios = axios;
25
+ }
26
+ get smss() {
27
+ return (this._smss = this._smss ?? new smss_service_1.SmssService(this.axios));
28
+ }
29
+ get emails() {
30
+ return (this._emails = this._emails ?? new emails_service_1.EmailsService(this.axios));
31
+ }
32
+ static build(axios) {
33
+ return new TouchClient(axios);
34
+ }
35
+ }
36
+ exports.TouchClient = TouchClient;
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/touch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,iDAA6C;AAC7C,qDAAiD;AAEjD,iDAA+B;AAC/B,mDAAiC;AAEjC,MAAa,WAAW;IAItB,YAAqB,KAAoB;QAApB,UAAK,GAAL,KAAK,CAAe;IAAG,CAAC;IAE7C,IAAI,IAAI;QACN,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,0BAAW,CAAkB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnF,CAAC;IAED,IAAI,MAAM;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,8BAAa,CAAa,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACpF,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,WAAW,CAAa,KAAK,CAAC,CAAC;IAC5C,CAAC;CACF;AAjBD,kCAiBC"}
@@ -0,0 +1,10 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import { Serializer } from '../../common/core/interfaces';
3
+ import { Sms, SmsDto, SmsSendDto } from '../../common/interfaces/touch';
4
+ import { RequestConfig, RestfulService } from '../../common/core/classes';
5
+ export declare class SmssService<T = any, Properties extends object = object> extends RestfulService<Sms<T, Properties>, SmsDto<T, Properties>> {
6
+ protected axios: AxiosInstance;
7
+ constructor(axios: AxiosInstance);
8
+ send(data: SmsSendDto<T, Properties>, config?: RequestConfig<Sms<T, Properties>>): Promise<Serializer<Sms<T, Properties>>>;
9
+ static build<T = any, Properties extends object = object>(axios: AxiosInstance): SmssService<T, Properties>;
10
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SmssService = void 0;
4
+ const classes_1 = require("../../common/core/classes");
5
+ class SmssService extends classes_1.RestfulService {
6
+ constructor(axios) {
7
+ super('smss', axios);
8
+ this.axios = axios;
9
+ }
10
+ async send(data, config) {
11
+ return (await this.post(this.url('send'), data, config)).data;
12
+ }
13
+ static build(axios) {
14
+ return new SmssService(axios);
15
+ }
16
+ }
17
+ exports.SmssService = SmssService;
18
+ //# sourceMappingURL=smss.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smss.service.js","sourceRoot":"","sources":["../../src/services/touch/smss.service.ts"],"names":[],"mappings":";;;AAIA,uDAA0E;AAE1E,MAAa,WAAyD,SAAQ,wBAG7E;IACC,YAAsB,KAAoB;QACxC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QADD,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAA+B,EAAE,MAA0C;QACpF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAkE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACjI,CAAC;IAED,MAAM,CAAC,KAAK,CAA8C,KAAoB;QAC5E,OAAO,IAAI,WAAW,CAAgB,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF;AAfD,kCAeC"}