@wix/auto_sdk_get-paid_receipts 1.0.217 → 1.0.218

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.
@@ -1,4 +1,4 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
1
+ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
2
2
 
3
3
  /**
4
4
  * A receipt is a document that confirms a Wix user has received money or property as payment following a sale, transfer of goods, or provision of a service.
@@ -86,6 +86,8 @@ interface Receipt {
86
86
  * @maxSize 100
87
87
  */
88
88
  taxBreakdown?: Tax[];
89
+ /** Indicates if there were exempt from tax. */
90
+ taxExempt?: boolean | null;
89
91
  /**
90
92
  * Receipt preset ID.
91
93
  * Defaults to the default receipt preset ID, available with Get Default Receipt Preset ID.
@@ -471,6 +473,12 @@ interface LineItemTax {
471
473
  * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
472
474
  */
473
475
  taxAmount?: string;
476
+ /**
477
+ * Exempt amount from tax calculated for this line item.
478
+ * @format DECIMAL_VALUE
479
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
480
+ */
481
+ exemptAmount?: string | null;
474
482
  }
475
483
  interface LineItemTotals {
476
484
  /**
@@ -497,6 +505,12 @@ interface LineItemTotals {
497
505
  * @decimalValue options { gte:-1000000000000000, lte:1000000000000000, maxScale:4 }
498
506
  */
499
507
  totalPriceAfterTax?: string | null;
508
+ /**
509
+ * Line item total price that was exempt from tax.
510
+ * @format DECIMAL_VALUE
511
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
512
+ */
513
+ totalExemptAmount?: string | null;
500
514
  }
501
515
  interface ShippingInfo {
502
516
  /**
@@ -521,6 +535,12 @@ interface ShippingInfo {
521
535
  * @maxSize 10
522
536
  */
523
537
  taxBreakdown?: ShippingTax[];
538
+ /**
539
+ * Shipping price that was exempt from tax.
540
+ * @format DECIMAL_VALUE
541
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
542
+ */
543
+ exemptAmount?: string | null;
524
544
  }
525
545
  interface ShippingTax {
526
546
  /**
@@ -541,6 +561,12 @@ interface ShippingTax {
541
561
  * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
542
562
  */
543
563
  amount?: string;
564
+ /**
565
+ * Exempt amount from tax.
566
+ * @format DECIMAL_VALUE
567
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
568
+ */
569
+ exemptAmount?: string | null;
544
570
  }
545
571
  interface AdditionalFee {
546
572
  /**
@@ -567,6 +593,12 @@ interface AdditionalFee {
567
593
  * @maxSize 10
568
594
  */
569
595
  taxBreakdown?: AdditionalFeeTax[];
596
+ /**
597
+ * Additional fee price that was exempt from tax.
598
+ * @format DECIMAL_VALUE
599
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
600
+ */
601
+ exemptAmount?: string | null;
570
602
  }
571
603
  interface AdditionalFeeTax {
572
604
  /**
@@ -587,6 +619,12 @@ interface AdditionalFeeTax {
587
619
  * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
588
620
  */
589
621
  amount?: string;
622
+ /**
623
+ * Exempt amount from tax.
624
+ * @format DECIMAL_VALUE
625
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
626
+ */
627
+ exemptAmount?: string | null;
590
628
  }
591
629
  interface Discount {
592
630
  /**
@@ -667,6 +705,12 @@ interface Totals {
667
705
  * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
668
706
  */
669
707
  total?: string | null;
708
+ /**
709
+ * Total amount that was exempt from tax.
710
+ * @format DECIMAL_VALUE
711
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
712
+ */
713
+ exempt?: string | null;
670
714
  }
671
715
  interface Tax {
672
716
  /**
@@ -692,6 +736,12 @@ interface Tax {
692
736
  * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
693
737
  */
694
738
  taxableAmount?: string;
739
+ /**
740
+ * Exempt amount from tax.
741
+ * @format DECIMAL_VALUE
742
+ * @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
743
+ */
744
+ exemptAmount?: string | null;
695
745
  }
