@equisoft/equisoft-connect-sdk-typescript 10.29.2 → 10.29.3-snapshot.20220909120917

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.
@@ -57,6 +57,7 @@ src/models/EventsListEventResponse.ts
57
57
  src/models/EventsOrderByType.ts
58
58
  src/models/EventsPatchEventPayload.ts
59
59
  src/models/EventsPatchEventResponse.ts
60
+ src/models/EventsPutEventLinkDocumentsPayload.ts
60
61
  src/models/EventsTransferToCompletedResponse.ts
61
62
  src/models/EventsVisibilityType.ts
62
63
  src/models/FieldValue.ts
@@ -78,6 +79,7 @@ src/models/GatewaysGatewayName.ts
78
79
  src/models/GatewaysGatewayType.ts
79
80
  src/models/GatewaysGatewaysResponse.ts
80
81
  src/models/GatewaysListCredentialsResponse.ts
82
+ src/models/GroupUsersListGroupUsersResponse.ts
81
83
  src/models/HandlersOauth2AssetbookAssetBookTokenPostBody.ts
82
84
  src/models/InternalNotesAuthor.ts
83
85
  src/models/InternalNotesCreateNotePayload.ts
@@ -192,6 +194,7 @@ src/models/TasksListTaskResponse.ts
192
194
  src/models/TasksOrderByType.ts
193
195
  src/models/TasksPatchTaskPayload.ts
194
196
  src/models/TasksPatchTaskResponse.ts
197
+ src/models/TasksPutTaskLinkDocumentsPayload.ts
195
198
  src/models/TasksTask.ts
196
199
  src/models/TasksTransferToCompletedResponse.ts
