@randock/nameshift-api-client 0.0.16 → 0.0.17

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.
@@ -18,8 +18,8 @@ import type {
18
18
  CreateLeadMessageInput,
19
19
  IntersectionLeadDtoWithLeadDetailsDto,
20
20
  IntersectionLeadDtoWithListFieldsDto,
21
- LeadMessageDto,
22
21
  ListLeadMessagesDto,
22
+ ObjectId,
23
23
  PutLeadInput,
24
24
  UpdateSettings429Response,
25
25
  } from '../models/index';
@@ -30,30 +30,30 @@ import {
30
30
  IntersectionLeadDtoWithLeadDetailsDtoToJSON,
31
31
  IntersectionLeadDtoWithListFieldsDtoFromJSON,
32
32
  IntersectionLeadDtoWithListFieldsDtoToJSON,
33
- LeadMessageDtoFromJSON,
34
- LeadMessageDtoToJSON,
35
33
  ListLeadMessagesDtoFromJSON,
36
34
  ListLeadMessagesDtoToJSON,
35
+ ObjectIdFromJSON,
36
+ ObjectIdToJSON,
37
37
  PutLeadInputFromJSON,
38
38
  PutLeadInputToJSON,
39
39
  UpdateSettings429ResponseFromJSON,
40
40
  UpdateSettings429ResponseToJSON,
41
41
  } from '../models/index';
42
42
 