696
746
  interface CustomFields {
697
747
  /**
@@ -1409,7 +1459,79 @@ interface ReceiptsQueryBuilder {
1409
1459
  * @fqn wix.receipts.v1.Receipts.QueryReceipts
1410
1460
  * @requiredField query
1411
1461
  */
1412
- declare function typedQueryReceipts(query: CursorQuery): Promise<NonNullablePaths<QueryReceiptsResponse, `receipts` | `receipts.${number}.numbering.displayNumber` | `receipts.${number}.regionalProperties.locale.languageCode` | `receipts.${number}.currency` | `receipts.${number}.sourceReference.wixPaymentOrder.orderId` | `receipts.${number}.sourceReference.wixPaymentOrder.transactionId` | `receipts.${number}.sourceReference.wixEcomOrder.orderId` | `receipts.${number}.sourceReference.wixEcomOrder.transactionId` | `receipts.${number}.sourceReference.appId` | `receipts.${number}.sourceReference.externalReferenceId` | `receipts.${number}.sourceReference.receiptOrderType` | `receipts.${number}.shippingInfo.title` | `receipts.${number}.shippingInfo.priceBeforeTax` | `receipts.${number}.shippingInfo.priceAfterTax` | `receipts.${number}.payment.paymentMethod` | `receipts.${number}.payment.amount` | `receipts.${number}.document.status`, 6>>;
1462
+ declare function typedQueryReceipts(query: ReceiptQuery): Promise<NonNullablePaths<QueryReceiptsResponse, `receipts` | `receipts.${number}.numbering.displayNumber` | `receipts.${number}.regionalProperties.locale.languageCode` | `receipts.${number}.currency` | `receipts.${number}.sourceReference.wixPaymentOrder.orderId` | `receipts.${number}.sourceReference.wixPaymentOrder.transactionId` | `receipts.${number}.sourceReference.wixEcomOrder.orderId` | `receipts.${number}.sourceReference.wixEcomOrder.transactionId` | `receipts.${number}.sourceReference.appId` | `receipts.${number}.sourceReference.externalReferenceId` | `receipts.${number}.sourceReference.receiptOrderType` | `receipts.${number}.shippingInfo.title` | `receipts.${number}.shippingInfo.priceBeforeTax` | `receipts.${number}.shippingInfo.priceAfterTax` | `receipts.${number}.payment.paymentMethod` | `receipts.${number}.payment.amount` | `receipts.${number}.document.status`, 6>>;
1463
+ interface ReceiptQuerySpec extends QuerySpec {
1464
+ paging: 'cursor';
1465
+ wql: [
1466
+ {
1467
+ fields: [
1468
+ '_createdDate',
1469
+ '_id',
1470
+ '_updatedDate',
1471
+ 'numbering.number',
1472
+ 'numbering.prefix',
1473
+ 'numbering.suffix',
1474
+ 'sourceReference.appId',
1475
+ 'sourceReference.externalReferenceId',
1476
+ 'sourceReference.wixEcomOrder.transactionId',
1477
+ 'sourceReference.wixPaymentOrder.transactionId'
1478
+ ];
1479
+ operators: '*';
1480
+ sort: 'BOTH';
1481
+ },
1482
+ {
1483
+ fields: ['numbering.displayNumber'];
1484
+ operators: [];
1485
+ sort: 'BOTH';
1486
+ }
1487
+ ];
1488
+ }
1489
+ type CommonQueryWithEntityContext = Query<Receipt, ReceiptQuerySpec>;
1490
+ type ReceiptQuery = {
1491
+ /**
1492
+ Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.
1493
+ */
1494
+ cursorPaging?: {
1495
+ /**
1496
+ Maximum number of items to return in the results.
1497
+ @max: 100
1498
+ */
1499
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
1500
+ /**
1501
+ Pointer to the next or previous page in the list of results.
1502
+
1503
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1504
+ Not relevant for the first request.
1505
+ @maxLength: 16000
1506
+ */
1507
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
1508
+ };
1509
+ /**
1510
+ Filter object in the following format:
1511
+ `"filter" : {
1512
+ "fieldName1": "value1",
1513
+ "fieldName2":{"$operator":"value2"}
1514
+ }`
1515
+ Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1516
+ */
1517
+ filter?: CommonQueryWithEntityContext['filter'] | null;
1518
+ /**
1519
+ Sort object in the following format:
1520
+ `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1521
+ @maxSize: 5
1522
+ */
1523
+ sort?: {
1524
+ /**
1525
+ Name of the field to sort by.
1526
+ @maxLength: 512
1527
+ */
1528
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
1529
+ /**
1530
+ Sort order.
1531
+ */
1532
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
1533
+ }[];
1534
+ };
1413
1535
  /**
1414
1536
  * Retries generating a receipt document that has a `FAILED` or stuck in `PROCESSING` status.
1415
1537
  *
@@ -1488,4 +1610,4 @@ interface UpdateExtendedFieldsOptions {
1488
1610
  namespaceData: Record<string, any> | null;
1489
1611
  }
1490
1612
 
1491
- export { type ActionEvent, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type AddressStreetOneOf, type BaseEventMetadata, type BusinessDetails, type CreateReceiptApplicationErrors, type CreateReceiptRequest, type CreateReceiptResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomField, type CustomFields, type Customer, type Discount, type Document, DocumentStatus, type DocumentStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type Failed, type FooterCustomField, type FullAddressContactDetails, type GenerateReceiptDocument, type GetLatestReceiptNumberOptions, type GetLatestReceiptNumberRequest, type GetLatestReceiptNumberResponse, type GetReceiptRequest, type GetReceiptResponse, type IdentificationData, type IdentificationDataIdOneOf, type LineItem, type LineItemTax, type LineItemTotals, type Locale, type MessageEnvelope, type Numbering, type Payment, type QueryReceiptsRequest, type QueryReceiptsResponse, type Receipt, type ReceiptCreatedEnvelope, type ReceiptDocumentHandled, type ReceiptDocumentHandledResultOneOf, type ReceiptDocumentProcess, type ReceiptNumberingProcess, ReceiptOrderType, type ReceiptOrderTypeWithLiterals, type ReceiptSentEnvelope, type ReceiptUpdatedEnvelope, type ReceiptsQueryBuilder, type ReceiptsQueryResult, type RegenerateReceiptDocumentApplicationErrors, type RegenerateReceiptDocumentRequest, type RegenerateReceiptDocumentResponse, type RegionalProperties, RequestOrigin, type RequestOriginWithLiterals, type RestoreInfo, type SendReceiptEmailApplicationErrors, type SendReceiptEmailOptions, type SendReceiptEmailRequest, type SendReceiptEmailResponse, type Sent, type ShippingAddressContactDetails, type ShippingInfo, type ShippingTax, SortOrder, type SortOrderWithLiterals, type Sorting, type SourceReference, type SourceReferenceOrderOneOf, type StandardDetails, type StreetAddress, type Subdivision, SubdivisionType, type SubdivisionTypeWithLiterals, type Succeeded, type Tax, type Totals, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateReceiptRequest, type UpdateReceiptResponse, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixEcom, type WixPayment, createReceipt, getLatestReceiptNumber, getReceipt, onReceiptCreated, onReceiptSent, onReceiptUpdated, queryReceipts, regenerateReceiptDocument, sendReceiptEmail, typedQueryReceipts, updateExtendedFields };
1613
+ export { type ActionEvent, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type AddressStreetOneOf, type BaseEventMetadata, type BusinessDetails, type CommonQueryWithEntityContext, type CreateReceiptApplicationErrors, type CreateReceiptRequest, type CreateReceiptResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomField, type CustomFields, type Customer, type Discount, type Document, DocumentStatus, type DocumentStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type Failed, type FooterCustomField, type FullAddressContactDetails, type GenerateReceiptDocument, type GetLatestReceiptNumberOptions, type GetLatestReceiptNumberRequest, type GetLatestReceiptNumberResponse, type GetReceiptRequest, type GetReceiptResponse, type IdentificationData, type IdentificationDataIdOneOf, type LineItem, type LineItemTax, type LineItemTotals, type Locale, type MessageEnvelope, type Numbering, type Payment, type QueryReceiptsRequest, type QueryReceiptsResponse, type Receipt, type ReceiptCreatedEnvelope, type ReceiptDocumentHandled, type ReceiptDocumentHandledResultOneOf, type ReceiptDocumentProcess, type ReceiptNumberingProcess, ReceiptOrderType, type ReceiptOrderTypeWithLiterals, type ReceiptQuery, type ReceiptQuerySpec, type ReceiptSentEnvelope, type ReceiptUpdatedEnvelope, type ReceiptsQueryBuilder, type ReceiptsQueryResult, type RegenerateReceiptDocumentApplicationErrors, type RegenerateReceiptDocumentRequest, type RegenerateReceiptDocumentResponse, type RegionalProperties, RequestOrigin, type RequestOriginWithLiterals, type RestoreInfo, type SendReceiptEmailApplicationErrors, type SendReceiptEmailOptions, type SendReceiptEmailRequest, type SendReceiptEmailResponse, type Sent, type ShippingAddressContactDetails, type ShippingInfo, type ShippingTax, SortOrder, type SortOrderWithLiterals, type Sorting, type SourceReference, type SourceReferenceOrderOneOf, type StandardDetails, type StreetAddress, type Subdivision, SubdivisionType, type SubdivisionTypeWithLiterals, type Succeeded, type Tax, type Totals, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateReceiptRequest, type UpdateReceiptResponse, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixEcom, type WixPayment, createReceipt, getLatestReceiptNumber, getReceipt, onReceiptCreated, onReceiptSent, onReceiptUpdated, queryReceipts, regenerateReceiptDocument, sendReceiptEmail, typedQueryReceipts, updateExtendedFields };