@23blocks/block-crm 3.1.1 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +84 -25
- package/dist/src/lib/mappers/account-document.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/contact-document.mapper.d.ts +4 -0
- package/dist/src/lib/mappers/contact-document.mapper.d.ts.map +1 -0
- package/dist/src/lib/mappers/index.d.ts +1 -0
- package/dist/src/lib/mappers/index.d.ts.map +1 -1
- package/dist/src/lib/types/account-document.d.ts +33 -0
- package/dist/src/lib/types/account-document.d.ts.map +1 -1
- package/dist/src/lib/types/contact-document.d.ts +53 -0
- package/dist/src/lib/types/contact-document.d.ts.map +1 -0
- package/dist/src/lib/types/index.d.ts +1 -0
- package/dist/src/lib/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -78,7 +78,7 @@ const accountMapper = {
|
|
|
78
78
|
type: 'Account',
|
|
79
79
|
map: (resource)=>({
|
|
80
80
|
id: resource.id,
|
|
81
|
-
uniqueId: parseString(resource.attributes['unique_id'])
|
|
81
|
+
uniqueId: parseString(resource.attributes['unique_id']),
|
|
82
82
|
createdAt: parseDate(resource.attributes['created_at']) || new Date(),
|
|
83
83
|
updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
|
|
84
84
|
code: parseString(resource.attributes['code']) || '',
|
|
@@ -98,7 +98,7 @@ const accountDetailMapper = {
|
|
|
98
98
|
type: 'AccountDetail',
|
|
99
99
|
map: (resource)=>({
|
|
100
100
|
id: resource.id,
|
|
101
|
-
uniqueId: parseString(resource.attributes['unique_id'])
|
|
101
|
+
uniqueId: parseString(resource.attributes['unique_id']),
|
|
102
102
|
createdAt: parseDate(resource.attributes['created_at']) || new Date(),
|
|
103
103
|
updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
|
|
104
104
|
accountUniqueId: parseString(resource.attributes['account_unique_id']) || '',
|
|
@@ -199,7 +199,7 @@ const contactMapper = {
|
|
|
199
199
|
type: 'Contact',
|
|
200
200
|
map: (resource)=>({
|
|
201
201
|
id: resource.id,
|
|
202
|
-
uniqueId: parseString(resource.attributes['unique_id'])
|
|
202
|
+
uniqueId: parseString(resource.attributes['unique_id']),
|
|
203
203
|
createdAt: parseDate(resource.attributes['created_at']) || new Date(),
|
|
204
204
|
updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
|
|
205
205
|
firstName: parseString(resource.attributes['first_name']) || '',
|
|
@@ -224,7 +224,7 @@ const contactProfileMapper = {
|
|
|
224
224
|
type: 'ContactProfile',
|
|
225
225
|
map: (resource)=>({
|
|
226
226
|
id: resource.id,
|
|
227
|
-
uniqueId: parseString(resource.attributes['unique_id'])
|
|
227
|
+
uniqueId: parseString(resource.attributes['unique_id']),
|
|
228
228
|
createdAt: parseDate(resource.attributes['created_at']) || new Date(),
|
|
229
229
|
updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
|
|
230
230
|
contactUniqueId: parseString(resource.attributes['contact_unique_id']) || '',
|
|
@@ -339,7 +339,7 @@ const contactEventMapper = {
|
|
|
339
339
|
const attrs = resource.attributes || {};
|
|
340
340
|
return {
|
|
341
341
|
id: resource.id,
|
|
342
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
342
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
343
343
|
contactUniqueId: parseString(attrs['contact_unique_id']),
|
|
344
344
|
userUniqueId: parseString(attrs['user_unique_id']),
|
|
345
345
|
eventType: parseString(attrs['event_type']),
|
|
@@ -494,7 +494,7 @@ const leadMapper = {
|
|
|
494
494
|
type: 'Lead',
|
|
495
495
|
map: (resource)=>({
|
|
496
496
|
id: resource.id,
|
|
497
|
-
uniqueId: parseString(resource.attributes['unique_id'])
|
|
497
|
+
uniqueId: parseString(resource.attributes['unique_id']),
|
|
498
498
|
createdAt: parseDate(resource.attributes['created_at']) || new Date(),
|
|
499
499
|
updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
|
|
500
500
|
firstName: parseString(resource.attributes['first_name']) || '',
|
|
@@ -625,7 +625,7 @@ const leadFollowMapper = {
|
|
|
625
625
|
const attrs = resource.attributes || {};
|
|
626
626
|
return {
|
|
627
627
|
id: resource.id,
|
|
628
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
628
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
629
629
|
leadUniqueId: parseString(attrs['lead_unique_id']) || '',
|
|
630
630
|
userUniqueId: parseString(attrs['user_unique_id']),
|
|
631
631
|
followType: parseString(attrs['follow_type']),
|
|
@@ -698,7 +698,7 @@ const opportunityMapper = {
|
|
|
698
698
|
type: 'Opportunity',
|
|
699
699
|
map: (resource)=>({
|
|
700
700
|
id: resource.id,
|
|
701
|
-
uniqueId: parseString(resource.attributes['unique_id'])
|
|
701
|
+
uniqueId: parseString(resource.attributes['unique_id']),
|
|
702
702
|
createdAt: parseDate(resource.attributes['created_at']) || new Date(),
|
|
703
703
|
updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
|
|
704
704
|
accountUniqueId: parseString(resource.attributes['account_unique_id']),
|
|
@@ -822,7 +822,7 @@ const meetingMapper = {
|
|
|
822
822
|
type: 'Meeting',
|
|
823
823
|
map: (resource)=>({
|
|
824
824
|
id: resource.id,
|
|
825
|
-
uniqueId: parseString(resource.attributes['unique_id'])
|
|
825
|
+
uniqueId: parseString(resource.attributes['unique_id']),
|
|
826
826
|
createdAt: parseDate(resource.attributes['created_at']) || new Date(),
|
|
827
827
|
updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
|
|
828
828
|
code: parseString(resource.attributes['code']) || '',
|
|
@@ -955,7 +955,7 @@ const meetingParticipantMapper = {
|
|
|
955
955
|
const attrs = resource.attributes || {};
|
|
956
956
|
return {
|
|
957
957
|
id: resource.id,
|
|
958
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
958
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
959
959
|
meetingUniqueId: parseString(attrs['meeting_unique_id']) || '',
|
|
960
960
|
contactUniqueId: parseString(attrs['contact_unique_id']),
|
|
961
961
|
userUniqueId: parseString(attrs['user_unique_id']),
|
|
@@ -1016,7 +1016,7 @@ const meetingBillingMapper = {
|
|
|
1016
1016
|
const attrs = resource.attributes || {};
|
|
1017
1017
|
return {
|
|
1018
1018
|
id: resource.id,
|
|
1019
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1019
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1020
1020
|
meetingUniqueId: parseString(attrs['meeting_unique_id']) || '',
|
|
1021
1021
|
participantUniqueId: parseString(attrs['participant_unique_id']),
|
|
1022
1022
|
participantEmail: parseString(attrs['participant_email']),
|
|
@@ -1127,7 +1127,7 @@ const quoteMapper = {
|
|
|
1127
1127
|
type: 'Quote',
|
|
1128
1128
|
map: (resource)=>({
|
|
1129
1129
|
id: resource.id,
|
|
1130
|
-
uniqueId: parseString(resource.attributes['unique_id'])
|
|
1130
|
+
uniqueId: parseString(resource.attributes['unique_id']),
|
|
1131
1131
|
createdAt: parseDate(resource.attributes['created_at']) || new Date(),
|
|
1132
1132
|
updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
|
|
1133
1133
|
accountUniqueId: parseString(resource.attributes['account_unique_id']),
|
|
@@ -1253,7 +1253,7 @@ const subscriberMapper = {
|
|
|
1253
1253
|
const attrs = resource.attributes || {};
|
|
1254
1254
|
return {
|
|
1255
1255
|
id: resource.id,
|
|
1256
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1256
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1257
1257
|
email: parseString(attrs['email']) || '',
|
|
1258
1258
|
firstName: parseString(attrs['first_name']),
|
|
1259
1259
|
lastName: parseString(attrs['last_name']),
|
|
@@ -1332,7 +1332,7 @@ const referralMapper = {
|
|
|
1332
1332
|
const attrs = resource.attributes || {};
|
|
1333
1333
|
return {
|
|
1334
1334
|
id: resource.id,
|
|
1335
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1335
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1336
1336
|
referrerUniqueId: parseString(attrs['referrer_unique_id']),
|
|
1337
1337
|
referredUniqueId: parseString(attrs['referred_unique_id']),
|
|
1338
1338
|
referralCode: parseString(attrs['referral_code']),
|
|
@@ -1402,7 +1402,7 @@ const touchMapper = {
|
|
|
1402
1402
|
const attrs = resource.attributes || {};
|
|
1403
1403
|
return {
|
|
1404
1404
|
id: resource.id,
|
|
1405
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1405
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1406
1406
|
contactUniqueId: parseString(attrs['contact_unique_id']),
|
|
1407
1407
|
userUniqueId: parseString(attrs['user_unique_id']),
|
|
1408
1408
|
touchType: parseString(attrs['touch_type']),
|
|
@@ -1485,7 +1485,7 @@ const categoryMapper = {
|
|
|
1485
1485
|
const attrs = resource.attributes || {};
|
|
1486
1486
|
return {
|
|
1487
1487
|
id: resource.id,
|
|
1488
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1488
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1489
1489
|
name: parseString(attrs['name']) || '',
|
|
1490
1490
|
code: parseString(attrs['code']),
|
|
1491
1491
|
description: parseString(attrs['description']),
|
|
@@ -1507,7 +1507,7 @@ const accountCategoryMapper = {
|
|
|
1507
1507
|
const attrs = resource.attributes || {};
|
|
1508
1508
|
return {
|
|
1509
1509
|
id: resource.id,
|
|
1510
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1510
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1511
1511
|
accountUniqueId: parseString(attrs['account_unique_id']) || '',
|
|
1512
1512
|
categoryUniqueId: parseString(attrs['category_unique_id']) || '',
|
|
1513
1513
|
order: parseOptionalNumber(attrs['order']),
|
|
@@ -1582,7 +1582,7 @@ const calendarAccountMapper = {
|
|
|
1582
1582
|
const attrs = resource.attributes || {};
|
|
1583
1583
|
return {
|
|
1584
1584
|
id: resource.id,
|
|
1585
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1585
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1586
1586
|
userUniqueId: parseString(attrs['user_unique_id']) || '',
|
|
1587
1587
|
provider: parseString(attrs['provider']) || '',
|
|
1588
1588
|
email: parseString(attrs['email']),
|
|
@@ -1688,7 +1688,7 @@ const busyBlockMapper = {
|
|
|
1688
1688
|
const attrs = resource.attributes || {};
|
|
1689
1689
|
return {
|
|
1690
1690
|
id: resource.id,
|
|
1691
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1691
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1692
1692
|
userUniqueId: parseString(attrs['user_unique_id']) || '',
|
|
1693
1693
|
title: parseString(attrs['title']),
|
|
1694
1694
|
description: parseString(attrs['description']),
|
|
@@ -1749,7 +1749,7 @@ const icsTokenMapper = {
|
|
|
1749
1749
|
const attrs = resource.attributes || {};
|
|
1750
1750
|
return {
|
|
1751
1751
|
id: resource.id,
|
|
1752
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1752
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1753
1753
|
userUniqueId: parseString(attrs['user_unique_id']) || '',
|
|
1754
1754
|
token: parseString(attrs['token']) || '',
|
|
1755
1755
|
name: parseString(attrs['name']),
|
|
@@ -1804,7 +1804,7 @@ const zoomMeetingMapper = {
|
|
|
1804
1804
|
const attrs = resource.attributes || {};
|
|
1805
1805
|
return {
|
|
1806
1806
|
id: resource.id,
|
|
1807
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1807
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1808
1808
|
meetingUniqueId: parseString(attrs['meeting_unique_id']) || '',
|
|
1809
1809
|
userUniqueId: parseString(attrs['user_unique_id']) || '',
|
|
1810
1810
|
zoomMeetingId: parseString(attrs['zoom_meeting_id']),
|
|
@@ -1885,7 +1885,7 @@ const zoomHostMapper = {
|
|
|
1885
1885
|
const attrs = resource.attributes || {};
|
|
1886
1886
|
return {
|
|
1887
1887
|
id: resource.id,
|
|
1888
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
1888
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
1889
1889
|
userUniqueId: parseString(attrs['user_unique_id']),
|
|
1890
1890
|
zoomUserId: parseString(attrs['zoom_user_id']),
|
|
1891
1891
|
email: parseString(attrs['email']),
|
|
@@ -2328,13 +2328,22 @@ const crmBlockMetadata = {
|
|
|
2328
2328
|
]
|
|
2329
2329
|
};
|
|
2330
2330
|
|
|
2331
|
+
/**
|
|
2332
|
+
* Parse document category from API response
|
|
2333
|
+
*/ function parseDocumentCategory$1(value) {
|
|
2334
|
+
const category = parseString(value);
|
|
2335
|
+
if (category === 'license' || category === 'certification' || category === 'insurance' || category === 'credential') {
|
|
2336
|
+
return category;
|
|
2337
|
+
}
|
|
2338
|
+
return undefined;
|
|
2339
|
+
}
|
|
2331
2340
|
const accountDocumentMapper = {
|
|
2332
2341
|
type: 'account_document',
|
|
2333
2342
|
map (resource) {
|
|
2334
2343
|
const attrs = resource.attributes || {};
|
|
2335
2344
|
return {
|
|
2336
2345
|
id: resource.id,
|
|
2337
|
-
uniqueId: parseString(attrs['unique_id'])
|
|
2346
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
2338
2347
|
accountUniqueId: parseString(attrs['account_unique_id']) || '',
|
|
2339
2348
|
name: parseString(attrs['name']) || '',
|
|
2340
2349
|
originalName: parseString(attrs['original_name']),
|
|
@@ -2346,9 +2355,59 @@ const accountDocumentMapper = {
|
|
|
2346
2355
|
enabled: parseBoolean(attrs['enabled']),
|
|
2347
2356
|
payload: attrs['payload'],
|
|
2348
2357
|
createdAt: parseDate(attrs['created_at']),
|
|
2349
|
-
updatedAt: parseDate(attrs['updated_at'])
|
|
2358
|
+
updatedAt: parseDate(attrs['updated_at']),
|
|
2359
|
+
// Category fields
|
|
2360
|
+
categoryName: parseDocumentCategory$1(attrs['category_name']),
|
|
2361
|
+
categoryUniqueId: parseString(attrs['category_unique_id']),
|
|
2362
|
+
// Expiration tracking fields
|
|
2363
|
+
isExpirable: attrs['is_expirable'] !== undefined ? parseBoolean(attrs['is_expirable']) : undefined,
|
|
2364
|
+
expiresAt: parseDate(attrs['expires_at']),
|
|
2365
|
+
issuedAt: parseDate(attrs['issued_at']),
|
|
2366
|
+
issuedBy: parseString(attrs['issued_by']),
|
|
2367
|
+
metadata: attrs['metadata']
|
|
2368
|
+
};
|
|
2369
|
+
}
|
|
2370
|
+
};
|
|
2371
|
+
|
|
2372
|
+
/**
|
|
2373
|
+
* Parse document category from API response
|
|
2374
|
+
*/ function parseDocumentCategory(value) {
|
|
2375
|
+
const category = parseString(value);
|
|
2376
|
+
if (category === 'license' || category === 'certification' || category === 'insurance' || category === 'credential') {
|
|
2377
|
+
return category;
|
|
2378
|
+
}
|
|
2379
|
+
return undefined;
|
|
2380
|
+
}
|
|
2381
|
+
const contactDocumentMapper = {
|
|
2382
|
+
type: 'contact_document',
|
|
2383
|
+
map (resource) {
|
|
2384
|
+
const attrs = resource.attributes || {};
|
|
2385
|
+
return {
|
|
2386
|
+
id: resource.id,
|
|
2387
|
+
uniqueId: parseString(attrs['unique_id']),
|
|
2388
|
+
contactUniqueId: parseString(attrs['contact_unique_id']) || '',
|
|
2389
|
+
name: parseString(attrs['name']) || '',
|
|
2390
|
+
originalName: parseString(attrs['original_name']),
|
|
2391
|
+
description: parseString(attrs['description']),
|
|
2392
|
+
fileType: parseString(attrs['file_type']),
|
|
2393
|
+
fileSize: parseOptionalNumber(attrs['file_size']),
|
|
2394
|
+
url: parseString(attrs['url']),
|
|
2395
|
+
status: parseStatus(attrs['status']),
|
|
2396
|
+
enabled: parseBoolean(attrs['enabled']),
|
|
2397
|
+
payload: attrs['payload'],
|
|
2398
|
+
createdAt: parseDate(attrs['created_at']),
|
|
2399
|
+
updatedAt: parseDate(attrs['updated_at']),
|
|
2400
|
+
// Category fields
|
|
2401
|
+
categoryName: parseDocumentCategory(attrs['category_name']),
|
|
2402
|
+
categoryUniqueId: parseString(attrs['category_unique_id']),
|
|
2403
|
+
// Expiration tracking fields
|
|
2404
|
+
isExpirable: attrs['is_expirable'] !== undefined ? parseBoolean(attrs['is_expirable']) : undefined,
|
|
2405
|
+
expiresAt: parseDate(attrs['expires_at']),
|
|
2406
|
+
issuedAt: parseDate(attrs['issued_at']),
|
|
2407
|
+
issuedBy: parseString(attrs['issued_by']),
|
|
2408
|
+
metadata: attrs['metadata']
|
|
2350
2409
|
};
|
|
2351
2410
|
}
|
|
2352
2411
|
};
|
|
2353
2412
|
|
|
2354
|
-
export { accountCategoryMapper, accountDetailMapper, accountDocumentMapper, accountMapper, busyBlockMapper, calendarAccountMapper, categoryMapper, contactEventMapper, contactMapper, contactProfileMapper, createAccountsService, createBillingReportsService, createBusyBlocksService, createCalendarAccountsService, createCalendarSyncService, createCategoriesService, createCommunicationsService, createContactEventsService, createContactsService, createCrmBlock, createCrmMailTemplatesService, createCrmUsersService, createIcsTokensService, createLeadFollowsService, createLeadsService, createMeetingBillingsService, createMeetingParticipantsService, createMeetingsService, createOpportunitiesService, createQuotesService, createReferralsService, createSubscribersService, createTouchesService, createZoomHostsService, createZoomMeetingsService, crmBlockMetadata, crmMailTemplateMapper, crmUserMapper, icsTokenMapper, leadFollowMapper, leadMapper, meetingBillingMapper, meetingMapper, meetingParticipantMapper, opportunityMapper, parseBoolean, parseDate, parseNumber, parseOptionalNumber, parseStatus, parseString, parseStringArray, quoteMapper, referralMapper, subscriberMapper, touchMapper, zoomHostMapper, zoomMeetingMapper };
|
|
2413
|
+
export { accountCategoryMapper, accountDetailMapper, accountDocumentMapper, accountMapper, busyBlockMapper, calendarAccountMapper, categoryMapper, contactDocumentMapper, contactEventMapper, contactMapper, contactProfileMapper, createAccountsService, createBillingReportsService, createBusyBlocksService, createCalendarAccountsService, createCalendarSyncService, createCategoriesService, createCommunicationsService, createContactEventsService, createContactsService, createCrmBlock, createCrmMailTemplatesService, createCrmUsersService, createIcsTokensService, createLeadFollowsService, createLeadsService, createMeetingBillingsService, createMeetingParticipantsService, createMeetingsService, createOpportunitiesService, createQuotesService, createReferralsService, createSubscribersService, createTouchesService, createZoomHostsService, createZoomMeetingsService, crmBlockMetadata, crmMailTemplateMapper, crmUserMapper, icsTokenMapper, leadFollowMapper, leadMapper, meetingBillingMapper, meetingMapper, meetingParticipantMapper, opportunityMapper, parseBoolean, parseDate, parseNumber, parseOptionalNumber, parseStatus, parseString, parseStringArray, quoteMapper, referralMapper, subscriberMapper, touchMapper, zoomHostMapper, zoomMeetingMapper };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-document.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/account-document.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"account-document.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/account-document.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,2BAA2B,CAAC;AAcnF,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,eAAe,CA8BhE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-document.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/contact-document.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAejE,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,eAAe,CA8BhE,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './account.mapper';
|
|
2
2
|
export * from './account-document.mapper';
|
|
3
3
|
export * from './contact.mapper';
|
|
4
|
+
export * from './contact-document.mapper';
|
|
4
5
|
export * from './contact-event.mapper';
|
|
5
6
|
export * from './lead.mapper';
|
|
6
7
|
export * from './lead-follow.mapper';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { IdentityCore, EntityStatus } from '@23blocks/contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Document category types
|
|
4
|
+
*/
|
|
5
|
+
export type DocumentCategory = 'license' | 'certification' | 'insurance' | 'credential';
|
|
6
|
+
/**
|
|
7
|
+
* Document attached to an account
|
|
8
|
+
*/
|
|
2
9
|
export interface AccountDocument extends IdentityCore {
|
|
3
10
|
accountUniqueId: string;
|
|
4
11
|
name: string;
|
|
@@ -10,6 +17,20 @@ export interface AccountDocument extends IdentityCore {
|
|
|
10
17
|
status: EntityStatus;
|
|
11
18
|
enabled: boolean;
|
|
12
19
|
payload?: Record<string, unknown>;
|
|
20
|
+
/** Document type category: 'license', 'certification', 'insurance', 'credential' */
|
|
21
|
+
categoryName?: DocumentCategory;
|
|
22
|
+
/** Link to Category record */
|
|
23
|
+
categoryUniqueId?: string;
|
|
24
|
+
/** Whether document can expire (default: false) */
|
|
25
|
+
isExpirable?: boolean;
|
|
26
|
+
/** Expiration date */
|
|
27
|
+
expiresAt?: Date;
|
|
28
|
+
/** Issue date */
|
|
29
|
+
issuedAt?: Date;
|
|
30
|
+
/** Issuing authority name */
|
|
31
|
+
issuedBy?: string;
|
|
32
|
+
/** Flexible metadata for additional data */
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
13
34
|
}
|
|
14
35
|
export interface AddAccountDocumentRequest {
|
|
15
36
|
name: string;
|
|
@@ -19,6 +40,18 @@ export interface AddAccountDocumentRequest {
|
|
|
19
40
|
fileSize?: number;
|
|
20
41
|
url: string;
|
|
21
42
|
payload?: Record<string, unknown>;
|
|
43
|
+
categoryName?: DocumentCategory;
|
|
44
|
+
categoryUniqueId?: string;
|
|
45
|
+
/** Whether document can expire (default: false) */
|
|
46
|
+
isExpirable?: boolean;
|
|
47
|
+
/** Expiration date (ISO 8601) */
|
|
48
|
+
expiresAt?: string;
|
|
49
|
+
/** Issue date (ISO 8601) */
|
|
50
|
+
issuedAt?: string;
|
|
51
|
+
/** Issuing authority name */
|
|
52
|
+
issuedBy?: string;
|
|
53
|
+
/** Flexible metadata for additional data */
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
22
55
|
}
|
|
23
56
|
export interface PresignDocumentRequest {
|
|
24
57
|
filename: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-document.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/account-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEtE,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"account-document.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/account-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,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|
+
import type { DocumentCategory } from './account-document';
|
|
3
|
+
/**
|
|
4
|
+
* Document attached to a contact
|
|
5
|
+
*/
|
|
6
|
+
export interface ContactDocument extends IdentityCore {
|
|
7
|
+
contactUniqueId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
originalName?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
fileType?: string;
|
|
12
|
+
fileSize?: number;
|
|
13
|
+
url?: string;
|
|
14
|
+
status: EntityStatus;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
payload?: Record<string, unknown>;
|
|
17
|
+
/** Document type category: 'license', 'certification', 'insurance', 'credential' */
|
|
18
|
+
categoryName?: DocumentCategory;
|
|
19
|
+
/** Link to Category record */
|
|
20
|
+
categoryUniqueId?: string;
|
|
21
|
+
/** Whether document can expire (default: false) */
|
|
22
|
+
isExpirable?: boolean;
|
|
23
|
+
/** Expiration date */
|
|
24
|
+
expiresAt?: Date;
|
|
25
|
+
/** Issue date */
|
|
26
|
+
issuedAt?: Date;
|
|
27
|
+
/** Issuing authority name */
|
|
28
|
+
issuedBy?: string;
|
|
29
|
+
/** Flexible metadata for additional data */
|
|
30
|
+
metadata?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
export interface AddContactDocumentRequest {
|
|
33
|
+
name: string;
|
|
34
|
+
originalName?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
fileType?: string;
|
|
37
|
+
fileSize?: number;
|
|
38
|
+
url: string;
|
|
39
|
+
payload?: Record<string, unknown>;
|
|
40
|
+
categoryName?: DocumentCategory;
|
|
41
|
+
categoryUniqueId?: string;
|
|
42
|
+
/** Whether document can expire (default: false) */
|
|
43
|
+
isExpirable?: boolean;
|
|
44
|
+
/** Expiration date (ISO 8601) */
|
|
45
|
+
expiresAt?: string;
|
|
46
|
+
/** Issue date (ISO 8601) */
|
|
47
|
+
issuedAt?: string;
|
|
48
|
+
/** Issuing authority name */
|
|
49
|
+
issuedBy?: string;
|
|
50
|
+
/** Flexible metadata for additional data */
|
|
51
|
+
metadata?: Record<string, unknown>;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=contact-document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-document.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/contact-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGlC,oFAAoF;IACpF,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,8BAA8B;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,mDAAmD;IACnD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sBAAsB;IACtB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,iBAAiB;IACjB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAGD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAA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