sgp-sdk 1.2.0 → 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 (100) hide show
  1. package/CHANGELOG.md +234 -0
  2. package/COMPATIBILITY.md +231 -0
  3. package/MIGRATION.md +344 -0
  4. package/README.md +464 -265
  5. package/dist/address.d.ts +46 -0
  6. package/dist/annotation-selection.d.ts +32 -0
  7. package/dist/budget.d.ts +29 -0
  8. package/dist/classify.d.ts +15 -0
  9. package/dist/client.d.ts +938 -165
  10. package/dist/config.d.ts +115 -0
  11. package/dist/constants.d.ts +85 -0
  12. package/dist/document.d.ts +11 -0
  13. package/dist/effect.d.ts +22 -0
  14. package/dist/executor.d.ts +9 -0
  15. package/dist/exposure.d.ts +21 -0
  16. package/dist/guards.d.ts +2 -0
  17. package/dist/hooks.d.ts +16 -0
  18. package/dist/ids.d.ts +19 -0
  19. package/dist/index.d.ts +55 -49
  20. package/dist/index.js +3750 -1293
  21. package/dist/normalize.d.ts +9 -0
  22. package/dist/operation-sensitivity.d.ts +729 -0
  23. package/dist/operation.d.ts +145 -0
  24. package/dist/operations/catalogs-list-billing-profiles.d.ts +16 -0
  25. package/dist/operations/catalogs-list-nas.d.ts +25 -0
  26. package/dist/operations/catalogs-list-pops.d.ts +14 -0
  27. package/dist/operations/contracts-check-connection.d.ts +56 -0
  28. package/dist/operations/contracts-list-services.d.ts +103 -0
  29. package/dist/operations/contracts-list-status-reasons.d.ts +15 -0
  30. package/dist/operations/contracts-list.d.ts +52 -0
  31. package/dist/operations/contracts-update-status.d.ts +41 -0
  32. package/dist/operations/contracts-update.d.ts +39 -0
  33. package/dist/operations/coverage-check-address.d.ts +46 -0
  34. package/dist/operations/coverage-check.d.ts +43 -0
  35. package/dist/operations/coverage-list-gateways.d.ts +16 -0
  36. package/dist/operations/crm-contracts-create-by-cpf-cnpj.d.ts +97 -0
  37. package/dist/operations/crm-contracts-create.d.ts +221 -0
  38. package/dist/operations/crm-contracts-list.d.ts +50 -0
  39. package/dist/operations/crm-customers-create.d.ts +165 -0
  40. package/dist/operations/crm-customers-update-status.d.ts +41 -0
  41. package/dist/operations/customers-list.d.ts +104 -0
  42. package/dist/{endpoints/ura/lookup-customer.d.ts → operations/customers-search.d.ts} +56 -46
  43. package/dist/operations/documents-add.d.ts +29 -0
  44. package/dist/operations/documents-list.d.ts +31 -0
  45. package/dist/operations/experimental-annotations-list.d.ts +67 -0
  46. package/dist/operations/invoices-list.d.ts +148 -0
  47. package/dist/operations/maintenance-list.d.ts +35 -0
  48. package/dist/operations/occurrences-create.d.ts +125 -0
  49. package/dist/operations/occurrences-list-methods.d.ts +14 -0
  50. package/dist/operations/occurrences-list-types.d.ts +20 -0
  51. package/dist/operations/occurrences-list.d.ts +127 -0
  52. package/dist/{endpoints/ura/list-plans.d.ts → operations/plans-list.d.ts} +33 -23
  53. package/dist/operations/pre-registrations-create.d.ts +276 -0
  54. package/dist/operations/pre-registrations-list-due-days.d.ts +15 -0
  55. package/dist/operations/pre-registrations-list-plans.d.ts +24 -0
  56. package/dist/operations/pre-registrations-list-sellers.d.ts +16 -0
  57. package/dist/operations/services-add-generic.d.ts +52 -0
  58. package/dist/operations/services-add-tv.d.ts +47 -0
  59. package/dist/operations/services-change-plan.d.ts +40 -0
  60. package/dist/operations/services-remove-generic.d.ts +28 -0
  61. package/dist/operations/services-remove-tv.d.ts +29 -0
  62. package/dist/operations/work-orders-get.d.ts +99 -0
  63. package/dist/operations/work-orders-list-comments.d.ts +34 -0
  64. package/dist/operations/work-orders-list-reasons.d.ts +20 -0
  65. package/dist/operations/work-orders-list.d.ts +81 -0
  66. package/dist/path.d.ts +13 -0
  67. package/dist/raw-request.d.ts +26 -0
  68. package/dist/request.d.ts +28 -0
  69. package/dist/result.d.ts +113 -41
  70. package/dist/retry.d.ts +34 -0
  71. package/dist/sensitivity.d.ts +89 -4
  72. package/dist/tolerant.d.ts +21 -0
  73. package/dist/validation.d.ts +3 -0
  74. package/package.json +6 -3
  75. package/dist/endpoint.d.ts +0 -66
  76. package/dist/endpoints/crm/address.d.ts +0 -20
  77. package/dist/endpoints/crm/create-contract.d.ts +0 -109
  78. package/dist/endpoints/crm/create-customer.d.ts +0 -65
  79. package/dist/endpoints/crm/update-customer-status.d.ts +0 -43
  80. package/dist/endpoints/os/list-occurrence-reasons.d.ts +0 -24
  81. package/dist/endpoints/os/list-occurrence-types.d.ts +0 -25
  82. package/dist/endpoints/precadastro/list-due-days.d.ts +0 -19
  83. package/dist/endpoints/precadastro/list-sellers.d.ts +0 -21
  84. package/dist/endpoints/suporte/add-customer-document.d.ts +0 -24
  85. package/dist/endpoints/suporte/list-customer-documents.d.ts +0 -25
  86. package/dist/endpoints/ura/check-coverage.d.ts +0 -46
  87. package/dist/endpoints/ura/list-annotations.d.ts +0 -32
  88. package/dist/endpoints/ura/list-clients.d.ts +0 -58
  89. package/dist/endpoints/ura/list-contracts.d.ts +0 -45
  90. package/dist/endpoints/ura/list-invoices.d.ts +0 -107
  91. package/dist/endpoints/ura/list-nas.d.ts +0 -29
  92. package/dist/endpoints/ura/list-occurrence-methods.d.ts +0 -19
  93. package/dist/endpoints/ura/list-payment-carriers.d.ts +0 -20
  94. package/dist/endpoints/ura/list-pops.d.ts +0 -19
  95. package/dist/endpoints/ura/list-service-orders.d.ts +0 -64
  96. package/dist/endpoints/ura/open-ticket.d.ts +0 -81
  97. package/dist/errors.d.ts +0 -59
  98. package/dist/schema/parse.d.ts +0 -19
  99. package/dist/schema/paths.d.ts +0 -38
  100. package/dist/transport.d.ts +0 -65
