Skip to content

Commit

Permalink
Codegen: CRM Companies, Contacts and Deals
Browse files Browse the repository at this point in the history
  • Loading branch information
ksvirkou-hubspot committed Sep 13, 2024
1 parent 902ddff commit 9b04378
Show file tree
Hide file tree
Showing 26 changed files with 95 additions and 134 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SimplePublicObject } from '../models/SimplePublicObject';
/**
* no description
*/
export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory {
export class MergeApiRequestFactory extends BaseAPIRequestFactory {

/**
* Merge two companies with same type
Expand All @@ -25,7 +25,7 @@ export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory {

// verify required parameter 'publicMergeInput' is not null or undefined
if (publicMergeInput === null || publicMergeInput === undefined) {
throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput");
throw new RequiredError("MergeApi", "merge", "publicMergeInput");
}


Expand Down Expand Up @@ -65,7 +65,7 @@ export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory {

}

export class PublicObjectApiResponseProcessor {
export class MergeApiResponseProcessor {

/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
Expand Down
2 changes: 1 addition & 1 deletion codegen/crm/companies/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export * from "./servers";
export { RequiredError } from "./apis/baseapi";

export { PromiseMiddleware as Middleware } from './middleware';
export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI';
export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseMergeApi as MergeApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI';

2 changes: 1 addition & 1 deletion codegen/crm/companies/models/AssociationSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: v3
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId';

export class BatchReadInputSimplePublicObjectId {
'propertiesWithHistory': Array<string>;
/**
* The name of a property whose values are unique for this object
*/
'idProperty'?: string;
'inputs': Array<SimplePublicObjectId>;
'properties': Array<string>;
Expand Down
6 changes: 0 additions & 6 deletions codegen/crm/companies/models/SimplePublicObjectBatchInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@


export class SimplePublicObjectBatchInput {
/**
* The name of a property whose values are unique for this object
*/
'idProperty'?: string;
'objectWriteTraceId'?: string;
/**
* The id to be updated. This can be the object id, or the unique property value of the idProperty property
*/
'id': string;
'properties': { [key: string]: string; };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@


export class SimplePublicObjectBatchInputUpsert {
/**
* The name of a property whose values are unique for this object
*/
'idProperty'?: string;
'objectWriteTraceId'?: string;
'id': string;
Expand Down
20 changes: 10 additions & 10 deletions codegen/crm/companies/types/ObjectParamAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,38 +383,38 @@ export class ObjectBatchApi {

}

import { ObservablePublicObjectApi } from "./ObservableAPI";
import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi";
import { ObservableMergeApi } from "./ObservableAPI";
import { MergeApiRequestFactory, MergeApiResponseProcessor} from "../apis/MergeApi";

export interface PublicObjectApiMergeRequest {
export interface MergeApiMergeRequest {
/**
*
* @type PublicMergeInput
* @memberof PublicObjectApimerge
* @memberof MergeApimerge
*/
publicMergeInput: PublicMergeInput
}

export class ObjectPublicObjectApi {
private api: ObservablePublicObjectApi
export class ObjectMergeApi {
private api: ObservableMergeApi

public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) {
this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor);
public constructor(configuration: Configuration, requestFactory?: MergeApiRequestFactory, responseProcessor?: MergeApiResponseProcessor) {
this.api = new ObservableMergeApi(configuration, requestFactory, responseProcessor);
}

/**
* Merge two companies with same type
* @param param the request object
*/
public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise<HttpInfo<SimplePublicObject>> {
public mergeWithHttpInfo(param: MergeApiMergeRequest, options?: Configuration): Promise<HttpInfo<SimplePublicObject>> {
return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise();
}

/**
* Merge two companies with same type
* @param param the request object
*/
public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise<SimplePublicObject> {
public merge(param: MergeApiMergeRequest, options?: Configuration): Promise<SimplePublicObject> {
return this.api.merge(param.publicMergeInput, options).toPromise();
}

Expand Down
16 changes: 8 additions & 8 deletions codegen/crm/companies/types/ObservableAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,20 +404,20 @@ export class ObservableBatchApi {

}

import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi";
export class ObservablePublicObjectApi {
private requestFactory: PublicObjectApiRequestFactory;
private responseProcessor: PublicObjectApiResponseProcessor;
import { MergeApiRequestFactory, MergeApiResponseProcessor} from "../apis/MergeApi";
export class ObservableMergeApi {
private requestFactory: MergeApiRequestFactory;
private responseProcessor: MergeApiResponseProcessor;
private configuration: Configuration;

public constructor(
configuration: Configuration,
requestFactory?: PublicObjectApiRequestFactory,
responseProcessor?: PublicObjectApiResponseProcessor
requestFactory?: MergeApiRequestFactory,
responseProcessor?: MergeApiResponseProcessor
) {
this.configuration = configuration;
this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration);
this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor();
this.requestFactory = requestFactory || new MergeApiRequestFactory(configuration);
this.responseProcessor = responseProcessor || new MergeApiResponseProcessor();
}

/**
Expand Down
14 changes: 7 additions & 7 deletions codegen/crm/companies/types/PromiseAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,18 @@ export class PromiseBatchApi {



import { ObservablePublicObjectApi } from './ObservableAPI';
import { ObservableMergeApi } from './ObservableAPI';

import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi";
export class PromisePublicObjectApi {
private api: ObservablePublicObjectApi
import { MergeApiRequestFactory, MergeApiResponseProcessor} from "../apis/MergeApi";
export class PromiseMergeApi {
private api: ObservableMergeApi

public constructor(
configuration: Configuration,
requestFactory?: PublicObjectApiRequestFactory,
responseProcessor?: PublicObjectApiResponseProcessor
requestFactory?: MergeApiRequestFactory,
responseProcessor?: MergeApiResponseProcessor
) {
this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor);
this.api = new ObservableMergeApi(configuration, requestFactory, responseProcessor);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SimplePublicObject } from '../models/SimplePublicObject';
/**
* no description
*/
export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory {
export class MergeApiRequestFactory extends BaseAPIRequestFactory {

/**
* Merge two contacts with same type
Expand All @@ -25,7 +25,7 @@ export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory {

// verify required parameter 'publicMergeInput' is not null or undefined
if (publicMergeInput === null || publicMergeInput === undefined) {
throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput");
throw new RequiredError("MergeApi", "merge", "publicMergeInput");
}


Expand Down Expand Up @@ -65,7 +65,7 @@ export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory {

}

export class PublicObjectApiResponseProcessor {
export class MergeApiResponseProcessor {

/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
Expand Down
2 changes: 1 addition & 1 deletion codegen/crm/contacts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export * from "./servers";
export { RequiredError } from "./apis/baseapi";

export { PromiseMiddleware as Middleware } from './middleware';
export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromisePublicObjectApi as PublicObjectApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI';
export { PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseGDPRApi as GDPRApi, PromiseMergeApi as MergeApi, PromiseSearchApi as SearchApi } from './types/PromiseAPI';

Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import { SimplePublicObjectId } from '../models/SimplePublicObjectId';

export class BatchReadInputSimplePublicObjectId {
'propertiesWithHistory': Array<string>;
/**
* The name of a property whose values are unique for this object
*/
'idProperty'?: string;
'inputs': Array<SimplePublicObjectId>;
'properties': Array<string>;
Expand Down
3 changes: 0 additions & 3 deletions codegen/crm/contacts/models/PublicGdprDeleteInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@


export class PublicGdprDeleteInput {
/**
* The name of a property whose values are unique for this object
*/
'idProperty'?: string;
'objectId': string;

Expand Down
6 changes: 0 additions & 6 deletions codegen/crm/contacts/models/SimplePublicObjectBatchInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@


export class SimplePublicObjectBatchInput {
/**
* The name of a property whose values are unique for this object
*/
'idProperty'?: string;
'objectWriteTraceId'?: string;
/**
* The id to be updated. This can be the object id, or the unique property value of the idProperty property
*/
'id': string;
'properties': { [key: string]: string; };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@


export class SimplePublicObjectBatchInputUpsert {
/**
* The name of a property whose values are unique for this object
*/
'idProperty'?: string;
'objectWriteTraceId'?: string;
'id': string;
Expand Down
20 changes: 10 additions & 10 deletions codegen/crm/contacts/types/ObjectParamAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,38 +423,38 @@ export class ObjectGDPRApi {

}

import { ObservablePublicObjectApi } from "./ObservableAPI";
import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi";
import { ObservableMergeApi } from "./ObservableAPI";
import { MergeApiRequestFactory, MergeApiResponseProcessor} from "../apis/MergeApi";

export interface PublicObjectApiMergeRequest {
export interface MergeApiMergeRequest {
/**
*
* @type PublicMergeInput
* @memberof PublicObjectApimerge
* @memberof MergeApimerge
*/
publicMergeInput: PublicMergeInput
}

export class ObjectPublicObjectApi {
private api: ObservablePublicObjectApi
export class ObjectMergeApi {
private api: ObservableMergeApi

public constructor(configuration: Configuration, requestFactory?: PublicObjectApiRequestFactory, responseProcessor?: PublicObjectApiResponseProcessor) {
this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor);
public constructor(configuration: Configuration, requestFactory?: MergeApiRequestFactory, responseProcessor?: MergeApiResponseProcessor) {
this.api = new ObservableMergeApi(configuration, requestFactory, responseProcessor);
}

/**
* Merge two contacts with same type
* @param param the request object
*/
public mergeWithHttpInfo(param: PublicObjectApiMergeRequest, options?: Configuration): Promise<HttpInfo<SimplePublicObject>> {
public mergeWithHttpInfo(param: MergeApiMergeRequest, options?: Configuration): Promise<HttpInfo<SimplePublicObject>> {
return this.api.mergeWithHttpInfo(param.publicMergeInput, options).toPromise();
}

/**
* Merge two contacts with same type
* @param param the request object
*/
public merge(param: PublicObjectApiMergeRequest, options?: Configuration): Promise<SimplePublicObject> {
public merge(param: MergeApiMergeRequest, options?: Configuration): Promise<SimplePublicObject> {
return this.api.merge(param.publicMergeInput, options).toPromise();
}

Expand Down
16 changes: 8 additions & 8 deletions codegen/crm/contacts/types/ObservableAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,20 +456,20 @@ export class ObservableGDPRApi {

}

import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi";
export class ObservablePublicObjectApi {
private requestFactory: PublicObjectApiRequestFactory;
private responseProcessor: PublicObjectApiResponseProcessor;
import { MergeApiRequestFactory, MergeApiResponseProcessor} from "../apis/MergeApi";
export class ObservableMergeApi {
private requestFactory: MergeApiRequestFactory;
private responseProcessor: MergeApiResponseProcessor;
private configuration: Configuration;

public constructor(
configuration: Configuration,
requestFactory?: PublicObjectApiRequestFactory,
responseProcessor?: PublicObjectApiResponseProcessor
requestFactory?: MergeApiRequestFactory,
responseProcessor?: MergeApiResponseProcessor
) {
this.configuration = configuration;
this.requestFactory = requestFactory || new PublicObjectApiRequestFactory(configuration);
this.responseProcessor = responseProcessor || new PublicObjectApiResponseProcessor();
this.requestFactory = requestFactory || new MergeApiRequestFactory(configuration);
this.responseProcessor = responseProcessor || new MergeApiResponseProcessor();
}

/**
Expand Down
14 changes: 7 additions & 7 deletions codegen/crm/contacts/types/PromiseAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,18 +314,18 @@ export class PromiseGDPRApi {



import { ObservablePublicObjectApi } from './ObservableAPI';
import { ObservableMergeApi } from './ObservableAPI';

import { PublicObjectApiRequestFactory, PublicObjectApiResponseProcessor} from "../apis/PublicObjectApi";
export class PromisePublicObjectApi {
private api: ObservablePublicObjectApi
import { MergeApiRequestFactory, MergeApiResponseProcessor} from "../apis/MergeApi";
export class PromiseMergeApi {
private api: ObservableMergeApi

public constructor(
configuration: Configuration,
requestFactory?: PublicObjectApiRequestFactory,
responseProcessor?: PublicObjectApiResponseProcessor
requestFactory?: MergeApiRequestFactory,
responseProcessor?: MergeApiResponseProcessor
) {
this.api = new ObservablePublicObjectApi(configuration, requestFactory, responseProcessor);
this.api = new ObservableMergeApi(configuration, requestFactory, responseProcessor);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ import { SimplePublicObject } from '../models/SimplePublicObject';
/**
* no description
*/
export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory {
export class MergeApiRequestFactory extends BaseAPIRequestFactory {

/**
* Merge two deals with same type
* Merge two deals
* @param publicMergeInput
*/
public async merge(publicMergeInput: PublicMergeInput, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;

// verify required parameter 'publicMergeInput' is not null or undefined
if (publicMergeInput === null || publicMergeInput === undefined) {
throw new RequiredError("PublicObjectApi", "merge", "publicMergeInput");
throw new RequiredError("MergeApi", "merge", "publicMergeInput");
}


Expand Down Expand Up @@ -65,7 +65,7 @@ export class PublicObjectApiRequestFactory extends BaseAPIRequestFactory {

}

export class PublicObjectApiResponseProcessor {
export class MergeApiResponseProcessor {

/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
Expand Down
Loading

0 comments on commit 9b04378

Please sign in to comment.