@fiado/type-kit 2.1.45 → 2.1.47

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 (52) hide show
  1. package/bin/card/validations/CardUpdateKeyConstraint.js +2 -2
  2. package/bin/card/validations/IsPhoneNumberConstraint.js +2 -2
  3. package/bin/index.d.ts +1 -0
  4. package/bin/index.js +19 -8
  5. package/bin/referral-business/enums/AgentRoleEnum.d.ts +5 -0
  6. package/bin/referral-business/enums/AgentRoleEnum.js +9 -0
  7. package/bin/referral-business/index.d.ts +1 -0
  8. package/bin/referral-business/index.js +18 -0
  9. package/bin/zendeskMessaging/dtos/SendProactiveMessageRequest.d.ts +5 -0
  10. package/bin/zendeskMessaging/dtos/SendProactiveMessageRequest.js +31 -0
  11. package/bin/zendeskMessaging/dtos/SunshineCreateConversationRequest.d.ts +10 -0
  12. package/bin/zendeskMessaging/dtos/SunshineCreateConversationRequest.js +46 -0
  13. package/bin/zendeskMessaging/dtos/SunshineCreateUserRequest.d.ts +10 -0
  14. package/bin/zendeskMessaging/dtos/SunshineCreateUserRequest.js +45 -0
  15. package/bin/zendeskMessaging/dtos/SunshinePostMessageRequest.d.ts +15 -0
  16. package/bin/{cognitoConnector/dtos/SignUpBackofficeRequest.js → zendeskMessaging/dtos/SunshinePostMessageRequest.js} +27 -33
  17. package/bin/zendeskMessaging/index.d.ts +6 -0
  18. package/bin/zendeskMessaging/index.js +9 -0
  19. package/bin/zendeskMessaging/interfaces/IProactiveMessagingEnums.d.ts +9 -0
  20. package/bin/zendeskMessaging/interfaces/IProactiveMessagingEnums.js +13 -0
  21. package/bin/zendeskMessaging/interfaces/ISunshineConversations.d.ts +7 -3
  22. package/bin/zendeskMessaging/interfaces/ISunshineProactiveResponses.d.ts +38 -0
  23. package/bin/zendeskMessaging/interfaces/ISunshineProactiveResponses.js +2 -0
  24. package/package.json +1 -1
  25. package/src/index.ts +1 -0
  26. package/src/referral-business/enums/AgentRoleEnum.ts +5 -0
  27. package/src/referral-business/index.ts +2 -0
  28. package/src/zendeskMessaging/dtos/SendProactiveMessageRequest.ts +15 -0
  29. package/src/zendeskMessaging/dtos/SunshineCreateConversationRequest.ts +28 -0
  30. package/src/zendeskMessaging/dtos/SunshineCreateUserRequest.ts +27 -0
  31. package/src/zendeskMessaging/dtos/SunshinePostMessageRequest.ts +44 -0
  32. package/src/zendeskMessaging/index.ts +11 -0
  33. package/src/zendeskMessaging/interfaces/IProactiveMessagingEnums.ts +9 -0
  34. package/src/zendeskMessaging/interfaces/ISunshineConversations.ts +8 -1
  35. package/src/zendeskMessaging/interfaces/ISunshineProactiveResponses.ts +47 -0
  36. package/bin/bankAccount/dtos/ExternalAccountType.d.ts +0 -4
  37. package/bin/bankAccount/dtos/ExternalAccountType.js +0 -6
  38. package/bin/centralPayments/dtos/CentralPaymentsDocumentImages.d.ts +0 -6
  39. package/bin/centralPayments/dtos/CentralPaymentsDocumentImages.js +0 -6
  40. package/bin/centralPayments/dtos/CentralPaymentsDocumentUploadRequest.d.ts +0 -6
  41. package/bin/centralPayments/dtos/CentralPaymentsDocumentUploadRequest.js +0 -6
  42. package/bin/cognitoConnector/dtos/SignUpBackofficeRequest.d.ts +0 -13
  43. package/bin/directorySetting/dtos/DirectorySettingCreateResponse.d.ts +0 -0
  44. package/bin/directorySetting/dtos/DirectorySettingCreateResponse.js +0 -0
  45. package/bin/pricelist/dtos/GetPriceListDirectoriesResponse.d.ts +0 -28
  46. package/bin/pricelist/dtos/GetPriceListDirectoriesResponse.js +0 -6
  47. package/bin/services/dtos/GetMembershipListAppResponse.d.ts +0 -4
  48. package/bin/services/dtos/GetMembershipListAppResponse.js +0 -6
  49. package/bin/services/dtos/GetServiceMembershipListAResponse.d.ts +0 -4
  50. package/bin/services/dtos/GetServiceMembershipListAResponse.js +0 -6
  51. package/bin/services/enums/ServiceProviderEnum.d.ts +0 -5
  52. package/bin/services/enums/ServiceProviderEnum.js +0 -9
