@bisondesk/core-sdk 1.0.600 → 1.0.601

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.
@@ -11,6 +11,11 @@ export declare enum ActivityActions {
11
11
  DELETE = "delete",
12
12
  EDIT = "edit"
13
13
  }
14
+ export type ActivityContact = {
15
+ id?: string;
16
+ phoneNumber?: string;
17
+ email?: string;
18
+ };
14
19
  export interface BaseActivity<Meta = ActivityV2Meta> {
15
20
  type: ActivityType;
16
21
  businessEntityId: BusinessEntityIds;
@@ -18,6 +23,7 @@ export interface BaseActivity<Meta = ActivityV2Meta> {
18
23
  description?: string;
19
24
  readonly?: boolean;
20
25
  meta?: Meta;
26
+ contacts?: ActivityContact[];
21
27
  }
22
28
  export type NewActivity<Meta = ActivityV2Meta> = BaseActivity<Meta> & {
23
29
  id?: undefined;
@@ -39,6 +45,7 @@ export type ActivityUpdate = {
39
45
  description?: string;
40
46
  type?: ActivityType;
41
47
  activityAt?: string;
48
+ contacts?: ActivityContact[];
42
49
  };
43
50
  export type ActivityEvent = BaseEvent & (ActivityCreateEvent | ActivityUpdateEvent | ActivityDeleteEvent);
44
51
  type BaseActivityEvent = {
@@ -1 +1 @@
1
- {"version":3,"file":"activities.d.ts","sourceRoot":"/","sources":["types/activities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ;AAED,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,MAAM,WAAW,YAAY,CAAC,IAAI,GAAG,cAAc;IACjD,IAAI,EAAE,YAAY,CAAC;IACnB,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,QAAQ,EAAE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AAW,CAAA;AACb,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,gCAAa,CAAA;AACf,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["import { BusinessEntityIds } from '../constants.js';\nimport { BaseEvent } from './internal-events.js';\n\nexport enum ActivityType {\n CALL = 'call',\n MEETING = 'meeting',\n EMAIL = 'email',\n CHAT = 'chat',\n SMS = 'sms',\n}\n\nexport enum ActivityActions {\n DELETE = 'delete',\n EDIT = 'edit',\n}\n\nexport interface BaseActivity<Meta = ActivityV2Meta> {\n type: ActivityType;\n businessEntityId: BusinessEntityIds;\n recordId: string;\n description?: string;\n readonly?: boolean;\n meta?: Meta;\n}\n\nexport type NewActivity<Meta = ActivityV2Meta> = BaseActivity<Meta> & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n activityAt?: string;\n};\n\nexport type Activity<Meta = ActivityV2Meta> = BaseActivity<Meta> & {\n id: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n activityAt: string;\n};\n\nexport type ActivityUpdate = {\n description?: string;\n type?: ActivityType;\n activityAt?: string;\n};\n\nexport type ActivityEvent = BaseEvent &\n (ActivityCreateEvent | ActivityUpdateEvent | ActivityDeleteEvent);\n\ntype BaseActivityEvent = {\n actionAt: string;\n userId: string;\n tenantId: string;\n businessEntityId: BusinessEntityIds;\n recordId: string;\n};\n\nexport type ActivityCreateEvent = BaseActivityEvent & {\n action: 'create';\n data: Activity;\n previousData?: undefined;\n};\n\nexport type ActivityUpdateEvent = BaseActivityEvent & {\n action: 'update';\n data: Activity;\n previousData: Activity;\n};\n\nexport type ActivityDeleteEvent = BaseActivityEvent & {\n action: 'delete';\n data: undefined;\n previousData: Activity;\n};\n\n/************\n * ActivityV2Meta Types\n * These types are used to define the structure of the metadata for different activity types.\n ************/\n\nexport type ActivityV2Meta =\n | EmailDebtorsDossierActivityPayload\n | CallDebtorsDossierActivityPayload\n | MeetingDebtorsDossierActivityPayload\n | ChatDebtorsDossierActivityPayload;\n\nexport type EmailDebtorsDossierActivityPayload = {\n /* from: { email: string; name?: string; external?: boolean };\n to: { email: string; name?: string }[];\n cc?: { email: string; name?: string }[];\n bcc?: { email: string; name?: string }[];\n subject?: string;\n attachments?: AttachmentValue[]; */\n};\n\nexport type CallDebtorsDossierActivityPayload = {\n didNotAnswer: boolean;\n /* from: { phone: string; name?: string; external?: boolean };\n to: string;\n duration?: number;\n recordingUrl?: string;\n transcription?: string; */\n};\n\nexport type MeetingDebtorsDossierActivityPayload = {\n /* organizer: string;\n participants: string[];\n location?: string;\n startTime: string;\n endTime: string; */\n};\n\nexport type ChatDebtorsDossierActivityPayload = {\n /* from: { phone: string; name?: string; external?: boolean };\n to: string[]; */\n message: string;\n platform: 'whatsapp' | 'sms';\n};\n"]}
1
+ {"version":3,"file":"activities.js","sourceRoot":"/","sources":["types/activities.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,2BAAW,CAAA;AACb,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,gCAAa,CAAA;AACf,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["import { BusinessEntityIds } from '../constants.js';\nimport { BaseEvent } from './internal-events.js';\n\nexport enum ActivityType {\n CALL = 'call',\n MEETING = 'meeting',\n EMAIL = 'email',\n CHAT = 'chat',\n SMS = 'sms',\n}\n\nexport enum ActivityActions {\n DELETE = 'delete',\n EDIT = 'edit',\n}\n\nexport type ActivityContact = {\n id?: string;\n phoneNumber?: string;\n email?: string;\n};\n\nexport interface BaseActivity<Meta = ActivityV2Meta> {\n type: ActivityType;\n businessEntityId: BusinessEntityIds;\n recordId: string;\n description?: string;\n readonly?: boolean;\n meta?: Meta;\n // The people called/emailed/etc in this activity.\n contacts?: ActivityContact[];\n}\n\nexport type NewActivity<Meta = ActivityV2Meta> = BaseActivity<Meta> & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n activityAt?: string;\n};\n\nexport type Activity<Meta = ActivityV2Meta> = BaseActivity<Meta> & {\n id: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n activityAt: string;\n};\n\nexport type ActivityUpdate = {\n description?: string;\n type?: ActivityType;\n activityAt?: string;\n contacts?: ActivityContact[];\n};\n\nexport type ActivityEvent = BaseEvent &\n (ActivityCreateEvent | ActivityUpdateEvent | ActivityDeleteEvent);\n\ntype BaseActivityEvent = {\n actionAt: string;\n userId: string;\n tenantId: string;\n businessEntityId: BusinessEntityIds;\n recordId: string;\n};\n\nexport type ActivityCreateEvent = BaseActivityEvent & {\n action: 'create';\n data: Activity;\n previousData?: undefined;\n};\n\nexport type ActivityUpdateEvent = BaseActivityEvent & {\n action: 'update';\n data: Activity;\n previousData: Activity;\n};\n\nexport type ActivityDeleteEvent = BaseActivityEvent & {\n action: 'delete';\n data: undefined;\n previousData: Activity;\n};\n\n/************\n * ActivityV2Meta Types\n * These types are used to define the structure of the metadata for different activity types.\n ************/\n\nexport type ActivityV2Meta =\n | EmailDebtorsDossierActivityPayload\n | CallDebtorsDossierActivityPayload\n | MeetingDebtorsDossierActivityPayload\n | ChatDebtorsDossierActivityPayload;\n\nexport type EmailDebtorsDossierActivityPayload = {\n /* from: { email: string; name?: string; external?: boolean };\n to: { email: string; name?: string }[];\n cc?: { email: string; name?: string }[];\n bcc?: { email: string; name?: string }[];\n subject?: string;\n attachments?: AttachmentValue[]; */\n};\n\nexport type CallDebtorsDossierActivityPayload = {\n didNotAnswer: boolean;\n /* from: { phone: string; name?: string; external?: boolean };\n to: string;\n duration?: number;\n recordingUrl?: string;\n transcription?: string; */\n};\n\nexport type MeetingDebtorsDossierActivityPayload = {\n /* organizer: string;\n participants: string[];\n location?: string;\n startTime: string;\n endTime: string; */\n};\n\nexport type ChatDebtorsDossierActivityPayload = {\n /* from: { phone: string; name?: string; external?: boolean };\n to: string[]; */\n message: string;\n platform: 'whatsapp' | 'sms';\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bisondesk/core-sdk",
3
- "version": "1.0.600",
3
+ "version": "1.0.601",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "author": "TheTruckCompany",
@@ -14,6 +14,12 @@ export enum ActivityActions {
14
14
  EDIT = 'edit',
15
15
  }
16
16
 
17
+ export type ActivityContact = {
18
+ id?: string;
19
+ phoneNumber?: string;
20
+ email?: string;
21
+ };
22
+
17
23
  export interface BaseActivity<Meta = ActivityV2Meta> {
18
24
  type: ActivityType;
19
25
  businessEntityId: BusinessEntityIds;
@@ -21,6 +27,8 @@ export interface BaseActivity<Meta = ActivityV2Meta> {
21
27
  description?: string;
22
28
  readonly?: boolean;
23
29
  meta?: Meta;
30
+ // The people called/emailed/etc in this activity.
31
+ contacts?: ActivityContact[];
24
32
  }
25
33
 
26
34
  export type NewActivity<Meta = ActivityV2Meta> = BaseActivity<Meta> & {
@@ -45,6 +53,7 @@ export type ActivityUpdate = {
45
53
  description?: string;
46
54
  type?: ActivityType;
47
55
  activityAt?: string;
56
+ contacts?: ActivityContact[];
48
57
  };
49
58
 
50
59
  export type ActivityEvent = BaseEvent &