Skip to content

Commit dab0263

Browse files
Codegen: CRM Lists
1 parent f640324 commit dab0263

File tree

119 files changed

+1456
-286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1456
-286
lines changed

codegen/crm/lists/apis/FoldersApi.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ export class FoldersApiRequestFactory extends BaseAPIRequestFactory {
106106
/**
107107
* This moves the folder from its current location to a new location. It updates the parent of this folder to the new Id given.
108108
* Moves a folder
109-
* @param folderId
110-
* @param newParentFolderId
109+
* @param folderId The ID of the folder to move
110+
* @param newParentFolderId The ID for the target parent folder.
111111
*/
112112
public async move(folderId: string, newParentFolderId: string, _options?: Configuration): Promise<RequestContext> {
113113
let _config = _options || this.configuration;
@@ -200,7 +200,7 @@ export class FoldersApiRequestFactory extends BaseAPIRequestFactory {
200200
/**
201201
* Deletes the folder with the given Id.
202202
* Deletes a folder
203-
* @param folderId
203+
* @param folderId The ID of the folder to delete
204204
*/
205205
public async remove(folderId: string, _options?: Configuration): Promise<RequestContext> {
206206
let _config = _options || this.configuration;
@@ -238,8 +238,8 @@ export class FoldersApiRequestFactory extends BaseAPIRequestFactory {
238238
/**
239239
* Renames the given folderId with a new name.
240240
* Rename a folder
241-
* @param folderId
242-
* @param newFolderName
241+
* @param folderId The ID of the folder to rename
242+
* @param newFolderName The new name of the folder.
243243
*/
244244
public async rename(folderId: string, newFolderName?: string, _options?: Configuration): Promise<RequestContext> {
245245
let _config = _options || this.configuration;

codegen/crm/lists/apis/ListsApi.ts

Lines changed: 239 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,52 @@ import { ListSearchRequest } from '../models/ListSearchRequest';
1616
import { ListSearchResponse } from '../models/ListSearchResponse';
1717
import { ListUpdateResponse } from '../models/ListUpdateResponse';
1818
import { ListsByIdResponse } from '../models/ListsByIdResponse';
19+
import { PublicListConversionResponse } from '../models/PublicListConversionResponse';
20+
import { PublicListConversionTime } from '../models/PublicListConversionTime';
1921

2022
/**
2123
* no description
2224
*/
2325
export class ListsApiRequestFactory extends BaseAPIRequestFactory {
2426

27+
/**
28+
* Delete an existing scheduled conversion for a list.
29+
* Cancel the conversion of a list
30+
* @param listId The ID of the list that you want to cancel the conversion for.
31+
*/
32+
public async cancelConversion(listId: string, _options?: Configuration): Promise<RequestContext> {
33+
let _config = _options || this.configuration;
34+
35+
// verify required parameter 'listId' is not null or undefined
36+
if (listId === null || listId === undefined) {
37+
throw new RequiredError("ListsApi", "cancelConversion", "listId");
38+
}
39+
40+
41+
// Path Params
42+
const localVarPath = '/crm/v3/lists/{listId}/schedule-conversion'
43+
.replace('{' + 'listId' + '}', encodeURIComponent(String(listId)));
44+
45+
// Make Request Context
46+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
47+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
48+
49+
50+
let authMethod: SecurityAuthentication | undefined;
51+
// Apply auth methods
52+
authMethod = _config.authMethods["oauth2"]
53+
if (authMethod?.applySecurityAuthentication) {
54+
await authMethod?.applySecurityAuthentication(requestContext);
55+
}
56+
57+
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
58+
if (defaultAuth?.applySecurityAuthentication) {
59+
await defaultAuth?.applySecurityAuthentication(requestContext);
60+
}
61+
62+
return requestContext;
63+
}
64+
2565
/**
2666
* Create a new list with the provided object list definition.
2767
* Create List
@@ -73,7 +113,7 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory {
73113
/**
74114
* Search lists by list name or page through all lists by providing an empty `query` value.
75115
* Search Lists
76-
* @param listSearchRequest
116+
* @param listSearchRequest The IDs of the records to add and/or remove from the list.
77117
*/
78118
public async doSearch(listSearchRequest: ListSearchRequest, _options?: Configuration): Promise<RequestContext> {
79119
let _config = _options || this.configuration;
@@ -263,6 +303,44 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory {
263303
return requestContext;
264304
}
265305

306+
/**
307+
* Retrieve the conversion details for a list. This can be used to check for an upcoming conversion, or to get the details of when a list was already converted.
308+
* Retrieve the conversion details for a list
309+
* @param listId The ID of the list to schedule the conversion for.
310+
*/
311+
public async getConversionDetails(listId: string, _options?: Configuration): Promise<RequestContext> {
312+
let _config = _options || this.configuration;
313+
314+
// verify required parameter 'listId' is not null or undefined
315+
if (listId === null || listId === undefined) {
316+
throw new RequiredError("ListsApi", "getConversionDetails", "listId");
317+
}
318+
319+
320+
// Path Params
321+
const localVarPath = '/crm/v3/lists/{listId}/schedule-conversion'
322+
.replace('{' + 'listId' + '}', encodeURIComponent(String(listId)));
323+
324+
// Make Request Context
325+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
326+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
327+
328+
329+
let authMethod: SecurityAuthentication | undefined;
330+
// Apply auth methods
331+
authMethod = _config.authMethods["oauth2"]
332+
if (authMethod?.applySecurityAuthentication) {
333+
await authMethod?.applySecurityAuthentication(requestContext);
334+
}
335+
336+
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
337+
if (defaultAuth?.applySecurityAuthentication) {
338+
await defaultAuth?.applySecurityAuthentication(requestContext);
339+
}
340+
341+
return requestContext;
342+
}
343+
266344
/**
267345
* Delete a list by **ILS list ID**. Lists deleted through this endpoint can be restored up to 90-days following the delete. After 90-days, the list is purged and can no longer be restored.
268346
* Delete a List
@@ -339,6 +417,62 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory {
339417
return requestContext;
340418
}
341419

420+
/**
421+
* Schedule the conversion of an active list into a static list, or update the already scheduled conversion. This can be scheduled for a specific date or based on activity.
422+
* Schedule or update the conversion of a list to static
423+
* @param listId The ID of the list to schedule the conversion for.
424+
* @param publicListConversionTime
425+
*/
426+
public async scheduleOrUpdateConversion(listId: string, publicListConversionTime: PublicListConversionTime, _options?: Configuration): Promise<RequestContext> {
427+
let _config = _options || this.configuration;
428+
429+
// verify required parameter 'listId' is not null or undefined
430+
if (listId === null || listId === undefined) {
431+
throw new RequiredError("ListsApi", "scheduleOrUpdateConversion", "listId");
432+
}
433+
434+
435+
// verify required parameter 'publicListConversionTime' is not null or undefined
436+
if (publicListConversionTime === null || publicListConversionTime === undefined) {
437+
throw new RequiredError("ListsApi", "scheduleOrUpdateConversion", "publicListConversionTime");
438+
}
439+
440+
441+
// Path Params
442+
const localVarPath = '/crm/v3/lists/{listId}/schedule-conversion'
443+
.replace('{' + 'listId' + '}', encodeURIComponent(String(listId)));
444+
445+
// Make Request Context
446+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT);
447+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
448+
449+
450+
// Body Params
451+
const contentType = ObjectSerializer.getPreferredMediaType([
452+
"application/json"
453+
]);
454+
requestContext.setHeaderParam("Content-Type", contentType);
455+
const serializedBody = ObjectSerializer.stringify(
456+
ObjectSerializer.serialize(publicListConversionTime, "PublicListConversionTime", ""),
457+
contentType
458+
);
459+
requestContext.setBody(serializedBody);
460+
461+
let authMethod: SecurityAuthentication | undefined;
462+
// Apply auth methods
463+
authMethod = _config.authMethods["oauth2"]
464+
if (authMethod?.applySecurityAuthentication) {
465+
await authMethod?.applySecurityAuthentication(requestContext);
466+
}
467+
468+
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
469+
if (defaultAuth?.applySecurityAuthentication) {
470+
await defaultAuth?.applySecurityAuthentication(requestContext);
471+
}
472+
473+
return requestContext;
474+
}
475+
342476
/**
343477
* Update the filter branch definition of a `DYNAMIC` list. Once updated, the list memberships will be re-evaluated and updated to match the new definition.
344478
* Update List Filter Definition
@@ -458,6 +592,38 @@ export class ListsApiRequestFactory extends BaseAPIRequestFactory {
458592

459593
export class ListsApiResponseProcessor {
460594

595+
/**
596+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
597+
* to the expected objects
598+
*
599+
* @params response Response returned by the server for a request to cancelConversion
600+
* @throws ApiException if the response code was not in [200, 299]
601+
*/
602+
public async cancelConversionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void >> {
603+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
604+
if (isCodeInRange("204", response.httpStatusCode)) {
605+
return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
606+
}
607+
if (isCodeInRange("0", response.httpStatusCode)) {
608+
const body: Error = ObjectSerializer.deserialize(
609+
ObjectSerializer.parse(await response.body.text(), contentType),
610+
"Error", ""
611+
) as Error;
612+
throw new ApiException<Error>(response.httpStatusCode, "An error occurred.", body, response.headers);
613+
}
614+
615+
// Work around for missing responses in specification, e.g. for petstore.yaml
616+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
617+
const body: void = ObjectSerializer.deserialize(
618+
ObjectSerializer.parse(await response.body.text(), contentType),
619+
"void", ""
620+
) as void;
621+
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
622+
}
623+
624+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
625+
}
626+
461627
/**
462628
* Unwraps the actual response sent by the server from the response context and deserializes the response content
463629
* to the expected objects
@@ -638,6 +804,42 @@ export class ListsApiResponseProcessor {
638804
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
639805
}
640806

807+
/**
808+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
809+
* to the expected objects
810+
*
811+
* @params response Response returned by the server for a request to getConversionDetails
812+
* @throws ApiException if the response code was not in [200, 299]
813+
*/
814+
public async getConversionDetailsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PublicListConversionResponse >> {
815+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
816+
if (isCodeInRange("200", response.httpStatusCode)) {
817+
const body: PublicListConversionResponse = ObjectSerializer.deserialize(
818+
ObjectSerializer.parse(await response.body.text(), contentType),
819+
"PublicListConversionResponse", ""
820+
) as PublicListConversionResponse;
821+
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
822+
}
823+
if (isCodeInRange("0", response.httpStatusCode)) {
824+
const body: Error = ObjectSerializer.deserialize(
825+
ObjectSerializer.parse(await response.body.text(), contentType),
826+
"Error", ""
827+
) as Error;
828+
throw new ApiException<Error>(response.httpStatusCode, "An error occurred.", body, response.headers);
829+
}
830+
831+
// Work around for missing responses in specification, e.g. for petstore.yaml
832+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
833+
const body: PublicListConversionResponse = ObjectSerializer.deserialize(
834+
ObjectSerializer.parse(await response.body.text(), contentType),
835+
"PublicListConversionResponse", ""
836+
) as PublicListConversionResponse;
837+
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
838+
}
839+
840+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
841+
}
842+
641843
/**
642844
* Unwraps the actual response sent by the server from the response context and deserializes the response content
643845
* to the expected objects
@@ -702,6 +904,42 @@ export class ListsApiResponseProcessor {
702904
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
703905
}
704906

907+
/**
908+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
909+
* to the expected objects
910+
*
911+
* @params response Response returned by the server for a request to scheduleOrUpdateConversion
912+
* @throws ApiException if the response code was not in [200, 299]
913+
*/
914+
public async scheduleOrUpdateConversionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PublicListConversionResponse >> {
915+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
916+
if (isCodeInRange("200", response.httpStatusCode)) {
917+
const body: PublicListConversionResponse = ObjectSerializer.deserialize(
918+
ObjectSerializer.parse(await response.body.text(), contentType),
919+
"PublicListConversionResponse", ""
920+
) as PublicListConversionResponse;
921+
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
922+
}
923+
if (isCodeInRange("0", response.httpStatusCode)) {
924+
const body: Error = ObjectSerializer.deserialize(
925+
ObjectSerializer.parse(await response.body.text(), contentType),
926+
"Error", ""
927+
) as Error;
928+
throw new ApiException<Error>(response.httpStatusCode, "An error occurred.", body, response.headers);
929+
}
930+
931+
// Work around for missing responses in specification, e.g. for petstore.yaml
932+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
933+
const body: PublicListConversionResponse = ObjectSerializer.deserialize(
934+
ObjectSerializer.parse(await response.body.text(), contentType),
935+
"PublicListConversionResponse", ""
936+
) as PublicListConversionResponse;
937+
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
938+
}
939+
940+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
941+
}
942+
705943
/**
706944
* Unwraps the actual response sent by the server from the response context and deserializes the response content
707945
* to the expected objects

codegen/crm/lists/apis/MembershipsApi.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory {
2222
* Add the records provided to the list. Records that do not exist or that are already members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`.
2323
* Add Records to a List
2424
* @param listId The **ILS ID** of the &#x60;MANUAL&#x60; or &#x60;SNAPSHOT&#x60; list.
25-
* @param requestBody
25+
* @param requestBody The IDs of the records to add to the list.
2626
*/
2727
public async add(listId: string, requestBody: Array<string>, _options?: Configuration): Promise<RequestContext> {
2828
let _config = _options || this.configuration;
@@ -124,7 +124,7 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory {
124124
* Add and/or remove records that have already been created in the system to and/or from a list. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`.
125125
* Add and/or Remove Records from a List
126126
* @param listId The **ILS ID** of the &#x60;MANUAL&#x60; or &#x60;SNAPSHOT&#x60; list.
127-
* @param membershipChangeRequest
127+
* @param membershipChangeRequest The IDs of the records to add and/or remove from the list.
128128
*/
129129
public async addAndRemove(listId: string, membershipChangeRequest: MembershipChangeRequest, _options?: Configuration): Promise<RequestContext> {
130130
let _config = _options || this.configuration;
@@ -344,7 +344,7 @@ export class MembershipsApiRequestFactory extends BaseAPIRequestFactory {
344344
* Remove the records provided from the list. Records that do not exist or that are not members of the list are ignored. This endpoint only works for lists that have a `processingType` of `MANUAL` or `SNAPSHOT`.
345345
* Remove Records from a List
346346
* @param listId The **ILS ID** of the &#x60;MANUAL&#x60; or &#x60;SNAPSHOT&#x60; list.
347-
* @param requestBody
347+
* @param requestBody The IDs of the records to remove from the list.
348348
*/
349349
public async remove(listId: string, requestBody: Array<string>, _options?: Configuration): Promise<RequestContext> {
350350
let _config = _options || this.configuration;

codegen/crm/lists/models/ApiCollectionResponseJoinTimeAndRecordId.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Lists
3-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2+
* CRM Lists
3+
* CRUD operations to manage lists and list memberships
44
*
55
* OpenAPI spec version: v3
66
*

codegen/crm/lists/models/ApiCollectionResponseRecordListMembershipNoPaging.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Lists
3-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2+
* CRM Lists
3+
* CRUD operations to manage lists and list memberships
44
*
55
* OpenAPI spec version: v3
66
*

codegen/crm/lists/models/ErrorDetail.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Lists
3-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2+
* CRM Lists
3+
* CRUD operations to manage lists and list memberships
44
*
55
* OpenAPI spec version: v3
66
*

codegen/crm/lists/models/JoinTimeAndRecordId.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Lists
3-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2+
* CRM Lists
3+
* CRUD operations to manage lists and list memberships
44
*
55
* OpenAPI spec version: v3
66
*

0 commit comments

Comments
 (0)