@@ -6,7 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.IsValueValid = exports.CardUpdateKeyConstraint = exports.IsReasonRequiredForCancelledStatusConstraint = void 0;
9
+ exports.CardUpdateKeyConstraint = exports.IsReasonRequiredForCancelledStatusConstraint = void 0;
10
+ exports.IsValueValid = IsValueValid;
10
11
  const class_validator_1 = require("class-validator");
11
12
  const Status_1 = require("../enums/Status");
12
13
  const UpdateKey_1 = require("../enums/UpdateKey");
@@ -70,4 +71,3 @@ function IsValueValid(validationOptions) {
70
71
  });
71
72
  };
72
73
  }
73
- exports.IsValueValid = IsValueValid;
@@ -6,7 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.IsPhoneNumberFiado = exports.IsPhoneNumberConstraint = void 0;
9
+ exports.IsPhoneNumberConstraint = void 0;
10
+ exports.IsPhoneNumberFiado = IsPhoneNumberFiado;
10
11
  const class_validator_1 = require("class-validator");
11
12
  const regex_1 = require("../../helpers/constans/regex");
12
13
  let IsPhoneNumberConstraint = class IsPhoneNumberConstraint {
@@ -36,4 +37,3 @@ function IsPhoneNumberFiado(validationOptions) {
36
37
  });
37
38
  };
38
39
  }
39
- exports.IsPhoneNumberFiado = IsPhoneNumberFiado;
package/bin/index.d.ts CHANGED
@@ -55,3 +55,4 @@ export * as PayrollBusiness from './payroll-business';
55
55
  export * as Event from './event';
56
56
  export * as NotificationWS from './notificationWS';
57
57
  export * as ZendeskMessaging from './zendeskMessaging';
58
+ export * as ReferralBusiness from './referral-business';
package/bin/index.js CHANGED
@@ -15,16 +15,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.Collector = exports.Pricelist = exports.Company = exports.Services = exports.AccountIssuanceBusiness = exports.AppSelectionData = exports.Device = exports.Observations = exports.IssuanceBusiness = exports.Blacklist = exports.CentralPayments = exports.Helpdesk = exports.FiadoApiResponse = exports.Auth = exports.LegalDocumentsBusiness = exports.Role = exports.STPAccount = exports.RiskProfile = exports.FraudPreventionEngine = exports.BBVARst = exports.Stp = exports.BankAccount = exports.P2pContact = exports.CreditContract = exports.Contract = exports.ProductCatalog = exports.ContactInfo = exports.Transaction = exports.TransactionProcessor = exports.GenericMessage = exports.EventBridgeMessage = exports.SessionActivity = exports.NotificationMessages = exports.ServicePayment = exports.Header = exports.Identity = exports.Group = exports.File = exports.ExchangeRate = exports.Directory = exports.Currency = exports.Country = exports.Card = exports.Authentication = exports.App = exports.Address = exports.Beneficiary = exports.Activity = exports.Account = exports.Crypto = void 0;
27
- exports.ZendeskMessaging = exports.NotificationWS = exports.Event = exports.PayrollBusiness = exports.Cnbv = exports.DirectorySetting = exports.InvoiceCollector = void 0;
37
+ exports.ReferralBusiness = exports.ZendeskMessaging = exports.NotificationWS = exports.Event = exports.PayrollBusiness = exports.Cnbv = exports.DirectorySetting = exports.InvoiceCollector = void 0;
28
38
  exports.Crypto = __importStar(require("./crypto"));
29
39
  exports.Account = __importStar(require("./account"));
30
40
  exports.Activity = __importStar(require("./activity"));
@@ -82,3 +92,4 @@ exports.PayrollBusiness = __importStar(require("./payroll-business"));
82
92
  exports.Event = __importStar(require("./event"));
83
93
  exports.NotificationWS = __importStar(require("./notificationWS"));
84
94
  exports.ZendeskMessaging = __importStar(require("./zendeskMessaging"));