197
200
  src/models/TasksVisibilityType.ts
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { CalendarsCalendar, CalendarsListCalendarResponse, EventsCreateEventPayload, EventsCreateEventResponse, EventsEvent, EventsGetEventInstancesResponse, EventsListEventResponse, EventsOrderByType, EventsPatchEventPayload, EventsPatchEventResponse, EventsTransferToCompletedResponse, InternalNotesCreateNotePayload, InternalNotesCreateNoteResponse, InternalNotesHistoryType, InternalNotesNoteList, InternalNotesPatchNotePayload, InternalNotesPatchNoteResponse } from '../models';
13
+ import { CalendarsCalendar, CalendarsListCalendarResponse, EventsCreateEventPayload, EventsCreateEventResponse, EventsEvent, EventsGetEventInstancesResponse, EventsListEventResponse, EventsOrderByType, EventsPatchEventPayload, EventsPatchEventResponse, EventsPutEventLinkDocumentsPayload, EventsTransferToCompletedResponse, InternalNotesCreateNotePayload, InternalNotesCreateNoteResponse, InternalNotesHistoryType, InternalNotesNoteList, InternalNotesPatchNotePayload, InternalNotesPatchNoteResponse } from '../models';
14
14
  export interface ArchiveEventInternalNoteRequest {
15
15
  eventId: string;
16
16
  noteId: number;
@@ -76,6 +76,11 @@ export interface PatchEventInternalNoteRequest {
76
76
  internalNotesPatchNotePayload: InternalNotesPatchNotePayload;
77
77
  acceptLanguage?: string;
78
78
  }
79
+ export interface PutEventLinksDocumentsRequest {
80
+ eventId: string;
81
+ eventsPutEventLinkDocumentsPayload: EventsPutEventLinkDocumentsPayload;
82
+ acceptLanguage?: string;
83
+ }
79
84
  export interface RestoreEventInternalNoteRequest {
80
85
  eventId: string;
81
86
  noteId: number;
@@ -188,6 +193,14 @@ export declare class EventsApi extends runtime.BaseAPI {
188
193
  * Add an internal note to and event.
189
194
  */
190
195
  patchEventInternalNote(requestParameters: PatchEventInternalNoteRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<InternalNotesPatchNoteResponse>;
196
+ /**
197
+ * Update the links between an event and existing documents
198
+ */
199
+ putEventLinksDocumentsRaw(requestParameters: PutEventLinksDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
200
+ /**
201
+ * Update the links between an event and existing documents
202
+ */
203
+ putEventLinksDocuments(requestParameters: PutEventLinksDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
191
204
  /**
192
205
  * Restore an archived internal note for an event.
193
206
  */
@@ -558,6 +558,49 @@ class EventsApi extends runtime.BaseAPI {
558
558
  return yield response.value();
559
559
  });
560
560
  }
561
+ /**
562
+ * Update the links between an event and existing documents
563
+ */
564
+ putEventLinksDocumentsRaw(requestParameters, initOverrides) {
565
+ return __awaiter(this, void 0, void 0, function* () {
566
+ if (requestParameters.eventId === null || requestParameters.eventId === undefined) {
567
+ throw new runtime.RequiredError('eventId', 'Required parameter requestParameters.eventId was null or undefined when calling putEventLinksDocuments.');
568
+ }
569
+ if (requestParameters.eventsPutEventLinkDocumentsPayload === null || requestParameters.eventsPutEventLinkDocumentsPayload === undefined) {
570
+ throw new runtime.RequiredError('eventsPutEventLinkDocumentsPayload', 'Required parameter requestParameters.eventsPutEventLinkDocumentsPayload was null or undefined when calling putEventLinksDocuments.');
571
+ }
572
+ const queryParameters = {};
573
+ const headerParameters = {};
574
+ headerParameters['Content-Type'] = 'application/json';
575
+ if (requestParameters.acceptLanguage !== undefined && requestParameters.acceptLanguage !== null) {
576
+ headerParameters['Accept-Language'] = String(requestParameters.acceptLanguage);
577
+ }
578
+ if (this.configuration && this.configuration.accessToken) {
579
+ // oauth required
580
+ const token = this.configuration.accessToken;
581
+ const tokenString = yield token("OAuth2", ["crm:event"]);
582
+ if (tokenString) {
583
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
584
+ }
585
+ }
586
+ const response = yield this.request({
587
+ path: `/crm/api/v1/events/{eventId}/documents`.replace(`{${"eventId"}}`, encodeURIComponent(String(requestParameters.eventId))),
588
+ method: 'PUT',
589
+ headers: headerParameters,
590
+ query: queryParameters,
591
+ body: models_1.EventsPutEventLinkDocumentsPayloadToJSON(requestParameters.eventsPutEventLinkDocumentsPayload),
592
+ }, initOverrides);
593
+ return new runtime.VoidApiResponse(response);
594
+ });
595
+ }
596
+ /**
597
+ * Update the links between an event and existing documents
598
+ */
599
+ putEventLinksDocuments(requestParameters, initOverrides) {
600
+ return __awaiter(this, void 0, void 0, function* () {
601
+ yield this.putEventLinksDocumentsRaw(requestParameters, initOverrides);
602
+ });
603
+ }
561
604
  /**
562
605
  * Restore an archived internal note for an event.
563
606
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { InternalNotesCreateNotePayload, InternalNotesCreateNoteResponse, InternalNotesHistoryType, InternalNotesNoteList, InternalNotesPatchNotePayload, InternalNotesPatchNoteResponse, TasksCreateTaskPayload, TasksCreateTaskResponse, TasksDueDateFilter, TasksListTaskResponse, TasksOrderByType, TasksPatchTaskPayload, TasksPatchTaskResponse, TasksTask, TasksTransferToCompletedResponse } from '../models';
13
+ import { InternalNotesCreateNotePayload, InternalNotesCreateNoteResponse, InternalNotesHistoryType, InternalNotesNoteList, InternalNotesPatchNotePayload, InternalNotesPatchNoteResponse, TasksCreateTaskPayload, TasksCreateTaskResponse, TasksDueDateFilter, TasksListTaskResponse, TasksOrderByType, TasksPatchTaskPayload, TasksPatchTaskResponse, TasksPutTaskLinkDocumentsPayload, TasksTask, TasksTransferToCompletedResponse } from '../models';
14
14
  export interface ArchiveTaskInternalNoteRequest {
15
15
  taskId: string;
16
16
  noteId: number;
@@ -60,6 +60,11 @@ export interface PatchTaskInternalNoteRequest {
60
60
  internalNotesPatchNotePayload: InternalNotesPatchNotePayload;
61
61
  acceptLanguage?: string;
62
62
  }
63
+ export interface PutTaskLinksDocumentsRequest {
64
+ taskId: string;
65
+ tasksPutTaskLinkDocumentsPayload: TasksPutTaskLinkDocumentsPayload;
66
+ acceptLanguage?: string;
67
+ }
63
68
  export interface RestoreTaskInternalNoteRequest {
64
69
  taskId: string;
65
70
  noteId: number;
@@ -144,6 +149,14 @@ export declare class TasksApi extends runtime.BaseAPI {
144
149
  * Add an internal note to a task.
145
150
  */
146
151
  patchTaskInternalNote(requestParameters: PatchTaskInternalNoteRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<InternalNotesPatchNoteResponse>;
152
+ /**
153
+ * Update the links between a task and existing documents
154
+ */
155
+ putTaskLinksDocumentsRaw(requestParameters: PutTaskLinksDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
156
+ /**
157
+ * Update the links between a task and existing documents
158
+ */
159
+ putTaskLinksDocuments(requestParameters: PutTaskLinksDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
147
160
  /**
148
161
  * Restore an archived internal note for a task.
149
162
  */
@@ -425,6 +425,49 @@ class TasksApi extends runtime.BaseAPI {
425
425
  return yield response.value();
426
426
  });
427
427
  }
428
+ /**
429
+ * Update the links between a task and existing documents
430
+ */
431
+ putTaskLinksDocumentsRaw(requestParameters, initOverrides) {
432
+ return __awaiter(this, void 0, void 0, function* () {
433
+ if (requestParameters.taskId === null || requestParameters.taskId === undefined) {
434
+ throw new runtime.RequiredError('taskId', 'Required parameter requestParameters.taskId was null or undefined when calling putTaskLinksDocuments.');
435
+ }
436
+ if (requestParameters.tasksPutTaskLinkDocumentsPayload === null || requestParameters.tasksPutTaskLinkDocumentsPayload === undefined) {
437
+ throw new runtime.RequiredError('tasksPutTaskLinkDocumentsPayload', 'Required parameter requestParameters.tasksPutTaskLinkDocumentsPayload was null or undefined when calling putTaskLinksDocuments.');
438
+ }
439
+ const queryParameters = {};
440
+ const headerParameters = {};
441
+ headerParameters['Content-Type'] = 'application/json';
442
+ if (requestParameters.acceptLanguage !== undefined && requestParameters.acceptLanguage !== null) {
443
+ headerParameters['Accept-Language'] = String(requestParameters.acceptLanguage);
444
+ }
445
+ if (this.configuration && this.configuration.accessToken) {
446
+ // oauth required
447
+ const token = this.configuration.accessToken;
448
+ const tokenString = yield token("OAuth2", ["crm:task"]);
449
+ if (tokenString) {
450
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
451
+ }
452
+ }
453
+ const response = yield this.request({
454
+ path: `/crm/api/v1/tasks/{taskId}/documents`.replace(`{${"taskId"}}`, encodeURIComponent(String(requestParameters.taskId))),
455
+ method: 'PUT',
456
+ headers: headerParameters,
457
+ query: queryParameters,
458
+ body: models_1.TasksPutTaskLinkDocumentsPayloadToJSON(requestParameters.tasksPutTaskLinkDocumentsPayload),
459
+ }, initOverrides);
460
+ return new runtime.VoidApiResponse(response);
461
+ });
462
+ }
463
+ /**
464
+ * Update the links between a task and existing documents
465
+ */
466
+ putTaskLinksDocuments(requestParameters, initOverrides) {
467
+ return __awaiter(this, void 0, void 0, function* () {
468
+ yield this.putTaskLinksDocumentsRaw(requestParameters, initOverrides);
469
+ });
470
+ }
428
471
  /**
429
472
  * Restore an archived internal note for a task.
430
473
  */
@@ -167,6 +167,12 @@ export interface EventsEvent {
167
167
  * @memberof EventsEvent
168
168
  */
169
169
  contactIds?: Array<number>;
170
+ /**
171
+ * IDs of the documents linked to this Event
172
+ * @type {Array<number>}
173
+ * @memberof EventsEvent
174
+ */
175
+ documentIds?: Array<number>;
170
176
  /**
171
177
  *
172
178
  * @type {AccessRights}
@@ -51,6 +51,7 @@ function EventsEventFromJSONTyped(json, ignoreDiscriminator) {
51
51
  'color': !runtime_1.exists(json, 'color') ? undefined : json['color'],
52
52
  'textColor': !runtime_1.exists(json, 'textColor') ? undefined : json['textColor'],
53
53
  'contactIds': !runtime_1.exists(json, 'contactIds') ? undefined : json['contactIds'],
54
+ 'documentIds': !runtime_1.exists(json, 'documentIds') ? undefined : json['documentIds'],
54
55
  'accessRights': AccessRights_1.AccessRightsFromJSON(json['accessRights']),
55
56
  };
56
57
  }
@@ -87,6 +88,7 @@ function EventsEventToJSON(value) {
87
88
  'color': value.color,
88
89
  'textColor': value.textColor,
89
90
  'contactIds': value.contactIds,
91
+ 'documentIds': value.documentIds,
90
92
  'accessRights': AccessRights_1.AccessRightsToJSON(value.accessRights),
91
93
  };
92
94
  }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Equisoft /connect API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface EventsPutEventLinkDocumentsPayload
16
+ */
17
+ export interface EventsPutEventLinkDocumentsPayload {
18
+ /**
19
+ * Ids of the documents to link to the event.
20
+ * @type {Array<number>}
21
+ * @memberof EventsPutEventLinkDocumentsPayload
22
+ */
23
+ documentIds: Array<number>;
24
+ }
25
+ export declare function EventsPutEventLinkDocumentsPayloadFromJSON(json: any): EventsPutEventLinkDocumentsPayload;
26
+ export declare function EventsPutEventLinkDocumentsPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventsPutEventLinkDocumentsPayload;
27
+ export declare function EventsPutEventLinkDocumentsPayloadToJSON(value?: EventsPutEventLinkDocumentsPayload | null): any;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Equisoft /connect API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: latest
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.EventsPutEventLinkDocumentsPayloadToJSON = exports.EventsPutEventLinkDocumentsPayloadFromJSONTyped = exports.EventsPutEventLinkDocumentsPayloadFromJSON = void 0;
17
+ function EventsPutEventLinkDocumentsPayloadFromJSON(json) {
18
+ return EventsPutEventLinkDocumentsPayloadFromJSONTyped(json, false);
19
+ }
20
+ exports.EventsPutEventLinkDocumentsPayloadFromJSON = EventsPutEventLinkDocumentsPayloadFromJSON;
21
+ function EventsPutEventLinkDocumentsPayloadFromJSONTyped(json, ignoreDiscriminator) {
22
+ if ((json === undefined) || (json === null)) {
23
+ return json;
24
+ }
25
+ return {
26
+ 'documentIds': json['documentIds'],
27
+ };
28
+ }
29
+ exports.EventsPutEventLinkDocumentsPayloadFromJSONTyped = EventsPutEventLinkDocumentsPayloadFromJSONTyped;
30
+ function EventsPutEventLinkDocumentsPayloadToJSON(value) {
31
+ if (value === undefined) {
32
+ return undefined;
33
+ }
34
+ if (value === null) {
35
+ return null;
36
+ }
37
+ return {
38
+ 'documentIds': value.documentIds,
39
+ };
40
+ }
41
+ exports.EventsPutEventLinkDocumentsPayloadToJSON = EventsPutEventLinkDocumentsPayloadToJSON;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Equisoft /connect API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface GroupUsersListGroupUsersResponse
16
+ */
17
+ export interface GroupUsersListGroupUsersResponse {
18
+ /**
19
+ *
20
+ * @type {Array<any>}
21
+ * @memberof GroupUsersListGroupUsersResponse
22
+ */
23
+ users: Array<any>;
24
+ }
25
+ export declare function GroupUsersListGroupUsersResponseFromJSON(json: any): GroupUsersListGroupUsersResponse;
26
+ export declare function GroupUsersListGroupUsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupUsersListGroupUsersResponse;
27
+ export declare function GroupUsersListGroupUsersResponseToJSON(value?: GroupUsersListGroupUsersResponse | null): any;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Equisoft /connect API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: latest
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.GroupUsersListGroupUsersResponseToJSON = exports.GroupUsersListGroupUsersResponseFromJSONTyped = exports.GroupUsersListGroupUsersResponseFromJSON = void 0;
17
+ function GroupUsersListGroupUsersResponseFromJSON(json) {
18
+ return GroupUsersListGroupUsersResponseFromJSONTyped(json, false);
19
+ }
20
+ exports.GroupUsersListGroupUsersResponseFromJSON = GroupUsersListGroupUsersResponseFromJSON;
21
+ function GroupUsersListGroupUsersResponseFromJSONTyped(json, ignoreDiscriminator) {
22
+ if ((json === undefined) || (json === null)) {
23
+ return json;
24
+ }
25
+ return {
26
+ 'users': json['users'],
27
+ };
28
+ }
29
+ exports.GroupUsersListGroupUsersResponseFromJSONTyped = GroupUsersListGroupUsersResponseFromJSONTyped;
30
+ function GroupUsersListGroupUsersResponseToJSON(value) {
31
+ if (value === undefined) {
32
+ return undefined;
33
+ }
34
+ if (value === null) {
35
+ return null;
36
+ }
37
+ return {
38
+ 'users': value.users,
39
+ };
40
+ }
41
+ exports.GroupUsersListGroupUsersResponseToJSON = GroupUsersListGroupUsersResponseToJSON;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Equisoft /connect API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface TasksPutTaskLinkDocumentsPayload
16
+ */
17
+ export interface TasksPutTaskLinkDocumentsPayload {
18
+ /**
19
+ * Ids of the documents to link to the task.
20
+ * @type {Array<number>}
21
+ * @memberof TasksPutTaskLinkDocumentsPayload
22
+ */
23
+ documentIds: Array<number>;
24
+ }
25
+ export declare function TasksPutTaskLinkDocumentsPayloadFromJSON(json: any): TasksPutTaskLinkDocumentsPayload;
26
+ export declare function TasksPutTaskLinkDocumentsPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): TasksPutTaskLinkDocumentsPayload;
27
+ export declare function TasksPutTaskLinkDocumentsPayloadToJSON(value?: TasksPutTaskLinkDocumentsPayload | null): any;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Equisoft /connect API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: latest
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.TasksPutTaskLinkDocumentsPayloadToJSON = exports.TasksPutTaskLinkDocumentsPayloadFromJSONTyped = exports.TasksPutTaskLinkDocumentsPayloadFromJSON = void 0;
17
+ function TasksPutTaskLinkDocumentsPayloadFromJSON(json) {
18
+ return TasksPutTaskLinkDocumentsPayloadFromJSONTyped(json, false);
19
+ }
20
+ exports.TasksPutTaskLinkDocumentsPayloadFromJSON = TasksPutTaskLinkDocumentsPayloadFromJSON;
21
+ function TasksPutTaskLinkDocumentsPayloadFromJSONTyped(json, ignoreDiscriminator) {
22
+ if ((json === undefined) || (json === null)) {
23
+ return json;
24
+ }
25
+ return {
26
+ 'documentIds': json['documentIds'],
27
+ };
28
+ }
29
+ exports.TasksPutTaskLinkDocumentsPayloadFromJSONTyped = TasksPutTaskLinkDocumentsPayloadFromJSONTyped;
30
+ function TasksPutTaskLinkDocumentsPayloadToJSON(value) {
31
+ if (value === undefined) {
32
+ return undefined;
33
+ }
34
+ if (value === null) {
35
+ return null;
36
+ }
37
+ return {
38
+ 'documentIds': value.documentIds,
39
+ };
40
+ }
41
+ exports.TasksPutTaskLinkDocumentsPayloadToJSON = TasksPutTaskLinkDocumentsPayloadToJSON;
@@ -113,6 +113,12 @@ export interface TasksTask {
113
113
  * @memberof TasksTask
114
114
  */
115
115
  contactIds?: Array<number>;
116
+ /**
117
+ * IDs of the documents linked to this Task
118
+ * @type {Array<number>}
119
+ * @memberof TasksTask
120
+ */
121
+ documentIds?: Array<number>;
116
122
  /**
117
123
  *
118
124
  * @type {AccessRights}
@@ -42,6 +42,7 @@ function TasksTaskFromJSONTyped(json, ignoreDiscriminator) {
42
42
  'updateTime': !runtime_1.exists(json, 'updateTime') ? undefined : (json['updateTime'] === null ? null : new Date(json['updateTime'])),
43
43
  'completionTime': !runtime_1.exists(json, 'completionTime') ? undefined : (json['completionTime'] === null ? null : new Date(json['completionTime'])),
44
44
  'contactIds': !runtime_1.exists(json, 'contactIds') ? undefined : json['contactIds'],
45
+ 'documentIds': !runtime_1.exists(json, 'documentIds') ? undefined : json['documentIds'],
45
46
  'accessRights': AccessRights_1.AccessRightsFromJSON(json['accessRights']),
46
47
  };
47
48
  }
@@ -70,6 +71,7 @@ function TasksTaskToJSON(value) {
70
71
  'updateTime': value.updateTime === undefined ? undefined : (value.updateTime === null ? null : value.updateTime.toISOString()),
71
72
  'completionTime': value.completionTime === undefined ? undefined : (value.completionTime === null ? null : value.completionTime.toISOString()),
72
73
  'contactIds': value.contactIds,
74
+ 'documentIds': value.documentIds,
73
75
  'accessRights': AccessRights_1.AccessRightsToJSON(value.accessRights),
74
76
  };
75
77
  }
@@ -39,6 +39,7 @@ export * from './EventsListEventResponse';
39
39
  export * from './EventsOrderByType';
40
40
  export * from './EventsPatchEventPayload';
41
41
  export * from './EventsPatchEventResponse';
42
+ export * from './EventsPutEventLinkDocumentsPayload';
42
43
  export * from './EventsTransferToCompletedResponse';
43
44
  export * from './EventsVisibilityType';
44
45
  export * from './FieldValue';
@@ -60,6 +61,7 @@ export * from './GatewaysGatewayName';
60
61
  export * from './GatewaysGatewayType';
61
62
  export * from './GatewaysGatewaysResponse';
62
63
  export * from './GatewaysListCredentialsResponse';
64
+ export * from './GroupUsersListGroupUsersResponse';
63
65
  export * from './HandlersOauth2AssetbookAssetBookTokenPostBody';
64
66
  export * from './InternalNotesAuthor';
65
67
  export * from './InternalNotesCreateNotePayload';
@@ -174,6 +176,7 @@ export * from './TasksListTaskResponse';
174
176
  export * from './TasksOrderByType';
175
177
  export * from './TasksPatchTaskPayload';
176
178
  export * from './TasksPatchTaskResponse';
179
+ export * from './TasksPutTaskLinkDocumentsPayload';
177
180
  export * from './TasksTask';
178
181
  export * from './TasksTransferToCompletedResponse';
179
182
  export * from './TasksVisibilityType';
@@ -53,6 +53,7 @@ __exportStar(require("./EventsListEventResponse"), exports);
53
53
  __exportStar(require("./EventsOrderByType"), exports);
54
54
  __exportStar(require("./EventsPatchEventPayload"), exports);
55
55
  __exportStar(require("./EventsPatchEventResponse"), exports);
56
+ __exportStar(require("./EventsPutEventLinkDocumentsPayload"), exports);
56
57
  __exportStar(require("./EventsTransferToCompletedResponse"), exports);
57
58
  __exportStar(require("./EventsVisibilityType"), exports);
58
59
  __exportStar(require("./FieldValue"), exports);
@@ -74,6 +75,7 @@ __exportStar(require("./GatewaysGatewayName"), exports);
74
75
  __exportStar(require("./GatewaysGatewayType"), exports);
75
76
  __exportStar(require("./GatewaysGatewaysResponse"), exports);
76
77
  __exportStar(require("./GatewaysListCredentialsResponse"), exports);
78
+ __exportStar(require("./GroupUsersListGroupUsersResponse"), exports);
77
79
  __exportStar(require("./HandlersOauth2AssetbookAssetBookTokenPostBody"), exports);
78
80
  __exportStar(require("./InternalNotesAuthor"), exports);
79
81
  __exportStar(require("./InternalNotesCreateNotePayload"), exports);
@@ -188,6 +190,7 @@ __exportStar(require("./TasksListTaskResponse"), exports);
188
190
  __exportStar(require("./TasksOrderByType"), exports);
189
191
  __exportStar(require("./TasksPatchTaskPayload"), exports);
190
192
  __exportStar(require("./TasksPatchTaskResponse"), exports);
193
+ __exportStar(require("./TasksPutTaskLinkDocumentsPayload"), exports);
191
194
  __exportStar(require("./TasksTask"), exports);
192
195
  __exportStar(require("./TasksTransferToCompletedResponse"), exports);
193
196
  __exportStar(require("./TasksVisibilityType"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/equisoft-connect-sdk-typescript",
3
- "version": "10.29.2",
3
+ "version": "10.29.3-snapshot.20220909120917",
4
4
  "description": "OpenAPI client for @equisoft/equisoft-connect-sdk-typescript",
5
5
  "author": "OpenAPI-Generator",
6
6
  "main": "./dist/index.js",
@@ -48,6 +48,9 @@ import {
48
48
  EventsPatchEventResponse,
49
49
  EventsPatchEventResponseFromJSON,
50
50
  EventsPatchEventResponseToJSON,
51
+ EventsPutEventLinkDocumentsPayload,
52
+ EventsPutEventLinkDocumentsPayloadFromJSON,
53
+ EventsPutEventLinkDocumentsPayloadToJSON,
51
54
  EventsTransferToCompletedResponse,
52
55
  EventsTransferToCompletedResponseFromJSON,
53
56
  EventsTransferToCompletedResponseToJSON,
@@ -148,6 +151,12 @@ export interface PatchEventInternalNoteRequest {
148
151
  acceptLanguage?: string;
149
152
  }
150
153
 
154
+ export interface PutEventLinksDocumentsRequest {
155
+ eventId: string;
156
+ eventsPutEventLinkDocumentsPayload: EventsPutEventLinkDocumentsPayload;
157
+ acceptLanguage?: string;
158
+ }
159
+
151
160
  export interface RestoreEventInternalNoteRequest {
152
161
  eventId: string;
153
162
  noteId: number;
@@ -773,6 +782,56 @@ export class EventsApi extends runtime.BaseAPI {
773
782
  return await response.value();
774
783
  }
775
784
 
785
+ /**
786
+ * Update the links between an event and existing documents
787
+ */
788
+ async putEventLinksDocumentsRaw(requestParameters: PutEventLinksDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>> {
789
+ if (requestParameters.eventId === null || requestParameters.eventId === undefined) {
790
+ throw new runtime.RequiredError('eventId','Required parameter requestParameters.eventId was null or undefined when calling putEventLinksDocuments.');
791
+ }
792
+
793
+ if (requestParameters.eventsPutEventLinkDocumentsPayload === null || requestParameters.eventsPutEventLinkDocumentsPayload === undefined) {
794
+ throw new runtime.RequiredError('eventsPutEventLinkDocumentsPayload','Required parameter requestParameters.eventsPutEventLinkDocumentsPayload was null or undefined when calling putEventLinksDocuments.');
795
+ }
796
+
797
+ const queryParameters: any = {};
798
+
799
+ const headerParameters: runtime.HTTPHeaders = {};
800
+
801
+ headerParameters['Content-Type'] = 'application/json';
802
+
803
+ if (requestParameters.acceptLanguage !== undefined && requestParameters.acceptLanguage !== null) {
804
+ headerParameters['Accept-Language'] = String(requestParameters.acceptLanguage);
805
+ }
806
+
807
+ if (this.configuration && this.configuration.accessToken) {
808
+ // oauth required
809
+ const token = this.configuration.accessToken;
810
+ const tokenString = await token("OAuth2", ["crm:event"]);
811
+
812
+ if (tokenString) {
813
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
814
+ }
815
+ }
816
+
817
+ const response = await this.request({
818
+ path: `/crm/api/v1/events/{eventId}/documents`.replace(`{${"eventId"}}`, encodeURIComponent(String(requestParameters.eventId))),
819
+ method: 'PUT',
820
+ headers: headerParameters,
821
+ query: queryParameters,
822
+ body: EventsPutEventLinkDocumentsPayloadToJSON(requestParameters.eventsPutEventLinkDocumentsPayload),
823
+ }, initOverrides);
824
+
825
+ return new runtime.VoidApiResponse(response);
826
+ }
827
+
828
+ /**
829
+ * Update the links between an event and existing documents
830
+ */
831
+ async putEventLinksDocuments(requestParameters: PutEventLinksDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void> {
832
+ await this.putEventLinksDocumentsRaw(requestParameters, initOverrides);
833
+ }
834
+
776
835
  /**
777
836
  * Restore an archived internal note for an event.
778
837
  */
@@ -57,6 +57,9 @@ import {
57
57
  TasksPatchTaskResponse,
58
58
  TasksPatchTaskResponseFromJSON,
59
59
  TasksPatchTaskResponseToJSON,
60
+ TasksPutTaskLinkDocumentsPayload,
61
+ TasksPutTaskLinkDocumentsPayloadFromJSON,
62
+ TasksPutTaskLinkDocumentsPayloadToJSON,
60
63
  TasksTask,
61
64
  TasksTaskFromJSON,
62
65
  TasksTaskToJSON,
@@ -123,6 +126,12 @@ export interface PatchTaskInternalNoteRequest {
123
126
  acceptLanguage?: string;
124
127
  }
125
128
 
129
+ export interface PutTaskLinksDocumentsRequest {
130
+ taskId: string;
131
+ tasksPutTaskLinkDocumentsPayload: TasksPutTaskLinkDocumentsPayload;
132
+ acceptLanguage?: string;
133
+ }
134
+
126
135
  export interface RestoreTaskInternalNoteRequest {
127
136
  taskId: string;
128
137
  noteId: number;
@@ -596,6 +605,56 @@ export class TasksApi extends runtime.BaseAPI {
596
605
  return await response.value();
597
606
  }
598
607
 
608
+ /**
609
+ * Update the links between a task and existing documents
610
+ */
611
+ async putTaskLinksDocumentsRaw(requestParameters: PutTaskLinksDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>> {
612
+ if (requestParameters.taskId === null || requestParameters.taskId === undefined) {
613
+ throw new runtime.RequiredError('taskId','Required parameter requestParameters.taskId was null or undefined when calling putTaskLinksDocuments.');
614
+ }
615
+
616
+ if (requestParameters.tasksPutTaskLinkDocumentsPayload === null || requestParameters.tasksPutTaskLinkDocumentsPayload === undefined) {
617
+ throw new runtime.RequiredError('tasksPutTaskLinkDocumentsPayload','Required parameter requestParameters.tasksPutTaskLinkDocumentsPayload was null or undefined when calling putTaskLinksDocuments.');
618
+ }
619
+
620
+ const queryParameters: any = {};
621
+
622
+ const headerParameters: runtime.HTTPHeaders = {};
623
+
624
+ headerParameters['Content-Type'] = 'application/json';
625
+
626
+ if (requestParameters.acceptLanguage !== undefined && requestParameters.acceptLanguage !== null) {
627
+ headerParameters['Accept-Language'] = String(requestParameters.acceptLanguage);
628
+ }
629
+
630
+ if (this.configuration && this.configuration.accessToken) {
631
+ // oauth required
632
+ const token = this.configuration.accessToken;
633
+ const tokenString = await token("OAuth2", ["crm:task"]);
634
+
635
+ if (tokenString) {
636
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
637
+ }
638
+ }
639
+
640
+ const response = await this.request({
641
+ path: `/crm/api/v1/tasks/{taskId}/documents`.replace(`{${"taskId"}}`, encodeURIComponent(String(requestParameters.taskId))),
642
+ method: 'PUT',
643
+ headers: headerParameters,
644
+ query: queryParameters,
645
+ body: TasksPutTaskLinkDocumentsPayloadToJSON(requestParameters.tasksPutTaskLinkDocumentsPayload),
646
+ }, initOverrides);
647
+
648
+ return new runtime.VoidApiResponse(response);
649
+ }
650
+
651
+ /**
652
+ * Update the links between a task and existing documents
653
+ */
654
+ async putTaskLinksDocuments(requestParameters: PutTaskLinksDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void> {
655
+ await this.putTaskLinksDocumentsRaw(requestParameters, initOverrides);
656
+ }
657
+
599
658
  /**
600
659
  * Restore an archived internal note for a task.
601
660
  */
@@ -187,6 +187,12 @@ export interface EventsEvent {
187
187
  * @memberof EventsEvent
188
188
  */
189
189
  contactIds?: Array<number>;
190
+ /**
191
+ * IDs of the documents linked to this Event
192
+ * @type {Array<number>}
193
+ * @memberof EventsEvent
194
+ */
195
+ documentIds?: Array<number>;
190
196
  /**
191
197
  *
192
198
  * @type {AccessRights}
@@ -229,6 +235,7 @@ export function EventsEventFromJSONTyped(json: any, ignoreDiscriminator: boolean
229
235
  'color': !exists(json, 'color') ? undefined : json['color'],
230
236
  'textColor': !exists(json, 'textColor') ? undefined : json['textColor'],
231
237
  'contactIds': !exists(json, 'contactIds') ? undefined : json['contactIds'],
238
+ 'documentIds': !exists(json, 'documentIds') ? undefined : json['documentIds'],
232
239
  'accessRights': AccessRightsFromJSON(json['accessRights']),
233
240
  };
234
241
  }
@@ -266,6 +273,7 @@ export function EventsEventToJSON(value?: EventsEvent | null): any {
266
273
  'color': value.color,
267
274
  'textColor': value.textColor,
268
275
  'contactIds': value.contactIds,
276
+ 'documentIds': value.documentIds,
269
277
  'accessRights': AccessRightsToJSON(value.accessRights),
270
278
  };
271
279
  }
@@ -0,0 +1,56 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Equisoft /connect API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface EventsPutEventLinkDocumentsPayload
20
+ */
21
+ export interface EventsPutEventLinkDocumentsPayload {
22
+ /**
23
+ * Ids of the documents to link to the event.
24
+ * @type {Array<number>}
25
+ * @memberof EventsPutEventLinkDocumentsPayload
26
+ */
27
+ documentIds: Array<number>;
28
+ }
29
+
30
+ export function EventsPutEventLinkDocumentsPayloadFromJSON(json: any): EventsPutEventLinkDocumentsPayload {
31
+ return EventsPutEventLinkDocumentsPayloadFromJSONTyped(json, false);
32
+ }
33
+
34
+ export function EventsPutEventLinkDocumentsPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventsPutEventLinkDocumentsPayload {
35
+ if ((json === undefined) || (json === null)) {
36
+ return json;
37
+ }
38
+ return {
39
+
40
+ 'documentIds': json['documentIds'],
41
+ };
42
+ }
43
+
44
+ export function EventsPutEventLinkDocumentsPayloadToJSON(value?: EventsPutEventLinkDocumentsPayload | null): any {
45
+ if (value === undefined) {
46
+ return undefined;
47
+ }
48
+ if (value === null) {
49
+ return null;
50
+ }
51
+ return {
52
+
53
+ 'documentIds': value.documentIds,
54
+ };
55
+ }
56
+
@@ -0,0 +1,56 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Equisoft /connect API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface GroupUsersListGroupUsersResponse
20
+ */
21
+ export interface GroupUsersListGroupUsersResponse {
22
+ /**
23
+ *
24
+ * @type {Array<any>}
25
+ * @memberof GroupUsersListGroupUsersResponse
26
+ */
27
+ users: Array<any>;
28
+ }
29
+
30
+ export function GroupUsersListGroupUsersResponseFromJSON(json: any): GroupUsersListGroupUsersResponse {
31
+ return GroupUsersListGroupUsersResponseFromJSONTyped(json, false);
32
+ }
33
+
34
+ export function GroupUsersListGroupUsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupUsersListGroupUsersResponse {
35
+ if ((json === undefined) || (json === null)) {
36
+ return json;
37
+ }
38
+ return {
39
+
40
+ 'users': json['users'],
41
+ };
42
+ }
43
+
44
+ export function GroupUsersListGroupUsersResponseToJSON(value?: GroupUsersListGroupUsersResponse | null): any {
45
+ if (value === undefined) {
46
+ return undefined;
47
+ }
48
+ if (value === null) {
49
+ return null;
50
+ }
51
+ return {
52
+
53
+ 'users': value.users,
54
+ };
55
+ }
56
+
@@ -0,0 +1,56 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Equisoft /connect API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface TasksPutTaskLinkDocumentsPayload
20
+ */
21
+ export interface TasksPutTaskLinkDocumentsPayload {
22
+ /**
23
+ * Ids of the documents to link to the task.
24
+ * @type {Array<number>}
25
+ * @memberof TasksPutTaskLinkDocumentsPayload
26
+ */
27
+ documentIds: Array<number>;
28
+ }
29
+
30
+ export function TasksPutTaskLinkDocumentsPayloadFromJSON(json: any): TasksPutTaskLinkDocumentsPayload {
31
+ return TasksPutTaskLinkDocumentsPayloadFromJSONTyped(json, false);
32
+ }
33
+
34
+ export function TasksPutTaskLinkDocumentsPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): TasksPutTaskLinkDocumentsPayload {
35
+ if ((json === undefined) || (json === null)) {
36
+ return json;
37
+ }
38
+ return {
39
+
40
+ 'documentIds': json['documentIds'],
41
+ };
42
+ }
43
+
44
+ export function TasksPutTaskLinkDocumentsPayloadToJSON(value?: TasksPutTaskLinkDocumentsPayload | null): any {
45
+ if (value === undefined) {
46
+ return undefined;
47
+ }
48
+ if (value === null) {
49
+ return null;
50
+ }
51
+ return {
52
+
53
+ 'documentIds': value.documentIds,
54
+ };
55
+ }
56
+
@@ -128,6 +128,12 @@ export interface TasksTask {
128
128
  * @memberof TasksTask
129
129
  */
130
130
  contactIds?: Array<number>;
131
+ /**
132
+ * IDs of the documents linked to this Task
133
+ * @type {Array<number>}
134
+ * @memberof TasksTask
135
+ */
136
+ documentIds?: Array<number>;
131
137
  /**
132
138
  *
133
139
  * @type {AccessRights}
@@ -162,6 +168,7 @@ export function TasksTaskFromJSONTyped(json: any, ignoreDiscriminator: boolean):
162
168
  'updateTime': !exists(json, 'updateTime') ? undefined : (json['updateTime'] === null ? null : new Date(json['updateTime'])),
163
169
  'completionTime': !exists(json, 'completionTime') ? undefined : (json['completionTime'] === null ? null : new Date(json['completionTime'])),
164
170
  'contactIds': !exists(json, 'contactIds') ? undefined : json['contactIds'],
171
+ 'documentIds': !exists(json, 'documentIds') ? undefined : json['documentIds'],
165
172
  'accessRights': AccessRightsFromJSON(json['accessRights']),
166
173
  };
167
174
  }
@@ -191,6 +198,7 @@ export function TasksTaskToJSON(value?: TasksTask | null): any {
191
198
  'updateTime': value.updateTime === undefined ? undefined : (value.updateTime === null ? null : value.updateTime.toISOString()),
192
199
  'completionTime': value.completionTime === undefined ? undefined : (value.completionTime === null ? null : value.completionTime.toISOString()),
193
200
  'contactIds': value.contactIds,
201
+ 'documentIds': value.documentIds,
194
202
  'accessRights': AccessRightsToJSON(value.accessRights),
195
203
  };
196
204
  }
@@ -41,6 +41,7 @@ export * from './EventsListEventResponse';
41
41
  export * from './EventsOrderByType';
42
42
  export * from './EventsPatchEventPayload';
43
43
  export * from './EventsPatchEventResponse';
44
+ export * from './EventsPutEventLinkDocumentsPayload';
44
45
  export * from './EventsTransferToCompletedResponse';
45
46
  export * from './EventsVisibilityType';
46
47
  export * from './FieldValue';
@@ -62,6 +63,7 @@ export * from './GatewaysGatewayName';
62
63
  export * from './GatewaysGatewayType';
63
64
  export * from './GatewaysGatewaysResponse';
64
65
  export * from './GatewaysListCredentialsResponse';
66
+ export * from './GroupUsersListGroupUsersResponse';
65
67
  export * from './HandlersOauth2AssetbookAssetBookTokenPostBody';
66
68
  export * from './InternalNotesAuthor';
67
69
  export * from './InternalNotesCreateNotePayload';
@@ -176,6 +178,7 @@ export * from './TasksListTaskResponse';
176
178
  export * from './TasksOrderByType';
177
179
  export * from './TasksPatchTaskPayload';
178
180
  export * from './TasksPatchTaskResponse';
181
+ export * from './TasksPutTaskLinkDocumentsPayload';
179
182
  export * from './TasksTask';
180
183
  export * from './TasksTransferToCompletedResponse';
181
184
  export * from './TasksVisibilityType';