@homespot-sdk/api 0.0.637 → 0.0.639

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.
Files changed (145) hide show
  1. package/.openapi-generator/FILES +38 -0
  2. package/README.md +32 -3
  3. package/dist/apis/AgencyQueryControllerApi.d.ts +46 -0
  4. package/dist/apis/AgencyQueryControllerApi.js +65 -0
  5. package/dist/apis/LeadControllerApi.d.ts +280 -0
  6. package/dist/apis/LeadControllerApi.js +452 -0
  7. package/dist/apis/LeadQueryControllerApi.d.ts +88 -0
  8. package/dist/apis/LeadQueryControllerApi.js +122 -0
  9. package/dist/apis/PublicAgencyControllerApi.d.ts +1 -21
  10. package/dist/apis/PublicAgencyControllerApi.js +0 -32
  11. package/dist/apis/index.d.ts +3 -0
  12. package/dist/apis/index.js +3 -0
  13. package/dist/esm/apis/AgencyQueryControllerApi.d.ts +46 -0
  14. package/dist/esm/apis/AgencyQueryControllerApi.js +61 -0
  15. package/dist/esm/apis/LeadControllerApi.d.ts +280 -0
  16. package/dist/esm/apis/LeadControllerApi.js +448 -0
  17. package/dist/esm/apis/LeadQueryControllerApi.d.ts +88 -0
  18. package/dist/esm/apis/LeadQueryControllerApi.js +118 -0
  19. package/dist/esm/apis/PublicAgencyControllerApi.d.ts +1 -21
  20. package/dist/esm/apis/PublicAgencyControllerApi.js +1 -33
  21. package/dist/esm/apis/index.d.ts +3 -0
  22. package/dist/esm/apis/index.js +3 -0
  23. package/dist/esm/models/AddressRefRequest.d.ts +63 -0
  24. package/dist/esm/models/AddressRefRequest.js +54 -0
  25. package/dist/esm/models/AssignToMemberRequest.d.ts +32 -0
  26. package/dist/esm/models/AssignToMemberRequest.js +43 -0
  27. package/dist/esm/models/ChangeStatusRequest.d.ts +44 -0
  28. package/dist/esm/models/ChangeStatusRequest.js +54 -0
  29. package/dist/esm/models/ContactInfoRequest.d.ts +50 -0
  30. package/dist/esm/models/ContactInfoRequest.js +49 -0
  31. package/dist/esm/models/CoordinatesRequest.d.ts +38 -0
  32. package/dist/esm/models/CoordinatesRequest.js +47 -0
  33. package/dist/esm/models/CreateLeadRequest.d.ts +45 -0
  34. package/dist/esm/models/CreateLeadRequest.js +48 -0
  35. package/dist/esm/models/LeadProjectionResponse.d.ts +130 -0
  36. package/dist/esm/models/LeadProjectionResponse.js +94 -0
  37. package/dist/esm/models/ListingIntentRequest.d.ts +98 -0
  38. package/dist/esm/models/ListingIntentRequest.js +89 -0
  39. package/dist/esm/models/ListingIntentResponse.d.ts +138 -0
  40. package/dist/esm/models/ListingIntentResponse.js +101 -0
  41. package/dist/esm/models/LocationRefRequest.d.ts +56 -0
  42. package/dist/esm/models/LocationRefRequest.js +49 -0
  43. package/dist/esm/models/PageLeadProjectionResponse.d.ts +95 -0
  44. package/dist/esm/models/PageLeadProjectionResponse.js +64 -0
  45. package/dist/esm/models/PageRoleResponse.d.ts +2 -2
  46. package/dist/esm/models/PageRoleResponse.js +2 -2
  47. package/dist/esm/models/PageableObject.d.ts +6 -6
  48. package/dist/esm/models/PageableObject.js +2 -2
  49. package/dist/esm/models/PriceRangeRequest.d.ts +38 -0
  50. package/dist/esm/models/PriceRangeRequest.js +43 -0
  51. package/dist/esm/models/SearchIntentRequest.d.ts +98 -0
  52. package/dist/esm/models/SearchIntentRequest.js +89 -0
  53. package/dist/esm/models/SearchIntentResponse.d.ts +126 -0
  54. package/dist/esm/models/SearchIntentResponse.js +97 -0
  55. package/dist/esm/models/SourceRequest.d.ts +32 -0
  56. package/dist/esm/models/SourceRequest.js +43 -0
  57. package/dist/esm/models/UpdateNoteRequest.d.ts +32 -0
  58. package/dist/esm/models/UpdateNoteRequest.js +43 -0
  59. package/dist/esm/models/index.d.ts +16 -0
  60. package/dist/esm/models/index.js +16 -0
  61. package/dist/models/AddressRefRequest.d.ts +63 -0
  62. package/dist/models/AddressRefRequest.js +61 -0
  63. package/dist/models/AssignToMemberRequest.d.ts +32 -0
  64. package/dist/models/AssignToMemberRequest.js +50 -0
  65. package/dist/models/ChangeStatusRequest.d.ts +44 -0
  66. package/dist/models/ChangeStatusRequest.js +62 -0
  67. package/dist/models/ContactInfoRequest.d.ts +50 -0
  68. package/dist/models/ContactInfoRequest.js +56 -0
  69. package/dist/models/CoordinatesRequest.d.ts +38 -0
  70. package/dist/models/CoordinatesRequest.js +54 -0
  71. package/dist/models/CreateLeadRequest.d.ts +45 -0
  72. package/dist/models/CreateLeadRequest.js +55 -0
  73. package/dist/models/LeadProjectionResponse.d.ts +130 -0
  74. package/dist/models/LeadProjectionResponse.js +102 -0
  75. package/dist/models/ListingIntentRequest.d.ts +98 -0
  76. package/dist/models/ListingIntentRequest.js +97 -0
  77. package/dist/models/ListingIntentResponse.d.ts +138 -0
  78. package/dist/models/ListingIntentResponse.js +109 -0
  79. package/dist/models/LocationRefRequest.d.ts +56 -0
  80. package/dist/models/LocationRefRequest.js +56 -0
  81. package/dist/models/PageLeadProjectionResponse.d.ts +95 -0
  82. package/dist/models/PageLeadProjectionResponse.js +71 -0
  83. package/dist/models/PageRoleResponse.d.ts +2 -2
  84. package/dist/models/PageRoleResponse.js +2 -2
  85. package/dist/models/PageableObject.d.ts +6 -6
  86. package/dist/models/PageableObject.js +2 -2
  87. package/dist/models/PriceRangeRequest.d.ts +38 -0
  88. package/dist/models/PriceRangeRequest.js +50 -0
  89. package/dist/models/SearchIntentRequest.d.ts +98 -0
  90. package/dist/models/SearchIntentRequest.js +97 -0
  91. package/dist/models/SearchIntentResponse.d.ts +126 -0
  92. package/dist/models/SearchIntentResponse.js +105 -0
  93. package/dist/models/SourceRequest.d.ts +32 -0
  94. package/dist/models/SourceRequest.js +50 -0
  95. package/dist/models/UpdateNoteRequest.d.ts +32 -0
  96. package/dist/models/UpdateNoteRequest.js +50 -0
  97. package/dist/models/index.d.ts +16 -0
  98. package/dist/models/index.js +16 -0
  99. package/docs/AddressRefRequest.md +44 -0
  100. package/docs/AgencyQueryControllerApi.md +78 -0
  101. package/docs/AssignToMemberRequest.md +34 -0
  102. package/docs/ChangeStatusRequest.md +34 -0
  103. package/docs/ContactInfoRequest.md +40 -0
  104. package/docs/CoordinatesRequest.md +36 -0
  105. package/docs/CreateLeadRequest.md +38 -0
  106. package/docs/LeadControllerApi.md +817 -0
  107. package/docs/LeadProjectionResponse.md +62 -0
  108. package/docs/LeadQueryControllerApi.md +163 -0
  109. package/docs/ListingIntentRequest.md +44 -0
  110. package/docs/ListingIntentResponse.md +58 -0
  111. package/docs/LocationRefRequest.md +42 -0
  112. package/docs/PageLeadProjectionResponse.md +54 -0
  113. package/docs/PageRoleResponse.md +2 -2
  114. package/docs/PageableObject.md +2 -2
  115. package/docs/PriceRangeRequest.md +36 -0
  116. package/docs/PublicAgencyControllerApi.md +0 -70
  117. package/docs/SearchIntentRequest.md +44 -0
  118. package/docs/SearchIntentResponse.md +54 -0
  119. package/docs/SourceRequest.md +34 -0
  120. package/docs/UpdateNoteRequest.md +34 -0
  121. package/package.json +1 -1
  122. package/src/apis/AgencyQueryControllerApi.ts +96 -0
  123. package/src/apis/LeadControllerApi.ts +851 -0
  124. package/src/apis/LeadQueryControllerApi.ts +195 -0
  125. package/src/apis/PublicAgencyControllerApi.ts +0 -60
  126. package/src/apis/index.ts +3 -0
  127. package/src/models/AddressRefRequest.ts +114 -0
  128. package/src/models/AssignToMemberRequest.ts +66 -0
  129. package/src/models/ChangeStatusRequest.ts +81 -0
  130. package/src/models/ContactInfoRequest.ts +90 -0
  131. package/src/models/CoordinatesRequest.ts +75 -0
  132. package/src/models/CreateLeadRequest.ts +90 -0
  133. package/src/models/LeadProjectionResponse.ts +213 -0
  134. package/src/models/ListingIntentRequest.ts +160 -0
  135. package/src/models/ListingIntentResponse.ts +201 -0
  136. package/src/models/LocationRefRequest.ts +97 -0
  137. package/src/models/PageLeadProjectionResponse.ts +167 -0
  138. package/src/models/PageRoleResponse.ts +4 -4
  139. package/src/models/PageableObject.ts +8 -8
  140. package/src/models/PriceRangeRequest.ts +73 -0
  141. package/src/models/SearchIntentRequest.ts +160 -0
  142. package/src/models/SearchIntentResponse.ts +185 -0
  143. package/src/models/SourceRequest.ts +66 -0
  144. package/src/models/UpdateNoteRequest.ts +66 -0
  145. package/src/models/index.ts +16 -0
