@timbrix/sdk 1.2.0 → 1.3.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/dist/index.d.mts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +24 -0
- package/dist/index.mjs +24 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -644,6 +644,24 @@ declare class InvoicesResource {
|
|
|
644
644
|
* scope), same rules as `create`.
|
|
645
645
|
*/
|
|
646
646
|
list(organizationId: string, params?: ListInvoicesParams): Promise<ListInvoicesResponse>;
|
|
647
|
+
/**
|
|
648
|
+
* Get a single CFDI 4.0 invoice by its folio fiscal (UUID). Works with
|
|
649
|
+
* either a Supabase bearer session or an API key (requires the
|
|
650
|
+
* `read:invoices` scope).
|
|
651
|
+
*/
|
|
652
|
+
get(uuid: string): Promise<Invoice>;
|
|
653
|
+
/**
|
|
654
|
+
* Download the timbrado XML for an invoice. Works with either a
|
|
655
|
+
* Supabase bearer session or an API key (requires the `read:invoices`
|
|
656
|
+
* scope).
|
|
657
|
+
*/
|
|
658
|
+
getXml(uuid: string): Promise<Blob>;
|
|
659
|
+
/**
|
|
660
|
+
* Download the PDF representation for an invoice. Works with either a
|
|
661
|
+
* Supabase bearer session or an API key (requires the `read:invoices`
|
|
662
|
+
* scope).
|
|
663
|
+
*/
|
|
664
|
+
getPdf(uuid: string): Promise<Blob>;
|
|
647
665
|
}
|
|
648
666
|
|
|
649
667
|
declare class OAuthResource {
|
package/dist/index.d.ts
CHANGED
|
@@ -644,6 +644,24 @@ declare class InvoicesResource {
|
|
|
644
644
|
* scope), same rules as `create`.
|
|
645
645
|
*/
|
|
646
646
|
list(organizationId: string, params?: ListInvoicesParams): Promise<ListInvoicesResponse>;
|
|
647
|
+
/**
|
|
648
|
+
* Get a single CFDI 4.0 invoice by its folio fiscal (UUID). Works with
|
|
649
|
+
* either a Supabase bearer session or an API key (requires the
|
|
650
|
+
* `read:invoices` scope).
|
|
651
|
+
*/
|
|
652
|
+
get(uuid: string): Promise<Invoice>;
|
|
653
|
+
/**
|
|
654
|
+
* Download the timbrado XML for an invoice. Works with either a
|
|
655
|
+
* Supabase bearer session or an API key (requires the `read:invoices`
|
|
656
|
+
* scope).
|
|
657
|
+
*/
|
|
658
|
+
getXml(uuid: string): Promise<Blob>;
|
|
659
|
+
/**
|
|
660
|
+
* Download the PDF representation for an invoice. Works with either a
|
|
661
|
+
* Supabase bearer session or an API key (requires the `read:invoices`
|
|
662
|
+
* scope).
|
|
663
|
+
*/
|
|
664
|
+
getPdf(uuid: string): Promise<Blob>;
|
|
647
665
|
}
|
|
648
666
|
|
|
649
667
|
declare class OAuthResource {
|
package/dist/index.js
CHANGED
|
@@ -238,6 +238,30 @@ var InvoicesResource = class {
|
|
|
238
238
|
searchParams: Object.keys(searchParams).length > 0 ? searchParams : void 0
|
|
239
239
|
}).json();
|
|
240
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* Get a single CFDI 4.0 invoice by its folio fiscal (UUID). Works with
|
|
243
|
+
* either a Supabase bearer session or an API key (requires the
|
|
244
|
+
* `read:invoices` scope).
|
|
245
|
+
*/
|
|
246
|
+
async get(uuid) {
|
|
247
|
+
return this.http.get(`invoices/${uuid}`).json();
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Download the timbrado XML for an invoice. Works with either a
|
|
251
|
+
* Supabase bearer session or an API key (requires the `read:invoices`
|
|
252
|
+
* scope).
|
|
253
|
+
*/
|
|
254
|
+
async getXml(uuid) {
|
|
255
|
+
return this.http.get(`invoices/${uuid}/xml`).blob();
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Download the PDF representation for an invoice. Works with either a
|
|
259
|
+
* Supabase bearer session or an API key (requires the `read:invoices`
|
|
260
|
+
* scope).
|
|
261
|
+
*/
|
|
262
|
+
async getPdf(uuid) {
|
|
263
|
+
return this.http.get(`invoices/${uuid}/pdf`).blob();
|
|
264
|
+
}
|
|
241
265
|
};
|
|
242
266
|
|
|
243
267
|
// src/resources/oauth.ts
|
package/dist/index.mjs
CHANGED
|
@@ -190,6 +190,30 @@ var InvoicesResource = class {
|
|
|
190
190
|
searchParams: Object.keys(searchParams).length > 0 ? searchParams : void 0
|
|
191
191
|
}).json();
|
|
192
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Get a single CFDI 4.0 invoice by its folio fiscal (UUID). Works with
|
|
195
|
+
* either a Supabase bearer session or an API key (requires the
|
|
196
|
+
* `read:invoices` scope).
|
|
197
|
+
*/
|
|
198
|
+
async get(uuid) {
|
|
199
|
+
return this.http.get(`invoices/${uuid}`).json();
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Download the timbrado XML for an invoice. Works with either a
|
|
203
|
+
* Supabase bearer session or an API key (requires the `read:invoices`
|
|
204
|
+
* scope).
|
|
205
|
+
*/
|
|
206
|
+
async getXml(uuid) {
|
|
207
|
+
return this.http.get(`invoices/${uuid}/xml`).blob();
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Download the PDF representation for an invoice. Works with either a
|
|
211
|
+
* Supabase bearer session or an API key (requires the `read:invoices`
|
|
212
|
+
* scope).
|
|
213
|
+
*/
|
|
214
|
+
async getPdf(uuid) {
|
|
215
|
+
return this.http.get(`invoices/${uuid}/pdf`).blob();
|
|
216
|
+
}
|
|
193
217
|
};
|
|
194
218
|
|
|
195
219
|
// src/resources/oauth.ts
|