nordlet 0.3.7 → 0.3.8

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 (132) hide show
  1. package/README.md +2 -2
  2. package/dist/api/resources/agreements/types/AgreementsListAgreementsResponse.d.ts +2 -0
  3. package/dist/api/resources/agreements/types/InsurancePoliciesListAgreementsResponse.d.ts +2 -0
  4. package/dist/api/resources/agreements/types/TypesListAgreementsResponse.d.ts +2 -0
  5. package/dist/api/resources/assets/types/AssetsListAssetsResponse.d.ts +2 -0
  6. package/dist/api/resources/assets/types/GroupsListAssetsResponse.d.ts +2 -0
  7. package/dist/api/resources/audit/types/ListAuditResponse.d.ts +2 -0
  8. package/dist/api/resources/bank/client/Client.d.ts +20 -0
  9. package/dist/api/resources/bank/client/Client.js +78 -0
  10. package/dist/api/resources/bank/client/requests/DirectDebitsCandidatesBankRequest.d.ts +48 -0
  11. package/dist/api/resources/bank/client/requests/DirectDebitsCandidatesBankRequest.js +31 -0
  12. package/dist/api/resources/bank/client/requests/index.d.ts +1 -0
  13. package/dist/api/resources/bank/client/requests/index.js +3 -1
  14. package/dist/api/resources/bank/types/AccountsListBankResponse.d.ts +2 -0
  15. package/dist/api/resources/bank/types/DirectDebitsCandidatesBankResponse.d.ts +29 -0
  16. package/dist/api/resources/bank/types/DirectDebitsCandidatesBankResponse.js +3 -0
  17. package/dist/api/resources/bank/types/FeedsConnectionsListBankResponse.d.ts +2 -0
  18. package/dist/api/resources/bank/types/ImportTemplatesListBankResponse.d.ts +2 -0
  19. package/dist/api/resources/bank/types/MandatesListBankResponse.d.ts +2 -0
  20. package/dist/api/resources/bank/types/SettlementsListBankResponse.d.ts +2 -0
  21. package/dist/api/resources/bank/types/TransactionsListBankResponse.d.ts +2 -0
  22. package/dist/api/resources/bank/types/index.d.ts +1 -0
  23. package/dist/api/resources/bank/types/index.js +1 -0
  24. package/dist/api/resources/capture/types/DocumentsListCaptureResponse.d.ts +2 -0
  25. package/dist/api/resources/cash/types/OrdersListCashResponse.d.ts +2 -0
  26. package/dist/api/resources/catalog/types/ItemsListCatalogResponse.d.ts +2 -0
  27. package/dist/api/resources/declarations/client/Client.d.ts +1 -1
  28. package/dist/api/resources/declarations/client/Client.js +1 -1
  29. package/dist/api/resources/declarations/types/SubmissionsListDeclarationsResponse.d.ts +2 -0
  30. package/dist/api/resources/documentSeries/types/ListDocumentSeriesResponse.d.ts +2 -0
  31. package/dist/api/resources/ecommerce/types/OrdersListEcommerceResponse.d.ts +2 -0
  32. package/dist/api/resources/files/types/ListFilesResponse.d.ts +2 -0
  33. package/dist/api/resources/fleet/types/AssignmentsListFleetResponse.d.ts +2 -0
  34. package/dist/api/resources/fleet/types/VehiclesListFleetResponse.d.ts +2 -0
  35. package/dist/api/resources/hr/types/ContractsListHrResponse.d.ts +2 -0
  36. package/dist/api/resources/hr/types/EmployeesListHrResponse.d.ts +2 -0
  37. package/dist/api/resources/hr/types/EmployeesRecordsListHrResponse.d.ts +2 -0
  38. package/dist/api/resources/hr/types/IncapacityCertificatesListHrResponse.d.ts +2 -0
  39. package/dist/api/resources/hr/types/PositionsListHrResponse.d.ts +2 -0
  40. package/dist/api/resources/inventory/types/LandedCostsListInventoryResponse.d.ts +2 -0
  41. package/dist/api/resources/inventory/types/LotsListInventoryResponse.d.ts +2 -0
  42. package/dist/api/resources/inventory/types/ReorderRulesListInventoryResponse.d.ts +2 -0
  43. package/dist/api/resources/inventory/types/StockMovementsListInventoryResponse.d.ts +2 -0
  44. package/dist/api/resources/inventory/types/WarehousesListInventoryResponse.d.ts +2 -0
  45. package/dist/api/resources/leads/client/Client.d.ts +106 -0
  46. package/dist/api/resources/leads/client/Client.js +381 -0
  47. package/dist/api/resources/leads/client/requests/CreateLeadsRequest.d.ts +1 -0
  48. package/dist/api/resources/leads/client/requests/TypesCreateLeadsRequest.d.ts +10 -0
  49. package/dist/api/resources/leads/client/requests/TypesCreateLeadsRequest.js +3 -0
  50. package/dist/api/resources/leads/client/requests/TypesDeleteLeadsRequest.d.ts +9 -0
  51. package/dist/api/resources/leads/client/requests/TypesDeleteLeadsRequest.js +3 -0
  52. package/dist/api/resources/leads/client/requests/TypesListLeadsRequest.d.ts +5 -0
  53. package/dist/api/resources/leads/client/requests/TypesListLeadsRequest.js +3 -0
  54. package/dist/api/resources/leads/client/requests/TypesOptionsLeadsRequest.d.ts +5 -0
  55. package/dist/api/resources/leads/client/requests/TypesOptionsLeadsRequest.js +3 -0
  56. package/dist/api/resources/leads/client/requests/TypesUpdateLeadsRequest.d.ts +11 -0
  57. package/dist/api/resources/leads/client/requests/TypesUpdateLeadsRequest.js +3 -0
  58. package/dist/api/resources/leads/client/requests/UpdateLeadsRequest.d.ts +1 -0
  59. package/dist/api/resources/leads/client/requests/index.d.ts +5 -0
  60. package/dist/api/resources/leads/types/ConvertLeadsResponse.d.ts +2 -0
  61. package/dist/api/resources/leads/types/CreateLeadsResponse.d.ts +2 -0
  62. package/dist/api/resources/leads/types/GetLeadsResponse.d.ts +2 -0
  63. package/dist/api/resources/leads/types/ListLeadsResponse.d.ts +4 -0
  64. package/dist/api/resources/leads/types/TypesCreateLeadsResponse.d.ts +6 -0
  65. package/dist/api/resources/leads/types/TypesCreateLeadsResponse.js +3 -0
  66. package/dist/api/resources/leads/types/TypesDeleteLeadsResponse.d.ts +3 -0
  67. package/dist/api/resources/leads/types/TypesDeleteLeadsResponse.js +3 -0
  68. package/dist/api/resources/leads/types/TypesListLeadsResponse.d.ts +14 -0
  69. package/dist/api/resources/leads/types/TypesListLeadsResponse.js +3 -0
  70. package/dist/api/resources/leads/types/TypesOptionsLeadsResponse.d.ts +12 -0
  71. package/dist/api/resources/leads/types/TypesOptionsLeadsResponse.js +3 -0
  72. package/dist/api/resources/leads/types/TypesUpdateLeadsResponse.d.ts +6 -0
  73. package/dist/api/resources/leads/types/TypesUpdateLeadsResponse.js +3 -0
  74. package/dist/api/resources/leads/types/UpdateLeadsResponse.d.ts +2 -0
  75. package/dist/api/resources/leads/types/index.d.ts +5 -0
  76. package/dist/api/resources/leads/types/index.js +5 -0
  77. package/dist/api/resources/ledger/types/AccountsListLedgerResponse.d.ts +2 -0
  78. package/dist/api/resources/ledger/types/CostCenterGroupsListLedgerResponse.d.ts +2 -0
  79. package/dist/api/resources/ledger/types/CostCentersListLedgerResponse.d.ts +2 -0
  80. package/dist/api/resources/ledger/types/JournalTransactionsListLedgerResponse.d.ts +3 -0
  81. package/dist/api/resources/ledger/types/OwnersListLedgerResponse.d.ts +2 -0
  82. package/dist/api/resources/ledger/types/PeriodsListLedgerResponse.d.ts +2 -0
  83. package/dist/api/resources/migration/client/Client.d.ts +1 -1
  84. package/dist/api/resources/migration/client/Client.js +1 -1
  85. package/dist/api/resources/operationTypes/types/ListOperationTypesResponse.d.ts +2 -0
  86. package/dist/api/resources/partners/types/AddressesListPartnersResponse.d.ts +2 -0
  87. package/dist/api/resources/partners/types/BankAccountsListPartnersResponse.d.ts +2 -0
  88. package/dist/api/resources/partners/types/ContactsListPartnersResponse.d.ts +2 -0
  89. package/dist/api/resources/partners/types/DebtRemindersListPartnersResponse.d.ts +2 -0
  90. package/dist/api/resources/partners/types/DebtRemindersPreviewPartnersResponse.d.ts +10 -3
  91. package/dist/api/resources/partners/types/InquiriesListPartnersResponse.d.ts +2 -0
  92. package/dist/api/resources/partners/types/ListPartnersResponse.d.ts +2 -0
  93. package/dist/api/resources/partners/types/VatReviewsListPartnersResponse.d.ts +2 -0
  94. package/dist/api/resources/payroll/client/requests/RunsCreatePayrollRequest.d.ts +1 -0
  95. package/dist/api/resources/payroll/types/RunsApprovePayrollResponse.d.ts +1 -0
  96. package/dist/api/resources/payroll/types/RunsCreatePayrollResponse.d.ts +1 -0
  97. package/dist/api/resources/payroll/types/RunsGetPayrollResponse.d.ts +1 -0
  98. package/dist/api/resources/payroll/types/RunsListPayrollResponse.d.ts +3 -0
  99. package/dist/api/resources/pos/types/DevicesListPosResponse.d.ts +2 -0
  100. package/dist/api/resources/pos/types/ReportsListPosResponse.d.ts +2 -0
  101. package/dist/api/resources/production/types/BomsListProductionResponse.d.ts +2 -0
  102. package/dist/api/resources/production/types/MaintenanceListProductionResponse.d.ts +2 -0
  103. package/dist/api/resources/production/types/OrdersListProductionResponse.d.ts +2 -0
  104. package/dist/api/resources/production/types/QualityChecksListProductionResponse.d.ts +2 -0
  105. package/dist/api/resources/production/types/RoutingsListProductionResponse.d.ts +2 -0
  106. package/dist/api/resources/production/types/WorkCentersListProductionResponse.d.ts +2 -0
  107. package/dist/api/resources/projects/types/ListProjectsResponse.d.ts +2 -0
  108. package/dist/api/resources/projects/types/TimeEntriesListProjectsResponse.d.ts +2 -0
  109. package/dist/api/resources/purchases/types/InvoicesListPurchasesResponse.d.ts +2 -0
  110. package/dist/api/resources/purchases/types/OrdersListPurchasesResponse.d.ts +2 -0
  111. package/dist/api/resources/purchases/types/ReceiptsListPurchasesResponse.d.ts +2 -0
  112. package/dist/api/resources/reference/types/BanksListReferenceResponse.d.ts +2 -0
  113. package/dist/api/resources/reference/types/CnCodesListReferenceResponse.d.ts +2 -0
  114. package/dist/api/resources/reference/types/CurrenciesListReferenceResponse.d.ts +2 -0
  115. package/dist/api/resources/reference/types/ExchangeRatesListReferenceResponse.d.ts +2 -0
  116. package/dist/api/resources/reference/types/ExchangeRatesOverridesListReferenceResponse.d.ts +2 -0
  117. package/dist/api/resources/reference/types/SeriesListReferenceResponse.d.ts +2 -0
  118. package/dist/api/resources/reference/types/UnitsListReferenceResponse.d.ts +2 -0
  119. package/dist/api/resources/reference/types/VatClassifiersListReferenceResponse.d.ts +2 -0
  120. package/dist/api/resources/reports/types/JobsListReportsResponse.d.ts +2 -0
  121. package/dist/api/resources/reports/types/PartnerBalancesReportsResponse.d.ts +5 -0
  122. package/dist/api/resources/sales/types/ActsListSalesResponse.d.ts +2 -0
  123. package/dist/api/resources/sales/types/InvoicesEinvoiceSendSalesResponse.d.ts +1 -1
  124. package/dist/api/resources/sales/types/InvoicesListSalesResponse.d.ts +2 -0
  125. package/dist/api/resources/sales/types/InvoicesPeppolSendSalesResponse.d.ts +1 -1
  126. package/dist/api/resources/sales/types/RecognitionRunsListSalesResponse.d.ts +2 -0
  127. package/dist/api/resources/sales/types/RecognitionSchedulesListSalesResponse.d.ts +2 -0
  128. package/dist/api/resources/sales/types/RefundLiabilityListSalesResponse.d.ts +2 -0
  129. package/dist/api/resources/transport/types/WaybillsListTransportResponse.d.ts +2 -0
  130. package/dist/api/resources/webhooks/types/DeliveriesListWebhooksResponse.d.ts +2 -0
  131. package/dist/api/resources/webhooks/types/SubscriptionsListWebhooksResponse.d.ts +2 -0
  132. package/package.json +1 -1
