sgp-sdk 2.0.0-beta.1 → 2.0.0-beta.2

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 (33) hide show
  1. package/CHANGELOG.md +147 -0
  2. package/COMPATIBILITY.md +161 -81
  3. package/MIGRATION.md +66 -5
  4. package/README.md +111 -69
  5. package/dist/client.d.ts +303 -26
  6. package/dist/constants.d.ts +13 -0
  7. package/dist/document.d.ts +11 -0
  8. package/dist/index.d.ts +13 -3
  9. package/dist/index.js +1510 -708
  10. package/dist/normalize.d.ts +9 -0
  11. package/dist/operation-sensitivity.d.ts +239 -6
  12. package/dist/operation.d.ts +7 -1
  13. package/dist/operations/contracts-check-connection.d.ts +56 -0
  14. package/dist/operations/contracts-list-services.d.ts +103 -0
  15. package/dist/operations/coverage-check-address.d.ts +46 -0
  16. package/dist/operations/coverage-check.d.ts +8 -7
  17. package/dist/operations/coverage-list-gateways.d.ts +16 -0
  18. package/dist/operations/crm-customers-create.d.ts +13 -3
  19. package/dist/operations/customers-list.d.ts +6 -0
  20. package/dist/operations/invoices-list.d.ts +11 -5
  21. package/dist/operations/maintenance-list.d.ts +35 -0
  22. package/dist/operations/occurrences-create.d.ts +10 -1
  23. package/dist/operations/occurrences-list.d.ts +127 -0
  24. package/dist/operations/pre-registrations-create.d.ts +29 -6
  25. package/dist/operations/pre-registrations-list-plans.d.ts +2 -2
  26. package/dist/operations/services-add-generic.d.ts +52 -0
  27. package/dist/operations/services-add-tv.d.ts +3 -3
  28. package/dist/operations/services-remove-generic.d.ts +28 -0
  29. package/dist/operations/services-remove-tv.d.ts +3 -3
  30. package/dist/operations/work-orders-get.d.ts +99 -0
  31. package/dist/operations/work-orders-list-comments.d.ts +34 -0
  32. package/dist/result.d.ts +5 -1
  33. package/package.json +1 -1
package/dist/client.d.ts CHANGED
@@ -2,11 +2,15 @@ import { type CallOptions, type ClientOptions } from "./config.js";
2
2
  import { type CatalogsListBillingProfilesData } from "./operations/catalogs-list-billing-profiles.js";
3
3
  import { type CatalogsListNasData } from "./operations/catalogs-list-nas.js";
4
4
  import { type CatalogsListPopsData } from "./operations/catalogs-list-pops.js";
5
+ import { type ContractsCheckConnectionData, type ContractsCheckConnectionInput } from "./operations/contracts-check-connection.js";
5
6
  import { type ContractsListData, type ContractsListInput } from "./operations/contracts-list.js";
7
+ import { type ContractsListServicesData, type ContractsListServicesInput } from "./operations/contracts-list-services.js";
6
8
  import { type ContractsListStatusReasonsData } from "./operations/contracts-list-status-reasons.js";
7
9
  import { type ContractUpdateData, type ContractUpdateInput } from "./operations/contracts-update.js";
8
10
  import { type ContractUpdateStatusData, type ContractUpdateStatusInput } from "./operations/contracts-update-status.js";
9
11
  import { type CoverageCheckData, type CoverageCheckInput } from "./operations/coverage-check.js";
12
+ import { type CoverageCheckAddressData, type CoverageCheckAddressInput } from "./operations/coverage-check-address.js";
13
+ import { type CoverageListGatewaysData } from "./operations/coverage-list-gateways.js";
10
14
  import { type CrmContractCreateData, type CrmContractCreateInput } from "./operations/crm-contracts-create.js";
11
15
  import { type CrmContractCreateByCpfCnpjData, type CrmContractCreateByCpfCnpjInput } from "./operations/crm-contracts-create-by-cpf-cnpj.js";
12
16
  import { type CrmContractsListData, type CrmContractsListInput } from "./operations/crm-contracts-list.js";
@@ -18,7 +22,9 @@ import { type DocumentAddInput } from "./operations/documents-add.js";
18
22
  import { type DocumentsListData, type DocumentsListInput } from "./operations/documents-list.js";
19
23
  import { type ExperimentalAnnotationsListData, type ExperimentalAnnotationsListInput } from "./operations/experimental-annotations-list.js";
20
24
  import { type InvoicesListData, type InvoicesListInput } from "./operations/invoices-list.js";
25
+ import { type MaintenanceListData } from "./operations/maintenance-list.js";
21
26
  import { type OccurrenceCreateData, type OccurrenceCreateInput } from "./operations/occurrences-create.js";
27
+ import { type OccurrencesListData, type OccurrencesListInput } from "./operations/occurrences-list.js";
22
28
  import { type OccurrencesListMethodsData } from "./operations/occurrences-list-methods.js";
23
29
  import { type OccurrencesListTypesData } from "./operations/occurrences-list-types.js";
24
30
  import { type PlansListData } from "./operations/plans-list.js";
@@ -26,10 +32,14 @@ import { type PreRegistrationCreateData, type PreRegistrationCreateInput } from
26
32
  import { type PreRegistrationsListDueDaysData } from "./operations/pre-registrations-list-due-days.js";
27
33
  import { type PreRegistrationsListPlansData } from "./operations/pre-registrations-list-plans.js";
28
34
  import { type PreRegistrationsListSellersData } from "./operations/pre-registrations-list-sellers.js";
35
+ import { type ServiceAddGenericData, type ServiceAddGenericInput } from "./operations/services-add-generic.js";
29
36
  import { type ServiceAddTvData, type ServiceAddTvInput } from "./operations/services-add-tv.js";
30
37
  import { type ServiceChangePlanData, type ServiceChangePlanInput } from "./operations/services-change-plan.js";
38
+ import { type ServiceRemoveGenericData, type ServiceRemoveGenericInput } from "./operations/services-remove-generic.js";
31
39
  import { type ServiceRemoveTvData, type ServiceRemoveTvInput } from "./operations/services-remove-tv.js";
40
+ import { type WorkOrdersGetData, type WorkOrdersGetInput } from "./operations/work-orders-get.js";
32
41
  import { type WorkOrdersListData, type WorkOrdersListInput } from "./operations/work-orders-list.js";