43
- export interface CreateMessageRequest {
43
+ export interface LeadsApiCreateMessageRequest {
44
44
  leadId: string;
45
45
  createLeadMessageInput: CreateLeadMessageInput;
46
46
  }
47
47
 
48
- export interface GetRequest {
48
+ export interface LeadsApiGetRequest {
49
49
  leadId: string;
50
50
  }
51
51
 
52
- export interface GetMessagesRequest {
52
+ export interface LeadsApiGetMessagesRequest {
53
53
  leadId: string;
54
54
  }
55
55
 
56
- export interface PutOfferRequest {
56
+ export interface LeadsApiPutOfferRequest {
57
57
  leadId: string;
58
58
  putLeadInput: PutLeadInput;
59
59
  }
@@ -66,7 +66,7 @@ export class LeadsApi extends runtime.BaseAPI {
66
66
  /**
67
67
  *
68
68
  */
69
- async createMessageRaw(requestParameters: CreateMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadMessageDto>> {
69
+ async createMessageRaw(requestParameters: LeadsApiCreateMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ObjectId>> {
70
70
  if (requestParameters.leadId === null || requestParameters.leadId === undefined) {
71
71
  throw new runtime.RequiredError('leadId','Required parameter requestParameters.leadId was null or undefined when calling createMessage.');
72
72
  }
@@ -97,13 +97,13 @@ export class LeadsApi extends runtime.BaseAPI {
97
97
  body: CreateLeadMessageInputToJSON(requestParameters.createLeadMessageInput),
98
98
  }, initOverrides);
99
99
 
100
- return new runtime.JSONApiResponse(response, (jsonValue) => LeadMessageDtoFromJSON(jsonValue));
100
+ return new runtime.JSONApiResponse(response, (jsonValue) => ObjectIdFromJSON(jsonValue));
101
101
  }
102
102
 
103
103
  /**
104
104
  *
105
105
  */
106
- async createMessage(requestParameters: CreateMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadMessageDto> {
106
+ async createMessage(requestParameters: LeadsApiCreateMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectId> {
107
107
  const response = await this.createMessageRaw(requestParameters, initOverrides);
108
108
  return await response.value();
109
109
  }
@@ -111,7 +111,7 @@ export class LeadsApi extends runtime.BaseAPI {
111
111
  /**
112
112
  *
113
113
  */
114
- async getRaw(requestParameters: GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntersectionLeadDtoWithLeadDetailsDto>> {
114
+ async getRaw(requestParameters: LeadsApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntersectionLeadDtoWithLeadDetailsDto>> {
115
115
  if (requestParameters.leadId === null || requestParameters.leadId === undefined) {
116
116
  throw new runtime.RequiredError('leadId','Required parameter requestParameters.leadId was null or undefined when calling get.');
117
117
  }
@@ -141,7 +141,7 @@ export class LeadsApi extends runtime.BaseAPI {
141
141
  /**
142
142
  *
143
143
  */
144
- async get(requestParameters: GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntersectionLeadDtoWithLeadDetailsDto> {
144
+ async get(requestParameters: LeadsApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntersectionLeadDtoWithLeadDetailsDto> {
145
145
  const response = await this.getRaw(requestParameters, initOverrides);
146
146
  return await response.value();
147
147
  }
@@ -149,7 +149,7 @@ export class LeadsApi extends runtime.BaseAPI {
149
149
  /**
150
150
  *
151
151
  */
152
- async getMessagesRaw(requestParameters: GetMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListLeadMessagesDto>> {
152
+ async getMessagesRaw(requestParameters: LeadsApiGetMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListLeadMessagesDto>> {
153
153
  if (requestParameters.leadId === null || requestParameters.leadId === undefined) {
154
154
  throw new runtime.RequiredError('leadId','Required parameter requestParameters.leadId was null or undefined when calling getMessages.');
155
155
  }
@@ -179,7 +179,7 @@ export class LeadsApi extends runtime.BaseAPI {
179
179
  /**
180
180
  *
181
181
  */
182
- async getMessages(requestParameters: GetMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListLeadMessagesDto> {
182
+ async getMessages(requestParameters: LeadsApiGetMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListLeadMessagesDto> {
183
183
  const response = await this.getMessagesRaw(requestParameters, initOverrides);
184
184
  return await response.value();
185
185
  }
@@ -221,7 +221,7 @@ export class LeadsApi extends runtime.BaseAPI {
221
221
  /**
222
222
  *
223
223
  */
224
- async putOfferRaw(requestParameters: PutOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadMessageDto>> {
224
+ async putOfferRaw(requestParameters: LeadsApiPutOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
225
225
  if (requestParameters.leadId === null || requestParameters.leadId === undefined) {
226
226
  throw new runtime.RequiredError('leadId','Required parameter requestParameters.leadId was null or undefined when calling putOffer.');
227
227
  }
@@ -252,15 +252,14 @@ export class LeadsApi extends runtime.BaseAPI {
252
252
  body: PutLeadInputToJSON(requestParameters.putLeadInput),
253
253
  }, initOverrides);
254
254
 
255
- return new runtime.JSONApiResponse(response, (jsonValue) => LeadMessageDtoFromJSON(jsonValue));
255
+ return new runtime.VoidApiResponse(response);
256
256
  }
257
257
 
258
258
  /**
259
259
  *
260
260
  */
261
- async putOffer(requestParameters: PutOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadMessageDto> {
262
- const response = await this.putOfferRaw(requestParameters, initOverrides);
263
- return await response.value();
261
+ async putOffer(requestParameters: LeadsApiPutOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
262
+ await this.putOfferRaw(requestParameters, initOverrides);
264
263
  }
265
264
 
266
265
  }
@@ -17,7 +17,7 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  BatchUpdate404Response,
19
19
  CreateLeadInput,
20
- LeadDto,
20
+ ObjectId,
21
21
  UpdateSettings429Response,
22
22
  } from '../models/index';
23
23
  import {
@@ -25,13 +25,13 @@ import {
25
25
  BatchUpdate404ResponseToJSON,
26
26
  CreateLeadInputFromJSON,
27
27
  CreateLeadInputToJSON,
28
- LeadDtoFromJSON,
29
- LeadDtoToJSON,
28
+ ObjectIdFromJSON,
29
+ ObjectIdToJSON,
30
30
  UpdateSettings429ResponseFromJSON,
31
31
  UpdateSettings429ResponseToJSON,
32
32
  } from '../models/index';
33
33
 
34
- export interface CreateLeadRequest {
34
+ export interface LeadsPublicApiCreateLeadRequest {
35
35
  createLeadInput: CreateLeadInput;
36
36
  }
37
37
 
@@ -43,7 +43,7 @@ export class LeadsPublicApi extends runtime.BaseAPI {
43
43
  /**
44
44
  *
45
45
  */
46
- async createLeadRaw(requestParameters: CreateLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadDto>> {
46
+ async createLeadRaw(requestParameters: LeadsPublicApiCreateLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ObjectId>> {
47
47
  if (requestParameters.createLeadInput === null || requestParameters.createLeadInput === undefined) {
48
48
  throw new runtime.RequiredError('createLeadInput','Required parameter requestParameters.createLeadInput was null or undefined when calling createLead.');
49
49
  }
@@ -62,13 +62,13 @@ export class LeadsPublicApi extends runtime.BaseAPI {
62
62
  body: CreateLeadInputToJSON(requestParameters.createLeadInput),
63
63
  }, initOverrides);
64
64
 
65
- return new runtime.JSONApiResponse(response, (jsonValue) => LeadDtoFromJSON(jsonValue));
65
+ return new runtime.JSONApiResponse(response, (jsonValue) => ObjectIdFromJSON(jsonValue));
66
66
  }
67
67
 
68
68
  /**
69
69
  *
70
70
  */
71
- async createLead(requestParameters: CreateLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadDto> {
71
+ async createLead(requestParameters: LeadsPublicApiCreateLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectId> {
72
72
  const response = await this.createLeadRaw(requestParameters, initOverrides);
73
73
  return await response.value();
74
74
  }
@@ -0,0 +1,151 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
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
+ import type { AccountDto } from './AccountDto';
17
+ import {
18
+ AccountDtoFromJSON,
19
+ AccountDtoFromJSONTyped,
20
+ AccountDtoToJSON,
21
+ } from './AccountDto';
22
+ import type { MoneyDto } from './MoneyDto';
23
+ import {
24
+ MoneyDtoFromJSON,
25
+ MoneyDtoFromJSONTyped,
26
+ MoneyDtoToJSON,
27
+ } from './MoneyDto';
28
+
29
+ /**
30
+ *
31
+ * @export
32
+ * @interface IntersectionDomainDtoWithHijackerDtoWithAccountDto
33
+ */
34
+ export interface IntersectionDomainDtoWithHijackerDtoWithAccountDto {
35
+ /**
36
+ * The uuid for this domain.
37
+ * @type {string}
38
+ * @memberof IntersectionDomainDtoWithHijackerDtoWithAccountDto
39
+ */
40
+ id: string;
41
+ /**
42
+ * The TLD for this domain.
43
+ * @type {string}
44
+ * @memberof IntersectionDomainDtoWithHijackerDtoWithAccountDto
45
+ */
46
+ tld: string;
47
+ /**
48
+ * Whether this domain is verified by the owner (ns3, txt) or not.
49
+ * @type {boolean}
50
+ * @memberof IntersectionDomainDtoWithHijackerDtoWithAccountDto
51
+ */
52
+ verified: boolean;
53
+ /**
54
+ * Whether the nameservers (ns1,ns2) are set or not.
55
+ * @type {boolean}
56
+ * @memberof IntersectionDomainDtoWithHijackerDtoWithAccountDto
57
+ */
58
+ nameservers: boolean;
59
+ /**
60
+ * The domain name (example.com)
61
+ * @type {string}
62
+ * @memberof IntersectionDomainDtoWithHijackerDtoWithAccountDto
63
+ */
64
+ name: string;
65
+ /**
66
+ *
67
+ * @type {MoneyDto}
68
+ * @memberof IntersectionDomainDtoWithHijackerDtoWithAccountDto
69
+ */
70
+ buyNow: MoneyDto;
71
+ /**
72
+ *
73
+ * @type {MoneyDto}
74
+ * @memberof IntersectionDomainDtoWithHijackerDtoWithAccountDto
75
+ */
76
+ minOffer: MoneyDto;
77
+ /**
78
+ *
79
+ * @type {AccountDto}
80
+ * @memberof IntersectionDomainDtoWithHijackerDtoWithAccountDto
81
+ */
82
+ hijacker: AccountDto | null;
83
+ /**
84
+ *
85
+ * @type {AccountDto}
86
+ * @memberof IntersectionDomainDtoWithHijackerDtoWithAccountDto
87
+ */
88
+ account: AccountDto;
89
+ }
90
+
91
+ /**
92
+ * Check if a given object implements the IntersectionDomainDtoWithHijackerDtoWithAccountDto interface.
93
+ */
94
+ export function instanceOfIntersectionDomainDtoWithHijackerDtoWithAccountDto(value: object): boolean {
95
+ let isInstance = true;
96
+ isInstance = isInstance && "id" in value;
97
+ isInstance = isInstance && "tld" in value;
98
+ isInstance = isInstance && "verified" in value;
99
+ isInstance = isInstance && "nameservers" in value;
100
+ isInstance = isInstance && "name" in value;
101
+ isInstance = isInstance && "buyNow" in value;
102
+ isInstance = isInstance && "minOffer" in value;
103
+ isInstance = isInstance && "hijacker" in value;
104
+ isInstance = isInstance && "account" in value;
105
+
106
+ return isInstance;
107
+ }
108
+
109
+ export function IntersectionDomainDtoWithHijackerDtoWithAccountDtoFromJSON(json: any): IntersectionDomainDtoWithHijackerDtoWithAccountDto {
110
+ return IntersectionDomainDtoWithHijackerDtoWithAccountDtoFromJSONTyped(json, false);
111
+ }
112
+
113
+ export function IntersectionDomainDtoWithHijackerDtoWithAccountDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntersectionDomainDtoWithHijackerDtoWithAccountDto {
114
+ if ((json === undefined) || (json === null)) {
115
+ return json;
116
+ }
117
+ return {
118
+
119
+ 'id': json['id'],
120
+ 'tld': json['tld'],
121
+ 'verified': json['verified'],
122
+ 'nameservers': json['nameservers'],
123
+ 'name': json['name'],
124
+ 'buyNow': MoneyDtoFromJSON(json['buyNow']),
125
+ 'minOffer': MoneyDtoFromJSON(json['minOffer']),
126
+ 'hijacker': AccountDtoFromJSON(json['hijacker']),
127
+ 'account': AccountDtoFromJSON(json['account']),
128
+ };
129
+ }
130
+
131
+ export function IntersectionDomainDtoWithHijackerDtoWithAccountDtoToJSON(value?: IntersectionDomainDtoWithHijackerDtoWithAccountDto | null): any {
132
+ if (value === undefined) {
133
+ return undefined;
134
+ }
135
+ if (value === null) {
136
+ return null;
137
+ }
138
+ return {
139
+
140
+ 'id': value.id,
141
+ 'tld': value.tld,
142
+ 'verified': value.verified,
143
+ 'nameservers': value.nameservers,
144
+ 'name': value.name,
145
+ 'buyNow': MoneyDtoToJSON(value.buyNow),
146
+ 'minOffer': MoneyDtoToJSON(value.minOffer),
147
+ 'hijacker': AccountDtoToJSON(value.hijacker),
148
+ 'account': AccountDtoToJSON(value.account),
149
+ };
150
+ }
151
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
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 ObjectId
20
+ */
21
+ export interface ObjectId {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ObjectId
26
+ */
27
+ id: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ObjectId interface.
32
+ */
33
+ export function instanceOfObjectId(value: object): boolean {
34
+ let isInstance = true;
35
+ isInstance = isInstance && "id" in value;
36
+
37
+ return isInstance;
38
+ }
39
+
40
+ export function ObjectIdFromJSON(json: any): ObjectId {
41
+ return ObjectIdFromJSONTyped(json, false);
42
+ }
43
+
44
+ export function ObjectIdFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectId {
45
+ if ((json === undefined) || (json === null)) {
46
+ return json;
47
+ }
48
+ return {
49
+
50
+ 'id': json['id'],
51
+ };
52
+ }
53
+
54
+ export function ObjectIdToJSON(value?: ObjectId | null): any {
55
+ if (value === undefined) {
56
+ return undefined;
57
+ }
58
+ if (value === null) {
59
+ return null;
60
+ }
61
+ return {
62
+
63
+ 'id': value.id,
64
+ };
65
+ }
66
+
@@ -11,16 +11,13 @@ export * from './CreateLeadInput';
11
11
  export * from './CreateLeadMessageInput';
12
12
  export * from './DeleteDomainsInput';
13
13
  export * from './DomainDto';
14
- export * from './IntersectionAccountDtoWithAddressDto';
15
- export * from './IntersectionAccountDtoWithFinancialDto';
16
14
  export * from './IntersectionAccountDtoWithFinancialDtoWithSettingsDtoWithAddressDto';
17
- export * from './IntersectionAccountDtoWithSettingsDto';
18
15
  export * from './IntersectionDomainDtoWithAccountDto';
16
+ export * from './IntersectionDomainDtoWithHijackerDtoWithAccountDto';
19
17
  export * from './IntersectionLeadDtoWithLeadDetailsDto';
20
18
  export * from './IntersectionLeadDtoWithListFieldsDto';
21
19
  export * from './IntersectionLeadDtoWithListFieldsDtoLastMessageData';
22
20
  export * from './IntersectionLeadDtoWithListFieldsDtoLastOffer';
23
- export * from './LeadDto';
24
21
  export * from './LeadMessageData';
25
22
  export * from './LeadMessageDto';
26
23
  export * from './LeadMessageDtoData';
@@ -33,6 +30,7 @@ export * from './Login429Response';
33
30
  export * from './LoginInput';
34
31
  export * from './MoneyDto';
35
32
  export * from './MoneyInput';
33
+ export * from './ObjectId';
36
34
  export * from './PaginateResponse';
37
35
  export * from './PaginateResponseLinks';
38
36
  export * from './PaginateResponseMeta';