@@ -313,6 +313,112 @@ export declare class LeadsClient {
313
313
  */
314
314
  sourcesOptions(request?: NordletApi.SourcesOptionsLeadsRequest, requestOptions?: LeadsClient.RequestOptions): core.HttpResponsePromise<NordletApi.SourcesOptionsLeadsResponse>;
315
315
  private __sourcesOptions;
316
+ /**
317
+ * @param {NordletApi.TypesCreateLeadsRequest} request
318
+ * @param {LeadsClient.RequestOptions} requestOptions - Request-specific configuration.
319
+ *
320
+ * @throws {@link NordletApi.BadRequestError}
321
+ * @throws {@link NordletApi.UnauthorizedError}
322
+ * @throws {@link NordletApi.PaymentRequiredError}
323
+ * @throws {@link NordletApi.ForbiddenError}
324
+ * @throws {@link NordletApi.NotFoundError}
325
+ * @throws {@link NordletApi.ConflictError}
326
+ * @throws {@link NordletApi.ContentTooLargeError}
327
+ * @throws {@link NordletApi.UnprocessableEntityError}
328
+ * @throws {@link NordletApi.TooManyRequestsError}
329
+ * @throws {@link NordletApi.InternalServerError}
330
+ *
331
+ * @example
332
+ * await client.leads.typesCreate({
333
+ * name: "name"
334
+ * })
335
+ */
336
+ typesCreate(request: NordletApi.TypesCreateLeadsRequest, requestOptions?: LeadsClient.RequestOptions): core.HttpResponsePromise<NordletApi.TypesCreateLeadsResponse>;
337
+ private __typesCreate;
338
+ /**
339
+ * @param {NordletApi.TypesUpdateLeadsRequest} request
340
+ * @param {LeadsClient.RequestOptions} requestOptions - Request-specific configuration.
341
+ *
342
+ * @throws {@link NordletApi.BadRequestError}
343
+ * @throws {@link NordletApi.UnauthorizedError}
344
+ * @throws {@link NordletApi.PaymentRequiredError}
345
+ * @throws {@link NordletApi.ForbiddenError}
346
+ * @throws {@link NordletApi.NotFoundError}
347
+ * @throws {@link NordletApi.ConflictError}
348
+ * @throws {@link NordletApi.ContentTooLargeError}
349
+ * @throws {@link NordletApi.UnprocessableEntityError}
350
+ * @throws {@link NordletApi.TooManyRequestsError}
351
+ * @throws {@link NordletApi.InternalServerError}
352
+ *
353
+ * @example
354
+ * await client.leads.typesUpdate({
355
+ * id: "id"
356
+ * })
357
+ */
358
+ typesUpdate(request: NordletApi.TypesUpdateLeadsRequest, requestOptions?: LeadsClient.RequestOptions): core.HttpResponsePromise<NordletApi.TypesUpdateLeadsResponse>;
359
+ private __typesUpdate;
360
+ /**
361
+ * @param {NordletApi.TypesDeleteLeadsRequest} request
362
+ * @param {LeadsClient.RequestOptions} requestOptions - Request-specific configuration.
363
+ *
364
+ * @throws {@link NordletApi.BadRequestError}
365
+ * @throws {@link NordletApi.UnauthorizedError}
366
+ * @throws {@link NordletApi.PaymentRequiredError}
367
+ * @throws {@link NordletApi.ForbiddenError}
368
+ * @throws {@link NordletApi.NotFoundError}
369
+ * @throws {@link NordletApi.ConflictError}
370
+ * @throws {@link NordletApi.ContentTooLargeError}
371
+ * @throws {@link NordletApi.UnprocessableEntityError}
372
+ * @throws {@link NordletApi.TooManyRequestsError}
373
+ * @throws {@link NordletApi.InternalServerError}
374
+ *
375
+ * @example
376
+ * await client.leads.typesDelete({
377
+ * id: "id"
378
+ * })
379
+ */
380
+ typesDelete(request: NordletApi.TypesDeleteLeadsRequest, requestOptions?: LeadsClient.RequestOptions): core.HttpResponsePromise<NordletApi.TypesDeleteLeadsResponse>;
381
+ private __typesDelete;
382
+ /**
383
+ * @param {NordletApi.TypesListLeadsRequest} request
384
+ * @param {LeadsClient.RequestOptions} requestOptions - Request-specific configuration.
385
+ *
386
+ * @throws {@link NordletApi.BadRequestError}
387
+ * @throws {@link NordletApi.UnauthorizedError}
388
+ * @throws {@link NordletApi.PaymentRequiredError}
389
+ * @throws {@link NordletApi.ForbiddenError}
390
+ * @throws {@link NordletApi.NotFoundError}
391
+ * @throws {@link NordletApi.ConflictError}
392
+ * @throws {@link NordletApi.ContentTooLargeError}
393
+ * @throws {@link NordletApi.UnprocessableEntityError}
394
+ * @throws {@link NordletApi.TooManyRequestsError}
395
+ * @throws {@link NordletApi.InternalServerError}
396
+ *
397
+ * @example
398
+ * await client.leads.typesList()
399
+ */
400
+ typesList(request?: NordletApi.TypesListLeadsRequest, requestOptions?: LeadsClient.RequestOptions): core.HttpResponsePromise<NordletApi.TypesListLeadsResponse>;
401
+ private __typesList;
402
+ /**
403
+ * @param {NordletApi.TypesOptionsLeadsRequest} request
404
+ * @param {LeadsClient.RequestOptions} requestOptions - Request-specific configuration.
405
+ *
406
+ * @throws {@link NordletApi.BadRequestError}
407
+ * @throws {@link NordletApi.UnauthorizedError}
408
+ * @throws {@link NordletApi.PaymentRequiredError}
409
+ * @throws {@link NordletApi.ForbiddenError}
410
+ * @throws {@link NordletApi.NotFoundError}
411
+ * @throws {@link NordletApi.ConflictError}
412
+ * @throws {@link NordletApi.ContentTooLargeError}
413
+ * @throws {@link NordletApi.UnprocessableEntityError}
414
+ * @throws {@link NordletApi.TooManyRequestsError}
415
+ * @throws {@link NordletApi.InternalServerError}
416
+ *
417
+ * @example
418
+ * await client.leads.typesOptions()
419
+ */
420
+ typesOptions(request?: NordletApi.TypesOptionsLeadsRequest, requestOptions?: LeadsClient.RequestOptions): core.HttpResponsePromise<NordletApi.TypesOptionsLeadsResponse>;
421
+ private __typesOptions;
316
422
  /**
317
423
  * Create a customer partner from the lead, move the lead files to the partner, copy the lead notes into the partner notes and mark the lead as converted.
318
424
  *
@@ -1132,6 +1132,387 @@ class LeadsClient {
1132
1132
  }
1133
1133
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/leads/sources/options");
1134
1134
  }
1135
+ /**
1136
+ * @param {NordletApi.TypesCreateLeadsRequest} request
1137
+ * @param {LeadsClient.RequestOptions} requestOptions - Request-specific configuration.
1138
+ *
1139
+ * @throws {@link NordletApi.BadRequestError}
1140
+ * @throws {@link NordletApi.UnauthorizedError}
1141
+ * @throws {@link NordletApi.PaymentRequiredError}
1142
+ * @throws {@link NordletApi.ForbiddenError}
1143
+ * @throws {@link NordletApi.NotFoundError}
1144
+ * @throws {@link NordletApi.ConflictError}
1145
+ * @throws {@link NordletApi.ContentTooLargeError}
1146
+ * @throws {@link NordletApi.UnprocessableEntityError}
1147
+ * @throws {@link NordletApi.TooManyRequestsError}
1148
+ * @throws {@link NordletApi.InternalServerError}
1149
+ *
1150
+ * @example
1151
+ * await client.leads.typesCreate({
1152
+ * name: "name"
1153
+ * })
1154
+ */
1155
+ typesCreate(request, requestOptions) {
1156
+ return core.HttpResponsePromise.fromPromise(this.__typesCreate(request, requestOptions));
1157
+ }
1158
+ async __typesCreate(request, requestOptions) {
1159
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1160
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1161
+ const _response = await core.fetcher({
1162
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1163
+ (await core.Supplier.get(this._options.environment)) ??
1164
+ environments.NordletApiEnvironment.Production, "v1/leads/types/create"),
1165
+ method: "POST",
1166
+ headers: _headers,
1167
+ contentType: "application/json",
1168
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1169
+ requestType: "json",
1170
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions?.additionalBodyParameters),
1171
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1172
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1173
+ abortSignal: requestOptions?.abortSignal,
1174
+ fetchFn: this._options?.fetch,
1175
+ logging: this._options.logging,
1176
+ });
1177
+ if (_response.ok) {
1178
+ return { data: _response.body, rawResponse: _response.rawResponse };
1179
+ }
1180
+ if (_response.error.reason === "status-code") {
1181
+ switch (_response.error.statusCode) {
1182
+ case 400:
1183
+ throw new NordletApi.BadRequestError(_response.error.body, _response.rawResponse);
1184
+ case 401:
1185
+ throw new NordletApi.UnauthorizedError(_response.error.body, _response.rawResponse);
1186
+ case 402:
1187
+ throw new NordletApi.PaymentRequiredError(_response.error.body, _response.rawResponse);
1188
+ case 403:
1189
+ throw new NordletApi.ForbiddenError(_response.error.body, _response.rawResponse);
1190
+ case 404:
1191
+ throw new NordletApi.NotFoundError(_response.error.body, _response.rawResponse);
1192
+ case 409:
1193
+ throw new NordletApi.ConflictError(_response.error.body, _response.rawResponse);
1194
+ case 413:
1195
+ throw new NordletApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
1196
+ case 422:
1197
+ throw new NordletApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1198
+ case 429:
1199
+ throw new NordletApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
1200
+ case 500:
1201
+ throw new NordletApi.InternalServerError(_response.error.body, _response.rawResponse);
1202
+ default:
1203
+ throw new errors.NordletApiError({
1204
+ statusCode: _response.error.statusCode,
1205
+ body: _response.error.body,
1206
+ rawResponse: _response.rawResponse,
1207
+ });
1208
+ }
1209
+ }
1210
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/leads/types/create");
1211
+ }
1212
+ /**
1213
+ * @param {NordletApi.TypesUpdateLeadsRequest} request
1214
+ * @param {LeadsClient.RequestOptions} requestOptions - Request-specific configuration.
1215
+ *
1216
+ * @throws {@link NordletApi.BadRequestError}
1217
+ * @throws {@link NordletApi.UnauthorizedError}
1218
+ * @throws {@link NordletApi.PaymentRequiredError}
1219
+ * @throws {@link NordletApi.ForbiddenError}
1220
+ * @throws {@link NordletApi.NotFoundError}
1221
+ * @throws {@link NordletApi.ConflictError}
1222
+ * @throws {@link NordletApi.ContentTooLargeError}
1223
+ * @throws {@link NordletApi.UnprocessableEntityError}
1224
+ * @throws {@link NordletApi.TooManyRequestsError}
1225
+ * @throws {@link NordletApi.InternalServerError}
1226
+ *
1227
+ * @example
1228
+ * await client.leads.typesUpdate({
1229
+ * id: "id"
1230
+ * })
1231
+ */
1232
+ typesUpdate(request, requestOptions) {
1233
+ return core.HttpResponsePromise.fromPromise(this.__typesUpdate(request, requestOptions));
1234
+ }
1235
+ async __typesUpdate(request, requestOptions) {
1236
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1237
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1238
+ const _response = await core.fetcher({
1239
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1240
+ (await core.Supplier.get(this._options.environment)) ??
1241
+ environments.NordletApiEnvironment.Production, "v1/leads/types/update"),
1242
+ method: "POST",
1243
+ headers: _headers,
1244
+ contentType: "application/json",
1245
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1246
+ requestType: "json",
1247
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions?.additionalBodyParameters),
1248
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1249
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1250
+ abortSignal: requestOptions?.abortSignal,
1251
+ fetchFn: this._options?.fetch,
1252
+ logging: this._options.logging,
1253
+ });
1254
+ if (_response.ok) {
1255
+ return { data: _response.body, rawResponse: _response.rawResponse };
1256
+ }
1257
+ if (_response.error.reason === "status-code") {
1258
+ switch (_response.error.statusCode) {
1259
+ case 400:
1260
+ throw new NordletApi.BadRequestError(_response.error.body, _response.rawResponse);
1261
+ case 401:
1262
+ throw new NordletApi.UnauthorizedError(_response.error.body, _response.rawResponse);
1263
+ case 402:
1264
+ throw new NordletApi.PaymentRequiredError(_response.error.body, _response.rawResponse);
1265
+ case 403:
1266
+ throw new NordletApi.ForbiddenError(_response.error.body, _response.rawResponse);
1267
+ case 404:
1268
+ throw new NordletApi.NotFoundError(_response.error.body, _response.rawResponse);
1269
+ case 409:
1270
+ throw new NordletApi.ConflictError(_response.error.body, _response.rawResponse);
1271
+ case 413:
1272
+ throw new NordletApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
1273
+ case 422:
1274
+ throw new NordletApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1275
+ case 429:
1276
+ throw new NordletApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
1277
+ case 500:
1278
+ throw new NordletApi.InternalServerError(_response.error.body, _response.rawResponse);
1279
+ default:
1280
+ throw new errors.NordletApiError({
1281
+ statusCode: _response.error.statusCode,
1282
+ body: _response.error.body,
1283
+ rawResponse: _response.rawResponse,
1284
+ });
1285
+ }
1286
+ }
1287
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/leads/types/update");
1288
+ }
1289
+ /**
1290
+ * @param {NordletApi.TypesDeleteLeadsRequest} request
1291
+ * @param {LeadsClient.RequestOptions} requestOptions - Request-specific configuration.
1292
+ *
1293
+ * @throws {@link NordletApi.BadRequestError}
1294
+ * @throws {@link NordletApi.UnauthorizedError}
1295
+ * @throws {@link NordletApi.PaymentRequiredError}
1296
+ * @throws {@link NordletApi.ForbiddenError}
1297
+ * @throws {@link NordletApi.NotFoundError}
1298
+ * @throws {@link NordletApi.ConflictError}
1299
+ * @throws {@link NordletApi.ContentTooLargeError}
1300
+ * @throws {@link NordletApi.UnprocessableEntityError}
1301
+ * @throws {@link NordletApi.TooManyRequestsError}
1302
+ * @throws {@link NordletApi.InternalServerError}
1303
+ *
1304
+ * @example
1305
+ * await client.leads.typesDelete({
1306
+ * id: "id"
1307
+ * })
1308
+ */
1309
+ typesDelete(request, requestOptions) {
1310
+ return core.HttpResponsePromise.fromPromise(this.__typesDelete(request, requestOptions));
1311
+ }
1312
+ async __typesDelete(request, requestOptions) {
1313
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1314
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1315
+ const _response = await core.fetcher({
1316
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1317
+ (await core.Supplier.get(this._options.environment)) ??
1318
+ environments.NordletApiEnvironment.Production, "v1/leads/types/delete"),
1319
+ method: "POST",
1320
+ headers: _headers,
1321
+ contentType: "application/json",
1322
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1323
+ requestType: "json",
1324
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions?.additionalBodyParameters),
1325
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1326
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1327
+ abortSignal: requestOptions?.abortSignal,
1328
+ fetchFn: this._options?.fetch,
1329
+ logging: this._options.logging,
1330
+ });
1331
+ if (_response.ok) {
1332
+ return { data: _response.body, rawResponse: _response.rawResponse };
1333
+ }
1334
+ if (_response.error.reason === "status-code") {
1335
+ switch (_response.error.statusCode) {
1336
+ case 400:
1337
+ throw new NordletApi.BadRequestError(_response.error.body, _response.rawResponse);
1338
+ case 401:
1339
+ throw new NordletApi.UnauthorizedError(_response.error.body, _response.rawResponse);
1340
+ case 402:
1341
+ throw new NordletApi.PaymentRequiredError(_response.error.body, _response.rawResponse);
1342
+ case 403:
1343
+ throw new NordletApi.ForbiddenError(_response.error.body, _response.rawResponse);
1344
+ case 404:
1345
+ throw new NordletApi.NotFoundError(_response.error.body, _response.rawResponse);
1346
+ case 409:
1347
+ throw new NordletApi.ConflictError(_response.error.body, _response.rawResponse);
1348
+ case 413:
1349
+ throw new NordletApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
1350
+ case 422:
1351
+ throw new NordletApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1352
+ case 429:
1353
+ throw new NordletApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
1354
+ case 500:
1355
+ throw new NordletApi.InternalServerError(_response.error.body, _response.rawResponse);
1356
+ default:
1357
+ throw new errors.NordletApiError({
1358
+ statusCode: _response.error.statusCode,
1359
+ body: _response.error.body,
1360
+ rawResponse: _response.rawResponse,
1361
+ });
1362
+ }
1363
+ }
1364
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/leads/types/delete");
1365
+ }
1366
+ /**
1367
+ * @param {NordletApi.TypesListLeadsRequest} request
1368
+ * @param {LeadsClient.RequestOptions} requestOptions - Request-specific configuration.
1369
+ *
1370
+ * @throws {@link NordletApi.BadRequestError}
1371
+ * @throws {@link NordletApi.UnauthorizedError}
1372
+ * @throws {@link NordletApi.PaymentRequiredError}
1373
+ * @throws {@link NordletApi.ForbiddenError}
1374
+ * @throws {@link NordletApi.NotFoundError}
1375
+ * @throws {@link NordletApi.ConflictError}
1376
+ * @throws {@link NordletApi.ContentTooLargeError}
1377
+ * @throws {@link NordletApi.UnprocessableEntityError}
1378
+ * @throws {@link NordletApi.TooManyRequestsError}
1379
+ * @throws {@link NordletApi.InternalServerError}
1380
+ *
1381
+ * @example
1382
+ * await client.leads.typesList()
1383
+ */
1384
+ typesList(request = {}, requestOptions) {
1385
+ return core.HttpResponsePromise.fromPromise(this.__typesList(request, requestOptions));
1386
+ }
1387
+ async __typesList(request = {}, requestOptions) {
1388
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1389
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1390
+ const _response = await core.fetcher({
1391
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1392
+ (await core.Supplier.get(this._options.environment)) ??
1393
+ environments.NordletApiEnvironment.Production, "v1/leads/types/list"),
1394
+ method: "POST",
1395
+ headers: _headers,
1396
+ contentType: "application/json",
1397
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1398
+ requestType: "json",
1399
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions?.additionalBodyParameters),
1400
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1401
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1402
+ abortSignal: requestOptions?.abortSignal,
1403
+ fetchFn: this._options?.fetch,
1404
+ logging: this._options.logging,
1405
+ });
1406
+ if (_response.ok) {
1407
+ return { data: _response.body, rawResponse: _response.rawResponse };
1408
+ }
1409
+ if (_response.error.reason === "status-code") {
1410
+ switch (_response.error.statusCode) {
1411
+ case 400:
1412
+ throw new NordletApi.BadRequestError(_response.error.body, _response.rawResponse);
1413
+ case 401:
1414
+ throw new NordletApi.UnauthorizedError(_response.error.body, _response.rawResponse);
1415
+ case 402:
1416
+ throw new NordletApi.PaymentRequiredError(_response.error.body, _response.rawResponse);
1417
+ case 403:
1418
+ throw new NordletApi.ForbiddenError(_response.error.body, _response.rawResponse);
1419
+ case 404:
1420
+ throw new NordletApi.NotFoundError(_response.error.body, _response.rawResponse);
1421
+ case 409:
1422
+ throw new NordletApi.ConflictError(_response.error.body, _response.rawResponse);
1423
+ case 413:
1424
+ throw new NordletApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
1425
+ case 422:
1426
+ throw new NordletApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1427
+ case 429:
1428
+ throw new NordletApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
1429
+ case 500:
1430
+ throw new NordletApi.InternalServerError(_response.error.body, _response.rawResponse);
1431
+ default:
1432
+ throw new errors.NordletApiError({
1433
+ statusCode: _response.error.statusCode,
1434
+ body: _response.error.body,
1435
+ rawResponse: _response.rawResponse,
1436
+ });
1437
+ }
1438
+ }
1439
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/leads/types/list");
1440
+ }
1441
+ /**
1442
+ * @param {NordletApi.TypesOptionsLeadsRequest} request
1443
+ * @param {LeadsClient.RequestOptions} requestOptions - Request-specific configuration.
1444
+ *
1445
+ * @throws {@link NordletApi.BadRequestError}
1446
+ * @throws {@link NordletApi.UnauthorizedError}
1447
+ * @throws {@link NordletApi.PaymentRequiredError}
1448
+ * @throws {@link NordletApi.ForbiddenError}
1449
+ * @throws {@link NordletApi.NotFoundError}
1450
+ * @throws {@link NordletApi.ConflictError}
1451
+ * @throws {@link NordletApi.ContentTooLargeError}
1452
+ * @throws {@link NordletApi.UnprocessableEntityError}
1453
+ * @throws {@link NordletApi.TooManyRequestsError}
1454
+ * @throws {@link NordletApi.InternalServerError}
1455
+ *
1456
+ * @example
1457
+ * await client.leads.typesOptions()
1458
+ */
1459
+ typesOptions(request = {}, requestOptions) {
1460
+ return core.HttpResponsePromise.fromPromise(this.__typesOptions(request, requestOptions));
1461
+ }
1462
+ async __typesOptions(request = {}, requestOptions) {
1463
+ const _authRequest = await this._options.authProvider.getAuthRequest();
1464
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
1465
+ const _response = await core.fetcher({
1466
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
1467
+ (await core.Supplier.get(this._options.environment)) ??
1468
+ environments.NordletApiEnvironment.Production, "v1/leads/types/options"),
1469
+ method: "POST",
1470
+ headers: _headers,
1471
+ contentType: "application/json",
1472
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
1473
+ requestType: "json",
1474
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions?.additionalBodyParameters),
1475
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
1476
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
1477
+ abortSignal: requestOptions?.abortSignal,
1478
+ fetchFn: this._options?.fetch,
1479
+ logging: this._options.logging,
1480
+ });
1481
+ if (_response.ok) {
1482
+ return { data: _response.body, rawResponse: _response.rawResponse };
1483
+ }
1484
+ if (_response.error.reason === "status-code") {
1485
+ switch (_response.error.statusCode) {
1486
+ case 400:
1487
+ throw new NordletApi.BadRequestError(_response.error.body, _response.rawResponse);
1488
+ case 401:
1489
+ throw new NordletApi.UnauthorizedError(_response.error.body, _response.rawResponse);
1490
+ case 402:
1491
+ throw new NordletApi.PaymentRequiredError(_response.error.body, _response.rawResponse);
1492
+ case 403:
1493
+ throw new NordletApi.ForbiddenError(_response.error.body, _response.rawResponse);
1494
+ case 404:
1495
+ throw new NordletApi.NotFoundError(_response.error.body, _response.rawResponse);
1496
+ case 409:
1497
+ throw new NordletApi.ConflictError(_response.error.body, _response.rawResponse);
1498
+ case 413:
1499
+ throw new NordletApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
1500
+ case 422:
1501
+ throw new NordletApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1502
+ case 429:
1503
+ throw new NordletApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
1504
+ case 500:
1505
+ throw new NordletApi.InternalServerError(_response.error.body, _response.rawResponse);
1506
+ default:
1507
+ throw new errors.NordletApiError({
1508
+ statusCode: _response.error.statusCode,
1509
+ body: _response.error.body,
1510
+ rawResponse: _response.rawResponse,
1511
+ });
1512
+ }
1513
+ }
1514
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/leads/types/options");
1515
+ }
1135
1516
  /**
1136
1517
  * Create a customer partner from the lead, move the lead files to the partner, copy the lead notes into the partner notes and mark the lead as converted.
1137
1518
  *
@@ -12,6 +12,7 @@ export interface CreateLeadsRequest {
12
12
  website?: string;
13
13
  countryCode?: string;
14
14
  sourceId?: string;
15
+ typeId?: string;
15
16
  status?: CreateLeadsRequest.Status;
16
17
  estimatedValue?: string;
17
18
  currency?: string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * name: "name"
5
+ * }
6
+ */
7
+ export interface TypesCreateLeadsRequest {
8
+ name: string;
9
+ isActive?: boolean;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "id"
5
+ * }
6
+ */
7
+ export interface TypesDeleteLeadsRequest {
8
+ id: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export type TypesListLeadsRequest = {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export type TypesOptionsLeadsRequest = {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "id"
5
+ * }
6
+ */
7
+ export interface TypesUpdateLeadsRequest {
8
+ id: string;
9
+ name?: string;
10
+ isActive?: boolean;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,6 +13,7 @@ export interface UpdateLeadsRequest {
13
13
  website?: string | null;
14
14
  countryCode?: string | null;
15
15
  sourceId?: string | null;
16
+ typeId?: string | null;
16
17
  status?: UpdateLeadsRequest.Status;
17
18
  estimatedValue?: string | null;
18
19
  currency?: string;
@@ -12,4 +12,9 @@ export type { SourcesDeleteLeadsRequest } from "./SourcesDeleteLeadsRequest.js";
12
12
  export type { SourcesListLeadsRequest } from "./SourcesListLeadsRequest.js";
13
13
  export type { SourcesOptionsLeadsRequest } from "./SourcesOptionsLeadsRequest.js";
14
14
  export type { SourcesUpdateLeadsRequest } from "./SourcesUpdateLeadsRequest.js";
15
+ export type { TypesCreateLeadsRequest } from "./TypesCreateLeadsRequest.js";
16
+ export type { TypesDeleteLeadsRequest } from "./TypesDeleteLeadsRequest.js";
17
+ export type { TypesListLeadsRequest } from "./TypesListLeadsRequest.js";
18
+ export type { TypesOptionsLeadsRequest } from "./TypesOptionsLeadsRequest.js";
19
+ export type { TypesUpdateLeadsRequest } from "./TypesUpdateLeadsRequest.js";
15
20
  export { UpdateLeadsRequest } from "./UpdateLeadsRequest.js";
@@ -13,6 +13,8 @@ export declare namespace ConvertLeadsResponse {
13
13
  countryCode: string | null;
14
14
  sourceId: string | null;
15
15
  sourceName: string | null;
16
+ typeId: string | null;
17
+ typeName: string | null;
16
18
  status: Lead.Status;
17
19
  estimatedValue: string | null;
18
20
  currency: string;
@@ -8,6 +8,8 @@ export interface CreateLeadsResponse {
8
8
  countryCode: string | null;
9
9
  sourceId: string | null;
10
10
  sourceName: string | null;
11
+ typeId: string | null;
12
+ typeName: string | null;
11
13
  status: CreateLeadsResponse.Status;
12
14
  estimatedValue: string | null;
13
15
  currency: string;
@@ -8,6 +8,8 @@ export interface GetLeadsResponse {
8
8
  countryCode: string | null;
9
9
  sourceId: string | null;
10
10
  sourceName: string | null;
11
+ typeId: string | null;
12
+ typeName: string | null;
11
13
  status: GetLeadsResponse.Status;
12
14
  estimatedValue: string | null;
13
15
  currency: string;
@@ -4,6 +4,8 @@ export interface ListLeadsResponse {
4
4
  pageSize: number;
5
5
  total: number;
6
6
  totals?: Record<string, string> | undefined;
7
+ /** The requested totals split by currency code, present when the listed records carry a currency */
8
+ totalsByCurrency?: Record<string, Record<string, string>> | undefined;
7
9
  }
8
10
  export declare namespace ListLeadsResponse {
9
11
  type Rows = Rows.Item[];
@@ -18,6 +20,8 @@ export declare namespace ListLeadsResponse {
18
20
  countryCode: string | null;
19
21
  sourceId: string | null;
20
22
  sourceName: string | null;
23
+ typeId: string | null;
24
+ typeName: string | null;
21
25
  status: Item.Status;
22
26
  estimatedValue: string | null;
23
27
  currency: string;
@@ -0,0 +1,6 @@
1
+ export interface TypesCreateLeadsResponse {
2
+ id: string;
3
+ name: string;
4
+ isActive: boolean;
5
+ createdAt: string;
6
+ }