listbee 0.6.0 → 0.6.2
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/README.md +39 -10
- package/dist/esm/base-client.d.ts +2 -2
- package/dist/esm/base-client.js +3 -3
- package/dist/esm/client.d.ts +10 -10
- package/dist/esm/client.js +10 -10
- package/dist/esm/generated/types.d.ts +1 -1
- package/dist/esm/index.d.ts +17 -17
- package/dist/esm/index.js +13 -13
- package/dist/esm/resources/account.d.ts +3 -3
- package/dist/esm/resources/api-keys.d.ts +2 -2
- package/dist/esm/resources/customers.d.ts +2 -2
- package/dist/esm/resources/files.d.ts +3 -3
- package/dist/esm/resources/index.d.ts +9 -9
- package/dist/esm/resources/index.js +9 -9
- package/dist/esm/resources/listings.d.ts +3 -3
- package/dist/esm/resources/listings.js +1 -1
- package/dist/esm/resources/orders.d.ts +3 -3
- package/dist/esm/resources/signup.d.ts +2 -2
- package/dist/esm/resources/stripe.d.ts +2 -2
- package/dist/esm/resources/webhooks.d.ts +3 -3
- package/dist/esm/resources/webhooks.js +1 -1
- package/dist/esm/types/index.d.ts +4 -4
- package/dist/esm/types/index.js +2 -2
- package/package.json +13 -4
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# listbee
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/listbee)
|
|
4
|
+
[](https://github.com/listbee-dev/listbee-typescript/actions/workflows/ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
3
7
|
Official TypeScript SDK for the [ListBee API](https://listbee.so) — one API call to sell and deliver digital content.
|
|
4
8
|
|
|
5
9
|
- Zero runtime dependencies (native fetch, Node >= 18)
|
|
@@ -34,7 +38,9 @@ const listing = await client.listings.create({
|
|
|
34
38
|
});
|
|
35
39
|
|
|
36
40
|
await client.listings.setDeliverables(listing.id, {
|
|
37
|
-
|
|
41
|
+
deliverables: [
|
|
42
|
+
{ type: 'url', value: 'https://example.com/seo-playbook.pdf' },
|
|
43
|
+
],
|
|
38
44
|
});
|
|
39
45
|
|
|
40
46
|
const published = await client.listings.publish(listing.id);
|
|
@@ -67,7 +73,7 @@ The key is validated lazily — an `AuthenticationError` is raised only when you
|
|
|
67
73
|
| Resource | Methods |
|
|
68
74
|
|----------|---------|
|
|
69
75
|
| `listings` | `create`, `get`, `list`, `update`, `publish`, `setDeliverables`, `removeDeliverables`, `delete` |
|
|
70
|
-
| `orders` | `get`, `list`, `deliver`, `refund` |
|
|
76
|
+
| `orders` | `get`, `list`, `deliver`, `ship`, `refund` |
|
|
71
77
|
| `customers` | `get`, `list` |
|
|
72
78
|
| `files` | `upload` |
|
|
73
79
|
| `webhooks` | `create`, `get`, `list`, `update`, `delete`, `listEvents`, `retryEvent`, `test`, `verify` |
|
|
@@ -95,7 +101,9 @@ console.log(listing.id); // lst_r7kq2xy9m3pR5tW1
|
|
|
95
101
|
|
|
96
102
|
// Set deliverables (file, URL, or text)
|
|
97
103
|
await client.listings.setDeliverables(listing.id, {
|
|
98
|
-
|
|
104
|
+
deliverables: [
|
|
105
|
+
{ type: 'url', value: 'https://example.com/seo-playbook.pdf' },
|
|
106
|
+
],
|
|
99
107
|
});
|
|
100
108
|
|
|
101
109
|
// Publish
|
|
@@ -145,15 +153,26 @@ console.log(order.paid_at); // ISO 8601 timestamp
|
|
|
145
153
|
|
|
146
154
|
// Deliver — push content to the buyer (external fulfillment)
|
|
147
155
|
const fulfilled = await client.orders.deliver('ord_9xM4kP7nR2qT5wY1', {
|
|
148
|
-
|
|
149
|
-
|
|
156
|
+
deliverables: [
|
|
157
|
+
{ type: 'text', value: 'Your AI-generated report is ready.' },
|
|
158
|
+
],
|
|
150
159
|
});
|
|
151
160
|
console.log(fulfilled.status); // "fulfilled"
|
|
152
161
|
|
|
153
|
-
// Or
|
|
162
|
+
// Or deliver a file or URL
|
|
154
163
|
await client.orders.deliver('ord_9xM4kP7nR2qT5wY1', {
|
|
155
|
-
|
|
164
|
+
deliverables: [
|
|
165
|
+
{ type: 'url', value: 'https://example.com/report.pdf' },
|
|
166
|
+
],
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
// Ship — add tracking for physical orders
|
|
170
|
+
const shipped = await client.orders.ship('ord_9xM4kP7nR2qT5wY1', {
|
|
171
|
+
carrier: 'USPS',
|
|
172
|
+
tracking_code: '9400111899223',
|
|
173
|
+
seller_note: 'Enjoy your purchase!',
|
|
156
174
|
});
|
|
175
|
+
console.log(shipped.status); // "fulfilled"
|
|
157
176
|
|
|
158
177
|
// Refund
|
|
159
178
|
const refunded = await client.orders.refund('ord_9xM4kP7nR2qT5wY1');
|
|
@@ -187,7 +206,11 @@ const file = await client.files.upload({
|
|
|
187
206
|
console.log(file.id); // use this ID in setDeliverables
|
|
188
207
|
|
|
189
208
|
// Then attach to a listing
|
|
190
|
-
await client.listings.setDeliverables(listing.id, {
|
|
209
|
+
await client.listings.setDeliverables(listing.id, {
|
|
210
|
+
deliverables: [
|
|
211
|
+
{ type: 'file', token: file.id },
|
|
212
|
+
],
|
|
213
|
+
});
|
|
191
214
|
```
|
|
192
215
|
|
|
193
216
|
### Webhooks
|
|
@@ -296,8 +319,9 @@ await client.listings.publish(listing.id);
|
|
|
296
319
|
|
|
297
320
|
// On order.paid webhook:
|
|
298
321
|
await client.orders.deliver(order.id, {
|
|
299
|
-
|
|
300
|
-
|
|
322
|
+
deliverables: [
|
|
323
|
+
{ type: 'text', value: generatedReport },
|
|
324
|
+
],
|
|
301
325
|
});
|
|
302
326
|
```
|
|
303
327
|
|
|
@@ -448,9 +472,14 @@ import {
|
|
|
448
472
|
|
|
449
473
|
Apache-2.0. See [LICENSE](LICENSE).
|
|
450
474
|
|
|
475
|
+
## Contributing
|
|
476
|
+
|
|
477
|
+
Bug reports and feature requests welcome — open an issue on [GitHub](https://github.com/listbee-dev/listbee-typescript/issues).
|
|
478
|
+
|
|
451
479
|
## Links
|
|
452
480
|
|
|
453
481
|
- [Documentation](https://docs.listbee.so)
|
|
454
482
|
- [API Reference](https://docs.listbee.so/api)
|
|
455
483
|
- [GitHub](https://github.com/listbee-dev/listbee-typescript)
|
|
456
484
|
- [npm](https://www.npmjs.com/package/listbee)
|
|
485
|
+
- [Changelog](https://github.com/listbee-dev/listbee-typescript/blob/main/CHANGELOG.md)
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Base HTTP client for the ListBee SDK.
|
|
3
3
|
*/
|
|
4
4
|
/// <reference types="node" />
|
|
5
|
-
import { CursorPage } from './types/shared';
|
|
6
|
-
import type { ClientOptions, RequestOptions } from './types/shared';
|
|
5
|
+
import { CursorPage } from './types/shared.js';
|
|
6
|
+
import type { ClientOptions, RequestOptions } from './types/shared.js';
|
|
7
7
|
export type { ClientOptions, RequestOptions };
|
|
8
8
|
export { CursorPage };
|
|
9
9
|
/** Internal HTTP response wrapper. */
|
package/dist/esm/base-client.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Base HTTP client for the ListBee SDK.
|
|
3
3
|
*/
|
|
4
|
-
import { DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, INITIAL_RETRY_DELAY_MS, MAX_RETRY_DELAY_MS, RETRY_STATUS_CODES, } from './constants';
|
|
5
|
-
import { APIConnectionError, APITimeoutError, ListBeeError, raiseForStatus } from './errors';
|
|
6
|
-
import { CursorPage } from './types/shared';
|
|
4
|
+
import { DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, INITIAL_RETRY_DELAY_MS, MAX_RETRY_DELAY_MS, RETRY_STATUS_CODES, } from './constants.js';
|
|
5
|
+
import { APIConnectionError, APITimeoutError, ListBeeError, raiseForStatus } from './errors.js';
|
|
6
|
+
import { CursorPage } from './types/shared.js';
|
|
7
7
|
const SDK_VERSION = '0.6.0';
|
|
8
8
|
export { CursorPage };
|
|
9
9
|
/**
|
package/dist/esm/client.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ListBee TypeScript SDK — top-level client.
|
|
3
3
|
*/
|
|
4
|
-
import { BaseClient, type ClientOptions } from './base-client';
|
|
5
|
-
import { AccountResource } from './resources/account';
|
|
6
|
-
import { ApiKeysResource } from './resources/api-keys';
|
|
7
|
-
import { CustomersResource } from './resources/customers';
|
|
8
|
-
import { FilesResource } from './resources/files';
|
|
9
|
-
import { ListingsResource } from './resources/listings';
|
|
10
|
-
import { OrdersResource } from './resources/orders';
|
|
11
|
-
import { SignupResource } from './resources/signup';
|
|
12
|
-
import { StripeResource } from './resources/stripe';
|
|
13
|
-
import { WebhooksResource } from './resources/webhooks';
|
|
4
|
+
import { BaseClient, type ClientOptions } from './base-client.js';
|
|
5
|
+
import { AccountResource } from './resources/account.js';
|
|
6
|
+
import { ApiKeysResource } from './resources/api-keys.js';
|
|
7
|
+
import { CustomersResource } from './resources/customers.js';
|
|
8
|
+
import { FilesResource } from './resources/files.js';
|
|
9
|
+
import { ListingsResource } from './resources/listings.js';
|
|
10
|
+
import { OrdersResource } from './resources/orders.js';
|
|
11
|
+
import { SignupResource } from './resources/signup.js';
|
|
12
|
+
import { StripeResource } from './resources/stripe.js';
|
|
13
|
+
import { WebhooksResource } from './resources/webhooks.js';
|
|
14
14
|
export type { ClientOptions };
|
|
15
15
|
/**
|
|
16
16
|
* ListBee API client.
|
package/dist/esm/client.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ListBee TypeScript SDK — top-level client.
|
|
3
3
|
*/
|
|
4
|
-
import { BaseClient } from './base-client';
|
|
5
|
-
import { AccountResource } from './resources/account';
|
|
6
|
-
import { ApiKeysResource } from './resources/api-keys';
|
|
7
|
-
import { CustomersResource } from './resources/customers';
|
|
8
|
-
import { FilesResource } from './resources/files';
|
|
9
|
-
import { ListingsResource } from './resources/listings';
|
|
10
|
-
import { OrdersResource } from './resources/orders';
|
|
11
|
-
import { SignupResource } from './resources/signup';
|
|
12
|
-
import { StripeResource } from './resources/stripe';
|
|
13
|
-
import { WebhooksResource } from './resources/webhooks';
|
|
4
|
+
import { BaseClient } from './base-client.js';
|
|
5
|
+
import { AccountResource } from './resources/account.js';
|
|
6
|
+
import { ApiKeysResource } from './resources/api-keys.js';
|
|
7
|
+
import { CustomersResource } from './resources/customers.js';
|
|
8
|
+
import { FilesResource } from './resources/files.js';
|
|
9
|
+
import { ListingsResource } from './resources/listings.js';
|
|
10
|
+
import { OrdersResource } from './resources/orders.js';
|
|
11
|
+
import { SignupResource } from './resources/signup.js';
|
|
12
|
+
import { StripeResource } from './resources/stripe.js';
|
|
13
|
+
import { WebhooksResource } from './resources/webhooks.js';
|
|
14
14
|
/**
|
|
15
15
|
* ListBee API client.
|
|
16
16
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { components } from './api-types';
|
|
1
|
+
import type { components } from './api-types.js';
|
|
2
2
|
export type AccountReadiness = components['schemas']['AccountReadiness'];
|
|
3
3
|
export type AccountResponse = components['schemas']['AccountResponse'];
|
|
4
4
|
export type AccountStats = components['schemas']['AccountStats'];
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ListBee TypeScript SDK — public exports.
|
|
3
3
|
*/
|
|
4
|
-
export { ListBee } from './client';
|
|
5
|
-
export type { ClientOptions } from './client';
|
|
6
|
-
export { CursorPage } from './base-client';
|
|
7
|
-
export type { RequestOptions } from './base-client';
|
|
8
|
-
export { APIConnectionError, APIStatusError, APITimeoutError, AuthenticationError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, ListBeeError, NotFoundError, PayloadTooLargeError, RateLimitError, ValidationError, WebhookVerificationError, } from './errors';
|
|
9
|
-
export { AccountResource } from './resources/account';
|
|
10
|
-
export { ApiKeysResource } from './resources/api-keys';
|
|
11
|
-
export { CustomersResource } from './resources/customers';
|
|
12
|
-
export { FilesResource } from './resources/files';
|
|
13
|
-
export { ListingsResource } from './resources/listings';
|
|
14
|
-
export { OrdersResource } from './resources/orders';
|
|
15
|
-
export { SignupResource } from './resources/signup';
|
|
16
|
-
export { StripeResource } from './resources/stripe';
|
|
17
|
-
export { WebhooksResource } from './resources/webhooks';
|
|
18
|
-
export { ActionCode, ActionKind, BlurMode, CheckoutFieldType, DeliverableStatus, DeliverableType, ErrorCode, FulfillmentMode, ListingStatus, OrderStatus, WebhookEventType, } from './generated/enums';
|
|
19
|
-
export type { AccountReadiness, AccountResponse, AccountStats, Action, ActionResolve, ApiKeyListResponse, ApiKeyResponse, CheckoutFieldInput, CreateAccountParams, CreateAccountResponse, CreateApiKeyParams, CreateListingParams, CreateWebhookParams, CustomerListResponse, CustomerResponse, DeliverOrderParams, DeliverableInputParams, DeliverableResponse, FaqItemInput, FileResponse, ListCustomersParams, ListListingsParams, ListOrdersParams, ListWebhookEventsParams, ListingListResponse, ListingReadiness, ListingResponse, OrderListResponse, OrderResponse, ReviewInput, SetDeliverablesParams, ShipOrderParams, ShippingAddressResponse, StripeConnectSessionResponse, UpdateAccountParams, UpdateListingParams, UpdateWebhookParams, VerifyOtpParams, VerifyOtpResponse, WebhookEventListResponse, WebhookEventResponse, WebhookListResponse, WebhookReadiness, WebhookResponse, WebhookTestResponse, } from './generated/types';
|
|
20
|
-
export type { ListResponse } from './types/shared';
|
|
4
|
+
export { ListBee } from './client.js';
|
|
5
|
+
export type { ClientOptions } from './client.js';
|
|
6
|
+
export { CursorPage } from './base-client.js';
|
|
7
|
+
export type { RequestOptions } from './base-client.js';
|
|
8
|
+
export { APIConnectionError, APIStatusError, APITimeoutError, AuthenticationError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, ListBeeError, NotFoundError, PayloadTooLargeError, RateLimitError, ValidationError, WebhookVerificationError, } from './errors.js';
|
|
9
|
+
export { AccountResource } from './resources/account.js';
|
|
10
|
+
export { ApiKeysResource } from './resources/api-keys.js';
|
|
11
|
+
export { CustomersResource } from './resources/customers.js';
|
|
12
|
+
export { FilesResource } from './resources/files.js';
|
|
13
|
+
export { ListingsResource } from './resources/listings.js';
|
|
14
|
+
export { OrdersResource } from './resources/orders.js';
|
|
15
|
+
export { SignupResource } from './resources/signup.js';
|
|
16
|
+
export { StripeResource } from './resources/stripe.js';
|
|
17
|
+
export { WebhooksResource } from './resources/webhooks.js';
|
|
18
|
+
export { ActionCode, ActionKind, BlurMode, CheckoutFieldType, DeliverableStatus, DeliverableType, ErrorCode, FulfillmentMode, ListingStatus, OrderStatus, WebhookEventType, } from './generated/enums.js';
|
|
19
|
+
export type { AccountReadiness, AccountResponse, AccountStats, Action, ActionResolve, ApiKeyListResponse, ApiKeyResponse, CheckoutFieldInput, CreateAccountParams, CreateAccountResponse, CreateApiKeyParams, CreateListingParams, CreateWebhookParams, CustomerListResponse, CustomerResponse, DeliverOrderParams, DeliverableInputParams, DeliverableResponse, FaqItemInput, FileResponse, ListCustomersParams, ListListingsParams, ListOrdersParams, ListWebhookEventsParams, ListingListResponse, ListingReadiness, ListingResponse, OrderListResponse, OrderResponse, ReviewInput, SetDeliverablesParams, ShipOrderParams, ShippingAddressResponse, StripeConnectSessionResponse, UpdateAccountParams, UpdateListingParams, UpdateWebhookParams, VerifyOtpParams, VerifyOtpResponse, WebhookEventListResponse, WebhookEventResponse, WebhookListResponse, WebhookReadiness, WebhookResponse, WebhookTestResponse, } from './generated/types.js';
|
|
20
|
+
export type { ListResponse } from './types/shared.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
* ListBee TypeScript SDK — public exports.
|
|
3
3
|
*/
|
|
4
4
|
// Client
|
|
5
|
-
export { ListBee } from './client';
|
|
6
|
-
export { CursorPage } from './base-client';
|
|
5
|
+
export { ListBee } from './client.js';
|
|
6
|
+
export { CursorPage } from './base-client.js';
|
|
7
7
|
// Errors
|
|
8
|
-
export { APIConnectionError, APIStatusError, APITimeoutError, AuthenticationError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, ListBeeError, NotFoundError, PayloadTooLargeError, RateLimitError, ValidationError, WebhookVerificationError, } from './errors';
|
|
8
|
+
export { APIConnectionError, APIStatusError, APITimeoutError, AuthenticationError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, ListBeeError, NotFoundError, PayloadTooLargeError, RateLimitError, ValidationError, WebhookVerificationError, } from './errors.js';
|
|
9
9
|
// Resources
|
|
10
|
-
export { AccountResource } from './resources/account';
|
|
11
|
-
export { ApiKeysResource } from './resources/api-keys';
|
|
12
|
-
export { CustomersResource } from './resources/customers';
|
|
13
|
-
export { FilesResource } from './resources/files';
|
|
14
|
-
export { ListingsResource } from './resources/listings';
|
|
15
|
-
export { OrdersResource } from './resources/orders';
|
|
16
|
-
export { SignupResource } from './resources/signup';
|
|
17
|
-
export { StripeResource } from './resources/stripe';
|
|
18
|
-
export { WebhooksResource } from './resources/webhooks';
|
|
10
|
+
export { AccountResource } from './resources/account.js';
|
|
11
|
+
export { ApiKeysResource } from './resources/api-keys.js';
|
|
12
|
+
export { CustomersResource } from './resources/customers.js';
|
|
13
|
+
export { FilesResource } from './resources/files.js';
|
|
14
|
+
export { ListingsResource } from './resources/listings.js';
|
|
15
|
+
export { OrdersResource } from './resources/orders.js';
|
|
16
|
+
export { SignupResource } from './resources/signup.js';
|
|
17
|
+
export { StripeResource } from './resources/stripe.js';
|
|
18
|
+
export { WebhooksResource } from './resources/webhooks.js';
|
|
19
19
|
// Enums (runtime values)
|
|
20
|
-
export { ActionCode, ActionKind, BlurMode, CheckoutFieldType, DeliverableStatus, DeliverableType, ErrorCode, FulfillmentMode, ListingStatus, OrderStatus, WebhookEventType, } from './generated/enums';
|
|
20
|
+
export { ActionCode, ActionKind, BlurMode, CheckoutFieldType, DeliverableStatus, DeliverableType, ErrorCode, FulfillmentMode, ListingStatus, OrderStatus, WebhookEventType, } from './generated/enums.js';
|
|
21
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Account resource — GET, PUT, DELETE /v1/account.
|
|
3
3
|
*/
|
|
4
|
-
import type { BaseClient } from '../base-client';
|
|
5
|
-
import type { AccountResponse, UpdateAccountParams } from '../generated/types';
|
|
6
|
-
import type { RequestOptions } from '../types/shared';
|
|
4
|
+
import type { BaseClient } from '../base-client.js';
|
|
5
|
+
import type { AccountResponse, UpdateAccountParams } from '../generated/types.js';
|
|
6
|
+
import type { RequestOptions } from '../types/shared.js';
|
|
7
7
|
/** Resource for the /v1/account endpoint. */
|
|
8
8
|
export declare class AccountResource {
|
|
9
9
|
private readonly _client;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API Keys resource — GET, POST, DELETE /v1/api-keys.
|
|
3
3
|
*/
|
|
4
|
-
import type { BaseClient } from '../base-client';
|
|
5
|
-
import type { ApiKeyResponse, CreateApiKeyParams } from '../generated/types';
|
|
4
|
+
import type { BaseClient } from '../base-client.js';
|
|
5
|
+
import type { ApiKeyResponse, CreateApiKeyParams } from '../generated/types.js';
|
|
6
6
|
export declare class ApiKeysResource {
|
|
7
7
|
private readonly _client;
|
|
8
8
|
constructor(_client: BaseClient);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Customers resource — GET /v1/customers, GET /v1/customers/{customer_id}.
|
|
3
3
|
*/
|
|
4
|
-
import type { BaseClient, CursorPage } from '../base-client';
|
|
5
|
-
import type { CustomerResponse, ListCustomersParams } from '../generated/types';
|
|
4
|
+
import type { BaseClient, CursorPage } from '../base-client.js';
|
|
5
|
+
import type { CustomerResponse, ListCustomersParams } from '../generated/types.js';
|
|
6
6
|
export declare class CustomersResource {
|
|
7
7
|
private readonly _client;
|
|
8
8
|
constructor(_client: BaseClient);
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/// <reference types="node" />
|
|
5
5
|
/// <reference types="node" />
|
|
6
|
-
import type { BaseClient } from '../base-client';
|
|
7
|
-
import type { FileResponse } from '../generated/types';
|
|
8
|
-
import type { RequestOptions } from '../types/shared';
|
|
6
|
+
import type { BaseClient } from '../base-client.js';
|
|
7
|
+
import type { FileResponse } from '../generated/types.js';
|
|
8
|
+
import type { RequestOptions } from '../types/shared.js';
|
|
9
9
|
export declare class FilesResource {
|
|
10
10
|
private readonly _client;
|
|
11
11
|
constructor(_client: BaseClient);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { AccountResource } from './account';
|
|
2
|
-
export { ApiKeysResource } from './api-keys';
|
|
3
|
-
export { CustomersResource } from './customers';
|
|
4
|
-
export { FilesResource } from './files';
|
|
5
|
-
export { ListingsResource } from './listings';
|
|
6
|
-
export { OrdersResource } from './orders';
|
|
7
|
-
export { SignupResource } from './signup';
|
|
8
|
-
export { StripeResource } from './stripe';
|
|
9
|
-
export { WebhooksResource } from './webhooks';
|
|
1
|
+
export { AccountResource } from './account.js';
|
|
2
|
+
export { ApiKeysResource } from './api-keys.js';
|
|
3
|
+
export { CustomersResource } from './customers.js';
|
|
4
|
+
export { FilesResource } from './files.js';
|
|
5
|
+
export { ListingsResource } from './listings.js';
|
|
6
|
+
export { OrdersResource } from './orders.js';
|
|
7
|
+
export { SignupResource } from './signup.js';
|
|
8
|
+
export { StripeResource } from './stripe.js';
|
|
9
|
+
export { WebhooksResource } from './webhooks.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { AccountResource } from './account';
|
|
2
|
-
export { ApiKeysResource } from './api-keys';
|
|
3
|
-
export { CustomersResource } from './customers';
|
|
4
|
-
export { FilesResource } from './files';
|
|
5
|
-
export { ListingsResource } from './listings';
|
|
6
|
-
export { OrdersResource } from './orders';
|
|
7
|
-
export { SignupResource } from './signup';
|
|
8
|
-
export { StripeResource } from './stripe';
|
|
9
|
-
export { WebhooksResource } from './webhooks';
|
|
1
|
+
export { AccountResource } from './account.js';
|
|
2
|
+
export { ApiKeysResource } from './api-keys.js';
|
|
3
|
+
export { CustomersResource } from './customers.js';
|
|
4
|
+
export { FilesResource } from './files.js';
|
|
5
|
+
export { ListingsResource } from './listings.js';
|
|
6
|
+
export { OrdersResource } from './orders.js';
|
|
7
|
+
export { SignupResource } from './signup.js';
|
|
8
|
+
export { StripeResource } from './stripe.js';
|
|
9
|
+
export { WebhooksResource } from './webhooks.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Listings resource — CRUD + publish + deliverables for /v1/listings.
|
|
3
3
|
*/
|
|
4
|
-
import type { BaseClient, CursorPage } from '../base-client';
|
|
5
|
-
import type { CreateListingParams, ListingResponse, UpdateListingParams, ListListingsParams, SetDeliverablesParams } from '../generated/types';
|
|
6
|
-
import type { RequestOptions } from '../types/shared';
|
|
4
|
+
import type { BaseClient, CursorPage } from '../base-client.js';
|
|
5
|
+
import type { CreateListingParams, ListingResponse, UpdateListingParams, ListListingsParams, SetDeliverablesParams } from '../generated/types.js';
|
|
6
|
+
import type { RequestOptions } from '../types/shared.js';
|
|
7
7
|
/** Resource for the /v1/listings endpoint. */
|
|
8
8
|
export declare class ListingsResource {
|
|
9
9
|
private readonly _client;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Listings resource — CRUD + publish + deliverables for /v1/listings.
|
|
3
3
|
*/
|
|
4
|
-
import { LISTING_CREATE_TIMEOUT_MS } from '../constants';
|
|
4
|
+
import { LISTING_CREATE_TIMEOUT_MS } from '../constants.js';
|
|
5
5
|
/** Resource for the /v1/listings endpoint. */
|
|
6
6
|
export class ListingsResource {
|
|
7
7
|
constructor(_client) {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* POST /v1/orders/{id}/deliver, POST /v1/orders/{id}/ship,
|
|
4
4
|
* POST /v1/orders/{id}/refund.
|
|
5
5
|
*/
|
|
6
|
-
import type { BaseClient, CursorPage } from '../base-client';
|
|
7
|
-
import type { OrderResponse, ListOrdersParams, DeliverOrderParams, ShipOrderParams } from '../generated/types';
|
|
8
|
-
import type { RequestOptions } from '../types/shared';
|
|
6
|
+
import type { BaseClient, CursorPage } from '../base-client.js';
|
|
7
|
+
import type { OrderResponse, ListOrdersParams, DeliverOrderParams, ShipOrderParams } from '../generated/types.js';
|
|
8
|
+
import type { RequestOptions } from '../types/shared.js';
|
|
9
9
|
export declare class OrdersResource {
|
|
10
10
|
private readonly _client;
|
|
11
11
|
constructor(_client: BaseClient);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Signup resource — POST /v1/account (create), POST /v1/account/verify/otp.
|
|
3
3
|
* Both endpoints are unauthenticated.
|
|
4
4
|
*/
|
|
5
|
-
import type { BaseClient } from '../base-client';
|
|
6
|
-
import type { CreateAccountParams, CreateAccountResponse, VerifyOtpParams, VerifyOtpResponse } from '../generated/types';
|
|
5
|
+
import type { BaseClient } from '../base-client.js';
|
|
6
|
+
import type { CreateAccountParams, CreateAccountResponse, VerifyOtpParams, VerifyOtpResponse } from '../generated/types.js';
|
|
7
7
|
export declare class SignupResource {
|
|
8
8
|
private readonly _client;
|
|
9
9
|
constructor(_client: BaseClient);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Stripe resource — POST /v1/account/stripe/connect, DELETE /v1/account/stripe.
|
|
3
3
|
*/
|
|
4
|
-
import type { BaseClient } from '../base-client';
|
|
5
|
-
import type { AccountResponse, StripeConnectSessionResponse } from '../generated/types';
|
|
4
|
+
import type { BaseClient } from '../base-client.js';
|
|
5
|
+
import type { AccountResponse, StripeConnectSessionResponse } from '../generated/types.js';
|
|
6
6
|
export declare class StripeResource {
|
|
7
7
|
private readonly _client;
|
|
8
8
|
constructor(_client: BaseClient);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Webhooks resource — CRUD + events + test + verify for /v1/webhooks.
|
|
3
3
|
*/
|
|
4
|
-
import type { BaseClient, CursorPage } from '../base-client';
|
|
5
|
-
import type { WebhookResponse, CreateWebhookParams, UpdateWebhookParams, WebhookEventResponse, ListWebhookEventsParams, WebhookTestResponse } from '../generated/types';
|
|
6
|
-
import type { RequestOptions } from '../types/shared';
|
|
4
|
+
import type { BaseClient, CursorPage } from '../base-client.js';
|
|
5
|
+
import type { WebhookResponse, CreateWebhookParams, UpdateWebhookParams, WebhookEventResponse, ListWebhookEventsParams, WebhookTestResponse } from '../generated/types.js';
|
|
6
|
+
import type { RequestOptions } from '../types/shared.js';
|
|
7
7
|
export declare class WebhooksResource {
|
|
8
8
|
private readonly _client;
|
|
9
9
|
constructor(_client: BaseClient);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Webhooks resource — CRUD + events + test + verify for /v1/webhooks.
|
|
3
3
|
*/
|
|
4
|
-
import { WebhookVerificationError } from '../errors';
|
|
4
|
+
import { WebhookVerificationError } from '../errors.js';
|
|
5
5
|
export class WebhooksResource {
|
|
6
6
|
constructor(_client) {
|
|
7
7
|
this._client = _client;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ClientOptions, RequestOptions, ListResponse } from './shared';
|
|
2
|
-
export { CursorPage } from './shared';
|
|
3
|
-
export type * from '../generated/types';
|
|
4
|
-
export * from '../generated/enums';
|
|
1
|
+
export type { ClientOptions, RequestOptions, ListResponse } from './shared.js';
|
|
2
|
+
export { CursorPage } from './shared.js';
|
|
3
|
+
export type * from '../generated/types.js';
|
|
4
|
+
export * from '../generated/enums.js';
|
package/dist/esm/types/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CursorPage } from './shared';
|
|
2
|
-
export * from '../generated/enums';
|
|
1
|
+
export { CursorPage } from './shared.js';
|
|
2
|
+
export * from '../generated/enums.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "listbee",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Official TypeScript SDK for the ListBee API — one API call to sell and deliver digital content.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://listbee.so",
|
|
@@ -17,8 +17,14 @@
|
|
|
17
17
|
"types": "dist/cjs/index.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
|
-
"import": {
|
|
21
|
-
|
|
20
|
+
"import": {
|
|
21
|
+
"types": "./dist/esm/index.d.ts",
|
|
22
|
+
"default": "./dist/esm/index.js"
|
|
23
|
+
},
|
|
24
|
+
"require": {
|
|
25
|
+
"types": "./dist/cjs/index.d.ts",
|
|
26
|
+
"default": "./dist/cjs/index.js"
|
|
27
|
+
}
|
|
22
28
|
}
|
|
23
29
|
},
|
|
24
30
|
"files": [
|
|
@@ -27,7 +33,7 @@
|
|
|
27
33
|
"scripts": {
|
|
28
34
|
"build": "npm run build:cjs && npm run build:esm",
|
|
29
35
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
30
|
-
"build:esm": "tsc -p tsconfig.esm.json",
|
|
36
|
+
"build:esm": "tsc -p tsconfig.esm.json && node scripts/fix-esm-imports.js",
|
|
31
37
|
"test": "vitest run",
|
|
32
38
|
"test:watch": "vitest",
|
|
33
39
|
"lint": "eslint src tests",
|
|
@@ -38,6 +44,9 @@
|
|
|
38
44
|
"listbee",
|
|
39
45
|
"commerce",
|
|
40
46
|
"digital-products",
|
|
47
|
+
"payments",
|
|
48
|
+
"checkout",
|
|
49
|
+
"sell",
|
|
41
50
|
"api",
|
|
42
51
|
"sdk"
|
|
43
52
|
],
|