@invoicetronic/ts-sdk 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/README.md +2 -2
- package/base.ts +0 -24
- package/common.ts +1 -38
- package/configuration.ts +25 -19
- package/dist/base.d.ts +0 -24
- package/dist/base.js +0 -19
- package/dist/common.d.ts +0 -37
- package/dist/common.js +0 -37
- package/dist/configuration.d.ts +24 -17
- package/dist/configuration.js +2 -2
- package/dist/esm/base.d.ts +0 -24
- package/dist/esm/base.js +0 -19
- package/dist/esm/common.d.ts +0 -37
- package/dist/esm/common.js +0 -37
- package/dist/esm/configuration.d.ts +24 -17
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/src/api/company-api.d.ts +5 -23
- package/dist/esm/src/api/company-api.js +0 -11
- package/dist/esm/src/api/log-api.d.ts +2 -14
- package/dist/esm/src/api/log-api.js +0 -8
- package/dist/esm/src/api/receive-api.d.ts +3 -17
- package/dist/esm/src/api/receive-api.js +0 -9
- package/dist/esm/src/api/send-api.d.ts +11 -53
- package/dist/esm/src/api/send-api.js +0 -29
- package/dist/esm/src/api/status-api.d.ts +1 -11
- package/dist/esm/src/api/status-api.js +0 -7
- package/dist/esm/src/api/update-api.d.ts +2 -17
- package/dist/esm/src/api/update-api.js +0 -11
- package/dist/esm/src/api/webhook-api.d.ts +7 -29
- package/dist/esm/src/api/webhook-api.js +0 -13
- package/dist/esm/src/models/allegati.d.ts +0 -30
- package/dist/esm/src/models/altri-dati-gestionali.d.ts +0 -25
- package/dist/esm/src/models/anagrafica.d.ts +0 -30
- package/dist/esm/src/models/cedente-prestatore.d.ts +0 -35
- package/dist/esm/src/models/cessionario-committente.d.ts +0 -25
- package/dist/esm/src/models/codice-articolo.d.ts +0 -15
- package/dist/esm/src/models/company.d.ts +0 -16
- package/dist/esm/src/models/contatti-trasmittente.d.ts +0 -15
- package/dist/esm/src/models/contatti.d.ts +0 -20
- package/dist/esm/src/models/dati-anagrafici-cedente-prestatore.d.ts +0 -45
- package/dist/esm/src/models/dati-anagrafici-cessionario-committente.d.ts +0 -20
- package/dist/esm/src/models/dati-anagrafici-vettore.d.ts +0 -25
- package/dist/esm/src/models/dati-anagrafici.d.ts +0 -20
- package/dist/esm/src/models/dati-beni-servizi.d.ts +0 -15
- package/dist/esm/src/models/dati-bollo.d.ts +0 -15
- package/dist/esm/src/models/dati-cassa-previdenziale.d.ts +0 -45
- package/dist/esm/src/models/dati-contratto.d.ts +0 -40
- package/dist/esm/src/models/dati-convenzione.d.ts +0 -40
- package/dist/esm/src/models/dati-ddt.d.ts +0 -20
- package/dist/esm/src/models/dati-fatture-collegate.d.ts +0 -40
- package/dist/esm/src/models/dati-generali-documento.d.ts +0 -65
- package/dist/esm/src/models/dati-generali.d.ts +0 -55
- package/dist/esm/src/models/dati-ordine-acquisto.d.ts +0 -40
- package/dist/esm/src/models/dati-pagamento.d.ts +0 -15
- package/dist/esm/src/models/dati-ricezione.d.ts +0 -40
- package/dist/esm/src/models/dati-riepilogo.d.ts +0 -45
- package/dist/esm/src/models/dati-ritenuta.d.ts +0 -25
- package/dist/esm/src/models/dati-sal.d.ts +0 -10
- package/dist/esm/src/models/dati-trasmissione.d.ts +0 -35
- package/dist/esm/src/models/dati-trasporto.d.ts +0 -70
- package/dist/esm/src/models/dati-veicoli.d.ts +0 -15
- package/dist/esm/src/models/dettaglio-linee.d.ts +0 -85
- package/dist/esm/src/models/dettaglio-pagamento.d.ts +0 -110
- package/dist/esm/src/models/document-data.d.ts +0 -15
- package/dist/esm/src/models/event.d.ts +8 -39
- package/dist/esm/src/models/fattura-elettronica-body.d.ts +0 -30
- package/dist/esm/src/models/fattura-elettronica-header.d.ts +0 -35
- package/dist/esm/src/models/fattura-ordinaria.d.ts +0 -20
- package/dist/esm/src/models/fattura-principale.d.ts +0 -15
- package/dist/esm/src/models/id-fiscale-iva.d.ts +0 -15
- package/dist/esm/src/models/id-trasmittente.d.ts +0 -15
- package/dist/esm/src/models/indirizzo-resa.d.ts +0 -35
- package/dist/esm/src/models/iscrizione-rea.d.ts +0 -30
- package/dist/esm/src/models/model-error.d.ts +0 -8
- package/dist/esm/src/models/problem-details.d.ts +0 -30
- package/dist/esm/src/models/problem-http-result.d.ts +0 -20
- package/dist/esm/src/models/rappresentante-fiscale-cessionario-committente.d.ts +0 -25
- package/dist/esm/src/models/rappresentante-fiscale.d.ts +0 -10
- package/dist/esm/src/models/receive.d.ts +0 -39
- package/dist/esm/src/models/sconto-maggiorazione.d.ts +0 -20
- package/dist/esm/src/models/sede-cedente-prestatore.d.ts +0 -35
- package/dist/esm/src/models/sede-cessionario-committente.d.ts +0 -35
- package/dist/esm/src/models/send-reduced.d.ts +0 -12
- package/dist/esm/src/models/send.d.ts +0 -42
- package/dist/esm/src/models/stabile-organizzazione.d.ts +0 -35
- package/dist/esm/src/models/status.d.ts +0 -9
- package/dist/esm/src/models/terzo-intermediario-osoggetto-emittente.d.ts +0 -10
- package/dist/esm/src/models/update.d.ts +0 -34
- package/dist/esm/src/models/web-hook-history.d.ts +0 -20
- package/dist/esm/src/models/web-hook.d.ts +0 -25
- package/dist/src/api/company-api.d.ts +5 -23
- package/dist/src/api/company-api.js +0 -11
- package/dist/src/api/log-api.d.ts +2 -14
- package/dist/src/api/log-api.js +0 -8
- package/dist/src/api/receive-api.d.ts +3 -17
- package/dist/src/api/receive-api.js +0 -9
- package/dist/src/api/send-api.d.ts +11 -53
- package/dist/src/api/send-api.js +0 -29
- package/dist/src/api/status-api.d.ts +1 -11
- package/dist/src/api/status-api.js +0 -7
- package/dist/src/api/update-api.d.ts +2 -17
- package/dist/src/api/update-api.js +0 -11
- package/dist/src/api/webhook-api.d.ts +7 -29
- package/dist/src/api/webhook-api.js +0 -13
- package/dist/src/models/allegati.d.ts +0 -30
- package/dist/src/models/altri-dati-gestionali.d.ts +0 -25
- package/dist/src/models/anagrafica.d.ts +0 -30
- package/dist/src/models/cedente-prestatore.d.ts +0 -35
- package/dist/src/models/cessionario-committente.d.ts +0 -25
- package/dist/src/models/codice-articolo.d.ts +0 -15
- package/dist/src/models/company.d.ts +0 -16
- package/dist/src/models/contatti-trasmittente.d.ts +0 -15
- package/dist/src/models/contatti.d.ts +0 -20
- package/dist/src/models/dati-anagrafici-cedente-prestatore.d.ts +0 -45
- package/dist/src/models/dati-anagrafici-cessionario-committente.d.ts +0 -20
- package/dist/src/models/dati-anagrafici-vettore.d.ts +0 -25
- package/dist/src/models/dati-anagrafici.d.ts +0 -20
- package/dist/src/models/dati-beni-servizi.d.ts +0 -15
- package/dist/src/models/dati-bollo.d.ts +0 -15
- package/dist/src/models/dati-cassa-previdenziale.d.ts +0 -45
- package/dist/src/models/dati-contratto.d.ts +0 -40
- package/dist/src/models/dati-convenzione.d.ts +0 -40
- package/dist/src/models/dati-ddt.d.ts +0 -20
- package/dist/src/models/dati-fatture-collegate.d.ts +0 -40
- package/dist/src/models/dati-generali-documento.d.ts +0 -65
- package/dist/src/models/dati-generali.d.ts +0 -55
- package/dist/src/models/dati-ordine-acquisto.d.ts +0 -40
- package/dist/src/models/dati-pagamento.d.ts +0 -15
- package/dist/src/models/dati-ricezione.d.ts +0 -40
- package/dist/src/models/dati-riepilogo.d.ts +0 -45
- package/dist/src/models/dati-ritenuta.d.ts +0 -25
- package/dist/src/models/dati-sal.d.ts +0 -10
- package/dist/src/models/dati-trasmissione.d.ts +0 -35
- package/dist/src/models/dati-trasporto.d.ts +0 -70
- package/dist/src/models/dati-veicoli.d.ts +0 -15
- package/dist/src/models/dettaglio-linee.d.ts +0 -85
- package/dist/src/models/dettaglio-pagamento.d.ts +0 -110
- package/dist/src/models/document-data.d.ts +0 -15
- package/dist/src/models/event.d.ts +8 -39
- package/dist/src/models/fattura-elettronica-body.d.ts +0 -30
- package/dist/src/models/fattura-elettronica-header.d.ts +0 -35
- package/dist/src/models/fattura-ordinaria.d.ts +0 -20
- package/dist/src/models/fattura-principale.d.ts +0 -15
- package/dist/src/models/id-fiscale-iva.d.ts +0 -15
- package/dist/src/models/id-trasmittente.d.ts +0 -15
- package/dist/src/models/indirizzo-resa.d.ts +0 -35
- package/dist/src/models/iscrizione-rea.d.ts +0 -30
- package/dist/src/models/model-error.d.ts +0 -8
- package/dist/src/models/problem-details.d.ts +0 -30
- package/dist/src/models/problem-http-result.d.ts +0 -20
- package/dist/src/models/rappresentante-fiscale-cessionario-committente.d.ts +0 -25
- package/dist/src/models/rappresentante-fiscale.d.ts +0 -10
- package/dist/src/models/receive.d.ts +0 -39
- package/dist/src/models/sconto-maggiorazione.d.ts +0 -20
- package/dist/src/models/sede-cedente-prestatore.d.ts +0 -35
- package/dist/src/models/sede-cessionario-committente.d.ts +0 -35
- package/dist/src/models/send-reduced.d.ts +0 -12
- package/dist/src/models/send.d.ts +0 -42
- package/dist/src/models/stabile-organizzazione.d.ts +0 -35
- package/dist/src/models/status.d.ts +0 -9
- package/dist/src/models/terzo-intermediario-osoggetto-emittente.d.ts +0 -10
- package/dist/src/models/update.d.ts +0 -34
- package/dist/src/models/web-hook-history.d.ts +0 -20
- package/dist/src/models/web-hook.d.ts +0 -25
- package/docs/Event.md +4 -2
- package/package.json +1 -1
- package/src/api/company-api.ts +0 -18
- package/src/api/log-api.ts +0 -12
- package/src/api/receive-api.ts +0 -14
- package/src/api/send-api.ts +0 -42
- package/src/api/status-api.ts +0 -10
- package/src/api/update-api.ts +0 -15
- package/src/api/webhook-api.ts +0 -22
- package/src/models/allegati.ts +0 -30
- package/src/models/altri-dati-gestionali.ts +0 -25
- package/src/models/anagrafica.ts +0 -30
- package/src/models/cedente-prestatore.ts +0 -35
- package/src/models/cessionario-committente.ts +0 -25
- package/src/models/codice-articolo.ts +0 -15
- package/src/models/company.ts +0 -16
- package/src/models/contatti-trasmittente.ts +0 -15
- package/src/models/contatti.ts +0 -20
- package/src/models/dati-anagrafici-cedente-prestatore.ts +0 -45
- package/src/models/dati-anagrafici-cessionario-committente.ts +0 -20
- package/src/models/dati-anagrafici-vettore.ts +0 -25
- package/src/models/dati-anagrafici.ts +0 -20
- package/src/models/dati-beni-servizi.ts +0 -15
- package/src/models/dati-bollo.ts +0 -15
- package/src/models/dati-cassa-previdenziale.ts +0 -45
- package/src/models/dati-contratto.ts +0 -40
- package/src/models/dati-convenzione.ts +0 -40
- package/src/models/dati-ddt.ts +0 -20
- package/src/models/dati-fatture-collegate.ts +0 -40
- package/src/models/dati-generali-documento.ts +0 -65
- package/src/models/dati-generali.ts +0 -55
- package/src/models/dati-ordine-acquisto.ts +0 -40
- package/src/models/dati-pagamento.ts +0 -15
- package/src/models/dati-ricezione.ts +0 -40
- package/src/models/dati-riepilogo.ts +0 -45
- package/src/models/dati-ritenuta.ts +0 -25
- package/src/models/dati-sal.ts +0 -10
- package/src/models/dati-trasmissione.ts +0 -35
- package/src/models/dati-trasporto.ts +0 -70
- package/src/models/dati-veicoli.ts +0 -15
- package/src/models/dettaglio-linee.ts +0 -85
- package/src/models/dettaglio-pagamento.ts +0 -110
- package/src/models/document-data.ts +0 -15
- package/src/models/event.ts +8 -39
- package/src/models/fattura-elettronica-body.ts +0 -30
- package/src/models/fattura-elettronica-header.ts +0 -35
- package/src/models/fattura-ordinaria.ts +0 -20
- package/src/models/fattura-principale.ts +0 -15
- package/src/models/id-fiscale-iva.ts +0 -15
- package/src/models/id-trasmittente.ts +0 -15
- package/src/models/indirizzo-resa.ts +0 -35
- package/src/models/iscrizione-rea.ts +0 -30
- package/src/models/model-error.ts +0 -8
- package/src/models/problem-details.ts +0 -30
- package/src/models/problem-http-result.ts +0 -20
- package/src/models/rappresentante-fiscale-cessionario-committente.ts +0 -25
- package/src/models/rappresentante-fiscale.ts +0 -10
- package/src/models/receive.ts +0 -39
- package/src/models/sconto-maggiorazione.ts +0 -20
- package/src/models/sede-cedente-prestatore.ts +0 -35
- package/src/models/sede-cessionario-committente.ts +0 -35
- package/src/models/send-reduced.ts +0 -12
- package/src/models/send.ts +0 -42
- package/src/models/stabile-organizzazione.ts +0 -35
- package/src/models/status.ts +0 -9
- package/src/models/terzo-intermediario-osoggetto-emittente.ts +0 -10
- package/src/models/update.ts +0 -34
- package/src/models/web-hook-history.ts +0 -20
- package/src/models/web-hook.ts +0 -25
package/src/models/send.ts
CHANGED
|
@@ -20,113 +20,71 @@ import type { Company } from './company';
|
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
import type { DocumentData } from './document-data';
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @export
|
|
26
|
-
* @interface Send
|
|
27
|
-
*/
|
|
28
23
|
export interface Send {
|
|
29
24
|
/**
|
|
30
25
|
* Unique identifier. Leave it at 0 for new records as it will be set automatically.
|
|
31
|
-
* @type {number}
|
|
32
|
-
* @memberof Send
|
|
33
26
|
*/
|
|
34
27
|
'id'?: number;
|
|
35
28
|
/**
|
|
36
29
|
* Creation date. It is set automatically.
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof Send
|
|
39
30
|
*/
|
|
40
31
|
'created'?: string;
|
|
41
32
|
/**
|
|
42
33
|
* Row version, for optimistic concurrency. It is set automatically.
|
|
43
|
-
* @type {number}
|
|
44
|
-
* @memberof Send
|
|
45
34
|
*/
|
|
46
35
|
'version'?: number;
|
|
47
36
|
/**
|
|
48
37
|
* User id.
|
|
49
|
-
* @type {number}
|
|
50
|
-
* @memberof Send
|
|
51
38
|
*/
|
|
52
39
|
'user_id'?: number;
|
|
53
40
|
/**
|
|
54
41
|
* Company id. On send, this is the sender and must be set in advance. On receive, it will be automatically set based on the recipient\'s VAT number. If a matching company is not found, the invoice will be rejected until the company is created.
|
|
55
|
-
* @type {number}
|
|
56
|
-
* @memberof Send
|
|
57
42
|
*/
|
|
58
43
|
'company_id'?: number;
|
|
59
44
|
/**
|
|
60
45
|
* VAT number of the Cessionario/Committente (customer). This is automatically set based on the recipient\'s VAT number.
|
|
61
|
-
* @type {string}
|
|
62
|
-
* @memberof Send
|
|
63
46
|
*/
|
|
64
47
|
'committente'?: string | null;
|
|
65
48
|
/**
|
|
66
49
|
* VAT number of the Cedente/Prestatore (vendor). This is automatically set based on the sender\'s VAT number.
|
|
67
|
-
* @type {string}
|
|
68
|
-
* @memberof Send
|
|
69
50
|
*/
|
|
70
51
|
'prestatore'?: string | null;
|
|
71
52
|
/**
|
|
72
53
|
* SDI identifier. This is set by the SDI and is guaranted to be unique within the SDI system.
|
|
73
|
-
* @type {string}
|
|
74
|
-
* @memberof Send
|
|
75
54
|
*/
|
|
76
55
|
'identifier'?: string | null;
|
|
77
56
|
/**
|
|
78
57
|
* Xml file name.
|
|
79
|
-
* @type {string}
|
|
80
|
-
* @memberof Send
|
|
81
58
|
*/
|
|
82
59
|
'file_name'?: string | null;
|
|
83
60
|
/**
|
|
84
61
|
* SDI format (FPA12, FPR12, FSM10, ...)
|
|
85
|
-
* @type {string}
|
|
86
|
-
* @memberof Send
|
|
87
62
|
*/
|
|
88
63
|
'format'?: string | null;
|
|
89
64
|
/**
|
|
90
65
|
* Xml payloaad. This is the actual xml content, as string. On send, it can be base64 encoded. If it\'s not, it will be encoded before sending. It is guaranteed to be cyphered at rest.
|
|
91
|
-
* @type {string}
|
|
92
|
-
* @memberof Send
|
|
93
66
|
*/
|
|
94
67
|
'payload'?: string | null;
|
|
95
68
|
/**
|
|
96
69
|
* Last update from SDI.
|
|
97
|
-
* @type {string}
|
|
98
|
-
* @memberof Send
|
|
99
70
|
*/
|
|
100
71
|
'last_update'?: string | null;
|
|
101
72
|
/**
|
|
102
73
|
* When the invoice was sent to SDI.
|
|
103
|
-
* @type {string}
|
|
104
|
-
* @memberof Send
|
|
105
74
|
*/
|
|
106
75
|
'date_sent'?: string | null;
|
|
107
76
|
/**
|
|
108
77
|
* The invoices included in the payload. This is set by the system, based on the xml content.
|
|
109
|
-
* @type {Array<DocumentData>}
|
|
110
|
-
* @memberof Send
|
|
111
78
|
*/
|
|
112
79
|
'documents'?: Array<DocumentData> | null;
|
|
113
80
|
/**
|
|
114
81
|
* Whether the payload is Base64 encoded or a plain XML (text).
|
|
115
|
-
* @type {string}
|
|
116
|
-
* @memberof Send
|
|
117
82
|
*/
|
|
118
83
|
'encoding'?: SendEncodingEnum;
|
|
119
84
|
/**
|
|
120
85
|
* Optional metadata, as json.
|
|
121
|
-
* @type {{ [key: string]: string; }}
|
|
122
|
-
* @memberof Send
|
|
123
86
|
*/
|
|
124
87
|
'meta_data'?: { [key: string]: string; } | null;
|
|
125
|
-
/**
|
|
126
|
-
*
|
|
127
|
-
* @type {Company}
|
|
128
|
-
* @memberof Send
|
|
129
|
-
*/
|
|
130
88
|
'company'?: Company;
|
|
131
89
|
}
|
|
132
90
|
|
|
@@ -14,47 +14,12 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @export
|
|
20
|
-
* @interface StabileOrganizzazione
|
|
21
|
-
*/
|
|
22
17
|
export interface StabileOrganizzazione {
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @type {string}
|
|
26
|
-
* @memberof StabileOrganizzazione
|
|
27
|
-
*/
|
|
28
18
|
'indirizzo'?: string | null;
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @type {string}
|
|
32
|
-
* @memberof StabileOrganizzazione
|
|
33
|
-
*/
|
|
34
19
|
'numero_civico'?: string | null;
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof StabileOrganizzazione
|
|
39
|
-
*/
|
|
40
20
|
'cap'?: string | null;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @type {string}
|
|
44
|
-
* @memberof StabileOrganizzazione
|
|
45
|
-
*/
|
|
46
21
|
'comune'?: string | null;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @type {string}
|
|
50
|
-
* @memberof StabileOrganizzazione
|
|
51
|
-
*/
|
|
52
22
|
'provincia'?: string | null;
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* @type {string}
|
|
56
|
-
* @memberof StabileOrganizzazione
|
|
57
|
-
*/
|
|
58
23
|
'nazione'?: string | null;
|
|
59
24
|
}
|
|
60
25
|
|
package/src/models/status.ts
CHANGED
|
@@ -14,22 +14,13 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @export
|
|
20
|
-
* @interface Status
|
|
21
|
-
*/
|
|
22
17
|
export interface Status {
|
|
23
18
|
/**
|
|
24
19
|
* Operations (invoices and validations) left.
|
|
25
|
-
* @type {number}
|
|
26
|
-
* @memberof Status
|
|
27
20
|
*/
|
|
28
21
|
'operation_left'?: number;
|
|
29
22
|
/**
|
|
30
23
|
* Signatures left.
|
|
31
|
-
* @type {number}
|
|
32
|
-
* @memberof Status
|
|
33
24
|
*/
|
|
34
25
|
'signature_left'?: number;
|
|
35
26
|
}
|
|
@@ -17,17 +17,7 @@
|
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
import type { DatiAnagrafici } from './dati-anagrafici';
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
* @export
|
|
23
|
-
* @interface TerzoIntermediarioOSoggettoEmittente
|
|
24
|
-
*/
|
|
25
20
|
export interface TerzoIntermediarioOSoggettoEmittente {
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @type {DatiAnagrafici}
|
|
29
|
-
* @memberof TerzoIntermediarioOSoggettoEmittente
|
|
30
|
-
*/
|
|
31
21
|
'dati_anagrafici'?: DatiAnagrafici;
|
|
32
22
|
}
|
|
33
23
|
|
package/src/models/update.ts
CHANGED
|
@@ -17,89 +17,55 @@
|
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
import type { SendReduced } from './send-reduced';
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
* @export
|
|
23
|
-
* @interface Update
|
|
24
|
-
*/
|
|
25
20
|
export interface Update {
|
|
26
21
|
/**
|
|
27
22
|
* Unique identifier. Leave it at 0 for new records as it will be set automatically.
|
|
28
|
-
* @type {number}
|
|
29
|
-
* @memberof Update
|
|
30
23
|
*/
|
|
31
24
|
'id'?: number;
|
|
32
25
|
/**
|
|
33
26
|
* Creation date. It is set automatically.
|
|
34
|
-
* @type {string}
|
|
35
|
-
* @memberof Update
|
|
36
27
|
*/
|
|
37
28
|
'created'?: string;
|
|
38
29
|
/**
|
|
39
30
|
* Row version, for optimistic concurrency. It is set automatically.
|
|
40
|
-
* @type {number}
|
|
41
|
-
* @memberof Update
|
|
42
31
|
*/
|
|
43
32
|
'version'?: number;
|
|
44
33
|
/**
|
|
45
34
|
* User id.
|
|
46
|
-
* @type {number}
|
|
47
|
-
* @memberof Update
|
|
48
35
|
*/
|
|
49
36
|
'user_id'?: number;
|
|
50
37
|
/**
|
|
51
38
|
* Company id.
|
|
52
|
-
* @type {number}
|
|
53
|
-
* @memberof Update
|
|
54
39
|
*/
|
|
55
40
|
'company_id'?: number;
|
|
56
41
|
/**
|
|
57
42
|
* Send id. This is the id of the sent invoice to which this update refers to.
|
|
58
|
-
* @type {number}
|
|
59
|
-
* @memberof Update
|
|
60
43
|
*/
|
|
61
44
|
'send_id'?: number;
|
|
62
45
|
/**
|
|
63
46
|
* Last update from SDI.
|
|
64
|
-
* @type {string}
|
|
65
|
-
* @memberof Update
|
|
66
47
|
*/
|
|
67
48
|
'last_update'?: string;
|
|
68
49
|
/**
|
|
69
50
|
* State of the document. Theses are the possible values, as per the SDI documentation:
|
|
70
|
-
* @type {string}
|
|
71
|
-
* @memberof Update
|
|
72
51
|
*/
|
|
73
52
|
'state'?: UpdateStateEnum;
|
|
74
53
|
/**
|
|
75
54
|
* Description for the state.
|
|
76
|
-
* @type {string}
|
|
77
|
-
* @memberof Update
|
|
78
55
|
*/
|
|
79
56
|
'description'?: string | null;
|
|
80
57
|
/**
|
|
81
58
|
* SDI message id.
|
|
82
|
-
* @type {string}
|
|
83
|
-
* @memberof Update
|
|
84
59
|
*/
|
|
85
60
|
'message_id'?: string | null;
|
|
86
61
|
/**
|
|
87
62
|
* SDI errors, if any.
|
|
88
|
-
* @type {Array<Error>}
|
|
89
|
-
* @memberof Update
|
|
90
63
|
*/
|
|
91
64
|
'errors'?: Array<Error> | null;
|
|
92
65
|
/**
|
|
93
66
|
* Wether the item has been read at least once.
|
|
94
|
-
* @type {boolean}
|
|
95
|
-
* @memberof Update
|
|
96
67
|
*/
|
|
97
68
|
'is_read'?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* @type {SendReduced}
|
|
101
|
-
* @memberof Update
|
|
102
|
-
*/
|
|
103
69
|
'send'?: SendReduced;
|
|
104
70
|
}
|
|
105
71
|
|
|
@@ -16,62 +16,42 @@
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Webhook history.
|
|
19
|
-
* @export
|
|
20
|
-
* @interface WebHookHistory
|
|
21
19
|
*/
|
|
22
20
|
export interface WebHookHistory {
|
|
23
21
|
/**
|
|
24
22
|
* Unique identifier. Leave it at 0 for new records as it will be set automatically.
|
|
25
|
-
* @type {number}
|
|
26
|
-
* @memberof WebHookHistory
|
|
27
23
|
*/
|
|
28
24
|
'id'?: number;
|
|
29
25
|
/**
|
|
30
26
|
* Creation date. It is set automatically.
|
|
31
|
-
* @type {string}
|
|
32
|
-
* @memberof WebHookHistory
|
|
33
27
|
*/
|
|
34
28
|
'created'?: string;
|
|
35
29
|
/**
|
|
36
30
|
* Row version, for optimistic concurrency. It is set automatically.
|
|
37
|
-
* @type {number}
|
|
38
|
-
* @memberof WebHookHistory
|
|
39
31
|
*/
|
|
40
32
|
'version'?: number;
|
|
41
33
|
/**
|
|
42
34
|
* Webhook id.
|
|
43
|
-
* @type {number}
|
|
44
|
-
* @memberof WebHookHistory
|
|
45
35
|
*/
|
|
46
36
|
'web_hook_id'?: number;
|
|
47
37
|
/**
|
|
48
38
|
* User id.
|
|
49
|
-
* @type {number}
|
|
50
|
-
* @memberof WebHookHistory
|
|
51
39
|
*/
|
|
52
40
|
'user_id'?: number;
|
|
53
41
|
/**
|
|
54
42
|
* Event name.
|
|
55
|
-
* @type {string}
|
|
56
|
-
* @memberof WebHookHistory
|
|
57
43
|
*/
|
|
58
44
|
'event'?: string | null;
|
|
59
45
|
/**
|
|
60
46
|
* Status code.
|
|
61
|
-
* @type {number}
|
|
62
|
-
* @memberof WebHookHistory
|
|
63
47
|
*/
|
|
64
48
|
'status_code'?: number;
|
|
65
49
|
/**
|
|
66
50
|
* Date and time of the request.
|
|
67
|
-
* @type {string}
|
|
68
|
-
* @memberof WebHookHistory
|
|
69
51
|
*/
|
|
70
52
|
'date_time'?: string;
|
|
71
53
|
/**
|
|
72
54
|
* Wether the request was successful.
|
|
73
|
-
* @type {boolean}
|
|
74
|
-
* @memberof WebHookHistory
|
|
75
55
|
*/
|
|
76
56
|
'success'?: boolean;
|
|
77
57
|
}
|
package/src/models/web-hook.ts
CHANGED
|
@@ -14,70 +14,45 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @export
|
|
20
|
-
* @interface WebHook
|
|
21
|
-
*/
|
|
22
17
|
export interface WebHook {
|
|
23
18
|
/**
|
|
24
19
|
* Unique identifier. Leave it at 0 for new records as it will be set automatically.
|
|
25
|
-
* @type {number}
|
|
26
|
-
* @memberof WebHook
|
|
27
20
|
*/
|
|
28
21
|
'id'?: number;
|
|
29
22
|
/**
|
|
30
23
|
* Creation date. It is set automatically.
|
|
31
|
-
* @type {string}
|
|
32
|
-
* @memberof WebHook
|
|
33
24
|
*/
|
|
34
25
|
'created'?: string;
|
|
35
26
|
/**
|
|
36
27
|
* Row version, for optimistic concurrency. It is set automatically.
|
|
37
|
-
* @type {number}
|
|
38
|
-
* @memberof WebHook
|
|
39
28
|
*/
|
|
40
29
|
'version'?: number;
|
|
41
30
|
/**
|
|
42
31
|
* User id.
|
|
43
|
-
* @type {number}
|
|
44
|
-
* @memberof WebHook
|
|
45
32
|
*/
|
|
46
33
|
'user_id'?: number;
|
|
47
34
|
/**
|
|
48
35
|
* Company id.
|
|
49
|
-
* @type {number}
|
|
50
|
-
* @memberof WebHook
|
|
51
36
|
*/
|
|
52
37
|
'company_id'?: number | null;
|
|
53
38
|
/**
|
|
54
39
|
* The url of your application\'s endpoint that will receive a POST request when the webhook is fired.
|
|
55
|
-
* @type {string}
|
|
56
|
-
* @memberof WebHook
|
|
57
40
|
*/
|
|
58
41
|
'url'?: string | null;
|
|
59
42
|
/**
|
|
60
43
|
* Wether the webhook is enabled. On creation, this is set to `true`.
|
|
61
|
-
* @type {boolean}
|
|
62
|
-
* @memberof WebHook
|
|
63
44
|
*/
|
|
64
45
|
'enabled'?: boolean;
|
|
65
46
|
/**
|
|
66
47
|
* The secret used to generate webhook signatures, only returned on creation. You should store this value securely and validate it on every call, to ensure that the caller is InvoicetronicApi.
|
|
67
|
-
* @type {string}
|
|
68
|
-
* @memberof WebHook
|
|
69
48
|
*/
|
|
70
49
|
'secret'?: string | null;
|
|
71
50
|
/**
|
|
72
51
|
* An optional description.
|
|
73
|
-
* @type {string}
|
|
74
|
-
* @memberof WebHook
|
|
75
52
|
*/
|
|
76
53
|
'description'?: string | null;
|
|
77
54
|
/**
|
|
78
55
|
* List of events to that trigger the webhook. See Invoicetronic.SupportedEvents.Available for a list of valid event names.
|
|
79
|
-
* @type {Array<string>}
|
|
80
|
-
* @memberof WebHook
|
|
81
56
|
*/
|
|
82
57
|
'events'?: Array<string> | null;
|
|
83
58
|
}
|