@randock/nameshift-api-client 0.0.538 → 0.0.540

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 (176) hide show
  1. package/.openapi-generator/FILES +20 -0
  2. package/README.md +3 -3
  3. package/dist/apis/AdminApi.d.ts +36 -1
  4. package/dist/apis/AdminApi.js +136 -0
  5. package/dist/apis/BrokeredLeadsApi.d.ts +195 -0
  6. package/dist/apis/BrokeredLeadsApi.js +912 -0
  7. package/dist/apis/BrokeredLeadsPublicApi.d.ts +31 -0
  8. package/dist/apis/BrokeredLeadsPublicApi.js +126 -0
  9. package/dist/apis/index.d.ts +2 -0
  10. package/dist/apis/index.js +2 -0
  11. package/dist/models/AccountBrokerSettingsInput.d.ts +38 -0
  12. package/dist/models/AccountBrokerSettingsInput.js +51 -0
  13. package/dist/models/AccountDto.d.ts +12 -0
  14. package/dist/models/AccountDto.js +8 -0
  15. package/dist/models/AccountNameshiftCommissionBySubtypeDto.d.ts +1 -0
  16. package/dist/models/AccountNameshiftCommissionBySubtypeDto.js +2 -1
  17. package/dist/models/AccountNameshiftCommissionItemDto.d.ts +1 -0
  18. package/dist/models/AccountNameshiftCommissionItemDto.js +2 -1
  19. package/dist/models/AccountNameshiftCommissionReasonDto.d.ts +1 -0
  20. package/dist/models/AccountNameshiftCommissionReasonDto.js +2 -1
  21. package/dist/models/AccountNotificationDto.d.ts +1 -0
  22. package/dist/models/AccountNotificationDto.js +2 -1
  23. package/dist/models/AccountSettingsBrokerDto.d.ts +38 -0
  24. package/dist/models/AccountSettingsBrokerDto.js +55 -0
  25. package/dist/models/AccountSettingsDto.d.ts +7 -0
  26. package/dist/models/AccountSettingsDto.js +5 -0
  27. package/dist/models/AccountSettingsInput.d.ts +7 -0
  28. package/dist/models/AccountSettingsInput.js +3 -0
  29. package/dist/models/AdminBrokeredLeadDto.d.ts +248 -0
  30. package/dist/models/AdminBrokeredLeadDto.js +204 -0
  31. package/dist/models/AdminListBrokeredLeads200Response.d.ts +47 -0
  32. package/dist/models/AdminListBrokeredLeads200Response.js +62 -0
  33. package/dist/models/ApiKeyDto.d.ts +2 -0
  34. package/dist/models/ApiKeyDto.js +2 -0
  35. package/dist/models/ApiKeyScopeDto.d.ts +2 -0
  36. package/dist/models/ApiKeyScopeDto.js +2 -0
  37. package/dist/models/BrokerBrokeredLeadDto.d.ts +189 -0
  38. package/dist/models/BrokerBrokeredLeadDto.js +162 -0
  39. package/dist/models/BrokerCommissionInput.d.ts +52 -0
  40. package/dist/models/BrokerCommissionInput.js +63 -0
  41. package/dist/models/BrokeredLeadBreakdownDto.d.ts +58 -0
  42. package/dist/models/BrokeredLeadBreakdownDto.js +69 -0
  43. package/dist/models/BrokeredLeadBuyerContactDto.d.ts +50 -0
  44. package/dist/models/BrokeredLeadBuyerContactDto.js +63 -0
  45. package/dist/models/BrokeredLeadBuyerInput.d.ts +50 -0
  46. package/dist/models/BrokeredLeadBuyerInput.js +63 -0
  47. package/dist/models/BrokeredLeadCommissionDto.d.ts +71 -0
  48. package/dist/models/BrokeredLeadCommissionDto.js +80 -0
  49. package/dist/models/BrokeredLeadInvitationDto.d.ts +57 -0
  50. package/dist/models/BrokeredLeadInvitationDto.js +68 -0
  51. package/dist/models/BuyerInvoiceDto.d.ts +6 -0
  52. package/dist/models/BuyerInvoiceDto.js +4 -0
  53. package/dist/models/BuyerNotificationDto.d.ts +6 -0
  54. package/dist/models/BuyerNotificationDto.js +7 -1
  55. package/dist/models/BuyerNotificationListItemDto.d.ts +6 -0
  56. package/dist/models/BuyerNotificationListItemDto.js +7 -1
  57. package/dist/models/CommissionDto.d.ts +1 -0
  58. package/dist/models/CommissionDto.js +2 -1
  59. package/dist/models/CommissionPayloadInput.d.ts +1 -0
  60. package/dist/models/CommissionPayloadInput.js +2 -1
  61. package/dist/models/CommissionReasonDto.d.ts +1 -0
  62. package/dist/models/CommissionReasonDto.js +2 -1
  63. package/dist/models/CommissionSimulationItemInput.d.ts +1 -0
  64. package/dist/models/CommissionSimulationItemInput.js +2 -1
  65. package/dist/models/CreateApiKeyInput.d.ts +2 -0
  66. package/dist/models/CreateApiKeyInput.js +2 -0
  67. package/dist/models/CreateBrokeredLeadInput.d.ts +59 -0
  68. package/dist/models/CreateBrokeredLeadInput.js +68 -0
  69. package/dist/models/CreatedApiKeyDto.d.ts +2 -0
  70. package/dist/models/CreatedApiKeyDto.js +2 -0
  71. package/dist/models/CustomerSuccessListAccountDto.d.ts +6 -0
  72. package/dist/models/CustomerSuccessListAccountDto.js +4 -0
  73. package/dist/models/CustomerSuccessListAccountMetricsDto.d.ts +6 -0
  74. package/dist/models/CustomerSuccessListAccountMetricsDto.js +4 -0
  75. package/dist/models/DeclineBrokeredLeadInput.d.ts +32 -0
  76. package/dist/models/DeclineBrokeredLeadInput.js +49 -0
  77. package/dist/models/FeatureFlagListItemDto.d.ts +1 -0
  78. package/dist/models/FeatureFlagListItemDto.js +1 -0
  79. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +13 -0
  80. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +9 -0
  81. package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.d.ts +1 -1
  82. package/dist/models/InvoiceDto.d.ts +6 -0
  83. package/dist/models/InvoiceDto.js +4 -0
  84. package/dist/models/LeadBrokeredDealDto.d.ts +39 -0
  85. package/dist/models/LeadBrokeredDealDto.js +56 -0
  86. package/dist/models/ListAccountMetricsDto.d.ts +6 -0
  87. package/dist/models/ListAccountMetricsDto.js +4 -0
  88. package/dist/models/ListBrokerLeads200Response.d.ts +47 -0
  89. package/dist/models/ListBrokerLeads200Response.js +62 -0
  90. package/dist/models/ListLeadsResultItem.d.ts +7 -0
  91. package/dist/models/ListLeadsResultItem.js +5 -0
  92. package/dist/models/ManualLeadDetails.d.ts +7 -0
  93. package/dist/models/ManualLeadDetails.js +5 -0
  94. package/dist/models/OverrideBrokeredLeadNameshiftCommissionInput.d.ts +38 -0
  95. package/dist/models/OverrideBrokeredLeadNameshiftCommissionInput.js +55 -0
  96. package/dist/models/PrivateAccountGetMeResponse.d.ts +19 -0
  97. package/dist/models/PrivateAccountGetMeResponse.js +13 -0
  98. package/dist/models/RegisterAccountInput.d.ts +6 -0
  99. package/dist/models/RegisterAccountInput.js +2 -0
  100. package/dist/models/SellerBrokeredLeadDto.d.ts +114 -0
  101. package/dist/models/SellerBrokeredLeadDto.js +111 -0
  102. package/dist/models/SellerBrokeredLeadVerificationDto.d.ts +44 -0
  103. package/dist/models/SellerBrokeredLeadVerificationDto.js +59 -0
  104. package/dist/models/SellerInvoiceDto.d.ts +6 -0
  105. package/dist/models/SellerInvoiceDto.js +4 -0
  106. package/dist/models/SimulateCommissionInput.d.ts +1 -0
  107. package/dist/models/SimulateCommissionInput.js +2 -1
  108. package/dist/models/UpdateApiKeyInput.d.ts +2 -0
  109. package/dist/models/UpdateApiKeyInput.js +2 -0
  110. package/dist/models/UserNotificationDto.d.ts +6 -0
  111. package/dist/models/UserNotificationDto.js +7 -1
  112. package/dist/models/UserNotificationListItemDto.d.ts +6 -0
  113. package/dist/models/UserNotificationListItemDto.js +7 -1
  114. package/dist/models/WithSettingsInner.d.ts +11 -4
  115. package/dist/models/WithSettingsInner.js +9 -4
  116. package/dist/models/index.d.ts +18 -0
  117. package/dist/models/index.js +18 -0
  118. package/package.json +1 -1
  119. package/src/apis/AdminApi.ts +145 -0
  120. package/src/apis/BrokeredLeadsApi.ts +740 -0
  121. package/src/apis/BrokeredLeadsPublicApi.ts +69 -0
  122. package/src/apis/index.ts +2 -0
  123. package/src/models/AccountBrokerSettingsInput.ts +73 -0
  124. package/src/models/AccountDto.ts +18 -0
  125. package/src/models/AccountNameshiftCommissionBySubtypeDto.ts +2 -1
  126. package/src/models/AccountNameshiftCommissionItemDto.ts +2 -1
  127. package/src/models/AccountNameshiftCommissionReasonDto.ts +2 -1
  128. package/src/models/AccountNotificationDto.ts +2 -1
  129. package/src/models/AccountSettingsBrokerDto.ts +75 -0
  130. package/src/models/AccountSettingsDto.ts +16 -0
  131. package/src/models/AccountSettingsInput.ts +15 -0
  132. package/src/models/AdminBrokeredLeadDto.ts +404 -0
  133. package/src/models/AdminListBrokeredLeads200Response.ts +106 -0
  134. package/src/models/ApiKeyDto.ts +2 -0
  135. package/src/models/ApiKeyScopeDto.ts +2 -0
  136. package/src/models/BrokerBrokeredLeadDto.ts +320 -0
  137. package/src/models/BrokerCommissionInput.ts +93 -0
  138. package/src/models/BrokeredLeadBreakdownDto.ts +117 -0
  139. package/src/models/BrokeredLeadBuyerContactDto.ts +93 -0
  140. package/src/models/BrokeredLeadBuyerInput.ts +93 -0
  141. package/src/models/BrokeredLeadCommissionDto.ts +130 -0
  142. package/src/models/BrokeredLeadInvitationDto.ts +110 -0
  143. package/src/models/BuyerInvoiceDto.ts +9 -0
  144. package/src/models/BuyerNotificationDto.ts +7 -1
  145. package/src/models/BuyerNotificationListItemDto.ts +7 -1
  146. package/src/models/CommissionDto.ts +2 -1
  147. package/src/models/CommissionPayloadInput.ts +2 -1
  148. package/src/models/CommissionReasonDto.ts +2 -1
  149. package/src/models/CommissionSimulationItemInput.ts +2 -1
  150. package/src/models/CreateApiKeyInput.ts +2 -0
  151. package/src/models/CreateBrokeredLeadInput.ts +123 -0
  152. package/src/models/CreatedApiKeyDto.ts +2 -0
  153. package/src/models/CustomerSuccessListAccountDto.ts +9 -0
  154. package/src/models/CustomerSuccessListAccountMetricsDto.ts +9 -0
  155. package/src/models/DeclineBrokeredLeadInput.ts +65 -0
  156. package/src/models/FeatureFlagListItemDto.ts +1 -0
  157. package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +19 -0
  158. package/src/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.ts +1 -1
  159. package/src/models/InvoiceDto.ts +9 -0
  160. package/src/models/LeadBrokeredDealDto.ts +83 -0
  161. package/src/models/ListAccountMetricsDto.ts +9 -0
  162. package/src/models/ListBrokerLeads200Response.ts +106 -0
  163. package/src/models/ListLeadsResultItem.ts +16 -0
  164. package/src/models/ManualLeadDetails.ts +16 -0
  165. package/src/models/OverrideBrokeredLeadNameshiftCommissionInput.ts +75 -0
  166. package/src/models/PrivateAccountGetMeResponse.ts +28 -0
  167. package/src/models/RegisterAccountInput.ts +8 -0
  168. package/src/models/SellerBrokeredLeadDto.ts +215 -0
  169. package/src/models/SellerBrokeredLeadVerificationDto.ts +84 -0
  170. package/src/models/SellerInvoiceDto.ts +9 -0
  171. package/src/models/SimulateCommissionInput.ts +2 -1
  172. package/src/models/UpdateApiKeyInput.ts +2 -0
  173. package/src/models/UserNotificationDto.ts +7 -1
  174. package/src/models/UserNotificationListItemDto.ts +7 -1
  175. package/src/models/WithSettingsInner.ts +44 -28
  176. package/src/models/index.ts +18 -0
