Skip to content

Commit

Permalink
Merge pull request #52 from windingtree/develop
Browse files Browse the repository at this point in the history
Bump new beta
  • Loading branch information
kostysh authored Jul 27, 2023
2 parents b7d2579 + 72dcbd5 commit ad47e29
Show file tree
Hide file tree
Showing 105 changed files with 4,245 additions and 3,347 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ runs:

- name: Build packages
shell: bash
run: pnpm build
run: pnpm build:ci
File renamed without changes
24 changes: 12 additions & 12 deletions docs/docs/availability.md → docs/availability.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Availability management
# Availability Management

Supplier's services availability management is not a part of the protocol but the information from such systems is the foundation of offers generation. Every offer should represent the availability of service to the buyer.
> **Note**: This functionality is not implemented yet. Use these guidelines to review potential future features.
Here is the list of common use cases of availability management systems that can be implemented in the frame of the protocol:
Supplier's services availability management is not a part of the protocol, but the information from such systems is the foundation of offer generation. Every offer should represent the availability of a service to the buyer.

- availability lookup. Allows to search for available services.
- temporary locking. Allows to lock available service for prevention of double booking.
- booking/selling. Allows to book or sell the service and make it unavailable according to the supplier use case logic.
- change. Allows to change booked service.
- canceling. Allows to cancel already booked service.
The following are common use cases of availability management systems that can be implemented within the protocol:

The protocol supplier node instances have tools that automate access and communication with external availability management systems. To support earlier mentioned use cases the node configuration has special options to define callback functions.
- **Availability Lookup**: Allows searching for available services.
- **Temporary Locking**: Allows locking an available service to prevent double booking.
- **Booking/Selling**: Allows booking or selling the service and making it unavailable according to the supplier's use case logic.
- **Change**: Allows changing a booked service.
- **Canceling**: Allows canceling an already booked service.

> This API is experimental and may be changed
The protocol's supplier node instances have tools that automate access and communication with external availability management systems. To support the aforementioned use cases, the node configuration has special options to define callback functions.

```typescript
import { GenericQuery, GenericAvailabilityResponse, GenericAvailabilityLockQuery, GenericAvailabilityBookQuery, GenericAvailabilityCancelQuery, NodeOptions, createNode } from '@windingtree/sdk';
Expand All @@ -31,7 +31,7 @@ interface AvailabilityManagerOptions {
api: AvailabilityManagerApiOptions;
}

// You set of custom callbacks
// Your set of custom callbacks
const lookup = async (query: RequestQuery): Promise<AvailabilityResponse> => {/**/};
const lock = async (query: LockQuery): Promise<boolean> => {/**/};
const unlock = async (query: LockQuery): Promise<boolean> => {/**/};
Expand All @@ -57,4 +57,4 @@ const options: NodeOptions = {
const node = createNode(options);
```
Once the properly configured node is started registered API functions become available under the `node.availabilityManager`.
Once the properly configured node is started, the registered API functions become available under `node.availabilityManager`. These API functions can then be used to manage the availability of services and support various availability-related use cases within the WindingTree market protocol.
Loading

0 comments on commit ad47e29

Please sign in to comment.