@flowio/api-internal-prop-types 1.1.7 → 1.2.1

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.
Files changed (93) hide show
  1. package/.eslintrc +2 -1
  2. package/lib/index.d.ts +10 -3
  3. package/lib/index.js +1 -2978
  4. package/lib/io/flow/adyen/v0/models/authorizeRequest.js +2 -1
  5. package/lib/io/flow/billing/v0/enums/billingTransactionType.js +1 -1
  6. package/lib/io/flow/{shopify/internal/v0/models/shopifyOrderNumberGeneratorPrefixSuffix.js → billing/v0/models/billingInvoiceSummary.js} +2 -3
  7. package/lib/io/flow/billing/v0/models/billingOrderSummary.js +17 -0
  8. package/lib/io/flow/fraud/internal/v0/enums/fraudEmailRuleDecision.js +13 -0
  9. package/lib/io/flow/fraud/internal/v0/models/fraudEmailRule.js +20 -0
  10. package/lib/io/flow/fraud/internal/v0/models/fraudEmailRuleForm.js +19 -0
  11. package/lib/io/flow/internal/v0/enums/billingTransactionType.js +1 -1
  12. package/lib/io/flow/internal/v0/enums/fraudEmailRuleDecision.js +13 -0
  13. package/lib/io/flow/internal/v0/enums/paymentTerm.js +1 -1
  14. package/lib/io/flow/internal/v0/enums/transferTransactionSource.js +13 -0
  15. package/lib/io/flow/internal/v0/models/{shopifyOrderNumberGeneratorPrefixSuffix.js → authorizationParameters.js} +2 -3
  16. package/lib/io/flow/internal/v0/models/authorizationParametersForm.js +23 -0
  17. package/lib/io/flow/internal/v0/models/bankPayment.js +1 -0
  18. package/lib/io/flow/internal/v0/models/billingInvoiceSummary.js +16 -0
  19. package/lib/io/flow/internal/v0/models/fraudEmailRule.js +20 -0
  20. package/lib/io/flow/internal/v0/models/fraudEmailRuleForm.js +19 -0
  21. package/lib/io/flow/internal/v0/models/pendingBankPayment.js +1 -1
  22. package/lib/io/flow/internal/v0/models/pendingBankPaymentTaxRemittanceDetail.js +19 -0
  23. package/lib/io/flow/internal/v0/models/{pendingBankPaymentDetail.js → pendingBankPaymentTransferDetail.js} +6 -6
  24. package/lib/io/flow/internal/v0/models/taxRemittanceTransaction.js +43 -0
  25. package/lib/io/flow/internal/v0/models/transferTransaction.js +5 -0
  26. package/lib/io/flow/internal/v0/unions/pendingBankPaymentDetail.js +21 -0
  27. package/lib/io/flow/internal/v0/unions/transaction.js +5 -1
  28. package/lib/io/flow/inventory/v0/models/experienceInventoryItem.js +30 -0
  29. package/lib/io/flow/{shopify/internal/v0/models/shopifyOrderNumberGeneratorHexadecimal.js → inventory/v0/models/inventoryExperienceReference.js} +1 -1
  30. package/lib/io/flow/invoice/v0/enums/paymentTerm.js +1 -1
  31. package/lib/io/flow/payment/v0/models/authorizationPayload.js +19 -0
  32. package/lib/io/flow/payment/v0/models/directDebit.js +16 -0
  33. package/lib/io/flow/{internal/v0/models/shopifyOrderNumberGeneratorHexadecimal.js → payment/v0/models/googlePayAuthorizationPayload.js} +1 -1
  34. package/lib/io/flow/payment/v0/models/inlineAuthorizationDetails.js +2 -1
  35. package/lib/io/flow/payment/v0/models/inlineAuthorizationForm.js +6 -1
  36. package/lib/io/flow/payment/v0/models/redirectAuthorizationDetails.js +6 -1
  37. package/lib/io/flow/payment/v0/unions/authorizationPayloadParameters.js +17 -0
  38. package/lib/io/flow/payment/v0/unions/confirmationDetails.js +17 -0
  39. package/lib/io/flow/shopify/v0/models/shopifyVariantFlowMetafield.js +6 -2
  40. package/lib/io/flow/shopify/v0/models/shopifyVariantInventoryMetafield.js +3 -3
  41. package/lib/mocks.js +616 -0
  42. package/lib/validators.js +3015 -0
  43. package/package.json +1 -1
  44. package/src/index.d.ts +10 -3
  45. package/src/index.js +4 -1191
  46. package/src/io/flow/adyen/v0/models/authorizeRequest.js +1 -0
  47. package/src/io/flow/billing/v0/enums/billingTransactionType.js +1 -0
  48. package/src/io/flow/billing/v0/models/billingInvoiceSummary.js +6 -0
  49. package/src/io/flow/billing/v0/models/billingOrderSummary.js +7 -0
  50. package/src/io/flow/fraud/internal/v0/enums/fraudEmailRuleDecision.js +3 -0
  51. package/src/io/flow/fraud/internal/v0/models/fraudEmailRule.js +7 -0
  52. package/src/io/flow/fraud/internal/v0/models/fraudEmailRuleForm.js +6 -0
  53. package/src/io/flow/internal/v0/enums/billingTransactionType.js +1 -0
  54. package/src/io/flow/internal/v0/enums/fraudEmailRuleDecision.js +3 -0
  55. package/src/io/flow/internal/v0/enums/paymentTerm.js +1 -1
  56. package/src/io/flow/internal/v0/enums/transferTransactionSource.js +3 -0
  57. package/src/io/flow/internal/v0/models/authorizationParameters.js +6 -0
  58. package/src/io/flow/internal/v0/models/authorizationParametersForm.js +10 -0
  59. package/src/io/flow/internal/v0/models/bankPayment.js +1 -0
  60. package/src/io/flow/internal/v0/models/billingInvoiceSummary.js +6 -0
  61. package/src/io/flow/internal/v0/models/fraudEmailRule.js +7 -0
  62. package/src/io/flow/internal/v0/models/fraudEmailRuleForm.js +6 -0
  63. package/src/io/flow/internal/v0/models/pendingBankPayment.js +1 -1
  64. package/src/io/flow/internal/v0/models/pendingBankPaymentTaxRemittanceDetail.js +6 -0
  65. package/src/io/flow/internal/v0/models/{pendingBankPaymentDetail.js → pendingBankPaymentTransferDetail.js} +2 -2
  66. package/src/io/flow/internal/v0/models/taxRemittanceTransaction.js +18 -0
  67. package/src/io/flow/internal/v0/models/transferTransaction.js +2 -0
  68. package/src/io/flow/internal/v0/unions/pendingBankPaymentDetail.js +8 -0
  69. package/src/io/flow/internal/v0/unions/transaction.js +2 -0
  70. package/src/io/flow/inventory/v0/models/experienceInventoryItem.js +11 -0
  71. package/src/io/flow/{internal/v0/models/shopifyOrderNumberGeneratorHexadecimal.js → inventory/v0/models/inventoryExperienceReference.js} +1 -1
  72. package/src/io/flow/invoice/v0/enums/paymentTerm.js +1 -1
  73. package/src/io/flow/payment/v0/models/authorizationPayload.js +6 -0
  74. package/src/io/flow/payment/v0/models/directDebit.js +6 -0
  75. package/src/io/flow/{shopify/internal/v0/models/shopifyOrderNumberGeneratorHexadecimal.js → payment/v0/models/googlePayAuthorizationPayload.js} +1 -1
  76. package/src/io/flow/payment/v0/models/inlineAuthorizationDetails.js +2 -1
  77. package/src/io/flow/payment/v0/models/inlineAuthorizationForm.js +2 -0
  78. package/src/io/flow/payment/v0/models/redirectAuthorizationDetails.js +2 -0
  79. package/src/io/flow/payment/v0/unions/authorizationPayloadParameters.js +4 -0
  80. package/src/io/flow/payment/v0/unions/confirmationDetails.js +4 -0
  81. package/src/io/flow/shopify/v0/models/shopifyVariantFlowMetafield.js +3 -2
  82. package/src/io/flow/shopify/v0/models/shopifyVariantInventoryMetafield.js +2 -2
  83. package/src/mocks.js +611 -0
  84. package/src/validators.js +1205 -0
  85. package/.eslintcache +0 -1
  86. package/lib/io/flow/internal/v0/unions/shopifyOrderNumberGenerator.js +0 -21
  87. package/lib/io/flow/shopify/internal/v0/unions/shopifyOrderNumberGenerator.js +0 -21
  88. package/src/io/flow/internal/v0/models/shopifyOrderNumberGeneratorPrefixSuffix.js +0 -7
  89. package/src/io/flow/internal/v0/unions/shopifyOrderNumberGenerator.js +0 -8
  90. package/src/io/flow/shopify/internal/v0/models/shopifyOrderNumberGeneratorPrefixSuffix.js +0 -7
  91. package/src/io/flow/shopify/internal/v0/unions/shopifyOrderNumberGenerator.js +0 -8
  92. /package/lib/io/flow/{shopify/v0/enums/shopifyVariantInventoryMetafieldStatus.js → inventory/v0/enums/experienceInventoryItemStatus.js} +0 -0
  93. /package/src/io/flow/{shopify/v0/enums/shopifyVariantInventoryMetafieldStatus.js → inventory/v0/enums/experienceInventoryItemStatus.js} +0 -0