95
+ exports.ReferralBusiness = __importStar(require("./referral-business"));
@@ -0,0 +1,5 @@
1
+ export declare enum AgentRoleEnum {
2
+ ADMIN = "ADMIN",
3
+ AGENT = "AGENT",
4
+ OWNER = "OWNER"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentRoleEnum = void 0;
4
+ var AgentRoleEnum;
5
+ (function (AgentRoleEnum) {
6
+ AgentRoleEnum["ADMIN"] = "ADMIN";
7
+ AgentRoleEnum["AGENT"] = "AGENT";
8
+ AgentRoleEnum["OWNER"] = "OWNER";
9
+ })(AgentRoleEnum || (exports.AgentRoleEnum = AgentRoleEnum = {}));
@@ -0,0 +1 @@
1
+ export * from './enums/AgentRoleEnum';
@@ -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
+ //Enums
18
+ __exportStar(require("./enums/AgentRoleEnum"), exports);
@@ -0,0 +1,5 @@
1
+ export declare class SendProactiveMessageRequest {
2
+ directoryId: string;
3
+ message: string;
4
+ displayName?: string;
5
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SendProactiveMessageRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class SendProactiveMessageRequest {
15
+ }
16
+ exports.SendProactiveMessageRequest = SendProactiveMessageRequest;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", String)
21
+ ], SendProactiveMessageRequest.prototype, "directoryId", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], SendProactiveMessageRequest.prototype, "message", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", String)
31
+ ], SendProactiveMessageRequest.prototype, "displayName", void 0);
@@ -0,0 +1,10 @@
1
+ declare class ConversationParticipantDto {
2
+ userId?: string;
3
+ userExternalId?: string;
4
+ subscribeSDKClient?: boolean;
5
+ }
6
+ export declare class SunshineCreateConversationRequest {
7
+ type: 'personal' | 'sdkGroup';
8
+ participants: ConversationParticipantDto[];
9
+ }
10
+ export {};
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SunshineCreateConversationRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const class_transformer_1 = require("class-transformer");
15
+ class ConversationParticipantDto {
16
+ }
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsOptional)(),
20
+ __metadata("design:type", String)
21
+ ], ConversationParticipantDto.prototype, "userId", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ __metadata("design:type", String)
26
+ ], ConversationParticipantDto.prototype, "userExternalId", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsBoolean)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", Boolean)
31
+ ], ConversationParticipantDto.prototype, "subscribeSDKClient", void 0);
32
+ class SunshineCreateConversationRequest {
33
+ }
34
+ exports.SunshineCreateConversationRequest = SunshineCreateConversationRequest;
35
+ __decorate([
36
+ (0, class_validator_1.IsString)(),
37
+ (0, class_validator_1.IsNotEmpty)(),
38
+ (0, class_validator_1.IsIn)(['personal', 'sdkGroup']),
39
+ __metadata("design:type", String)
40
+ ], SunshineCreateConversationRequest.prototype, "type", void 0);
41
+ __decorate([
42
+ (0, class_validator_1.IsArray)(),
43
+ (0, class_validator_1.ValidateNested)({ each: true }),
44
+ (0, class_transformer_1.Type)(() => ConversationParticipantDto),
45
+ __metadata("design:type", Array)
46
+ ], SunshineCreateConversationRequest.prototype, "participants", void 0);
@@ -0,0 +1,10 @@
1
+ declare class SunshineUserProfileDto {
2
+ givenName?: string;
3
+ surname?: string;
4
+ email?: string;
5
+ }
6
+ export declare class SunshineCreateUserRequest {
7
+ externalId: string;
8
+ profile?: SunshineUserProfileDto;
9
+ }
10
+ export {};
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SunshineCreateUserRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const class_transformer_1 = require("class-transformer");
15
+ class SunshineUserProfileDto {
16
+ }
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsOptional)(),
20
+ __metadata("design:type", String)
21
+ ], SunshineUserProfileDto.prototype, "givenName", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ __metadata("design:type", String)
26
+ ], SunshineUserProfileDto.prototype, "surname", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", String)
31
+ ], SunshineUserProfileDto.prototype, "email", void 0);
32
+ class SunshineCreateUserRequest {
33
+ }
34
+ exports.SunshineCreateUserRequest = SunshineCreateUserRequest;
35
+ __decorate([
36
+ (0, class_validator_1.IsString)(),
37
+ (0, class_validator_1.IsNotEmpty)(),
38
+ __metadata("design:type", String)
39
+ ], SunshineCreateUserRequest.prototype, "externalId", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.ValidateNested)(),
42
+ (0, class_transformer_1.Type)(() => SunshineUserProfileDto),
43
+ (0, class_validator_1.IsOptional)(),
44
+ __metadata("design:type", SunshineUserProfileDto)
45
+ ], SunshineCreateUserRequest.prototype, "profile", void 0);
@@ -0,0 +1,15 @@
1
+ declare class MessageAuthorDto {
2
+ type: 'user' | 'business';
3
+ userId?: string;
4
+ userExternalId?: string;
5
+ }
6
+ declare class MessageContentDto {
7
+ type: 'text' | 'image' | 'file';
8
+ text?: string;
9
+ mediaUrl?: string;
10
+ }
11
+ export declare class SunshinePostMessageRequest {
12
+ author: MessageAuthorDto;
13
+ content: MessageContentDto;
14
+ }
15
+ export {};
@@ -9,63 +9,57 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.SignUpBackofficeRequest = void 0;
12
+ exports.SunshinePostMessageRequest = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
- class SignUpBackofficeRequest {
14
+ const class_transformer_1 = require("class-transformer");
15
+ class MessageAuthorDto {
15
16
  }
16
- exports.SignUpBackofficeRequest = SignUpBackofficeRequest;
17
17
  __decorate([
18
18
  (0, class_validator_1.IsString)(),
19
19
  (0, class_validator_1.IsNotEmpty)(),
20
+ (0, class_validator_1.IsIn)(['user', 'business']),
20
21
  __metadata("design:type", String)
21
- ], SignUpBackofficeRequest.prototype, "name", void 0);
22
+ ], MessageAuthorDto.prototype, "type", void 0);
22
23
  __decorate([
23
24
  (0, class_validator_1.IsString)(),
24
- (0, class_validator_1.IsNotEmpty)(),
25
+ (0, class_validator_1.IsOptional)(),
25
26
  __metadata("design:type", String)
26
- ], SignUpBackofficeRequest.prototype, "phoneNumber", void 0);
27
+ ], MessageAuthorDto.prototype, "userId", void 0);
27
28
  __decorate([
28
29
  (0, class_validator_1.IsString)(),
29
- (0, class_validator_1.IsNotEmpty)(),
30
+ (0, class_validator_1.IsOptional)(),
30
31
  __metadata("design:type", String)
31
- ], SignUpBackofficeRequest.prototype, "countryOfBirth", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsBoolean)(),
34
- (0, class_validator_1.IsNotEmpty)(),
35
- __metadata("design:type", Boolean)
36
- ], SignUpBackofficeRequest.prototype, "MEX_DebitAccountWish", void 0);
37
- __decorate([
38
- (0, class_validator_1.IsBoolean)(),
39
- (0, class_validator_1.IsNotEmpty)(),
40
- __metadata("design:type", Boolean)
41
- ], SignUpBackofficeRequest.prototype, "USA_DebitAccountWish", void 0);
32
+ ], MessageAuthorDto.prototype, "userExternalId", void 0);
33
+ class MessageContentDto {
34
+ }
42
35
  __decorate([
43
36
  (0, class_validator_1.IsString)(),
44
37
  (0, class_validator_1.IsNotEmpty)(),
38
+ (0, class_validator_1.IsIn)(['text', 'image', 'file']),
45
39
  __metadata("design:type", String)
46
- ], SignUpBackofficeRequest.prototype, "countryOfDomicile", void 0);
40
+ ], MessageContentDto.prototype, "type", void 0);
47
41
  __decorate([
48
42
  (0, class_validator_1.IsString)(),
49
43
  (0, class_validator_1.IsOptional)(),
50
44
  __metadata("design:type", String)
51
- ], SignUpBackofficeRequest.prototype, "myReferralCode", void 0);
45
+ ], MessageContentDto.prototype, "text", void 0);
52
46
  __decorate([
53
47
  (0, class_validator_1.IsString)(),
54
48
  (0, class_validator_1.IsOptional)(),
55
49
  __metadata("design:type", String)
56
- ], SignUpBackofficeRequest.prototype, "referralCode", void 0);
57
- __decorate([
58
- (0, class_validator_1.IsString)(),
59
- (0, class_validator_1.IsOptional)(),
60
- __metadata("design:type", String)
61
- ], SignUpBackofficeRequest.prototype, "groupId", void 0);
50
+ ], MessageContentDto.prototype, "mediaUrl", void 0);
51
+ class SunshinePostMessageRequest {
52
+ }
53
+ exports.SunshinePostMessageRequest = SunshinePostMessageRequest;
62
54
  __decorate([
63
- (0, class_validator_1.IsBoolean)(),
55
+ (0, class_validator_1.ValidateNested)(),
56
+ (0, class_transformer_1.Type)(() => MessageAuthorDto),
64
57
  (0, class_validator_1.IsNotEmpty)(),
65
- __metadata("design:type", Boolean)
66
- ], SignUpBackofficeRequest.prototype, "isAgent", void 0);
58
+ __metadata("design:type", MessageAuthorDto)
59
+ ], SunshinePostMessageRequest.prototype, "author", void 0);
67
60
  __decorate([
68
- (0, class_validator_1.IsString)(),
69
- (0, class_validator_1.IsOptional)(),
70
- __metadata("design:type", String)
71
- ], SignUpBackofficeRequest.prototype, "agentGroupId", void 0);
61
+ (0, class_validator_1.ValidateNested)(),
62
+ (0, class_transformer_1.Type)(() => MessageContentDto),
63
+ (0, class_validator_1.IsNotEmpty)(),
64
+ __metadata("design:type", MessageContentDto)
65
+ ], SunshinePostMessageRequest.prototype, "content", void 0);
@@ -1,3 +1,9 @@
1
1
  export * from './interfaces/IZendeskWebhook';