42
+ import { type WorkOrdersListCommentsData, type WorkOrdersListCommentsInput } from "./operations/work-orders-list-comments.js";
33
43
  import { type WorkOrdersListReasonsData } from "./operations/work-orders-list-reasons.js";
34
44
  import { type RawRequestInput } from "./raw-request.js";
35
45
  import type { SgpResult } from "./result.js";
@@ -75,14 +85,27 @@ export interface CrmCustomersClient {
75
85
  * Creates a CRM customer: `POST /api/crm/cliente/F` or `/J`, picked by `input.personType`, JSON
76
86
  * with the address nested (`endereco`) and also as loose fields, as SGP reads both. Never retried.
77
87
  *
78
- * WARNING: SGP accepts a CPF that already belongs to a customer and creates ANOTHER customer with
79
- * the same document (live: the duplicate was created and both customers were listed by `customers.list`). Unlike
80
- * `preRegistrations.create`, which refuses an existing CPF (402), nothing here prevents a
81
- * duplicate, and a duplicate breaks every lookup by document. Check the document first
82
- * (`customers.search`, `customers.list`) and decide in your own code whether a second customer is
88
+ * SGP refuses a document that is already registered: HTTP 400 with `errors.cpfcnpj`, which is
89
+ * `REJECTED` with `error.reason === "DOCUMENT_ALREADY_REGISTERED"` (the same reason as
90
+ * `preRegistrations.create`) and effect `"none"`; any other field error keeps no reason. The
91
+ * check holds for every customer, at any status (status 6, "Contrato realizado no SGP",
92
+ * included), with one observed exception: a customer whose document was stored UNFORMATTED (for
93
+ * example a pré-cadastro created with digits only, which SGP stores as sent) was not
94
+ * detected, and a duplicate was created (live: both customers were listed by `customers.list`).
95
+ * A duplicate breaks every lookup by document. So a rejection is NOT a complete guard: ALWAYS read
96
+ * `customers.list({ cpfcnpj })` first and decide in your own code whether a second customer is
83
97
  * acceptable. A CRM customer is an ordinary customer: its `cliente_id` is the `CustomerId` that
84
98
  * `customers.list` shows.
85
99
  *
100
+ * `cpfcnpj` goes out in the canonical mask the base holds: a CPF (`/F`) as `999.999.999-99`, a
101
+ * CNPJ (`/J`, alphanumeric included, uppercased) as `AA.AAA.AAA/AAAA-99`, whether you give it
102
+ * with or without punctuation. A document in any other format, or of the other kind than the
103
+ * route, is refused locally (`INVALID_INPUT`, `error.issues` `["cpfcnpj: expected ..."]`, nothing
104
+ * sent, effect `"none"`). Format only: the SDK does not verify the check digits, but SGP does for
105
+ * a CPF: a CPF with wrong digits is refused with HTTP 400 `errors.cpfcnpj` "CPF inválido.", which
106
+ * is `REJECTED` with `error.reason === "DOCUMENT_INVALID"` and effect `"none"` (observed live on
107
+ * `/F`, and a read-back showed nothing created). The check digits of a CNPJ were never tested.
108
+ *
86
109
  * A success carries the new `cliente_id` (a `CustomerId`, required: a 2xx without it is
87
110
  * `INVALID_RESPONSE`) and SGP's `message`, which echoes the customer's name and document. Only
88
111
  * `/F` was exercised; `/J` follows the vendor's documentation. Other person types (`E`, `EJ`) are
@@ -241,18 +264,61 @@ export interface OccurrencesClient {
241
264
  * SGP opens a work order with it.
242
265
  *
243
266
  * A success returns `id` (the ID of the OCCURRENCE) and `protocolo` (its protocol number), both
244
- * required. It never carries the ID of the work order: read it with `workOrders.list`. The work
245
- * order's `ocorrencia` has the format of the `protocolo` (observed: a work order whose
246
- * `ocorrencia` had that format), not of the occurrence `id`; that link is observed but not
247
- * confirmed, so match on `protocolo` and verify the work order before relying on it. `motivoos` is the `codigo` of a reason of the work order, from
248
- * `workOrders.listReasons` (each SGP instance has its own).
267
+ * required. It never carries the ID of the work order: read it with `occurrences.list({ contrato })`,
268
+ * whose `ordens_servicos[].id` is the work order id (observed once; the occurrence's `numero`
269
+ * equals the work order's `ocorrencia`). That the `protocolo` returned here equals that `numero`
270
+ * was not compared in a raw capture, so check the work order before relying on it. `motivoos` is the `codigo` of a reason of the work order,
271
+ * from `workOrders.listReasons` (each SGP instance has its own).
249
272
  *
250
273
  * SGP answers some refusals with HTTP 200 and `status: 0` (and a `msg`): that is `REJECTED` with
251
274
  * effect `"unknown"`, since nothing says whether anything was created. Read the contract's
252
- * occurrences before sending again. Other failures carry `error.effect` by the same rules as
253
- * `crm.customers.create`.
275
+ * occurrences before sending again. The exception is `data_hora_agendamento` with seconds
276
+ * (`AAAA-MM-DD HH:MM:SS`), which SGP refuses with `msg` "Data e hora de agendamento inválida,
277
+ * formato esperado: AAAA-MM-DD HH:MM": `reason: "INVALID_SCHEDULE"` and effect `"none"` (the
278
+ * contract's occurrences were read back and nothing had been created; observed once). The SDK
279
+ * sends the date as given: SGP decides what is valid. Other failures carry `error.effect` by the
280
+ * same rules as `crm.customers.create`.
281
+ *
282
+ * Observed live: an occurrence WITHOUT `motivoos` is accepted and SGP still creates a work order;
283
+ * `status_encerrado: 1` closes both the occurrence and the work order; closing an installation work
284
+ * order (`motivoos` 10) did not change the contract status (it stayed inactive; observed once).
254
285
  */
255
286
  create: (input: OccurrenceCreateInput, options?: CallOptions) => Promise<SgpResult<OccurrenceCreateData>>;
287
+ /**
288
+ * Lists one page of occurrences with their work orders: `POST /api/ura/ocorrencia/list/`
289
+ * (trailing slash), `multipart/form-data` without files; every filter is optional (the vendor
290
+ * marks none as required).
291
+ *
292
+ * AT LEAST ONE FILTER IS REQUIRED: WITHOUT ONE, SGP LISTS THE OCCURRENCES OF EVERY CUSTOMER (up to
293
+ * 1000 per call, with names and free text). A call with no filter is refused locally
294
+ * (`INVALID_INPUT`, `attempts` 0, nothing sent); `offset` and `limit` are paging and do not count.
295
+ * Filter by `contrato` whenever you can. A filter that is present must say something: `contrato: 0`
296
+ * or an empty text filter is refused locally too, since SGP could read it as "no filter". Only `contrato` with `limit` was exercised; the other filters follow the
297
+ * vendor's collection.
298
+ *
299
+ * This is how to find the work order a `occurrences.create` opened: each occurrence carries
300
+ * `ordens_servicos[]`, whose `id` is the work order id (observed once, with the same
301
+ * `numero` as the work order's `ocorrencia`). Read the work order with `workOrders.get`.
302
+ *
303
+ * Returns ONE page with SGP's own `paginacao` as received: `offset` (index of the first
304
+ * occurrence, from 0), `limit` (the page size SGP applied), `parcial` (occurrences on this page)
305
+ * and `total` (occurrences matching the filters across all pages). The SDK never computes
306
+ * `total`: a page without a numeric `paginacao.total` is `INVALID_RESPONSE`. It never fetches the
307
+ * next page either: ask for it with `offset`. A contract with no occurrence is a success with
308
+ * `ocorrencias: []` and `total: 0`.
309
+ *
310
+ * Unknown fields reach `data` unchanged at every level. Only `paginacao.total`, `ocorrencias`,
311
+ * the `id` of each occurrence and the `id` of each of its work orders must have the expected type
312
+ * (an element that is not an object fails the response too: `INVALID_RESPONSE`); any other field
313
+ * of the wrong type is left out of `data` and reported in `warnings` (the original stays in
314
+ * `response`). The occurrence `numero` is text and stays text. Before the route was in the
315
+ * token's whitelist SGP answered 401 (`UNAUTHORIZED`), not the 403 of the other support reads.
316
+ *
317
+ * Each occurrence carries the customer's name, free text and the people involved: see
318
+ * `getSensitivity("occurrences.list")` and project with `pick` before logging or handing it on. A
319
+ * read: the opt-in `maxRetries` may retry it.
320
+ */
321
+ list: (input?: OccurrencesListInput, options?: CallOptions) => Promise<SgpResult<OccurrencesListData>>;
256
322
  /**
257
323
  * Lists the occurrence types: `GET /api/os/ocorrencia/tipo/list/`, credentials in the query
258
324
  * string, no input. The route is not paginated, so the result is SGP's own bare array: no page
@@ -294,6 +360,60 @@ export interface ContractsClient {
294
360
  * the opt-in `maxRetries` may retry it.
295
361
  */
296
362
  list: (input?: ContractsListInput, options?: CallOptions) => Promise<SgpResult<ContractsListData>>;
363
+ /**
364
+ * Lists the services of a contract with their online state and session: `POST
365
+ * /api/suporte/contrato/list/` (note the trailing slash), multipart form. The technical support
366
+ * read: is the customer online now (`servico_online`), since when (`rad_dataconexao`, `rad_tempo`),
367
+ * on which IP, MAC and NAS. SGP's own bare array with ONE ROW PER SERVICE (internet and TV), each
368
+ * repeating the customer, contract, address and plan; `[]` when nothing matches. A row of an
369
+ * online internet service also carries the RADIUS session (`rad_*`); an offline one has none.
370
+ * Filter by `contrato_id` (exercised) or `cliente_id` (exercised); `cliente_nome`,
371
+ * `cliente_cpfcnpj` and `servico_login` follow the vendor's documentation and were never sent.
372
+ *
373
+ * At least one filter is required: without one SGP lists the services of EVERY customer, with
374
+ * plaintext service passwords, so a call with no filter is refused locally (`INVALID_INPUT`,
375
+ * `attempts` 0, nothing sent). An empty text or a 0 id in a filter is refused locally too.
376
+ *
377
+ * Type normalization: `servico_id`, `contrato_id`, `contrato_status_id` and
378
+ * `contrato_pop_id` are numbers (SGP sends text), the RADIUS counters and ids are numbers,
379
+ * `contrato_status` is trimmed (SGP pads it: `" Ativo "`). Each row needs a numeric `servico_id`
380
+ * (`INVALID_RESPONSE` otherwise); any other field of the wrong type is left out of `data` and
381
+ * reported in `warnings` (the original stays in `response`).
382
+ *
383
+ * The rows hold PLAINTEXT SERVICE PASSWORDS and network identifiers (login, MACs, IPs, NAS, IPv6
384
+ * prefixes, session ids), and the customer's name, contact and address. Read
385
+ * `getSensitivity("contracts.listServices")` and project with `pick`; never log or hand the result
386
+ * on whole. A read: the opt-in `maxRetries` may retry it.
387
+ *
388
+ * Online rows were never captured from a synthetic contract: their `rad_*` fields follow the
389
+ * masked shape of a real contract (types only).
390
+ */
391
+ listServices: (input?: ContractsListServicesInput, options?: CallOptions) => Promise<SgpResult<ContractsListServicesData>>;
392
+ /**
393
+ * Asks SGP for its verdict on a contract's connection: `POST /api/ura/verificaacesso/` (note the
394
+ * trailing slash), multipart form. Online (`status` 1), offline (2), under maintenance (9) or not
395
+ * checked (0): see `CONNECTION_STATUS`. Pass `contrato` (exercised) or `telefone` (documented,
396
+ * never sent); `status_all: 1` includes the contracts the default filter leaves out (a suspended
397
+ * contract answered `[]` without it). `protocolo_ura` is not offered: it asks SGP to open an
398
+ * occurrence, which is `occurrences.create`'s job.
399
+ *
400
+ * THIS IS DECLARED A WRITE, although it only looks like a check. The vendor documents that, under
401
+ * an active maintenance, SGP opens an occurrence by default, even without `protocolo_ura`. That
402
+ * was not tested here (the exercised calls ran with no active maintenance, and the occurrence
403
+ * counts before and after were equal). So: it is NEVER retried, whatever `maxRetries` says; every
404
+ * failure after the request was sent carries `error.effect`, usually `"unknown"` (an occurrence may
405
+ * have been opened: read `occurrences.list({ contrato })` before sending again); and it is never
406
+ * part of a sweep or a health poll. Call `maintenance.list()` first: with an active maintenance
407
+ * covering the customer, you already know the answer and avoid the side effect.
408
+ *
409
+ * The data is ALWAYS an array with one item per internet service, whatever SGP sent: SGP answers
410
+ * an array with `status_all`, ONE bare object (wrapped by the SDK) for an active contract without
411
+ * it, and `[]` when the contract is outside its default filter. `[]` is no verdict, not "offline".
412
+ * Each item needs a numeric `status`; the rest (`msg`, `servico_id`, `contratoId`, `login`,
413
+ * `razaoSocial`, `cpfCnpj`) is read tolerantly. `login` is a secret and `razaoSocial` and `cpfCnpj`
414
+ * are personal: see `getSensitivity("contracts.checkConnection")` and project with `pick`.
415
+ */
416
+ checkConnection: (input: ContractsCheckConnectionInput, options?: CallOptions) => Promise<SgpResult<ContractsCheckConnectionData>>;
297
417
  /**
298
418
  * Changes the status of a contract: `POST /api/ura/contrato/status/edit/`, JSON. Never retried.
299
419
  * Activating a contract starts its billing, so a status change is a billing event.
@@ -349,13 +469,16 @@ export interface CoverageClient {
349
469
  * Checks the viability of an installation around a coordinate: `GET /api/ura/viabilidadeinstalacao`
350
470
  * (no trailing slash), params and credentials in the query string. `gateway`, `raio` (meters) and
351
471
  * `coordenada` (`"lat,lng"`) are all required, or the call is refused locally (`INVALID_INPUT`,
352
- * nothing sent). The SDK does not geocode: bring the coordinate yourself.
472
+ * nothing sent). Read the `gateway` ids with `coverage.listGateways`. The SDK does not geocode:
473
+ * bring the coordinate yourself.
353
474
  *
354
475
  * The result keeps SGP's own shape: an array whose element is an object keyed by the gateway's
355
476
  * own name (`SGPMaps`, `Geogrid`: data-defined), holding the CTOs within the radius (`lat`,
356
477
  * `lng`, `distancia` in meters, `nome`, and `id` on Geogrid) or the message `"Localização
357
- * inviável"` when there are none. Nothing is converted: Geogrid sends the numbers as text and
358
- * they stay text, so check the type before computing. No page envelope.
478
+ * inviável"` when there are none. `lat`, `lng`, `distancia` and `id` are a `number` or `null`:
479
+ * Geogrid sends them as numeric text (`"0"`), SGPMaps as numbers, and an empty text is `null`,
480
+ * never `0`. Text that is not a plain number is left out of `data` with a warning (the original
481
+ * stays in `response`). No page envelope.
359
482
  *
360
483
  * Unknown fields reach `data` unchanged. The structure must hold (the answer an array of objects,
361
484
  * each gateway's answer a list of objects or a message, `INVALID_RESPONSE` otherwise); any field
@@ -364,6 +487,55 @@ export interface CoverageClient {
364
487
  * read: the opt-in `maxRetries` may retry it.
365
488
  */
366
489
  check: (input: CoverageCheckInput, options?: CallOptions) => Promise<SgpResult<CoverageCheckData>>;
490
+ /**
491
+ * Checks viability by ADDRESS, before a coordinate exists: `POST /api/ura/viabilidade/` (trailing
492
+ * slash), `multipart/form-data` without files. The filters are SGP's own: `cep`, `cidade`,
493
+ * `logradouro`, `bairro`, `numero_inicial`, `numero_final`; the vendor says to use one of them, so
494
+ * at least one is required or the call is refused locally (`INVALID_INPUT`, nothing sent). Only
495
+ * `cep` alone and `cidade` alone were exercised; how filters combine is SGP's decision. For a
496
+ * coordinate and a map gateway use `check`.
497
+ *
498
+ * The result is SGP's own object, kept as received: observed `{ "viabilidade": true }` (a postal
499
+ * code) and `{}` (a city alone). A MISSING `viabilidade` MEANS UNKNOWN, NEVER "NO COVERAGE": do
500
+ * not turn it into `false`. The "no coverage" answer was NEVER OBSERVED, so what SGP sends for an
501
+ * address without coverage is not known; whatever comes is passed through. The body must be an
502
+ * object (`INVALID_RESPONSE` otherwise); `viabilidade` of the wrong type is left out of `data` and
503
+ * reported in `warnings` (the original stays in `response`). The address is personal data: see
504
+ * `getSensitivity("coverage.checkAddress")`. A read: the opt-in `maxRetries` may retry it.
505
+ */
506
+ checkAddress: (input: CoverageCheckAddressInput, options?: CallOptions) => Promise<SgpResult<CoverageCheckAddressData>>;
507
+ /**
508
+ * Lists the map gateways the provider can check coverage against: `GET /api/ura/listgatewaymapa`
509
+ * (no trailing slash), credentials in the query string, no input. The `id` of each entry is the
510
+ * `gateway` that `coverage.check` takes, so read it here and never assume a value. The route is
511
+ * not paginated, so the result is SGP's own bare array of `{ id, descricao, gateway }`: no page
512
+ * envelope, no total. Unknown fields reach `data` unchanged. Only the `id` (a number) and the
513
+ * `descricao` (text) of each gateway must have the expected type (an element that is not an
514
+ * object fails the response too: `INVALID_RESPONSE`); any other field of the wrong type is left
515
+ * out of `data` and reported in `warnings` (the original stays in `response`). A read: the
516
+ * opt-in `maxRetries` may retry it.
517
+ */
518
+ listGateways: (options?: CallOptions) => Promise<SgpResult<CoverageListGatewaysData>>;
519
+ }
520
+ /** Operations on maintenance notices (SGP "manutenção", the planned or emergency network works). */
521
+ export interface MaintenanceClient {
522
+ /**
523
+ * Lists the maintenance notices: `GET /api/ura/manutencao/list/` (trailing slash), credentials in
524
+ * the query string, no input and NO FILTER. The route is not paginated, so the result is SGP's
525
+ * own bare array: no page envelope, no total. It holds EVERY notice, INACTIVE ONES INCLUDED (the
526
+ * one capture held three past notices, all with `ativa: false`): filter by `ativa` and by the
527
+ * period (`data_inicial`, `data_final`, `AAAA-MM-DD HH:MM:SS` text) yourself, and by the affected
528
+ * network elements if you need an area (their lists were empty in the capture, so their content
529
+ * is unknown). An empty array means no notice.
530
+ *
531
+ * Unknown fields reach `data` unchanged. Only the `id` of each notice must be a number (an
532
+ * element that is not an object fails the response too: `INVALID_RESPONSE`); any other field of
533
+ * the wrong type is left out of `data` and reported in `warnings` (the original stays in
534
+ * `response`). The notices are the provider's announcements; no customer data was seen in the capture (its
535
+ * equipment lists were empty, and `mensagem_central` is free text). A read: the
536
+ * opt-in `maxRetries` may retry it.
537
+ */
538
+ list: (options?: CallOptions) => Promise<SgpResult<MaintenanceListData>>;
367
539
  }
368
540
  /** Operations on customers (SGP "clientes"). */
369
541
  export interface CustomersClient {
@@ -375,6 +547,11 @@ export interface CustomersClient {
375
547
  * `clientes`, `contratos` or `servicos` that is not an object fails the response too
376
548
  * (`INVALID_RESPONSE`). Any other field of the wrong type is left out of `data` and reported in
377
549
  * `warnings` (`dropped` names the field that is absent; the original stays in `response`).
550
+ *
551
+ * The `login` filter (the vendor documents it) matches the exact PPPoE login: observed live, the
552
+ * exact login listed its customer, a prefix of it and an unknown login listed nothing (`total`
553
+ * 0). Use it before `preRegistrations.create` to find out whether a login is already taken. The
554
+ * login is a secret: see `getSensitivity("customers.list")`.
378
555
  */
379
556
  list: (input?: CustomersListInput, options?: CallOptions) => Promise<SgpResult<CustomersListData>>;
380
557
  /**
@@ -513,9 +690,12 @@ export interface PreRegistrationsClient {
513
690
  * What it does in SGP: with `precadastro_ativar: 1` the pré-cadastro becomes a definitive
514
691
  * customer, and a contract is created only when the plan and billing data are sufficient
515
692
  * (`plano_id`, `pop_id`, `portador_id`, `vencimento_id`, `formacobranca_id`, ...). The pré-cadastro
516
- * row itself keeps existing afterwards. A success carries only SGP's `message`: it holds no
517
- * customer, contract or pré-cadastro ID, so look the customer up (`customers.list` by `cpfcnpj`)
518
- * to follow up. `plano_id` is a `PreRegistrationPlanId`: it comes from `preRegistrations.listPlans`, never a `PlanId` of `plans.list`; `vencimento_id` from `preRegistrations.listDueDays` and `vendedor_id` from `preRegistrations.listSellers`.
693
+ * row itself keeps existing afterwards. A success carries SGP's `message` and, when SGP sends
694
+ * them, the created `new_cliente_id` (a `CustomerId`), `new_contrato_id` and `precadastro_id`,
695
+ * as numbers (`null` when SGP sends an empty text). They are optional: older records list only
696
+ * `message`, and the 1.x decoder dropped unknown keys, so whether SGP sent the IDs before is
697
+ * unknown. When they are absent, read the customer back with `customers.list({ cpfcnpj })`; the
698
+ * SDK never fabricates them. `plano_id` is a `PreRegistrationPlanId`: it comes from `preRegistrations.listPlans`, never a `PlanId` of `plans.list`; `vencimento_id` from `preRegistrations.listDueDays` and `vendedor_id` from `preRegistrations.listSellers`.
519
699
  *
520
700
  * Failures carry `error.effect`: `"none"` only when the SDK can affirm nothing was applied (the
521
701
  * input was refused locally, the call was cancelled before send, or SGP refused with a
@@ -527,8 +707,29 @@ export interface PreRegistrationsClient {
527
707
  * An existing CPF is refused with HTTP 402 and `error.reason === "DOCUMENT_ALREADY_REGISTERED"`
528
708
  * (`REJECTED`, effect `"none"`, observed live on `/F`).
529
709
  *
530
- * Evidence: only `/F` was exercised; the 200 body `{ message }` is the vendor's, only the key
531
- * `message` was seen live; `/J` follows the vendor's documentation.
710
+ * SGP stores `cpfcnpj` exactly as sent, and a digits-only document was observed to escape the
711
+ * duplicate check of `crm.customers.create`. So the SDK sends it in the canonical mask the base
712
+ * holds: a CPF (`/F`) as `999.999.999-99`, a CNPJ (`/J`, alphanumeric included, uppercased) as
713
+ * `AA.AAA.AAA/AAAA-99`, whether you give it with or without punctuation. A document in any
714
+ * other format, or of the other kind than the route, is refused locally (`INVALID_INPUT`,
715
+ * `error.issues` `["cpfcnpj: expected ..."]`, nothing sent). Format only: the SDK does not verify
716
+ * the check digits, but SGP does for a CPF: a CPF with wrong digits is refused with HTTP 400
717
+ * `{ message: "CPF inválido", error: "Requisição inválida." }`, which is `REJECTED` with
718
+ * `error.reason === "DOCUMENT_INVALID"` and effect `"none"` (observed live on `/F`, and a
719
+ * read-back showed nothing created; `error.sgp` carries the `error` text, the `message` stays in
720
+ * `response.body`). The check digits of a CNPJ were never tested.
721
+ *
722
+ * A PPPoE `login` already in use is refused with HTTP 400 `{ message: "Login <login> já existe",
723
+ * error: "Requisição inválida." }` (exactly those two text keys), which is `REJECTED` with
724
+ * `error.reason === "LOGIN_ALREADY_REGISTERED"` and effect `"none"` (observed once on `/F`, and a
725
+ * read-back showed nothing created). `error.sgp` carries the `error` text only: the `message`
726
+ * echoes the login you sent and stays in `response.body`; the SDK copies it into no error field.
727
+ * Any other 400 keeps no reason. The refusal is not a complete guard: read
728
+ * `customers.list({ login })` BEFORE creating, to learn whether the login is taken and by whom.
729
+ *
730
+ * Evidence: only `/F` was exercised. The 200 body was seen live with `message` and the three IDs;
731
+ * older records list only `message` (the 1.x decoder dropped unknown keys, so whether the IDs
732
+ * were sent before is unknown). `/J` follows the vendor's documentation.
532
733
  */
533
734
  create: (input: PreRegistrationCreateInput, options?: CallOptions) => Promise<SgpResult<PreRegistrationCreateData>>;
534
735
  /**
@@ -538,8 +739,8 @@ export interface PreRegistrationsClient {
538
739
  * fields reach `data` unchanged at every level. Only the `id` of each plan must be a number (an
539
740
  * element that is not an object fails the response too: `INVALID_RESPONSE`); any other field of
540
741
  * the wrong type is left out of `data` and reported in `warnings` (the original stays in
541
- * `response`). `gateway.id` and `gateway.gateway_id` are kept as SGP sends them, `""` or text or
542
- * number.
742
+ * `response`). `gateway.id` and `gateway.gateway_id` are a `number` or `null`: SGP sends `""` for a
743
+ * plan without a gateway and numeric text (or a number) otherwise; `""` is `null`, never `0`.
543
744
  *
544
745
  * ID space: `id` is a `PreRegistrationPlanId`, the one `preRegistrations.create` takes as
545
746
  * `plano_id`. It is NOT a `PlanId` of `plans.list`: the same commercial plan may carry another id
@@ -594,6 +795,43 @@ export interface WorkOrdersClient {
594
795
  * read: the opt-in `maxRetries` may retry it.
595
796
  */
596
797
  list: (input?: WorkOrdersListInput, options?: CallOptions) => Promise<SgpResult<WorkOrdersListData>>;
798
+ /**
799
+ * Reads one work order in full: `POST /api/os/list/id/{id}` (NO trailing slash), `multipart/form-data`
800
+ * without files, credentials only. `id` is a positive integer, refused locally otherwise.
801
+ *
802
+ * The result is ONE flat object (72 fields observed) mixing the work order (`os_*`), the customer,
803
+ * contract, address, plan and service. The vendor's collection shows a one-element array; SGP
804
+ * sent the bare object, and that is what `data` is. Unknown fields reach `data` unchanged. Only
805
+ * `os_id` must be a number; any other field of the wrong type is left out of `data` and reported
806
+ * in `warnings` (the original stays in `response`). Normalized: SGP sends `servico_id`,
807
+ * `contrato_status_id` and `os_setor_id` as text, and `data` carries each as a `number` (`null`
808
+ * for an empty text, never `0`; text that is not a plain number is left out with a warning). SGP
809
+ * pads `contrato_status` with a leading space and `data` carries it trimmed.
810
+ *
811
+ * WARNING: THE OBJECT HOLDS PLAINTEXT CREDENTIALS. `servico_password` (the service's password),
812
+ * `servico_login`, `wan_user`, `wan_password`, `wifi_ssid`, `wifi_password`, `wifi_ssid_5` and
813
+ * `wifi_password_5`, plus the MAC and IP of the service and the NAS IP, are SECRET; the customer's
814
+ * name, e-mail, contacts and address (and the coordinates), the free text of the work order and
815
+ * the people involved are PERSONAL. See `getSensitivity("workOrders.get")`, project with `pick`
816
+ * and log `toSafeLog(result)`, never the result. The Wi-Fi and WAN keys were empty in the one
817
+ * capture; they are classified as secret anyway. A read: the opt-in `maxRetries` may retry it.
818
+ */
819
+ get: (input: WorkOrdersGetInput, options?: CallOptions) => Promise<SgpResult<WorkOrdersGetData>>;
820
+ /**
821
+ * Lists the comments of a work order: `GET /api/os/{id}/comentario/list/` (trailing slash),
822
+ * credentials in the query string. `id` is a positive integer, refused locally otherwise. The
823
+ * route is not paginated, so the result is SGP's own bare array: no page envelope, no total. An
824
+ * empty array means no comment.
825
+ *
826
+ * DOCUMENTED ONLY: the one live read returned `[]`, so the item fields (`comentario_id`,
827
+ * `comentario`, `usuario`, `data_cadastro`, `checklist_id`, `checklist_descricao`,
828
+ * `usuario_setores`) come from the vendor's collection and were never seen. Nothing is required
829
+ * of an item beyond being an object (an element that is not an object fails the response:
830
+ * `INVALID_RESPONSE`); any known field of the wrong type is left out of `data` and reported in
831
+ * `warnings`. The comment text and its author are personal data: see
832
+ * `getSensitivity("workOrders.listComments")`. A read: the opt-in `maxRetries` may retry it.
833
+ */
834
+ listComments: (input: WorkOrdersListCommentsInput, options?: CallOptions) => Promise<SgpResult<WorkOrdersListCommentsData>>;
597
835
  /**
598
836
  * Lists the occurrence reasons (the `motivo` of a work order): `GET /api/os/ocorrencia/motivo/list/`,
599
837
  * credentials in the query string, no input. The route is not paginated, so the result is SGP's
@@ -629,14 +867,37 @@ export interface ServicesClient {
629
867
  * before sending again.
630
868
  */
631
869
  changePlan: (input: ServiceChangePlanInput, options?: CallOptions) => Promise<SgpResult<ServiceChangePlanData>>;
870
+ /**
871
+ * Adds a service of the generic type to a contract: `POST /api/servico/generico` (no trailing
872
+ * slash), `multipart/form-data` without files, the route TSMX recommends for extra services of
873
+ * that type. Never retried. TSMX says a generic plan has no billing effect (it only sets the service type);
874
+ * not verified.
875
+ *
876
+ * `planobase_id` must be a plan created as "generic" in the SGP panel (a `PlanId`; whether the
877
+ * URA catalog `plans.list` shows it is not confirmed). SGP refuses any other plan type with HTTP
878
+ * 400 `{ error: "Plano informado não é do tipo genérico." }`, which is `REJECTED` with
879
+ * `error.reason === "PLAN_NOT_GENERIC"` and effect `"none"` (a read-back after the observed
880
+ * refusal showed nothing added; its raw body was not captured). That refusal is the only
881
+ * exchange observed: this provider has no generic plan, so a success was never seen. It is
882
+ * documented, not observed, and `data` is the JSON object SGP sends, kept as received with no
883
+ * field assumed (in particular, the new service's id is not guaranteed). A 2xx that is not a JSON
884
+ * object is `INVALID_RESPONSE` with effect `"unknown"`. Only `descricao` among the optional fields
885
+ * was sent (in the refused call); the others are documented by the vendor and never sent.
886
+ *
887
+ * Other failures carry `error.effect` by the same rules as `services.changePlan`. On
888
+ * `"unknown"`, read the contract's services (`customers.list`) before sending again: a second
889
+ * call may add a duplicate service.
890
+ */
891
+ addGeneric: (input: ServiceAddGenericInput, options?: CallOptions) => Promise<SgpResult<ServiceAddGenericData>>;
632
892
  /**
633
893
  * Adds a TV service to a contract: `POST /api/servico/tv` (no trailing slash),
634
894
  * `multipart/form-data` without files. Never retried. Adding a service changes what the contract
635
895
  * is billed for.
636
896
  *
637
897
  * `planobase_id` is a `PlanId` from the URA catalog (`plans.list`). SGP accepts only active contracts. A
638
- * success (HTTP 201) returns the new `servico_id` (a number); `clientecontrato_id` is kept as the
639
- * string SGP sends. Only `info_extra` was exercised among the optional fields; `tipo_equipamento`
898
+ * success (HTTP 201) returns the new `servico_id` (a number); `clientecontrato_id` is a `number` (SGP sends it as
899
+ * text; `null` for an empty text, and text that is not a plain number is left out of `data` with a
900
+ * warning, the original stays in `response`). Only `info_extra` was exercised among the optional fields; `tipo_equipamento`
640
901
  * and `endereco_id` are documented by the vendor and never sent.
641
902
  *
642
903
  * SGP's refusal of a contract that is not active, HTTP 400
@@ -650,12 +911,26 @@ export interface ServicesClient {
650
911
  * duplicate service.
651
912
  */
652
913
  addTv: (input: ServiceAddTvInput, options?: CallOptions) => Promise<SgpResult<ServiceAddTvData>>;
914
+ /**
915
+ * Removes a generic service: `DELETE /api/servico/generico/{servico_id}` (no trailing slash),
916
+ * with the contract in a `multipart/form-data` body (without files), as SGP expects. Never
917
+ * retried.
918
+ *
919
+ * Documented by the vendor, never observed: no generic service was ever created, so none could
920
+ * be removed. The vendor documents that the route does not remove the only service of a contract;
921
+ * no SGP body for that refusal was captured, so it has no `reason` and, like any other failure,
922
+ * carries `error.effect` by the same rules as `services.changePlan`. A success is the JSON object
923
+ * SGP sends, kept as received with no field assumed; a 2xx that is not a JSON object is
924
+ * `INVALID_RESPONSE` with effect `"unknown"`. On `"unknown"`, read the contract's services
925
+ * (`customers.list`) before sending again.
926
+ */
927
+ removeGeneric: (input: ServiceRemoveGenericInput, options?: CallOptions) => Promise<SgpResult<ServiceRemoveGenericData>>;
653
928
  /**
654
929
  * Removes a TV service: `DELETE /api/servico/tv/{servico_id}` (no trailing slash), with the
655
930
  * contract in a `multipart/form-data` body (without files), as SGP expects. Never retried.
656
931
  *
657
- * A success returns SGP's `msg`, the removed `servico_id` and `clientecontrato_id` (kept as the
658
- * string SGP sends). This route has no known rejection; failures carry `error.effect` by the same
932
+ * A success returns SGP's `msg`, the removed `servico_id` and `clientecontrato_id` (a `number`: SGP
933
+ * sends it as text, and `null` for an empty text). This route has no known rejection; failures carry `error.effect` by the same
659
934
  * rules as `services.changePlan`. On `"unknown"`, read the contract's services before sending
660
935
  * again.
661
936
  */
@@ -681,6 +956,8 @@ export interface SgpClient {
681
956
  experimental: ExperimentalClient;
682
957
  /** Operations on invoices. */
683
958
  invoices: InvoicesClient;
959
+ /** Operations on maintenance notices. */
960
+ maintenance: MaintenanceClient;
684
961
  /** Operations on occurrences. */
685
962
  occurrences: OccurrencesClient;
686
963
  /** Operations on plans. */
@@ -41,6 +41,19 @@ export declare const CONTRACT_STATUS: {
41
41
  };
42
42
  /** A known contract-status code. Operations accept any number: SGP decides what it takes. */
43
43
  export type ContractStatus = (typeof CONTRACT_STATUS)[keyof typeof CONTRACT_STATUS];
44
+ /**
45
+ * The `status` of an item that `contracts.checkConnection` returns: SGP's verdict on a connection.
46
+ * 1 (online) and 2 (offline) were observed; 0 (nothing checked) and 9 (maintenance) come from the
47
+ * vendor's documentation and were never seen. The data carries any number: SGP may send others.
48
+ */
49
+ export declare const CONNECTION_STATUS: {
50
+ readonly notChecked: 0;
51
+ readonly online: 1;
52
+ readonly offline: 2;
53
+ readonly maintenance: 9;
54
+ };
55
+ /** A known connection-status code. `status` may be any number: compare, do not assume. */
56
+ export type ConnectionStatus = (typeof CONNECTION_STATUS)[keyof typeof CONNECTION_STATUS];
44
57
  /**
45
58
  * SGP's service types, the `servico_tipo` that `services.changePlan` sends. Only internet (1) was
46
59
  * exercised against SGP: the vendor documents other types but no value beyond 1 was ever sent, so
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ /** INTERNAL. Validation of the `cpfcnpj` of a `/F` write: the canonical CPF, or a refusal on the field. */
3
+ export declare const storedCpfSchema: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
4
+ /** INTERNAL. Validation of the `cpfcnpj` of a `/J` write: the canonical CNPJ, or a refusal on the field. */
5
+ export declare const storedCnpjSchema: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
6
+ /**
7
+ * `["cpfcnpj: expected ..."]` when a failed parse broke the `cpfcnpj` field of a `/F` or `/J` input
8
+ * (wrong format, wrong kind for the route, or missing where required), otherwise no issues. The
9
+ * message is the one the field's schema raised; it never carries the value.
10
+ */
11
+ export declare const documentIssues: (error: z.ZodError) => readonly string[] | undefined;
package/dist/index.d.ts CHANGED
@@ -1,21 +1,25 @@
1
1
  export type { SgpAddress } from "./address.js";
2
- export type { CatalogsClient, ContractsClient, CoverageClient, CrmClient, CrmContractsClient, CrmCustomersClient, CustomersClient, DocumentsClient, ExperimentalAnnotationsClient, ExperimentalClient, InvoicesClient, OccurrencesClient, PlansClient, PreRegistrationsClient, ServicesClient, SgpClient, WorkOrdersClient, } from "./client.js";
2
+ export type { CatalogsClient, ContractsClient, CoverageClient, CrmClient, CrmContractsClient, CrmCustomersClient, CustomersClient, DocumentsClient, ExperimentalAnnotationsClient, ExperimentalClient, InvoicesClient, MaintenanceClient, OccurrencesClient, PlansClient, PreRegistrationsClient, ServicesClient, SgpClient, WorkOrdersClient, } from "./client.js";
3
3
  export { createSgpClient } from "./client.js";
4
4
  export type { CallOptions, ClientOptions, Credentials, ErrorHookMetadata, FetchLike, HookMetadata, Hooks, ResponseHookMetadata, TokenCredentials, } from "./config.js";
5
5
  export { DEFAULT_TIMEOUT_MS, InvalidConfigurationError, MAX_TIMEOUT_MS } from "./config.js";
6
- export type { AcquisitionMode, BillingMethod, ContractStatus, CrmStatus, ServiceType, } from "./constants.js";
7
- export { ACQUISITION_MODE, BILLING_METHOD, CONTRACT_STATUS, CRM_STATUS, SERVICE_TYPE, } from "./constants.js";
6
+ export type { AcquisitionMode, BillingMethod, ConnectionStatus, ContractStatus, CrmStatus, ServiceType, } from "./constants.js";
7
+ export { ACQUISITION_MODE, BILLING_METHOD, CONNECTION_STATUS, CONTRACT_STATUS, CRM_STATUS, SERVICE_TYPE, } from "./constants.js";
8
8
  export type { CustomerId } from "./ids.js";
9
9
  export type { OperationName } from "./operation-sensitivity.js";
10
10
  export { getSensitivity } from "./operation-sensitivity.js";
11
11
  export type { CatalogsListBillingProfilesData } from "./operations/catalogs-list-billing-profiles.js";
12
12
  export type { CatalogsListNasData } from "./operations/catalogs-list-nas.js";
13
13
  export type { CatalogsListPopsData } from "./operations/catalogs-list-pops.js";
14
+ export type { ContractsCheckConnectionData, ContractsCheckConnectionInput, } from "./operations/contracts-check-connection.js";
14
15
  export type { ContractsListData, ContractsListInput } from "./operations/contracts-list.js";
16
+ export type { ContractsListServicesData, ContractsListServicesInput, } from "./operations/contracts-list-services.js";
15
17
  export type { ContractsListStatusReasonsData } from "./operations/contracts-list-status-reasons.js";
16
18
  export type { ContractUpdateData, ContractUpdateInput } from "./operations/contracts-update.js";
17
19
  export type { ContractUpdateStatusData, ContractUpdateStatusInput, } from "./operations/contracts-update-status.js";
18
20
  export type { CoverageCheckData, CoverageCheckInput, CoverageCto, } from "./operations/coverage-check.js";
21
+ export type { CoverageCheckAddressData, CoverageCheckAddressInput, } from "./operations/coverage-check-address.js";
22
+ export type { CoverageListGatewaysData } from "./operations/coverage-list-gateways.js";
19
23
  export type { CrmContractCreateData, CrmContractCreateInput, } from "./operations/crm-contracts-create.js";
20
24
  export type { CrmContractCreateByCpfCnpjData, CrmContractCreateByCpfCnpjInput, } from "./operations/crm-contracts-create-by-cpf-cnpj.js";
21
25
  export type { CrmContractsListData, CrmContractsListInput, } from "./operations/crm-contracts-list.js";
@@ -27,7 +31,9 @@ export type { DocumentAddInput, DocumentFile } from "./operations/documents-add.
27
31
  export type { DocumentsListData, DocumentsListInput } from "./operations/documents-list.js";
28
32
  export type { ExperimentalAnnotation, ExperimentalAnnotationsListData, ExperimentalAnnotationsListInput, } from "./operations/experimental-annotations-list.js";
29
33
  export type { InvoicesListData, InvoicesListInput } from "./operations/invoices-list.js";
34
+ export type { MaintenanceListData } from "./operations/maintenance-list.js";
30
35
  export type { OccurrenceCreateData, OccurrenceCreateInput, } from "./operations/occurrences-create.js";
36
+ export type { OccurrencesListData, OccurrencesListInput, } from "./operations/occurrences-list.js";
31
37
  export type { OccurrencesListMethodsData } from "./operations/occurrences-list-methods.js";
32
38
  export type { OccurrencesListTypesData } from "./operations/occurrences-list-types.js";
33
39
  export type { PlanId, PlansListData } from "./operations/plans-list.js";
@@ -35,10 +41,14 @@ export type { PreRegistrationCreateCompanyInput, PreRegistrationCreateData, PreR
35
41
  export type { PreRegistrationsListDueDaysData } from "./operations/pre-registrations-list-due-days.js";
36
42
  export type { PreRegistrationsListPlansData } from "./operations/pre-registrations-list-plans.js";
37
43
  export type { PreRegistrationsListSellersData } from "./operations/pre-registrations-list-sellers.js";
44
+ export type { ServiceAddGenericData, ServiceAddGenericInput, } from "./operations/services-add-generic.js";
38
45
  export type { ServiceAddTvData, ServiceAddTvInput } from "./operations/services-add-tv.js";
39
46
  export type { ServiceChangePlanData, ServiceChangePlanInput, } from "./operations/services-change-plan.js";
47
+ export type { ServiceRemoveGenericData, ServiceRemoveGenericInput, } from "./operations/services-remove-generic.js";
40
48
  export type { ServiceRemoveTvData, ServiceRemoveTvInput, } from "./operations/services-remove-tv.js";
49
+ export type { WorkOrdersGetData, WorkOrdersGetInput } from "./operations/work-orders-get.js";
41
50
  export type { WorkOrdersListData, WorkOrdersListInput, } from "./operations/work-orders-list.js";
51
+ export type { WorkOrdersListCommentsData, WorkOrdersListCommentsInput, } from "./operations/work-orders-list-comments.js";
42
52
  export type { WorkOrdersListReasonsData } from "./operations/work-orders-list-reasons.js";
43
53
  export type { RawRequestInput } from "./raw-request.js";
44
54
  export type { CapturedResponse, Diagnostic, Effect, ResponseBody, ResultBase, SchemaWarning, SgpError, SgpErrorCode, SgpErrorFields, SgpFailure, SgpResult, SgpSuccess, } from "./result.js";