@@ -22,4 +22,5 @@ export default PropTypes.shape({
22
22
  merchantOrderReference: PropTypes.string,
23
23
  shopperInteraction: shopperInteraction.isRequired,
24
24
  bankAccount: bankAccount,
25
+ additionalData: PropTypes.object,
25
26
  });
@@ -9,4 +9,5 @@ export default PropTypes.oneOf([
9
9
  'refund',
10
10
  'virtual_card_capture',
11
11
  'virtual_card_refund',
12
+ 'tax_remittance',
12
13
  ]);
@@ -0,0 +1,6 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ export default PropTypes.shape({
4
+ number: PropTypes.string.isRequired,
5
+ url: PropTypes.string.isRequired,
6
+ });
@@ -0,0 +1,7 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ export default PropTypes.shape({
4
+ number: PropTypes.string.isRequired,
5
+ submitted_at: PropTypes.string.isRequired,
6
+ primary_identifier: PropTypes.string,
7
+ });
@@ -0,0 +1,3 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ export default PropTypes.oneOf(['approved', 'declined']);
@@ -0,0 +1,7 @@
1
+ import PropTypes from 'prop-types';
2
+ import fraudEmailRuleDecision from '../enums/fraudEmailRuleDecision';
3
+
4
+ export default PropTypes.shape({
5
+ email: PropTypes.string.isRequired,
6
+ decision: fraudEmailRuleDecision.isRequired,
7
+ });
@@ -0,0 +1,6 @@
1
+ import PropTypes from 'prop-types';
2
+ import fraudEmailRule from './fraudEmailRule';
3
+
4
+ export default PropTypes.shape({
5
+ rule: fraudEmailRule.isRequired,
6
+ });
@@ -9,4 +9,5 @@ export default PropTypes.oneOf([
9
9
  'refund',
10
10
  'virtual_card_capture',
11
11
  'virtual_card_refund',
12
+ 'tax_remittance',
12
13
  ]);