@@ -0,0 +1,125 @@
1
+ import { z } from "zod";
2
+ import type { OperationDefinition } from "../operation.js";
3
+ /**
4
+ * Input of `occurrences.create`, named as SGP names the fields. An occurrence (SGP "chamado" or
5
+ * "ocorrência") is the support ticket; SGP opens a work order (OS) with it unless told not to
6
+ * (`desativa_os`). Only `contrato` is required.
7
+ *
8
+ * Observed live: an occurrence WITHOUT `motivoos` is accepted and SGP still creates a work order;
9
+ * `status_encerrado: 1` closes both the occurrence and the work order; closing an installation work
10
+ * order (`motivoos` 10) did not change the contract status (it stayed inactive; observed once).
11
+ */
12
+ export interface OccurrenceCreateInput {
13
+ /** ID of the contract. Required. */
14
+ contrato: number;
15
+ /** Content of the occurrence and of the work order. Free text: personal data. */
16
+ conteudo?: string;
17
+ /** `1` removes SGP's default opening message ("via URA"). */
18
+ conteudolimpo?: 0 | 1;
19
+ /** Free text: personal data. */
20
+ observacao?: string;
21
+ /**
22
+ * Occurrence type code (SGP's default is 5): the `codigo` of `occurrences.listTypes`, not its
23
+ * `id`.
24
+ */
25
+ ocorrenciatipo?: number;
26
+ /** IDs of the classifications linked to the occurrence. */
27
+ tipoclassificacoes?: number[];
28
+ /** Occurrence method code: the `codigo` of `occurrences.listMethods`. */
29
+ metodo?: number;
30
+ /** Sector ID. */
31
+ setor?: number;
32
+ /** Username shown as who opened the occurrence. Staff username: personal data. */
33
+ usuario?: string;
34
+ /** Username of the occurrence's responsible. Staff username: personal data. */
35
+ responsaveloc?: string;
36
+ /** Contact name. Personal data. */
37
+ contato_nome?: string;
38
+ /** Contact phone. Personal data. */
39
+ contato_telefone?: string;
40
+ /** `1` opens no work order. */
41
+ desativa_os?: 0 | 1;
42
+ /** `1` creates the occurrence and the work order already closed. */
43
+ status_encerrado?: 0 | 1;
44
+ /** `1` notifies the customer of the closing, when created already closed. */
45
+ notificar_cliente?: 0 | 1;
46
+ /**
47
+ * Work-order reason code: the `codigo` of `workOrders.listReasons` (not its `id`; live, 10 was
48
+ * the reason whose `codigo` is 10 and `id` 1). Each SGP instance has its own: read them there,
49
+ * never assume a value.
50
+ */
51
+ motivoos?: number;
52
+ /** IDs of the classifications linked to the work order. */
53
+ motivoclassificacoes?: number[];
54
+ /** Username of the work order's responsible technician. Staff username: personal data. */
55
+ responsavel?: string;
56
+ /** Usernames of the auxiliary technicians. Staff usernames: personal data. */
57
+ tecnicos?: string[];
58
+ /**
59
+ * Schedules the occurrence and the work order. Send `AAAA-MM-DD HH:MM` (the format SGP's refusal names): SGP
60
+ * refused seconds (`2026-11-13 09:00:00`), observed once live with HTTP 200 and `status` 0 (`REJECTED`, reason
61
+ * `INVALID_SCHEDULE`, effect `none`). SGP decides what is a valid date, so the SDK does not check
62
+ * the format before sending.
63
+ */
64
+ data_hora_agendamento?: string;
65
+ /** `1` warns the responsible technician; needs `data_hora_agendamento` and a messaging gateway in SGP. */
66
+ sms_tecnico?: 0 | 1;
67
+ /** With `servico_id`, links a service of the contract to the occurrence. */
68
+ tipo_servico?: "internet" | "telefonia" | "tv" | "multimidia" | "generico";
69
+ /** ID of the contract's service; use with `tipo_servico`. */
70
+ servico_id?: number;
71
+ /** ID of the company to link. */
72
+ empresa_id?: number;
73
+ }
74
+ /** INTERNAL. Validation of the input, exported so a test can check it against the public type. */
75
+ export declare const occurrencesCreateInputSchema: z.ZodObject<{
76
+ contrato: z.ZodNumber;
77
+ conteudo: z.ZodOptional<z.ZodString>;
78
+ conteudolimpo: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
79
+ observacao: z.ZodOptional<z.ZodString>;
80
+ ocorrenciatipo: z.ZodOptional<z.ZodNumber>;
81
+ tipoclassificacoes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
82
+ metodo: z.ZodOptional<z.ZodNumber>;
83
+ setor: z.ZodOptional<z.ZodNumber>;
84
+ usuario: z.ZodOptional<z.ZodString>;
85
+ responsaveloc: z.ZodOptional<z.ZodString>;
86
+ contato_nome: z.ZodOptional<z.ZodString>;
87
+ contato_telefone: z.ZodOptional<z.ZodString>;
88
+ desativa_os: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
89
+ status_encerrado: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
90
+ notificar_cliente: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
91
+ motivoos: z.ZodOptional<z.ZodNumber>;
92
+ motivoclassificacoes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
93
+ responsavel: z.ZodOptional<z.ZodString>;
94
+ tecnicos: z.ZodOptional<z.ZodArray<z.ZodString>>;
95
+ data_hora_agendamento: z.ZodOptional<z.ZodString>;
96
+ sms_tecnico: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
97
+ tipo_servico: z.ZodOptional<z.ZodEnum<{
98
+ generico: "generico";
99
+ internet: "internet";
100
+ multimidia: "multimidia";
101
+ telefonia: "telefonia";
102
+ tv: "tv";
103
+ }>>;
104
+ servico_id: z.ZodOptional<z.ZodNumber>;
105
+ empresa_id: z.ZodOptional<z.ZodNumber>;
106
+ }, z.core.$strict>;
107
+ /**
108
+ * Success body of `POST /api/ura/chamado/`: `status` 1, the ticket's `protocolo` and `id`, plus the
109
+ * contract and the customer SGP echoes back. `id` is the ID of the OCCURRENCE: a work order, when
110
+ * one is opened, has another ID that this body does not carry. Other keys SGP may add are kept.
111
+ */
112
+ declare const openedSchema: z.ZodObject<{
113
+ status: z.ZodLiteral<1>;
114
+ protocolo: z.ZodString;
115
+ id: z.ZodNumber;
116
+ contratoId: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
117
+ razaoSocial: z.ZodNullable<z.ZodOptional<z.ZodString>>;
118
+ cpfCnpj: z.ZodNullable<z.ZodOptional<z.ZodString>>;
119
+ msg: z.ZodNullable<z.ZodOptional<z.ZodString>>;
120
+ }, z.core.$loose>;
121
+ /** Response of `occurrences.create`. */
122
+ export type OccurrenceCreateData = z.output<typeof openedSchema>;
123
+ /** INTERNAL definition of `occurrences.create`. */
124
+ export declare const occurrencesCreate: OperationDefinition<OccurrenceCreateData, "occurrences.create">;
125
+ export {};
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ import type { OperationDefinition } from "../operation.js";
3
+ declare const occurrenceMethodsSchema: z.ZodArray<z.ZodObject<{
4
+ codigo: z.ZodNumber;
5
+ descricao: z.ZodNullable<z.ZodOptional<z.ZodString>>;
6
+ }, z.core.$loose>>;
7
+ /**
8
+ * The response of `GET /api/ura/ocorrencia/metodo/list/`, in SGP's own shape: a bare array with one
9
+ * entry per occurrence method. The route is not paginated, so there is no envelope and no total.
10
+ */
11
+ export type OccurrencesListMethodsData = z.output<typeof occurrenceMethodsSchema>;
12
+ /** INTERNAL definition of `occurrences.listMethods`. */
13
+ export declare const occurrencesListMethods: OperationDefinition<OccurrencesListMethodsData, "occurrences.listMethods">;
14
+ export {};
@@ -0,0 +1,20 @@
1
+ import { z } from "zod";
2
+ import type { OperationDefinition } from "../operation.js";
3
+ declare const occurrenceTypesSchema: z.ZodArray<z.ZodObject<{
4
+ id: z.ZodNumber;
5
+ codigo: z.ZodNumber;
6
+ descricao: z.ZodNullable<z.ZodOptional<z.ZodString>>;
7
+ ativo: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
8
+ classificacoes: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnknown>>>;
9
+ classificacoes_obrigatorio: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
10
+ setores: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnknown>>>;
11
+ classificacoes_obrigatorio_encerramento: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
12
+ }, z.core.$loose>>;
13
+ /**
14
+ * The response of `GET /api/os/ocorrencia/tipo/list/`, in SGP's own shape: a bare array with one
15
+ * entry per occurrence type. The route is not paginated, so there is no envelope and no total.
16
+ */
17
+ export type OccurrencesListTypesData = z.output<typeof occurrenceTypesSchema>;
18
+ /** INTERNAL definition of `occurrences.listTypes`. */
19
+ export declare const occurrencesListTypes: OperationDefinition<OccurrencesListTypesData, "occurrences.listTypes">;
20
+ export {};
@@ -0,0 +1,127 @@
1
+ import { z } from "zod";
2
+ import type { OperationDefinition } from "../operation.js";
3
+ declare const pageSchema: z.ZodObject<{
4
+ paginacao: z.ZodObject<{
5
+ offset: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
6
+ limit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
7
+ parcial: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
8
+ total: z.ZodNumber;
9
+ }, z.core.$loose>;
10
+ ocorrencias: z.ZodArray<z.ZodObject<{
11
+ id: z.ZodNumber;
12
+ cliente: z.ZodNullable<z.ZodOptional<z.ZodString>>;
13
+ contrato: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
14
+ contrato_status: z.ZodNullable<z.ZodOptional<z.ZodString>>;
15
+ contrato_status_id: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
16
+ pop: z.ZodNullable<z.ZodOptional<z.ZodString>>;
17
+ numero: z.ZodNullable<z.ZodOptional<z.ZodString>>;
18
+ status: z.ZodNullable<z.ZodOptional<z.ZodString>>;
19
+ status_id: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
20
+ data_cadastro: z.ZodNullable<z.ZodOptional<z.ZodString>>;
21
+ data_agendamento: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22
+ data_finalizacao: z.ZodNullable<z.ZodOptional<z.ZodString>>;
23
+ tipo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
24
+ metodo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
25
+ conteudo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
26
+ responsavel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
27
+ usuario: z.ZodNullable<z.ZodOptional<z.ZodString>>;
28
+ usuario_finalizacao: z.ZodNullable<z.ZodOptional<z.ZodString>>;
29
+ protocolos_externos: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnknown>>>;
30
+ servico: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnknown>>>;
31
+ comentarios: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnknown>>>;
32
+ ordens_servicos: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
33
+ id: z.ZodNumber;
34
+ status: z.ZodNullable<z.ZodOptional<z.ZodString>>;
35
+ status_id: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
36
+ data_cadastro: z.ZodNullable<z.ZodOptional<z.ZodString>>;
37
+ data_agendamento: z.ZodNullable<z.ZodOptional<z.ZodString>>;
38
+ data_finalizacao: z.ZodNullable<z.ZodOptional<z.ZodString>>;
39
+ tipo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
40
+ tipo_id: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
41
+ motivo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
42
+ pop: z.ZodNullable<z.ZodOptional<z.ZodString>>;
43
+ conteudo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
44
+ responsavel: z.ZodNullable<z.ZodOptional<z.ZodString>>;
45
+ tecnicos_auxiliares: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnknown>>>;
46
+ usuario: z.ZodNullable<z.ZodOptional<z.ZodString>>;
47
+ usuario_finalizacao: z.ZodNullable<z.ZodOptional<z.ZodString>>;
48
+ }, z.core.$loose>>>>;
49
+ }, z.core.$loose>>;
50
+ }, z.core.$loose>;
51
+ /**
52
+ * One page of `POST /api/ura/ocorrencia/list/`, with SGP's own `paginacao`, returned as received:
53
+ *
54
+ * - `offset`: index of the first occurrence of the page (SGP starts at 0);
55
+ * - `limit`: page size SGP applied, which may differ from the one requested;
56
+ * - `parcial`: how many occurrences this page holds (observed equal to `ocorrencias.length`);
57
+ * - `total`: how many occurrences match the filters in all, across every page.
58
+ *
59
+ * `total` is SGP's and never computed by the SDK: a page without a numeric `total` is
60
+ * `INVALID_RESPONSE`. Nothing here fetches the next page: ask for it with `offset`. Each
61
+ * occurrence carries its work orders in `ordens_servicos`; their `id` is the work order id.
62
+ */
63
+ export type OccurrencesListData = z.output<typeof pageSchema>;
64
+ /**
65
+ * Filters and paging of `occurrences.list`, named as SGP names them (the vendor's collection
66
+ * documents them). All optional: the vendor marks none as required.
67
+ *
68
+ * At least one filter is required: without one SGP lists the occurrences of EVERY customer (the
69
+ * vendor documents up to 1000 per call), with names and free text, so the SDK refuses the call
70
+ * locally (`INVALID_INPUT`, `attempts` 0, nothing sent). `offset` and `limit` are paging, not
71
+ * filters, and do not count. Filter by `contrato` whenever you can. The vendor also documents the array filters
72
+ * `pop` and `tipo` and the hour filters (`hora_*`); they are not offered here, and no key other
73
+ * than those below is accepted.
74
+ */
75
+ export interface OccurrencesListInput {
76
+ /** Documented, never sent. Index of the first occurrence of the page; SGP starts at 0. */
77
+ offset?: number;
78
+ /** Exercised (with `contrato`). Occurrences per page. Non-negative integer; the vendor caps it at 1000. */
79
+ limit?: number;
80
+ /**
81
+ * Documented, never sent. Only the occurrence with this number (`numero` of the result; the vendor
82
+ * calls it "Número da Ocorrência"). Text, as SGP keeps it.
83
+ */
84
+ ocorrencia?: string;
85
+ /**
86
+ * Documented, never sent. Status id of the occurrence (`status_id` of the result). The vendor
87
+ * lists 0 Aberta, 1 Encerrada, 2 Em execução, 3 Pendente.
88
+ */
89
+ status?: number;
90
+ /** Exercised. Only the occurrences of this contract (the `contrato` of the result). */
91
+ contrato?: number;
92
+ /**
93
+ * Documented, never sent. Status id of the contract (`contrato_status_id` of the result), the
94
+ * values of `CONTRACT_STATUS`.
95
+ */
96
+ contrato_status?: number;
97
+ /** Documented, never sent. Registration date from, `AAAA-MM-DD`; use with `data_cadastro_fim`. */
98
+ data_cadastro_inicio?: string;
99
+ /** Documented, never sent. Registration date until, `AAAA-MM-DD`; use with the initial one. */
100
+ data_cadastro_fim?: string;
101
+ /** Documented, never sent. Scheduling date from, `AAAA-MM-DD`; use with `data_agendamento_fim`. */
102
+ data_agendamento_inicio?: string;
103
+ /** Documented, never sent. Scheduling date until, `AAAA-MM-DD`; use with the initial one. */
104
+ data_agendamento_fim?: string;
105
+ /** Documented, never sent. Closing date from, `AAAA-MM-DD`; use with `data_finalizacao_fim`. */
106
+ data_finalizacao_inicio?: string;
107
+ /** Documented, never sent. Closing date until, `AAAA-MM-DD`; use with the initial one. */
108
+ data_finalizacao_fim?: string;
109
+ }
110
+ /** INTERNAL. Validation of the input, exported so a test can check its keys are classified. */
111
+ export declare const occurrencesListInputSchema: z.ZodObject<{
112
+ offset: z.ZodOptional<z.ZodNumber>;
113
+ limit: z.ZodOptional<z.ZodNumber>;
114
+ ocorrencia: z.ZodOptional<z.ZodString>;
115
+ status: z.ZodOptional<z.ZodNumber>;
116
+ contrato: z.ZodOptional<z.ZodNumber>;
117
+ contrato_status: z.ZodOptional<z.ZodNumber>;
118
+ data_cadastro_inicio: z.ZodOptional<z.ZodString>;
119
+ data_cadastro_fim: z.ZodOptional<z.ZodString>;
120
+ data_agendamento_inicio: z.ZodOptional<z.ZodString>;
121
+ data_agendamento_fim: z.ZodOptional<z.ZodString>;
122
+ data_finalizacao_inicio: z.ZodOptional<z.ZodString>;
123
+ data_finalizacao_fim: z.ZodOptional<z.ZodString>;
124
+ }, z.core.$strict>;
125
+ /** INTERNAL definition of `occurrences.list`. */
126
+ export declare const occurrencesList: OperationDefinition<OccurrencesListData, "occurrences.list">;
127
+ export {};
@@ -1,12 +1,25 @@
1
1
  import { z } from "zod";
