commerceforai 0.1.1 → 0.1.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/dist/index.d.ts CHANGED
@@ -200,6 +200,30 @@ declare class Discounts extends Resource {
200
200
  }>>;
201
201
  }
202
202
  declare class Reports extends Resource {
203
+ /** Every order with its tax, for an accountant. Dates are YYYY-MM-DD (default: the last 365 days). */
204
+ taxOrders(params?: {
205
+ from?: string;
206
+ to?: string;
207
+ }): Promise<Result<{
208
+ object: "list";
209
+ truncated: boolean;
210
+ data: {
211
+ order_number: number;
212
+ date: string;
213
+ status: string;
214
+ city: string | null;
215
+ state: string | null;
216
+ postal_code: string | null;
217
+ country: string | null;
218
+ subtotal: number;
219
+ discount: number;
220
+ shipping: number;
221
+ tax: number;
222
+ total: number;
223
+ refunded: number;
224
+ currency: string;
225
+ }[];
226
+ }>>;
203
227
  /** Sales and tax by state over the last `days` (default 365). `watch` flags US states near common registration thresholds. */
204
228
  tax(params?: {
205
229
  days?: number;
@@ -575,6 +599,13 @@ declare class StoreResource extends Resource {
575
599
  object: "tax_overview";
576
600
  enabled: boolean;
577
601
  default_tax_code: string | null;
602
+ prices_include_tax: boolean;
603
+ links: {
604
+ registrations: string;
605
+ thresholds: string;
606
+ filing: string;
607
+ transactions: string;
608
+ } | null;
578
609
  collecting: boolean;
579
610
  next_step: string | null;
580
611
  fix_url: string | null;
@@ -620,6 +651,7 @@ declare class StoreResource extends Resource {
620
651
  name?: string;
621
652
  tax_enabled?: boolean; /** Stripe tax code for products without their own, e.g. "txcd_30011000" (clothing). */
622
653
  default_tax_code?: string | null;
654
+ /** Your prices already include tax (common outside the US). */ prices_include_tax?: boolean;
623
655
  default_success_url?: string | null;
624
656
  default_cancel_url?: string | null;
625
657
  builtin_emails?: boolean;
package/dist/index.js CHANGED
@@ -240,6 +240,10 @@ class Discounts extends Resource {
240
240
  delete(idOrCode) { return this.client.request("DELETE", `/v1/discounts/${encodeURIComponent(idOrCode)}`); }
241
241
  }
242
242
  class Reports extends Resource {
243
+ /** Every order with its tax, for an accountant. Dates are YYYY-MM-DD (default: the last 365 days). */
244
+ taxOrders(params = {}) {
245
+ return this.client.request("GET", "/v1/reports/tax/orders", { query: params });
246
+ }
243
247
  /** Sales and tax by state over the last `days` (default 365). `watch` flags US states near common registration thresholds. */
244
248
  tax(params = {}) {
245
249
  return this.client.request("GET", "/v1/reports/tax", { query: params });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commerceforai",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Commerce for apps built by AI. Products, inventory, checkout and orders on top of your Stripe account.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",