@@ -0,0 +1,3 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ export default PropTypes.oneOf(['approved', 'declined']);
@@ -1,3 +1,3 @@
1
1
  import PropTypes from 'prop-types';
2
2
 
3
- export default PropTypes.oneOf(['net7', 'net30']);
3
+ export default PropTypes.oneOf(['net7', 'net15', 'net30']);
@@ -0,0 +1,3 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ export default PropTypes.oneOf(['statement', 'tax_remittance']);
@@ -0,0 +1,6 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ export default PropTypes.shape({
4
+ method: PropTypes.string.isRequired,
5
+ parameters: PropTypes.object.isRequired,
6
+ });
@@ -0,0 +1,10 @@
1
+ import PropTypes from 'prop-types';
2
+ import billingAddress from '../../../common/v0/models/billingAddress';
3
+
4
+ export default PropTypes.shape({
5
+ order_number: PropTypes.string.isRequired,
6
+ amount: PropTypes.number.isRequired,
7
+ currency: PropTypes.string.isRequired,
8
+ billing_address: billingAddress,
9
+ ip: PropTypes.string,
10
+ });
@@ -4,6 +4,7 @@ import price from '../../../common/v0/models/price';
4
4
 
5
5
  export default PropTypes.shape({
6
6
  id: PropTypes.string.isRequired,
7
+ key: PropTypes.string.isRequired,
7
8
  account: accountReference.isRequired,
8
9
  reference: PropTypes.string,
9
10
  sent_on: PropTypes.string.isRequired,
@@ -0,0 +1,6 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ export default PropTypes.shape({
4
+ id: PropTypes.string.isRequired,
5
+ url: PropTypes.string.isRequired,
6
+ });
@@ -0,0 +1,7 @@
1
+ import PropTypes from 'prop-types';
2
+ import fraudEmailRuleDecision from '../enums/fraudEmailRuleDecision';
3
+
4
+ export default PropTypes.shape({
5
+ email: PropTypes.string.isRequired,
6
+ decision: fraudEmailRuleDecision.isRequired,
7
+ });
@@ -0,0 +1,6 @@
1
+ import PropTypes from 'prop-types';
2
+ import fraudEmailRule from './fraudEmailRule';
3
+
4
+ export default PropTypes.shape({
5
+ rule: fraudEmailRule.isRequired,
6
+ });
@@ -1,7 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import accountReference from '../../../billing/v0/models/accountReference';
3
3
  import price from '../../../common/v0/models/price';
4
- import pendingBankPaymentDetail from './pendingBankPaymentDetail';
4
+ import pendingBankPaymentDetail from '../unions/pendingBankPaymentDetail';
5
5
 
6
6
  export default PropTypes.shape({
7
7
  organization: PropTypes.string.isRequired,
@@ -0,0 +1,6 @@
1
+ import PropTypes from 'prop-types';
2
+ import transactionReference from './transactionReference';
3
+
4
+ export default PropTypes.shape({
5
+ transaction: transactionReference.isRequired,
6
+ });
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
- import billingStatementReference from '../../../billing/v0/models/billingStatementReference';
3
2
  import transactionReference from './transactionReference';
3
+ import billingStatementReference from '../../../billing/v0/models/billingStatementReference';
4
4
 
5
5
  export default PropTypes.shape({
6
+ transaction: transactionReference.isRequired,
6
7
  statement: billingStatementReference.isRequired,
7
- transfer_transaction: transactionReference.isRequired,
8
8
  });
@@ -0,0 +1,18 @@
1
+ import PropTypes from 'prop-types';
2
+ import billingTransactionType from '../../../billing/v0/enums/billingTransactionType';
3
+ import price from '../../../common/v0/models/price';
4
+ import billingStatementReference from '../../../billing/v0/models/billingStatementReference';
5
+ import billingOrderSummary from './billingOrderSummary';
6
+ import billingInvoiceSummary from './billingInvoiceSummary';
7
+
8
+ export default PropTypes.shape({
9
+ id: PropTypes.string.isRequired,
10
+ type: billingTransactionType.isRequired,
11
+ posted_at: PropTypes.string.isRequired,
12
+ value: price.isRequired,
13
+ description: PropTypes.string.isRequired,
14
+ statement: billingStatementReference,
15
+ created_at: PropTypes.string.isRequired,
16
+ order: billingOrderSummary.isRequired,
17
+ invoice: billingInvoiceSummary.isRequired,
18
+ });
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import billingTransactionType from '../../../billing/v0/enums/billingTransactionType';
3
3
  import price from '../../../common/v0/models/price';
4
4
  import billingStatementReference from '../../../billing/v0/models/billingStatementReference';
5
+ import transferTransactionSource from '../enums/transferTransactionSource';
5
6
  import transferMethod from '../enums/transferMethod';
6
7
 
7
8
  export default PropTypes.shape({
@@ -12,5 +13,6 @@ export default PropTypes.shape({
12
13
  description: PropTypes.string.isRequired,
13
14
  statement: billingStatementReference,
14
15
  created_at: PropTypes.string.isRequired,
16
+ source: transferTransactionSource.isRequired,
15
17
  method: transferMethod.isRequired,
16
18
  });
@@ -0,0 +1,8 @@
1
+ import PropTypes from 'prop-types';
2
+ import pendingBankPaymentTransferDetail from '../models/pendingBankPaymentTransferDetail';
3
+ import pendingBankPaymentTaxRemittanceDetail from '../models/pendingBankPaymentTaxRemittanceDetail';
4
+
5
+ export default PropTypes.oneOfType([
6
+ pendingBankPaymentTransferDetail,
7
+ pendingBankPaymentTaxRemittanceDetail,
8
+ ]);
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import processingTransaction from '../models/processingTransaction';
3
3
  import subscriptionTransaction from '../models/subscriptionTransaction';
4
4
  import invoiceTransaction from '../models/invoiceTransaction';
5
+ import taxRemittanceTransaction from '../models/taxRemittanceTransaction';
5
6
  import transferTransaction from '../models/transferTransaction';
6
7
  import virtualCardTransaction from '../models/virtualCardTransaction';
7
8
 
@@ -9,6 +10,7 @@ export default PropTypes.oneOfType([
9
10
  processingTransaction,
10
11
  subscriptionTransaction,
11
12
  invoiceTransaction,
13
+ taxRemittanceTransaction,
12
14
  transferTransaction,
13
15
  virtualCardTransaction,
14
16
  ]);
@@ -0,0 +1,11 @@
1
+ import PropTypes from 'prop-types';
2
+ import inventoryExperienceReference from './inventoryExperienceReference';
3
+ import itemReference from '../../../common/v0/models/itemReference';
4
+ import experienceInventoryItemStatus from '../enums/experienceInventoryItemStatus';
5
+
6
+ export default PropTypes.shape({
7
+ id: PropTypes.string.isRequired,
8
+ experience: inventoryExperienceReference.isRequired,
9
+ item: itemReference.isRequired,
10
+ status: experienceInventoryItemStatus.isRequired,
11
+ });
@@ -1,5 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
2
 
3
3
  export default PropTypes.shape({
4
- length: PropTypes.number.isRequired,
4
+ key: PropTypes.string.isRequired,
5
5
  });
@@ -1,3 +1,3 @@
1
1
  import PropTypes from 'prop-types';
2
2
 
3
- export default PropTypes.oneOf(['net7', 'net30']);
3
+ export default PropTypes.oneOf(['net7', 'net15', 'net30']);
@@ -0,0 +1,6 @@
1
+ import PropTypes from 'prop-types';
2
+ import authorizationPayloadParameters from '../unions/authorizationPayloadParameters';
3
+
4
+ export default PropTypes.shape({
5
+ parameters: authorizationPayloadParameters.isRequired,
6
+ });
@@ -0,0 +1,6 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ export default PropTypes.shape({
4
+ routing_number: PropTypes.string.isRequired,
5
+ last4: PropTypes.string.isRequired,
6
+ });
@@ -1,5 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
2
 
3
3
  export default PropTypes.shape({
4
- length: PropTypes.number.isRequired,
4
+ payload: PropTypes.object.isRequired,
5
5
  });
@@ -2,5 +2,6 @@ import PropTypes from 'prop-types';
2
2
 
3
3
  export default PropTypes.shape({
4
4
  id: PropTypes.string.isRequired,
5
- client_token: PropTypes.string.isRequired,
5
+ client_token: PropTypes.string,
6
+ parameters: PropTypes.object,
6
7
  });
@@ -1,6 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import issuerReference from './issuerReference';
3
3
  import billingAddress from '../../../common/v0/models/billingAddress';
4
+ import authorizationPayload from './authorizationPayload';
4
5
 
5
6
  export default PropTypes.shape({
6
7
  method: PropTypes.string.isRequired,
@@ -12,4 +13,5 @@ export default PropTypes.shape({
12
13
  key: PropTypes.string,
13
14
  attributes: PropTypes.objectOf(PropTypes.string),
14
15
  ip: PropTypes.string,
16
+ payload: authorizationPayload,
15
17
  });
@@ -1,6 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
+ import confirmationDetails from '../unions/confirmationDetails';
2
3
 
3
4
  export default PropTypes.shape({
4
5
  id: PropTypes.string.isRequired,
5
6
  payment_redirect_url: PropTypes.string.isRequired,
7
+ confirmation_details: confirmationDetails,
6
8
  });
@@ -0,0 +1,4 @@
1
+ import PropTypes from 'prop-types';
2
+ import googlePayAuthorizationPayload from '../models/googlePayAuthorizationPayload';
3
+
4
+ export default PropTypes.oneOfType([googlePayAuthorizationPayload]);
@@ -0,0 +1,4 @@
1
+ import PropTypes from 'prop-types';
2
+ import directDebit from '../models/directDebit';
3
+
4
+ export default PropTypes.oneOfType([directDebit]);
@@ -1,5 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import subcatalogItemStatus from '../../../catalog/v0/enums/subcatalogItemStatus';
3
+ import experienceInventoryItemStatus from '../../../inventory/v0/enums/experienceInventoryItemStatus';
3
4
 
4
5
  export default PropTypes.shape({
5
6
  prices_item: PropTypes.string.isRequired,
@@ -9,6 +10,6 @@ export default PropTypes.shape({
9
10
  prices_vat_name: PropTypes.string,
10
11
  prices_duty: PropTypes.string,
11
12
  prices_compare_at: PropTypes.string,
12
- prices_status: PropTypes.string,
13
- inventory_status: subcatalogItemStatus.isRequired,
13
+ prices_status: subcatalogItemStatus.isRequired,
14
+ inventory_status: experienceInventoryItemStatus,
14
15
  });
@@ -1,8 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import experienceReference from '../../../experience/v0/models/experienceReference';
3
- import shopifyVariantInventoryMetafieldStatus from '../enums/shopifyVariantInventoryMetafieldStatus';
3
+ import experienceInventoryItemStatus from '../../../inventory/v0/enums/experienceInventoryItemStatus';
4
4
 
5
5
  export default PropTypes.shape({
6
6
  experience: experienceReference.isRequired,
7
- status: shopifyVariantInventoryMetafieldStatus.isRequired,
7
+ status: experienceInventoryItemStatus.isRequired,
8
8
  });