2
- import type { EndpointDefinition } from "../../endpoint.js";
3
- /** Response of `GET /api/ura/consultaplano/`: the plan catalog with its totals. */
4
- export declare const listPlansSchema: z.ZodObject<{
2
+ import type { OperationDefinition } from "../operation.js";
3
+ /**
4
+ * Identifier of a plan (SGP "plano") in the URA catalog `plans.list` reads (`GET
5
+ * /api/ura/consultaplano/`).
6
+ *
7
+ * This is the ID space of the operations on existing services and contracts: the `plano` filter of
8
+ * `contracts.list`, `plano_id` of `services.changePlan` and `planobase_id` of `services.addTv`. It
9
+ * is what `customers.list` returns as `servicos[].plano.id` too. It is NOT the ID space of the
10
+ * pré-cadastro catalog (`preRegistrations.listPlans`, used by `preRegistrations.create`), typed as
11
+ * `PreRegistrationPlanId`: the same commercial plan may carry another id there, and the live
12
+ * evidence shows an id accepted by one route refused by the other. The two brands make the
13
+ * compiler refuse one where the other belongs, and a plain number where either belongs. They are
14
+ * type-only: on the wire and at runtime an id is a plain number.
15
+ */
16
+ export type PlanId = number & z.core.$brand<"PlanId">;
17
+ declare const catalogSchema: z.ZodObject<{
5
18
  planos: z.ZodArray<z.ZodObject<{
6
- id: z.ZodNumber;
7
- descricao: z.ZodString;
8
- preco: z.ZodNumber;
9
- ativo: z.ZodBoolean;
19
+ id: z.core.$ZodBranded<z.ZodNumber, "PlanId", "out">;
20
+ descricao: z.ZodNullable<z.ZodOptional<z.ZodString>>;
21
+ preco: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
22
+ ativo: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
10
23
  grupo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
11
24
  tipo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
12
25
  pos_pago: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
@@ -30,7 +43,7 @@ export declare const listPlansSchema: z.ZodObject<{
30
43
  id: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
31
44
  uf: z.ZodNullable<z.ZodOptional<z.ZodString>>;
32
45
  pop: z.ZodNullable<z.ZodOptional<z.ZodString>>;
33
- }, z.core.$strip>>>>;
46
+ }, z.core.$loose>>>>;
34
47
  auto_bloqueio: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
35
48
  dias_bloqueio_pos_venc: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
36
49
  dias_bloqueio_aviso: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
@@ -50,21 +63,18 @@ export declare const listPlansSchema: z.ZodObject<{
50
63
  modo_velocidade_red_franquia: z.ZodNullable<z.ZodOptional<z.ZodString>>;
51
64
  download_red_franquia: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
52
65
  upload_red_franquia: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
53
- combo: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$strip>>>>;
66
+ combo: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnknown>>>;
54
67
  qtd_servicos: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
55
- }, z.core.$strip>>;
68
+ }, z.core.$loose>>;
56
69
  total_planos: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
57
70
  total_qtd_servicos: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
58
- }, z.core.$strip>;
59
- /** Key fields of `ura/consultaplano`: required and strict; any mismatch is `SCHEMA_MISMATCH`. */
60
- export declare const listPlansKeyFields: readonly ["planos", "planos[].id", "planos[].descricao", "planos[].preco", "planos[].ativo"];
61
- /** Normalized path of each plan in the `ura/consultaplano` response. */
62
- export declare const planItemPath = "planos[]";
63
- /** Keys of a plan holding secrets (none in `ura/consultaplano`). */
64
- export declare const planSecretKeys: readonly [];
65
- /** Keys of a plan holding personal data (none in `ura/consultaplano`). */
66
- export declare const planPersonalKeys: readonly [];
67
- /** Parsed response of `GET /api/ura/consultaplano/`. */
68
- export type ListPlansResponse = z.output<typeof listPlansSchema>;
69
- /** Definition of `GET /api/ura/consultaplano/`. */
70
- export declare const listPlansDefinition: EndpointDefinition<typeof listPlansSchema>;
71
+ }, z.core.$loose>;
72
+ /**
73
+ * The whole plan catalog of `GET /api/ura/consultaplano/`, in SGP's own shape. The route is not
74
+ * paginated: there is no `paginacao`, and `total_planos` / `total_qtd_servicos` are SGP's own
75
+ * totals of the catalog, returned as received.
76
+ */
77
+ export type PlansListData = z.output<typeof catalogSchema>;
78
+ /** INTERNAL definition of `plans.list`. */
79
+ export declare const plansList: OperationDefinition<PlansListData, "plans.list">;
80
+ export {};
@@ -0,0 +1,276 @@
1
+ import { z } from "zod";
2
+ import { type SgpAddress } from "../address.js";
3
+ import type { AcquisitionMode } from "../constants.js";
4
+ import type { OperationDefinition } from "../operation.js";
5
+ /**
6
+ * Identifier of a plan (SGP "plano") in the pré-cadastro catalog (`preRegistrations.listPlans`,
7
+ * `POST /api/precadastro/plano/list`), the one `preRegistrations.create` takes `plano_id` from.
8
+ *
9
+ * It is NOT a `PlanId` (the URA catalog of `plans.list`): the same commercial plan may carry another
10
+ * id here. The brand is type-only; on the wire an id is a plain number. `preRegistrations.listPlans`
11
+ * returns this type: take the id from there.
12
+ */
13
+ export type PreRegistrationPlanId = number & z.core.$brand<"PreRegistrationPlanId">;
14
+ /**
15
+ * The address fields of a pré-cadastro, loose at the top level of the input with SGP's own names.
16
+ * `logradouro`, `numero`, `bairro`, `cidade`, `uf` and `cep` are Exercised; the other keys are
17
+ * Documented. Only `logradouro` is required (the vendor's documentation marks no other).
18
+ */
19
+ interface PreRegistrationAddress extends SgpAddress {
20
+ logradouro: string;
21
+ }
22
+ /** Fields common to both person types. Money is a number of reais; ids are SGP's own. */
23
+ interface PreRegistrationCreateCommon extends PreRegistrationAddress {
24
+ /** Exercised. Customer name; for a company, its corporate name. Required by SGP. */
25
+ nome: string;
26
+ /**
27
+ * Exercised. A CPF on `personType: "F"`, a CNPJ on `"J"`. SGP stores it exactly as sent, so the
28
+ * SDK sends it in the canonical mask the rest of the base holds (a digits-only one escaped the
29
+ * CRM duplicate check). After removing `.`, `-`, `/` and spaces: exactly 11 digits go as
30
+ * `999.999.999-99` (`F`); exactly 14 alphanumerics, the last 2 digits, go as `AA.AAA.AAA/AAAA-99`,
31
+ * letters uppercased as the Receita writes them (`J`). An input already in the mask goes
32
+ * unchanged. Anything else, an empty text included, is refused locally: `INVALID_INPUT`,
33
+ * `error.issues` is `["cpfcnpj: expected ..."]`, `attempts` 0, nothing sent, `effect` `"none"`.
34
+ * That covers a wrong length, other characters, letters in a CPF or in the last 2 positions of a
35
+ * CNPJ, and the wrong kind for the route (a CNPJ on `F`, a CPF on `J`). Omit the key to send no
36
+ * document. Format only: the check digits are not verified.
37
+ */
38
+ cpfcnpj?: string;
39
+ /** Exercised. Contact e-mail. */
40
+ email?: string;
41
+ /** Documented. Contact phone. */
42
+ celular?: string;
43
+ /** Documented. `AAAA-MM-DD`: birth date of a person, foundation date of a company. */
44
+ datanasc?: string;
45
+ /** Exercised. Free-text note. */
46
+ observacao?: string;
47
+ /** Documented. User responsible for the pré-cadastro. */
48
+ usuariocad_id?: number;
49
+ /**
50
+ * Exercised with `1`. Turns the pré-cadastro into a definitive customer. Omit it to leave only
51
+ * the pré-cadastro. The domain beyond `1` is undocumented, so the SDK sends only `1`.
52
+ */
53
+ precadastro_ativar?: 1;
54
+ /** Exercised. POP ID. */
55
+ pop_id?: number;
56
+ /** Exercised. Billing profile (portador) ID. */
57
+ portador_id?: number;
58
+ /** Exercised. NAS ID. */
59
+ nas_id?: number;
60
+ /**
61
+ * Exercised. Plan ID of the pré-cadastro catalog (`preRegistrations.listPlans`), typed
62
+ * `PreRegistrationPlanId`; not a `PlanId` of `plans.list`: the same commercial plan has another ID
63
+ * here.
64
+ */
65
+ plano_id?: PreRegistrationPlanId;
66
+ /** Exercised. Due-day ID. */
67
+ vencimento_id?: number;
68
+ /**
69
+ * Exercised with `1`. Billing-method code (`BILLING_METHOD`: 1 boleto, 2 automatic debit, 3
70
+ * booklet, 4 recurring charge, 6 PIX); any number is sent as given.
71
+ */
72
+ formacobranca_id?: number;
73
+ /** Documented. Loyalty (fidelidade) ID. */
74
+ fidelidade_id?: number;
75
+ /** Exercised. Secret (PPPoE credential); may be an e-mail. Never log it. */
76
+ login?: string;
77
+ /** Exercised. Password of the contract. Secret: never log it. */
78
+ senha?: string;
79
+ /** Exercised. Password of the customer's central. Secret: never log it. */
80
+ central_senha?: string;
81
+ /** Exercised with `1`. Equipment situation: `ACQUISITION_MODE` (0 owned, 1 loan). */
82
+ modoaquisicao?: AcquisitionMode;
83
+ /** Documented. Details of the requested service. */
84
+ servicodesc?: string;
85
+ /** Documented. "How did you hear about us" ID. */
86
+ midia_id?: number;
87
+ /** Documented. Seller ID. */
88
+ vendedor_id?: number;
89
+ /** Documented. Technician ID for the installation. */
90
+ tecnico_id?: number;
91
+ /** Documented. Send `1` to generate the installation work order. */
92
+ os_instalacao?: 1;
93
+ /** Exercised with `0`. Installation price. */
94
+ instalacao_preco?: number;
95
+ /** Documented. Discount over the installation price. */
96
+ instalacao_desconto?: number;
97
+ /** Documented. Down payment of the installation. */
98
+ instalacao_entrada?: number;
99
+ /** Documented. Number of installments of the installation. */
100
+ instalacao_quantidade_parcelas?: number;
101
+ /** Exercised with `1`. Payment form of the down payment; SGP's documentation lists the values. */
102
+ instalacao_entrada_forma?: number;
103
+ /** Exercised with `1`. Payment form of the installments; SGP's documentation lists the values. */
104
+ instalacao_parcela_forma?: number;
105
+ }
106
+ /** `POST /api/precadastro/F`: a natural person. Only this route was exercised against SGP. */
107
+ export interface PreRegistrationCreateIndividualInput extends PreRegistrationCreateCommon {
108
+ /** Selects the route `/F`; not sent as a field. */
109
+ personType: "F";
110
+ /** Documented. Identity document number. */
111
+ rg?: string;
112
+ /** Documented. Issuer of the identity document. */
113
+ rg_emissor?: string;
114
+ /** Documented. Father's name. */
115
+ nomepai?: string;
116
+ /** Documented. Mother's name. */
117
+ nomemae?: string;
118
+ /** Documented. Nationality. */
119
+ nacionalidade?: string;
120
+ /** Documented. Place of birth. */
121
+ naturalidade?: string;
122
+ /** Documented. `S` single, `C` married, `D` divorced, `V` widowed. */
123
+ estadocivil?: "S" | "C" | "D" | "V";
124
+ /** Documented. `M` male, `F` female. */
125
+ sexo?: "M" | "F";
126
+ /** Documented. Occupation. */
127
+ profissao?: string;
128
+ }
129
+ /** `POST /api/precadastro/J`: a company. Documented only: never exercised against SGP. */
130
+ export interface PreRegistrationCreateCompanyInput extends PreRegistrationCreateCommon {
131
+ /** Selects the route `/J`; not sent as a field. */
132
+ personType: "J";
133
+ /** Documented. Trade name. */
134
+ nomefantasia?: string;
135
+ /** Documented. Name of the person responsible for the company. */
136
+ respempresa?: string;
137
+ /** Documented. CPF of the person responsible for the company. */
138
+ respcpf?: string;
139
+ }
140
+ /**
141
+ * Input of `preRegistrations.create`. `personType` picks the route (`F` or `J`) and is not sent as a
142
+ * field; every other key is sent under its own name, absent ones omitted. Unknown keys are refused.
143
+ */
144
+ export type PreRegistrationCreateInput = PreRegistrationCreateIndividualInput | PreRegistrationCreateCompanyInput;
145
+ /** INTERNAL. Validation of the input, exported so a test can check it against the public types. */
146
+ export declare const preRegistrationsCreateInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
147
+ numero: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
148
+ complemento: z.ZodOptional<z.ZodString>;
149
+ bairro: z.ZodOptional<z.ZodString>;
150
+ cidade: z.ZodOptional<z.ZodString>;
151
+ cep: z.ZodOptional<z.ZodString>;
152
+ uf: z.ZodOptional<z.ZodString>;
153
+ pais: z.ZodOptional<z.ZodString>;
154
+ pontoreferencia: z.ZodOptional<z.ZodString>;
155
+ map_ll: z.ZodOptional<z.ZodString>;
156
+ condominio: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
157
+ nome: z.ZodString;
158
+ cpfcnpj: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
159
+ logradouro: z.ZodString;
160
+ email: z.ZodOptional<z.ZodString>;
161
+ celular: z.ZodOptional<z.ZodString>;
162
+ datanasc: z.ZodOptional<z.ZodString>;
163
+ observacao: z.ZodOptional<z.ZodString>;
164
+ usuariocad_id: z.ZodOptional<z.ZodNumber>;
165
+ precadastro_ativar: z.ZodOptional<z.ZodLiteral<1>>;
166
+ pop_id: z.ZodOptional<z.ZodNumber>;
167
+ portador_id: z.ZodOptional<z.ZodNumber>;
168
+ nas_id: z.ZodOptional<z.ZodNumber>;
169
+ plano_id: z.ZodOptional<z.core.$ZodBranded<z.ZodNumber, "PreRegistrationPlanId", "out">>;
170
+ vencimento_id: z.ZodOptional<z.ZodNumber>;
171
+ formacobranca_id: z.ZodOptional<z.ZodNumber>;
172
+ fidelidade_id: z.ZodOptional<z.ZodNumber>;
173
+ login: z.ZodOptional<z.ZodString>;
174
+ senha: z.ZodOptional<z.ZodString>;
175
+ central_senha: z.ZodOptional<z.ZodString>;
176
+ modoaquisicao: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
177
+ servicodesc: z.ZodOptional<z.ZodString>;
178
+ midia_id: z.ZodOptional<z.ZodNumber>;
179
+ vendedor_id: z.ZodOptional<z.ZodNumber>;
180
+ tecnico_id: z.ZodOptional<z.ZodNumber>;
181
+ os_instalacao: z.ZodOptional<z.ZodLiteral<1>>;
182
+ instalacao_preco: z.ZodOptional<z.ZodNumber>;
183
+ instalacao_desconto: z.ZodOptional<z.ZodNumber>;
184
+ instalacao_entrada: z.ZodOptional<z.ZodNumber>;
185
+ instalacao_quantidade_parcelas: z.ZodOptional<z.ZodNumber>;
186
+ instalacao_entrada_forma: z.ZodOptional<z.ZodNumber>;
187
+ instalacao_parcela_forma: z.ZodOptional<z.ZodNumber>;
188
+ personType: z.ZodLiteral<"F">;
189
+ rg: z.ZodOptional<z.ZodString>;
190
+ rg_emissor: z.ZodOptional<z.ZodString>;
191
+ nomepai: z.ZodOptional<z.ZodString>;
192
+ nomemae: z.ZodOptional<z.ZodString>;
193
+ nacionalidade: z.ZodOptional<z.ZodString>;
194
+ naturalidade: z.ZodOptional<z.ZodString>;
195
+ estadocivil: z.ZodOptional<z.ZodEnum<{
196
+ C: "C";
197
+ D: "D";
198
+ S: "S";
199
+ V: "V";
200
+ }>>;
201
+ sexo: z.ZodOptional<z.ZodEnum<{
202
+ F: "F";
203
+ M: "M";
204
+ }>>;
205
+ profissao: z.ZodOptional<z.ZodString>;
206
+ }, z.core.$strict>, z.ZodObject<{
207
+ numero: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
208
+ complemento: z.ZodOptional<z.ZodString>;
209
+ bairro: z.ZodOptional<z.ZodString>;
210
+ cidade: z.ZodOptional<z.ZodString>;
211
+ cep: z.ZodOptional<z.ZodString>;
212
+ uf: z.ZodOptional<z.ZodString>;
213
+ pais: z.ZodOptional<z.ZodString>;
214
+ pontoreferencia: z.ZodOptional<z.ZodString>;
215
+ map_ll: z.ZodOptional<z.ZodString>;
216
+ condominio: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
217
+ nome: z.ZodString;
218
+ cpfcnpj: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
219
+ logradouro: z.ZodString;
220
+ email: z.ZodOptional<z.ZodString>;
221
+ celular: z.ZodOptional<z.ZodString>;
222
+ datanasc: z.ZodOptional<z.ZodString>;
223
+ observacao: z.ZodOptional<z.ZodString>;
224
+ usuariocad_id: z.ZodOptional<z.ZodNumber>;
225
+ precadastro_ativar: z.ZodOptional<z.ZodLiteral<1>>;
226
+ pop_id: z.ZodOptional<z.ZodNumber>;
227
+ portador_id: z.ZodOptional<z.ZodNumber>;
228
+ nas_id: z.ZodOptional<z.ZodNumber>;
229
+ plano_id: z.ZodOptional<z.core.$ZodBranded<z.ZodNumber, "PreRegistrationPlanId", "out">>;
230
+ vencimento_id: z.ZodOptional<z.ZodNumber>;
231
+ formacobranca_id: z.ZodOptional<z.ZodNumber>;
232
+ fidelidade_id: z.ZodOptional<z.ZodNumber>;
233
+ login: z.ZodOptional<z.ZodString>;
234
+ senha: z.ZodOptional<z.ZodString>;
235
+ central_senha: z.ZodOptional<z.ZodString>;
236
+ modoaquisicao: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
237
+ servicodesc: z.ZodOptional<z.ZodString>;
238
+ midia_id: z.ZodOptional<z.ZodNumber>;
239
+ vendedor_id: z.ZodOptional<z.ZodNumber>;
240
+ tecnico_id: z.ZodOptional<z.ZodNumber>;
241
+ os_instalacao: z.ZodOptional<z.ZodLiteral<1>>;
242
+ instalacao_preco: z.ZodOptional<z.ZodNumber>;
243
+ instalacao_desconto: z.ZodOptional<z.ZodNumber>;
244
+ instalacao_entrada: z.ZodOptional<z.ZodNumber>;
245
+ instalacao_quantidade_parcelas: z.ZodOptional<z.ZodNumber>;
246
+ instalacao_entrada_forma: z.ZodOptional<z.ZodNumber>;
247
+ instalacao_parcela_forma: z.ZodOptional<z.ZodNumber>;
248
+ personType: z.ZodLiteral<"J">;
249
+ nomefantasia: z.ZodOptional<z.ZodString>;
250
+ respempresa: z.ZodOptional<z.ZodString>;
251
+ respcpf: z.ZodOptional<z.ZodString>;
252
+ }, z.core.$strict>], "personType">;
253
+ /**
254
+ * Success body of `POST /api/precadastro/{F|J}`: SGP's `message` and, when it sends them, the
255
+ * IDs it created: `precadastro_id`, `new_cliente_id` (the `CustomerId` that `customers.list` shows)
256
+ * and `new_contrato_id` (a contract is created only with a sufficient plan and billing data). The
257
+ * three are optional, not invariants: older records list only `message` (the 1.x decoder dropped
258
+ * unknown keys, so whether the IDs were sent before is unknown), and a missing ID is never
259
+ * fabricated. Numbers are normalized (a numeric text becomes a number, `""` becomes `null`).
260
+ * Other keys SGP may add are kept.
261
+ */
262
+ declare const createdSchema: z.ZodObject<{
263
+ message: z.ZodString;
264
+ precadastro_id: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | null, unknown>>>;
265
+ new_cliente_id: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | null, unknown>>, z.ZodNullable<z.core.$ZodBranded<z.ZodNumber, "CustomerId", "out">>>>;
266
+ new_contrato_id: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | null, unknown>>>;
267
+ }, z.core.$loose>;
268
+ /**
269
+ * Response of `preRegistrations.create`. When SGP answers with the IDs it created, take them from
270
+ * here (`new_cliente_id`, `new_contrato_id`, `precadastro_id`); when they are absent, read the
271
+ * customer back with `customers.list({ cpfcnpj })`, as before. The SDK never fabricates them.
272
+ */
273
+ export type PreRegistrationCreateData = z.output<typeof createdSchema>;
274
+ /** INTERNAL definition of `preRegistrations.create`. */
275
+ export declare const preRegistrationsCreate: OperationDefinition<PreRegistrationCreateData, "preRegistrations.create">;
276
+ export {};
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ import type { OperationDefinition } from "../operation.js";
3
+ declare const dueDaysSchema: z.ZodArray<z.ZodObject<{
4
+ id: z.ZodNumber;
5
+ dia: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
6
+ }, z.core.$loose>>;
7
+ /**
8
+ * The response of `POST /api/precadastro/vencimento/list`, in SGP's own shape: a bare array with
9
+ * one entry per due day, `id` plus the `dia` it stands for. The route is not paginated, so there is
10
+ * no envelope and no total.
11
+ */
12
+ export type PreRegistrationsListDueDaysData = z.output<typeof dueDaysSchema>;
13
+ /** INTERNAL definition of `preRegistrations.listDueDays`. */
14
+ export declare const preRegistrationsListDueDays: OperationDefinition<PreRegistrationsListDueDaysData, "preRegistrations.listDueDays">;
15
+ export {};