From 566f5d6d5d50ad94892b4b505973e98a7848124d Mon Sep 17 00:00:00 2001 From: Sari Saariaho Date: Tue, 16 Jun 2026 10:25:17 +0300 Subject: [PATCH 1/2] Start adding documentation updates for listing protected files --- content/references/digital-files/index.mdx | 5 +++-- .../transaction-process-actions/index.mdx | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/content/references/digital-files/index.mdx b/content/references/digital-files/index.mdx index 3fe404d..9bc8003 100644 --- a/content/references/digital-files/index.mdx +++ b/content/references/digital-files/index.mdx @@ -56,8 +56,9 @@ attachment determines the visibility of the file: - `privateFileAttachments` are visible only to the user who created the resource. -The [API reference](https://www.sharetribe.com/api-reference/) details -which resources have which scopes of file attachments available. +The +[API reference for supported attaching resources](https://www.sharetribe.com/api-reference/marketplace.html#supported-attaching-resources) +details which resources have which scopes of file attachments available. ## Further reading diff --git a/content/references/transaction-process-actions/index.mdx b/content/references/transaction-process-actions/index.mdx index f8c026b..b3a4c82 100644 --- a/content/references/transaction-process-actions/index.mdx +++ b/content/references/transaction-process-actions/index.mdx @@ -1109,6 +1109,24 @@ requires that the transition is made from a trusted context. **Configuration options**: - +### Files + +#### :action/reveal-listing-protected-files + +Copy protected file attachments from the transaction's listing to the +transaction itself. + +When the action runs during a transition, it reads all non-deleted +fileAttachment entities with :fileAttachment.scope/protected on the +transaction's listing and creates matching fileAttachment entities +attached to the transaction. + +**Preconditions**: - + +**Parameters**: - + +**Configuration options**: - + ### Stripe integration #### `:action/stripe-create-payment-intent` From 4e94c0c4f5d8d86a6227d6a876582c0fe6bf32dd Mon Sep 17 00:00:00 2001 From: Sari Saariaho Date: Thu, 18 Jun 2026 13:40:19 +0300 Subject: [PATCH 2/2] Update default-download process to transaction process lists --- .../messages-notifications/messages/index.mdx | 17 ++++++++++++----- .../removing-stripe-and-payments/index.mdx | 12 ++++++------ .../add-transaction-fields/index.mdx | 7 ++++--- .../index.mdx | 6 +++++- .../payments/save-payment-card/index.mdx | 7 ++++--- .../create-transaction-process/index.mdx | 10 ++++++++++ 6 files changed, 41 insertions(+), 18 deletions(-) diff --git a/content/concepts/messages-notifications/messages/index.mdx b/content/concepts/messages-notifications/messages/index.mdx index d67e47c..71d60f6 100644 --- a/content/concepts/messages-notifications/messages/index.mdx +++ b/content/concepts/messages-notifications/messages/index.mdx @@ -16,18 +16,25 @@ marketplace. They can be exchanged freely between a customer and a provider once they have engaged in a transaction. Messages always need to be associated with a transaction and can not be sent outside of one. -The default booking and purchase -[transaction processes](https://github.com/sharetribe/example-processes/blob/master/default-booking/process.edn) +The transaction processes +[default-booking](https://github.com/sharetribe/example-processes#default-booking), +[default-purchase](https://github.com/sharetribe/example-processes#default-purchase), +and +[default-download](https://github.com/sharetribe/example-processes#default-download) include an inquiry transition, which initiates a transaction without running any [actions](/references/transaction-process-actions/#actions), -allowing the provider and customer to send messages to each other. In -addition, the -[default-inquiry process](https://github.com/sharetribe/example-processes/blob/master/default-inquiry/process.edn) +allowing the provider and customer to send messages to each other. + +n addition, the +[default-inquiry process](https://github.com/sharetribe/example-processes#default-inquiry) initiates a simple transaction that is only intended for messaging. Note that messages do not alter the transaction or transition it to a different state. +In all transaction processes, both default and custom, messages can be +sent once the transaction has been initiated with any transition. + ## Sending messages You can send messages using the diff --git a/content/how-to/payments/removing-stripe-and-payments/index.mdx b/content/how-to/payments/removing-stripe-and-payments/index.mdx index d1e5852..c498fdd 100644 --- a/content/how-to/payments/removing-stripe-and-payments/index.mdx +++ b/content/how-to/payments/removing-stripe-and-payments/index.mdx @@ -63,15 +63,15 @@ You need to remove at least the following actions: - `:action/stripe-refund-payment` If you are using the template default processes with strong customer -authentication (e.g. `default-booking`, `default-purchase`, -`default-negotiation`) you need to remove confirming the payment. -Otherwise, the transaction will get stuck. The simplest way to do this -is to remove `pending-payment` and `expire-payment` states and point -`request-payment` and `request-payment-after-inquiry`, or +authentication (`default-booking`, `default-purchase`, +`default-negotiation`, `default-download`) you need to remove confirming +the payment. Otherwise, the transaction will get stuck. The simplest way +to do this is to remove `pending-payment` and `expire-payment` states +and point `request-payment` and `request-payment-after-inquiry`, or `request-payment-to-accept-offer`, directly to the following state: - `preauthorized` in `default-booking` -- `purchased` in `default-purchase` +- `purchased` in `default-purchase` and `default-download` - `offer-accepted` in `default-negotiation` When you are building the transaction process for your marketplace, it diff --git a/content/how-to/transaction-process/add-transaction-fields/index.mdx b/content/how-to/transaction-process/add-transaction-fields/index.mdx index 1d9b369..2b7bc47 100644 --- a/content/how-to/transaction-process/add-transaction-fields/index.mdx +++ b/content/how-to/transaction-process/add-transaction-fields/index.mdx @@ -195,9 +195,10 @@ transaction process. - `default-inquiry`: transaction fields with `showTo: 'customer'` are collected on CheckoutPageWithInquiryProcess page. Fields with `showTo: 'provider'` are not collected. -- `default-booking` and `default-purchase`: transaction fields with - `showTo: 'customer'` are collected on CheckoutPageWithPayment. Fields - with `showTo: 'provider'` are not collected. +- `default-booking`, `default-purchase`, and `default-download`: + transaction fields with `showTo: 'customer'` are collected on + CheckoutPageWithPayment. Fields with `showTo: 'provider'` are not + collected. - `default-negotiation`: transaction fields with `showTo: 'customer'` are collected on RequestQuotePage, and transaction fields with `showTo: 'provider'` are collected on the MakeOfferPage. diff --git a/content/how-to/transaction-process/change-transaction-process-in-template/index.mdx b/content/how-to/transaction-process/change-transaction-process-in-template/index.mdx index 34fafd7..40f29c5 100644 --- a/content/how-to/transaction-process/change-transaction-process-in-template/index.mdx +++ b/content/how-to/transaction-process/change-transaction-process-in-template/index.mdx @@ -14,7 +14,8 @@ Sharetribe Web Template defines four transaction processes by default: - daily, nightly, hourly, and fixed bookings use the **default-booking** process, -- product sales use the **default-purchase** process +- product sales use the **default-purchase** process, +- digital download sales use the **default-download** process, - price negotiations use the **default-negotiation** process, and - inquiries use the **default-inquiry** process. @@ -118,6 +119,7 @@ and handles these unit types by default: - **day**, **night**, **hour**, and **fixed** for the **default-booking** process - **item** for the **default-purchase** process +- **file** for the **default-download** process - **inquiry** for the **default-inquiry** process - **request** and **offer** for the **default-negotiation** process. @@ -150,6 +152,7 @@ export const PURCHASE_PROCESS_NAME = 'default-purchase'; export const BOOKING_PROCESS_NAME = 'default-booking'; export const INQUIRY_PROCESS_NAME = 'default-inquiry'; export const NEGOTIATION_PROCESS_NAME = 'default-negotiation'; +export const DOWNLOAD_PROCESS_NAME = 'default-download'; // Add new processes with a descriptive name export const NEGOTIATED_BOOKING_PROCESS_NAME = 'booking-with-negotiation'; @@ -612,6 +615,7 @@ const tabsForListingType = (processName, listingTypeConfig) => { ['default-purchase']: [DETAILS, PRICING_AND_STOCK, ...deliveryMaybe, ...styleOrPhotosTab], ['default-negotiation']: [DETAILS, ...locationMaybe, ...pricingMaybe, ...styleOrPhotosTab], ['default-inquiry']: [DETAILS, ...locationMaybe, ...pricingMaybe, ...styleOrPhotosTab], + ['default-download']: [DETAILS, ...locationMaybe, FILES, ...pricingMaybe, ...styleOrPhotosTab], }; return tabs[processName] || tabs['default-inquiry']; diff --git a/content/template/payments/save-payment-card/index.mdx b/content/template/payments/save-payment-card/index.mdx index 2732f88..82a86c9 100644 --- a/content/template/payments/save-payment-card/index.mdx +++ b/content/template/payments/save-payment-card/index.mdx @@ -27,9 +27,10 @@ payment). In the default-booking process, a preauthorization is created: the money is reserved, but not yet moved to Stripe. When a provider accepts the request, the preauthorization is captured (i.e. the payment is charged from the card and money moved to Stripe and held on the -connected account of the provider until payout). In the default-purchase -and default-negotiation processes, the payment is created and captured -immediately. The actual payout happens when the transaction completes. +connected account of the provider until payout). In the +**default-purchase**, **default-download** and **default-negotiation** +processes, the payment is created and captured immediately. The actual +payout happens when the transaction completes. A payment card also needs to be saved for off-session payments if those are in use. They are automatic one-time payments that happen when the diff --git a/content/tutorial/create-transaction-process/index.mdx b/content/tutorial/create-transaction-process/index.mdx index 0a85cb7..aedd856 100644 --- a/content/tutorial/create-transaction-process/index.mdx +++ b/content/tutorial/create-transaction-process/index.mdx @@ -504,6 +504,7 @@ Let's first import the new process and export its name as a constant. import * as bookingProcess from './transactionProcessBooking'; import * as inquiryProcess from './transactionProcessInquiry'; import * as negotiationProcess from './transactionProcessNegotiation'; + import * as downloadProcess from './transactionProcessDownload'; + import * as instantProcess from './transactionProcessInstantBooking'; export const ITEM = 'item'; @@ -514,6 +515,7 @@ Let's first import the new process and export its name as a constant. export const INQUIRY = 'inquiry'; export const OFFER = 'offer'; // The unitType 'offer' means that provider created the listing on default-negotiation process export const REQUEST = 'request'; // The unitType 'request' means that customer created the listing on default-negotiation process + export const FILE = 'file'; // Then names of supported processes @@ -521,6 +523,7 @@ Let's first import the new process and export its name as a constant. export const BOOKING_PROCESS_NAME = 'default-booking'; export const INQUIRY_PROCESS_NAME = 'default-inquiry'; export const NEGOTIATION_PROCESS_NAME = 'default-negotiation'; + export const DOWNLOAD_PROCESS_NAME = 'default-download'; + export const INSTANT_PROCESS_NAME = 'biketribe-instant-booking'; ``` @@ -557,6 +560,12 @@ const PROCESSES = [ process: negotiationProcess, unitTypes: [OFFER, REQUEST], }, + { + name: DOWNLOAD_PROCESS_NAME, + alias: `${DOWNLOAD_PROCESS_NAME}/release-1`, + process: downloadProcess, + unitTypes: [FILE], + }, + { + name: INSTANT_PROCESS_NAME, + alias: `${INSTANT_PROCESS_NAME}/release-1`, @@ -623,6 +632,7 @@ import { INQUIRY_PROCESS_NAME, PURCHASE_PROCESS_NAME, NEGOTIATION_PROCESS_NAME, + TODO, resolveLatestProcessName, getProcess, } from '../../transactions/transaction';