sgp-sdk 1.1.3 → 1.2.0
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.
- package/README.md +42 -0
- package/dist/client.d.ts +11 -0
- package/dist/endpoints/ura/list-annotations.d.ts +32 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +360 -284
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,6 +61,7 @@ method and path.
|
|
|
61
61
|
| `ura.listClients(params?)` | `POST /api/ura/clientes/` |
|
|
62
62
|
| `ura.lookupCustomer(params)` | `POST /api/ura/consultacliente/` |
|
|
63
63
|
| `ura.listContracts(params?)` | `POST /api/ura/listacontrato/` |
|
|
64
|
+
| `ura.listAnnotations(params)` **experimental** | `GET /api/ura/cliente/anotacao/list/` |
|
|
64
65
|
| `ura.listServiceOrders(params?)` | `POST /api/ura/ordemservico/list/` |
|
|
65
66
|
| `ura.listInvoices(params?)` | `POST /api/ura/titulos/` |
|
|
66
67
|
| `ura.listPops()` | `POST /api/ura/pops/` |
|
|
@@ -92,6 +93,47 @@ not geocode. `lat`, `lng` and `distancia` are always numbers (Geogrid sends them
|
|
|
92
93
|
and the SDK converts them). A malformed gateway answer, such as a CTO with a non-numeric `lat`, is
|
|
93
94
|
`SCHEMA_MISMATCH`.
|
|
94
95
|
|
|
96
|
+
### Experimental annotation listing
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
const notes = await sgp.ura.listAnnotations({ cliente_id: 10, contrato_id: 100 });
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`ura.listAnnotations` requires at least one of `cliente_id` / `contrato_id`, each a positive safe-integer
|
|
103
|
+
number. Missing filters, nulls, numeric strings and invalid numbers return `VALIDATION` with status 0
|
|
104
|
+
without fetching. Customer-only includes notes with a null contract; contract-only selects that
|
|
105
|
+
contract; both filters mean **AND**, never OR or fallback. No match is a successful empty array.
|
|
106
|
+
|
|
107
|
+
SGP currently ignores these upstream filters (vendor defect reported, not claimed fixed). The SDK
|
|
108
|
+
still sends canonical filters in one authenticated GET and selects raw identities **before** parsing
|
|
109
|
+
selected notes. A definite mismatch excludes a row even if unrelated content is malformed. If a
|
|
110
|
+
needed identity is missing or malformed and no definite mismatch excludes it, the call fails with
|
|
111
|
+
`SCHEMA_MISMATCH`, not partial data. Source identity strings are not coerced. Selected core fields
|
|
112
|
+
are strict; optional-field drift produces ordinary, selected-only schema warnings. Source order and
|
|
113
|
+
duplicates are preserved; unknown fields are stripped.
|
|
114
|
+
|
|
115
|
+
Returns matching notes present in one SGP response; source completeness is not guaranteed while this method is experimental.
|
|
116
|
+
No documented pagination contract proves completeness; there is no automatic paging, retry, polling,
|
|
117
|
+
cache, completeness flag or operational warning. The method, snake_case params and array-shaped
|
|
118
|
+
`SgpResult<ListAnnotationsResponse>` remain usable after the vendor fix; local selection and
|
|
119
|
+
validation remain as defense. Removing the experimental label requires evidence of corrected behavior.
|
|
120
|
+
|
|
121
|
+
The nine declared fields are required numeric `id` / `cliente`, required number-or-null
|
|
122
|
+
`clientecontrato`, required string `anotacao`, optional/nullable numeric `usuario` / `tipo` /
|
|
123
|
+
`alerta_modo`, and optional/nullable string `data_cadastro` / `data_alteracao`. Text and dates are
|
|
124
|
+
preserved verbatim, without HTML rendering, trimming or date parsing. `annotationPersonalKeys`
|
|
125
|
+
classifies note text and staff identity (`anotacao`, `usuario`); `annotationSecretKeys` is empty.
|
|
126
|
+
Use `omitSensitive(note, annotationPersonalKeys)` before logging or forwarding: free text may contain
|
|
127
|
+
user-entered sensitive content even though no credential field is declared.
|
|
128
|
+
|
|
129
|
+
**Trusted server only:** the multi-customer upstream body enters SDK memory, but the SDK never
|
|
130
|
+
returns, logs or caches the bulk array. Injected fetch, tracing and other instrumentation see the
|
|
131
|
+
body **before** SDK selection and MUST NOT capture it. Local selection is not an authorization
|
|
132
|
+
boundary: the application must authorize requested IDs and keep credentials and execution trusted.
|
|
133
|
+
SDK-generated diagnostics contain paths/types, not source values. Existing upstream error details
|
|
134
|
+
are unchanged and may echo request values; treat them as sensitive too. This special filtered read
|
|
135
|
+
is deliberately excluded from the generic filterless probe registry.
|
|
136
|
+
|
|
95
137
|
## Result and error contract
|
|
96
138
|
|
|
97
139
|
Every method returns `SgpResult<T>`:
|
package/dist/client.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { type ListSellersResponse } from "./endpoints/precadastro/list-sellers.j
|
|
|
8
8
|
import { type AddCustomerDocumentParams, type AddCustomerDocumentResponse } from "./endpoints/suporte/add-customer-document.js";
|
|
9
9
|
import { type ListCustomerDocumentsResponse } from "./endpoints/suporte/list-customer-documents.js";
|
|
10
10
|
import { type CheckCoverageParams, type CheckCoverageResponse } from "./endpoints/ura/check-coverage.js";
|
|
11
|
+
import { type ListAnnotationsParams, type ListAnnotationsResponse } from "./endpoints/ura/list-annotations.js";
|
|
11
12
|
import { type ListClientsParams, type ListClientsResponse } from "./endpoints/ura/list-clients.js";
|
|
12
13
|
import { type ListContractsParams, type ListContractsResponse } from "./endpoints/ura/list-contracts.js";
|
|
13
14
|
import { type ListInvoicesParams, type ListInvoicesResponse } from "./endpoints/ura/list-invoices.js";
|
|
@@ -23,6 +24,16 @@ import type { SgpResult, SgpWriteResult } from "./result.js";
|
|
|
23
24
|
import type { SgpClientConfig, SgpFile } from "./transport.js";
|
|
24
25
|
/** Methods that hit the `/api/ura/` routes. All are reads, except `openTicket`: a write that returns an {@link SgpWriteResult}. */
|
|
25
26
|
export interface UraClient {
|
|
27
|
+
/**
|
|
28
|
+
* @experimental Lists annotations: `GET /api/ura/cliente/anotacao/list/`, with local identity selection.
|
|
29
|
+
* Requires positive safe-integer `cliente_id` and/or `contrato_id`; both mean AND.
|
|
30
|
+
* Returns matching notes present in one SGP response; source completeness is not guaranteed while this method is experimental.
|
|
31
|
+
* The bulk upstream body enters SDK memory but is never returned, logged or cached by the SDK.
|
|
32
|
+
* Use only on a trusted server; authorize requested IDs. Injected fetch/tracing must not capture
|
|
33
|
+
* the upstream body. Omit note text/staff identity with `annotationPersonalKeys` before logging.
|
|
34
|
+
* The public API and local validation/selection remain when upstream filtering is fixed.
|
|
35
|
+
*/
|
|
36
|
+
listAnnotations: (params: ListAnnotationsParams) => Promise<SgpResult<ListAnnotationsResponse>>;
|
|
26
37
|
/**
|
|
27
38
|
* Lists clients, one page at a time: `POST /api/ura/clientes/`.
|
|
28
39
|
*
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { SgpResult } from "../../result.js";
|
|
3
|
+
import { type SgpClientConfig } from "../../transport.js";
|
|
4
|
+
/** Parsed, locally selected annotations; unknown fields are stripped. */
|
|
5
|
+
export declare const listAnnotationsSchema: z.ZodArray<z.ZodObject<{
|
|
6
|
+
id: z.ZodNumber;
|
|
7
|
+
cliente: z.ZodNumber;
|
|
8
|
+
clientecontrato: z.ZodNullable<z.ZodNumber>;
|
|
9
|
+
anotacao: z.ZodString;
|
|
10
|
+
usuario: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
+
tipo: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
12
|
+
alerta_modo: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
13
|
+
data_cadastro: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
14
|
+
data_alteracao: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
/** Required strict fields of each selected annotation. */
|
|
17
|
+
export declare const listAnnotationsKeyFields: readonly ["[].id", "[].cliente", "[].clientecontrato", "[].anotacao"];
|
|
18
|
+
/** Normalized path of each annotation in the root array. */
|
|
19
|
+
export declare const annotationItemPath = "[]";
|
|
20
|
+
/** No declared credential fields; free text can still contain sensitive content. */
|
|
21
|
+
export declare const annotationSecretKeys: readonly [];
|
|
22
|
+
/** Free text and staff identity must be omitted before logging or forwarding. */
|
|
23
|
+
export declare const annotationPersonalKeys: readonly ["anotacao", "usuario"];
|
|
24
|
+
/** At least one positive safe-integer filter is required; both filters mean AND. */
|
|
25
|
+
export interface ListAnnotationsParams {
|
|
26
|
+
cliente_id?: number;
|
|
27
|
+
contrato_id?: number;
|
|
28
|
+
}
|
|
29
|
+
/** Selected notes present in one SGP response, not a guarantee of source completeness. */
|
|
30
|
+
export type ListAnnotationsResponse = z.output<typeof listAnnotationsSchema>;
|
|
31
|
+
/** Special read: never add to the generic filterless probe registry. */
|
|
32
|
+
export declare const listAnnotations: (config: SgpClientConfig, params: ListAnnotationsParams) => Promise<SgpResult<ListAnnotationsResponse>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export type { ListCustomerDocumentsResponse } from "./endpoints/suporte/list-cus
|
|
|
21
21
|
export { customerDocumentItemPath, customerDocumentPersonalKeys, customerDocumentSecretKeys, listCustomerDocumentsDefinition, listCustomerDocumentsKeyFields, } from "./endpoints/suporte/list-customer-documents.js";
|
|
22
22
|
export type { CheckCoverageParams, CheckCoverageResponse, } from "./endpoints/ura/check-coverage.js";
|
|
23
23
|
export { checkCoverageDefinition, checkCoverageKeyFields, coverageItemPath, coveragePersonalKeys, coverageSecretKeys, } from "./endpoints/ura/check-coverage.js";
|
|
24
|
+
export type { ListAnnotationsParams, ListAnnotationsResponse, } from "./endpoints/ura/list-annotations.js";
|
|
25
|
+
export { annotationItemPath, annotationPersonalKeys, annotationSecretKeys, listAnnotationsKeyFields, listAnnotationsSchema, } from "./endpoints/ura/list-annotations.js";
|
|
24
26
|
export type { ListClientsParams, ListClientsResponse } from "./endpoints/ura/list-clients.js";
|
|
25
27
|
export { clientItemPath, clientPersonalKeys, clientSecretKeys, listClientsDefinition, listClientsKeyFields, } from "./endpoints/ura/list-clients.js";
|
|
26
28
|
export type { ListContractsParams, ListContractsResponse, } from "./endpoints/ura/list-contracts.js";
|
package/dist/index.js
CHANGED
|
@@ -633,45 +633,115 @@ var checkCoverageDefinition = {
|
|
|
633
633
|
personalKeys: coveragePersonalKeys
|
|
634
634
|
};
|
|
635
635
|
|
|
636
|
-
// src/endpoints/ura/list-
|
|
636
|
+
// src/endpoints/ura/list-annotations.ts
|
|
637
637
|
import { z as z11 } from "zod";
|
|
638
|
-
var
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
638
|
+
var PATH = "/api/ura/cliente/anotacao/list/";
|
|
639
|
+
var annotationSchema = z11.object({
|
|
640
|
+
id: z11.number(),
|
|
641
|
+
cliente: z11.number(),
|
|
642
|
+
clientecontrato: z11.number().nullable(),
|
|
643
|
+
anotacao: z11.string(),
|
|
644
|
+
usuario: z11.number().optional().nullable(),
|
|
645
|
+
tipo: z11.number().optional().nullable(),
|
|
646
|
+
alerta_modo: z11.number().optional().nullable(),
|
|
647
|
+
data_cadastro: z11.string().optional().nullable(),
|
|
648
|
+
data_alteracao: z11.string().optional().nullable()
|
|
649
|
+
});
|
|
650
|
+
var listAnnotationsSchema = z11.array(annotationSchema);
|
|
651
|
+
var listAnnotationsKeyFields = [
|
|
652
|
+
"[].id",
|
|
653
|
+
"[].cliente",
|
|
654
|
+
"[].clientecontrato",
|
|
655
|
+
"[].anotacao"
|
|
656
|
+
];
|
|
657
|
+
var annotationItemPath = "[]";
|
|
658
|
+
var annotationSecretKeys = [];
|
|
659
|
+
var annotationPersonalKeys = ["anotacao", "usuario"];
|
|
660
|
+
var validFilter = (value) => typeof value === "number" && Number.isSafeInteger(value) && value > 0;
|
|
661
|
+
var listAnnotations = async (config, params) => {
|
|
662
|
+
const customer = params?.cliente_id;
|
|
663
|
+
const contract = params?.contrato_id;
|
|
664
|
+
if (customer === undefined && contract === undefined || customer !== undefined && !validFilter(customer) || contract !== undefined && !validFilter(contract)) {
|
|
665
|
+
return {
|
|
666
|
+
success: false,
|
|
667
|
+
error: createError("VALIDATION", 0, PATH, "cliente_id / contrato_id: supply at least one positive safe integer", MESSAGE_REJECTED_LOCALLY)
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
const raw = await sendRequest(config, {
|
|
671
|
+
method: "GET",
|
|
672
|
+
path: PATH,
|
|
673
|
+
params: { cliente_id: customer, contrato_id: contract }
|
|
674
|
+
});
|
|
675
|
+
if (!raw.ok)
|
|
676
|
+
return { success: false, error: raw.error };
|
|
677
|
+
if (!Array.isArray(raw.body)) {
|
|
678
|
+
return { success: false, error: createError("SCHEMA_MISMATCH", 200, PATH, "(root)") };
|
|
679
|
+
}
|
|
680
|
+
const rows = raw.body;
|
|
681
|
+
const selected = [];
|
|
682
|
+
for (const row of rows) {
|
|
683
|
+
const record = typeof row === "object" && row !== null && !Array.isArray(row) ? row : {};
|
|
684
|
+
const customerIsNumber = typeof record.cliente === "number" && Number.isFinite(record.cliente);
|
|
685
|
+
const contractIsNumber = typeof record.clientecontrato === "number" && Number.isFinite(record.clientecontrato);
|
|
686
|
+
const customerMismatch = customer !== undefined && customerIsNumber && record.cliente !== customer;
|
|
687
|
+
const contractMismatch = contract !== undefined && (record.clientecontrato === null || contractIsNumber && record.clientecontrato !== contract);
|
|
688
|
+
if (customerMismatch || contractMismatch)
|
|
689
|
+
continue;
|
|
690
|
+
const ambiguousPaths = [];
|
|
691
|
+
if (customer !== undefined && !customerIsNumber)
|
|
692
|
+
ambiguousPaths.push("[].cliente");
|
|
693
|
+
if (contract !== undefined && !contractIsNumber)
|
|
694
|
+
ambiguousPaths.push("[].clientecontrato");
|
|
695
|
+
if (ambiguousPaths.length > 0) {
|
|
696
|
+
return {
|
|
697
|
+
success: false,
|
|
698
|
+
error: createError("SCHEMA_MISMATCH", 200, PATH, ambiguousPaths.join(", "))
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
selected.push(row);
|
|
702
|
+
}
|
|
703
|
+
return parseResponse(listAnnotationsSchema, listAnnotationsKeyFields, selected, PATH);
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
// src/endpoints/ura/list-clients.ts
|
|
707
|
+
import { z as z12 } from "zod";
|
|
708
|
+
var addressSchema = z12.object({
|
|
709
|
+
logradouro: z12.string().optional().nullable(),
|
|
710
|
+
numero: z12.number().optional().nullable(),
|
|
711
|
+
bairro: z12.string().optional().nullable(),
|
|
712
|
+
cidade: z12.string().optional().nullable(),
|
|
713
|
+
uf: z12.string().optional().nullable(),
|
|
714
|
+
cep: z12.string().optional().nullable(),
|
|
715
|
+
complemento: z12.string().optional().nullable(),
|
|
716
|
+
latitude: z12.string().optional().nullable(),
|
|
717
|
+
longitude: z12.string().optional().nullable()
|
|
648
718
|
});
|
|
649
|
-
var contactsSchema =
|
|
650
|
-
telefones:
|
|
651
|
-
celulares:
|
|
652
|
-
emails:
|
|
653
|
-
outros:
|
|
719
|
+
var contactsSchema = z12.object({
|
|
720
|
+
telefones: z12.array(z12.string()).optional().nullable(),
|
|
721
|
+
celulares: z12.array(z12.string()).optional().nullable(),
|
|
722
|
+
emails: z12.array(z12.string()).optional().nullable(),
|
|
723
|
+
outros: z12.array(z12.string()).optional().nullable()
|
|
654
724
|
});
|
|
655
|
-
var clientSchema =
|
|
656
|
-
id:
|
|
657
|
-
nome:
|
|
658
|
-
tipo:
|
|
659
|
-
cpfcnpj:
|
|
660
|
-
sexo:
|
|
661
|
-
dataCadastro:
|
|
725
|
+
var clientSchema = z12.object({
|
|
726
|
+
id: z12.number(),
|
|
727
|
+
nome: z12.string(),
|
|
728
|
+
tipo: z12.string(),
|
|
729
|
+
cpfcnpj: z12.string(),
|
|
730
|
+
sexo: z12.string().optional().nullable(),
|
|
731
|
+
dataCadastro: z12.string().optional().nullable(),
|
|
662
732
|
endereco: addressSchema.optional().nullable(),
|
|
663
|
-
contratos:
|
|
664
|
-
titulos:
|
|
733
|
+
contratos: z12.array(z12.object({})).optional().nullable(),
|
|
734
|
+
titulos: z12.array(z12.object({})).optional().nullable(),
|
|
665
735
|
contatos: contactsSchema.optional().nullable()
|
|
666
736
|
});
|
|
667
|
-
var listClientsSchema =
|
|
668
|
-
paginacao:
|
|
669
|
-
offset:
|
|
670
|
-
limit:
|
|
671
|
-
parcial:
|
|
672
|
-
total:
|
|
737
|
+
var listClientsSchema = z12.object({
|
|
738
|
+
paginacao: z12.object({
|
|
739
|
+
offset: z12.number().optional().nullable(),
|
|
740
|
+
limit: z12.number().optional().nullable(),
|
|
741
|
+
parcial: z12.number().optional().nullable(),
|
|
742
|
+
total: z12.number()
|
|
673
743
|
}),
|
|
674
|
-
clientes:
|
|
744
|
+
clientes: z12.array(clientSchema)
|
|
675
745
|
});
|
|
676
746
|
var listClientsKeyFields = [
|
|
677
747
|
"paginacao.total",
|
|
@@ -695,21 +765,21 @@ var listClientsDefinition = {
|
|
|
695
765
|
};
|
|
696
766
|
|
|
697
767
|
// src/endpoints/ura/list-contracts.ts
|
|
698
|
-
import { z as
|
|
699
|
-
var contractSummarySchema =
|
|
700
|
-
id_contrato:
|
|
701
|
-
id_cliente:
|
|
702
|
-
status:
|
|
703
|
-
pop_id:
|
|
704
|
-
nome:
|
|
705
|
-
cpfcnpj:
|
|
706
|
-
email:
|
|
707
|
-
telefone:
|
|
708
|
-
data_status:
|
|
709
|
-
data_cadastro:
|
|
710
|
-
motivo_status:
|
|
768
|
+
import { z as z13 } from "zod";
|
|
769
|
+
var contractSummarySchema = z13.object({
|
|
770
|
+
id_contrato: z13.number(),
|
|
771
|
+
id_cliente: z13.number(),
|
|
772
|
+
status: z13.string(),
|
|
773
|
+
pop_id: z13.number(),
|
|
774
|
+
nome: z13.string().optional().nullable(),
|
|
775
|
+
cpfcnpj: z13.string().optional().nullable(),
|
|
776
|
+
email: z13.string().optional().nullable(),
|
|
777
|
+
telefone: z13.string().optional().nullable(),
|
|
778
|
+
data_status: z13.string().optional().nullable(),
|
|
779
|
+
data_cadastro: z13.string().optional().nullable(),
|
|
780
|
+
motivo_status: z13.string().optional().nullable()
|
|
711
781
|
});
|
|
712
|
-
var listContractsSchema =
|
|
782
|
+
var listContractsSchema = z13.array(contractSummarySchema);
|
|
713
783
|
var listContractsKeyFields = [
|
|
714
784
|
"[].id_contrato",
|
|
715
785
|
"[].id_cliente",
|
|
@@ -736,46 +806,46 @@ var listContractsDefinition = {
|
|
|
736
806
|
};
|
|
737
807
|
|
|
738
808
|
// src/endpoints/ura/list-invoices.ts
|
|
739
|
-
import { z as
|
|
740
|
-
var invoiceSchema =
|
|
741
|
-
id:
|
|
742
|
-
status:
|
|
743
|
-
valor:
|
|
744
|
-
dataVencimento:
|
|
745
|
-
clienteNome:
|
|
746
|
-
clienteCpfcnpj:
|
|
747
|
-
clienteContrato:
|
|
748
|
-
portador:
|
|
749
|
-
numeroDocumento:
|
|
750
|
-
nossoNumero:
|
|
751
|
-
link:
|
|
752
|
-
link_cobranca:
|
|
753
|
-
valorDesconto:
|
|
754
|
-
valorCorrigido:
|
|
755
|
-
valorPago:
|
|
756
|
-
valorPagoParcial:
|
|
757
|
-
codigoBarras:
|
|
758
|
-
linhaDigitavel:
|
|
759
|
-
codigoPix:
|
|
760
|
-
dataEmissao:
|
|
761
|
-
dataPagamento:
|
|
762
|
-
dataCancelamento:
|
|
763
|
-
demonstrativo:
|
|
764
|
-
acordoPagamento:
|
|
765
|
-
acordados:
|
|
766
|
-
cobrados:
|
|
809
|
+
import { z as z14 } from "zod";
|
|
810
|
+
var invoiceSchema = z14.object({
|
|
811
|
+
id: z14.number(),
|
|
812
|
+
status: z14.string(),
|
|
813
|
+
valor: z14.number(),
|
|
814
|
+
dataVencimento: z14.string(),
|
|
815
|
+
clienteNome: z14.string().optional().nullable(),
|
|
816
|
+
clienteCpfcnpj: z14.string().optional().nullable(),
|
|
817
|
+
clienteContrato: z14.number().optional().nullable(),
|
|
818
|
+
portador: z14.string().optional().nullable(),
|
|
819
|
+
numeroDocumento: z14.number().optional().nullable(),
|
|
820
|
+
nossoNumero: z14.string().optional().nullable(),
|
|
821
|
+
link: z14.string().optional().nullable(),
|
|
822
|
+
link_cobranca: z14.string().optional().nullable(),
|
|
823
|
+
valorDesconto: z14.number().optional().nullable(),
|
|
824
|
+
valorCorrigido: z14.number().optional().nullable(),
|
|
825
|
+
valorPago: z14.number().optional().nullable(),
|
|
826
|
+
valorPagoParcial: z14.number().optional().nullable(),
|
|
827
|
+
codigoBarras: z14.string().optional().nullable(),
|
|
828
|
+
linhaDigitavel: z14.string().optional().nullable(),
|
|
829
|
+
codigoPix: z14.string().optional().nullable(),
|
|
830
|
+
dataEmissao: z14.string().optional().nullable(),
|
|
831
|
+
dataPagamento: z14.string().optional().nullable(),
|
|
832
|
+
dataCancelamento: z14.string().optional().nullable(),
|
|
833
|
+
demonstrativo: z14.string().optional().nullable(),
|
|
834
|
+
acordoPagamento: z14.object({
|
|
835
|
+
acordados: z14.array(z14.object({})).optional().nullable(),
|
|
836
|
+
cobrados: z14.array(z14.object({})).optional().nullable()
|
|
767
837
|
}).optional().nullable(),
|
|
768
|
-
formaPagamento:
|
|
769
|
-
usuario_baixa:
|
|
838
|
+
formaPagamento: z14.string().optional().nullable(),
|
|
839
|
+
usuario_baixa: z14.string().optional().nullable()
|
|
770
840
|
});
|
|
771
|
-
var listInvoicesSchema =
|
|
772
|
-
paginacao:
|
|
773
|
-
offset:
|
|
774
|
-
limit:
|
|
775
|
-
parcial:
|
|
776
|
-
total:
|
|
841
|
+
var listInvoicesSchema = z14.object({
|
|
842
|
+
paginacao: z14.object({
|
|
843
|
+
offset: z14.number().optional().nullable(),
|
|
844
|
+
limit: z14.number().optional().nullable(),
|
|
845
|
+
parcial: z14.number().optional().nullable(),
|
|
846
|
+
total: z14.number()
|
|
777
847
|
}),
|
|
778
|
-
titulos:
|
|
848
|
+
titulos: z14.array(invoiceSchema)
|
|
779
849
|
});
|
|
780
850
|
var listInvoicesKeyFields = [
|
|
781
851
|
"paginacao.total",
|
|
@@ -806,23 +876,23 @@ var listInvoicesDefinition = {
|
|
|
806
876
|
};
|
|
807
877
|
|
|
808
878
|
// src/endpoints/ura/list-nas.ts
|
|
809
|
-
import { z as
|
|
810
|
-
var nasPopSchema =
|
|
811
|
-
id:
|
|
812
|
-
cidade:
|
|
813
|
-
uf:
|
|
814
|
-
codigo_ibge:
|
|
815
|
-
ativo:
|
|
879
|
+
import { z as z15 } from "zod";
|
|
880
|
+
var nasPopSchema = z15.object({
|
|
881
|
+
id: z15.number().optional().nullable(),
|
|
882
|
+
cidade: z15.string().optional().nullable(),
|
|
883
|
+
uf: z15.string().optional().nullable(),
|
|
884
|
+
codigo_ibge: z15.number().optional().nullable(),
|
|
885
|
+
ativo: z15.boolean().optional().nullable()
|
|
816
886
|
});
|
|
817
|
-
var nasSchema =
|
|
818
|
-
id:
|
|
819
|
-
descricao:
|
|
820
|
-
identificador:
|
|
821
|
-
endereco_ip:
|
|
822
|
-
ativo:
|
|
823
|
-
pops:
|
|
887
|
+
var nasSchema = z15.object({
|
|
888
|
+
id: z15.number(),
|
|
889
|
+
descricao: z15.string(),
|
|
890
|
+
identificador: z15.string(),
|
|
891
|
+
endereco_ip: z15.string().optional().nullable(),
|
|
892
|
+
ativo: z15.boolean().optional().nullable(),
|
|
893
|
+
pops: z15.array(nasPopSchema).optional().nullable()
|
|
824
894
|
});
|
|
825
|
-
var listNasSchema =
|
|
895
|
+
var listNasSchema = z15.array(nasSchema);
|
|
826
896
|
var listNasKeyFields = ["[].id", "[].descricao", "[].identificador"];
|
|
827
897
|
var nasItemPath = "[]";
|
|
828
898
|
var nasSecretKeys = ["endereco_ip"];
|
|
@@ -838,12 +908,12 @@ var listNasDefinition = {
|
|
|
838
908
|
};
|
|
839
909
|
|
|
840
910
|
// src/endpoints/ura/list-occurrence-methods.ts
|
|
841
|
-
import { z as
|
|
842
|
-
var occurrenceMethodSchema =
|
|
843
|
-
codigo:
|
|
844
|
-
descricao:
|
|
911
|
+
import { z as z16 } from "zod";
|
|
912
|
+
var occurrenceMethodSchema = z16.object({
|
|
913
|
+
codigo: z16.number(),
|
|
914
|
+
descricao: z16.string()
|
|
845
915
|
});
|
|
846
|
-
var listOccurrenceMethodsSchema =
|
|
916
|
+
var listOccurrenceMethodsSchema = z16.array(occurrenceMethodSchema);
|
|
847
917
|
var listOccurrenceMethodsKeyFields = ["[].codigo", "[].descricao"];
|
|
848
918
|
var occurrenceMethodItemPath = "[]";
|
|
849
919
|
var occurrenceMethodSecretKeys = [];
|
|
@@ -859,13 +929,13 @@ var listOccurrenceMethodsDefinition = {
|
|
|
859
929
|
};
|
|
860
930
|
|
|
861
931
|
// src/endpoints/ura/list-payment-carriers.ts
|
|
862
|
-
import { z as
|
|
863
|
-
var paymentCarrierSchema =
|
|
864
|
-
id:
|
|
865
|
-
descricao:
|
|
866
|
-
codigo_banco:
|
|
932
|
+
import { z as z17 } from "zod";
|
|
933
|
+
var paymentCarrierSchema = z17.object({
|
|
934
|
+
id: z17.number(),
|
|
935
|
+
descricao: z17.string(),
|
|
936
|
+
codigo_banco: z17.string().optional().nullable()
|
|
867
937
|
});
|
|
868
|
-
var listPaymentCarriersSchema =
|
|
938
|
+
var listPaymentCarriersSchema = z17.array(paymentCarrierSchema);
|
|
869
939
|
var listPaymentCarriersKeyFields = ["[].id", "[].descricao"];
|
|
870
940
|
var paymentCarrierItemPath = "[]";
|
|
871
941
|
var paymentCarrierSecretKeys = [];
|
|
@@ -881,63 +951,63 @@ var listPaymentCarriersDefinition = {
|
|
|
881
951
|
};
|
|
882
952
|
|
|
883
953
|
// src/endpoints/ura/list-plans.ts
|
|
884
|
-
import { z as
|
|
885
|
-
var planPopSchema =
|
|
886
|
-
id:
|
|
887
|
-
uf:
|
|
888
|
-
pop:
|
|
954
|
+
import { z as z18 } from "zod";
|
|
955
|
+
var planPopSchema = z18.object({
|
|
956
|
+
id: z18.number().optional().nullable(),
|
|
957
|
+
uf: z18.string().optional().nullable(),
|
|
958
|
+
pop: z18.string().optional().nullable()
|
|
889
959
|
});
|
|
890
|
-
var planSchema =
|
|
891
|
-
id:
|
|
892
|
-
descricao:
|
|
893
|
-
preco:
|
|
894
|
-
ativo:
|
|
895
|
-
grupo:
|
|
896
|
-
tipo:
|
|
897
|
-
pos_pago:
|
|
898
|
-
desconto:
|
|
899
|
-
desconto_venc:
|
|
900
|
-
desconto_venc_modo:
|
|
901
|
-
valor_desconto_temporario:
|
|
902
|
-
desconto_temporario_modo:
|
|
903
|
-
desconto_temporario_quantidade:
|
|
904
|
-
descricao_desconto_temporario:
|
|
905
|
-
desconto_temporario_proporcional:
|
|
906
|
-
observacao:
|
|
907
|
-
instalacao_qtd_parcelas:
|
|
908
|
-
instalacao_valor:
|
|
909
|
-
instalacao_desconto_max:
|
|
910
|
-
instalacao_desconto_min:
|
|
911
|
-
disponivel_pre_cadastro:
|
|
912
|
-
disponivel_pre_cadastro_publico:
|
|
913
|
-
data_validade:
|
|
914
|
-
pops:
|
|
915
|
-
auto_bloqueio:
|
|
916
|
-
dias_bloqueio_pos_venc:
|
|
917
|
-
dias_bloqueio_aviso:
|
|
918
|
-
dias_reducao_velocidade:
|
|
919
|
-
download:
|
|
920
|
-
upload:
|
|
921
|
-
trafego_mensal:
|
|
922
|
-
contabilizacao_trafego_mensal:
|
|
923
|
-
trafego_excedente_acao:
|
|
924
|
-
valor_trafego_excedido:
|
|
925
|
-
duplicacao_noturna:
|
|
926
|
-
inicio_duplicacao_noturna:
|
|
927
|
-
fim_duplicacao_noturna:
|
|
928
|
-
modo_velocidade_reduzida:
|
|
929
|
-
download_red_financeiro:
|
|
930
|
-
upload_red_financeiro:
|
|
931
|
-
modo_velocidade_red_franquia:
|
|
932
|
-
download_red_franquia:
|
|
933
|
-
upload_red_franquia:
|
|
934
|
-
combo:
|
|
935
|
-
qtd_servicos:
|
|
960
|
+
var planSchema = z18.object({
|
|
961
|
+
id: z18.number(),
|
|
962
|
+
descricao: z18.string(),
|
|
963
|
+
preco: z18.number(),
|
|
964
|
+
ativo: z18.boolean(),
|
|
965
|
+
grupo: z18.string().optional().nullable(),
|
|
966
|
+
tipo: z18.string().optional().nullable(),
|
|
967
|
+
pos_pago: z18.boolean().optional().nullable(),
|
|
968
|
+
desconto: z18.number().optional().nullable(),
|
|
969
|
+
desconto_venc: z18.number().optional().nullable(),
|
|
970
|
+
desconto_venc_modo: z18.string().optional().nullable(),
|
|
971
|
+
valor_desconto_temporario: z18.number().optional().nullable(),
|
|
972
|
+
desconto_temporario_modo: z18.string().optional().nullable(),
|
|
973
|
+
desconto_temporario_quantidade: z18.number().optional().nullable(),
|
|
974
|
+
descricao_desconto_temporario: z18.string().optional().nullable(),
|
|
975
|
+
desconto_temporario_proporcional: z18.boolean().optional().nullable(),
|
|
976
|
+
observacao: z18.string().optional().nullable(),
|
|
977
|
+
instalacao_qtd_parcelas: z18.number().optional().nullable(),
|
|
978
|
+
instalacao_valor: z18.number().optional().nullable(),
|
|
979
|
+
instalacao_desconto_max: z18.number().optional().nullable(),
|
|
980
|
+
instalacao_desconto_min: z18.number().optional().nullable(),
|
|
981
|
+
disponivel_pre_cadastro: z18.boolean().optional().nullable(),
|
|
982
|
+
disponivel_pre_cadastro_publico: z18.boolean().optional().nullable(),
|
|
983
|
+
data_validade: z18.string().optional().nullable(),
|
|
984
|
+
pops: z18.array(planPopSchema).optional().nullable(),
|
|
985
|
+
auto_bloqueio: z18.boolean().optional().nullable(),
|
|
986
|
+
dias_bloqueio_pos_venc: z18.number().optional().nullable(),
|
|
987
|
+
dias_bloqueio_aviso: z18.number().optional().nullable(),
|
|
988
|
+
dias_reducao_velocidade: z18.number().optional().nullable(),
|
|
989
|
+
download: z18.number().optional().nullable(),
|
|
990
|
+
upload: z18.number().optional().nullable(),
|
|
991
|
+
trafego_mensal: z18.number().optional().nullable(),
|
|
992
|
+
contabilizacao_trafego_mensal: z18.string().optional().nullable(),
|
|
993
|
+
trafego_excedente_acao: z18.string().optional().nullable(),
|
|
994
|
+
valor_trafego_excedido: z18.number().optional().nullable(),
|
|
995
|
+
duplicacao_noturna: z18.boolean().optional().nullable(),
|
|
996
|
+
inicio_duplicacao_noturna: z18.string().optional().nullable(),
|
|
997
|
+
fim_duplicacao_noturna: z18.string().optional().nullable(),
|
|
998
|
+
modo_velocidade_reduzida: z18.string().optional().nullable(),
|
|
999
|
+
download_red_financeiro: z18.number().optional().nullable(),
|
|
1000
|
+
upload_red_financeiro: z18.number().optional().nullable(),
|
|
1001
|
+
modo_velocidade_red_franquia: z18.string().optional().nullable(),
|
|
1002
|
+
download_red_franquia: z18.number().optional().nullable(),
|
|
1003
|
+
upload_red_franquia: z18.number().optional().nullable(),
|
|
1004
|
+
combo: z18.array(z18.object({})).optional().nullable(),
|
|
1005
|
+
qtd_servicos: z18.number().optional().nullable()
|
|
936
1006
|
});
|
|
937
|
-
var listPlansSchema =
|
|
938
|
-
planos:
|
|
939
|
-
total_planos:
|
|
940
|
-
total_qtd_servicos:
|
|
1007
|
+
var listPlansSchema = z18.object({
|
|
1008
|
+
planos: z18.array(planSchema),
|
|
1009
|
+
total_planos: z18.number().optional().nullable(),
|
|
1010
|
+
total_qtd_servicos: z18.number().optional().nullable()
|
|
941
1011
|
});
|
|
942
1012
|
var listPlansKeyFields = [
|
|
943
1013
|
"planos",
|
|
@@ -960,12 +1030,12 @@ var listPlansDefinition = {
|
|
|
960
1030
|
};
|
|
961
1031
|
|
|
962
1032
|
// src/endpoints/ura/list-pops.ts
|
|
963
|
-
import { z as
|
|
964
|
-
var popSchema =
|
|
965
|
-
id:
|
|
966
|
-
pop:
|
|
1033
|
+
import { z as z19 } from "zod";
|
|
1034
|
+
var popSchema = z19.object({
|
|
1035
|
+
id: z19.number(),
|
|
1036
|
+
pop: z19.string()
|
|
967
1037
|
});
|
|
968
|
-
var listPopsSchema =
|
|
1038
|
+
var listPopsSchema = z19.array(popSchema);
|
|
969
1039
|
var listPopsKeyFields = ["[].id", "[].pop"];
|
|
970
1040
|
var popItemPath = "[]";
|
|
971
1041
|
var popSecretKeys = [];
|
|
@@ -981,41 +1051,41 @@ var listPopsDefinition = {
|
|
|
981
1051
|
};
|
|
982
1052
|
|
|
983
1053
|
// src/endpoints/ura/list-service-orders.ts
|
|
984
|
-
import { z as
|
|
985
|
-
var serviceOrderSchema =
|
|
986
|
-
id:
|
|
987
|
-
contrato:
|
|
988
|
-
status_id:
|
|
989
|
-
status:
|
|
990
|
-
tipo_id:
|
|
991
|
-
data_cadastro:
|
|
992
|
-
cliente:
|
|
993
|
-
contrato_status:
|
|
994
|
-
contrato_status_id:
|
|
995
|
-
ocorrencia:
|
|
996
|
-
hora_cadastro:
|
|
997
|
-
data_agendamento:
|
|
998
|
-
hora_agendamento:
|
|
999
|
-
data_finalizacao:
|
|
1000
|
-
hora_finalizacao:
|
|
1001
|
-
tipo:
|
|
1002
|
-
motivo:
|
|
1003
|
-
pop:
|
|
1004
|
-
conteudo:
|
|
1005
|
-
responsavel:
|
|
1006
|
-
tecnicos_auxiliares:
|
|
1007
|
-
usuario:
|
|
1008
|
-
usuario_finalizacao:
|
|
1009
|
-
classificacoes:
|
|
1054
|
+
import { z as z20 } from "zod";
|
|
1055
|
+
var serviceOrderSchema = z20.object({
|
|
1056
|
+
id: z20.number(),
|
|
1057
|
+
contrato: z20.number(),
|
|
1058
|
+
status_id: z20.number(),
|
|
1059
|
+
status: z20.string(),
|
|
1060
|
+
tipo_id: z20.number(),
|
|
1061
|
+
data_cadastro: z20.string(),
|
|
1062
|
+
cliente: z20.string().optional().nullable(),
|
|
1063
|
+
contrato_status: z20.string().optional().nullable(),
|
|
1064
|
+
contrato_status_id: z20.number().optional().nullable(),
|
|
1065
|
+
ocorrencia: z20.string().optional().nullable(),
|
|
1066
|
+
hora_cadastro: z20.string().optional().nullable(),
|
|
1067
|
+
data_agendamento: z20.string().optional().nullable(),
|
|
1068
|
+
hora_agendamento: z20.string().optional().nullable(),
|
|
1069
|
+
data_finalizacao: z20.string().optional().nullable(),
|
|
1070
|
+
hora_finalizacao: z20.string().optional().nullable(),
|
|
1071
|
+
tipo: z20.string().optional().nullable(),
|
|
1072
|
+
motivo: z20.string().optional().nullable(),
|
|
1073
|
+
pop: z20.string().optional().nullable(),
|
|
1074
|
+
conteudo: z20.string().optional().nullable(),
|
|
1075
|
+
responsavel: z20.string().optional().nullable(),
|
|
1076
|
+
tecnicos_auxiliares: z20.array(z20.object({})).optional().nullable(),
|
|
1077
|
+
usuario: z20.string().optional().nullable(),
|
|
1078
|
+
usuario_finalizacao: z20.string().optional().nullable(),
|
|
1079
|
+
classificacoes: z20.array(z20.object({})).optional().nullable()
|
|
1010
1080
|
});
|
|
1011
|
-
var listServiceOrdersSchema =
|
|
1012
|
-
paginacao:
|
|
1013
|
-
offset:
|
|
1014
|
-
limit:
|
|
1015
|
-
parcial:
|
|
1016
|
-
total:
|
|
1081
|
+
var listServiceOrdersSchema = z20.object({
|
|
1082
|
+
paginacao: z20.object({
|
|
1083
|
+
offset: z20.number().optional().nullable(),
|
|
1084
|
+
limit: z20.number().optional().nullable(),
|
|
1085
|
+
parcial: z20.number().optional().nullable(),
|
|
1086
|
+
total: z20.number()
|
|
1017
1087
|
}),
|
|
1018
|
-
ordens_servicos:
|
|
1088
|
+
ordens_servicos: z20.array(serviceOrderSchema)
|
|
1019
1089
|
});
|
|
1020
1090
|
var listServiceOrdersKeyFields = [
|
|
1021
1091
|
"paginacao.total",
|
|
@@ -1041,84 +1111,84 @@ var listServiceOrdersDefinition = {
|
|
|
1041
1111
|
};
|
|
1042
1112
|
|
|
1043
1113
|
// src/endpoints/ura/lookup-customer.ts
|
|
1044
|
-
import { z as
|
|
1045
|
-
var contactEntrySchema =
|
|
1046
|
-
inscricoes:
|
|
1047
|
-
tipoContato:
|
|
1048
|
-
contato:
|
|
1114
|
+
import { z as z21 } from "zod";
|
|
1115
|
+
var contactEntrySchema = z21.object({
|
|
1116
|
+
inscricoes: z21.array(z21.string()).optional().nullable(),
|
|
1117
|
+
tipoContato: z21.string().optional().nullable(),
|
|
1118
|
+
contato: z21.string().optional().nullable()
|
|
1049
1119
|
});
|
|
1050
|
-
var tagSchema =
|
|
1051
|
-
color:
|
|
1052
|
-
font:
|
|
1053
|
-
tag:
|
|
1054
|
-
id:
|
|
1055
|
-
categoria_id:
|
|
1120
|
+
var tagSchema = z21.object({
|
|
1121
|
+
color: z21.string().optional().nullable(),
|
|
1122
|
+
font: z21.string().optional().nullable(),
|
|
1123
|
+
tag: z21.string().optional().nullable(),
|
|
1124
|
+
id: z21.number().optional().nullable(),
|
|
1125
|
+
categoria_id: z21.number().optional().nullable()
|
|
1056
1126
|
});
|
|
1057
|
-
var loyaltySchema =
|
|
1058
|
-
data_inicio:
|
|
1059
|
-
descricao:
|
|
1060
|
-
data_fim:
|
|
1127
|
+
var loyaltySchema = z21.object({
|
|
1128
|
+
data_inicio: z21.string().optional().nullable(),
|
|
1129
|
+
descricao: z21.string().optional().nullable(),
|
|
1130
|
+
data_fim: z21.string().optional().nullable()
|
|
1061
1131
|
});
|
|
1062
|
-
var customerContractSchema =
|
|
1063
|
-
contratoId:
|
|
1064
|
-
clienteId:
|
|
1065
|
-
contratoStatus:
|
|
1066
|
-
contratoStatusDisplay:
|
|
1067
|
-
contratoValorAberto:
|
|
1068
|
-
contratoTitulosAReceber:
|
|
1069
|
-
cobVencimento:
|
|
1070
|
-
contratoStatusModo:
|
|
1071
|
-
motivo_status:
|
|
1072
|
-
dataCadastro:
|
|
1073
|
-
dataAlteracao:
|
|
1074
|
-
popId:
|
|
1075
|
-
popNome:
|
|
1076
|
-
cobPermuta:
|
|
1077
|
-
cobIsento:
|
|
1078
|
-
promessasPagamentoMes:
|
|
1079
|
-
link_quitacao:
|
|
1080
|
-
planointernet:
|
|
1132
|
+
var customerContractSchema = z21.object({
|
|
1133
|
+
contratoId: z21.number(),
|
|
1134
|
+
clienteId: z21.number(),
|
|
1135
|
+
contratoStatus: z21.number(),
|
|
1136
|
+
contratoStatusDisplay: z21.string(),
|
|
1137
|
+
contratoValorAberto: z21.number(),
|
|
1138
|
+
contratoTitulosAReceber: z21.number(),
|
|
1139
|
+
cobVencimento: z21.number(),
|
|
1140
|
+
contratoStatusModo: z21.number().optional().nullable(),
|
|
1141
|
+
motivo_status: z21.string().optional().nullable(),
|
|
1142
|
+
dataCadastro: z21.string().optional().nullable(),
|
|
1143
|
+
dataAlteracao: z21.string().optional().nullable(),
|
|
1144
|
+
popId: z21.number().optional().nullable(),
|
|
1145
|
+
popNome: z21.string().optional().nullable(),
|
|
1146
|
+
cobPermuta: z21.boolean().optional().nullable(),
|
|
1147
|
+
cobIsento: z21.number().optional().nullable(),
|
|
1148
|
+
promessasPagamentoMes: z21.number().optional().nullable(),
|
|
1149
|
+
link_quitacao: z21.string().optional().nullable(),
|
|
1150
|
+
planointernet: z21.string().optional().nullable(),
|
|
1081
1151
|
fidelidade: loyaltySchema.optional().nullable(),
|
|
1082
|
-
contrato_unificado_principal:
|
|
1083
|
-
contrato_unificado_filhos:
|
|
1084
|
-
tags:
|
|
1085
|
-
anotacoes:
|
|
1086
|
-
contratoCentralLogin:
|
|
1087
|
-
contratoCentralSenha:
|
|
1088
|
-
servico_login:
|
|
1089
|
-
servico_senha:
|
|
1090
|
-
servico_plano:
|
|
1091
|
-
servico_grupo:
|
|
1092
|
-
servico_tipo_conexao:
|
|
1093
|
-
servico_vlan:
|
|
1094
|
-
servico_mac:
|
|
1095
|
-
servico_mac2:
|
|
1096
|
-
servico_wifi_ssid:
|
|
1097
|
-
servico_wifi_ssid_5:
|
|
1098
|
-
servico_wifi_password:
|
|
1099
|
-
servico_wifi_password_5:
|
|
1100
|
-
servico_wifi_channel:
|
|
1101
|
-
servico_wifi_channel_5:
|
|
1102
|
-
razaoSocial:
|
|
1103
|
-
cpfCnpj:
|
|
1104
|
-
dataNascimento:
|
|
1105
|
-
telefones:
|
|
1106
|
-
telefones_cargos:
|
|
1107
|
-
emails:
|
|
1108
|
-
outros:
|
|
1109
|
-
endereco_logradouro:
|
|
1110
|
-
endereco_numero:
|
|
1111
|
-
endereco_complemento:
|
|
1112
|
-
endereco_bairro:
|
|
1113
|
-
endereco_cidade:
|
|
1114
|
-
endereco_uf:
|
|
1115
|
-
endereco_cep:
|
|
1116
|
-
endereco_pontoreferencia:
|
|
1117
|
-
endereco_ll:
|
|
1152
|
+
contrato_unificado_principal: z21.number().optional().nullable(),
|
|
1153
|
+
contrato_unificado_filhos: z21.array(z21.number()).optional().nullable(),
|
|
1154
|
+
tags: z21.array(tagSchema).optional().nullable(),
|
|
1155
|
+
anotacoes: z21.array(z21.object({})).optional().nullable(),
|
|
1156
|
+
contratoCentralLogin: z21.string().optional().nullable(),
|
|
1157
|
+
contratoCentralSenha: z21.string().optional().nullable(),
|
|
1158
|
+
servico_login: z21.string().optional().nullable(),
|
|
1159
|
+
servico_senha: z21.string().optional().nullable(),
|
|
1160
|
+
servico_plano: z21.string().optional().nullable(),
|
|
1161
|
+
servico_grupo: z21.string().optional().nullable(),
|
|
1162
|
+
servico_tipo_conexao: z21.string().optional().nullable(),
|
|
1163
|
+
servico_vlan: z21.string().optional().nullable(),
|
|
1164
|
+
servico_mac: z21.string().optional().nullable(),
|
|
1165
|
+
servico_mac2: z21.string().optional().nullable(),
|
|
1166
|
+
servico_wifi_ssid: z21.string().optional().nullable(),
|
|
1167
|
+
servico_wifi_ssid_5: z21.string().optional().nullable(),
|
|
1168
|
+
servico_wifi_password: z21.string().optional().nullable(),
|
|
1169
|
+
servico_wifi_password_5: z21.string().optional().nullable(),
|
|
1170
|
+
servico_wifi_channel: z21.string().optional().nullable(),
|
|
1171
|
+
servico_wifi_channel_5: z21.string().optional().nullable(),
|
|
1172
|
+
razaoSocial: z21.string().optional().nullable(),
|
|
1173
|
+
cpfCnpj: z21.string().optional().nullable(),
|
|
1174
|
+
dataNascimento: z21.string().optional().nullable(),
|
|
1175
|
+
telefones: z21.array(contactEntrySchema).optional().nullable(),
|
|
1176
|
+
telefones_cargos: z21.array(z21.object({})).optional().nullable(),
|
|
1177
|
+
emails: z21.array(contactEntrySchema).optional().nullable(),
|
|
1178
|
+
outros: z21.array(z21.object({})).optional().nullable(),
|
|
1179
|
+
endereco_logradouro: z21.string().optional().nullable(),
|
|
1180
|
+
endereco_numero: z21.number().optional().nullable(),
|
|
1181
|
+
endereco_complemento: z21.string().optional().nullable(),
|
|
1182
|
+
endereco_bairro: z21.string().optional().nullable(),
|
|
1183
|
+
endereco_cidade: z21.string().optional().nullable(),
|
|
1184
|
+
endereco_uf: z21.string().optional().nullable(),
|
|
1185
|
+
endereco_cep: z21.string().optional().nullable(),
|
|
1186
|
+
endereco_pontoreferencia: z21.string().optional().nullable(),
|
|
1187
|
+
endereco_ll: z21.string().optional().nullable()
|
|
1118
1188
|
});
|
|
1119
|
-
var lookupCustomerSchema =
|
|
1120
|
-
msg:
|
|
1121
|
-
contratos:
|
|
1189
|
+
var lookupCustomerSchema = z21.object({
|
|
1190
|
+
msg: z21.string().optional().nullable(),
|
|
1191
|
+
contratos: z21.array(customerContractSchema)
|
|
1122
1192
|
});
|
|
1123
1193
|
var lookupCustomerKeyFields = [
|
|
1124
1194
|
"contratos",
|
|
@@ -1175,15 +1245,15 @@ var lookupCustomerDefinition = {
|
|
|
1175
1245
|
};
|
|
1176
1246
|
|
|
1177
1247
|
// src/endpoints/ura/open-ticket.ts
|
|
1178
|
-
import { z as
|
|
1179
|
-
var openTicketSchema =
|
|
1180
|
-
status:
|
|
1181
|
-
protocolo:
|
|
1182
|
-
id:
|
|
1183
|
-
contratoId:
|
|
1184
|
-
razaoSocial:
|
|
1185
|
-
cpfCnpj:
|
|
1186
|
-
msg:
|
|
1248
|
+
import { z as z22 } from "zod";
|
|
1249
|
+
var openTicketSchema = z22.object({
|
|
1250
|
+
status: z22.literal(1),
|
|
1251
|
+
protocolo: z22.string(),
|
|
1252
|
+
id: z22.number(),
|
|
1253
|
+
contratoId: z22.number().optional().nullable(),
|
|
1254
|
+
razaoSocial: z22.string().optional().nullable(),
|
|
1255
|
+
cpfCnpj: z22.string().optional().nullable(),
|
|
1256
|
+
msg: z22.string().optional().nullable()
|
|
1187
1257
|
});
|
|
1188
1258
|
var openTicketKeyFields = ["status", "protocolo", "id"];
|
|
1189
1259
|
var ticketOpenedItemPath = "";
|
|
@@ -1203,6 +1273,7 @@ var openTicketDefinition = {
|
|
|
1203
1273
|
// src/client.ts
|
|
1204
1274
|
var createSgpClient = (config) => ({
|
|
1205
1275
|
ura: {
|
|
1276
|
+
listAnnotations: (params) => listAnnotations(config, params),
|
|
1206
1277
|
listClients: (params) => callEndpoint(config, listClientsDefinition, { ...params }),
|
|
1207
1278
|
lookupCustomer: (params) => callEndpoint(config, lookupCustomerDefinition, { ...params }),
|
|
1208
1279
|
listContracts: (params) => callEndpoint(config, listContractsDefinition, { ...params }),
|
|
@@ -1325,6 +1396,8 @@ export {
|
|
|
1325
1396
|
listContractsDefinition,
|
|
1326
1397
|
listClientsKeyFields,
|
|
1327
1398
|
listClientsDefinition,
|
|
1399
|
+
listAnnotationsSchema,
|
|
1400
|
+
listAnnotationsKeyFields,
|
|
1328
1401
|
invoiceSecretKeys,
|
|
1329
1402
|
invoicePersonalKeys,
|
|
1330
1403
|
invoiceItemPath,
|
|
@@ -1368,6 +1441,9 @@ export {
|
|
|
1368
1441
|
clientItemPath,
|
|
1369
1442
|
checkCoverageKeyFields,
|
|
1370
1443
|
checkCoverageDefinition,
|
|
1444
|
+
annotationSecretKeys,
|
|
1445
|
+
annotationPersonalKeys,
|
|
1446
|
+
annotationItemPath,
|
|
1371
1447
|
addCustomerDocumentKeyFields,
|
|
1372
1448
|
addCustomerDocumentDefinition
|
|
1373
1449
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sgp-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Unofficial TypeScript client for the SGP (TSMX) ISP ERP HTTP API, with normalized errors and explicit write outcomes. Not affiliated with TSMX.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|