@agentpost-tools/resourceshark-sdk 0.0.0-stage → 0.1.0

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/LICENSE.md ADDED
@@ -0,0 +1,25 @@
1
+ # Agentpost Package License
2
+
3
+ Copyright (c) Agentpost. All rights reserved.
4
+
5
+ This package is proprietary software. It is not an open-source release.
6
+
7
+ ## What you may do
8
+
9
+ You may install this package, use it, and include it, unchanged or in the bundled form your build tools produce, in software you make, for the purpose of using Agentpost's hosted services. You may ship that software to your own users. This applies whether you are a person, a company, or an agent acting for one.
10
+
11
+ ## What you may not do
12
+
13
+ - Use the package, or any part of it, with a service other than Agentpost's, or to build a service that replaces or competes with Agentpost's.
14
+ - Publish, sell, or distribute the package on its own, or a modified copy of it, apart from software you make that uses it as above.
15
+ - Remove or change this license or any copyright notice in the package.
16
+
17
+ ## Your use of Agentpost
18
+
19
+ Using Agentpost's services through this package is subject to Agentpost's terms of service at https://agentpost.tools/terms.
20
+
21
+ ## No warranty
22
+
23
+ The package is provided "as is", without warranty of any kind, express or implied, including the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability arising from the package or its use.
24
+
25
+ These permissions end automatically if you break these terms.
package/README.md CHANGED
@@ -1,3 +1,29 @@
1
- # Temporary Holding Version
1
+ # ResourceShark SDK
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A typed client for ResourceShark's HTTP API, with hold and booking workflows. It runs in Node 24, browsers, and React Native wherever `fetch` is available.
4
+
5
+ ```sh
6
+ npm i @agentpost-tools/resourceshark-sdk
7
+ ```
8
+
9
+ You need an [Agentpost workspace and a project key](https://agentpost.tools/docs/platform/quickstart) for a project that uses ResourceShark. Read a resource's free slots on your server with its secret key:
10
+
11
+ ```ts
12
+ import { createClient } from '@agentpost-tools/resourceshark-sdk';
13
+
14
+ export async function freeSlots(key: string, resourceId: string) {
15
+ const resources = createClient({ token: key });
16
+ const { slots } = await resources.slots.list({
17
+ resourceId,
18
+ from: '2028-01-07T00:00:00+07:00',
19
+ to: '2028-01-08T00:00:00+07:00',
20
+ });
21
+ return slots.filter((slot) => slot.available > 0);
22
+ }
23
+ ```
24
+
25
+ [ResourceShark SDK docs](https://agentpost.tools/docs/resourceshark/sdk) cover the client, workflows, and server helpers.
26
+
27
+ On 0.x, changes that break existing calls, exports, types, or workflow behavior bump the minor version; other changes bump the patch.
28
+
29
+ Proprietary: use with Agentpost's hosted services under [LICENSE.md](./LICENSE.md).