@wix/auto_sdk_get-paid_receipts 1.0.217 → 1.0.219
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/build/cjs/index.d.ts +4 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +125 -9
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +50 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +4 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +125 -9
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +50 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +4 -4
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +125 -9
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +50 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +4 -4
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +125 -9
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +50 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -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
|
/**
|
|
@@ -1250,8 +1300,6 @@ interface ReceiptCreatedEnvelope {
|
|
|
1250
1300
|
* Triggered when a receipt is created.
|
|
1251
1301
|
* @permissionScope Manage Receipts
|
|
1252
1302
|
* @permissionScopeId SCOPE.RECEIPTS.MANAGE
|
|
1253
|
-
* @permissionScope Manage Stores
|
|
1254
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1255
1303
|
* @permissionId RECEIPTS.RECEIPT_READ
|
|
1256
1304
|
* @webhook
|
|
1257
1305
|
* @eventType wix.receipts.v1.receipt_created
|
|
@@ -1266,8 +1314,6 @@ interface ReceiptSentEnvelope {
|
|
|
1266
1314
|
* Triggered when a receipt is sent.
|
|
1267
1315
|
* @permissionScope Manage Receipts
|
|
1268
1316
|
* @permissionScopeId SCOPE.RECEIPTS.MANAGE
|
|
1269
|
-
* @permissionScope Manage Stores
|
|
1270
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1271
1317
|
* @permissionId RECEIPTS.RECEIPT_READ
|
|
1272
1318
|
* @webhook
|
|
1273
1319
|
* @eventType wix.receipts.v1.receipt_sent
|
|
@@ -1282,8 +1328,6 @@ interface ReceiptUpdatedEnvelope {
|
|
|
1282
1328
|
* Triggered when a receipt's number allocation is updated or a receipt document is generated.
|
|
1283
1329
|
* @permissionScope Manage Receipts
|
|
1284
1330
|
* @permissionScopeId SCOPE.RECEIPTS.MANAGE
|
|
1285
|
-
* @permissionScope Manage Stores
|
|
1286
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1287
1331
|
* @permissionId RECEIPTS.RECEIPT_READ
|
|
1288
1332
|
* @webhook
|
|
1289
1333
|
* @eventType wix.receipts.v1.receipt_updated
|
|
@@ -1409,7 +1453,79 @@ interface ReceiptsQueryBuilder {
|
|
|
1409
1453
|
* @fqn wix.receipts.v1.Receipts.QueryReceipts
|
|
1410
1454
|
* @requiredField query
|
|
1411
1455
|
*/
|
|
1412
|
-
declare function typedQueryReceipts(query:
|
|
1456
|
+
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>>;
|
|
1457
|
+
interface ReceiptQuerySpec extends QuerySpec {
|
|
1458
|
+
paging: 'cursor';
|
|
1459
|
+
wql: [
|
|
1460
|
+
{
|
|
1461
|
+
fields: [
|
|
1462
|
+
'_createdDate',
|
|
1463
|
+
'_id',
|
|
1464
|
+
'_updatedDate',
|
|
1465
|
+
'numbering.number',
|
|
1466
|
+
'numbering.prefix',
|
|
1467
|
+
'numbering.suffix',
|
|
1468
|
+
'sourceReference.appId',
|
|
1469
|
+
'sourceReference.externalReferenceId',
|
|
1470
|
+
'sourceReference.wixEcomOrder.transactionId',
|
|
1471
|
+
'sourceReference.wixPaymentOrder.transactionId'
|
|
1472
|
+
];
|
|
1473
|
+
operators: '*';
|
|
1474
|
+
sort: 'BOTH';
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
fields: ['numbering.displayNumber'];
|
|
1478
|
+
operators: [];
|
|
1479
|
+
sort: 'BOTH';
|
|
1480
|
+
}
|
|
1481
|
+
];
|
|
1482
|
+
}
|
|
1483
|
+
type CommonQueryWithEntityContext = Query<Receipt, ReceiptQuerySpec>;
|
|
1484
|
+
type ReceiptQuery = {
|
|
1485
|
+
/**
|
|
1486
|
+
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`.
|
|
1487
|
+
*/
|
|
1488
|
+
cursorPaging?: {
|
|
1489
|
+
/**
|
|
1490
|
+
Maximum number of items to return in the results.
|
|
1491
|
+
@max: 100
|
|
1492
|
+
*/
|
|
1493
|
+
limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
|
|
1494
|
+
/**
|
|
1495
|
+
Pointer to the next or previous page in the list of results.
|
|
1496
|
+
|
|
1497
|
+
Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1498
|
+
Not relevant for the first request.
|
|
1499
|
+
@maxLength: 16000
|
|
1500
|
+
*/
|
|
1501
|
+
cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
1502
|
+
};
|
|
1503
|
+
/**
|
|
1504
|
+
Filter object in the following format:
|
|
1505
|
+
`"filter" : {
|
|
1506
|
+
"fieldName1": "value1",
|
|
1507
|
+
"fieldName2":{"$operator":"value2"}
|
|
1508
|
+
}`
|
|
1509
|
+
Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
1510
|
+
*/
|
|
1511
|
+
filter?: CommonQueryWithEntityContext['filter'] | null;
|
|
1512
|
+
/**
|
|
1513
|
+
Sort object in the following format:
|
|
1514
|
+
`[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1515
|
+
@maxSize: 5
|
|
1516
|
+
*/
|
|
1517
|
+
sort?: {
|
|
1518
|
+
/**
|
|
1519
|
+
Name of the field to sort by.
|
|
1520
|
+
@maxLength: 512
|
|
1521
|
+
*/
|
|
1522
|
+
fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
|
|
1523
|
+
/**
|
|
1524
|
+
Sort order.
|
|
1525
|
+
*/
|
|
1526
|
+
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
1527
|
+
}[];
|
|
1528
|
+
};
|
|
1413
1529
|
/**
|
|
1414
1530
|
* Retries generating a receipt document that has a `FAILED` or stuck in `PROCESSING` status.
|
|
1415
1531
|
*
|
|
@@ -1488,4 +1604,4 @@ interface UpdateExtendedFieldsOptions {
|
|
|
1488
1604
|
namespaceData: Record<string, any> | null;
|
|
1489
1605
|
}
|
|
1490
1606
|
|
|
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 };
|
|
1607
|
+
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 };
|