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.
- package/CHANGELOG.md +147 -0
- package/COMPATIBILITY.md +161 -81
- package/MIGRATION.md +66 -5
- package/README.md +111 -69
- package/dist/client.d.ts +303 -26
- package/dist/constants.d.ts +13 -0
- package/dist/document.d.ts +11 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.js +1510 -708
- package/dist/normalize.d.ts +9 -0
- package/dist/operation-sensitivity.d.ts +239 -6
- package/dist/operation.d.ts +7 -1
- package/dist/operations/contracts-check-connection.d.ts +56 -0
- package/dist/operations/contracts-list-services.d.ts +103 -0
- package/dist/operations/coverage-check-address.d.ts +46 -0
- package/dist/operations/coverage-check.d.ts +8 -7
- package/dist/operations/coverage-list-gateways.d.ts +16 -0
- package/dist/operations/crm-customers-create.d.ts +13 -3
- package/dist/operations/customers-list.d.ts +6 -0
- package/dist/operations/invoices-list.d.ts +11 -5
- package/dist/operations/maintenance-list.d.ts +35 -0
- package/dist/operations/occurrences-create.d.ts +10 -1
- package/dist/operations/occurrences-list.d.ts +127 -0
- package/dist/operations/pre-registrations-create.d.ts +29 -6
- package/dist/operations/pre-registrations-list-plans.d.ts +2 -2
- package/dist/operations/services-add-generic.d.ts +52 -0
- package/dist/operations/services-add-tv.d.ts +3 -3
- package/dist/operations/services-remove-generic.d.ts +28 -0
- package/dist/operations/services-remove-tv.d.ts +3 -3
- package/dist/operations/work-orders-get.d.ts +99 -0
- package/dist/operations/work-orders-list-comments.d.ts +34 -0
- package/dist/result.d.ts +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -453,7 +453,7 @@ var UNAVAILABLE_REASON = {
|
|
|
453
453
|
};
|
|
454
454
|
var failure = (error, response, attempts) => ({ ok: false, error, response, attempts });
|
|
455
455
|
var effectFor = (definition, effect) => definition.write === undefined ? undefined : effect;
|
|
456
|
-
var refused = (definition, code) => failure(buildError(code, definition.name, { effect: effectFor(definition, "none") }), null, 0);
|
|
456
|
+
var refused = (definition, code, issues) => failure(buildError(code, definition.name, { effect: effectFor(definition, "none"), issues }), null, 0);
|
|
457
457
|
var decodeBody = (text) => {
|
|
458
458
|
if (text === "")
|
|
459
459
|
return { kind: "empty" };
|
|
@@ -537,7 +537,7 @@ var execute = async (config, definition, input, options = {}) => {
|
|
|
537
537
|
return refused(definition, "INVALID_INPUT");
|
|
538
538
|
const built = definition.buildRequest(snapshot.value);
|
|
539
539
|
if (!built.ok)
|
|
540
|
-
return refused(definition, "INVALID_INPUT");
|
|
540
|
+
return refused(definition, "INVALID_INPUT", built.issues);
|
|
541
541
|
const resolved = resolvePath(definition.pathTemplate, built.pathParams);
|
|
542
542
|
if (!resolved.ok)
|
|
543
543
|
return refused(definition, "INVALID_INPUT");
|
|
@@ -615,7 +615,7 @@ var execute = async (config, definition, input, options = {}) => {
|
|
|
615
615
|
const error2 = buildError("REJECTED", operation, {
|
|
616
616
|
reason: refusal.reason,
|
|
617
617
|
sgp,
|
|
618
|
-
effect: unknownEffect
|
|
618
|
+
effect: refusal.effect === undefined ? unknownEffect : effectFor(definition, refusal.effect)
|
|
619
619
|
});
|
|
620
620
|
return failure(error2, response, number2);
|
|
621
621
|
}
|
|
@@ -861,37 +861,81 @@ var catalogsListPops = {
|
|
|
861
861
|
sensitivity: catalogsListPopsSensitivity
|
|
862
862
|
};
|
|
863
863
|
|
|
864
|
+
// src/operations/contracts-check-connection.ts
|
|
865
|
+
import { z as z4 } from "zod";
|
|
866
|
+
var connectionSchema = z4.looseObject({
|
|
867
|
+
status: z4.number(),
|
|
868
|
+
msg: z4.string().optional().nullable(),
|
|
869
|
+
servico_id: z4.number().optional().nullable(),
|
|
870
|
+
contratoId: z4.number().optional().nullable(),
|
|
871
|
+
login: z4.string().optional().nullable(),
|
|
872
|
+
razaoSocial: z4.string().optional().nullable(),
|
|
873
|
+
cpfCnpj: z4.string().optional().nullable()
|
|
874
|
+
});
|
|
875
|
+
var connectionsSchema = z4.array(connectionSchema);
|
|
876
|
+
var connectionInvariants = ["[].status"];
|
|
877
|
+
var contractsCheckConnectionInputSchema = z4.strictObject({
|
|
878
|
+
contrato: z4.number().int().positive().optional(),
|
|
879
|
+
telefone: z4.string().min(1).optional(),
|
|
880
|
+
status_all: z4.literal(1).optional(),
|
|
881
|
+
status_filter: z4.string().min(1).optional(),
|
|
882
|
+
uracontato: z4.string().min(1).optional()
|
|
883
|
+
}).refine((input) => input.contrato !== undefined || input.telefone !== undefined);
|
|
884
|
+
var buildRequest4 = (input) => {
|
|
885
|
+
const parsed = contractsCheckConnectionInputSchema.safeParse(input);
|
|
886
|
+
if (!parsed.success)
|
|
887
|
+
return { ok: false, problem: "invalid contracts.checkConnection input" };
|
|
888
|
+
return { ok: true, params: parsed.data };
|
|
889
|
+
};
|
|
890
|
+
var itemsDecoder = tolerantDecoder(connectionsSchema, connectionInvariants);
|
|
891
|
+
var decode = (body) => itemsDecoder(body.kind === "json" && isRecord(body.value) ? { kind: "json", value: [body.value] } : body);
|
|
892
|
+
var contractsCheckConnectionSensitivity = {
|
|
893
|
+
input: [{ path: "", secretKeys: [], personalKeys: ["telefone", "uracontato"] }],
|
|
894
|
+
output: [{ path: "[]", secretKeys: ["login"], personalKeys: ["razaoSocial", "cpfCnpj"] }]
|
|
895
|
+
};
|
|
896
|
+
var contractsCheckConnection = {
|
|
897
|
+
name: "contracts.checkConnection",
|
|
898
|
+
method: "POST",
|
|
899
|
+
pathTemplate: "/api/ura/verificaacesso/",
|
|
900
|
+
encoding: "form",
|
|
901
|
+
repeatable: false,
|
|
902
|
+
write: {},
|
|
903
|
+
buildRequest: buildRequest4,
|
|
904
|
+
decode,
|
|
905
|
+
sensitivity: contractsCheckConnectionSensitivity
|
|
906
|
+
};
|
|
907
|
+
|
|
864
908
|
// src/operations/contracts-list.ts
|
|
865
|
-
import { z as
|
|
909
|
+
import { z as z6 } from "zod";
|
|
866
910
|
|
|
867
911
|
// src/ids.ts
|
|
868
|
-
import { z as
|
|
869
|
-
var customerIdSchema =
|
|
912
|
+
import { z as z5 } from "zod";
|
|
913
|
+
var customerIdSchema = z5.number().brand();
|
|
870
914
|
|
|
871
915
|
// src/operations/contracts-list.ts
|
|
872
|
-
var contractSummarySchema =
|
|
873
|
-
id_contrato:
|
|
916
|
+
var contractSummarySchema = z6.looseObject({
|
|
917
|
+
id_contrato: z6.number(),
|
|
874
918
|
id_cliente: customerIdSchema,
|
|
875
|
-
status:
|
|
876
|
-
pop_id:
|
|
877
|
-
nome:
|
|
878
|
-
cpfcnpj:
|
|
879
|
-
email:
|
|
880
|
-
telefone:
|
|
881
|
-
data_status:
|
|
882
|
-
data_cadastro:
|
|
883
|
-
motivo_status:
|
|
884
|
-
});
|
|
885
|
-
var contractsSchema =
|
|
919
|
+
status: z6.string().optional().nullable(),
|
|
920
|
+
pop_id: z6.number().optional().nullable(),
|
|
921
|
+
nome: z6.string().optional().nullable(),
|
|
922
|
+
cpfcnpj: z6.string().optional().nullable(),
|
|
923
|
+
email: z6.string().optional().nullable(),
|
|
924
|
+
telefone: z6.string().optional().nullable(),
|
|
925
|
+
data_status: z6.string().optional().nullable(),
|
|
926
|
+
data_cadastro: z6.string().optional().nullable(),
|
|
927
|
+
motivo_status: z6.string().optional().nullable()
|
|
928
|
+
});
|
|
929
|
+
var contractsSchema = z6.array(contractSummarySchema);
|
|
886
930
|
var contractsInvariants = ["[].id_contrato", "[].id_cliente"];
|
|
887
|
-
var contractsListInputSchema =
|
|
888
|
-
contrato:
|
|
889
|
-
plano:
|
|
890
|
-
tipo:
|
|
891
|
-
status:
|
|
892
|
-
exibir_endereco:
|
|
893
|
-
});
|
|
894
|
-
var
|
|
931
|
+
var contractsListInputSchema = z6.strictObject({
|
|
932
|
+
contrato: z6.number().int().optional(),
|
|
933
|
+
plano: z6.number().int().optional(),
|
|
934
|
+
tipo: z6.string().optional(),
|
|
935
|
+
status: z6.number().int().optional(),
|
|
936
|
+
exibir_endereco: z6.boolean().optional()
|
|
937
|
+
});
|
|
938
|
+
var buildRequest5 = (input) => {
|
|
895
939
|
const parsed = contractsListInputSchema.safeParse(input);
|
|
896
940
|
if (!parsed.success)
|
|
897
941
|
return { ok: false, problem: "invalid contracts.list input" };
|
|
@@ -912,48 +956,204 @@ var contractsList = {
|
|
|
912
956
|
method: "POST",
|
|
913
957
|
pathTemplate: "/api/ura/listacontrato/",
|
|
914
958
|
encoding: "json",
|
|
915
|
-
buildRequest:
|
|
959
|
+
buildRequest: buildRequest5,
|
|
916
960
|
repeatable: true,
|
|
917
961
|
decode: tolerantDecoder(contractsSchema, contractsInvariants),
|
|
918
962
|
sensitivity: contractsListSensitivity
|
|
919
963
|
};
|
|
920
964
|
|
|
965
|
+
// src/operations/contracts-list-services.ts
|
|
966
|
+
import { z as z8 } from "zod";
|
|
967
|
+
|
|
968
|
+
// src/normalize.ts
|
|
969
|
+
import { z as z7 } from "zod";
|
|
970
|
+
var NUMERIC_TEXT = /^-?\d+(\.\d+)?$/;
|
|
971
|
+
var parseNumericText = (value) => {
|
|
972
|
+
if (typeof value === "number")
|
|
973
|
+
return value;
|
|
974
|
+
if (typeof value !== "string" || !NUMERIC_TEXT.test(value))
|
|
975
|
+
return;
|
|
976
|
+
const parsed = Number(value);
|
|
977
|
+
return Number.isFinite(parsed) && (value.includes(".") || Number.isSafeInteger(parsed)) ? parsed : undefined;
|
|
978
|
+
};
|
|
979
|
+
var normalizedNumber = z7.unknown().transform((value, ctx) => {
|
|
980
|
+
if (value === null || value === "")
|
|
981
|
+
return null;
|
|
982
|
+
const parsed = parseNumericText(value);
|
|
983
|
+
if (parsed !== undefined)
|
|
984
|
+
return parsed;
|
|
985
|
+
ctx.issues.push({ code: "invalid_type", expected: "number", input: value });
|
|
986
|
+
return z7.NEVER;
|
|
987
|
+
});
|
|
988
|
+
var trimmedText = z7.string().transform((value) => value.trim());
|
|
989
|
+
|
|
990
|
+
// src/operations/contracts-list-services.ts
|
|
991
|
+
var numberOrText = z8.union([z8.number(), z8.string()]);
|
|
992
|
+
var serviceId = normalizedNumber.pipe(z8.number());
|
|
993
|
+
var serviceRowSchema = z8.looseObject({
|
|
994
|
+
servico_id: serviceId,
|
|
995
|
+
servico_tipo: z8.number().optional().nullable(),
|
|
996
|
+
servico_login: z8.string().optional().nullable(),
|
|
997
|
+
servico_password: z8.string().optional().nullable(),
|
|
998
|
+
servico_mac: z8.string().optional().nullable(),
|
|
999
|
+
servico_online: z8.boolean().optional().nullable(),
|
|
1000
|
+
nas_ip: z8.string().optional().nullable(),
|
|
1001
|
+
servicos: z8.array(z8.unknown()).optional().nullable(),
|
|
1002
|
+
contrato_id: normalizedNumber.optional(),
|
|
1003
|
+
contrato_status: trimmedText.optional().nullable(),
|
|
1004
|
+
contrato_status_id: normalizedNumber.optional(),
|
|
1005
|
+
contrato_status_data: z8.string().optional().nullable(),
|
|
1006
|
+
contrato_cadastro: z8.string().optional().nullable(),
|
|
1007
|
+
contrato_pop_id: normalizedNumber.optional(),
|
|
1008
|
+
contrato_pop_nome: z8.string().optional().nullable(),
|
|
1009
|
+
contrato_endereco_ll: z8.string().optional().nullable(),
|
|
1010
|
+
cliente_id: customerIdSchema.optional().nullable(),
|
|
1011
|
+
cliente_nome: z8.string().optional().nullable(),
|
|
1012
|
+
cliente_email: z8.string().optional().nullable(),
|
|
1013
|
+
cliente_contato: z8.string().optional().nullable(),
|
|
1014
|
+
endereco_id: z8.number().optional().nullable(),
|
|
1015
|
+
endereco_logradouro: z8.string().optional().nullable(),
|
|
1016
|
+
endereco_numero: numberOrText.optional().nullable(),
|
|
1017
|
+
endereco_complemento: z8.string().optional().nullable(),
|
|
1018
|
+
endereco_bairro: z8.string().optional().nullable(),
|
|
1019
|
+
endereco_cidade: z8.string().optional().nullable(),
|
|
1020
|
+
endereco_uf: z8.string().optional().nullable(),
|
|
1021
|
+
endereco_pontoreferencia: z8.string().optional().nullable(),
|
|
1022
|
+
endereco_ll: z8.string().optional().nullable(),
|
|
1023
|
+
plano_id: z8.number().optional().nullable(),
|
|
1024
|
+
plano: z8.string().optional().nullable(),
|
|
1025
|
+
plano_download: z8.string().optional().nullable(),
|
|
1026
|
+
plano_upload: z8.string().optional().nullable(),
|
|
1027
|
+
os_servicoprestado: z8.string().optional().nullable(),
|
|
1028
|
+
rad_username: z8.string().optional().nullable(),
|
|
1029
|
+
rad_ip: z8.string().optional().nullable(),
|
|
1030
|
+
rad_mac: z8.string().optional().nullable(),
|
|
1031
|
+
rad_nasipaddress: z8.string().optional().nullable(),
|
|
1032
|
+
rad_nasportid: z8.string().optional().nullable(),
|
|
1033
|
+
rad_nasporttype: z8.string().optional().nullable(),
|
|
1034
|
+
rad_calledstationid: z8.string().optional().nullable(),
|
|
1035
|
+
rad_acctsessionid: z8.string().optional().nullable(),
|
|
1036
|
+
rad_radacctid: normalizedNumber.optional(),
|
|
1037
|
+
rad_dataconexao: z8.string().optional().nullable(),
|
|
1038
|
+
rad_tempo: z8.string().optional().nullable(),
|
|
1039
|
+
rad_tempo_ordem: normalizedNumber.optional(),
|
|
1040
|
+
rad_acctinputoctets: normalizedNumber.optional(),
|
|
1041
|
+
rad_acctoutputoctets: normalizedNumber.optional(),
|
|
1042
|
+
rad_framedprotocol: z8.string().optional().nullable(),
|
|
1043
|
+
rad_framedipv6prefix: z8.string().optional().nullable(),
|
|
1044
|
+
rad_delegatedipv6prefix: z8.string().optional().nullable()
|
|
1045
|
+
});
|
|
1046
|
+
var rowsSchema = z8.array(serviceRowSchema);
|
|
1047
|
+
var rowsInvariants = ["[].servico_id"];
|
|
1048
|
+
var contractsListServicesInputSchema = z8.strictObject({
|
|
1049
|
+
contrato_id: z8.number().int().positive().optional(),
|
|
1050
|
+
cliente_id: customerIdSchema.int().positive().optional(),
|
|
1051
|
+
cliente_nome: z8.string().min(1).optional(),
|
|
1052
|
+
cliente_cpfcnpj: z8.string().min(1).optional(),
|
|
1053
|
+
servico_login: z8.string().min(1).optional()
|
|
1054
|
+
});
|
|
1055
|
+
var buildRequest6 = (input) => {
|
|
1056
|
+
const parsed = contractsListServicesInputSchema.safeParse(input);
|
|
1057
|
+
if (!parsed.success)
|
|
1058
|
+
return { ok: false, problem: "invalid contracts.listServices input" };
|
|
1059
|
+
if (Object.values(parsed.data).every((value) => value === undefined)) {
|
|
1060
|
+
return { ok: false, problem: "contracts.listServices needs at least one filter" };
|
|
1061
|
+
}
|
|
1062
|
+
return { ok: true, params: parsed.data };
|
|
1063
|
+
};
|
|
1064
|
+
var contractsListServicesSensitivity = {
|
|
1065
|
+
input: [
|
|
1066
|
+
{
|
|
1067
|
+
path: "",
|
|
1068
|
+
secretKeys: ["servico_login"],
|
|
1069
|
+
personalKeys: ["cliente_nome", "cliente_cpfcnpj"]
|
|
1070
|
+
}
|
|
1071
|
+
],
|
|
1072
|
+
output: [
|
|
1073
|
+
{
|
|
1074
|
+
path: "[]",
|
|
1075
|
+
secretKeys: [
|
|
1076
|
+
"servico_login",
|
|
1077
|
+
"servico_password",
|
|
1078
|
+
"servico_mac",
|
|
1079
|
+
"nas_ip",
|
|
1080
|
+
"servicos",
|
|
1081
|
+
"rad_username",
|
|
1082
|
+
"rad_ip",
|
|
1083
|
+
"rad_mac",
|
|
1084
|
+
"rad_nasipaddress",
|
|
1085
|
+
"rad_nasportid",
|
|
1086
|
+
"rad_calledstationid",
|
|
1087
|
+
"rad_acctsessionid",
|
|
1088
|
+
"rad_radacctid",
|
|
1089
|
+
"rad_framedipv6prefix",
|
|
1090
|
+
"rad_delegatedipv6prefix"
|
|
1091
|
+
],
|
|
1092
|
+
personalKeys: [
|
|
1093
|
+
"cliente_nome",
|
|
1094
|
+
"cliente_email",
|
|
1095
|
+
"cliente_contato",
|
|
1096
|
+
"endereco_logradouro",
|
|
1097
|
+
"endereco_numero",
|
|
1098
|
+
"endereco_complemento",
|
|
1099
|
+
"endereco_bairro",
|
|
1100
|
+
"endereco_cidade",
|
|
1101
|
+
"endereco_uf",
|
|
1102
|
+
"endereco_pontoreferencia",
|
|
1103
|
+
"endereco_ll",
|
|
1104
|
+
"contrato_endereco_ll",
|
|
1105
|
+
"os_servicoprestado"
|
|
1106
|
+
]
|
|
1107
|
+
}
|
|
1108
|
+
]
|
|
1109
|
+
};
|
|
1110
|
+
var contractsListServices = {
|
|
1111
|
+
name: "contracts.listServices",
|
|
1112
|
+
method: "POST",
|
|
1113
|
+
pathTemplate: "/api/suporte/contrato/list/",
|
|
1114
|
+
encoding: "form",
|
|
1115
|
+
buildRequest: buildRequest6,
|
|
1116
|
+
repeatable: true,
|
|
1117
|
+
decode: tolerantDecoder(rowsSchema, rowsInvariants),
|
|
1118
|
+
sensitivity: contractsListServicesSensitivity
|
|
1119
|
+
};
|
|
1120
|
+
|
|
921
1121
|
// src/operations/contracts-list-status-reasons.ts
|
|
922
|
-
import { z as
|
|
923
|
-
var statusReasonSchema =
|
|
924
|
-
id:
|
|
925
|
-
motivo:
|
|
1122
|
+
import { z as z9 } from "zod";
|
|
1123
|
+
var statusReasonSchema = z9.looseObject({
|
|
1124
|
+
id: z9.number(),
|
|
1125
|
+
motivo: z9.string().optional().nullable()
|
|
926
1126
|
});
|
|
927
|
-
var statusReasonsSchema =
|
|
1127
|
+
var statusReasonsSchema = z9.array(statusReasonSchema);
|
|
928
1128
|
var statusReasonsInvariants = ["[].id"];
|
|
929
|
-
var
|
|
1129
|
+
var buildRequest7 = () => ({ ok: true });
|
|
930
1130
|
var contractsListStatusReasonsSensitivity = { input: [], output: [] };
|
|
931
1131
|
var contractsListStatusReasons = {
|
|
932
1132
|
name: "contracts.listStatusReasons",
|
|
933
1133
|
method: "POST",
|
|
934
1134
|
pathTemplate: "/api/ura/contrato/status/motivos/",
|
|
935
1135
|
encoding: "json",
|
|
936
|
-
buildRequest:
|
|
1136
|
+
buildRequest: buildRequest7,
|
|
937
1137
|
repeatable: true,
|
|
938
1138
|
decode: tolerantDecoder(statusReasonsSchema, statusReasonsInvariants),
|
|
939
1139
|
sensitivity: contractsListStatusReasonsSensitivity
|
|
940
1140
|
};
|
|
941
1141
|
|
|
942
1142
|
// src/operations/contracts-update.ts
|
|
943
|
-
import { z as
|
|
944
|
-
var id =
|
|
945
|
-
var contractsUpdateInputSchema =
|
|
946
|
-
var
|
|
1143
|
+
import { z as z10 } from "zod";
|
|
1144
|
+
var id = z10.number().int().nonnegative();
|
|
1145
|
+
var contractsUpdateInputSchema = z10.strictObject({ contrato: id, forma_cobranca: id });
|
|
1146
|
+
var buildRequest8 = (input) => {
|
|
947
1147
|
const parsed = contractsUpdateInputSchema.safeParse(input);
|
|
948
1148
|
if (!parsed.success)
|
|
949
1149
|
return { ok: false, problem: "invalid contracts.update input" };
|
|
950
1150
|
return { ok: true, params: parsed.data };
|
|
951
1151
|
};
|
|
952
|
-
var contractUpdatedSchema =
|
|
953
|
-
resposta:
|
|
954
|
-
mensagem:
|
|
955
|
-
contrato:
|
|
956
|
-
alterados:
|
|
1152
|
+
var contractUpdatedSchema = z10.looseObject({
|
|
1153
|
+
resposta: z10.looseObject({
|
|
1154
|
+
mensagem: z10.string().optional().nullable(),
|
|
1155
|
+
contrato: z10.number(),
|
|
1156
|
+
alterados: z10.array(z10.string())
|
|
957
1157
|
})
|
|
958
1158
|
});
|
|
959
1159
|
var contractUpdatedInvariants = ["resposta", "resposta.contrato", "resposta.alterados"];
|
|
@@ -965,30 +1165,30 @@ var contractsUpdate = {
|
|
|
965
1165
|
encoding: "json",
|
|
966
1166
|
repeatable: false,
|
|
967
1167
|
write: {},
|
|
968
|
-
buildRequest:
|
|
1168
|
+
buildRequest: buildRequest8,
|
|
969
1169
|
decode: tolerantDecoder(contractUpdatedSchema, contractUpdatedInvariants),
|
|
970
1170
|
sensitivity: contractsUpdateSensitivity
|
|
971
1171
|
};
|
|
972
1172
|
|
|
973
1173
|
// src/operations/contracts-update-status.ts
|
|
974
|
-
import { z as
|
|
975
|
-
var id2 =
|
|
976
|
-
var contractsUpdateStatusInputSchema =
|
|
1174
|
+
import { z as z11 } from "zod";
|
|
1175
|
+
var id2 = z11.number().int().nonnegative();
|
|
1176
|
+
var contractsUpdateStatusInputSchema = z11.strictObject({
|
|
977
1177
|
contrato: id2,
|
|
978
1178
|
status: id2,
|
|
979
1179
|
motivo: id2.optional()
|
|
980
1180
|
});
|
|
981
|
-
var
|
|
1181
|
+
var buildRequest9 = (input) => {
|
|
982
1182
|
const parsed = contractsUpdateStatusInputSchema.safeParse(input);
|
|
983
1183
|
if (!parsed.success)
|
|
984
1184
|
return { ok: false, problem: "invalid contracts.updateStatus input" };
|
|
985
1185
|
return { ok: true, params: parsed.data };
|
|
986
1186
|
};
|
|
987
|
-
var statusChangedSchema =
|
|
988
|
-
resposta:
|
|
989
|
-
mensagem:
|
|
990
|
-
contrato:
|
|
991
|
-
contrato_status:
|
|
1187
|
+
var statusChangedSchema = z11.looseObject({
|
|
1188
|
+
resposta: z11.looseObject({
|
|
1189
|
+
mensagem: z11.string().optional().nullable(),
|
|
1190
|
+
contrato: z11.number(),
|
|
1191
|
+
contrato_status: z11.string()
|
|
992
1192
|
})
|
|
993
1193
|
});
|
|
994
1194
|
var statusChangedInvariants = [
|
|
@@ -1006,34 +1206,33 @@ var contractsUpdateStatus = {
|
|
|
1006
1206
|
encoding: "json",
|
|
1007
1207
|
repeatable: false,
|
|
1008
1208
|
write: { knownRejections: [statusNotChanged] },
|
|
1009
|
-
buildRequest:
|
|
1209
|
+
buildRequest: buildRequest9,
|
|
1010
1210
|
decode: tolerantDecoder(statusChangedSchema, statusChangedInvariants),
|
|
1011
1211
|
sensitivity: contractsUpdateStatusSensitivity
|
|
1012
1212
|
};
|
|
1013
1213
|
|
|
1014
1214
|
// src/operations/coverage-check.ts
|
|
1015
|
-
import { z as
|
|
1016
|
-
var coverageCheckInputSchema =
|
|
1017
|
-
gateway:
|
|
1018
|
-
raio:
|
|
1019
|
-
coordenada:
|
|
1215
|
+
import { z as z12 } from "zod";
|
|
1216
|
+
var coverageCheckInputSchema = z12.strictObject({
|
|
1217
|
+
gateway: z12.number().int().positive(),
|
|
1218
|
+
raio: z12.number().nonnegative(),
|
|
1219
|
+
coordenada: z12.string().min(1)
|
|
1020
1220
|
});
|
|
1021
|
-
var
|
|
1221
|
+
var buildRequest10 = (input) => {
|
|
1022
1222
|
const parsed = coverageCheckInputSchema.safeParse(input);
|
|
1023
1223
|
if (!parsed.success)
|
|
1024
1224
|
return { ok: false, problem: "invalid coverage.check input" };
|
|
1025
1225
|
const { gateway, raio, coordenada } = parsed.data;
|
|
1026
1226
|
return { ok: true, params: { gateway, raio, coordenada } };
|
|
1027
1227
|
};
|
|
1028
|
-
var
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
nome: z9.string().optional().nullable()
|
|
1228
|
+
var ctoSchema = z12.looseObject({
|
|
1229
|
+
lat: normalizedNumber.optional(),
|
|
1230
|
+
lng: normalizedNumber.optional(),
|
|
1231
|
+
distancia: normalizedNumber.optional(),
|
|
1232
|
+
id: normalizedNumber.optional(),
|
|
1233
|
+
nome: z12.string().optional().nullable()
|
|
1035
1234
|
});
|
|
1036
|
-
var ctoListDecoder = tolerantDecoder(
|
|
1235
|
+
var ctoListDecoder = tolerantDecoder(z12.array(ctoSchema), []);
|
|
1037
1236
|
var setOwn = (target, key, value) => {
|
|
1038
1237
|
Object.defineProperty(target, key, {
|
|
1039
1238
|
value,
|
|
@@ -1043,7 +1242,7 @@ var setOwn = (target, key, value) => {
|
|
|
1043
1242
|
});
|
|
1044
1243
|
};
|
|
1045
1244
|
var failed = (...issues) => ({ ok: false, issues });
|
|
1046
|
-
var
|
|
1245
|
+
var decode2 = (body) => {
|
|
1047
1246
|
if (body.kind !== "json")
|
|
1048
1247
|
return failed("(body)");
|
|
1049
1248
|
const root = body.value;
|
|
@@ -1090,29 +1289,95 @@ var coverageCheck = {
|
|
|
1090
1289
|
method: "GET",
|
|
1091
1290
|
pathTemplate: "/api/ura/viabilidadeinstalacao",
|
|
1092
1291
|
encoding: "json",
|
|
1093
|
-
buildRequest:
|
|
1292
|
+
buildRequest: buildRequest10,
|
|
1094
1293
|
repeatable: true,
|
|
1095
|
-
decode,
|
|
1294
|
+
decode: decode2,
|
|
1096
1295
|
sensitivity: coverageCheckSensitivity
|
|
1097
1296
|
};
|
|
1098
1297
|
|
|
1298
|
+
// src/operations/coverage-check-address.ts
|
|
1299
|
+
import { z as z13 } from "zod";
|
|
1300
|
+
var number = z13.union([z13.number().int().nonnegative(), z13.string().min(1)]);
|
|
1301
|
+
var coverageCheckAddressInputSchema = z13.strictObject({
|
|
1302
|
+
cep: z13.string().min(1).optional(),
|
|
1303
|
+
cidade: z13.string().min(1).optional(),
|
|
1304
|
+
logradouro: z13.string().min(1).optional(),
|
|
1305
|
+
bairro: z13.string().min(1).optional(),
|
|
1306
|
+
numero_inicial: number.optional(),
|
|
1307
|
+
numero_final: number.optional()
|
|
1308
|
+
}).refine((filters) => Object.values(filters).some((value) => value !== undefined), {
|
|
1309
|
+
message: "at least one filter is required"
|
|
1310
|
+
});
|
|
1311
|
+
var buildRequest11 = (input) => {
|
|
1312
|
+
const parsed = coverageCheckAddressInputSchema.safeParse(input);
|
|
1313
|
+
if (!parsed.success)
|
|
1314
|
+
return { ok: false, problem: "invalid coverage.checkAddress input" };
|
|
1315
|
+
return { ok: true, params: parsed.data };
|
|
1316
|
+
};
|
|
1317
|
+
var answerSchema = z13.looseObject({
|
|
1318
|
+
viabilidade: z13.boolean().optional().nullable()
|
|
1319
|
+
});
|
|
1320
|
+
var answerInvariants = [];
|
|
1321
|
+
var coverageCheckAddressSensitivity = {
|
|
1322
|
+
input: [
|
|
1323
|
+
{
|
|
1324
|
+
path: "",
|
|
1325
|
+
secretKeys: [],
|
|
1326
|
+
personalKeys: ["cep", "cidade", "logradouro", "bairro", "numero_inicial", "numero_final"]
|
|
1327
|
+
}
|
|
1328
|
+
],
|
|
1329
|
+
output: []
|
|
1330
|
+
};
|
|
1331
|
+
var coverageCheckAddress = {
|
|
1332
|
+
name: "coverage.checkAddress",
|
|
1333
|
+
method: "POST",
|
|
1334
|
+
pathTemplate: "/api/ura/viabilidade/",
|
|
1335
|
+
encoding: "form",
|
|
1336
|
+
buildRequest: buildRequest11,
|
|
1337
|
+
repeatable: true,
|
|
1338
|
+
decode: tolerantDecoder(answerSchema, answerInvariants),
|
|
1339
|
+
sensitivity: coverageCheckAddressSensitivity
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
// src/operations/coverage-list-gateways.ts
|
|
1343
|
+
import { z as z14 } from "zod";
|
|
1344
|
+
var gatewaySchema = z14.looseObject({
|
|
1345
|
+
id: z14.number(),
|
|
1346
|
+
descricao: z14.string(),
|
|
1347
|
+
gateway: z14.string().optional().nullable()
|
|
1348
|
+
});
|
|
1349
|
+
var gatewaysSchema = z14.array(gatewaySchema);
|
|
1350
|
+
var gatewaysInvariants = ["[].id", "[].descricao"];
|
|
1351
|
+
var buildRequest12 = () => ({ ok: true });
|
|
1352
|
+
var coverageListGatewaysSensitivity = { input: [], output: [] };
|
|
1353
|
+
var coverageListGateways = {
|
|
1354
|
+
name: "coverage.listGateways",
|
|
1355
|
+
method: "GET",
|
|
1356
|
+
pathTemplate: "/api/ura/listgatewaymapa",
|
|
1357
|
+
encoding: "json",
|
|
1358
|
+
buildRequest: buildRequest12,
|
|
1359
|
+
repeatable: true,
|
|
1360
|
+
decode: tolerantDecoder(gatewaysSchema, gatewaysInvariants),
|
|
1361
|
+
sensitivity: coverageListGatewaysSensitivity
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1099
1364
|
// src/operations/crm-contracts-create.ts
|
|
1100
|
-
import { z as
|
|
1365
|
+
import { z as z17 } from "zod";
|
|
1101
1366
|
|
|
1102
1367
|
// src/address.ts
|
|
1103
|
-
import { z as
|
|
1368
|
+
import { z as z15 } from "zod";
|
|
1104
1369
|
var addressShape = {
|
|
1105
|
-
logradouro:
|
|
1106
|
-
numero:
|
|
1107
|
-
complemento:
|
|
1108
|
-
bairro:
|
|
1109
|
-
cidade:
|
|
1110
|
-
cep:
|
|
1111
|
-
uf:
|
|
1112
|
-
pais:
|
|
1113
|
-
pontoreferencia:
|
|
1114
|
-
map_ll:
|
|
1115
|
-
condominio:
|
|
1370
|
+
logradouro: z15.string().optional(),
|
|
1371
|
+
numero: z15.union([z15.string(), z15.number()]).optional(),
|
|
1372
|
+
complemento: z15.string().optional(),
|
|
1373
|
+
bairro: z15.string().optional(),
|
|
1374
|
+
cidade: z15.string().optional(),
|
|
1375
|
+
cep: z15.string().optional(),
|
|
1376
|
+
uf: z15.string().optional(),
|
|
1377
|
+
pais: z15.string().optional(),
|
|
1378
|
+
pontoreferencia: z15.string().optional(),
|
|
1379
|
+
map_ll: z15.string().optional(),
|
|
1380
|
+
condominio: z15.union([z15.string(), z15.number()]).optional()
|
|
1116
1381
|
};
|
|
1117
1382
|
var flatAddress = (address) => {
|
|
1118
1383
|
const flat = {};
|
|
@@ -1124,11 +1389,11 @@ var flatAddress = (address) => {
|
|
|
1124
1389
|
};
|
|
1125
1390
|
|
|
1126
1391
|
// src/validation.ts
|
|
1127
|
-
import { z as
|
|
1128
|
-
var nonBlank =
|
|
1392
|
+
import { z as z16 } from "zod";
|
|
1393
|
+
var nonBlank = z16.string().refine((value) => value.trim() !== "", "blank");
|
|
1129
1394
|
|
|
1130
1395
|
// src/operations/crm-contracts-create.ts
|
|
1131
|
-
var addressSchema =
|
|
1396
|
+
var addressSchema = z17.strictObject({
|
|
1132
1397
|
...addressShape,
|
|
1133
1398
|
logradouro: nonBlank,
|
|
1134
1399
|
bairro: nonBlank,
|
|
@@ -1137,9 +1402,9 @@ var addressSchema = z12.strictObject({
|
|
|
1137
1402
|
uf: nonBlank
|
|
1138
1403
|
});
|
|
1139
1404
|
var customerId = customerIdSchema.int().positive();
|
|
1140
|
-
var id3 =
|
|
1141
|
-
var amount =
|
|
1142
|
-
var crmContractsCreateInputSchema =
|
|
1405
|
+
var id3 = z17.number().int().nonnegative();
|
|
1406
|
+
var amount = z17.number().nonnegative();
|
|
1407
|
+
var crmContractsCreateInputSchema = z17.strictObject({
|
|
1143
1408
|
cliente_id: customerId,
|
|
1144
1409
|
pop_id: id3,
|
|
1145
1410
|
plano_id: id3.brand(),
|
|
@@ -1148,33 +1413,33 @@ var crmContractsCreateInputSchema = z12.strictObject({
|
|
|
1148
1413
|
vencimento_dia: id3,
|
|
1149
1414
|
endereco_instalacao: addressSchema,
|
|
1150
1415
|
endereco_cobranca: addressSchema,
|
|
1151
|
-
login:
|
|
1152
|
-
senha:
|
|
1153
|
-
modoaquisicao:
|
|
1154
|
-
nas:
|
|
1416
|
+
login: z17.string().optional(),
|
|
1417
|
+
senha: z17.string().optional(),
|
|
1418
|
+
modoaquisicao: z17.union([z17.literal(0), z17.literal(1)]).optional(),
|
|
1419
|
+
nas: z17.string().optional(),
|
|
1155
1420
|
isento: amount.optional(),
|
|
1156
|
-
autocobranca:
|
|
1157
|
-
servicodesc:
|
|
1158
|
-
observacao:
|
|
1421
|
+
autocobranca: z17.boolean().optional(),
|
|
1422
|
+
servicodesc: z17.string().optional(),
|
|
1423
|
+
observacao: z17.string().optional(),
|
|
1159
1424
|
vendedor_id: id3.optional(),
|
|
1160
|
-
comissao_tipo:
|
|
1425
|
+
comissao_tipo: z17.union([z17.literal(1), z17.literal(2)]).optional(),
|
|
1161
1426
|
comissao: amount.optional(),
|
|
1162
1427
|
contrato_id: id3.optional(),
|
|
1163
1428
|
fidelidade_id: id3.optional(),
|
|
1164
1429
|
midia_id: id3.optional(),
|
|
1165
|
-
central_login:
|
|
1166
|
-
central_senha:
|
|
1167
|
-
ip:
|
|
1430
|
+
central_login: z17.string().optional(),
|
|
1431
|
+
central_senha: z17.string().optional(),
|
|
1432
|
+
ip: z17.string().optional(),
|
|
1168
1433
|
ippool_id: id3.optional(),
|
|
1169
|
-
mac_dhcp:
|
|
1170
|
-
mac:
|
|
1434
|
+
mac_dhcp: z17.string().optional(),
|
|
1435
|
+
mac: z17.string().optional(),
|
|
1171
1436
|
logins_simult: id3.optional(),
|
|
1172
1437
|
splitter_id: id3.optional(),
|
|
1173
1438
|
splitter_port: id3.optional(),
|
|
1174
|
-
tipo_equipamento:
|
|
1439
|
+
tipo_equipamento: z17.string().optional(),
|
|
1175
1440
|
usuarioalt_id: id3.optional(),
|
|
1176
|
-
os_instalacao:
|
|
1177
|
-
conteudo:
|
|
1441
|
+
os_instalacao: z17.boolean().optional(),
|
|
1442
|
+
conteudo: z17.string().optional(),
|
|
1178
1443
|
instalacao_quantidade_parcelas: id3.optional(),
|
|
1179
1444
|
instalacao_preco: amount.optional(),
|
|
1180
1445
|
instalacao_desconto: amount.optional(),
|
|
@@ -1196,17 +1461,17 @@ var crmContractBody = ({
|
|
|
1196
1461
|
...installation
|
|
1197
1462
|
};
|
|
1198
1463
|
};
|
|
1199
|
-
var
|
|
1464
|
+
var buildRequest13 = (input) => {
|
|
1200
1465
|
const parsed = crmContractsCreateInputSchema.safeParse(input);
|
|
1201
1466
|
if (!parsed.success)
|
|
1202
1467
|
return { ok: false, problem: "invalid crm.contracts.create input" };
|
|
1203
1468
|
const { cliente_id, ...contract } = parsed.data;
|
|
1204
1469
|
return { ok: true, pathParams: { cliente_id }, params: crmContractBody(contract) };
|
|
1205
1470
|
};
|
|
1206
|
-
var crmContractCreatedSchema =
|
|
1207
|
-
message:
|
|
1208
|
-
clientecontrato:
|
|
1209
|
-
cliente:
|
|
1471
|
+
var crmContractCreatedSchema = z17.looseObject({
|
|
1472
|
+
message: z17.string().optional().nullable(),
|
|
1473
|
+
clientecontrato: z17.number(),
|
|
1474
|
+
cliente: z17.string().optional().nullable()
|
|
1210
1475
|
});
|
|
1211
1476
|
var crmContractCreatedInvariants = ["clientecontrato"];
|
|
1212
1477
|
var CUSTOMER_NOT_IN_CRM_TEXT = /^ocorreu um erro: não encontrado cliente crm com id \d+\.?$/i;
|
|
@@ -1234,14 +1499,14 @@ var crmContractsCreate = {
|
|
|
1234
1499
|
encoding: "json",
|
|
1235
1500
|
repeatable: false,
|
|
1236
1501
|
write: { knownRejections: [customerNotInCrm] },
|
|
1237
|
-
buildRequest:
|
|
1502
|
+
buildRequest: buildRequest13,
|
|
1238
1503
|
decode: tolerantDecoder(crmContractCreatedSchema, crmContractCreatedInvariants),
|
|
1239
1504
|
sensitivity: crmContractsCreateSensitivity
|
|
1240
1505
|
};
|
|
1241
1506
|
|
|
1242
1507
|
// src/operations/crm-contracts-create-by-cpf-cnpj.ts
|
|
1243
1508
|
var crmContractsCreateByCpfCnpjInputSchema = crmContractsCreateInputSchema.omit({ cliente_id: true }).extend({ cpfcnpj: nonBlank });
|
|
1244
|
-
var
|
|
1509
|
+
var buildRequest14 = (input) => {
|
|
1245
1510
|
const parsed = crmContractsCreateByCpfCnpjInputSchema.safeParse(input);
|
|
1246
1511
|
if (!parsed.success) {
|
|
1247
1512
|
return { ok: false, problem: "invalid crm.contracts.createByCpfCnpj input" };
|
|
@@ -1265,45 +1530,45 @@ var crmContractsCreateByCpfCnpj = {
|
|
|
1265
1530
|
encoding: "json",
|
|
1266
1531
|
repeatable: false,
|
|
1267
1532
|
write: { knownRejections: [customerNotInCrm2] },
|
|
1268
|
-
buildRequest:
|
|
1533
|
+
buildRequest: buildRequest14,
|
|
1269
1534
|
decode: tolerantDecoder(crmContractCreatedSchema, crmContractCreatedInvariants),
|
|
1270
1535
|
sensitivity: crmContractsCreateByCpfCnpjSensitivity
|
|
1271
1536
|
};
|
|
1272
1537
|
|
|
1273
1538
|
// src/operations/crm-contracts-list.ts
|
|
1274
|
-
import { z as
|
|
1275
|
-
var crmContractsListInputSchema =
|
|
1276
|
-
var
|
|
1539
|
+
import { z as z18 } from "zod";
|
|
1540
|
+
var crmContractsListInputSchema = z18.strictObject({ cpfcnpj: nonBlank });
|
|
1541
|
+
var buildRequest15 = (input) => {
|
|
1277
1542
|
const parsed = crmContractsListInputSchema.safeParse(input);
|
|
1278
1543
|
if (!parsed.success)
|
|
1279
1544
|
return { ok: false, problem: "invalid crm.contracts.list input" };
|
|
1280
1545
|
return { ok: true, params: parsed.data };
|
|
1281
1546
|
};
|
|
1282
|
-
var serviceSchema =
|
|
1283
|
-
plano:
|
|
1284
|
-
login:
|
|
1285
|
-
contrato_tipo:
|
|
1286
|
-
situacao:
|
|
1287
|
-
aquisicao:
|
|
1288
|
-
});
|
|
1289
|
-
var contractSchema =
|
|
1290
|
-
cliente_contrato_id:
|
|
1291
|
-
data_cadastro:
|
|
1292
|
-
vencimento_dia:
|
|
1293
|
-
pop:
|
|
1294
|
-
endereco:
|
|
1295
|
-
forma_cobranca:
|
|
1296
|
-
status:
|
|
1297
|
-
data_status:
|
|
1298
|
-
modo_status:
|
|
1299
|
-
motivo_status:
|
|
1300
|
-
vendedor:
|
|
1301
|
-
servicos:
|
|
1302
|
-
});
|
|
1303
|
-
var contractsSchema2 =
|
|
1304
|
-
cliente:
|
|
1305
|
-
cpf_cnpj:
|
|
1306
|
-
contratos:
|
|
1547
|
+
var serviceSchema = z18.looseObject({
|
|
1548
|
+
plano: z18.string().optional().nullable(),
|
|
1549
|
+
login: z18.string().optional().nullable(),
|
|
1550
|
+
contrato_tipo: z18.string().optional().nullable(),
|
|
1551
|
+
situacao: z18.string().optional().nullable(),
|
|
1552
|
+
aquisicao: z18.string().optional().nullable()
|
|
1553
|
+
});
|
|
1554
|
+
var contractSchema = z18.looseObject({
|
|
1555
|
+
cliente_contrato_id: z18.number(),
|
|
1556
|
+
data_cadastro: z18.string().optional().nullable(),
|
|
1557
|
+
vencimento_dia: z18.number().optional().nullable(),
|
|
1558
|
+
pop: z18.string().optional().nullable(),
|
|
1559
|
+
endereco: z18.string().optional().nullable(),
|
|
1560
|
+
forma_cobranca: z18.string().optional().nullable(),
|
|
1561
|
+
status: z18.string().optional().nullable(),
|
|
1562
|
+
data_status: z18.string().optional().nullable(),
|
|
1563
|
+
modo_status: z18.string().optional().nullable(),
|
|
1564
|
+
motivo_status: z18.string().optional().nullable(),
|
|
1565
|
+
vendedor: z18.string().optional().nullable(),
|
|
1566
|
+
servicos: z18.array(serviceSchema).optional().nullable()
|
|
1567
|
+
});
|
|
1568
|
+
var contractsSchema2 = z18.looseObject({
|
|
1569
|
+
cliente: z18.string().optional().nullable(),
|
|
1570
|
+
cpf_cnpj: z18.string().optional().nullable(),
|
|
1571
|
+
contratos: z18.array(contractSchema)
|
|
1307
1572
|
});
|
|
1308
1573
|
var contractsInvariants2 = ["contratos", "contratos[].cliente_contrato_id"];
|
|
1309
1574
|
var crmContractsListSensitivity = {
|
|
@@ -1323,15 +1588,48 @@ var crmContractsList = {
|
|
|
1323
1588
|
method: "GET",
|
|
1324
1589
|
pathTemplate: "/api/crm/cliente/contratos/",
|
|
1325
1590
|
encoding: "json",
|
|
1326
|
-
buildRequest:
|
|
1591
|
+
buildRequest: buildRequest15,
|
|
1327
1592
|
repeatable: true,
|
|
1328
1593
|
decode: tolerantDecoder(contractsSchema2, contractsInvariants2),
|
|
1329
1594
|
sensitivity: crmContractsListSensitivity
|
|
1330
1595
|
};
|
|
1331
1596
|
|
|
1332
1597
|
// src/operations/crm-customers-create.ts
|
|
1333
|
-
import { z as
|
|
1334
|
-
|
|
1598
|
+
import { z as z20 } from "zod";
|
|
1599
|
+
|
|
1600
|
+
// src/document.ts
|
|
1601
|
+
import { z as z19 } from "zod";
|
|
1602
|
+
var CPF = /^(\d{3})(\d{3})(\d{3})(\d{2})$/;
|
|
1603
|
+
var CNPJ = /^([0-9A-Za-z]{2})([0-9A-Za-z]{3})([0-9A-Za-z]{3})([0-9A-Za-z]{4})(\d{2})$/;
|
|
1604
|
+
var EXPECTED = {
|
|
1605
|
+
F: "expected a CPF for personType F: 11 digits, with or without . - / and spaces (999.999.999-99)",
|
|
1606
|
+
J: "expected a CNPJ for personType J: 12 letters or digits followed by 2 digits, with or without . - / and spaces (AA.AAA.AAA/AAAA-99)"
|
|
1607
|
+
};
|
|
1608
|
+
var withoutPunctuation = (value) => value.replace(/[.\-/ ]/g, "");
|
|
1609
|
+
var canonicalCpf = (value) => {
|
|
1610
|
+
const parts = CPF.exec(withoutPunctuation(value));
|
|
1611
|
+
return parts ? `${parts[1]}.${parts[2]}.${parts[3]}-${parts[4]}` : undefined;
|
|
1612
|
+
};
|
|
1613
|
+
var canonicalCnpj = (value) => {
|
|
1614
|
+
const parts = CNPJ.exec(withoutPunctuation(value));
|
|
1615
|
+
return parts ? `${parts[1]}.${parts[2]}.${parts[3]}/${parts[4]}-${parts[5]}`.toUpperCase() : undefined;
|
|
1616
|
+
};
|
|
1617
|
+
var storedDocument = (canonical, expected) => z19.string({ error: expected }).transform((value, ctx) => {
|
|
1618
|
+
const formatted = canonical(value);
|
|
1619
|
+
if (formatted !== undefined)
|
|
1620
|
+
return formatted;
|
|
1621
|
+
ctx.issues.push({ code: "custom", message: expected, input: value });
|
|
1622
|
+
return z19.NEVER;
|
|
1623
|
+
});
|
|
1624
|
+
var storedCpfSchema = storedDocument(canonicalCpf, EXPECTED.F);
|
|
1625
|
+
var storedCnpjSchema = storedDocument(canonicalCnpj, EXPECTED.J);
|
|
1626
|
+
var documentIssues = (error) => {
|
|
1627
|
+
const broken = error.issues.find((issue) => issue.path[0] === "cpfcnpj");
|
|
1628
|
+
return broken ? [`cpfcnpj: ${broken.message}`] : undefined;
|
|
1629
|
+
};
|
|
1630
|
+
|
|
1631
|
+
// src/operations/crm-customers-create.ts
|
|
1632
|
+
var crmCustomerAddressSchema = z20.strictObject({
|
|
1335
1633
|
...addressShape,
|
|
1336
1634
|
logradouro: nonBlank,
|
|
1337
1635
|
bairro: nonBlank,
|
|
@@ -1339,53 +1637,77 @@ var crmCustomerAddressSchema = z14.strictObject({
|
|
|
1339
1637
|
cep: nonBlank,
|
|
1340
1638
|
uf: nonBlank
|
|
1341
1639
|
});
|
|
1342
|
-
var commonShape = {
|
|
1640
|
+
var commonShape = (document) => ({
|
|
1343
1641
|
nome: nonBlank,
|
|
1344
|
-
cpfcnpj:
|
|
1642
|
+
cpfcnpj: document,
|
|
1345
1643
|
endereco: crmCustomerAddressSchema,
|
|
1346
|
-
email:
|
|
1347
|
-
celular:
|
|
1348
|
-
observacao:
|
|
1349
|
-
};
|
|
1350
|
-
var crmCustomersCreateInputSchema =
|
|
1351
|
-
|
|
1352
|
-
personType:
|
|
1353
|
-
...commonShape,
|
|
1354
|
-
datanasc:
|
|
1355
|
-
rg:
|
|
1356
|
-
rg_emissor:
|
|
1357
|
-
sexo:
|
|
1358
|
-
estadocivil:
|
|
1359
|
-
nomemae:
|
|
1360
|
-
nomepai:
|
|
1361
|
-
profissao:
|
|
1362
|
-
nacionalidade:
|
|
1363
|
-
naturalidade:
|
|
1644
|
+
email: z20.string().optional(),
|
|
1645
|
+
celular: z20.string().optional(),
|
|
1646
|
+
observacao: z20.string().optional()
|
|
1647
|
+
});
|
|
1648
|
+
var crmCustomersCreateInputSchema = z20.discriminatedUnion("personType", [
|
|
1649
|
+
z20.strictObject({
|
|
1650
|
+
personType: z20.literal("F"),
|
|
1651
|
+
...commonShape(storedCpfSchema),
|
|
1652
|
+
datanasc: z20.string().optional(),
|
|
1653
|
+
rg: z20.string().optional(),
|
|
1654
|
+
rg_emissor: z20.string().optional(),
|
|
1655
|
+
sexo: z20.enum(["M", "F"]).optional(),
|
|
1656
|
+
estadocivil: z20.enum(["C", "S", "V", "D"]).optional(),
|
|
1657
|
+
nomemae: z20.string().optional(),
|
|
1658
|
+
nomepai: z20.string().optional(),
|
|
1659
|
+
profissao: z20.string().optional(),
|
|
1660
|
+
nacionalidade: z20.string().optional(),
|
|
1661
|
+
naturalidade: z20.string().optional()
|
|
1364
1662
|
}),
|
|
1365
|
-
|
|
1366
|
-
personType:
|
|
1367
|
-
...commonShape,
|
|
1368
|
-
nomefantasia:
|
|
1369
|
-
respempresa:
|
|
1370
|
-
respcpf:
|
|
1371
|
-
insc_estadual:
|
|
1372
|
-
insc_municipal:
|
|
1373
|
-
datafundacao:
|
|
1663
|
+
z20.strictObject({
|
|
1664
|
+
personType: z20.literal("J"),
|
|
1665
|
+
...commonShape(storedCnpjSchema),
|
|
1666
|
+
nomefantasia: z20.string().optional(),
|
|
1667
|
+
respempresa: z20.string().optional(),
|
|
1668
|
+
respcpf: z20.string().optional(),
|
|
1669
|
+
insc_estadual: z20.string().optional(),
|
|
1670
|
+
insc_municipal: z20.string().optional(),
|
|
1671
|
+
datafundacao: z20.string().optional()
|
|
1374
1672
|
})
|
|
1375
1673
|
]);
|
|
1376
|
-
var
|
|
1674
|
+
var buildRequest16 = (input) => {
|
|
1377
1675
|
const parsed = crmCustomersCreateInputSchema.safeParse(input);
|
|
1378
|
-
if (!parsed.success)
|
|
1379
|
-
return {
|
|
1676
|
+
if (!parsed.success) {
|
|
1677
|
+
return {
|
|
1678
|
+
ok: false,
|
|
1679
|
+
problem: "invalid crm.customers.create input",
|
|
1680
|
+
issues: documentIssues(parsed.error)
|
|
1681
|
+
};
|
|
1682
|
+
}
|
|
1380
1683
|
const { personType, endereco, ...fields } = parsed.data;
|
|
1381
1684
|
const flat = flatAddress(endereco);
|
|
1382
1685
|
return { ok: true, pathParams: { personType }, params: { ...fields, endereco: flat, ...flat } };
|
|
1383
1686
|
};
|
|
1384
|
-
var createdSchema =
|
|
1687
|
+
var createdSchema = z20.looseObject({
|
|
1385
1688
|
cliente_id: customerIdSchema,
|
|
1386
|
-
message:
|
|
1689
|
+
message: z20.string().optional().nullable()
|
|
1387
1690
|
});
|
|
1388
1691
|
var createdInvariants = ["cliente_id"];
|
|
1692
|
+
var DOCUMENT_ALREADY_REGISTERED_TEXT = /^já existe um cliente com o cpf informado\.?$/i;
|
|
1693
|
+
var DOCUMENT_INVALID_TEXT = /^cpf inválido\.?$/i;
|
|
1694
|
+
var cpfcnpjFieldRejection = (text, reason) => ({
|
|
1695
|
+
status: 400,
|
|
1696
|
+
reason,
|
|
1697
|
+
matches: (body) => {
|
|
1698
|
+
if (body.kind !== "json" || !isRecord(body.value))
|
|
1699
|
+
return false;
|
|
1700
|
+
if (Object.keys(body.value).length !== 1)
|
|
1701
|
+
return false;
|
|
1702
|
+
const { errors } = body.value;
|
|
1703
|
+
if (!isRecord(errors) || Object.keys(errors).length !== 1)
|
|
1704
|
+
return false;
|
|
1705
|
+
const { cpfcnpj } = errors;
|
|
1706
|
+
return typeof cpfcnpj === "string" && text.test(cpfcnpj.trim());
|
|
1707
|
+
}
|
|
1708
|
+
});
|
|
1709
|
+
var documentAlreadyRegistered = cpfcnpjFieldRejection(DOCUMENT_ALREADY_REGISTERED_TEXT, "DOCUMENT_ALREADY_REGISTERED");
|
|
1710
|
+
var documentInvalid = cpfcnpjFieldRejection(DOCUMENT_INVALID_TEXT, "DOCUMENT_INVALID");
|
|
1389
1711
|
var crmCustomersCreateSensitivity = {
|
|
1390
1712
|
input: [
|
|
1391
1713
|
{
|
|
@@ -1425,33 +1747,33 @@ var crmCustomersCreate = {
|
|
|
1425
1747
|
pathTemplate: "/api/crm/cliente/{personType}",
|
|
1426
1748
|
encoding: "json",
|
|
1427
1749
|
repeatable: false,
|
|
1428
|
-
write: {},
|
|
1429
|
-
buildRequest:
|
|
1750
|
+
write: { knownRejections: [documentAlreadyRegistered, documentInvalid] },
|
|
1751
|
+
buildRequest: buildRequest16,
|
|
1430
1752
|
decode: tolerantDecoder(createdSchema, createdInvariants),
|
|
1431
1753
|
sensitivity: crmCustomersCreateSensitivity
|
|
1432
1754
|
};
|
|
1433
1755
|
|
|
1434
1756
|
// src/operations/crm-customers-update-status.ts
|
|
1435
|
-
import { z as
|
|
1757
|
+
import { z as z21 } from "zod";
|
|
1436
1758
|
var customerId2 = customerIdSchema.int().positive();
|
|
1437
|
-
var crmCustomersUpdateStatusInputSchema =
|
|
1759
|
+
var crmCustomersUpdateStatusInputSchema = z21.strictObject({
|
|
1438
1760
|
cliente_id: customerId2,
|
|
1439
|
-
status_id:
|
|
1440
|
-
motivo:
|
|
1761
|
+
status_id: z21.number().int().nonnegative(),
|
|
1762
|
+
motivo: z21.string().optional()
|
|
1441
1763
|
});
|
|
1442
|
-
var
|
|
1764
|
+
var buildRequest17 = (input) => {
|
|
1443
1765
|
const parsed = crmCustomersUpdateStatusInputSchema.safeParse(input);
|
|
1444
1766
|
if (!parsed.success)
|
|
1445
1767
|
return { ok: false, problem: "invalid crm.customers.updateStatus input" };
|
|
1446
1768
|
const { cliente_id, ...fields } = parsed.data;
|
|
1447
1769
|
return { ok: true, pathParams: { cliente_id }, params: fields };
|
|
1448
1770
|
};
|
|
1449
|
-
var statusUpdatedSchema =
|
|
1771
|
+
var statusUpdatedSchema = z21.looseObject({
|
|
1450
1772
|
cliente_id: customerIdSchema,
|
|
1451
|
-
message:
|
|
1452
|
-
novo_status:
|
|
1453
|
-
codigo:
|
|
1454
|
-
descricao:
|
|
1773
|
+
message: z21.string().optional().nullable(),
|
|
1774
|
+
novo_status: z21.looseObject({
|
|
1775
|
+
codigo: z21.number(),
|
|
1776
|
+
descricao: z21.string().optional().nullable()
|
|
1455
1777
|
})
|
|
1456
1778
|
});
|
|
1457
1779
|
var statusUpdatedInvariants = ["cliente_id", "novo_status", "novo_status.codigo"];
|
|
@@ -1466,67 +1788,67 @@ var crmCustomersUpdateStatus = {
|
|
|
1466
1788
|
encoding: "json",
|
|
1467
1789
|
repeatable: false,
|
|
1468
1790
|
write: {},
|
|
1469
|
-
buildRequest:
|
|
1791
|
+
buildRequest: buildRequest17,
|
|
1470
1792
|
decode: tolerantDecoder(statusUpdatedSchema, statusUpdatedInvariants),
|
|
1471
1793
|
sensitivity: crmCustomersUpdateStatusSensitivity
|
|
1472
1794
|
};
|
|
1473
1795
|
|
|
1474
1796
|
// src/operations/customers-list.ts
|
|
1475
|
-
import { z as
|
|
1476
|
-
var addressSchema2 =
|
|
1477
|
-
logradouro:
|
|
1478
|
-
numero:
|
|
1479
|
-
bairro:
|
|
1480
|
-
cidade:
|
|
1481
|
-
uf:
|
|
1482
|
-
cep:
|
|
1483
|
-
complemento:
|
|
1484
|
-
latitude:
|
|
1485
|
-
longitude:
|
|
1486
|
-
});
|
|
1487
|
-
var planSchema =
|
|
1488
|
-
id:
|
|
1489
|
-
descricao:
|
|
1490
|
-
});
|
|
1491
|
-
var serviceSchema2 =
|
|
1492
|
-
id:
|
|
1493
|
-
tipo:
|
|
1797
|
+
import { z as z22 } from "zod";
|
|
1798
|
+
var addressSchema2 = z22.looseObject({
|
|
1799
|
+
logradouro: z22.string().optional().nullable(),
|
|
1800
|
+
numero: z22.union([z22.number(), z22.string()]).optional().nullable(),
|
|
1801
|
+
bairro: z22.string().optional().nullable(),
|
|
1802
|
+
cidade: z22.string().optional().nullable(),
|
|
1803
|
+
uf: z22.string().optional().nullable(),
|
|
1804
|
+
cep: z22.string().optional().nullable(),
|
|
1805
|
+
complemento: z22.string().optional().nullable(),
|
|
1806
|
+
latitude: z22.string().optional().nullable(),
|
|
1807
|
+
longitude: z22.string().optional().nullable()
|
|
1808
|
+
});
|
|
1809
|
+
var planSchema = z22.looseObject({
|
|
1810
|
+
id: z22.number().brand(),
|
|
1811
|
+
descricao: z22.string().optional().nullable()
|
|
1812
|
+
});
|
|
1813
|
+
var serviceSchema2 = z22.looseObject({
|
|
1814
|
+
id: z22.number(),
|
|
1815
|
+
tipo: z22.string().optional().nullable(),
|
|
1494
1816
|
plano: planSchema.optional().nullable(),
|
|
1495
|
-
status:
|
|
1817
|
+
status: z22.string().optional().nullable(),
|
|
1496
1818
|
endereco: addressSchema2.optional().nullable()
|
|
1497
1819
|
});
|
|
1498
|
-
var contractSchema2 =
|
|
1499
|
-
id:
|
|
1500
|
-
status:
|
|
1820
|
+
var contractSchema2 = z22.looseObject({
|
|
1821
|
+
id: z22.number(),
|
|
1822
|
+
status: z22.string().optional().nullable(),
|
|
1501
1823
|
endereco: addressSchema2.optional().nullable(),
|
|
1502
|
-
servicos:
|
|
1824
|
+
servicos: z22.array(serviceSchema2).optional().nullable()
|
|
1503
1825
|
});
|
|
1504
|
-
var contactsSchema =
|
|
1505
|
-
telefones:
|
|
1506
|
-
celulares:
|
|
1507
|
-
emails:
|
|
1508
|
-
outros:
|
|
1826
|
+
var contactsSchema = z22.looseObject({
|
|
1827
|
+
telefones: z22.array(z22.string()).optional().nullable(),
|
|
1828
|
+
celulares: z22.array(z22.string()).optional().nullable(),
|
|
1829
|
+
emails: z22.array(z22.string()).optional().nullable(),
|
|
1830
|
+
outros: z22.array(z22.unknown()).optional().nullable()
|
|
1509
1831
|
});
|
|
1510
|
-
var customerSchema =
|
|
1832
|
+
var customerSchema = z22.looseObject({
|
|
1511
1833
|
id: customerIdSchema,
|
|
1512
|
-
nome:
|
|
1513
|
-
tipo:
|
|
1514
|
-
cpfcnpj:
|
|
1515
|
-
sexo:
|
|
1516
|
-
dataCadastro:
|
|
1834
|
+
nome: z22.string(),
|
|
1835
|
+
tipo: z22.string(),
|
|
1836
|
+
cpfcnpj: z22.string(),
|
|
1837
|
+
sexo: z22.string().optional().nullable(),
|
|
1838
|
+
dataCadastro: z22.string().optional().nullable(),
|
|
1517
1839
|
endereco: addressSchema2.optional().nullable(),
|
|
1518
|
-
contratos:
|
|
1519
|
-
titulos:
|
|
1840
|
+
contratos: z22.array(contractSchema2).optional().nullable(),
|
|
1841
|
+
titulos: z22.array(z22.looseObject({})).optional().nullable(),
|
|
1520
1842
|
contatos: contactsSchema.optional().nullable()
|
|
1521
1843
|
});
|
|
1522
|
-
var pageSchema =
|
|
1523
|
-
paginacao:
|
|
1524
|
-
offset:
|
|
1525
|
-
limit:
|
|
1526
|
-
parcial:
|
|
1527
|
-
total:
|
|
1844
|
+
var pageSchema = z22.looseObject({
|
|
1845
|
+
paginacao: z22.looseObject({
|
|
1846
|
+
offset: z22.number().optional().nullable(),
|
|
1847
|
+
limit: z22.number().optional().nullable(),
|
|
1848
|
+
parcial: z22.number().optional().nullable(),
|
|
1849
|
+
total: z22.number()
|
|
1528
1850
|
}),
|
|
1529
|
-
clientes:
|
|
1851
|
+
clientes: z22.array(customerSchema)
|
|
1530
1852
|
});
|
|
1531
1853
|
var pageInvariants = [
|
|
1532
1854
|
"paginacao",
|
|
@@ -1540,21 +1862,22 @@ var pageInvariants = [
|
|
|
1540
1862
|
"clientes[].contratos[].servicos[].id",
|
|
1541
1863
|
"clientes[].contratos[].servicos[].plano.id"
|
|
1542
1864
|
];
|
|
1543
|
-
var customersListInputSchema =
|
|
1544
|
-
offset:
|
|
1545
|
-
limit:
|
|
1865
|
+
var customersListInputSchema = z22.strictObject({
|
|
1866
|
+
offset: z22.number().int().nonnegative().optional(),
|
|
1867
|
+
limit: z22.number().int().nonnegative().optional(),
|
|
1546
1868
|
cliente_id: customerIdSchema.int().optional(),
|
|
1547
|
-
cpfcnpj:
|
|
1548
|
-
cliente_nome:
|
|
1869
|
+
cpfcnpj: z22.string().optional(),
|
|
1870
|
+
cliente_nome: z22.string().optional(),
|
|
1871
|
+
login: z22.string().optional()
|
|
1549
1872
|
});
|
|
1550
|
-
var
|
|
1873
|
+
var buildRequest18 = (input) => {
|
|
1551
1874
|
const parsed = customersListInputSchema.safeParse(input);
|
|
1552
1875
|
if (!parsed.success)
|
|
1553
1876
|
return { ok: false, problem: "invalid customers.list input" };
|
|
1554
1877
|
return { ok: true, params: parsed.data };
|
|
1555
1878
|
};
|
|
1556
1879
|
var customersListSensitivity = {
|
|
1557
|
-
input: [{ path: "", secretKeys: [], personalKeys: ["cpfcnpj", "cliente_nome"] }],
|
|
1880
|
+
input: [{ path: "", secretKeys: ["login"], personalKeys: ["cpfcnpj", "cliente_nome"] }],
|
|
1558
1881
|
output: [
|
|
1559
1882
|
{
|
|
1560
1883
|
path: "clientes[]",
|
|
@@ -1588,103 +1911,103 @@ var customersList = {
|
|
|
1588
1911
|
method: "POST",
|
|
1589
1912
|
pathTemplate: "/api/ura/clientes/",
|
|
1590
1913
|
encoding: "json",
|
|
1591
|
-
buildRequest:
|
|
1914
|
+
buildRequest: buildRequest18,
|
|
1592
1915
|
repeatable: true,
|
|
1593
1916
|
decode: tolerantDecoder(pageSchema, pageInvariants),
|
|
1594
1917
|
sensitivity: customersListSensitivity
|
|
1595
1918
|
};
|
|
1596
1919
|
|
|
1597
1920
|
// src/operations/customers-search.ts
|
|
1598
|
-
import { z as
|
|
1599
|
-
var contactSchema =
|
|
1600
|
-
inscricoes:
|
|
1601
|
-
tipoContato:
|
|
1602
|
-
contato:
|
|
1603
|
-
});
|
|
1604
|
-
var tagSchema =
|
|
1605
|
-
color:
|
|
1606
|
-
font:
|
|
1607
|
-
tag:
|
|
1608
|
-
id:
|
|
1609
|
-
categoria_id:
|
|
1610
|
-
});
|
|
1611
|
-
var loyaltySchema =
|
|
1612
|
-
data_inicio:
|
|
1613
|
-
descricao:
|
|
1614
|
-
data_fim:
|
|
1615
|
-
});
|
|
1616
|
-
var candidateSchema =
|
|
1617
|
-
contratoId:
|
|
1921
|
+
import { z as z23 } from "zod";
|
|
1922
|
+
var contactSchema = z23.looseObject({
|
|
1923
|
+
inscricoes: z23.array(z23.string()).optional().nullable(),
|
|
1924
|
+
tipoContato: z23.string().optional().nullable(),
|
|
1925
|
+
contato: z23.string().optional().nullable()
|
|
1926
|
+
});
|
|
1927
|
+
var tagSchema = z23.looseObject({
|
|
1928
|
+
color: z23.string().optional().nullable(),
|
|
1929
|
+
font: z23.string().optional().nullable(),
|
|
1930
|
+
tag: z23.string().optional().nullable(),
|
|
1931
|
+
id: z23.number().optional().nullable(),
|
|
1932
|
+
categoria_id: z23.unknown().optional()
|
|
1933
|
+
});
|
|
1934
|
+
var loyaltySchema = z23.looseObject({
|
|
1935
|
+
data_inicio: z23.string().optional().nullable(),
|
|
1936
|
+
descricao: z23.string().optional().nullable(),
|
|
1937
|
+
data_fim: z23.string().optional().nullable()
|
|
1938
|
+
});
|
|
1939
|
+
var candidateSchema = z23.looseObject({
|
|
1940
|
+
contratoId: z23.number(),
|
|
1618
1941
|
clienteId: customerIdSchema,
|
|
1619
|
-
contratoStatus:
|
|
1620
|
-
contratoStatusDisplay:
|
|
1621
|
-
contratoValorAberto:
|
|
1622
|
-
contratoTitulosAReceber:
|
|
1623
|
-
cobVencimento:
|
|
1624
|
-
contratoStatusModo:
|
|
1625
|
-
motivo_status:
|
|
1626
|
-
dataCadastro:
|
|
1627
|
-
dataAlteracao:
|
|
1628
|
-
popId:
|
|
1629
|
-
popNome:
|
|
1630
|
-
cobPermuta:
|
|
1631
|
-
cobIsento:
|
|
1632
|
-
promessasPagamentoMes:
|
|
1633
|
-
link_quitacao:
|
|
1634
|
-
planointernet:
|
|
1942
|
+
contratoStatus: z23.number().optional().nullable(),
|
|
1943
|
+
contratoStatusDisplay: z23.string().optional().nullable(),
|
|
1944
|
+
contratoValorAberto: z23.number().optional().nullable(),
|
|
1945
|
+
contratoTitulosAReceber: z23.number().optional().nullable(),
|
|
1946
|
+
cobVencimento: z23.number().optional().nullable(),
|
|
1947
|
+
contratoStatusModo: z23.number().optional().nullable(),
|
|
1948
|
+
motivo_status: z23.string().optional().nullable(),
|
|
1949
|
+
dataCadastro: z23.string().optional().nullable(),
|
|
1950
|
+
dataAlteracao: z23.string().optional().nullable(),
|
|
1951
|
+
popId: z23.number().optional().nullable(),
|
|
1952
|
+
popNome: z23.string().optional().nullable(),
|
|
1953
|
+
cobPermuta: z23.boolean().optional().nullable(),
|
|
1954
|
+
cobIsento: z23.number().optional().nullable(),
|
|
1955
|
+
promessasPagamentoMes: z23.number().optional().nullable(),
|
|
1956
|
+
link_quitacao: z23.string().optional().nullable(),
|
|
1957
|
+
planointernet: z23.string().optional().nullable(),
|
|
1635
1958
|
fidelidade: loyaltySchema.optional().nullable(),
|
|
1636
|
-
contrato_unificado_principal:
|
|
1637
|
-
contrato_unificado_filhos:
|
|
1638
|
-
tags:
|
|
1639
|
-
anotacoes:
|
|
1640
|
-
contratoCentralLogin:
|
|
1641
|
-
contratoCentralSenha:
|
|
1642
|
-
servico_login:
|
|
1643
|
-
servico_senha:
|
|
1644
|
-
servico_plano:
|
|
1645
|
-
servico_grupo:
|
|
1646
|
-
servico_tipo_conexao:
|
|
1647
|
-
servico_vlan:
|
|
1648
|
-
servico_mac:
|
|
1649
|
-
servico_mac2:
|
|
1650
|
-
servico_wifi_ssid:
|
|
1651
|
-
servico_wifi_ssid_5:
|
|
1652
|
-
servico_wifi_password:
|
|
1653
|
-
servico_wifi_password_5:
|
|
1654
|
-
servico_wifi_channel:
|
|
1655
|
-
servico_wifi_channel_5:
|
|
1656
|
-
razaoSocial:
|
|
1657
|
-
cpfCnpj:
|
|
1658
|
-
dataNascimento:
|
|
1659
|
-
telefones:
|
|
1660
|
-
telefones_cargos:
|
|
1661
|
-
emails:
|
|
1662
|
-
outros:
|
|
1663
|
-
endereco_logradouro:
|
|
1664
|
-
endereco_numero:
|
|
1665
|
-
endereco_complemento:
|
|
1666
|
-
endereco_bairro:
|
|
1667
|
-
endereco_cidade:
|
|
1668
|
-
endereco_uf:
|
|
1669
|
-
endereco_cep:
|
|
1670
|
-
endereco_pontoreferencia:
|
|
1671
|
-
endereco_ll:
|
|
1672
|
-
});
|
|
1673
|
-
var searchSchema =
|
|
1674
|
-
msg:
|
|
1675
|
-
contratos:
|
|
1959
|
+
contrato_unificado_principal: z23.unknown().optional(),
|
|
1960
|
+
contrato_unificado_filhos: z23.unknown().optional(),
|
|
1961
|
+
tags: z23.array(tagSchema).optional().nullable(),
|
|
1962
|
+
anotacoes: z23.array(z23.unknown()).optional().nullable(),
|
|
1963
|
+
contratoCentralLogin: z23.string().optional().nullable(),
|
|
1964
|
+
contratoCentralSenha: z23.string().optional().nullable(),
|
|
1965
|
+
servico_login: z23.string().optional().nullable(),
|
|
1966
|
+
servico_senha: z23.string().optional().nullable(),
|
|
1967
|
+
servico_plano: z23.string().optional().nullable(),
|
|
1968
|
+
servico_grupo: z23.string().optional().nullable(),
|
|
1969
|
+
servico_tipo_conexao: z23.string().optional().nullable(),
|
|
1970
|
+
servico_vlan: z23.string().optional().nullable(),
|
|
1971
|
+
servico_mac: z23.string().optional().nullable(),
|
|
1972
|
+
servico_mac2: z23.string().optional().nullable(),
|
|
1973
|
+
servico_wifi_ssid: z23.string().optional().nullable(),
|
|
1974
|
+
servico_wifi_ssid_5: z23.string().optional().nullable(),
|
|
1975
|
+
servico_wifi_password: z23.string().optional().nullable(),
|
|
1976
|
+
servico_wifi_password_5: z23.string().optional().nullable(),
|
|
1977
|
+
servico_wifi_channel: z23.string().optional().nullable(),
|
|
1978
|
+
servico_wifi_channel_5: z23.string().optional().nullable(),
|
|
1979
|
+
razaoSocial: z23.string().optional().nullable(),
|
|
1980
|
+
cpfCnpj: z23.string().optional().nullable(),
|
|
1981
|
+
dataNascimento: z23.string().optional().nullable(),
|
|
1982
|
+
telefones: z23.array(contactSchema).optional().nullable(),
|
|
1983
|
+
telefones_cargos: z23.array(z23.unknown()).optional().nullable(),
|
|
1984
|
+
emails: z23.array(contactSchema).optional().nullable(),
|
|
1985
|
+
outros: z23.array(z23.unknown()).optional().nullable(),
|
|
1986
|
+
endereco_logradouro: z23.string().optional().nullable(),
|
|
1987
|
+
endereco_numero: z23.union([z23.number(), z23.string()]).optional().nullable(),
|
|
1988
|
+
endereco_complemento: z23.string().optional().nullable(),
|
|
1989
|
+
endereco_bairro: z23.string().optional().nullable(),
|
|
1990
|
+
endereco_cidade: z23.string().optional().nullable(),
|
|
1991
|
+
endereco_uf: z23.string().optional().nullable(),
|
|
1992
|
+
endereco_cep: z23.string().optional().nullable(),
|
|
1993
|
+
endereco_pontoreferencia: z23.unknown().optional(),
|
|
1994
|
+
endereco_ll: z23.string().optional().nullable()
|
|
1995
|
+
});
|
|
1996
|
+
var searchSchema = z23.looseObject({
|
|
1997
|
+
msg: z23.string().optional().nullable(),
|
|
1998
|
+
contratos: z23.array(candidateSchema)
|
|
1676
1999
|
});
|
|
1677
2000
|
var searchInvariants = ["contratos", "contratos[].contratoId", "contratos[].clienteId"];
|
|
1678
|
-
var customersSearchInputSchema =
|
|
1679
|
-
cpfcnpj:
|
|
1680
|
-
contrato:
|
|
1681
|
-
nome:
|
|
1682
|
-
login:
|
|
1683
|
-
telefone:
|
|
2001
|
+
var customersSearchInputSchema = z23.strictObject({
|
|
2002
|
+
cpfcnpj: z23.string().min(1).optional(),
|
|
2003
|
+
contrato: z23.number().int().optional(),
|
|
2004
|
+
nome: z23.string().min(1).optional(),
|
|
2005
|
+
login: z23.string().min(1).optional(),
|
|
2006
|
+
telefone: z23.string().min(1).optional()
|
|
1684
2007
|
}).refine((criteria) => Object.values(criteria).some((value) => value !== undefined), {
|
|
1685
2008
|
message: "at least one criterion is required"
|
|
1686
2009
|
});
|
|
1687
|
-
var
|
|
2010
|
+
var buildRequest19 = (input) => {
|
|
1688
2011
|
const parsed = customersSearchInputSchema.safeParse(input);
|
|
1689
2012
|
if (!parsed.success)
|
|
1690
2013
|
return { ok: false, problem: "invalid customers.search input" };
|
|
@@ -1753,26 +2076,26 @@ var customersSearch = {
|
|
|
1753
2076
|
method: "POST",
|
|
1754
2077
|
pathTemplate: "/api/ura/consultacliente/",
|
|
1755
2078
|
encoding: "json",
|
|
1756
|
-
buildRequest:
|
|
2079
|
+
buildRequest: buildRequest19,
|
|
1757
2080
|
repeatable: true,
|
|
1758
2081
|
decode: tolerantDecoder(searchSchema, searchInvariants),
|
|
1759
2082
|
sensitivity: customersSearchSensitivity
|
|
1760
2083
|
};
|
|
1761
2084
|
|
|
1762
2085
|
// src/operations/documents-add.ts
|
|
1763
|
-
import { z as
|
|
2086
|
+
import { z as z24 } from "zod";
|
|
1764
2087
|
var isFileData = (value) => value instanceof Blob || value instanceof Uint8Array || value instanceof ArrayBuffer;
|
|
1765
|
-
var fileSchema =
|
|
1766
|
-
data:
|
|
2088
|
+
var fileSchema = z24.strictObject({
|
|
2089
|
+
data: z24.custom(isFileData),
|
|
1767
2090
|
filename: nonBlank,
|
|
1768
|
-
contentType:
|
|
2091
|
+
contentType: z24.string().optional()
|
|
1769
2092
|
});
|
|
1770
|
-
var documentsAddInputSchema =
|
|
2093
|
+
var documentsAddInputSchema = z24.strictObject({
|
|
1771
2094
|
cliente_id: customerIdSchema.int().positive(),
|
|
1772
2095
|
file: fileSchema,
|
|
1773
|
-
descricao:
|
|
2096
|
+
descricao: z24.string().optional()
|
|
1774
2097
|
});
|
|
1775
|
-
var
|
|
2098
|
+
var buildRequest20 = (input) => {
|
|
1776
2099
|
const parsed = documentsAddInputSchema.safeParse(input);
|
|
1777
2100
|
if (!parsed.success)
|
|
1778
2101
|
return { ok: false, problem: "invalid documents.add input" };
|
|
@@ -1790,30 +2113,30 @@ var documentsAdd = {
|
|
|
1790
2113
|
encoding: "form-files",
|
|
1791
2114
|
repeatable: false,
|
|
1792
2115
|
write: {},
|
|
1793
|
-
buildRequest:
|
|
2116
|
+
buildRequest: buildRequest20,
|
|
1794
2117
|
decode: (body) => body.kind === "empty" ? { ok: true, data: null } : { ok: false, issues: ["(body)"] },
|
|
1795
2118
|
sensitivity: documentsAddSensitivity
|
|
1796
2119
|
};
|
|
1797
2120
|
|
|
1798
2121
|
// src/operations/documents-list.ts
|
|
1799
|
-
import { z as
|
|
1800
|
-
var documentsListInputSchema =
|
|
2122
|
+
import { z as z25 } from "zod";
|
|
2123
|
+
var documentsListInputSchema = z25.strictObject({
|
|
1801
2124
|
cliente_id: customerIdSchema.int().positive()
|
|
1802
2125
|
});
|
|
1803
|
-
var
|
|
2126
|
+
var buildRequest21 = (input) => {
|
|
1804
2127
|
const parsed = documentsListInputSchema.safeParse(input);
|
|
1805
2128
|
if (!parsed.success)
|
|
1806
2129
|
return { ok: false, problem: "invalid documents.list input" };
|
|
1807
2130
|
return { ok: true, pathParams: { cliente_id: parsed.data.cliente_id } };
|
|
1808
2131
|
};
|
|
1809
|
-
var documentSchema =
|
|
1810
|
-
id:
|
|
2132
|
+
var documentSchema = z25.looseObject({
|
|
2133
|
+
id: z25.number(),
|
|
1811
2134
|
cliente_id: customerIdSchema,
|
|
1812
|
-
arquivo:
|
|
1813
|
-
descricao:
|
|
1814
|
-
usuario:
|
|
2135
|
+
arquivo: z25.string().optional().nullable(),
|
|
2136
|
+
descricao: z25.string().optional().nullable(),
|
|
2137
|
+
usuario: z25.string().optional().nullable()
|
|
1815
2138
|
});
|
|
1816
|
-
var documentsSchema =
|
|
2139
|
+
var documentsSchema = z25.array(documentSchema);
|
|
1817
2140
|
var documentsInvariants = ["[].id", "[].cliente_id"];
|
|
1818
2141
|
var documentsListSensitivity = {
|
|
1819
2142
|
input: [],
|
|
@@ -1824,14 +2147,14 @@ var documentsList = {
|
|
|
1824
2147
|
method: "GET",
|
|
1825
2148
|
pathTemplate: "/api/suporte/cliente/{cliente_id}/documento/list/",
|
|
1826
2149
|
encoding: "json",
|
|
1827
|
-
buildRequest:
|
|
2150
|
+
buildRequest: buildRequest21,
|
|
1828
2151
|
repeatable: true,
|
|
1829
2152
|
decode: tolerantDecoder(documentsSchema, documentsInvariants),
|
|
1830
2153
|
sensitivity: documentsListSensitivity
|
|
1831
2154
|
};
|
|
1832
2155
|
|
|
1833
2156
|
// src/operations/experimental-annotations-list.ts
|
|
1834
|
-
import { z as
|
|
2157
|
+
import { z as z26 } from "zod";
|
|
1835
2158
|
|
|
1836
2159
|
// src/annotation-selection.ts
|
|
1837
2160
|
var isNumber = (value) => typeof value === "number" && Number.isFinite(value);
|
|
@@ -1901,22 +2224,22 @@ var selectAnnotations = (rows, filters) => {
|
|
|
1901
2224
|
};
|
|
1902
2225
|
|
|
1903
2226
|
// src/operations/experimental-annotations-list.ts
|
|
1904
|
-
var annotationSchema =
|
|
1905
|
-
id:
|
|
2227
|
+
var annotationSchema = z26.looseObject({
|
|
2228
|
+
id: z26.number(),
|
|
1906
2229
|
cliente: customerIdSchema,
|
|
1907
|
-
clientecontrato:
|
|
1908
|
-
anotacao:
|
|
1909
|
-
usuario:
|
|
1910
|
-
tipo:
|
|
1911
|
-
alerta_modo:
|
|
1912
|
-
data_cadastro:
|
|
1913
|
-
data_alteracao:
|
|
1914
|
-
});
|
|
1915
|
-
var annotationsSchema =
|
|
2230
|
+
clientecontrato: z26.number().nullable(),
|
|
2231
|
+
anotacao: z26.string(),
|
|
2232
|
+
usuario: z26.number().optional().nullable(),
|
|
2233
|
+
tipo: z26.number().optional().nullable(),
|
|
2234
|
+
alerta_modo: z26.number().optional().nullable(),
|
|
2235
|
+
data_cadastro: z26.string().optional().nullable(),
|
|
2236
|
+
data_alteracao: z26.string().optional().nullable()
|
|
2237
|
+
});
|
|
2238
|
+
var annotationsSchema = z26.array(annotationSchema);
|
|
1916
2239
|
var annotationInvariants = ["[].id", "[].cliente", "[].clientecontrato", "[].anotacao"];
|
|
1917
|
-
var identity =
|
|
2240
|
+
var identity = z26.number().int().positive();
|
|
1918
2241
|
var customerIdentity = customerIdSchema.int().positive();
|
|
1919
|
-
var experimentalAnnotationsListInputSchema =
|
|
2242
|
+
var experimentalAnnotationsListInputSchema = z26.strictObject({
|
|
1920
2243
|
cliente_id: customerIdentity.optional(),
|
|
1921
2244
|
contrato_id: identity.optional()
|
|
1922
2245
|
}).refine((filters) => filters.cliente_id !== undefined || filters.contrato_id !== undefined);
|
|
@@ -1972,87 +2295,87 @@ var decodeSelected = (filters) => (body) => {
|
|
|
1972
2295
|
return decoded.warnings === undefined ? { ok: true, data } : { ok: true, data, warnings: decoded.warnings };
|
|
1973
2296
|
};
|
|
1974
2297
|
var annotationsListForCall = () => {
|
|
1975
|
-
let
|
|
2298
|
+
let decode3 = failClosed;
|
|
1976
2299
|
return {
|
|
1977
2300
|
...base,
|
|
1978
2301
|
buildRequest: (input) => {
|
|
1979
2302
|
const parsed = experimentalAnnotationsListInputSchema.safeParse(input);
|
|
1980
2303
|
if (!parsed.success)
|
|
1981
2304
|
return refuseWithoutFilters();
|
|
1982
|
-
|
|
2305
|
+
decode3 = decodeSelected(parsed.data);
|
|
1983
2306
|
return { ok: true, params: parsed.data };
|
|
1984
2307
|
},
|
|
1985
|
-
decode: (body) =>
|
|
2308
|
+
decode: (body) => decode3(body)
|
|
1986
2309
|
};
|
|
1987
2310
|
};
|
|
1988
2311
|
|
|
1989
2312
|
// src/operations/invoices-list.ts
|
|
1990
|
-
import { z as
|
|
1991
|
-
var agreementSchema =
|
|
1992
|
-
acordados:
|
|
1993
|
-
cobrados:
|
|
1994
|
-
});
|
|
1995
|
-
var invoiceSchema =
|
|
1996
|
-
id:
|
|
1997
|
-
status:
|
|
1998
|
-
valor:
|
|
1999
|
-
dataVencimento:
|
|
2000
|
-
clienteNome:
|
|
2001
|
-
clienteCpfcnpj:
|
|
2002
|
-
clienteContrato:
|
|
2003
|
-
portador:
|
|
2004
|
-
numeroDocumento:
|
|
2005
|
-
nossoNumero:
|
|
2006
|
-
link:
|
|
2007
|
-
link_cobranca:
|
|
2008
|
-
valorDesconto:
|
|
2009
|
-
valorCorrigido:
|
|
2010
|
-
valorPago:
|
|
2011
|
-
valorPagoParcial:
|
|
2012
|
-
codigoBarras:
|
|
2013
|
-
linhaDigitavel:
|
|
2014
|
-
codigoPix:
|
|
2015
|
-
dataEmissao:
|
|
2016
|
-
dataPagamento:
|
|
2017
|
-
dataCancelamento:
|
|
2018
|
-
demonstrativo:
|
|
2313
|
+
import { z as z27 } from "zod";
|
|
2314
|
+
var agreementSchema = z27.looseObject({
|
|
2315
|
+
acordados: z27.array(z27.unknown()).optional().nullable(),
|
|
2316
|
+
cobrados: z27.array(z27.unknown()).optional().nullable()
|
|
2317
|
+
});
|
|
2318
|
+
var invoiceSchema = z27.looseObject({
|
|
2319
|
+
id: z27.number(),
|
|
2320
|
+
status: z27.string().optional().nullable(),
|
|
2321
|
+
valor: normalizedNumber.optional(),
|
|
2322
|
+
dataVencimento: z27.string().optional().nullable(),
|
|
2323
|
+
clienteNome: z27.string().optional().nullable(),
|
|
2324
|
+
clienteCpfcnpj: z27.string().optional().nullable(),
|
|
2325
|
+
clienteContrato: z27.number().optional().nullable(),
|
|
2326
|
+
portador: z27.string().optional().nullable(),
|
|
2327
|
+
numeroDocumento: z27.union([z27.number(), z27.string()]).optional().nullable(),
|
|
2328
|
+
nossoNumero: z27.string().optional().nullable(),
|
|
2329
|
+
link: z27.string().optional().nullable(),
|
|
2330
|
+
link_cobranca: z27.string().optional().nullable(),
|
|
2331
|
+
valorDesconto: normalizedNumber.optional(),
|
|
2332
|
+
valorCorrigido: normalizedNumber.optional(),
|
|
2333
|
+
valorPago: normalizedNumber.optional(),
|
|
2334
|
+
valorPagoParcial: normalizedNumber.optional(),
|
|
2335
|
+
codigoBarras: z27.string().optional().nullable(),
|
|
2336
|
+
linhaDigitavel: z27.string().optional().nullable(),
|
|
2337
|
+
codigoPix: z27.string().optional().nullable(),
|
|
2338
|
+
dataEmissao: z27.string().optional().nullable(),
|
|
2339
|
+
dataPagamento: z27.string().optional().nullable(),
|
|
2340
|
+
dataCancelamento: z27.string().optional().nullable(),
|
|
2341
|
+
demonstrativo: z27.string().optional().nullable(),
|
|
2019
2342
|
acordoPagamento: agreementSchema.optional().nullable(),
|
|
2020
|
-
formaPagamento:
|
|
2021
|
-
usuario_baixa:
|
|
2022
|
-
});
|
|
2023
|
-
var pageSchema2 =
|
|
2024
|
-
paginacao:
|
|
2025
|
-
offset:
|
|
2026
|
-
limit:
|
|
2027
|
-
parcial:
|
|
2028
|
-
total:
|
|
2343
|
+
formaPagamento: z27.string().optional().nullable(),
|
|
2344
|
+
usuario_baixa: z27.string().optional().nullable()
|
|
2345
|
+
});
|
|
2346
|
+
var pageSchema2 = z27.looseObject({
|
|
2347
|
+
paginacao: z27.looseObject({
|
|
2348
|
+
offset: z27.number().optional().nullable(),
|
|
2349
|
+
limit: z27.number().optional().nullable(),
|
|
2350
|
+
parcial: z27.number().optional().nullable(),
|
|
2351
|
+
total: z27.number()
|
|
2029
2352
|
}),
|
|
2030
|
-
titulos:
|
|
2353
|
+
titulos: z27.array(invoiceSchema)
|
|
2031
2354
|
});
|
|
2032
2355
|
var pageInvariants2 = ["paginacao", "paginacao.total", "titulos", "titulos[].id"];
|
|
2033
|
-
var invoicesListInputSchema =
|
|
2034
|
-
offset:
|
|
2035
|
-
limit:
|
|
2036
|
-
titulo_id:
|
|
2356
|
+
var invoicesListInputSchema = z27.strictObject({
|
|
2357
|
+
offset: z27.number().int().nonnegative().optional(),
|
|
2358
|
+
limit: z27.number().int().nonnegative().optional(),
|
|
2359
|
+
titulo_id: z27.number().int().optional(),
|
|
2037
2360
|
cliente_id: customerIdSchema.int().optional(),
|
|
2038
|
-
cpfcnpj:
|
|
2039
|
-
contrato:
|
|
2040
|
-
status:
|
|
2041
|
-
portador:
|
|
2042
|
-
ordenar:
|
|
2043
|
-
ordenar_ordem:
|
|
2044
|
-
empresa_cnpj:
|
|
2045
|
-
tipo_pessoa:
|
|
2046
|
-
data_vencimento_inicio:
|
|
2047
|
-
data_vencimento_fim:
|
|
2048
|
-
data_pagamento_inicio:
|
|
2049
|
-
data_pagamento_fim:
|
|
2050
|
-
data_cancelamento_inicio:
|
|
2051
|
-
data_cancelamento_fim:
|
|
2052
|
-
data_acordo_inicio:
|
|
2053
|
-
data_acordo_fim:
|
|
2054
|
-
});
|
|
2055
|
-
var
|
|
2361
|
+
cpfcnpj: z27.string().optional(),
|
|
2362
|
+
contrato: z27.number().int().optional(),
|
|
2363
|
+
status: z27.enum(["abertos", "pagos", "cancelados"]).optional(),
|
|
2364
|
+
portador: z27.number().int().optional(),
|
|
2365
|
+
ordenar: z27.enum(["data_documento", "data_vencimento", "data_pagamento"]).optional(),
|
|
2366
|
+
ordenar_ordem: z27.enum(["asc", "desc"]).optional(),
|
|
2367
|
+
empresa_cnpj: z27.string().optional(),
|
|
2368
|
+
tipo_pessoa: z27.enum(["F", "J", "E", "EJ"]).optional(),
|
|
2369
|
+
data_vencimento_inicio: z27.string().optional(),
|
|
2370
|
+
data_vencimento_fim: z27.string().optional(),
|
|
2371
|
+
data_pagamento_inicio: z27.string().optional(),
|
|
2372
|
+
data_pagamento_fim: z27.string().optional(),
|
|
2373
|
+
data_cancelamento_inicio: z27.string().optional(),
|
|
2374
|
+
data_cancelamento_fim: z27.string().optional(),
|
|
2375
|
+
data_acordo_inicio: z27.string().optional(),
|
|
2376
|
+
data_acordo_fim: z27.string().optional()
|
|
2377
|
+
});
|
|
2378
|
+
var buildRequest22 = (input) => {
|
|
2056
2379
|
const parsed = invoicesListInputSchema.safeParse(input);
|
|
2057
2380
|
if (!parsed.success)
|
|
2058
2381
|
return { ok: false, problem: "invalid invoices.list input" };
|
|
@@ -2081,57 +2404,102 @@ var invoicesList = {
|
|
|
2081
2404
|
method: "POST",
|
|
2082
2405
|
pathTemplate: "/api/ura/titulos/",
|
|
2083
2406
|
encoding: "json",
|
|
2084
|
-
buildRequest:
|
|
2407
|
+
buildRequest: buildRequest22,
|
|
2085
2408
|
repeatable: true,
|
|
2086
2409
|
decode: tolerantDecoder(pageSchema2, pageInvariants2),
|
|
2087
2410
|
sensitivity: invoicesListSensitivity
|
|
2088
2411
|
};
|
|
2089
2412
|
|
|
2413
|
+
// src/operations/maintenance-list.ts
|
|
2414
|
+
import { z as z28 } from "zod";
|
|
2415
|
+
var maintenanceSchema = z28.looseObject({
|
|
2416
|
+
id: z28.number(),
|
|
2417
|
+
descricao: z28.string().optional().nullable(),
|
|
2418
|
+
data_inicial: z28.string().optional().nullable(),
|
|
2419
|
+
data_final: z28.string().optional().nullable(),
|
|
2420
|
+
observacoes: z28.string().optional().nullable(),
|
|
2421
|
+
mensagem_central: z28.string().optional().nullable(),
|
|
2422
|
+
mensagem_ura: z28.string().optional().nullable(),
|
|
2423
|
+
enviar_sms: z28.boolean().optional().nullable(),
|
|
2424
|
+
ativa: z28.boolean().optional().nullable(),
|
|
2425
|
+
severidade: z28.string().optional().nullable(),
|
|
2426
|
+
status: z28.string().optional().nullable(),
|
|
2427
|
+
pops: z28.array(z28.unknown()).optional().nullable(),
|
|
2428
|
+
nas: z28.array(z28.unknown()).optional().nullable(),
|
|
2429
|
+
aps: z28.array(z28.unknown()).optional().nullable(),
|
|
2430
|
+
sources: z28.array(z28.unknown()).optional().nullable(),
|
|
2431
|
+
switches: z28.array(z28.unknown()).optional().nullable(),
|
|
2432
|
+
olts: z28.array(z28.unknown()).optional().nullable(),
|
|
2433
|
+
oltpons: z28.array(z28.unknown()).optional().nullable(),
|
|
2434
|
+
ctos: z28.array(z28.unknown()).optional().nullable(),
|
|
2435
|
+
vlans: z28.array(z28.unknown()).optional().nullable()
|
|
2436
|
+
});
|
|
2437
|
+
var maintenancesSchema = z28.array(maintenanceSchema);
|
|
2438
|
+
var maintenancesInvariants = ["[].id"];
|
|
2439
|
+
var buildRequest23 = () => ({ ok: true });
|
|
2440
|
+
var maintenanceListSensitivity = { input: [], output: [] };
|
|
2441
|
+
var maintenanceList = {
|
|
2442
|
+
name: "maintenance.list",
|
|
2443
|
+
method: "GET",
|
|
2444
|
+
pathTemplate: "/api/ura/manutencao/list/",
|
|
2445
|
+
encoding: "json",
|
|
2446
|
+
buildRequest: buildRequest23,
|
|
2447
|
+
repeatable: true,
|
|
2448
|
+
decode: tolerantDecoder(maintenancesSchema, maintenancesInvariants),
|
|
2449
|
+
sensitivity: maintenanceListSensitivity
|
|
2450
|
+
};
|
|
2451
|
+
|
|
2090
2452
|
// src/operations/occurrences-create.ts
|
|
2091
|
-
import { z as
|
|
2092
|
-
var id4 =
|
|
2093
|
-
var flag =
|
|
2094
|
-
var occurrencesCreateInputSchema =
|
|
2095
|
-
contrato:
|
|
2096
|
-
conteudo:
|
|
2453
|
+
import { z as z29 } from "zod";
|
|
2454
|
+
var id4 = z29.number().int().nonnegative();
|
|
2455
|
+
var flag = z29.union([z29.literal(0), z29.literal(1)]);
|
|
2456
|
+
var occurrencesCreateInputSchema = z29.strictObject({
|
|
2457
|
+
contrato: z29.number().int().positive(),
|
|
2458
|
+
conteudo: z29.string().optional(),
|
|
2097
2459
|
conteudolimpo: flag.optional(),
|
|
2098
|
-
observacao:
|
|
2460
|
+
observacao: z29.string().optional(),
|
|
2099
2461
|
ocorrenciatipo: id4.optional(),
|
|
2100
|
-
tipoclassificacoes:
|
|
2462
|
+
tipoclassificacoes: z29.array(id4).optional(),
|
|
2101
2463
|
metodo: id4.optional(),
|
|
2102
2464
|
setor: id4.optional(),
|
|
2103
|
-
usuario:
|
|
2104
|
-
responsaveloc:
|
|
2105
|
-
contato_nome:
|
|
2106
|
-
contato_telefone:
|
|
2465
|
+
usuario: z29.string().optional(),
|
|
2466
|
+
responsaveloc: z29.string().optional(),
|
|
2467
|
+
contato_nome: z29.string().optional(),
|
|
2468
|
+
contato_telefone: z29.string().optional(),
|
|
2107
2469
|
desativa_os: flag.optional(),
|
|
2108
2470
|
status_encerrado: flag.optional(),
|
|
2109
2471
|
notificar_cliente: flag.optional(),
|
|
2110
2472
|
motivoos: id4.optional(),
|
|
2111
|
-
motivoclassificacoes:
|
|
2112
|
-
responsavel:
|
|
2113
|
-
tecnicos:
|
|
2114
|
-
data_hora_agendamento:
|
|
2473
|
+
motivoclassificacoes: z29.array(id4).optional(),
|
|
2474
|
+
responsavel: z29.string().optional(),
|
|
2475
|
+
tecnicos: z29.array(z29.string()).optional(),
|
|
2476
|
+
data_hora_agendamento: z29.string().optional(),
|
|
2115
2477
|
sms_tecnico: flag.optional(),
|
|
2116
|
-
tipo_servico:
|
|
2478
|
+
tipo_servico: z29.enum(["internet", "telefonia", "tv", "multimidia", "generico"]).optional(),
|
|
2117
2479
|
servico_id: id4.optional(),
|
|
2118
2480
|
empresa_id: id4.optional()
|
|
2119
2481
|
});
|
|
2120
|
-
var
|
|
2482
|
+
var buildRequest24 = (input) => {
|
|
2121
2483
|
const parsed = occurrencesCreateInputSchema.safeParse(input);
|
|
2122
2484
|
if (!parsed.success)
|
|
2123
2485
|
return { ok: false, problem: "invalid occurrences.create input" };
|
|
2124
2486
|
return { ok: true, params: parsed.data };
|
|
2125
2487
|
};
|
|
2126
|
-
var
|
|
2127
|
-
var
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2488
|
+
var INVALID_SCHEDULE_TEXT = /^data e hora de agendamento inválida, formato esperado: aaaa-mm-dd hh:mm\.?$/iu;
|
|
2489
|
+
var detectRefusal = (body) => {
|
|
2490
|
+
if (body.kind !== "json" || !isRecord(body.value) || body.value.status !== 0)
|
|
2491
|
+
return;
|
|
2492
|
+
const { msg } = body.value;
|
|
2493
|
+
return typeof msg === "string" && INVALID_SCHEDULE_TEXT.test(msg.trim()) ? { reason: "INVALID_SCHEDULE", effect: "none" } : {};
|
|
2494
|
+
};
|
|
2495
|
+
var openedSchema = z29.looseObject({
|
|
2496
|
+
status: z29.literal(1),
|
|
2497
|
+
protocolo: z29.string(),
|
|
2498
|
+
id: z29.number(),
|
|
2499
|
+
contratoId: z29.number().optional().nullable(),
|
|
2500
|
+
razaoSocial: z29.string().optional().nullable(),
|
|
2501
|
+
cpfCnpj: z29.string().optional().nullable(),
|
|
2502
|
+
msg: z29.string().optional().nullable()
|
|
2135
2503
|
});
|
|
2136
2504
|
var openedInvariants = ["status", "protocolo", "id"];
|
|
2137
2505
|
var occurrencesCreateSensitivity = {
|
|
@@ -2160,148 +2528,272 @@ var occurrencesCreate = {
|
|
|
2160
2528
|
encoding: "json",
|
|
2161
2529
|
repeatable: false,
|
|
2162
2530
|
write: {},
|
|
2163
|
-
buildRequest:
|
|
2531
|
+
buildRequest: buildRequest24,
|
|
2164
2532
|
detectRefusal,
|
|
2165
2533
|
decode: tolerantDecoder(openedSchema, openedInvariants),
|
|
2166
2534
|
sensitivity: occurrencesCreateSensitivity
|
|
2167
2535
|
};
|
|
2168
2536
|
|
|
2537
|
+
// src/operations/occurrences-list.ts
|
|
2538
|
+
import { z as z30 } from "zod";
|
|
2539
|
+
var workOrderSchema = z30.looseObject({
|
|
2540
|
+
id: z30.number(),
|
|
2541
|
+
status: z30.string().optional().nullable(),
|
|
2542
|
+
status_id: z30.number().optional().nullable(),
|
|
2543
|
+
data_cadastro: z30.string().optional().nullable(),
|
|
2544
|
+
data_agendamento: z30.string().optional().nullable(),
|
|
2545
|
+
data_finalizacao: z30.string().optional().nullable(),
|
|
2546
|
+
tipo: z30.string().optional().nullable(),
|
|
2547
|
+
tipo_id: z30.number().optional().nullable(),
|
|
2548
|
+
motivo: z30.string().optional().nullable(),
|
|
2549
|
+
pop: z30.string().optional().nullable(),
|
|
2550
|
+
conteudo: z30.string().optional().nullable(),
|
|
2551
|
+
responsavel: z30.string().optional().nullable(),
|
|
2552
|
+
tecnicos_auxiliares: z30.array(z30.unknown()).optional().nullable(),
|
|
2553
|
+
usuario: z30.string().optional().nullable(),
|
|
2554
|
+
usuario_finalizacao: z30.string().optional().nullable()
|
|
2555
|
+
});
|
|
2556
|
+
var occurrenceSchema = z30.looseObject({
|
|
2557
|
+
id: z30.number(),
|
|
2558
|
+
cliente: z30.string().optional().nullable(),
|
|
2559
|
+
contrato: z30.number().optional().nullable(),
|
|
2560
|
+
contrato_status: z30.string().optional().nullable(),
|
|
2561
|
+
contrato_status_id: z30.number().optional().nullable(),
|
|
2562
|
+
pop: z30.string().optional().nullable(),
|
|
2563
|
+
numero: z30.string().optional().nullable(),
|
|
2564
|
+
status: z30.string().optional().nullable(),
|
|
2565
|
+
status_id: z30.number().optional().nullable(),
|
|
2566
|
+
data_cadastro: z30.string().optional().nullable(),
|
|
2567
|
+
data_agendamento: z30.string().optional().nullable(),
|
|
2568
|
+
data_finalizacao: z30.string().optional().nullable(),
|
|
2569
|
+
tipo: z30.string().optional().nullable(),
|
|
2570
|
+
metodo: z30.string().optional().nullable(),
|
|
2571
|
+
conteudo: z30.string().optional().nullable(),
|
|
2572
|
+
responsavel: z30.string().optional().nullable(),
|
|
2573
|
+
usuario: z30.string().optional().nullable(),
|
|
2574
|
+
usuario_finalizacao: z30.string().optional().nullable(),
|
|
2575
|
+
protocolos_externos: z30.array(z30.unknown()).optional().nullable(),
|
|
2576
|
+
servico: z30.array(z30.unknown()).optional().nullable(),
|
|
2577
|
+
comentarios: z30.array(z30.unknown()).optional().nullable(),
|
|
2578
|
+
ordens_servicos: z30.array(workOrderSchema).optional().nullable()
|
|
2579
|
+
});
|
|
2580
|
+
var pageSchema3 = z30.looseObject({
|
|
2581
|
+
paginacao: z30.looseObject({
|
|
2582
|
+
offset: z30.number().optional().nullable(),
|
|
2583
|
+
limit: z30.number().optional().nullable(),
|
|
2584
|
+
parcial: z30.number().optional().nullable(),
|
|
2585
|
+
total: z30.number()
|
|
2586
|
+
}),
|
|
2587
|
+
ocorrencias: z30.array(occurrenceSchema)
|
|
2588
|
+
});
|
|
2589
|
+
var pageInvariants3 = [
|
|
2590
|
+
"paginacao",
|
|
2591
|
+
"paginacao.total",
|
|
2592
|
+
"ocorrencias",
|
|
2593
|
+
"ocorrencias[].id",
|
|
2594
|
+
"ocorrencias[].ordens_servicos[].id"
|
|
2595
|
+
];
|
|
2596
|
+
var date = z30.string().min(1);
|
|
2597
|
+
var occurrencesListInputSchema = z30.strictObject({
|
|
2598
|
+
offset: z30.number().int().nonnegative().optional(),
|
|
2599
|
+
limit: z30.number().int().nonnegative().optional(),
|
|
2600
|
+
ocorrencia: z30.string().min(1).optional(),
|
|
2601
|
+
status: z30.number().int().nonnegative().optional(),
|
|
2602
|
+
contrato: z30.number().int().positive().optional(),
|
|
2603
|
+
contrato_status: z30.number().int().positive().optional(),
|
|
2604
|
+
data_cadastro_inicio: date.optional(),
|
|
2605
|
+
data_cadastro_fim: date.optional(),
|
|
2606
|
+
data_agendamento_inicio: date.optional(),
|
|
2607
|
+
data_agendamento_fim: date.optional(),
|
|
2608
|
+
data_finalizacao_inicio: date.optional(),
|
|
2609
|
+
data_finalizacao_fim: date.optional()
|
|
2610
|
+
});
|
|
2611
|
+
var buildRequest25 = (input) => {
|
|
2612
|
+
const parsed = occurrencesListInputSchema.safeParse(input);
|
|
2613
|
+
if (!parsed.success)
|
|
2614
|
+
return { ok: false, problem: "invalid occurrences.list input" };
|
|
2615
|
+
const { offset: _offset, limit: _limit, ...filters } = parsed.data;
|
|
2616
|
+
if (Object.values(filters).every((value) => value === undefined)) {
|
|
2617
|
+
return { ok: false, problem: "occurrences.list needs at least one filter" };
|
|
2618
|
+
}
|
|
2619
|
+
return { ok: true, params: parsed.data };
|
|
2620
|
+
};
|
|
2621
|
+
var occurrencesListSensitivity = {
|
|
2622
|
+
input: [],
|
|
2623
|
+
output: [
|
|
2624
|
+
{
|
|
2625
|
+
path: "ocorrencias[]",
|
|
2626
|
+
secretKeys: ["servico"],
|
|
2627
|
+
personalKeys: [
|
|
2628
|
+
"cliente",
|
|
2629
|
+
"conteudo",
|
|
2630
|
+
"responsavel",
|
|
2631
|
+
"usuario",
|
|
2632
|
+
"usuario_finalizacao",
|
|
2633
|
+
"comentarios",
|
|
2634
|
+
"protocolos_externos"
|
|
2635
|
+
]
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
path: "ocorrencias[].ordens_servicos[]",
|
|
2639
|
+
secretKeys: [],
|
|
2640
|
+
personalKeys: [
|
|
2641
|
+
"conteudo",
|
|
2642
|
+
"responsavel",
|
|
2643
|
+
"tecnicos_auxiliares",
|
|
2644
|
+
"usuario",
|
|
2645
|
+
"usuario_finalizacao"
|
|
2646
|
+
]
|
|
2647
|
+
}
|
|
2648
|
+
]
|
|
2649
|
+
};
|
|
2650
|
+
var occurrencesList = {
|
|
2651
|
+
name: "occurrences.list",
|
|
2652
|
+
method: "POST",
|
|
2653
|
+
pathTemplate: "/api/ura/ocorrencia/list/",
|
|
2654
|
+
encoding: "form",
|
|
2655
|
+
buildRequest: buildRequest25,
|
|
2656
|
+
repeatable: true,
|
|
2657
|
+
decode: tolerantDecoder(pageSchema3, pageInvariants3),
|
|
2658
|
+
sensitivity: occurrencesListSensitivity
|
|
2659
|
+
};
|
|
2660
|
+
|
|
2169
2661
|
// src/operations/occurrences-list-methods.ts
|
|
2170
|
-
import { z as
|
|
2171
|
-
var occurrenceMethodSchema =
|
|
2172
|
-
codigo:
|
|
2173
|
-
descricao:
|
|
2662
|
+
import { z as z31 } from "zod";
|
|
2663
|
+
var occurrenceMethodSchema = z31.looseObject({
|
|
2664
|
+
codigo: z31.number(),
|
|
2665
|
+
descricao: z31.string().optional().nullable()
|
|
2174
2666
|
});
|
|
2175
|
-
var occurrenceMethodsSchema =
|
|
2667
|
+
var occurrenceMethodsSchema = z31.array(occurrenceMethodSchema);
|
|
2176
2668
|
var occurrenceMethodsInvariants = ["[].codigo"];
|
|
2177
|
-
var
|
|
2669
|
+
var buildRequest26 = () => ({ ok: true });
|
|
2178
2670
|
var occurrencesListMethodsSensitivity = { input: [], output: [] };
|
|
2179
2671
|
var occurrencesListMethods = {
|
|
2180
2672
|
name: "occurrences.listMethods",
|
|
2181
2673
|
method: "GET",
|
|
2182
2674
|
pathTemplate: "/api/ura/ocorrencia/metodo/list/",
|
|
2183
2675
|
encoding: "json",
|
|
2184
|
-
buildRequest:
|
|
2676
|
+
buildRequest: buildRequest26,
|
|
2185
2677
|
repeatable: true,
|
|
2186
2678
|
decode: tolerantDecoder(occurrenceMethodsSchema, occurrenceMethodsInvariants),
|
|
2187
2679
|
sensitivity: occurrencesListMethodsSensitivity
|
|
2188
2680
|
};
|
|
2189
2681
|
|
|
2190
2682
|
// src/operations/occurrences-list-types.ts
|
|
2191
|
-
import { z as
|
|
2192
|
-
var occurrenceTypeSchema =
|
|
2193
|
-
id:
|
|
2194
|
-
codigo:
|
|
2195
|
-
descricao:
|
|
2196
|
-
ativo:
|
|
2197
|
-
classificacoes:
|
|
2198
|
-
classificacoes_obrigatorio:
|
|
2199
|
-
setores:
|
|
2200
|
-
classificacoes_obrigatorio_encerramento:
|
|
2201
|
-
});
|
|
2202
|
-
var occurrenceTypesSchema =
|
|
2683
|
+
import { z as z32 } from "zod";
|
|
2684
|
+
var occurrenceTypeSchema = z32.looseObject({
|
|
2685
|
+
id: z32.number(),
|
|
2686
|
+
codigo: z32.number(),
|
|
2687
|
+
descricao: z32.string().optional().nullable(),
|
|
2688
|
+
ativo: z32.boolean().optional().nullable(),
|
|
2689
|
+
classificacoes: z32.array(z32.unknown()).optional().nullable(),
|
|
2690
|
+
classificacoes_obrigatorio: z32.boolean().optional().nullable(),
|
|
2691
|
+
setores: z32.array(z32.unknown()).optional().nullable(),
|
|
2692
|
+
classificacoes_obrigatorio_encerramento: z32.boolean().optional().nullable()
|
|
2693
|
+
});
|
|
2694
|
+
var occurrenceTypesSchema = z32.array(occurrenceTypeSchema);
|
|
2203
2695
|
var occurrenceTypesInvariants = ["[].id", "[].codigo"];
|
|
2204
|
-
var
|
|
2696
|
+
var buildRequest27 = () => ({ ok: true });
|
|
2205
2697
|
var occurrencesListTypesSensitivity = { input: [], output: [] };
|
|
2206
2698
|
var occurrencesListTypes = {
|
|
2207
2699
|
name: "occurrences.listTypes",
|
|
2208
2700
|
method: "GET",
|
|
2209
2701
|
pathTemplate: "/api/os/ocorrencia/tipo/list/",
|
|
2210
2702
|
encoding: "json",
|
|
2211
|
-
buildRequest:
|
|
2703
|
+
buildRequest: buildRequest27,
|
|
2212
2704
|
repeatable: true,
|
|
2213
2705
|
decode: tolerantDecoder(occurrenceTypesSchema, occurrenceTypesInvariants),
|
|
2214
2706
|
sensitivity: occurrencesListTypesSensitivity
|
|
2215
2707
|
};
|
|
2216
2708
|
|
|
2217
2709
|
// src/operations/plans-list.ts
|
|
2218
|
-
import { z as
|
|
2219
|
-
var popSchema2 =
|
|
2220
|
-
id:
|
|
2221
|
-
uf:
|
|
2222
|
-
pop:
|
|
2223
|
-
});
|
|
2224
|
-
var planSchema2 =
|
|
2225
|
-
id:
|
|
2226
|
-
descricao:
|
|
2227
|
-
preco:
|
|
2228
|
-
ativo:
|
|
2229
|
-
grupo:
|
|
2230
|
-
tipo:
|
|
2231
|
-
pos_pago:
|
|
2232
|
-
desconto:
|
|
2233
|
-
desconto_venc:
|
|
2234
|
-
desconto_venc_modo:
|
|
2235
|
-
valor_desconto_temporario:
|
|
2236
|
-
desconto_temporario_modo:
|
|
2237
|
-
desconto_temporario_quantidade:
|
|
2238
|
-
descricao_desconto_temporario:
|
|
2239
|
-
desconto_temporario_proporcional:
|
|
2240
|
-
observacao:
|
|
2241
|
-
instalacao_qtd_parcelas:
|
|
2242
|
-
instalacao_valor:
|
|
2243
|
-
instalacao_desconto_max:
|
|
2244
|
-
instalacao_desconto_min:
|
|
2245
|
-
disponivel_pre_cadastro:
|
|
2246
|
-
disponivel_pre_cadastro_publico:
|
|
2247
|
-
data_validade:
|
|
2248
|
-
pops:
|
|
2249
|
-
auto_bloqueio:
|
|
2250
|
-
dias_bloqueio_pos_venc:
|
|
2251
|
-
dias_bloqueio_aviso:
|
|
2252
|
-
dias_reducao_velocidade:
|
|
2253
|
-
download:
|
|
2254
|
-
upload:
|
|
2255
|
-
trafego_mensal:
|
|
2256
|
-
contabilizacao_trafego_mensal:
|
|
2257
|
-
trafego_excedente_acao:
|
|
2258
|
-
valor_trafego_excedido:
|
|
2259
|
-
duplicacao_noturna:
|
|
2260
|
-
inicio_duplicacao_noturna:
|
|
2261
|
-
fim_duplicacao_noturna:
|
|
2262
|
-
modo_velocidade_reduzida:
|
|
2263
|
-
download_red_financeiro:
|
|
2264
|
-
upload_red_financeiro:
|
|
2265
|
-
modo_velocidade_red_franquia:
|
|
2266
|
-
download_red_franquia:
|
|
2267
|
-
upload_red_franquia:
|
|
2268
|
-
combo:
|
|
2269
|
-
qtd_servicos:
|
|
2270
|
-
});
|
|
2271
|
-
var catalogSchema =
|
|
2272
|
-
planos:
|
|
2273
|
-
total_planos:
|
|
2274
|
-
total_qtd_servicos:
|
|
2710
|
+
import { z as z33 } from "zod";
|
|
2711
|
+
var popSchema2 = z33.looseObject({
|
|
2712
|
+
id: z33.number().optional().nullable(),
|
|
2713
|
+
uf: z33.string().optional().nullable(),
|
|
2714
|
+
pop: z33.string().optional().nullable()
|
|
2715
|
+
});
|
|
2716
|
+
var planSchema2 = z33.looseObject({
|
|
2717
|
+
id: z33.number().brand(),
|
|
2718
|
+
descricao: z33.string().optional().nullable(),
|
|
2719
|
+
preco: z33.number().optional().nullable(),
|
|
2720
|
+
ativo: z33.boolean().optional().nullable(),
|
|
2721
|
+
grupo: z33.string().optional().nullable(),
|
|
2722
|
+
tipo: z33.string().optional().nullable(),
|
|
2723
|
+
pos_pago: z33.boolean().optional().nullable(),
|
|
2724
|
+
desconto: z33.number().optional().nullable(),
|
|
2725
|
+
desconto_venc: z33.number().optional().nullable(),
|
|
2726
|
+
desconto_venc_modo: z33.string().optional().nullable(),
|
|
2727
|
+
valor_desconto_temporario: z33.number().optional().nullable(),
|
|
2728
|
+
desconto_temporario_modo: z33.string().optional().nullable(),
|
|
2729
|
+
desconto_temporario_quantidade: z33.number().optional().nullable(),
|
|
2730
|
+
descricao_desconto_temporario: z33.string().optional().nullable(),
|
|
2731
|
+
desconto_temporario_proporcional: z33.boolean().optional().nullable(),
|
|
2732
|
+
observacao: z33.string().optional().nullable(),
|
|
2733
|
+
instalacao_qtd_parcelas: z33.number().optional().nullable(),
|
|
2734
|
+
instalacao_valor: z33.number().optional().nullable(),
|
|
2735
|
+
instalacao_desconto_max: z33.number().optional().nullable(),
|
|
2736
|
+
instalacao_desconto_min: z33.number().optional().nullable(),
|
|
2737
|
+
disponivel_pre_cadastro: z33.boolean().optional().nullable(),
|
|
2738
|
+
disponivel_pre_cadastro_publico: z33.boolean().optional().nullable(),
|
|
2739
|
+
data_validade: z33.string().optional().nullable(),
|
|
2740
|
+
pops: z33.array(popSchema2).optional().nullable(),
|
|
2741
|
+
auto_bloqueio: z33.boolean().optional().nullable(),
|
|
2742
|
+
dias_bloqueio_pos_venc: z33.number().optional().nullable(),
|
|
2743
|
+
dias_bloqueio_aviso: z33.number().optional().nullable(),
|
|
2744
|
+
dias_reducao_velocidade: z33.number().optional().nullable(),
|
|
2745
|
+
download: z33.number().optional().nullable(),
|
|
2746
|
+
upload: z33.number().optional().nullable(),
|
|
2747
|
+
trafego_mensal: z33.number().optional().nullable(),
|
|
2748
|
+
contabilizacao_trafego_mensal: z33.string().optional().nullable(),
|
|
2749
|
+
trafego_excedente_acao: z33.string().optional().nullable(),
|
|
2750
|
+
valor_trafego_excedido: z33.number().optional().nullable(),
|
|
2751
|
+
duplicacao_noturna: z33.boolean().optional().nullable(),
|
|
2752
|
+
inicio_duplicacao_noturna: z33.string().optional().nullable(),
|
|
2753
|
+
fim_duplicacao_noturna: z33.string().optional().nullable(),
|
|
2754
|
+
modo_velocidade_reduzida: z33.string().optional().nullable(),
|
|
2755
|
+
download_red_financeiro: z33.number().optional().nullable(),
|
|
2756
|
+
upload_red_financeiro: z33.number().optional().nullable(),
|
|
2757
|
+
modo_velocidade_red_franquia: z33.string().optional().nullable(),
|
|
2758
|
+
download_red_franquia: z33.number().optional().nullable(),
|
|
2759
|
+
upload_red_franquia: z33.number().optional().nullable(),
|
|
2760
|
+
combo: z33.array(z33.unknown()).optional().nullable(),
|
|
2761
|
+
qtd_servicos: z33.number().optional().nullable()
|
|
2762
|
+
});
|
|
2763
|
+
var catalogSchema = z33.looseObject({
|
|
2764
|
+
planos: z33.array(planSchema2),
|
|
2765
|
+
total_planos: z33.number().optional().nullable(),
|
|
2766
|
+
total_qtd_servicos: z33.number().optional().nullable()
|
|
2275
2767
|
});
|
|
2276
2768
|
var catalogInvariants = ["planos", "planos[].id"];
|
|
2277
|
-
var
|
|
2769
|
+
var buildRequest28 = () => ({ ok: true });
|
|
2278
2770
|
var plansListSensitivity = { input: [], output: [] };
|
|
2279
2771
|
var plansList = {
|
|
2280
2772
|
name: "plans.list",
|
|
2281
2773
|
method: "GET",
|
|
2282
2774
|
pathTemplate: "/api/ura/consultaplano/",
|
|
2283
2775
|
encoding: "json",
|
|
2284
|
-
buildRequest:
|
|
2776
|
+
buildRequest: buildRequest28,
|
|
2285
2777
|
repeatable: true,
|
|
2286
2778
|
decode: tolerantDecoder(catalogSchema, catalogInvariants),
|
|
2287
2779
|
sensitivity: plansListSensitivity
|
|
2288
2780
|
};
|
|
2289
2781
|
|
|
2290
2782
|
// src/operations/pre-registrations-create.ts
|
|
2291
|
-
import { z as
|
|
2292
|
-
var id5 =
|
|
2293
|
-
var amount2 =
|
|
2294
|
-
var commonShape2 = {
|
|
2783
|
+
import { z as z34 } from "zod";
|
|
2784
|
+
var id5 = z34.number().int().nonnegative();
|
|
2785
|
+
var amount2 = z34.number().nonnegative();
|
|
2786
|
+
var commonShape2 = (document) => ({
|
|
2295
2787
|
nome: nonBlank,
|
|
2296
|
-
cpfcnpj:
|
|
2788
|
+
cpfcnpj: document.optional(),
|
|
2297
2789
|
...addressShape,
|
|
2298
2790
|
logradouro: nonBlank,
|
|
2299
|
-
email:
|
|
2300
|
-
celular:
|
|
2301
|
-
datanasc:
|
|
2302
|
-
observacao:
|
|
2791
|
+
email: z34.string().optional(),
|
|
2792
|
+
celular: z34.string().optional(),
|
|
2793
|
+
datanasc: z34.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
2794
|
+
observacao: z34.string().optional(),
|
|
2303
2795
|
usuariocad_id: id5.optional(),
|
|
2304
|
-
precadastro_ativar:
|
|
2796
|
+
precadastro_ativar: z34.literal(1).optional(),
|
|
2305
2797
|
pop_id: id5.optional(),
|
|
2306
2798
|
portador_id: id5.optional(),
|
|
2307
2799
|
nas_id: id5.optional(),
|
|
@@ -2309,48 +2801,53 @@ var commonShape2 = {
|
|
|
2309
2801
|
vencimento_id: id5.optional(),
|
|
2310
2802
|
formacobranca_id: id5.optional(),
|
|
2311
2803
|
fidelidade_id: id5.optional(),
|
|
2312
|
-
login:
|
|
2313
|
-
senha:
|
|
2314
|
-
central_senha:
|
|
2315
|
-
modoaquisicao:
|
|
2316
|
-
servicodesc:
|
|
2804
|
+
login: z34.string().optional(),
|
|
2805
|
+
senha: z34.string().optional(),
|
|
2806
|
+
central_senha: z34.string().optional(),
|
|
2807
|
+
modoaquisicao: z34.union([z34.literal(0), z34.literal(1)]).optional(),
|
|
2808
|
+
servicodesc: z34.string().optional(),
|
|
2317
2809
|
midia_id: id5.optional(),
|
|
2318
2810
|
vendedor_id: id5.optional(),
|
|
2319
2811
|
tecnico_id: id5.optional(),
|
|
2320
|
-
os_instalacao:
|
|
2812
|
+
os_instalacao: z34.literal(1).optional(),
|
|
2321
2813
|
instalacao_preco: amount2.optional(),
|
|
2322
2814
|
instalacao_desconto: amount2.optional(),
|
|
2323
2815
|
instalacao_entrada: amount2.optional(),
|
|
2324
2816
|
instalacao_quantidade_parcelas: id5.optional(),
|
|
2325
2817
|
instalacao_entrada_forma: id5.optional(),
|
|
2326
2818
|
instalacao_parcela_forma: id5.optional()
|
|
2327
|
-
};
|
|
2328
|
-
var preRegistrationsCreateInputSchema =
|
|
2329
|
-
|
|
2330
|
-
personType:
|
|
2331
|
-
...commonShape2,
|
|
2332
|
-
rg:
|
|
2333
|
-
rg_emissor:
|
|
2334
|
-
nomepai:
|
|
2335
|
-
nomemae:
|
|
2336
|
-
nacionalidade:
|
|
2337
|
-
naturalidade:
|
|
2338
|
-
estadocivil:
|
|
2339
|
-
sexo:
|
|
2340
|
-
profissao:
|
|
2819
|
+
});
|
|
2820
|
+
var preRegistrationsCreateInputSchema = z34.discriminatedUnion("personType", [
|
|
2821
|
+
z34.strictObject({
|
|
2822
|
+
personType: z34.literal("F"),
|
|
2823
|
+
...commonShape2(storedCpfSchema),
|
|
2824
|
+
rg: z34.string().optional(),
|
|
2825
|
+
rg_emissor: z34.string().optional(),
|
|
2826
|
+
nomepai: z34.string().optional(),
|
|
2827
|
+
nomemae: z34.string().optional(),
|
|
2828
|
+
nacionalidade: z34.string().optional(),
|
|
2829
|
+
naturalidade: z34.string().optional(),
|
|
2830
|
+
estadocivil: z34.enum(["S", "C", "D", "V"]).optional(),
|
|
2831
|
+
sexo: z34.enum(["M", "F"]).optional(),
|
|
2832
|
+
profissao: z34.string().optional()
|
|
2341
2833
|
}),
|
|
2342
|
-
|
|
2343
|
-
personType:
|
|
2344
|
-
...commonShape2,
|
|
2345
|
-
nomefantasia:
|
|
2346
|
-
respempresa:
|
|
2347
|
-
respcpf:
|
|
2834
|
+
z34.strictObject({
|
|
2835
|
+
personType: z34.literal("J"),
|
|
2836
|
+
...commonShape2(storedCnpjSchema),
|
|
2837
|
+
nomefantasia: z34.string().optional(),
|
|
2838
|
+
respempresa: z34.string().optional(),
|
|
2839
|
+
respcpf: z34.string().optional()
|
|
2348
2840
|
})
|
|
2349
2841
|
]);
|
|
2350
|
-
var
|
|
2842
|
+
var buildRequest29 = (input) => {
|
|
2351
2843
|
const parsed = preRegistrationsCreateInputSchema.safeParse(input);
|
|
2352
|
-
if (!parsed.success)
|
|
2353
|
-
return {
|
|
2844
|
+
if (!parsed.success) {
|
|
2845
|
+
return {
|
|
2846
|
+
ok: false,
|
|
2847
|
+
problem: "invalid preRegistrations.create input",
|
|
2848
|
+
issues: documentIssues(parsed.error)
|
|
2849
|
+
};
|
|
2850
|
+
}
|
|
2354
2851
|
const {
|
|
2355
2852
|
personType,
|
|
2356
2853
|
logradouro,
|
|
@@ -2385,10 +2882,41 @@ var buildRequest23 = (input) => {
|
|
|
2385
2882
|
params: { ...fields, ...flatAddress(address) }
|
|
2386
2883
|
};
|
|
2387
2884
|
};
|
|
2388
|
-
var createdSchema2 =
|
|
2885
|
+
var createdSchema2 = z34.looseObject({
|
|
2886
|
+
message: z34.string(),
|
|
2887
|
+
precadastro_id: normalizedNumber.optional(),
|
|
2888
|
+
new_cliente_id: normalizedNumber.pipe(customerIdSchema.nullable()).optional(),
|
|
2889
|
+
new_contrato_id: normalizedNumber.optional()
|
|
2890
|
+
});
|
|
2389
2891
|
var createdInvariants2 = ["message"];
|
|
2390
|
-
var
|
|
2391
|
-
var
|
|
2892
|
+
var DOCUMENT_ALREADY_REGISTERED_TEXT2 = /^já existe um cliente com o cpf informado\.?$/i;
|
|
2893
|
+
var documentAlreadyRegistered2 = errorStringRejection(402, DOCUMENT_ALREADY_REGISTERED_TEXT2, "DOCUMENT_ALREADY_REGISTERED");
|
|
2894
|
+
var DOCUMENT_INVALID_TEXT2 = /^cpf inválido\.?$/i;
|
|
2895
|
+
var documentInvalid2 = {
|
|
2896
|
+
status: 400,
|
|
2897
|
+
reason: "DOCUMENT_INVALID",
|
|
2898
|
+
matches: (body) => {
|
|
2899
|
+
if (body.kind !== "json" || !isRecord(body.value))
|
|
2900
|
+
return false;
|
|
2901
|
+
if (Object.keys(body.value).length !== 2)
|
|
2902
|
+
return false;
|
|
2903
|
+
const { message, error } = body.value;
|
|
2904
|
+
return typeof message === "string" && typeof error === "string" && DOCUMENT_INVALID_TEXT2.test(message.trim());
|
|
2905
|
+
}
|
|
2906
|
+
};
|
|
2907
|
+
var LOGIN_ALREADY_REGISTERED_TEXT = /^login \S.* já existe$/i;
|
|
2908
|
+
var loginAlreadyRegistered = {
|
|
2909
|
+
status: 400,
|
|
2910
|
+
reason: "LOGIN_ALREADY_REGISTERED",
|
|
2911
|
+
matches: (body) => {
|
|
2912
|
+
if (body.kind !== "json" || !isRecord(body.value))
|
|
2913
|
+
return false;
|
|
2914
|
+
if (Object.keys(body.value).length !== 2)
|
|
2915
|
+
return false;
|
|
2916
|
+
const { message, error } = body.value;
|
|
2917
|
+
return typeof message === "string" && typeof error === "string" && LOGIN_ALREADY_REGISTERED_TEXT.test(message.trim());
|
|
2918
|
+
}
|
|
2919
|
+
};
|
|
2392
2920
|
var preRegistrationsCreateSensitivity = {
|
|
2393
2921
|
input: [
|
|
2394
2922
|
{
|
|
@@ -2436,74 +2964,74 @@ var preRegistrationsCreate = {
|
|
|
2436
2964
|
pathTemplate: "/api/precadastro/{personType}",
|
|
2437
2965
|
encoding: "form",
|
|
2438
2966
|
repeatable: false,
|
|
2439
|
-
write: { knownRejections: [
|
|
2440
|
-
buildRequest:
|
|
2967
|
+
write: { knownRejections: [documentAlreadyRegistered2, documentInvalid2, loginAlreadyRegistered] },
|
|
2968
|
+
buildRequest: buildRequest29,
|
|
2441
2969
|
decode: tolerantDecoder(createdSchema2, createdInvariants2),
|
|
2442
2970
|
sensitivity: preRegistrationsCreateSensitivity
|
|
2443
2971
|
};
|
|
2444
2972
|
|
|
2445
2973
|
// src/operations/pre-registrations-list-due-days.ts
|
|
2446
|
-
import { z as
|
|
2447
|
-
var dueDaySchema =
|
|
2448
|
-
id:
|
|
2449
|
-
dia:
|
|
2974
|
+
import { z as z35 } from "zod";
|
|
2975
|
+
var dueDaySchema = z35.looseObject({
|
|
2976
|
+
id: z35.number(),
|
|
2977
|
+
dia: z35.number().optional().nullable()
|
|
2450
2978
|
});
|
|
2451
|
-
var dueDaysSchema =
|
|
2979
|
+
var dueDaysSchema = z35.array(dueDaySchema);
|
|
2452
2980
|
var dueDaysInvariants = ["[].id"];
|
|
2453
|
-
var
|
|
2981
|
+
var buildRequest30 = () => ({ ok: true });
|
|
2454
2982
|
var preRegistrationsListDueDaysSensitivity = { input: [], output: [] };
|
|
2455
2983
|
var preRegistrationsListDueDays = {
|
|
2456
2984
|
name: "preRegistrations.listDueDays",
|
|
2457
2985
|
method: "POST",
|
|
2458
2986
|
pathTemplate: "/api/precadastro/vencimento/list",
|
|
2459
2987
|
encoding: "json",
|
|
2460
|
-
buildRequest:
|
|
2988
|
+
buildRequest: buildRequest30,
|
|
2461
2989
|
repeatable: true,
|
|
2462
2990
|
decode: tolerantDecoder(dueDaysSchema, dueDaysInvariants),
|
|
2463
2991
|
sensitivity: preRegistrationsListDueDaysSensitivity
|
|
2464
2992
|
};
|
|
2465
2993
|
|
|
2466
2994
|
// src/operations/pre-registrations-list-plans.ts
|
|
2467
|
-
import { z as
|
|
2468
|
-
var
|
|
2469
|
-
gateway_id:
|
|
2470
|
-
id:
|
|
2471
|
-
descricao:
|
|
2472
|
-
});
|
|
2473
|
-
var preRegistrationPlanSchema =
|
|
2474
|
-
id:
|
|
2475
|
-
tipo:
|
|
2476
|
-
valor:
|
|
2477
|
-
descricao:
|
|
2478
|
-
observacao:
|
|
2479
|
-
gateway:
|
|
2480
|
-
});
|
|
2481
|
-
var preRegistrationPlansSchema =
|
|
2995
|
+
import { z as z36 } from "zod";
|
|
2996
|
+
var gatewaySchema2 = z36.looseObject({
|
|
2997
|
+
gateway_id: normalizedNumber.optional(),
|
|
2998
|
+
id: normalizedNumber.optional(),
|
|
2999
|
+
descricao: z36.string().optional().nullable()
|
|
3000
|
+
});
|
|
3001
|
+
var preRegistrationPlanSchema = z36.looseObject({
|
|
3002
|
+
id: z36.number().brand(),
|
|
3003
|
+
tipo: z36.string().optional().nullable(),
|
|
3004
|
+
valor: z36.number().optional().nullable(),
|
|
3005
|
+
descricao: z36.string().optional().nullable(),
|
|
3006
|
+
observacao: z36.string().optional().nullable(),
|
|
3007
|
+
gateway: gatewaySchema2.optional().nullable()
|
|
3008
|
+
});
|
|
3009
|
+
var preRegistrationPlansSchema = z36.array(preRegistrationPlanSchema);
|
|
2482
3010
|
var preRegistrationPlansInvariants = ["[].id"];
|
|
2483
|
-
var
|
|
3011
|
+
var buildRequest31 = () => ({ ok: true });
|
|
2484
3012
|
var preRegistrationsListPlansSensitivity = { input: [], output: [] };
|
|
2485
3013
|
var preRegistrationsListPlans = {
|
|
2486
3014
|
name: "preRegistrations.listPlans",
|
|
2487
3015
|
method: "POST",
|
|
2488
3016
|
pathTemplate: "/api/precadastro/plano/list",
|
|
2489
3017
|
encoding: "form",
|
|
2490
|
-
buildRequest:
|
|
3018
|
+
buildRequest: buildRequest31,
|
|
2491
3019
|
repeatable: true,
|
|
2492
3020
|
decode: tolerantDecoder(preRegistrationPlansSchema, preRegistrationPlansInvariants),
|
|
2493
3021
|
sensitivity: preRegistrationsListPlansSensitivity
|
|
2494
3022
|
};
|
|
2495
3023
|
|
|
2496
3024
|
// src/operations/pre-registrations-list-sellers.ts
|
|
2497
|
-
import { z as
|
|
2498
|
-
var sellerSchema =
|
|
2499
|
-
id:
|
|
2500
|
-
nome:
|
|
2501
|
-
cpf:
|
|
2502
|
-
email:
|
|
2503
|
-
});
|
|
2504
|
-
var sellersSchema =
|
|
3025
|
+
import { z as z37 } from "zod";
|
|
3026
|
+
var sellerSchema = z37.looseObject({
|
|
3027
|
+
id: z37.number(),
|
|
3028
|
+
nome: z37.string().optional().nullable(),
|
|
3029
|
+
cpf: z37.string().optional().nullable(),
|
|
3030
|
+
email: z37.string().optional().nullable()
|
|
3031
|
+
});
|
|
3032
|
+
var sellersSchema = z37.array(sellerSchema);
|
|
2505
3033
|
var sellersInvariants = ["[].id"];
|
|
2506
|
-
var
|
|
3034
|
+
var buildRequest32 = () => ({ ok: true });
|
|
2507
3035
|
var preRegistrationsListSellersSensitivity = {
|
|
2508
3036
|
input: [],
|
|
2509
3037
|
output: [{ path: "[]", secretKeys: [], personalKeys: ["nome", "cpf", "email"] }]
|
|
@@ -2513,32 +3041,74 @@ var preRegistrationsListSellers = {
|
|
|
2513
3041
|
method: "POST",
|
|
2514
3042
|
pathTemplate: "/api/precadastro/vendedor/list",
|
|
2515
3043
|
encoding: "json",
|
|
2516
|
-
buildRequest:
|
|
3044
|
+
buildRequest: buildRequest32,
|
|
2517
3045
|
repeatable: true,
|
|
2518
3046
|
decode: tolerantDecoder(sellersSchema, sellersInvariants),
|
|
2519
3047
|
sensitivity: preRegistrationsListSellersSensitivity
|
|
2520
3048
|
};
|
|
2521
3049
|
|
|
2522
|
-
// src/operations/services-add-
|
|
2523
|
-
import { z as
|
|
2524
|
-
var id6 =
|
|
2525
|
-
var
|
|
3050
|
+
// src/operations/services-add-generic.ts
|
|
3051
|
+
import { z as z38 } from "zod";
|
|
3052
|
+
var id6 = z38.number().int().positive();
|
|
3053
|
+
var servicesAddGenericInputSchema = z38.strictObject({
|
|
2526
3054
|
clientecontrato_id: id6,
|
|
2527
3055
|
planobase_id: id6.brand(),
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
3056
|
+
descricao: z38.string().optional(),
|
|
3057
|
+
identificador_gateway: z38.string().optional(),
|
|
3058
|
+
identificador_gateway_extra: z38.string().optional(),
|
|
3059
|
+
login: z38.string().optional(),
|
|
3060
|
+
senha: z38.string().optional()
|
|
3061
|
+
});
|
|
3062
|
+
var buildRequest33 = (input) => {
|
|
3063
|
+
const parsed = servicesAddGenericInputSchema.safeParse(input);
|
|
3064
|
+
if (!parsed.success)
|
|
3065
|
+
return { ok: false, problem: "invalid services.addGeneric input" };
|
|
3066
|
+
return { ok: true, params: parsed.data };
|
|
3067
|
+
};
|
|
3068
|
+
var genericAddedSchema = z38.looseObject({});
|
|
3069
|
+
var planNotGeneric = errorStringRejection(400, /^plano informado não é do tipo genérico\.?$/i, "PLAN_NOT_GENERIC");
|
|
3070
|
+
var servicesAddGenericSensitivity = {
|
|
3071
|
+
input: [
|
|
3072
|
+
{
|
|
3073
|
+
path: "",
|
|
3074
|
+
secretKeys: ["login", "senha", "identificador_gateway", "identificador_gateway_extra"],
|
|
3075
|
+
personalKeys: ["descricao"]
|
|
3076
|
+
}
|
|
3077
|
+
],
|
|
3078
|
+
output: []
|
|
3079
|
+
};
|
|
3080
|
+
var servicesAddGeneric = {
|
|
3081
|
+
name: "services.addGeneric",
|
|
3082
|
+
method: "POST",
|
|
3083
|
+
pathTemplate: "/api/servico/generico",
|
|
3084
|
+
encoding: "form",
|
|
3085
|
+
repeatable: false,
|
|
3086
|
+
write: { knownRejections: [planNotGeneric] },
|
|
3087
|
+
buildRequest: buildRequest33,
|
|
3088
|
+
decode: tolerantDecoder(genericAddedSchema, []),
|
|
3089
|
+
sensitivity: servicesAddGenericSensitivity
|
|
3090
|
+
};
|
|
3091
|
+
|
|
3092
|
+
// src/operations/services-add-tv.ts
|
|
3093
|
+
import { z as z39 } from "zod";
|
|
3094
|
+
var id7 = z39.number().int().positive();
|
|
3095
|
+
var servicesAddTvInputSchema = z39.strictObject({
|
|
3096
|
+
clientecontrato_id: id7,
|
|
3097
|
+
planobase_id: id7.brand(),
|
|
3098
|
+
info_extra: z39.string().optional(),
|
|
3099
|
+
tipo_equipamento: id7.optional(),
|
|
3100
|
+
endereco_id: id7.optional()
|
|
3101
|
+
});
|
|
3102
|
+
var buildRequest34 = (input) => {
|
|
2533
3103
|
const parsed = servicesAddTvInputSchema.safeParse(input);
|
|
2534
3104
|
if (!parsed.success)
|
|
2535
3105
|
return { ok: false, problem: "invalid services.addTv input" };
|
|
2536
3106
|
return { ok: true, params: parsed.data };
|
|
2537
3107
|
};
|
|
2538
|
-
var tvAddedSchema =
|
|
2539
|
-
msg:
|
|
2540
|
-
clientecontrato_id:
|
|
2541
|
-
servico_id:
|
|
3108
|
+
var tvAddedSchema = z39.looseObject({
|
|
3109
|
+
msg: z39.string(),
|
|
3110
|
+
clientecontrato_id: normalizedNumber.optional(),
|
|
3111
|
+
servico_id: z39.number()
|
|
2542
3112
|
});
|
|
2543
3113
|
var tvAddedInvariants = ["servico_id", "msg"];
|
|
2544
3114
|
var CONTRACT_NOT_ACTIVE_TEXT = /^clientecontrato_id: só é possível adicionar serviços em contratos ativos\.?$/i;
|
|
@@ -2554,20 +3124,20 @@ var servicesAddTv = {
|
|
|
2554
3124
|
encoding: "form",
|
|
2555
3125
|
repeatable: false,
|
|
2556
3126
|
write: { knownRejections: [contractNotActive] },
|
|
2557
|
-
buildRequest:
|
|
3127
|
+
buildRequest: buildRequest34,
|
|
2558
3128
|
decode: tolerantDecoder(tvAddedSchema, tvAddedInvariants),
|
|
2559
3129
|
sensitivity: servicesAddTvSensitivity
|
|
2560
3130
|
};
|
|
2561
3131
|
|
|
2562
3132
|
// src/operations/services-change-plan.ts
|
|
2563
|
-
import { z as
|
|
2564
|
-
var
|
|
2565
|
-
var servicesChangePlanInputSchema =
|
|
2566
|
-
servico_id:
|
|
2567
|
-
servico_tipo:
|
|
2568
|
-
plano_id:
|
|
3133
|
+
import { z as z40 } from "zod";
|
|
3134
|
+
var id8 = z40.number().int().positive();
|
|
3135
|
+
var servicesChangePlanInputSchema = z40.strictObject({
|
|
3136
|
+
servico_id: id8,
|
|
3137
|
+
servico_tipo: id8,
|
|
3138
|
+
plano_id: id8.brand()
|
|
2569
3139
|
});
|
|
2570
|
-
var
|
|
3140
|
+
var buildRequest35 = (input) => {
|
|
2571
3141
|
const parsed = servicesChangePlanInputSchema.safeParse(input);
|
|
2572
3142
|
if (!parsed.success)
|
|
2573
3143
|
return { ok: false, problem: "invalid services.changePlan input" };
|
|
@@ -2578,7 +3148,7 @@ var buildRequest28 = (input) => {
|
|
|
2578
3148
|
params: { servico_tipo, action: "change_plano", plano_id }
|
|
2579
3149
|
};
|
|
2580
3150
|
};
|
|
2581
|
-
var planChangedSchema =
|
|
3151
|
+
var planChangedSchema = z40.looseObject({ msg: z40.string() });
|
|
2582
3152
|
var planChangedInvariants = ["msg"];
|
|
2583
3153
|
var servicesChangePlanSensitivity = { input: [], output: [] };
|
|
2584
3154
|
var servicesChangePlan = {
|
|
@@ -2588,29 +3158,57 @@ var servicesChangePlan = {
|
|
|
2588
3158
|
encoding: "form",
|
|
2589
3159
|
repeatable: false,
|
|
2590
3160
|
write: {},
|
|
2591
|
-
buildRequest:
|
|
3161
|
+
buildRequest: buildRequest35,
|
|
2592
3162
|
decode: tolerantDecoder(planChangedSchema, planChangedInvariants),
|
|
2593
3163
|
sensitivity: servicesChangePlanSensitivity
|
|
2594
3164
|
};
|
|
2595
3165
|
|
|
3166
|
+
// src/operations/services-remove-generic.ts
|
|
3167
|
+
import { z as z41 } from "zod";
|
|
3168
|
+
var id9 = z41.number().int().positive();
|
|
3169
|
+
var servicesRemoveGenericInputSchema = z41.strictObject({
|
|
3170
|
+
servico_id: id9,
|
|
3171
|
+
clientecontrato_id: id9
|
|
3172
|
+
});
|
|
3173
|
+
var buildRequest36 = (input) => {
|
|
3174
|
+
const parsed = servicesRemoveGenericInputSchema.safeParse(input);
|
|
3175
|
+
if (!parsed.success)
|
|
3176
|
+
return { ok: false, problem: "invalid services.removeGeneric input" };
|
|
3177
|
+
const { servico_id, clientecontrato_id } = parsed.data;
|
|
3178
|
+
return { ok: true, pathParams: { servico_id }, params: { clientecontrato_id } };
|
|
3179
|
+
};
|
|
3180
|
+
var genericRemovedSchema = z41.looseObject({});
|
|
3181
|
+
var servicesRemoveGenericSensitivity = { input: [], output: [] };
|
|
3182
|
+
var servicesRemoveGeneric = {
|
|
3183
|
+
name: "services.removeGeneric",
|
|
3184
|
+
method: "DELETE",
|
|
3185
|
+
pathTemplate: "/api/servico/generico/{servico_id}",
|
|
3186
|
+
encoding: "form",
|
|
3187
|
+
repeatable: false,
|
|
3188
|
+
write: {},
|
|
3189
|
+
buildRequest: buildRequest36,
|
|
3190
|
+
decode: tolerantDecoder(genericRemovedSchema, []),
|
|
3191
|
+
sensitivity: servicesRemoveGenericSensitivity
|
|
3192
|
+
};
|
|
3193
|
+
|
|
2596
3194
|
// src/operations/services-remove-tv.ts
|
|
2597
|
-
import { z as
|
|
2598
|
-
var
|
|
2599
|
-
var servicesRemoveTvInputSchema =
|
|
2600
|
-
servico_id:
|
|
2601
|
-
clientecontrato_id:
|
|
3195
|
+
import { z as z42 } from "zod";
|
|
3196
|
+
var id10 = z42.number().int().positive();
|
|
3197
|
+
var servicesRemoveTvInputSchema = z42.strictObject({
|
|
3198
|
+
servico_id: id10,
|
|
3199
|
+
clientecontrato_id: id10
|
|
2602
3200
|
});
|
|
2603
|
-
var
|
|
3201
|
+
var buildRequest37 = (input) => {
|
|
2604
3202
|
const parsed = servicesRemoveTvInputSchema.safeParse(input);
|
|
2605
3203
|
if (!parsed.success)
|
|
2606
3204
|
return { ok: false, problem: "invalid services.removeTv input" };
|
|
2607
3205
|
const { servico_id, clientecontrato_id } = parsed.data;
|
|
2608
3206
|
return { ok: true, pathParams: { servico_id }, params: { clientecontrato_id } };
|
|
2609
3207
|
};
|
|
2610
|
-
var tvRemovedSchema =
|
|
2611
|
-
msg:
|
|
2612
|
-
clientecontrato_id:
|
|
2613
|
-
servico_id:
|
|
3208
|
+
var tvRemovedSchema = z42.looseObject({
|
|
3209
|
+
msg: z42.string(),
|
|
3210
|
+
clientecontrato_id: normalizedNumber.optional(),
|
|
3211
|
+
servico_id: z42.number()
|
|
2614
3212
|
});
|
|
2615
3213
|
var tvRemovedInvariants = ["servico_id", "msg"];
|
|
2616
3214
|
var servicesRemoveTvSensitivity = { input: [], output: [] };
|
|
@@ -2621,64 +3219,208 @@ var servicesRemoveTv = {
|
|
|
2621
3219
|
encoding: "form",
|
|
2622
3220
|
repeatable: false,
|
|
2623
3221
|
write: {},
|
|
2624
|
-
buildRequest:
|
|
3222
|
+
buildRequest: buildRequest37,
|
|
2625
3223
|
decode: tolerantDecoder(tvRemovedSchema, tvRemovedInvariants),
|
|
2626
3224
|
sensitivity: servicesRemoveTvSensitivity
|
|
2627
3225
|
};
|
|
2628
3226
|
|
|
3227
|
+
// src/operations/work-orders-get.ts
|
|
3228
|
+
import { z as z43 } from "zod";
|
|
3229
|
+
var numberOrText2 = z43.union([z43.number(), z43.string()]);
|
|
3230
|
+
var workOrderDetailSchema = z43.looseObject({
|
|
3231
|
+
os_id: z43.number(),
|
|
3232
|
+
os_protocolo: z43.string().optional().nullable(),
|
|
3233
|
+
os_status: z43.number().optional().nullable(),
|
|
3234
|
+
os_status_txt: z43.string().optional().nullable(),
|
|
3235
|
+
os_prioridade: z43.number().optional().nullable(),
|
|
3236
|
+
os_motivo_id: z43.number().optional().nullable(),
|
|
3237
|
+
os_motivo_descricao: z43.string().optional().nullable(),
|
|
3238
|
+
os_data_cadastro: z43.string().optional().nullable(),
|
|
3239
|
+
os_data_agendamento: z43.string().optional().nullable(),
|
|
3240
|
+
os_data_finalizacao: z43.string().optional().nullable(),
|
|
3241
|
+
os_conteudo: z43.string().optional().nullable(),
|
|
3242
|
+
os_observacao: z43.string().optional().nullable(),
|
|
3243
|
+
os_anotacao: z43.string().optional().nullable(),
|
|
3244
|
+
os_servicoprestado: z43.string().optional().nullable(),
|
|
3245
|
+
os_setor_id: normalizedNumber.optional(),
|
|
3246
|
+
os_setor: z43.string().optional().nullable(),
|
|
3247
|
+
os_tecnico_responsavel: z43.string().optional().nullable(),
|
|
3248
|
+
os_tecnicos_auxiliares: z43.array(z43.unknown()).optional().nullable(),
|
|
3249
|
+
os_agendamento_confirmado: z43.boolean().optional().nullable(),
|
|
3250
|
+
os_agendamento_confirmacao_data: z43.string().optional().nullable(),
|
|
3251
|
+
os_agendamento_confirmacao_status: z43.number().optional().nullable(),
|
|
3252
|
+
os_agendamento_confirmacao_status_txt: z43.string().optional().nullable(),
|
|
3253
|
+
os_close_edit: z43.boolean().optional().nullable(),
|
|
3254
|
+
os_encerrada_impedir_estorno: z43.boolean().optional().nullable(),
|
|
3255
|
+
os_encerrada_impedir_lancamento_avulso: z43.boolean().optional().nullable(),
|
|
3256
|
+
os_finalizada_permite_add_imagem: z43.boolean().optional().nullable(),
|
|
3257
|
+
os_lancamento_comodato: z43.boolean().optional().nullable(),
|
|
3258
|
+
os_djson: z43.record(z43.string(), z43.unknown()).optional().nullable(),
|
|
3259
|
+
comentarios: z43.array(z43.unknown()).optional().nullable(),
|
|
3260
|
+
cliente_id: customerIdSchema.optional().nullable(),
|
|
3261
|
+
cliente: z43.string().optional().nullable(),
|
|
3262
|
+
cliente_email: z43.string().optional().nullable(),
|
|
3263
|
+
cliente_contato: z43.string().optional().nullable(),
|
|
3264
|
+
contrato_id: z43.number().optional().nullable(),
|
|
3265
|
+
contrato_status: trimmedText.optional().nullable(),
|
|
3266
|
+
contrato_status_id: normalizedNumber.optional(),
|
|
3267
|
+
contrato_status_data: z43.string().optional().nullable(),
|
|
3268
|
+
contrato_pop_id: z43.number().optional().nullable(),
|
|
3269
|
+
contrato_pop: z43.string().optional().nullable(),
|
|
3270
|
+
contrato_endereco_ll: z43.string().optional().nullable(),
|
|
3271
|
+
endereco_id: z43.number().optional().nullable(),
|
|
3272
|
+
endereco_logradouro: z43.string().optional().nullable(),
|
|
3273
|
+
endereco_numero: numberOrText2.optional().nullable(),
|
|
3274
|
+
endereco_complemento: z43.string().optional().nullable(),
|
|
3275
|
+
endereco_bairro: z43.string().optional().nullable(),
|
|
3276
|
+
endereco_cidade: z43.string().optional().nullable(),
|
|
3277
|
+
endereco_uf: z43.string().optional().nullable(),
|
|
3278
|
+
endereco_pontoreferencia: z43.string().optional().nullable(),
|
|
3279
|
+
endereco_ll: z43.string().optional().nullable(),
|
|
3280
|
+
plano_id: z43.number().optional().nullable(),
|
|
3281
|
+
plano: z43.string().optional().nullable(),
|
|
3282
|
+
plano_download: z43.string().optional().nullable(),
|
|
3283
|
+
plano_upload: z43.string().optional().nullable(),
|
|
3284
|
+
servico_id: normalizedNumber.optional(),
|
|
3285
|
+
servico_tipo: z43.number().optional().nullable(),
|
|
3286
|
+
servico_login: z43.string().optional().nullable(),
|
|
3287
|
+
servico_password: z43.string().optional().nullable(),
|
|
3288
|
+
servico_online: z43.boolean().optional().nullable(),
|
|
3289
|
+
servico_mac: z43.string().optional().nullable(),
|
|
3290
|
+
servico_ip: z43.string().optional().nullable(),
|
|
3291
|
+
servico_online_mac: z43.string().optional().nullable(),
|
|
3292
|
+
servico_online_ip: z43.string().optional().nullable(),
|
|
3293
|
+
servico_online_ipv6_pd: z43.unknown().optional(),
|
|
3294
|
+
nas_ip: z43.string().optional().nullable(),
|
|
3295
|
+
wifi_ssid: z43.string().optional().nullable(),
|
|
3296
|
+
wifi_password: z43.string().optional().nullable(),
|
|
3297
|
+
wifi_channel: z43.string().optional().nullable(),
|
|
3298
|
+
wifi_ssid_5: z43.string().optional().nullable(),
|
|
3299
|
+
wifi_password_5: z43.string().optional().nullable(),
|
|
3300
|
+
wifi_channel_5: z43.string().optional().nullable(),
|
|
3301
|
+
wan_user: z43.string().optional().nullable(),
|
|
3302
|
+
wan_password: z43.string().optional().nullable()
|
|
3303
|
+
});
|
|
3304
|
+
var workOrdersGetInputSchema = z43.strictObject({
|
|
3305
|
+
id: z43.number().int().positive()
|
|
3306
|
+
});
|
|
3307
|
+
var buildRequest38 = (input) => {
|
|
3308
|
+
const parsed = workOrdersGetInputSchema.safeParse(input);
|
|
3309
|
+
if (!parsed.success)
|
|
3310
|
+
return { ok: false, problem: "invalid workOrders.get input" };
|
|
3311
|
+
return { ok: true, pathParams: { id: parsed.data.id } };
|
|
3312
|
+
};
|
|
3313
|
+
var detailInvariants = ["os_id"];
|
|
3314
|
+
var workOrdersGetSensitivity = {
|
|
3315
|
+
input: [],
|
|
3316
|
+
output: [
|
|
3317
|
+
{
|
|
3318
|
+
path: "",
|
|
3319
|
+
secretKeys: [
|
|
3320
|
+
"servico_login",
|
|
3321
|
+
"servico_password",
|
|
3322
|
+
"servico_mac",
|
|
3323
|
+
"servico_ip",
|
|
3324
|
+
"servico_online_mac",
|
|
3325
|
+
"servico_online_ip",
|
|
3326
|
+
"servico_online_ipv6_pd",
|
|
3327
|
+
"nas_ip",
|
|
3328
|
+
"wifi_ssid",
|
|
3329
|
+
"wifi_password",
|
|
3330
|
+
"wifi_ssid_5",
|
|
3331
|
+
"wifi_password_5",
|
|
3332
|
+
"wan_user",
|
|
3333
|
+
"wan_password"
|
|
3334
|
+
],
|
|
3335
|
+
personalKeys: [
|
|
3336
|
+
"cliente",
|
|
3337
|
+
"cliente_email",
|
|
3338
|
+
"cliente_contato",
|
|
3339
|
+
"endereco_logradouro",
|
|
3340
|
+
"endereco_numero",
|
|
3341
|
+
"endereco_complemento",
|
|
3342
|
+
"endereco_bairro",
|
|
3343
|
+
"endereco_cidade",
|
|
3344
|
+
"endereco_uf",
|
|
3345
|
+
"endereco_pontoreferencia",
|
|
3346
|
+
"endereco_ll",
|
|
3347
|
+
"contrato_endereco_ll",
|
|
3348
|
+
"os_conteudo",
|
|
3349
|
+
"os_observacao",
|
|
3350
|
+
"os_anotacao",
|
|
3351
|
+
"os_servicoprestado",
|
|
3352
|
+
"os_tecnico_responsavel",
|
|
3353
|
+
"os_tecnicos_auxiliares",
|
|
3354
|
+
"comentarios",
|
|
3355
|
+
"os_djson"
|
|
3356
|
+
]
|
|
3357
|
+
}
|
|
3358
|
+
]
|
|
3359
|
+
};
|
|
3360
|
+
var workOrdersGet = {
|
|
3361
|
+
name: "workOrders.get",
|
|
3362
|
+
method: "POST",
|
|
3363
|
+
pathTemplate: "/api/os/list/id/{id}",
|
|
3364
|
+
encoding: "form",
|
|
3365
|
+
buildRequest: buildRequest38,
|
|
3366
|
+
repeatable: true,
|
|
3367
|
+
decode: tolerantDecoder(workOrderDetailSchema, detailInvariants),
|
|
3368
|
+
sensitivity: workOrdersGetSensitivity
|
|
3369
|
+
};
|
|
3370
|
+
|
|
2629
3371
|
// src/operations/work-orders-list.ts
|
|
2630
|
-
import { z as
|
|
2631
|
-
var
|
|
2632
|
-
id:
|
|
2633
|
-
contrato:
|
|
2634
|
-
status_id:
|
|
2635
|
-
status:
|
|
2636
|
-
tipo_id:
|
|
2637
|
-
data_cadastro:
|
|
2638
|
-
cliente:
|
|
2639
|
-
contrato_status:
|
|
2640
|
-
contrato_status_id:
|
|
2641
|
-
ocorrencia:
|
|
2642
|
-
hora_cadastro:
|
|
2643
|
-
data_agendamento:
|
|
2644
|
-
hora_agendamento:
|
|
2645
|
-
data_finalizacao:
|
|
2646
|
-
hora_finalizacao:
|
|
2647
|
-
tipo:
|
|
2648
|
-
motivo:
|
|
2649
|
-
pop:
|
|
2650
|
-
conteudo:
|
|
2651
|
-
responsavel:
|
|
2652
|
-
tecnicos_auxiliares:
|
|
2653
|
-
usuario:
|
|
2654
|
-
usuario_finalizacao:
|
|
2655
|
-
classificacoes:
|
|
2656
|
-
});
|
|
2657
|
-
var
|
|
2658
|
-
paginacao:
|
|
2659
|
-
offset:
|
|
2660
|
-
limit:
|
|
2661
|
-
parcial:
|
|
2662
|
-
total:
|
|
3372
|
+
import { z as z44 } from "zod";
|
|
3373
|
+
var workOrderSchema2 = z44.looseObject({
|
|
3374
|
+
id: z44.number(),
|
|
3375
|
+
contrato: z44.number().optional().nullable(),
|
|
3376
|
+
status_id: z44.number().optional().nullable(),
|
|
3377
|
+
status: z44.string().optional().nullable(),
|
|
3378
|
+
tipo_id: z44.number().optional().nullable(),
|
|
3379
|
+
data_cadastro: z44.string().optional().nullable(),
|
|
3380
|
+
cliente: z44.string().optional().nullable(),
|
|
3381
|
+
contrato_status: z44.string().optional().nullable(),
|
|
3382
|
+
contrato_status_id: z44.number().optional().nullable(),
|
|
3383
|
+
ocorrencia: z44.string().optional().nullable(),
|
|
3384
|
+
hora_cadastro: z44.string().optional().nullable(),
|
|
3385
|
+
data_agendamento: z44.string().optional().nullable(),
|
|
3386
|
+
hora_agendamento: z44.string().optional().nullable(),
|
|
3387
|
+
data_finalizacao: z44.string().optional().nullable(),
|
|
3388
|
+
hora_finalizacao: z44.string().optional().nullable(),
|
|
3389
|
+
tipo: z44.string().optional().nullable(),
|
|
3390
|
+
motivo: z44.string().optional().nullable(),
|
|
3391
|
+
pop: z44.string().optional().nullable(),
|
|
3392
|
+
conteudo: z44.string().optional().nullable(),
|
|
3393
|
+
responsavel: z44.string().optional().nullable(),
|
|
3394
|
+
tecnicos_auxiliares: z44.array(z44.unknown()).optional().nullable(),
|
|
3395
|
+
usuario: z44.string().optional().nullable(),
|
|
3396
|
+
usuario_finalizacao: z44.string().optional().nullable(),
|
|
3397
|
+
classificacoes: z44.array(z44.unknown()).optional().nullable()
|
|
3398
|
+
});
|
|
3399
|
+
var pageSchema4 = z44.looseObject({
|
|
3400
|
+
paginacao: z44.looseObject({
|
|
3401
|
+
offset: z44.number().optional().nullable(),
|
|
3402
|
+
limit: z44.number().optional().nullable(),
|
|
3403
|
+
parcial: z44.number().optional().nullable(),
|
|
3404
|
+
total: z44.number()
|
|
2663
3405
|
}),
|
|
2664
|
-
ordens_servicos:
|
|
3406
|
+
ordens_servicos: z44.array(workOrderSchema2)
|
|
2665
3407
|
});
|
|
2666
|
-
var
|
|
3408
|
+
var pageInvariants4 = [
|
|
2667
3409
|
"paginacao",
|
|
2668
3410
|
"paginacao.total",
|
|
2669
3411
|
"ordens_servicos",
|
|
2670
3412
|
"ordens_servicos[].id"
|
|
2671
3413
|
];
|
|
2672
|
-
var workOrdersListInputSchema =
|
|
2673
|
-
offset:
|
|
2674
|
-
limit:
|
|
2675
|
-
ordem_servico:
|
|
2676
|
-
status:
|
|
2677
|
-
pop:
|
|
2678
|
-
motivo:
|
|
2679
|
-
contrato:
|
|
2680
|
-
});
|
|
2681
|
-
var
|
|
3414
|
+
var workOrdersListInputSchema = z44.strictObject({
|
|
3415
|
+
offset: z44.number().int().nonnegative().optional(),
|
|
3416
|
+
limit: z44.number().int().nonnegative().optional(),
|
|
3417
|
+
ordem_servico: z44.number().int().optional(),
|
|
3418
|
+
status: z44.number().int().optional(),
|
|
3419
|
+
pop: z44.number().int().optional(),
|
|
3420
|
+
motivo: z44.number().int().optional(),
|
|
3421
|
+
contrato: z44.number().int().optional()
|
|
3422
|
+
});
|
|
3423
|
+
var buildRequest39 = (input) => {
|
|
2682
3424
|
const parsed = workOrdersListInputSchema.safeParse(input);
|
|
2683
3425
|
if (!parsed.success)
|
|
2684
3426
|
return { ok: false, problem: "invalid workOrders.list input" };
|
|
@@ -2706,33 +3448,69 @@ var workOrdersList = {
|
|
|
2706
3448
|
method: "POST",
|
|
2707
3449
|
pathTemplate: "/api/ura/ordemservico/list/",
|
|
2708
3450
|
encoding: "json",
|
|
2709
|
-
buildRequest:
|
|
3451
|
+
buildRequest: buildRequest39,
|
|
2710
3452
|
repeatable: true,
|
|
2711
|
-
decode: tolerantDecoder(
|
|
3453
|
+
decode: tolerantDecoder(pageSchema4, pageInvariants4),
|
|
2712
3454
|
sensitivity: workOrdersListSensitivity
|
|
2713
3455
|
};
|
|
2714
3456
|
|
|
3457
|
+
// src/operations/work-orders-list-comments.ts
|
|
3458
|
+
import { z as z45 } from "zod";
|
|
3459
|
+
var commentSchema = z45.looseObject({
|
|
3460
|
+
comentario_id: z45.number().optional().nullable(),
|
|
3461
|
+
comentario: z45.string().optional().nullable(),
|
|
3462
|
+
usuario: z45.string().optional().nullable(),
|
|
3463
|
+
data_cadastro: z45.string().optional().nullable(),
|
|
3464
|
+
checklist_id: z45.number().optional().nullable(),
|
|
3465
|
+
checklist_descricao: z45.string().optional().nullable(),
|
|
3466
|
+
usuario_setores: z45.array(z45.unknown()).optional().nullable()
|
|
3467
|
+
});
|
|
3468
|
+
var commentsSchema = z45.array(commentSchema);
|
|
3469
|
+
var workOrdersListCommentsInputSchema = z45.strictObject({
|
|
3470
|
+
id: z45.number().int().positive()
|
|
3471
|
+
});
|
|
3472
|
+
var buildRequest40 = (input) => {
|
|
3473
|
+
const parsed = workOrdersListCommentsInputSchema.safeParse(input);
|
|
3474
|
+
if (!parsed.success)
|
|
3475
|
+
return { ok: false, problem: "invalid workOrders.listComments input" };
|
|
3476
|
+
return { ok: true, pathParams: { id: parsed.data.id } };
|
|
3477
|
+
};
|
|
3478
|
+
var workOrdersListCommentsSensitivity = {
|
|
3479
|
+
input: [],
|
|
3480
|
+
output: [{ path: "[]", secretKeys: [], personalKeys: ["comentario", "usuario"] }]
|
|
3481
|
+
};
|
|
3482
|
+
var workOrdersListComments = {
|
|
3483
|
+
name: "workOrders.listComments",
|
|
3484
|
+
method: "GET",
|
|
3485
|
+
pathTemplate: "/api/os/{id}/comentario/list/",
|
|
3486
|
+
encoding: "json",
|
|
3487
|
+
buildRequest: buildRequest40,
|
|
3488
|
+
repeatable: true,
|
|
3489
|
+
decode: tolerantDecoder(commentsSchema, []),
|
|
3490
|
+
sensitivity: workOrdersListCommentsSensitivity
|
|
3491
|
+
};
|
|
3492
|
+
|
|
2715
3493
|
// src/operations/work-orders-list-reasons.ts
|
|
2716
|
-
import { z as
|
|
2717
|
-
var workOrderReasonSchema =
|
|
2718
|
-
id:
|
|
2719
|
-
codigo:
|
|
2720
|
-
descricao:
|
|
2721
|
-
ativo:
|
|
2722
|
-
classificacoes:
|
|
2723
|
-
classificacoes_obrigatorio:
|
|
2724
|
-
setores:
|
|
2725
|
-
});
|
|
2726
|
-
var workOrderReasonsSchema =
|
|
3494
|
+
import { z as z46 } from "zod";
|
|
3495
|
+
var workOrderReasonSchema = z46.looseObject({
|
|
3496
|
+
id: z46.number(),
|
|
3497
|
+
codigo: z46.number(),
|
|
3498
|
+
descricao: z46.string().optional().nullable(),
|
|
3499
|
+
ativo: z46.boolean().optional().nullable(),
|
|
3500
|
+
classificacoes: z46.array(z46.unknown()).optional().nullable(),
|
|
3501
|
+
classificacoes_obrigatorio: z46.boolean().optional().nullable(),
|
|
3502
|
+
setores: z46.array(z46.unknown()).optional().nullable()
|
|
3503
|
+
});
|
|
3504
|
+
var workOrderReasonsSchema = z46.array(workOrderReasonSchema);
|
|
2727
3505
|
var workOrderReasonsInvariants = ["[].id", "[].codigo"];
|
|
2728
|
-
var
|
|
3506
|
+
var buildRequest41 = () => ({ ok: true });
|
|
2729
3507
|
var workOrdersListReasonsSensitivity = { input: [], output: [] };
|
|
2730
3508
|
var workOrdersListReasons = {
|
|
2731
3509
|
name: "workOrders.listReasons",
|
|
2732
3510
|
method: "GET",
|
|
2733
3511
|
pathTemplate: "/api/os/ocorrencia/motivo/list/",
|
|
2734
3512
|
encoding: "json",
|
|
2735
|
-
buildRequest:
|
|
3513
|
+
buildRequest: buildRequest41,
|
|
2736
3514
|
repeatable: true,
|
|
2737
3515
|
decode: tolerantDecoder(workOrderReasonsSchema, workOrderReasonsInvariants),
|
|
2738
3516
|
sensitivity: workOrdersListReasonsSensitivity
|
|
@@ -2843,12 +3621,16 @@ var createSgpClient = (options) => {
|
|
|
2843
3621
|
},
|
|
2844
3622
|
contracts: {
|
|
2845
3623
|
list: (input = {}, callOptions) => execute(config, contractsList, input, callOptions),
|
|
3624
|
+
listServices: (input = {}, callOptions) => execute(config, contractsListServices, input, callOptions),
|
|
3625
|
+
checkConnection: (input, callOptions) => execute(config, contractsCheckConnection, input, callOptions),
|
|
2846
3626
|
update: (input, callOptions) => execute(config, contractsUpdate, input, callOptions),
|
|
2847
3627
|
listStatusReasons: (callOptions) => execute(config, contractsListStatusReasons, undefined, callOptions),
|
|
2848
3628
|
updateStatus: (input, callOptions) => execute(config, contractsUpdateStatus, input, callOptions)
|
|
2849
3629
|
},
|
|
2850
3630
|
coverage: {
|
|
2851
|
-
check: (input, callOptions) => execute(config, coverageCheck, input, callOptions)
|
|
3631
|
+
check: (input, callOptions) => execute(config, coverageCheck, input, callOptions),
|
|
3632
|
+
checkAddress: (input, callOptions) => execute(config, coverageCheckAddress, input, callOptions),
|
|
3633
|
+
listGateways: (callOptions) => execute(config, coverageListGateways, undefined, callOptions)
|
|
2852
3634
|
},
|
|
2853
3635
|
crm: {
|
|
2854
3636
|
customers: {
|
|
@@ -2877,8 +3659,12 @@ var createSgpClient = (options) => {
|
|
|
2877
3659
|
invoices: {
|
|
2878
3660
|
list: (input = {}, callOptions) => execute(config, invoicesList, input, callOptions)
|
|
2879
3661
|
},
|
|
3662
|
+
maintenance: {
|
|
3663
|
+
list: (callOptions) => execute(config, maintenanceList, undefined, callOptions)
|
|
3664
|
+
},
|
|
2880
3665
|
occurrences: {
|
|
2881
3666
|
create: (input, callOptions) => execute(config, occurrencesCreate, input, callOptions),
|
|
3667
|
+
list: (input = {}, callOptions) => execute(config, occurrencesList, input, callOptions),
|
|
2882
3668
|
listTypes: (callOptions) => execute(config, occurrencesListTypes, undefined, callOptions),
|
|
2883
3669
|
listMethods: (callOptions) => execute(config, occurrencesListMethods, undefined, callOptions)
|
|
2884
3670
|
},
|
|
@@ -2892,12 +3678,16 @@ var createSgpClient = (options) => {
|
|
|
2892
3678
|
listSellers: (callOptions) => execute(config, preRegistrationsListSellers, undefined, callOptions)
|
|
2893
3679
|
},
|
|
2894
3680
|
workOrders: {
|
|
3681
|
+
get: (input, callOptions) => execute(config, workOrdersGet, input, callOptions),
|
|
2895
3682
|
list: (input = {}, callOptions) => execute(config, workOrdersList, input, callOptions),
|
|
3683
|
+
listComments: (input, callOptions) => execute(config, workOrdersListComments, input, callOptions),
|
|
2896
3684
|
listReasons: (callOptions) => execute(config, workOrdersListReasons, undefined, callOptions)
|
|
2897
3685
|
},
|
|
2898
3686
|
services: {
|
|
3687
|
+
addGeneric: (input, callOptions) => execute(config, servicesAddGeneric, input, callOptions),
|
|
2899
3688
|
addTv: (input, callOptions) => execute(config, servicesAddTv, input, callOptions),
|
|
2900
3689
|
changePlan: (input, callOptions) => execute(config, servicesChangePlan, input, callOptions),
|
|
3690
|
+
removeGeneric: (input, callOptions) => execute(config, servicesRemoveGeneric, input, callOptions),
|
|
2901
3691
|
removeTv: (input, callOptions) => execute(config, servicesRemoveTv, input, callOptions)
|
|
2902
3692
|
}
|
|
2903
3693
|
};
|
|
@@ -2920,6 +3710,7 @@ var CONTRACT_STATUS = {
|
|
|
2920
3710
|
new: 6,
|
|
2921
3711
|
activeReducedSpeed: 7
|
|
2922
3712
|
};
|
|
3713
|
+
var CONNECTION_STATUS = { notChecked: 0, online: 1, offline: 2, maintenance: 9 };
|
|
2923
3714
|
var SERVICE_TYPE = { internet: 1 };
|
|
2924
3715
|
var CRM_STATUS = {
|
|
2925
3716
|
underAnalysis: 1,
|
|
@@ -2941,12 +3732,16 @@ var shippedOperations = [
|
|
|
2941
3732
|
contractsUpdateStatus,
|
|
2942
3733
|
contractsUpdate,
|
|
2943
3734
|
contractsList,
|
|
3735
|
+
contractsListServices,
|
|
3736
|
+
contractsCheckConnection,
|
|
2944
3737
|
invoicesList,
|
|
2945
3738
|
plansList,
|
|
2946
3739
|
workOrdersList,
|
|
2947
3740
|
servicesChangePlan,
|
|
2948
3741
|
servicesAddTv,
|
|
3742
|
+
servicesAddGeneric,
|
|
2949
3743
|
servicesRemoveTv,
|
|
3744
|
+
servicesRemoveGeneric,
|
|
2950
3745
|
experimentalAnnotationsList,
|
|
2951
3746
|
catalogsListPops,
|
|
2952
3747
|
catalogsListNas,
|
|
@@ -2960,13 +3755,19 @@ var shippedOperations = [
|
|
|
2960
3755
|
contractsListStatusReasons,
|
|
2961
3756
|
documentsList,
|
|
2962
3757
|
coverageCheck,
|
|
3758
|
+
coverageListGateways,
|
|
2963
3759
|
crmCustomersCreate,
|
|
2964
3760
|
crmCustomersUpdateStatus,
|
|
2965
3761
|
crmContractsCreate,
|
|
2966
3762
|
crmContractsCreateByCpfCnpj,
|
|
2967
3763
|
crmContractsList,
|
|
2968
3764
|
occurrencesCreate,
|
|
2969
|
-
documentsAdd
|
|
3765
|
+
documentsAdd,
|
|
3766
|
+
occurrencesList,
|
|
3767
|
+
workOrdersGet,
|
|
3768
|
+
workOrdersListComments,
|
|
3769
|
+
maintenanceList,
|
|
3770
|
+
coverageCheckAddress
|
|
2970
3771
|
];
|
|
2971
3772
|
var getSensitivity = (operation) => {
|
|
2972
3773
|
const found = shippedOperations.find((definition) => definition.name === operation);
|
|
@@ -3099,6 +3900,7 @@ export {
|
|
|
3099
3900
|
DEFAULT_TIMEOUT_MS,
|
|
3100
3901
|
CRM_STATUS,
|
|
3101
3902
|
CONTRACT_STATUS,
|
|
3903
|
+
CONNECTION_STATUS,
|
|
3102
3904
|
BILLING_METHOD,
|
|
3103
3905
|
ACQUISITION_MODE
|
|
3104
3906
|
};
|