@@ -27,6 +27,7 @@ import type {
27
27
  AdminCompanyStatsDto,
28
28
  AdminGetAllDomainTransfers200Response,
29
29
  AdminLandingDesignStatsDto,
30
+ AdminListBrokeredLeads200Response,
30
31
  AdminMarketplaceDto,
31
32
  AdminUserNewsletterInput,
32
33
  AdminUserSecurityDto,
@@ -76,6 +77,7 @@ import type {
76
77
  NewsletterDto,
77
78
  NewsletterPreviewDto,
78
79
  ObjectId,
80
+ OverrideBrokeredLeadNameshiftCommissionInput,
79
81
  PaySellerInvoicesInput,
80
82
  PaymentMethodsStatsDto,
81
83
  SalesStatsDto,
@@ -124,6 +126,8 @@ import {
124
126
  AdminGetAllDomainTransfers200ResponseToJSON,
125
127
  AdminLandingDesignStatsDtoFromJSON,
126
128
  AdminLandingDesignStatsDtoToJSON,
129
+ AdminListBrokeredLeads200ResponseFromJSON,
130
+ AdminListBrokeredLeads200ResponseToJSON,
127
131
  AdminMarketplaceDtoFromJSON,
128
132
  AdminMarketplaceDtoToJSON,
129
133
  AdminUserNewsletterInputFromJSON,
@@ -222,6 +226,8 @@ import {
222
226
  NewsletterPreviewDtoToJSON,
223
227
  ObjectIdFromJSON,
224
228
  ObjectIdToJSON,
229
+ OverrideBrokeredLeadNameshiftCommissionInputFromJSON,
230
+ OverrideBrokeredLeadNameshiftCommissionInputToJSON,
225
231
  PaySellerInvoicesInputFromJSON,
226
232
  PaySellerInvoicesInputToJSON,
227
233
  PaymentMethodsStatsDtoFromJSON,
@@ -281,6 +287,23 @@ export interface AdminApiAdminGetAllDomainTransfersRequest {
281
287
  filterStatus?: string;
282
288
  }
283
289
 
290
+ export interface AdminApiAdminListBrokeredLeadsRequest {
291
+ filter?: { [key: string]: string; };
292
+ page?: number;
293
+ limit?: number;
294
+ sortBy?: Array<string>;
295
+ filterStatus?: string;
296
+ filterBrokerStatus?: string;
297
+ filterSearchTerm?: string;
298
+ filterCreatedAtFrom?: string;
299
+ filterCreatedAtTo?: string;
300
+ }
301
+
302
+ export interface AdminApiAdminOverrideBrokeredLeadNameshiftCommissionRequest {
303
+ brokeredLeadId: string;
304
+ overrideBrokeredLeadNameshiftCommissionInput: OverrideBrokeredLeadNameshiftCommissionInput;
305
+ }
306
+
284
307
  export interface AdminApiAdminUpdateDomainTransferBuyerCompanyInfoRequest {
285
308
  transferId: string;
286
309
  updateAdminDomainTransferBuyerCompanyInfoInput: UpdateAdminDomainTransferBuyerCompanyInfoInput;
@@ -898,6 +921,128 @@ export class AdminApi extends runtime.BaseAPI {
898
921
  return await response.value();
899
922
  }
900
923
 
924
+ /**
925
+ * List all brokered deals
926
+ */
927
+ async adminListBrokeredLeadsRaw(requestParameters: AdminApiAdminListBrokeredLeadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminListBrokeredLeads200Response>> {
928
+ const queryParameters: any = {};
929
+
930
+ if (requestParameters['filter'] != null) {
931
+ queryParameters['filter'] = requestParameters['filter'];
932
+ }
933
+
934
+ if (requestParameters['page'] != null) {
935
+ queryParameters['page'] = requestParameters['page'];
936
+ }
937
+
938
+ if (requestParameters['limit'] != null) {
939
+ queryParameters['limit'] = requestParameters['limit'];
940
+ }
941
+
942
+ if (requestParameters['sortBy'] != null) {
943
+ queryParameters['sortBy'] = requestParameters['sortBy'];
944
+ }
945
+
946
+ if (requestParameters['filterStatus'] != null) {
947
+ queryParameters['filter[status]'] = requestParameters['filterStatus'];
948
+ }
949
+
950
+ if (requestParameters['filterBrokerStatus'] != null) {
951
+ queryParameters['filter[broker_status]'] = requestParameters['filterBrokerStatus'];
952
+ }
953
+
954
+ if (requestParameters['filterSearchTerm'] != null) {
955
+ queryParameters['filter[search_term]'] = requestParameters['filterSearchTerm'];
956
+ }
957
+
958
+ if (requestParameters['filterCreatedAtFrom'] != null) {
959
+ queryParameters['filter[createdAtFrom]'] = requestParameters['filterCreatedAtFrom'];
960
+ }
961
+
962
+ if (requestParameters['filterCreatedAtTo'] != null) {
963
+ queryParameters['filter[createdAtTo]'] = requestParameters['filterCreatedAtTo'];
964
+ }
965
+
966
+ const headerParameters: runtime.HTTPHeaders = {};
967
+
968
+ if (this.configuration && this.configuration.accessToken) {
969
+ const token = this.configuration.accessToken;
970
+ const tokenString = await token("bearer", []);
971
+
972
+ if (tokenString) {
973
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
974
+ }
975
+ }
976
+ const response = await this.request({
977
+ path: `/admin/brokered-leads`,
978
+ method: 'GET',
979
+ headers: headerParameters,
980
+ query: queryParameters,
981
+ }, initOverrides);
982
+
983
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminListBrokeredLeads200ResponseFromJSON(jsonValue));
984
+ }
985
+
986
+ /**
987
+ * List all brokered deals
988
+ */
989
+ async adminListBrokeredLeads(requestParameters: AdminApiAdminListBrokeredLeadsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminListBrokeredLeads200Response> {
990
+ const response = await this.adminListBrokeredLeadsRaw(requestParameters, initOverrides);
991
+ return await response.value();
992
+ }
993
+
994
+ /**
995
+ * Overrides the platform fee charged to the broker, e.g. for a high value deal. Only until the buyer has paid, and never above the broker commission.
996
+ * Set a custom platform fee for a brokered deal
997
+ */
998
+ async adminOverrideBrokeredLeadNameshiftCommissionRaw(requestParameters: AdminApiAdminOverrideBrokeredLeadNameshiftCommissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
999
+ if (requestParameters['brokeredLeadId'] == null) {
1000
+ throw new runtime.RequiredError(
1001
+ 'brokeredLeadId',
1002
+ 'Required parameter "brokeredLeadId" was null or undefined when calling adminOverrideBrokeredLeadNameshiftCommission().'
1003
+ );
1004
+ }
1005
+
1006
+ if (requestParameters['overrideBrokeredLeadNameshiftCommissionInput'] == null) {
1007
+ throw new runtime.RequiredError(
1008
+ 'overrideBrokeredLeadNameshiftCommissionInput',
1009
+ 'Required parameter "overrideBrokeredLeadNameshiftCommissionInput" was null or undefined when calling adminOverrideBrokeredLeadNameshiftCommission().'
1010
+ );
1011
+ }
1012
+
1013
+ const queryParameters: any = {};
1014
+
1015
+ const headerParameters: runtime.HTTPHeaders = {};
1016
+
1017
+ headerParameters['Content-Type'] = 'application/json';
1018
+
1019
+ if (this.configuration && this.configuration.accessToken) {
1020
+ const token = this.configuration.accessToken;
1021
+ const tokenString = await token("bearer", []);
1022
+
1023
+ if (tokenString) {
1024
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1025
+ }
1026
+ }
1027
+ const response = await this.request({
1028
+ path: `/admin/brokered-leads/{brokeredLeadId}/nameshift-commission`.replace(`{${"brokeredLeadId"}}`, encodeURIComponent(String(requestParameters['brokeredLeadId']))),
1029
+ method: 'PUT',
1030
+ headers: headerParameters,
1031
+ query: queryParameters,
1032
+ body: OverrideBrokeredLeadNameshiftCommissionInputToJSON(requestParameters['overrideBrokeredLeadNameshiftCommissionInput']),
1033
+ }, initOverrides);
1034
+
1035
+ return new runtime.VoidApiResponse(response);
1036
+ }
1037
+
1038
+ /**
1039
+ * Overrides the platform fee charged to the broker, e.g. for a high value deal. Only until the buyer has paid, and never above the broker commission.
1040
+ * Set a custom platform fee for a brokered deal
1041
+ */
1042
+ async adminOverrideBrokeredLeadNameshiftCommission(requestParameters: AdminApiAdminOverrideBrokeredLeadNameshiftCommissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1043
+ await this.adminOverrideBrokeredLeadNameshiftCommissionRaw(requestParameters, initOverrides);
1044
+ }
1045
+
901
1046
  /**
902
1047
  * Corrects the company registration id stored on the active buyer invoice of the domain transfer. The registry contact of the transfer is built from it; the issued invoice and its taxes are left untouched.
903
1048
  * Update the company id of the buyer