2
2
  export * from './interfaces/INormalizedNotificationEvent';
3
3
  export * from './interfaces/ISunshineConversations';
4
+ export * from './interfaces/ISunshineProactiveResponses';
5
+ export * from './interfaces/IProactiveMessagingEnums';
6
+ export * from './dtos/SendProactiveMessageRequest';
7
+ export * from './dtos/SunshineCreateUserRequest';
8
+ export * from './dtos/SunshineCreateConversationRequest';
9
+ export * from './dtos/SunshinePostMessageRequest';
@@ -14,6 +14,15 @@ 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
+ // Interfaces existentes
17
18
  __exportStar(require("./interfaces/IZendeskWebhook"), exports);
18
19
  __exportStar(require("./interfaces/INormalizedNotificationEvent"), exports);
19
20
  __exportStar(require("./interfaces/ISunshineConversations"), exports);
21
+ // Nuevas interfaces para Proactive Messaging
22
+ __exportStar(require("./interfaces/ISunshineProactiveResponses"), exports);
23
+ __exportStar(require("./interfaces/IProactiveMessagingEnums"), exports);
24
+ // DTOs para Proactive Messaging
25
+ __exportStar(require("./dtos/SendProactiveMessageRequest"), exports);
26
+ __exportStar(require("./dtos/SunshineCreateUserRequest"), exports);
27
+ __exportStar(require("./dtos/SunshineCreateConversationRequest"), exports);
28
+ __exportStar(require("./dtos/SunshinePostMessageRequest"), exports);
@@ -0,0 +1,9 @@
1
+ export declare enum ProactiveMessagingErrorCode {
2
+ INVALID_DIRECTORY_ID = "INVALID_DIRECTORY_ID",
3
+ INVALID_MESSAGE = "INVALID_MESSAGE",
4
+ USER_CREATION_FAILED = "USER_CREATION_FAILED",
5
+ CONVERSATION_CREATION_FAILED = "CONVERSATION_CREATION_FAILED",
6
+ MESSAGE_SEND_FAILED = "MESSAGE_SEND_FAILED",
7
+ CREDENTIALS_NOT_FOUND = "CREDENTIALS_NOT_FOUND",
8
+ SUNSHINE_API_ERROR = "SUNSHINE_API_ERROR"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProactiveMessagingErrorCode = void 0;
4
+ var ProactiveMessagingErrorCode;
5
+ (function (ProactiveMessagingErrorCode) {
6
+ ProactiveMessagingErrorCode["INVALID_DIRECTORY_ID"] = "INVALID_DIRECTORY_ID";
7
+ ProactiveMessagingErrorCode["INVALID_MESSAGE"] = "INVALID_MESSAGE";
8
+ ProactiveMessagingErrorCode["USER_CREATION_FAILED"] = "USER_CREATION_FAILED";
9
+ ProactiveMessagingErrorCode["CONVERSATION_CREATION_FAILED"] = "CONVERSATION_CREATION_FAILED";
10
+ ProactiveMessagingErrorCode["MESSAGE_SEND_FAILED"] = "MESSAGE_SEND_FAILED";
11
+ ProactiveMessagingErrorCode["CREDENTIALS_NOT_FOUND"] = "CREDENTIALS_NOT_FOUND";
12
+ ProactiveMessagingErrorCode["SUNSHINE_API_ERROR"] = "SUNSHINE_API_ERROR";
13
+ })(ProactiveMessagingErrorCode || (exports.ProactiveMessagingErrorCode = ProactiveMessagingErrorCode = {}));
@@ -5,11 +5,15 @@ export interface ISunshineConversationParticipant {
5
5
  userExternalId?: string;
6
6
  lastRead?: string;
7
7
  }
8
+ export interface ISunshineUserProfile {
9
+ givenName?: string;
10
+ surname?: string;
11
+ email?: string;
12
+ locale?: string;
13
+ }
8
14
  export interface ISunshineUser {
9
15
  id: string;
10
16
  externalId?: string;
11
17
  signedUpAt?: string;
12
- profile?: {
13
- locale?: string;
14
- };
18
+ profile?: ISunshineUserProfile;
15
19
  }
@@ -0,0 +1,38 @@
1
+ import { ISunshineUser } from './ISunshineConversations';
2
+ export interface ISunshineUserResponse {
3
+ user: ISunshineUser | null;
4
+ }
5
+ export interface ISunshineConversation {
6
+ id: string;
7
+ type: string;
8
+ }
9
+ export interface ISunshineConversationsResponse {
10
+ conversations: ISunshineConversation[];
11
+ }
12
+ export interface ISunshineCreateConversationResponse {
13
+ conversation: ISunshineConversation;
14
+ }
15
+ export interface ISunshineMessageAuthor {
16
+ type: string;
17
+ userId?: string;
18
+ }
19
+ export interface ISunshineMessageContent {
20
+ type: string;
21
+ text?: string;
22
+ }
23
+ export interface ISunshineMessage {
24
+ id: string;
25
+ received: string;
26
+ author: ISunshineMessageAuthor;
27
+ content: ISunshineMessageContent;
28
+ }
29
+ export interface ISunshinePostMessageResponse {
30
+ messages: ISunshineMessage[];
31
+ }
32
+ export interface ISendProactiveMessageResponse {
33
+ success: boolean;
34
+ conversationId: string;
35
+ messageId: string;
36
+ userId: string;
37
+ isNewConversation: boolean;
38
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "2.1.45",
3
+ "version": "2.1.47",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
package/src/index.ts CHANGED
@@ -55,3 +55,4 @@ export * as PayrollBusiness from './payroll-business';
55
55
  export * as Event from './event';
56
56
  export * as NotificationWS from './notificationWS';
57
57
  export * as ZendeskMessaging from './zendeskMessaging';
58
+ export * as ReferralBusiness from './referral-business';
@@ -0,0 +1,5 @@
1
+ export enum AgentRoleEnum {
2
+ ADMIN = 'ADMIN',
3
+ AGENT = 'AGENT',
4
+ OWNER = 'OWNER',
5
+ }
@@ -0,0 +1,2 @@
1
+ //Enums
2
+ export * from './enums/AgentRoleEnum';
@@ -0,0 +1,15 @@
1
+ import { IsNotEmpty, IsOptional, IsString } from "class-validator";
2
+
3
+ export class SendProactiveMessageRequest {
4
+ @IsString()
5
+ @IsNotEmpty()
6
+ directoryId: string;
7
+
8
+ @IsString()
9
+ @IsNotEmpty()
10
+ message: string;
11
+
12
+ @IsString()
13
+ @IsOptional()
14
+ displayName?: string;
15
+ }
@@ -0,0 +1,28 @@
1
+ import { IsArray, IsBoolean, IsIn, IsNotEmpty, IsOptional, IsString, ValidateNested } from "class-validator";
2
+ import { Type } from "class-transformer";
3
+
4
+ class ConversationParticipantDto {
5
+ @IsString()
6
+ @IsOptional()
7
+ userId?: string;
8
+
9
+ @IsString()
10
+ @IsOptional()
11
+ userExternalId?: string;
12
+
13
+ @IsBoolean()
14
+ @IsOptional()
15
+ subscribeSDKClient?: boolean;
16
+ }
17
+
18
+ export class SunshineCreateConversationRequest {
19
+ @IsString()
20
+ @IsNotEmpty()
21
+ @IsIn(['personal', 'sdkGroup'])
22
+ type: 'personal' | 'sdkGroup';
23
+
24
+ @IsArray()
25
+ @ValidateNested({ each: true })
26
+ @Type(() => ConversationParticipantDto)
27
+ participants: ConversationParticipantDto[];
28
+ }
@@ -0,0 +1,27 @@
1
+ import { IsNotEmpty, IsOptional, IsString, ValidateNested } from "class-validator";
2
+ import { Type } from "class-transformer";
3
+
4
+ class SunshineUserProfileDto {
5
+ @IsString()
6
+ @IsOptional()
7
+ givenName?: string;
8
+
9
+ @IsString()
10
+ @IsOptional()
11
+ surname?: string;
12
+
13
+ @IsString()
14
+ @IsOptional()
15
+ email?: string;
16
+ }
17
+
18
+ export class SunshineCreateUserRequest {
19
+ @IsString()
20
+ @IsNotEmpty()
21
+ externalId: string;
22
+
23
+ @ValidateNested()
24
+ @Type(() => SunshineUserProfileDto)
25
+ @IsOptional()
26
+ profile?: SunshineUserProfileDto;
27
+ }
@@ -0,0 +1,44 @@
1
+ import { IsIn, IsNotEmpty, IsOptional, IsString, ValidateNested } from "class-validator";
2
+ import { Type } from "class-transformer";
3
+
4
+ class MessageAuthorDto {
5
+ @IsString()
6
+ @IsNotEmpty()
7
+ @IsIn(['user', 'business'])
8
+ type: 'user' | 'business';
9
+
10
+ @IsString()
11
+ @IsOptional()
12
+ userId?: string;
13
+
14
+ @IsString()
15
+ @IsOptional()
16
+ userExternalId?: string;
17
+ }
18
+
19
+ class MessageContentDto {
20
+ @IsString()
21
+ @IsNotEmpty()
22
+ @IsIn(['text', 'image', 'file'])
23
+ type: 'text' | 'image' | 'file';
24
+
25
+ @IsString()
26
+ @IsOptional()
27
+ text?: string;
28
+
29
+ @IsString()
30
+ @IsOptional()
31
+ mediaUrl?: string;
32
+ }
33
+
34
+ export class SunshinePostMessageRequest {
35
+ @ValidateNested()
36
+ @Type(() => MessageAuthorDto)
37
+ @IsNotEmpty()
38
+ author: MessageAuthorDto;
39
+
40
+ @ValidateNested()
41
+ @Type(() => MessageContentDto)
42
+ @IsNotEmpty()
43
+ content: MessageContentDto;
44
+ }
@@ -1,3 +1,14 @@
1
+ // Interfaces existentes
1
2
  export * from './interfaces/IZendeskWebhook';
2
3
  export * from './interfaces/INormalizedNotificationEvent';
3
4
  export * from './interfaces/ISunshineConversations';
5
+
6
+ // Nuevas interfaces para Proactive Messaging
7
+ export * from './interfaces/ISunshineProactiveResponses';
8
+ export * from './interfaces/IProactiveMessagingEnums';
9
+
10
+ // DTOs para Proactive Messaging
11
+ export * from './dtos/SendProactiveMessageRequest';
12
+ export * from './dtos/SunshineCreateUserRequest';
13
+ export * from './dtos/SunshineCreateConversationRequest';
14
+ export * from './dtos/SunshinePostMessageRequest';
@@ -0,0 +1,9 @@
1
+ export enum ProactiveMessagingErrorCode {
2
+ INVALID_DIRECTORY_ID = 'INVALID_DIRECTORY_ID',
3
+ INVALID_MESSAGE = 'INVALID_MESSAGE',
4
+ USER_CREATION_FAILED = 'USER_CREATION_FAILED',
5
+ CONVERSATION_CREATION_FAILED = 'CONVERSATION_CREATION_FAILED',
6
+ MESSAGE_SEND_FAILED = 'MESSAGE_SEND_FAILED',
7
+ CREDENTIALS_NOT_FOUND = 'CREDENTIALS_NOT_FOUND',
8
+ SUNSHINE_API_ERROR = 'SUNSHINE_API_ERROR'
9
+ }
@@ -6,9 +6,16 @@ export interface ISunshineConversationParticipant {
6
6
  lastRead?: string;
7
7
  }
8
8
 
9
+ export interface ISunshineUserProfile {
10
+ givenName?: string;
11
+ surname?: string;
12
+ email?: string;
13
+ locale?: string;
14
+ }
15
+
9
16
  export interface ISunshineUser {
10
17
  id: string;
11
18
  externalId?: string;
12
19
  signedUpAt?: string;
13
- profile?: { locale?: string };
20
+ profile?: ISunshineUserProfile;
14
21
  }
@@ -0,0 +1,47 @@
1
+ import { ISunshineUser } from './ISunshineConversations';
2
+
3
+ export interface ISunshineUserResponse {
4
+ user: ISunshineUser | null;
5
+ }
6
+
7
+ export interface ISunshineConversation {
8
+ id: string;
9
+ type: string;
10
+ }
11
+
12
+ export interface ISunshineConversationsResponse {
13
+ conversations: ISunshineConversation[];
14
+ }
15
+
16
+ export interface ISunshineCreateConversationResponse {
17
+ conversation: ISunshineConversation;
18
+ }
19
+
20
+ export interface ISunshineMessageAuthor {
21
+ type: string;
22
+ userId?: string;
23
+ }
24
+
25
+ export interface ISunshineMessageContent {
26
+ type: string;
27
+ text?: string;
28
+ }
29
+
30
+ export interface ISunshineMessage {
31
+ id: string;
32
+ received: string;
33
+ author: ISunshineMessageAuthor;
34
+ content: ISunshineMessageContent;
35
+ }
36
+
37
+ export interface ISunshinePostMessageResponse {
38
+ messages: ISunshineMessage[];
39
+ }
40
+
41
+ export interface ISendProactiveMessageResponse {
42
+ success: boolean;
43
+ conversationId: string;
44
+ messageId: string;
45
+ userId: string;
46
+ isNewConversation: boolean;
47
+ }
@@ -1,4 +0,0 @@
1
- export declare class ExternalAccountType {
2
- id?: number;
3
- name?: string;
4
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExternalAccountType = void 0;
4
- class ExternalAccountType {
5
- }
6
- exports.ExternalAccountType = ExternalAccountType;
@@ -1,6 +0,0 @@
1
- import { DocumentSideEnum } from "../../identity";
2
- export declare class CentralPaymentsDocumentImages {
3
- side: DocumentSideEnum;
4
- url: string;
5
- extension: string;
6
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CentralPaymentsDocumentImages = void 0;
4
- class CentralPaymentsDocumentImages {
5
- }
6
- exports.CentralPaymentsDocumentImages = CentralPaymentsDocumentImages;
@@ -1,6 +0,0 @@
1
- import { IdentificationDocument } from "../../identity";
2
- import { CentralPaymentsDocumentImages } from "./CentralPaymentsDocumentImages";
3
- export declare class CentralPaymentsDocumentUploadRequest {
4
- documentInfo: IdentificationDocument;
5
- documentImages: CentralPaymentsDocumentImages[];
6
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CentralPaymentsDocumentUploadRequest = void 0;
4
- class CentralPaymentsDocumentUploadRequest {
5
- }
6
- exports.CentralPaymentsDocumentUploadRequest = CentralPaymentsDocumentUploadRequest;
@@ -1,13 +0,0 @@
1
- export declare class SignUpBackofficeRequest {
2
- name: string;
3
- phoneNumber: string;
4
- countryOfBirth: string;
5
- MEX_DebitAccountWish: boolean;
6
- USA_DebitAccountWish: boolean;
7
- countryOfDomicile: string;
8
- myReferralCode?: string;
9
- referralCode?: string;
10
- groupId?: string;
11
- isAgent: boolean;
12
- agentGroupId?: string;
13
- }
@@ -1,28 +0,0 @@
1
- import { Company } from "../../company";
2
- import { Provider } from "../../provider";
3
- import { ServiceTypeEnum } from "../../services";
4
- import { ServiceRecurrenceEnum } from "../../services/enums/ServiceRecurrenceEnum";
5
- export declare class GetPriceListDirectoriesResponse {
6
- serviceId: string;
7
- company: Company;
8
- provider: Provider;
9
- type: ServiceTypeEnum;
10
- basePrice: number;
11
- recurrence: ServiceRecurrenceEnum;
12
- currencyId: string;
13
- fees: any;
14
- taxes: any;
15
- globalDiscounts: {
16
- discountType: string;
17
- discountValue: number;
18
- }[];
19
- directories: {
20
- directoryId: string;
21
- appliedDiscounts: {
22
- discountType: string;
23
- discountValue: number;
24
- source: string;
25
- referenceId: string;
26
- }[];
27
- }[];
28
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetPriceListDirectoriesResponse = void 0;
4
- class GetPriceListDirectoriesResponse {
5
- }
6
- exports.GetPriceListDirectoriesResponse = GetPriceListDirectoriesResponse;
@@ -1,4 +0,0 @@
1
- export declare class GetServiceListAppResponse {
2
- items: any[];
3
- index: string | null;
4
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetServiceListAppResponse = void 0;
4
- class GetServiceListAppResponse {
5
- }
6
- exports.GetServiceListAppResponse = GetServiceListAppResponse;
@@ -1,4 +0,0 @@
1
- export declare class GetServiceMembershipListAResponse {
2
- items: any[];
3
- index: string | null;
4
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetServiceMembershipListAResponse = void 0;
4
- class GetServiceMembershipListAResponse {
5
- }
6
- exports.GetServiceMembershipListAResponse = GetServiceMembershipListAResponse;
@@ -1,5 +0,0 @@
1
- export declare enum ServiceProviderEnum {
2
- CP = "CP",
3
- TERN = "TERN",
4
- PAGOCONFIADO = "PAGOCONFIADO"
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceProviderEnum = void 0;
4
- var ServiceProviderEnum;
5
- (function (ServiceProviderEnum) {
6
- ServiceProviderEnum["CP"] = "CP";
7
- ServiceProviderEnum["TERN"] = "TERN";
8
- ServiceProviderEnum["PAGOCONFIADO"] = "PAGOCONFIADO";
9
- })(ServiceProviderEnum || (exports.ServiceProviderEnum = ServiceProviderEnum = {}));