evo360-types 1.3.304 → 1.3.306
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/dist/apps/evo-finops/zod-schemas.d.ts +509 -0
- package/dist/apps/evo-finops/zod-schemas.js +66 -1
- package/dist/apps/evo-finops/zod-schemas.ts +72 -0
- package/dist/types/evo-finops/index.d.ts +1 -0
- package/dist/types/evo-finops/index.js +1 -0
- package/dist/types/evo-finops/index.ts +1 -0
- package/dist/types/evo-finops/payment-links/index.d.ts +82 -0
- package/dist/types/evo-finops/payment-links/index.js +38 -0
- package/dist/types/evo-finops/payment-links/index.ts +99 -0
- package/dist/types/evo-finops/providers/asaas/asaas_provider.d.ts +35 -1
- package/dist/types/evo-finops/providers/asaas/asaas_provider.js +33 -1
- package/dist/types/evo-finops/providers/asaas/asaas_provider.ts +42 -2
- package/package.json +1 -1
|
@@ -10695,6 +10695,515 @@ export declare const zProviderPayloadSnapshotSchema: z.ZodObject<{
|
|
|
10695
10695
|
endpoint?: string | undefined;
|
|
10696
10696
|
headers?: Record<string, string> | undefined;
|
|
10697
10697
|
}>;
|
|
10698
|
+
export declare const zAsaasPaymentLinkBillingTypeSchema: z.ZodEnum<["UNDEFINED", "BOLETO", "CREDIT_CARD", "PIX"]>;
|
|
10699
|
+
export declare const zAsaasPaymentLinkChargeTypeSchema: z.ZodEnum<["DETACHED", "RECURRENT", "INSTALLMENT"]>;
|
|
10700
|
+
export declare const zAsaasPaymentLinkSubscriptionCycleSchema: z.ZodEnum<["WEEKLY", "BIWEEKLY", "MONTHLY", "BIMONTHLY", "QUARTERLY", "SEMIANNUALLY", "YEARLY"]>;
|
|
10701
|
+
export declare const zPaymentLinkDocumentStateSchema: z.ZodEnum<["DRAFT", "ACTIVE", "INACTIVE", "DELETED"]>;
|
|
10702
|
+
export declare const zPaymentLinkSchema: z.ZodObject<{
|
|
10703
|
+
id: z.ZodString;
|
|
10704
|
+
ref: z.ZodAny;
|
|
10705
|
+
tenant: z.ZodString;
|
|
10706
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
10707
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
10708
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
10709
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
10710
|
+
} & {
|
|
10711
|
+
providerId: z.ZodString;
|
|
10712
|
+
provider_name: z.ZodOptional<z.ZodString>;
|
|
10713
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
10714
|
+
provider_payment_link_id: z.ZodOptional<z.ZodString>;
|
|
10715
|
+
asaas_customer_id: z.ZodOptional<z.ZodString>;
|
|
10716
|
+
taker: z.ZodOptional<z.ZodObject<{
|
|
10717
|
+
lead_id: z.ZodOptional<z.ZodString>;
|
|
10718
|
+
chat_contact_id: z.ZodOptional<z.ZodString>;
|
|
10719
|
+
patient_id: z.ZodOptional<z.ZodString>;
|
|
10720
|
+
snapshot: z.ZodObject<{
|
|
10721
|
+
taker_type: z.ZodEnum<["PF", "PJ", "unknown"]>;
|
|
10722
|
+
name: z.ZodString;
|
|
10723
|
+
email: z.ZodOptional<z.ZodString>;
|
|
10724
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
10725
|
+
cpf_cnpj: z.ZodOptional<z.ZodString>;
|
|
10726
|
+
customerId: z.ZodOptional<z.ZodString>;
|
|
10727
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
10728
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10729
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10730
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10731
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10732
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10733
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10734
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10735
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10736
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
10737
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10738
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10739
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10740
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10741
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10742
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10743
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10744
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10745
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
10746
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10747
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10748
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10749
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10750
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10751
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10752
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10753
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10754
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
10755
|
+
}, "strip", z.ZodTypeAny, {
|
|
10756
|
+
name: string;
|
|
10757
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
10758
|
+
email?: string | undefined;
|
|
10759
|
+
address?: z.objectOutputType<{
|
|
10760
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10761
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10762
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10763
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10764
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10765
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10766
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10767
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10768
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
10769
|
+
phone?: string | undefined;
|
|
10770
|
+
customerId?: string | undefined;
|
|
10771
|
+
cpf_cnpj?: string | undefined;
|
|
10772
|
+
}, {
|
|
10773
|
+
name: string;
|
|
10774
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
10775
|
+
email?: string | undefined;
|
|
10776
|
+
address?: z.objectInputType<{
|
|
10777
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10778
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10779
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10780
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10781
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10782
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10783
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10784
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10785
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
10786
|
+
phone?: string | undefined;
|
|
10787
|
+
customerId?: string | undefined;
|
|
10788
|
+
cpf_cnpj?: string | undefined;
|
|
10789
|
+
}>;
|
|
10790
|
+
}, "strip", z.ZodTypeAny, {
|
|
10791
|
+
snapshot: {
|
|
10792
|
+
name: string;
|
|
10793
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
10794
|
+
email?: string | undefined;
|
|
10795
|
+
address?: z.objectOutputType<{
|
|
10796
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10797
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10798
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10799
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10800
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10801
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10802
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10803
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10804
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
10805
|
+
phone?: string | undefined;
|
|
10806
|
+
customerId?: string | undefined;
|
|
10807
|
+
cpf_cnpj?: string | undefined;
|
|
10808
|
+
};
|
|
10809
|
+
lead_id?: string | undefined;
|
|
10810
|
+
chat_contact_id?: string | undefined;
|
|
10811
|
+
patient_id?: string | undefined;
|
|
10812
|
+
}, {
|
|
10813
|
+
snapshot: {
|
|
10814
|
+
name: string;
|
|
10815
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
10816
|
+
email?: string | undefined;
|
|
10817
|
+
address?: z.objectInputType<{
|
|
10818
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10819
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10820
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10821
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10822
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10823
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10824
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10825
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10826
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
10827
|
+
phone?: string | undefined;
|
|
10828
|
+
customerId?: string | undefined;
|
|
10829
|
+
cpf_cnpj?: string | undefined;
|
|
10830
|
+
};
|
|
10831
|
+
lead_id?: string | undefined;
|
|
10832
|
+
chat_contact_id?: string | undefined;
|
|
10833
|
+
patient_id?: string | undefined;
|
|
10834
|
+
}>>;
|
|
10835
|
+
state: z.ZodOptional<z.ZodEnum<["DRAFT", "ACTIVE", "INACTIVE", "DELETED"]>>;
|
|
10836
|
+
name: z.ZodOptional<z.ZodString>;
|
|
10837
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10838
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
10839
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
10840
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
10841
|
+
billing_type: z.ZodOptional<z.ZodEnum<["UNDEFINED", "BOLETO", "CREDIT_CARD", "PIX"]>>;
|
|
10842
|
+
charge_type: z.ZodOptional<z.ZodEnum<["DETACHED", "RECURRENT", "INSTALLMENT"]>>;
|
|
10843
|
+
due_date_limit_days: z.ZodOptional<z.ZodNumber>;
|
|
10844
|
+
subscription_cycle: z.ZodOptional<z.ZodEnum<["WEEKLY", "BIWEEKLY", "MONTHLY", "BIMONTHLY", "QUARTERLY", "SEMIANNUALLY", "YEARLY"]>>;
|
|
10845
|
+
max_installment_count: z.ZodOptional<z.ZodNumber>;
|
|
10846
|
+
external_reference: z.ZodOptional<z.ZodString>;
|
|
10847
|
+
notification_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
10848
|
+
checkout_url: z.ZodOptional<z.ZodString>;
|
|
10849
|
+
callback: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
10850
|
+
is_address_required: z.ZodOptional<z.ZodBoolean>;
|
|
10851
|
+
last_payment_webhook_event: z.ZodOptional<z.ZodString>;
|
|
10852
|
+
last_payment_id: z.ZodOptional<z.ZodString>;
|
|
10853
|
+
last_payment_status: z.ZodOptional<z.ZodString>;
|
|
10854
|
+
last_payment_confirmed_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
|
|
10855
|
+
last_payment_received_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
|
|
10856
|
+
raw: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
10857
|
+
snapshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10858
|
+
direction: z.ZodEnum<["request", "response", "webhook"]>;
|
|
10859
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
10860
|
+
body: z.ZodOptional<z.ZodUnknown>;
|
|
10861
|
+
}, "strip", z.ZodTypeAny, {
|
|
10862
|
+
at: Date;
|
|
10863
|
+
direction: "webhook" | "request" | "response";
|
|
10864
|
+
body?: unknown;
|
|
10865
|
+
}, {
|
|
10866
|
+
direction: "webhook" | "request" | "response";
|
|
10867
|
+
at?: unknown;
|
|
10868
|
+
body?: unknown;
|
|
10869
|
+
}>, "many">>;
|
|
10870
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
10871
|
+
id: z.ZodString;
|
|
10872
|
+
ref: z.ZodAny;
|
|
10873
|
+
tenant: z.ZodString;
|
|
10874
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
10875
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
10876
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
10877
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
10878
|
+
} & {
|
|
10879
|
+
providerId: z.ZodString;
|
|
10880
|
+
provider_name: z.ZodOptional<z.ZodString>;
|
|
10881
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
10882
|
+
provider_payment_link_id: z.ZodOptional<z.ZodString>;
|
|
10883
|
+
asaas_customer_id: z.ZodOptional<z.ZodString>;
|
|
10884
|
+
taker: z.ZodOptional<z.ZodObject<{
|
|
10885
|
+
lead_id: z.ZodOptional<z.ZodString>;
|
|
10886
|
+
chat_contact_id: z.ZodOptional<z.ZodString>;
|
|
10887
|
+
patient_id: z.ZodOptional<z.ZodString>;
|
|
10888
|
+
snapshot: z.ZodObject<{
|
|
10889
|
+
taker_type: z.ZodEnum<["PF", "PJ", "unknown"]>;
|
|
10890
|
+
name: z.ZodString;
|
|
10891
|
+
email: z.ZodOptional<z.ZodString>;
|
|
10892
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
10893
|
+
cpf_cnpj: z.ZodOptional<z.ZodString>;
|
|
10894
|
+
customerId: z.ZodOptional<z.ZodString>;
|
|
10895
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
10896
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10897
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10898
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10899
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10900
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10901
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10902
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10903
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10904
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
10905
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10906
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10907
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10908
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10909
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10910
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10911
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10912
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10913
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
10914
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10915
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10916
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10917
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10918
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10919
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10920
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10921
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10922
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
10923
|
+
}, "strip", z.ZodTypeAny, {
|
|
10924
|
+
name: string;
|
|
10925
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
10926
|
+
email?: string | undefined;
|
|
10927
|
+
address?: z.objectOutputType<{
|
|
10928
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10929
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10930
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10931
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10932
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10933
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10934
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10935
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10936
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
10937
|
+
phone?: string | undefined;
|
|
10938
|
+
customerId?: string | undefined;
|
|
10939
|
+
cpf_cnpj?: string | undefined;
|
|
10940
|
+
}, {
|
|
10941
|
+
name: string;
|
|
10942
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
10943
|
+
email?: string | undefined;
|
|
10944
|
+
address?: z.objectInputType<{
|
|
10945
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10946
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10947
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10948
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10949
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10950
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10951
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10952
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10953
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
10954
|
+
phone?: string | undefined;
|
|
10955
|
+
customerId?: string | undefined;
|
|
10956
|
+
cpf_cnpj?: string | undefined;
|
|
10957
|
+
}>;
|
|
10958
|
+
}, "strip", z.ZodTypeAny, {
|
|
10959
|
+
snapshot: {
|
|
10960
|
+
name: string;
|
|
10961
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
10962
|
+
email?: string | undefined;
|
|
10963
|
+
address?: z.objectOutputType<{
|
|
10964
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10965
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10966
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10967
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10968
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10969
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10970
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10971
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10972
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
10973
|
+
phone?: string | undefined;
|
|
10974
|
+
customerId?: string | undefined;
|
|
10975
|
+
cpf_cnpj?: string | undefined;
|
|
10976
|
+
};
|
|
10977
|
+
lead_id?: string | undefined;
|
|
10978
|
+
chat_contact_id?: string | undefined;
|
|
10979
|
+
patient_id?: string | undefined;
|
|
10980
|
+
}, {
|
|
10981
|
+
snapshot: {
|
|
10982
|
+
name: string;
|
|
10983
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
10984
|
+
email?: string | undefined;
|
|
10985
|
+
address?: z.objectInputType<{
|
|
10986
|
+
street: z.ZodOptional<z.ZodString>;
|
|
10987
|
+
number: z.ZodOptional<z.ZodString>;
|
|
10988
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
10989
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
10990
|
+
city: z.ZodOptional<z.ZodString>;
|
|
10991
|
+
state: z.ZodOptional<z.ZodString>;
|
|
10992
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
10993
|
+
country: z.ZodOptional<z.ZodString>;
|
|
10994
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
10995
|
+
phone?: string | undefined;
|
|
10996
|
+
customerId?: string | undefined;
|
|
10997
|
+
cpf_cnpj?: string | undefined;
|
|
10998
|
+
};
|
|
10999
|
+
lead_id?: string | undefined;
|
|
11000
|
+
chat_contact_id?: string | undefined;
|
|
11001
|
+
patient_id?: string | undefined;
|
|
11002
|
+
}>>;
|
|
11003
|
+
state: z.ZodOptional<z.ZodEnum<["DRAFT", "ACTIVE", "INACTIVE", "DELETED"]>>;
|
|
11004
|
+
name: z.ZodOptional<z.ZodString>;
|
|
11005
|
+
description: z.ZodOptional<z.ZodString>;
|
|
11006
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
11007
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
11008
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
11009
|
+
billing_type: z.ZodOptional<z.ZodEnum<["UNDEFINED", "BOLETO", "CREDIT_CARD", "PIX"]>>;
|
|
11010
|
+
charge_type: z.ZodOptional<z.ZodEnum<["DETACHED", "RECURRENT", "INSTALLMENT"]>>;
|
|
11011
|
+
due_date_limit_days: z.ZodOptional<z.ZodNumber>;
|
|
11012
|
+
subscription_cycle: z.ZodOptional<z.ZodEnum<["WEEKLY", "BIWEEKLY", "MONTHLY", "BIMONTHLY", "QUARTERLY", "SEMIANNUALLY", "YEARLY"]>>;
|
|
11013
|
+
max_installment_count: z.ZodOptional<z.ZodNumber>;
|
|
11014
|
+
external_reference: z.ZodOptional<z.ZodString>;
|
|
11015
|
+
notification_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
11016
|
+
checkout_url: z.ZodOptional<z.ZodString>;
|
|
11017
|
+
callback: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
11018
|
+
is_address_required: z.ZodOptional<z.ZodBoolean>;
|
|
11019
|
+
last_payment_webhook_event: z.ZodOptional<z.ZodString>;
|
|
11020
|
+
last_payment_id: z.ZodOptional<z.ZodString>;
|
|
11021
|
+
last_payment_status: z.ZodOptional<z.ZodString>;
|
|
11022
|
+
last_payment_confirmed_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
|
|
11023
|
+
last_payment_received_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
|
|
11024
|
+
raw: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
11025
|
+
snapshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11026
|
+
direction: z.ZodEnum<["request", "response", "webhook"]>;
|
|
11027
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
11028
|
+
body: z.ZodOptional<z.ZodUnknown>;
|
|
11029
|
+
}, "strip", z.ZodTypeAny, {
|
|
11030
|
+
at: Date;
|
|
11031
|
+
direction: "webhook" | "request" | "response";
|
|
11032
|
+
body?: unknown;
|
|
11033
|
+
}, {
|
|
11034
|
+
direction: "webhook" | "request" | "response";
|
|
11035
|
+
at?: unknown;
|
|
11036
|
+
body?: unknown;
|
|
11037
|
+
}>, "many">>;
|
|
11038
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
11039
|
+
id: z.ZodString;
|
|
11040
|
+
ref: z.ZodAny;
|
|
11041
|
+
tenant: z.ZodString;
|
|
11042
|
+
model_ver: z.ZodDefault<z.ZodNumber>;
|
|
11043
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
11044
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
11045
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
11046
|
+
} & {
|
|
11047
|
+
providerId: z.ZodString;
|
|
11048
|
+
provider_name: z.ZodOptional<z.ZodString>;
|
|
11049
|
+
provider_env: z.ZodOptional<z.ZodEnum<["Sandbox", "Production"]>>;
|
|
11050
|
+
provider_payment_link_id: z.ZodOptional<z.ZodString>;
|
|
11051
|
+
asaas_customer_id: z.ZodOptional<z.ZodString>;
|
|
11052
|
+
taker: z.ZodOptional<z.ZodObject<{
|
|
11053
|
+
lead_id: z.ZodOptional<z.ZodString>;
|
|
11054
|
+
chat_contact_id: z.ZodOptional<z.ZodString>;
|
|
11055
|
+
patient_id: z.ZodOptional<z.ZodString>;
|
|
11056
|
+
snapshot: z.ZodObject<{
|
|
11057
|
+
taker_type: z.ZodEnum<["PF", "PJ", "unknown"]>;
|
|
11058
|
+
name: z.ZodString;
|
|
11059
|
+
email: z.ZodOptional<z.ZodString>;
|
|
11060
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
11061
|
+
cpf_cnpj: z.ZodOptional<z.ZodString>;
|
|
11062
|
+
customerId: z.ZodOptional<z.ZodString>;
|
|
11063
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
11064
|
+
street: z.ZodOptional<z.ZodString>;
|
|
11065
|
+
number: z.ZodOptional<z.ZodString>;
|
|
11066
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
11067
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
11068
|
+
city: z.ZodOptional<z.ZodString>;
|
|
11069
|
+
state: z.ZodOptional<z.ZodString>;
|
|
11070
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
11071
|
+
country: z.ZodOptional<z.ZodString>;
|
|
11072
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
11073
|
+
street: z.ZodOptional<z.ZodString>;
|
|
11074
|
+
number: z.ZodOptional<z.ZodString>;
|
|
11075
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
11076
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
11077
|
+
city: z.ZodOptional<z.ZodString>;
|
|
11078
|
+
state: z.ZodOptional<z.ZodString>;
|
|
11079
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
11080
|
+
country: z.ZodOptional<z.ZodString>;
|
|
11081
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
11082
|
+
street: z.ZodOptional<z.ZodString>;
|
|
11083
|
+
number: z.ZodOptional<z.ZodString>;
|
|
11084
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
11085
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
11086
|
+
city: z.ZodOptional<z.ZodString>;
|
|
11087
|
+
state: z.ZodOptional<z.ZodString>;
|
|
11088
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
11089
|
+
country: z.ZodOptional<z.ZodString>;
|
|
11090
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
11091
|
+
}, "strip", z.ZodTypeAny, {
|
|
11092
|
+
name: string;
|
|
11093
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
11094
|
+
email?: string | undefined;
|
|
11095
|
+
address?: z.objectOutputType<{
|
|
11096
|
+
street: z.ZodOptional<z.ZodString>;
|
|
11097
|
+
number: z.ZodOptional<z.ZodString>;
|
|
11098
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
11099
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
11100
|
+
city: z.ZodOptional<z.ZodString>;
|
|
11101
|
+
state: z.ZodOptional<z.ZodString>;
|
|
11102
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
11103
|
+
country: z.ZodOptional<z.ZodString>;
|
|
11104
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
11105
|
+
phone?: string | undefined;
|
|
11106
|
+
customerId?: string | undefined;
|
|
11107
|
+
cpf_cnpj?: string | undefined;
|
|
11108
|
+
}, {
|
|
11109
|
+
name: string;
|
|
11110
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
11111
|
+
email?: string | undefined;
|
|
11112
|
+
address?: z.objectInputType<{
|
|
11113
|
+
street: z.ZodOptional<z.ZodString>;
|
|
11114
|
+
number: z.ZodOptional<z.ZodString>;
|
|
11115
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
11116
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
11117
|
+
city: z.ZodOptional<z.ZodString>;
|
|
11118
|
+
state: z.ZodOptional<z.ZodString>;
|
|
11119
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
11120
|
+
country: z.ZodOptional<z.ZodString>;
|
|
11121
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
11122
|
+
phone?: string | undefined;
|
|
11123
|
+
customerId?: string | undefined;
|
|
11124
|
+
cpf_cnpj?: string | undefined;
|
|
11125
|
+
}>;
|
|
11126
|
+
}, "strip", z.ZodTypeAny, {
|
|
11127
|
+
snapshot: {
|
|
11128
|
+
name: string;
|
|
11129
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
11130
|
+
email?: string | undefined;
|
|
11131
|
+
address?: z.objectOutputType<{
|
|
11132
|
+
street: z.ZodOptional<z.ZodString>;
|
|
11133
|
+
number: z.ZodOptional<z.ZodString>;
|
|
11134
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
11135
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
11136
|
+
city: z.ZodOptional<z.ZodString>;
|
|
11137
|
+
state: z.ZodOptional<z.ZodString>;
|
|
11138
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
11139
|
+
country: z.ZodOptional<z.ZodString>;
|
|
11140
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
11141
|
+
phone?: string | undefined;
|
|
11142
|
+
customerId?: string | undefined;
|
|
11143
|
+
cpf_cnpj?: string | undefined;
|
|
11144
|
+
};
|
|
11145
|
+
lead_id?: string | undefined;
|
|
11146
|
+
chat_contact_id?: string | undefined;
|
|
11147
|
+
patient_id?: string | undefined;
|
|
11148
|
+
}, {
|
|
11149
|
+
snapshot: {
|
|
11150
|
+
name: string;
|
|
11151
|
+
taker_type: "PJ" | "PF" | "unknown";
|
|
11152
|
+
email?: string | undefined;
|
|
11153
|
+
address?: z.objectInputType<{
|
|
11154
|
+
street: z.ZodOptional<z.ZodString>;
|
|
11155
|
+
number: z.ZodOptional<z.ZodString>;
|
|
11156
|
+
complement: z.ZodOptional<z.ZodString>;
|
|
11157
|
+
neighborhood: z.ZodOptional<z.ZodString>;
|
|
11158
|
+
city: z.ZodOptional<z.ZodString>;
|
|
11159
|
+
state: z.ZodOptional<z.ZodString>;
|
|
11160
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
11161
|
+
country: z.ZodOptional<z.ZodString>;
|
|
11162
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
11163
|
+
phone?: string | undefined;
|
|
11164
|
+
customerId?: string | undefined;
|
|
11165
|
+
cpf_cnpj?: string | undefined;
|
|
11166
|
+
};
|
|
11167
|
+
lead_id?: string | undefined;
|
|
11168
|
+
chat_contact_id?: string | undefined;
|
|
11169
|
+
patient_id?: string | undefined;
|
|
11170
|
+
}>>;
|
|
11171
|
+
state: z.ZodOptional<z.ZodEnum<["DRAFT", "ACTIVE", "INACTIVE", "DELETED"]>>;
|
|
11172
|
+
name: z.ZodOptional<z.ZodString>;
|
|
11173
|
+
description: z.ZodOptional<z.ZodString>;
|
|
11174
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
11175
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
11176
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
11177
|
+
billing_type: z.ZodOptional<z.ZodEnum<["UNDEFINED", "BOLETO", "CREDIT_CARD", "PIX"]>>;
|
|
11178
|
+
charge_type: z.ZodOptional<z.ZodEnum<["DETACHED", "RECURRENT", "INSTALLMENT"]>>;
|
|
11179
|
+
due_date_limit_days: z.ZodOptional<z.ZodNumber>;
|
|
11180
|
+
subscription_cycle: z.ZodOptional<z.ZodEnum<["WEEKLY", "BIWEEKLY", "MONTHLY", "BIMONTHLY", "QUARTERLY", "SEMIANNUALLY", "YEARLY"]>>;
|
|
11181
|
+
max_installment_count: z.ZodOptional<z.ZodNumber>;
|
|
11182
|
+
external_reference: z.ZodOptional<z.ZodString>;
|
|
11183
|
+
notification_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
11184
|
+
checkout_url: z.ZodOptional<z.ZodString>;
|
|
11185
|
+
callback: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
11186
|
+
is_address_required: z.ZodOptional<z.ZodBoolean>;
|
|
11187
|
+
last_payment_webhook_event: z.ZodOptional<z.ZodString>;
|
|
11188
|
+
last_payment_id: z.ZodOptional<z.ZodString>;
|
|
11189
|
+
last_payment_status: z.ZodOptional<z.ZodString>;
|
|
11190
|
+
last_payment_confirmed_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
|
|
11191
|
+
last_payment_received_at: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, unknown>>;
|
|
11192
|
+
raw: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
11193
|
+
snapshots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11194
|
+
direction: z.ZodEnum<["request", "response", "webhook"]>;
|
|
11195
|
+
at: z.ZodEffects<z.ZodDate, Date, unknown>;
|
|
11196
|
+
body: z.ZodOptional<z.ZodUnknown>;
|
|
11197
|
+
}, "strip", z.ZodTypeAny, {
|
|
11198
|
+
at: Date;
|
|
11199
|
+
direction: "webhook" | "request" | "response";
|
|
11200
|
+
body?: unknown;
|
|
11201
|
+
}, {
|
|
11202
|
+
direction: "webhook" | "request" | "response";
|
|
11203
|
+
at?: unknown;
|
|
11204
|
+
body?: unknown;
|
|
11205
|
+
}>, "many">>;
|
|
11206
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
10698
11207
|
export declare const zServiceInvoiceSchema: z.ZodObject<{
|
|
10699
11208
|
id: z.ZodString;
|
|
10700
11209
|
ref: z.ZodAny;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.zProviderInvoiceLinksSchema = exports.zServiceTaxInfoSchema = exports.zServiceLineItemSchema = exports.zServiceInvoiceStateSchema = exports.zProviderServiceInvoiceStatusSchema = exports.zExternalLinkSchema = exports.zExternalObjectTypeSchema = exports.zInvoiceSourceRefSchema = exports.zInvoiceSourceTypeSchema = exports.zInvoiceTakerRefSchema = exports.zInvoiceTakerSnapshotSchema = exports.zInvoiceTakerSnapshotAddressSchema = exports.zTakerDocumentSchema = exports.zTakerTaxProfileSchema = exports.zTakerProviderRefsSchema = exports.zTakerAddressSchema = exports.zInvoiceTakerTypeSchema = exports.zServiceSchema = exports.zCustomerServiceTaxInfoSchema = exports.zIssuerTaxProfileSchema = exports.zIssuerNfseConfigSchema = exports.zIssuerMunicipalCredentialsRefSchema = exports.zIssuerTaxRegimeSchema = exports.zIssuerCompanyIdentitySchema = exports.zIssuerCompanyAddressSchema = exports.zTaxProfileSyncStateSchema = exports.zAsaasProviderSchema = exports.zAsaasProviderAsaasBlockSchema = exports.zAsaasProviderCapabilitiesSchema = exports.zAsaasPaymentsCapabilitiesSchema = exports.zAsaasNfseCapabilitiesSchema = exports.zAsaasEnvAuthConfigSchema = exports.zAsaasSubaccountInputSchema = exports.zAsaasAccountScopeSchema = exports.zAsaasWebhookConfigSchema = exports.zRetryPolicySchema = exports.zAsaasWebhookEventSchema = exports.zAsaasAccountScopeModeSchema = exports.zProviderRemoteRefsSchema = exports.zProviderFiscalInfoPayloadSchema = exports.zProviderCredentialsInputSchema = exports.zProviderCredentialsSecretRefsSchema = exports.zProviderMunicipalOptionsSnapshotSchema = exports.zProviderOptionItemSchema = exports.zProviderMunicipalAuthTypeSchema = exports.zFinopsProviderBaseSchema = exports.zProviderStatusSchema = exports.zFinopsActionSchema = exports.zFinopsProviderTypeSchema = exports.zProviderEnvSchema = void 0;
|
|
4
|
-
exports.zServiceInvoiceSchema = exports.zProviderPayloadSnapshotSchema = exports.zProviderTraceSchema = exports.zProviderInvoiceErrorSchema = exports.zProviderInvoiceIdentifiersSchema = void 0;
|
|
4
|
+
exports.zServiceInvoiceSchema = exports.zPaymentLinkSchema = exports.zPaymentLinkDocumentStateSchema = exports.zAsaasPaymentLinkSubscriptionCycleSchema = exports.zAsaasPaymentLinkChargeTypeSchema = exports.zAsaasPaymentLinkBillingTypeSchema = exports.zProviderPayloadSnapshotSchema = exports.zProviderTraceSchema = exports.zProviderInvoiceErrorSchema = exports.zProviderInvoiceIdentifiersSchema = void 0;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
7
7
|
// ---- Provider enums and base ----
|
|
@@ -548,6 +548,71 @@ exports.zProviderPayloadSnapshotSchema = zod_1.z.object({
|
|
|
548
548
|
body: zod_1.z.unknown().optional(),
|
|
549
549
|
raw: zod_1.z.string().optional(),
|
|
550
550
|
});
|
|
551
|
+
exports.zAsaasPaymentLinkBillingTypeSchema = zod_1.z.enum([
|
|
552
|
+
"UNDEFINED",
|
|
553
|
+
"BOLETO",
|
|
554
|
+
"CREDIT_CARD",
|
|
555
|
+
"PIX",
|
|
556
|
+
]);
|
|
557
|
+
exports.zAsaasPaymentLinkChargeTypeSchema = zod_1.z.enum([
|
|
558
|
+
"DETACHED",
|
|
559
|
+
"RECURRENT",
|
|
560
|
+
"INSTALLMENT",
|
|
561
|
+
]);
|
|
562
|
+
exports.zAsaasPaymentLinkSubscriptionCycleSchema = zod_1.z.enum([
|
|
563
|
+
"WEEKLY",
|
|
564
|
+
"BIWEEKLY",
|
|
565
|
+
"MONTHLY",
|
|
566
|
+
"BIMONTHLY",
|
|
567
|
+
"QUARTERLY",
|
|
568
|
+
"SEMIANNUALLY",
|
|
569
|
+
"YEARLY",
|
|
570
|
+
]);
|
|
571
|
+
exports.zPaymentLinkDocumentStateSchema = zod_1.z.enum([
|
|
572
|
+
"DRAFT",
|
|
573
|
+
"ACTIVE",
|
|
574
|
+
"INACTIVE",
|
|
575
|
+
"DELETED",
|
|
576
|
+
]);
|
|
577
|
+
exports.zPaymentLinkSchema = zod_schemas_1.zFireDocSchema
|
|
578
|
+
.extend({
|
|
579
|
+
providerId: zod_1.z.string(),
|
|
580
|
+
provider_name: zod_1.z.string().optional(),
|
|
581
|
+
provider_env: exports.zProviderEnvSchema.optional(),
|
|
582
|
+
provider_payment_link_id: zod_1.z.string().optional(),
|
|
583
|
+
asaas_customer_id: zod_1.z.string().optional(),
|
|
584
|
+
taker: exports.zInvoiceTakerRefSchema.optional(),
|
|
585
|
+
state: exports.zPaymentLinkDocumentStateSchema.optional(),
|
|
586
|
+
name: zod_1.z.string().optional(),
|
|
587
|
+
description: zod_1.z.string().optional(),
|
|
588
|
+
endDate: zod_1.z.string().optional(),
|
|
589
|
+
value: zod_1.z.number().optional(),
|
|
590
|
+
active: zod_1.z.boolean().optional(),
|
|
591
|
+
billing_type: exports.zAsaasPaymentLinkBillingTypeSchema.optional(),
|
|
592
|
+
charge_type: exports.zAsaasPaymentLinkChargeTypeSchema.optional(),
|
|
593
|
+
due_date_limit_days: zod_1.z.number().optional(),
|
|
594
|
+
subscription_cycle: exports.zAsaasPaymentLinkSubscriptionCycleSchema.optional(),
|
|
595
|
+
max_installment_count: zod_1.z.number().optional(),
|
|
596
|
+
external_reference: zod_1.z.string().optional(),
|
|
597
|
+
notification_enabled: zod_1.z.boolean().optional(),
|
|
598
|
+
checkout_url: zod_1.z.string().optional(),
|
|
599
|
+
callback: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
600
|
+
is_address_required: zod_1.z.boolean().optional(),
|
|
601
|
+
last_payment_webhook_event: zod_1.z.string().optional(),
|
|
602
|
+
last_payment_id: zod_1.z.string().optional(),
|
|
603
|
+
last_payment_status: zod_1.z.string().optional(),
|
|
604
|
+
last_payment_confirmed_at: zod_schemas_1.zFirestoreDateSchema.optional(),
|
|
605
|
+
last_payment_received_at: zod_schemas_1.zFirestoreDateSchema.optional(),
|
|
606
|
+
raw: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
607
|
+
snapshots: zod_1.z
|
|
608
|
+
.array(zod_1.z.object({
|
|
609
|
+
direction: zod_1.z.enum(["request", "response", "webhook"]),
|
|
610
|
+
at: zod_schemas_1.zFirestoreDateSchema,
|
|
611
|
+
body: zod_1.z.unknown().optional(),
|
|
612
|
+
}))
|
|
613
|
+
.optional(),
|
|
614
|
+
})
|
|
615
|
+
.passthrough();
|
|
551
616
|
exports.zServiceInvoiceSchema = zod_schemas_1.zFireDocSchema
|
|
552
617
|
.extend({
|
|
553
618
|
providerId: zod_1.z.string(),
|
|
@@ -599,6 +599,78 @@ export const zProviderPayloadSnapshotSchema = z.object({
|
|
|
599
599
|
raw: z.string().optional(),
|
|
600
600
|
});
|
|
601
601
|
|
|
602
|
+
export const zAsaasPaymentLinkBillingTypeSchema = z.enum([
|
|
603
|
+
"UNDEFINED",
|
|
604
|
+
"BOLETO",
|
|
605
|
+
"CREDIT_CARD",
|
|
606
|
+
"PIX",
|
|
607
|
+
]);
|
|
608
|
+
|
|
609
|
+
export const zAsaasPaymentLinkChargeTypeSchema = z.enum([
|
|
610
|
+
"DETACHED",
|
|
611
|
+
"RECURRENT",
|
|
612
|
+
"INSTALLMENT",
|
|
613
|
+
]);
|
|
614
|
+
|
|
615
|
+
export const zAsaasPaymentLinkSubscriptionCycleSchema = z.enum([
|
|
616
|
+
"WEEKLY",
|
|
617
|
+
"BIWEEKLY",
|
|
618
|
+
"MONTHLY",
|
|
619
|
+
"BIMONTHLY",
|
|
620
|
+
"QUARTERLY",
|
|
621
|
+
"SEMIANNUALLY",
|
|
622
|
+
"YEARLY",
|
|
623
|
+
]);
|
|
624
|
+
|
|
625
|
+
export const zPaymentLinkDocumentStateSchema = z.enum([
|
|
626
|
+
"DRAFT",
|
|
627
|
+
"ACTIVE",
|
|
628
|
+
"INACTIVE",
|
|
629
|
+
"DELETED",
|
|
630
|
+
]);
|
|
631
|
+
|
|
632
|
+
export const zPaymentLinkSchema = zFireDocSchema
|
|
633
|
+
.extend({
|
|
634
|
+
providerId: z.string(),
|
|
635
|
+
provider_name: z.string().optional(),
|
|
636
|
+
provider_env: zProviderEnvSchema.optional(),
|
|
637
|
+
provider_payment_link_id: z.string().optional(),
|
|
638
|
+
asaas_customer_id: z.string().optional(),
|
|
639
|
+
taker: zInvoiceTakerRefSchema.optional(),
|
|
640
|
+
state: zPaymentLinkDocumentStateSchema.optional(),
|
|
641
|
+
name: z.string().optional(),
|
|
642
|
+
description: z.string().optional(),
|
|
643
|
+
endDate: z.string().optional(),
|
|
644
|
+
value: z.number().optional(),
|
|
645
|
+
active: z.boolean().optional(),
|
|
646
|
+
billing_type: zAsaasPaymentLinkBillingTypeSchema.optional(),
|
|
647
|
+
charge_type: zAsaasPaymentLinkChargeTypeSchema.optional(),
|
|
648
|
+
due_date_limit_days: z.number().optional(),
|
|
649
|
+
subscription_cycle: zAsaasPaymentLinkSubscriptionCycleSchema.optional(),
|
|
650
|
+
max_installment_count: z.number().optional(),
|
|
651
|
+
external_reference: z.string().optional(),
|
|
652
|
+
notification_enabled: z.boolean().optional(),
|
|
653
|
+
checkout_url: z.string().optional(),
|
|
654
|
+
callback: z.record(z.unknown()).optional(),
|
|
655
|
+
is_address_required: z.boolean().optional(),
|
|
656
|
+
last_payment_webhook_event: z.string().optional(),
|
|
657
|
+
last_payment_id: z.string().optional(),
|
|
658
|
+
last_payment_status: z.string().optional(),
|
|
659
|
+
last_payment_confirmed_at: zFirestoreDateSchema.optional(),
|
|
660
|
+
last_payment_received_at: zFirestoreDateSchema.optional(),
|
|
661
|
+
raw: z.record(z.unknown()).optional(),
|
|
662
|
+
snapshots: z
|
|
663
|
+
.array(
|
|
664
|
+
z.object({
|
|
665
|
+
direction: z.enum(["request", "response", "webhook"]),
|
|
666
|
+
at: zFirestoreDateSchema,
|
|
667
|
+
body: z.unknown().optional(),
|
|
668
|
+
}),
|
|
669
|
+
)
|
|
670
|
+
.optional(),
|
|
671
|
+
})
|
|
672
|
+
.passthrough();
|
|
673
|
+
|
|
602
674
|
export const zServiceInvoiceSchema = zFireDocSchema
|
|
603
675
|
.extend({
|
|
604
676
|
providerId: z.string(),
|
|
@@ -25,3 +25,4 @@ __exportStar(require("./providers/provider_fiscal_types"), exports);
|
|
|
25
25
|
__exportStar(require("./providers/asaas/asaas_provider"), exports);
|
|
26
26
|
__exportStar(require("./dic"), exports);
|
|
27
27
|
__exportStar(require("./invoices"), exports);
|
|
28
|
+
__exportStar(require("./payment-links"), exports);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { IFireDoc } from "../../shared";
|
|
2
|
+
import type { IInvoiceTakerRef } from "../invoices";
|
|
3
|
+
/** Asaas `billingType` for payment links */
|
|
4
|
+
export declare enum AsaasPaymentLinkBillingTypeEnum {
|
|
5
|
+
UNDEFINED = "UNDEFINED",
|
|
6
|
+
BOLETO = "BOLETO",
|
|
7
|
+
CREDIT_CARD = "CREDIT_CARD",
|
|
8
|
+
PIX = "PIX"
|
|
9
|
+
}
|
|
10
|
+
export type AsaasPaymentLinkBillingType = `${AsaasPaymentLinkBillingTypeEnum}`;
|
|
11
|
+
/** Asaas `chargeType` for payment links */
|
|
12
|
+
export declare enum AsaasPaymentLinkChargeTypeEnum {
|
|
13
|
+
DETACHED = "DETACHED",
|
|
14
|
+
RECURRENT = "RECURRENT",
|
|
15
|
+
INSTALLMENT = "INSTALLMENT"
|
|
16
|
+
}
|
|
17
|
+
export type AsaasPaymentLinkChargeType = `${AsaasPaymentLinkChargeTypeEnum}`;
|
|
18
|
+
/** Asaas `subscriptionCycle` when chargeType is RECURRENT */
|
|
19
|
+
export declare enum AsaasPaymentLinkSubscriptionCycleEnum {
|
|
20
|
+
WEEKLY = "WEEKLY",
|
|
21
|
+
BIWEEKLY = "BIWEEKLY",
|
|
22
|
+
MONTHLY = "MONTHLY",
|
|
23
|
+
BIMONTHLY = "BIMONTHLY",
|
|
24
|
+
QUARTERLY = "QUARTERLY",
|
|
25
|
+
SEMIANNUALLY = "SEMIANNUALLY",
|
|
26
|
+
YEARLY = "YEARLY"
|
|
27
|
+
}
|
|
28
|
+
export type AsaasPaymentLinkSubscriptionCycle = `${AsaasPaymentLinkSubscriptionCycleEnum}`;
|
|
29
|
+
/** Lifecycle / display state for our document (not 1:1 with Asaas enums). */
|
|
30
|
+
export declare enum PaymentLinkDocumentStateEnum {
|
|
31
|
+
DRAFT = "DRAFT",
|
|
32
|
+
ACTIVE = "ACTIVE",
|
|
33
|
+
INACTIVE = "INACTIVE",
|
|
34
|
+
DELETED = "DELETED"
|
|
35
|
+
}
|
|
36
|
+
export type PaymentLinkDocumentState = `${PaymentLinkDocumentStateEnum}`;
|
|
37
|
+
export interface IAsaasPaymentLinkCallbackSnapshot {
|
|
38
|
+
successUrl?: string;
|
|
39
|
+
autoRedirect?: boolean;
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}
|
|
42
|
+
/** Firestore document: one Asaas payment link managed via nex-finops. */
|
|
43
|
+
export interface IPaymentLink extends IFireDoc {
|
|
44
|
+
providerId: string;
|
|
45
|
+
provider_name?: string;
|
|
46
|
+
provider_env?: "Sandbox" | "Production";
|
|
47
|
+
/** Asaas Payment Link id */
|
|
48
|
+
provider_payment_link_id?: string;
|
|
49
|
+
/** Asaas customer id (required to associate charges created via link). */
|
|
50
|
+
asaas_customer_id?: string;
|
|
51
|
+
taker?: IInvoiceTakerRef;
|
|
52
|
+
state?: PaymentLinkDocumentState;
|
|
53
|
+
name?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
endDate?: string;
|
|
56
|
+
value?: number;
|
|
57
|
+
active?: boolean;
|
|
58
|
+
billing_type?: AsaasPaymentLinkBillingType;
|
|
59
|
+
charge_type?: AsaasPaymentLinkChargeType;
|
|
60
|
+
due_date_limit_days?: number;
|
|
61
|
+
subscription_cycle?: AsaasPaymentLinkSubscriptionCycle;
|
|
62
|
+
max_installment_count?: number;
|
|
63
|
+
external_reference?: string;
|
|
64
|
+
notification_enabled?: boolean;
|
|
65
|
+
/** Checkout / public URL from Asaas */
|
|
66
|
+
checkout_url?: string;
|
|
67
|
+
callback?: IAsaasPaymentLinkCallbackSnapshot;
|
|
68
|
+
is_address_required?: boolean;
|
|
69
|
+
/** Last payment activity from webhook (optional). */
|
|
70
|
+
last_payment_webhook_event?: string;
|
|
71
|
+
last_payment_id?: string;
|
|
72
|
+
last_payment_status?: string;
|
|
73
|
+
last_payment_confirmed_at?: Date;
|
|
74
|
+
last_payment_received_at?: Date;
|
|
75
|
+
raw?: Record<string, unknown>;
|
|
76
|
+
snapshots?: Array<{
|
|
77
|
+
direction: "request" | "response" | "webhook";
|
|
78
|
+
at: Date;
|
|
79
|
+
body?: unknown;
|
|
80
|
+
}>;
|
|
81
|
+
[key: string]: unknown;
|
|
82
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Nexus / FinOps — Payment links (Asaas) persisted in Firestore
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PaymentLinkDocumentStateEnum = exports.AsaasPaymentLinkSubscriptionCycleEnum = exports.AsaasPaymentLinkChargeTypeEnum = exports.AsaasPaymentLinkBillingTypeEnum = void 0;
|
|
5
|
+
/** Asaas `billingType` for payment links */
|
|
6
|
+
var AsaasPaymentLinkBillingTypeEnum;
|
|
7
|
+
(function (AsaasPaymentLinkBillingTypeEnum) {
|
|
8
|
+
AsaasPaymentLinkBillingTypeEnum["UNDEFINED"] = "UNDEFINED";
|
|
9
|
+
AsaasPaymentLinkBillingTypeEnum["BOLETO"] = "BOLETO";
|
|
10
|
+
AsaasPaymentLinkBillingTypeEnum["CREDIT_CARD"] = "CREDIT_CARD";
|
|
11
|
+
AsaasPaymentLinkBillingTypeEnum["PIX"] = "PIX";
|
|
12
|
+
})(AsaasPaymentLinkBillingTypeEnum || (exports.AsaasPaymentLinkBillingTypeEnum = AsaasPaymentLinkBillingTypeEnum = {}));
|
|
13
|
+
/** Asaas `chargeType` for payment links */
|
|
14
|
+
var AsaasPaymentLinkChargeTypeEnum;
|
|
15
|
+
(function (AsaasPaymentLinkChargeTypeEnum) {
|
|
16
|
+
AsaasPaymentLinkChargeTypeEnum["DETACHED"] = "DETACHED";
|
|
17
|
+
AsaasPaymentLinkChargeTypeEnum["RECURRENT"] = "RECURRENT";
|
|
18
|
+
AsaasPaymentLinkChargeTypeEnum["INSTALLMENT"] = "INSTALLMENT";
|
|
19
|
+
})(AsaasPaymentLinkChargeTypeEnum || (exports.AsaasPaymentLinkChargeTypeEnum = AsaasPaymentLinkChargeTypeEnum = {}));
|
|
20
|
+
/** Asaas `subscriptionCycle` when chargeType is RECURRENT */
|
|
21
|
+
var AsaasPaymentLinkSubscriptionCycleEnum;
|
|
22
|
+
(function (AsaasPaymentLinkSubscriptionCycleEnum) {
|
|
23
|
+
AsaasPaymentLinkSubscriptionCycleEnum["WEEKLY"] = "WEEKLY";
|
|
24
|
+
AsaasPaymentLinkSubscriptionCycleEnum["BIWEEKLY"] = "BIWEEKLY";
|
|
25
|
+
AsaasPaymentLinkSubscriptionCycleEnum["MONTHLY"] = "MONTHLY";
|
|
26
|
+
AsaasPaymentLinkSubscriptionCycleEnum["BIMONTHLY"] = "BIMONTHLY";
|
|
27
|
+
AsaasPaymentLinkSubscriptionCycleEnum["QUARTERLY"] = "QUARTERLY";
|
|
28
|
+
AsaasPaymentLinkSubscriptionCycleEnum["SEMIANNUALLY"] = "SEMIANNUALLY";
|
|
29
|
+
AsaasPaymentLinkSubscriptionCycleEnum["YEARLY"] = "YEARLY";
|
|
30
|
+
})(AsaasPaymentLinkSubscriptionCycleEnum || (exports.AsaasPaymentLinkSubscriptionCycleEnum = AsaasPaymentLinkSubscriptionCycleEnum = {}));
|
|
31
|
+
/** Lifecycle / display state for our document (not 1:1 with Asaas enums). */
|
|
32
|
+
var PaymentLinkDocumentStateEnum;
|
|
33
|
+
(function (PaymentLinkDocumentStateEnum) {
|
|
34
|
+
PaymentLinkDocumentStateEnum["DRAFT"] = "DRAFT";
|
|
35
|
+
PaymentLinkDocumentStateEnum["ACTIVE"] = "ACTIVE";
|
|
36
|
+
PaymentLinkDocumentStateEnum["INACTIVE"] = "INACTIVE";
|
|
37
|
+
PaymentLinkDocumentStateEnum["DELETED"] = "DELETED";
|
|
38
|
+
})(PaymentLinkDocumentStateEnum || (exports.PaymentLinkDocumentStateEnum = PaymentLinkDocumentStateEnum = {}));
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// Nexus / FinOps — Payment links (Asaas) persisted in Firestore
|
|
2
|
+
|
|
3
|
+
import type { IFireDoc } from "../../shared";
|
|
4
|
+
import type { IInvoiceTakerRef } from "../invoices";
|
|
5
|
+
|
|
6
|
+
/** Asaas `billingType` for payment links */
|
|
7
|
+
export enum AsaasPaymentLinkBillingTypeEnum {
|
|
8
|
+
UNDEFINED = "UNDEFINED",
|
|
9
|
+
BOLETO = "BOLETO",
|
|
10
|
+
CREDIT_CARD = "CREDIT_CARD",
|
|
11
|
+
PIX = "PIX",
|
|
12
|
+
}
|
|
13
|
+
export type AsaasPaymentLinkBillingType = `${AsaasPaymentLinkBillingTypeEnum}`;
|
|
14
|
+
|
|
15
|
+
/** Asaas `chargeType` for payment links */
|
|
16
|
+
export enum AsaasPaymentLinkChargeTypeEnum {
|
|
17
|
+
DETACHED = "DETACHED",
|
|
18
|
+
RECURRENT = "RECURRENT",
|
|
19
|
+
INSTALLMENT = "INSTALLMENT",
|
|
20
|
+
}
|
|
21
|
+
export type AsaasPaymentLinkChargeType = `${AsaasPaymentLinkChargeTypeEnum}`;
|
|
22
|
+
|
|
23
|
+
/** Asaas `subscriptionCycle` when chargeType is RECURRENT */
|
|
24
|
+
export enum AsaasPaymentLinkSubscriptionCycleEnum {
|
|
25
|
+
WEEKLY = "WEEKLY",
|
|
26
|
+
BIWEEKLY = "BIWEEKLY",
|
|
27
|
+
MONTHLY = "MONTHLY",
|
|
28
|
+
BIMONTHLY = "BIMONTHLY",
|
|
29
|
+
QUARTERLY = "QUARTERLY",
|
|
30
|
+
SEMIANNUALLY = "SEMIANNUALLY",
|
|
31
|
+
YEARLY = "YEARLY",
|
|
32
|
+
}
|
|
33
|
+
export type AsaasPaymentLinkSubscriptionCycle =
|
|
34
|
+
`${AsaasPaymentLinkSubscriptionCycleEnum}`;
|
|
35
|
+
|
|
36
|
+
/** Lifecycle / display state for our document (not 1:1 with Asaas enums). */
|
|
37
|
+
export enum PaymentLinkDocumentStateEnum {
|
|
38
|
+
DRAFT = "DRAFT",
|
|
39
|
+
ACTIVE = "ACTIVE",
|
|
40
|
+
INACTIVE = "INACTIVE",
|
|
41
|
+
DELETED = "DELETED",
|
|
42
|
+
}
|
|
43
|
+
export type PaymentLinkDocumentState = `${PaymentLinkDocumentStateEnum}`;
|
|
44
|
+
|
|
45
|
+
export interface IAsaasPaymentLinkCallbackSnapshot {
|
|
46
|
+
successUrl?: string;
|
|
47
|
+
autoRedirect?: boolean;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Firestore document: one Asaas payment link managed via nex-finops. */
|
|
52
|
+
export interface IPaymentLink extends IFireDoc {
|
|
53
|
+
providerId: string;
|
|
54
|
+
provider_name?: string;
|
|
55
|
+
provider_env?: "Sandbox" | "Production";
|
|
56
|
+
|
|
57
|
+
/** Asaas Payment Link id */
|
|
58
|
+
provider_payment_link_id?: string;
|
|
59
|
+
|
|
60
|
+
/** Asaas customer id (required to associate charges created via link). */
|
|
61
|
+
asaas_customer_id?: string;
|
|
62
|
+
|
|
63
|
+
taker?: IInvoiceTakerRef;
|
|
64
|
+
|
|
65
|
+
state?: PaymentLinkDocumentState;
|
|
66
|
+
|
|
67
|
+
name?: string;
|
|
68
|
+
description?: string;
|
|
69
|
+
endDate?: string;
|
|
70
|
+
value?: number;
|
|
71
|
+
active?: boolean;
|
|
72
|
+
billing_type?: AsaasPaymentLinkBillingType;
|
|
73
|
+
charge_type?: AsaasPaymentLinkChargeType;
|
|
74
|
+
due_date_limit_days?: number;
|
|
75
|
+
subscription_cycle?: AsaasPaymentLinkSubscriptionCycle;
|
|
76
|
+
max_installment_count?: number;
|
|
77
|
+
external_reference?: string;
|
|
78
|
+
notification_enabled?: boolean;
|
|
79
|
+
/** Checkout / public URL from Asaas */
|
|
80
|
+
checkout_url?: string;
|
|
81
|
+
callback?: IAsaasPaymentLinkCallbackSnapshot;
|
|
82
|
+
is_address_required?: boolean;
|
|
83
|
+
|
|
84
|
+
/** Last payment activity from webhook (optional). */
|
|
85
|
+
last_payment_webhook_event?: string;
|
|
86
|
+
last_payment_id?: string;
|
|
87
|
+
last_payment_status?: string;
|
|
88
|
+
last_payment_confirmed_at?: Date;
|
|
89
|
+
last_payment_received_at?: Date;
|
|
90
|
+
|
|
91
|
+
raw?: Record<string, unknown>;
|
|
92
|
+
snapshots?: Array<{
|
|
93
|
+
direction: "request" | "response" | "webhook";
|
|
94
|
+
at: Date;
|
|
95
|
+
body?: unknown;
|
|
96
|
+
}>;
|
|
97
|
+
|
|
98
|
+
[key: string]: unknown;
|
|
99
|
+
}
|
|
@@ -13,6 +13,40 @@ export declare enum AsaasWebhookEventEnum {
|
|
|
13
13
|
INVOICE_ERROR = "INVOICE_ERROR"
|
|
14
14
|
}
|
|
15
15
|
export type AsaasWebhookEvent = `${AsaasWebhookEventEnum}`;
|
|
16
|
+
/**
|
|
17
|
+
* Common Asaas charge webhook events (payment links surface activity via these).
|
|
18
|
+
* @see https://docs.asaas.com/docs/payment-events
|
|
19
|
+
*/
|
|
20
|
+
export declare enum AsaasPaymentWebhookEventEnum {
|
|
21
|
+
PAYMENT_CREATED = "PAYMENT_CREATED",
|
|
22
|
+
PAYMENT_AWAITING_RISK_ANALYSIS = "PAYMENT_AWAITING_RISK_ANALYSIS",
|
|
23
|
+
PAYMENT_APPROVED_BY_RISK_ANALYSIS = "PAYMENT_APPROVED_BY_RISK_ANALYSIS",
|
|
24
|
+
PAYMENT_REPROVED_BY_RISK_ANALYSIS = "PAYMENT_REPROVED_BY_RISK_ANALYSIS",
|
|
25
|
+
PAYMENT_AUTHORIZED = "PAYMENT_AUTHORIZED",
|
|
26
|
+
PAYMENT_UPDATED = "PAYMENT_UPDATED",
|
|
27
|
+
PAYMENT_CONFIRMED = "PAYMENT_CONFIRMED",
|
|
28
|
+
PAYMENT_RECEIVED = "PAYMENT_RECEIVED",
|
|
29
|
+
PAYMENT_CREDIT_CARD_CAPTURE_REFUSED = "PAYMENT_CREDIT_CARD_CAPTURE_REFUSED",
|
|
30
|
+
PAYMENT_ANTICIPATED = "PAYMENT_ANTICIPATED",
|
|
31
|
+
PAYMENT_OVERDUE = "PAYMENT_OVERDUE",
|
|
32
|
+
PAYMENT_DELETED = "PAYMENT_DELETED",
|
|
33
|
+
PAYMENT_RESTORED = "PAYMENT_RESTORED",
|
|
34
|
+
PAYMENT_REFUNDED = "PAYMENT_REFUNDED",
|
|
35
|
+
PAYMENT_REFUND_IN_PROGRESS = "PAYMENT_REFUND_IN_PROGRESS",
|
|
36
|
+
PAYMENT_RECEIVED_IN_CASH_UNDONE = "PAYMENT_RECEIVED_IN_CASH_UNDONE",
|
|
37
|
+
PAYMENT_CHARGEBACK_REQUESTED = "PAYMENT_CHARGEBACK_REQUESTED",
|
|
38
|
+
PAYMENT_CHARGEBACK_DISPUTE = "PAYMENT_CHARGEBACK_DISPUTE",
|
|
39
|
+
PAYMENT_AWAITING_CHARGEBACK_REVERSAL = "PAYMENT_AWAITING_CHARGEBACK_REVERSAL",
|
|
40
|
+
PAYMENT_DUNNING_REQUESTED = "PAYMENT_DUNNING_REQUESTED",
|
|
41
|
+
PAYMENT_DUNNING_RECEIVED = "PAYMENT_DUNNING_RECEIVED",
|
|
42
|
+
PAYMENT_BANK_SLIP_VIEWED = "PAYMENT_BANK_SLIP_VIEWED",
|
|
43
|
+
PAYMENT_CHECKOUT_VIEWED = "PAYMENT_CHECKOUT_VIEWED",
|
|
44
|
+
PAYMENT_SPLIT_DIVERGENCE_BLOCK = "PAYMENT_SPLIT_DIVERGENCE_BLOCK",
|
|
45
|
+
PAYMENT_SPLIT_DIVERGENCE_BLOCK_FINISHED = "PAYMENT_SPLIT_DIVERGENCE_BLOCK_FINISHED"
|
|
46
|
+
}
|
|
47
|
+
export type AsaasPaymentWebhookEvent = `${AsaasPaymentWebhookEventEnum}`;
|
|
48
|
+
/** Any webhook event name you may subscribe in Asaas (invoice + payment + future). */
|
|
49
|
+
export type AsaasSubscribableWebhookEvent = AsaasWebhookEvent | AsaasPaymentWebhookEvent | string;
|
|
16
50
|
export interface IRetryPolicy {
|
|
17
51
|
max_attempts?: number;
|
|
18
52
|
initial_backoff_ms?: number;
|
|
@@ -29,7 +63,7 @@ export interface IAsaasWebhookConfig {
|
|
|
29
63
|
secret_ref?: GoogleSecretRef;
|
|
30
64
|
secret_hash?: string;
|
|
31
65
|
token?: string;
|
|
32
|
-
events:
|
|
66
|
+
events: AsaasSubscribableWebhookEvent[];
|
|
33
67
|
remote_webhook_id?: string;
|
|
34
68
|
last_sync_at?: string;
|
|
35
69
|
last_validation?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsaasWebhookEventEnum = void 0;
|
|
3
|
+
exports.AsaasPaymentWebhookEventEnum = exports.AsaasWebhookEventEnum = void 0;
|
|
4
4
|
var AsaasWebhookEventEnum;
|
|
5
5
|
(function (AsaasWebhookEventEnum) {
|
|
6
6
|
AsaasWebhookEventEnum["INVOICE_CREATED"] = "INVOICE_CREATED";
|
|
@@ -12,3 +12,35 @@ var AsaasWebhookEventEnum;
|
|
|
12
12
|
AsaasWebhookEventEnum["INVOICE_CANCELLATION_DENIED"] = "INVOICE_CANCELLATION_DENIED";
|
|
13
13
|
AsaasWebhookEventEnum["INVOICE_ERROR"] = "INVOICE_ERROR";
|
|
14
14
|
})(AsaasWebhookEventEnum || (exports.AsaasWebhookEventEnum = AsaasWebhookEventEnum = {}));
|
|
15
|
+
/**
|
|
16
|
+
* Common Asaas charge webhook events (payment links surface activity via these).
|
|
17
|
+
* @see https://docs.asaas.com/docs/payment-events
|
|
18
|
+
*/
|
|
19
|
+
var AsaasPaymentWebhookEventEnum;
|
|
20
|
+
(function (AsaasPaymentWebhookEventEnum) {
|
|
21
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_CREATED"] = "PAYMENT_CREATED";
|
|
22
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_AWAITING_RISK_ANALYSIS"] = "PAYMENT_AWAITING_RISK_ANALYSIS";
|
|
23
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_APPROVED_BY_RISK_ANALYSIS"] = "PAYMENT_APPROVED_BY_RISK_ANALYSIS";
|
|
24
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_REPROVED_BY_RISK_ANALYSIS"] = "PAYMENT_REPROVED_BY_RISK_ANALYSIS";
|
|
25
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_AUTHORIZED"] = "PAYMENT_AUTHORIZED";
|
|
26
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_UPDATED"] = "PAYMENT_UPDATED";
|
|
27
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_CONFIRMED"] = "PAYMENT_CONFIRMED";
|
|
28
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_RECEIVED"] = "PAYMENT_RECEIVED";
|
|
29
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_CREDIT_CARD_CAPTURE_REFUSED"] = "PAYMENT_CREDIT_CARD_CAPTURE_REFUSED";
|
|
30
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_ANTICIPATED"] = "PAYMENT_ANTICIPATED";
|
|
31
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_OVERDUE"] = "PAYMENT_OVERDUE";
|
|
32
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_DELETED"] = "PAYMENT_DELETED";
|
|
33
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_RESTORED"] = "PAYMENT_RESTORED";
|
|
34
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_REFUNDED"] = "PAYMENT_REFUNDED";
|
|
35
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_REFUND_IN_PROGRESS"] = "PAYMENT_REFUND_IN_PROGRESS";
|
|
36
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_RECEIVED_IN_CASH_UNDONE"] = "PAYMENT_RECEIVED_IN_CASH_UNDONE";
|
|
37
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_CHARGEBACK_REQUESTED"] = "PAYMENT_CHARGEBACK_REQUESTED";
|
|
38
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_CHARGEBACK_DISPUTE"] = "PAYMENT_CHARGEBACK_DISPUTE";
|
|
39
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_AWAITING_CHARGEBACK_REVERSAL"] = "PAYMENT_AWAITING_CHARGEBACK_REVERSAL";
|
|
40
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_DUNNING_REQUESTED"] = "PAYMENT_DUNNING_REQUESTED";
|
|
41
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_DUNNING_RECEIVED"] = "PAYMENT_DUNNING_RECEIVED";
|
|
42
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_BANK_SLIP_VIEWED"] = "PAYMENT_BANK_SLIP_VIEWED";
|
|
43
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_CHECKOUT_VIEWED"] = "PAYMENT_CHECKOUT_VIEWED";
|
|
44
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_SPLIT_DIVERGENCE_BLOCK"] = "PAYMENT_SPLIT_DIVERGENCE_BLOCK";
|
|
45
|
+
AsaasPaymentWebhookEventEnum["PAYMENT_SPLIT_DIVERGENCE_BLOCK_FINISHED"] = "PAYMENT_SPLIT_DIVERGENCE_BLOCK_FINISHED";
|
|
46
|
+
})(AsaasPaymentWebhookEventEnum || (exports.AsaasPaymentWebhookEventEnum = AsaasPaymentWebhookEventEnum = {}));
|
|
@@ -22,6 +22,46 @@ export enum AsaasWebhookEventEnum {
|
|
|
22
22
|
|
|
23
23
|
export type AsaasWebhookEvent = `${AsaasWebhookEventEnum}`;
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Common Asaas charge webhook events (payment links surface activity via these).
|
|
27
|
+
* @see https://docs.asaas.com/docs/payment-events
|
|
28
|
+
*/
|
|
29
|
+
export enum AsaasPaymentWebhookEventEnum {
|
|
30
|
+
PAYMENT_CREATED = "PAYMENT_CREATED",
|
|
31
|
+
PAYMENT_AWAITING_RISK_ANALYSIS = "PAYMENT_AWAITING_RISK_ANALYSIS",
|
|
32
|
+
PAYMENT_APPROVED_BY_RISK_ANALYSIS = "PAYMENT_APPROVED_BY_RISK_ANALYSIS",
|
|
33
|
+
PAYMENT_REPROVED_BY_RISK_ANALYSIS = "PAYMENT_REPROVED_BY_RISK_ANALYSIS",
|
|
34
|
+
PAYMENT_AUTHORIZED = "PAYMENT_AUTHORIZED",
|
|
35
|
+
PAYMENT_UPDATED = "PAYMENT_UPDATED",
|
|
36
|
+
PAYMENT_CONFIRMED = "PAYMENT_CONFIRMED",
|
|
37
|
+
PAYMENT_RECEIVED = "PAYMENT_RECEIVED",
|
|
38
|
+
PAYMENT_CREDIT_CARD_CAPTURE_REFUSED = "PAYMENT_CREDIT_CARD_CAPTURE_REFUSED",
|
|
39
|
+
PAYMENT_ANTICIPATED = "PAYMENT_ANTICIPATED",
|
|
40
|
+
PAYMENT_OVERDUE = "PAYMENT_OVERDUE",
|
|
41
|
+
PAYMENT_DELETED = "PAYMENT_DELETED",
|
|
42
|
+
PAYMENT_RESTORED = "PAYMENT_RESTORED",
|
|
43
|
+
PAYMENT_REFUNDED = "PAYMENT_REFUNDED",
|
|
44
|
+
PAYMENT_REFUND_IN_PROGRESS = "PAYMENT_REFUND_IN_PROGRESS",
|
|
45
|
+
PAYMENT_RECEIVED_IN_CASH_UNDONE = "PAYMENT_RECEIVED_IN_CASH_UNDONE",
|
|
46
|
+
PAYMENT_CHARGEBACK_REQUESTED = "PAYMENT_CHARGEBACK_REQUESTED",
|
|
47
|
+
PAYMENT_CHARGEBACK_DISPUTE = "PAYMENT_CHARGEBACK_DISPUTE",
|
|
48
|
+
PAYMENT_AWAITING_CHARGEBACK_REVERSAL = "PAYMENT_AWAITING_CHARGEBACK_REVERSAL",
|
|
49
|
+
PAYMENT_DUNNING_REQUESTED = "PAYMENT_DUNNING_REQUESTED",
|
|
50
|
+
PAYMENT_DUNNING_RECEIVED = "PAYMENT_DUNNING_RECEIVED",
|
|
51
|
+
PAYMENT_BANK_SLIP_VIEWED = "PAYMENT_BANK_SLIP_VIEWED",
|
|
52
|
+
PAYMENT_CHECKOUT_VIEWED = "PAYMENT_CHECKOUT_VIEWED",
|
|
53
|
+
PAYMENT_SPLIT_DIVERGENCE_BLOCK = "PAYMENT_SPLIT_DIVERGENCE_BLOCK",
|
|
54
|
+
PAYMENT_SPLIT_DIVERGENCE_BLOCK_FINISHED = "PAYMENT_SPLIT_DIVERGENCE_BLOCK_FINISHED",
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type AsaasPaymentWebhookEvent = `${AsaasPaymentWebhookEventEnum}`;
|
|
58
|
+
|
|
59
|
+
/** Any webhook event name you may subscribe in Asaas (invoice + payment + future). */
|
|
60
|
+
export type AsaasSubscribableWebhookEvent =
|
|
61
|
+
| AsaasWebhookEvent
|
|
62
|
+
| AsaasPaymentWebhookEvent
|
|
63
|
+
| string;
|
|
64
|
+
|
|
25
65
|
export interface IRetryPolicy {
|
|
26
66
|
max_attempts?: number; // e.g. 5
|
|
27
67
|
initial_backoff_ms?: number; // e.g. 500
|
|
@@ -44,8 +84,8 @@ export interface IAsaasWebhookConfig {
|
|
|
44
84
|
// Plaintext webhook token (used in header `asaas-access-token`).
|
|
45
85
|
token?: string;
|
|
46
86
|
|
|
47
|
-
// Events you intend to subscribe / process.
|
|
48
|
-
events:
|
|
87
|
+
// Events you intend to subscribe / process (NFSe, PAYMENT_*, etc.).
|
|
88
|
+
events: AsaasSubscribableWebhookEvent[];
|
|
49
89
|
|
|
50
90
|
// Useful when Asaas returns a remote webhook identifier in the future/implementation.
|
|
51
91
|
remote_webhook_id?: string;
|