@@ -0,0 +1,448 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Service API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { AssignToMemberRequestToJSON, ChangeStatusRequestToJSON, ContactInfoRequestToJSON, CreateLeadRequestToJSON, IdResponseFromJSON, ListingIntentRequestToJSON, SearchIntentRequestToJSON, SourceRequestToJSON, UpdateNoteRequestToJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class LeadControllerApi extends runtime.BaseAPI {
29
+ /**
30
+ */
31
+ addListingIntentRaw(requestParameters, initOverrides) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ if (requestParameters['leadId'] == null) {
34
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling addListingIntent().');
35
+ }
36
+ if (requestParameters['listingIntentRequest'] == null) {
37
+ throw new runtime.RequiredError('listingIntentRequest', 'Required parameter "listingIntentRequest" was null or undefined when calling addListingIntent().');
38
+ }
39
+ const queryParameters = {};
40
+ const headerParameters = {};
41
+ headerParameters['Content-Type'] = 'application/json';
42
+ if (this.configuration && this.configuration.accessToken) {
43
+ // oauth required
44
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
45
+ }
46
+ let urlPath = `/lead/{leadId}/listing-intents`;
47
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
48
+ const response = yield this.request({
49
+ path: urlPath,
50
+ method: 'POST',
51
+ headers: headerParameters,
52
+ query: queryParameters,
53
+ body: ListingIntentRequestToJSON(requestParameters['listingIntentRequest']),
54
+ }, initOverrides);
55
+ return new runtime.VoidApiResponse(response);
56
+ });
57
+ }
58
+ /**
59
+ */
60
+ addListingIntent(requestParameters, initOverrides) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ yield this.addListingIntentRaw(requestParameters, initOverrides);
63
+ });
64
+ }
65
+ /**
66
+ */
67
+ addSearchIntentRaw(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ if (requestParameters['leadId'] == null) {
70
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling addSearchIntent().');
71
+ }
72
+ if (requestParameters['searchIntentRequest'] == null) {
73
+ throw new runtime.RequiredError('searchIntentRequest', 'Required parameter "searchIntentRequest" was null or undefined when calling addSearchIntent().');
74
+ }
75
+ const queryParameters = {};
76
+ const headerParameters = {};
77
+ headerParameters['Content-Type'] = 'application/json';
78
+ if (this.configuration && this.configuration.accessToken) {
79
+ // oauth required
80
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
81
+ }
82
+ let urlPath = `/lead/{leadId}/search-intents`;
83
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
84
+ const response = yield this.request({
85
+ path: urlPath,
86
+ method: 'POST',
87
+ headers: headerParameters,
88
+ query: queryParameters,
89
+ body: SearchIntentRequestToJSON(requestParameters['searchIntentRequest']),
90
+ }, initOverrides);
91
+ return new runtime.VoidApiResponse(response);
92
+ });
93
+ }
94
+ /**
95
+ */
96
+ addSearchIntent(requestParameters, initOverrides) {
97
+ return __awaiter(this, void 0, void 0, function* () {
98
+ yield this.addSearchIntentRaw(requestParameters, initOverrides);
99
+ });
100
+ }
101
+ /**
102
+ */
103
+ assignToAgentRaw(requestParameters, initOverrides) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ if (requestParameters['leadId'] == null) {
106
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling assignToAgent().');
107
+ }
108
+ if (requestParameters['assignToMemberRequest'] == null) {
109
+ throw new runtime.RequiredError('assignToMemberRequest', 'Required parameter "assignToMemberRequest" was null or undefined when calling assignToAgent().');
110
+ }
111
+ const queryParameters = {};
112
+ const headerParameters = {};
113
+ headerParameters['Content-Type'] = 'application/json';
114
+ if (this.configuration && this.configuration.accessToken) {
115
+ // oauth required
116
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
117
+ }
118
+ let urlPath = `/lead/{leadId}/assign`;
119
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
120
+ const response = yield this.request({
121
+ path: urlPath,
122
+ method: 'PUT',
123
+ headers: headerParameters,
124
+ query: queryParameters,
125
+ body: AssignToMemberRequestToJSON(requestParameters['assignToMemberRequest']),
126
+ }, initOverrides);
127
+ return new runtime.VoidApiResponse(response);
128
+ });
129
+ }
130
+ /**
131
+ */
132
+ assignToAgent(requestParameters, initOverrides) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ yield this.assignToAgentRaw(requestParameters, initOverrides);
135
+ });
136
+ }
137
+ /**
138
+ */
139
+ changeStatusRaw(requestParameters, initOverrides) {
140
+ return __awaiter(this, void 0, void 0, function* () {
141
+ if (requestParameters['leadId'] == null) {
142
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling changeStatus().');
143
+ }
144
+ if (requestParameters['changeStatusRequest'] == null) {
145
+ throw new runtime.RequiredError('changeStatusRequest', 'Required parameter "changeStatusRequest" was null or undefined when calling changeStatus().');
146
+ }
147
+ const queryParameters = {};
148
+ const headerParameters = {};
149
+ headerParameters['Content-Type'] = 'application/json';
150
+ if (this.configuration && this.configuration.accessToken) {
151
+ // oauth required
152
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
153
+ }
154
+ let urlPath = `/lead/{leadId}/status`;
155
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
156
+ const response = yield this.request({
157
+ path: urlPath,
158
+ method: 'PUT',
159
+ headers: headerParameters,
160
+ query: queryParameters,
161
+ body: ChangeStatusRequestToJSON(requestParameters['changeStatusRequest']),
162
+ }, initOverrides);
163
+ return new runtime.VoidApiResponse(response);
164
+ });
165
+ }
166
+ /**
167
+ */
168
+ changeStatus(requestParameters, initOverrides) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ yield this.changeStatusRaw(requestParameters, initOverrides);
171
+ });
172
+ }
173
+ /**
174
+ */
175
+ createLeadRaw(requestParameters, initOverrides) {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ if (requestParameters['createLeadRequest'] == null) {
178
+ throw new runtime.RequiredError('createLeadRequest', 'Required parameter "createLeadRequest" was null or undefined when calling createLead().');
179
+ }
180
+ const queryParameters = {};
181
+ const headerParameters = {};
182
+ headerParameters['Content-Type'] = 'application/json';
183
+ if (this.configuration && this.configuration.accessToken) {
184
+ // oauth required
185
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
186
+ }
187
+ let urlPath = `/lead`;
188
+ const response = yield this.request({
189
+ path: urlPath,
190
+ method: 'POST',
191
+ headers: headerParameters,
192
+ query: queryParameters,
193
+ body: CreateLeadRequestToJSON(requestParameters['createLeadRequest']),
194
+ }, initOverrides);
195
+ return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue));
196
+ });
197
+ }
198
+ /**
199
+ */
200
+ createLead(requestParameters, initOverrides) {
201
+ return __awaiter(this, void 0, void 0, function* () {
202
+ const response = yield this.createLeadRaw(requestParameters, initOverrides);
203
+ return yield response.value();
204
+ });
205
+ }
206
+ /**
207
+ */
208
+ removeIntentRaw(requestParameters, initOverrides) {
209
+ return __awaiter(this, void 0, void 0, function* () {
210
+ if (requestParameters['leadId'] == null) {
211
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling removeIntent().');
212
+ }
213
+ if (requestParameters['index'] == null) {
214
+ throw new runtime.RequiredError('index', 'Required parameter "index" was null or undefined when calling removeIntent().');
215
+ }
216
+ if (requestParameters['type'] == null) {
217
+ throw new runtime.RequiredError('type', 'Required parameter "type" was null or undefined when calling removeIntent().');
218
+ }
219
+ const queryParameters = {};
220
+ if (requestParameters['index'] != null) {
221
+ queryParameters['index'] = requestParameters['index'];
222
+ }
223
+ if (requestParameters['type'] != null) {
224
+ queryParameters['type'] = requestParameters['type'];
225
+ }
226
+ const headerParameters = {};
227
+ if (this.configuration && this.configuration.accessToken) {
228
+ // oauth required
229
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
230
+ }
231
+ let urlPath = `/lead/{leadId}`;
232
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
233
+ const response = yield this.request({
234
+ path: urlPath,
235
+ method: 'DELETE',
236
+ headers: headerParameters,
237
+ query: queryParameters,
238
+ }, initOverrides);
239
+ return new runtime.VoidApiResponse(response);
240
+ });
241
+ }
242
+ /**
243
+ */
244
+ removeIntent(requestParameters, initOverrides) {
245
+ return __awaiter(this, void 0, void 0, function* () {
246
+ yield this.removeIntentRaw(requestParameters, initOverrides);
247
+ });
248
+ }
249
+ /**
250
+ */
251
+ updateContactInfoRaw(requestParameters, initOverrides) {
252
+ return __awaiter(this, void 0, void 0, function* () {
253
+ if (requestParameters['leadId'] == null) {
254
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling updateContactInfo().');
255
+ }
256
+ if (requestParameters['contactInfoRequest'] == null) {
257
+ throw new runtime.RequiredError('contactInfoRequest', 'Required parameter "contactInfoRequest" was null or undefined when calling updateContactInfo().');
258
+ }
259
+ const queryParameters = {};
260
+ const headerParameters = {};
261
+ headerParameters['Content-Type'] = 'application/json';
262
+ if (this.configuration && this.configuration.accessToken) {
263
+ // oauth required
264
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
265
+ }
266
+ let urlPath = `/lead/{leadId}/contact-info`;
267
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
268
+ const response = yield this.request({
269
+ path: urlPath,
270
+ method: 'PUT',
271
+ headers: headerParameters,
272
+ query: queryParameters,
273
+ body: ContactInfoRequestToJSON(requestParameters['contactInfoRequest']),
274
+ }, initOverrides);
275
+ return new runtime.VoidApiResponse(response);
276
+ });
277
+ }
278
+ /**
279
+ */
280
+ updateContactInfo(requestParameters, initOverrides) {
281
+ return __awaiter(this, void 0, void 0, function* () {
282
+ yield this.updateContactInfoRaw(requestParameters, initOverrides);
283
+ });
284
+ }
285
+ /**
286
+ */
287
+ updateListingIntentRaw(requestParameters, initOverrides) {
288
+ return __awaiter(this, void 0, void 0, function* () {
289
+ if (requestParameters['leadId'] == null) {
290
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling updateListingIntent().');
291
+ }
292
+ if (requestParameters['index'] == null) {
293
+ throw new runtime.RequiredError('index', 'Required parameter "index" was null or undefined when calling updateListingIntent().');
294
+ }
295
+ if (requestParameters['listingIntentRequest'] == null) {
296
+ throw new runtime.RequiredError('listingIntentRequest', 'Required parameter "listingIntentRequest" was null or undefined when calling updateListingIntent().');
297
+ }
298
+ const queryParameters = {};
299
+ if (requestParameters['index'] != null) {
300
+ queryParameters['index'] = requestParameters['index'];
301
+ }
302
+ const headerParameters = {};
303
+ headerParameters['Content-Type'] = 'application/json';
304
+ if (this.configuration && this.configuration.accessToken) {
305
+ // oauth required
306
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
307
+ }
308
+ let urlPath = `/lead/{leadId}/listing-intents`;
309
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
310
+ const response = yield this.request({
311
+ path: urlPath,
312
+ method: 'PUT',
313
+ headers: headerParameters,
314
+ query: queryParameters,
315
+ body: ListingIntentRequestToJSON(requestParameters['listingIntentRequest']),
316
+ }, initOverrides);
317
+ return new runtime.VoidApiResponse(response);
318
+ });
319
+ }
320
+ /**
321
+ */
322
+ updateListingIntent(requestParameters, initOverrides) {
323
+ return __awaiter(this, void 0, void 0, function* () {
324
+ yield this.updateListingIntentRaw(requestParameters, initOverrides);
325
+ });
326
+ }
327
+ /**
328
+ */
329
+ updateNoteRaw(requestParameters, initOverrides) {
330
+ return __awaiter(this, void 0, void 0, function* () {
331
+ if (requestParameters['leadId'] == null) {
332
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling updateNote().');
333
+ }
334
+ if (requestParameters['updateNoteRequest'] == null) {
335
+ throw new runtime.RequiredError('updateNoteRequest', 'Required parameter "updateNoteRequest" was null or undefined when calling updateNote().');
336
+ }
337
+ const queryParameters = {};
338
+ const headerParameters = {};
339
+ headerParameters['Content-Type'] = 'application/json';
340
+ if (this.configuration && this.configuration.accessToken) {
341
+ // oauth required
342
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
343
+ }
344
+ let urlPath = `/lead/{leadId}/note`;
345
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
346
+ const response = yield this.request({
347
+ path: urlPath,
348
+ method: 'PUT',
349
+ headers: headerParameters,
350
+ query: queryParameters,
351
+ body: UpdateNoteRequestToJSON(requestParameters['updateNoteRequest']),
352
+ }, initOverrides);
353
+ return new runtime.VoidApiResponse(response);
354
+ });
355
+ }
356
+ /**
357
+ */
358
+ updateNote(requestParameters, initOverrides) {
359
+ return __awaiter(this, void 0, void 0, function* () {
360
+ yield this.updateNoteRaw(requestParameters, initOverrides);
361
+ });
362
+ }
363
+ /**
364
+ */
365
+ updateSearchIntentRaw(requestParameters, initOverrides) {
366
+ return __awaiter(this, void 0, void 0, function* () {
367
+ if (requestParameters['leadId'] == null) {
368
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling updateSearchIntent().');
369
+ }
370
+ if (requestParameters['index'] == null) {
371
+ throw new runtime.RequiredError('index', 'Required parameter "index" was null or undefined when calling updateSearchIntent().');
372
+ }
373
+ if (requestParameters['searchIntentRequest'] == null) {
374
+ throw new runtime.RequiredError('searchIntentRequest', 'Required parameter "searchIntentRequest" was null or undefined when calling updateSearchIntent().');
375
+ }
376
+ const queryParameters = {};
377
+ if (requestParameters['index'] != null) {
378
+ queryParameters['index'] = requestParameters['index'];
379
+ }
380
+ const headerParameters = {};
381
+ headerParameters['Content-Type'] = 'application/json';
382
+ if (this.configuration && this.configuration.accessToken) {
383
+ // oauth required
384
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
385
+ }
386
+ let urlPath = `/lead/{leadId}/search-intents`;
387
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
388
+ const response = yield this.request({
389
+ path: urlPath,
390
+ method: 'PUT',
391
+ headers: headerParameters,
392
+ query: queryParameters,
393
+ body: SearchIntentRequestToJSON(requestParameters['searchIntentRequest']),
394
+ }, initOverrides);
395
+ return new runtime.VoidApiResponse(response);
396
+ });
397
+ }
398
+ /**
399
+ */
400
+ updateSearchIntent(requestParameters, initOverrides) {
401
+ return __awaiter(this, void 0, void 0, function* () {
402
+ yield this.updateSearchIntentRaw(requestParameters, initOverrides);
403
+ });
404
+ }
405
+ /**
406
+ */
407
+ updateSourceRaw(requestParameters, initOverrides) {
408
+ return __awaiter(this, void 0, void 0, function* () {
409
+ if (requestParameters['leadId'] == null) {
410
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling updateSource().');
411
+ }
412
+ if (requestParameters['sourceRequest'] == null) {
413
+ throw new runtime.RequiredError('sourceRequest', 'Required parameter "sourceRequest" was null or undefined when calling updateSource().');
414
+ }
415
+ const queryParameters = {};
416
+ const headerParameters = {};
417
+ headerParameters['Content-Type'] = 'application/json';
418
+ if (this.configuration && this.configuration.accessToken) {
419
+ // oauth required
420
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
421
+ }
422
+ let urlPath = `/lead/{leadId}/source`;
423
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
424
+ const response = yield this.request({
425
+ path: urlPath,
426
+ method: 'PUT',
427
+ headers: headerParameters,
428
+ query: queryParameters,
429
+ body: SourceRequestToJSON(requestParameters['sourceRequest']),
430
+ }, initOverrides);
431
+ return new runtime.VoidApiResponse(response);
432
+ });
433
+ }
434
+ /**
435
+ */
436
+ updateSource(requestParameters, initOverrides) {
437
+ return __awaiter(this, void 0, void 0, function* () {
438
+ yield this.updateSourceRaw(requestParameters, initOverrides);
439
+ });
440
+ }
441
+ }
442
+ /**
443
+ * @export
444
+ */
445
+ export const RemoveIntentTypeEnum = {
446
+ Search: 'SEARCH',
447
+ Listing: 'LISTING'
448
+ };
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Service API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: v1
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
+ import * as runtime from '../runtime';
13
+ import type { LeadProjectionResponse, PageLeadProjectionResponse } from '../models/index';
14
+ export interface GetLeadByIdRequest {
15
+ leadId: string;
16
+ }
17
+ export interface SearchLeadsRequest {
18
+ status?: SearchLeadsStatusEnum;
19
+ isSearcher?: boolean;
20
+ isLister?: boolean;
21
+ page?: number;
22
+ size?: number;
23
+ sort?: Array<string>;
24
+ }
25
+ /**
26
+ * LeadQueryControllerApi - interface
27
+ *
28
+ * @export
29
+ * @interface LeadQueryControllerApiInterface
30
+ */
31
+ export interface LeadQueryControllerApiInterface {
32
+ /**
33
+ *
34
+ * @param {string} leadId
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ * @memberof LeadQueryControllerApiInterface
38
+ */
39
+ getLeadByIdRaw(requestParameters: GetLeadByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadProjectionResponse>>;
40
+ /**
41
+ */
42
+ getLeadById(requestParameters: GetLeadByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadProjectionResponse>;
43
+ /**
44
+ *
45
+ * @param {'NEW' | 'ATTEMPTED_CONTACT' | 'CONTACTED' | 'DISQUALIFIED' | 'CONVERTED' | 'LOST'} [status]
46
+ * @param {boolean} [isSearcher]
47
+ * @param {boolean} [isLister]
48
+ * @param {number} [page] Zero-based page index (0..N)
49
+ * @param {number} [size] The size of the page to be returned
50
+ * @param {Array<string>} [sort] Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
51
+ * @param {*} [options] Override http request option.
52
+ * @throws {RequiredError}
53
+ * @memberof LeadQueryControllerApiInterface
54
+ */
55
+ searchLeadsRaw(requestParameters: SearchLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PageLeadProjectionResponse>>;
56
+ /**
57
+ */
58
+ searchLeads(requestParameters: SearchLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PageLeadProjectionResponse>;
59
+ }
60
+ /**
61
+ *
62
+ */
63
+ export declare class LeadQueryControllerApi extends runtime.BaseAPI implements LeadQueryControllerApiInterface {
64
+ /**
65
+ */
66
+ getLeadByIdRaw(requestParameters: GetLeadByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadProjectionResponse>>;
67
+ /**
68
+ */
69
+ getLeadById(requestParameters: GetLeadByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadProjectionResponse>;
70
+ /**
71
+ */
72
+ searchLeadsRaw(requestParameters: SearchLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PageLeadProjectionResponse>>;
73
+ /**
74
+ */
75
+ searchLeads(requestParameters?: SearchLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PageLeadProjectionResponse>;
76
+ }
77
+ /**
78
+ * @export
79
+ */
80
+ export declare const SearchLeadsStatusEnum: {
81
+ readonly New: "NEW";
82
+ readonly AttemptedContact: "ATTEMPTED_CONTACT";
83
+ readonly Contacted: "CONTACTED";
84
+ readonly Disqualified: "DISQUALIFIED";
85
+ readonly Converted: "CONVERTED";
86
+ readonly Lost: "LOST";
87
+ };
88
+ export type SearchLeadsStatusEnum = typeof SearchLeadsStatusEnum[keyof typeof SearchLeadsStatusEnum];
@@ -0,0 +1,118 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Service API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { LeadProjectionResponseFromJSON, PageLeadProjectionResponseFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class LeadQueryControllerApi extends runtime.BaseAPI {
29
+ /**
30
+ */
31
+ getLeadByIdRaw(requestParameters, initOverrides) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ if (requestParameters['leadId'] == null) {
34
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling getLeadById().');
35
+ }
36
+ const queryParameters = {};
37
+ const headerParameters = {};
38
+ if (this.configuration && this.configuration.accessToken) {
39
+ // oauth required
40
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
41
+ }
42
+ let urlPath = `/lead/{leadId}`;
43
+ urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId'])));
44
+ const response = yield this.request({
45
+ path: urlPath,
46
+ method: 'GET',
47
+ headers: headerParameters,
48
+ query: queryParameters,
49
+ }, initOverrides);
50
+ return new runtime.JSONApiResponse(response, (jsonValue) => LeadProjectionResponseFromJSON(jsonValue));
51
+ });
52
+ }
53
+ /**
54
+ */
55
+ getLeadById(requestParameters, initOverrides) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ const response = yield this.getLeadByIdRaw(requestParameters, initOverrides);
58
+ return yield response.value();
59
+ });
60
+ }
61
+ /**
62
+ */
63
+ searchLeadsRaw(requestParameters, initOverrides) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const queryParameters = {};
66
+ if (requestParameters['status'] != null) {
67
+ queryParameters['status'] = requestParameters['status'];
68
+ }
69
+ if (requestParameters['isSearcher'] != null) {
70
+ queryParameters['isSearcher'] = requestParameters['isSearcher'];
71
+ }
72
+ if (requestParameters['isLister'] != null) {
73
+ queryParameters['isLister'] = requestParameters['isLister'];
74
+ }
75
+ if (requestParameters['page'] != null) {
76
+ queryParameters['page'] = requestParameters['page'];
77
+ }
78
+ if (requestParameters['size'] != null) {
79
+ queryParameters['size'] = requestParameters['size'];
80
+ }
81
+ if (requestParameters['sort'] != null) {
82
+ queryParameters['sort'] = requestParameters['sort'];
83
+ }
84
+ const headerParameters = {};
85
+ if (this.configuration && this.configuration.accessToken) {
86
+ // oauth required
87
+ headerParameters["Authorization"] = yield this.configuration.accessToken("keycloak", []);
88
+ }
89
+ let urlPath = `/lead`;
90
+ const response = yield this.request({
91
+ path: urlPath,
92
+ method: 'GET',
93
+ headers: headerParameters,
94
+ query: queryParameters,
95
+ }, initOverrides);
96
+ return new runtime.JSONApiResponse(response, (jsonValue) => PageLeadProjectionResponseFromJSON(jsonValue));
97
+ });
98
+ }
99
+ /**
100
+ */
101
+ searchLeads() {
102
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
103
+ const response = yield this.searchLeadsRaw(requestParameters, initOverrides);
104
+ return yield response.value();
105
+ });
106
+ }
107
+ }
108
+ /**
109
+ * @export
110
+ */
111
+ export const SearchLeadsStatusEnum = {
112
+ New: 'NEW',
113
+ AttemptedContact: 'ATTEMPTED_CONTACT',
114
+ Contacted: 'CONTACTED',
115
+ Disqualified: 'DISQUALIFIED',
116
+ Converted: 'CONVERTED',
117
+ Lost: 'LOST'
118
+ };