listbee 0.5.0 → 0.6.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 (175) hide show
  1. package/README.md +187 -381
  2. package/dist/cjs/base-client.d.ts +9 -29
  3. package/dist/cjs/base-client.js +58 -14
  4. package/dist/cjs/base-client.js.map +1 -1
  5. package/dist/cjs/client.d.ts +17 -13
  6. package/dist/cjs/client.js +14 -11
  7. package/dist/cjs/client.js.map +1 -1
  8. package/dist/cjs/errors.d.ts +12 -0
  9. package/dist/cjs/errors.js +31 -1
  10. package/dist/cjs/errors.js.map +1 -1
  11. package/dist/cjs/generated/api-types.d.ts +4089 -0
  12. package/dist/cjs/generated/api-types.js +7 -0
  13. package/dist/cjs/generated/api-types.js.map +1 -0
  14. package/dist/cjs/generated/enums.d.ts +94 -0
  15. package/dist/cjs/generated/enums.js +87 -0
  16. package/dist/cjs/generated/enums.js.map +1 -0
  17. package/dist/cjs/generated/operations.d.ts +233 -0
  18. package/dist/cjs/generated/operations.js +39 -0
  19. package/dist/cjs/generated/operations.js.map +1 -0
  20. package/dist/cjs/generated/types.d.ts +68 -0
  21. package/dist/cjs/{types/order.js → generated/types.js} +1 -4
  22. package/dist/cjs/generated/types.js.map +1 -0
  23. package/dist/cjs/index.d.ts +7 -13
  24. package/dist/cjs/index.js +22 -14
  25. package/dist/cjs/index.js.map +1 -1
  26. package/dist/cjs/resources/account.d.ts +11 -6
  27. package/dist/cjs/resources/account.js +19 -8
  28. package/dist/cjs/resources/account.js.map +1 -1
  29. package/dist/cjs/resources/api-keys.d.ts +18 -4
  30. package/dist/cjs/resources/api-keys.js +17 -1
  31. package/dist/cjs/resources/api-keys.js.map +1 -1
  32. package/dist/cjs/resources/customers.d.ts +23 -0
  33. package/dist/cjs/resources/customers.js +44 -0
  34. package/dist/cjs/resources/customers.js.map +1 -0
  35. package/dist/cjs/resources/files.d.ts +27 -0
  36. package/dist/cjs/resources/files.js +37 -0
  37. package/dist/cjs/resources/files.js.map +1 -0
  38. package/dist/cjs/resources/index.d.ts +3 -1
  39. package/dist/cjs/resources/index.js +7 -3
  40. package/dist/cjs/resources/index.js.map +1 -1
  41. package/dist/cjs/resources/listings.d.ts +35 -35
  42. package/dist/cjs/resources/listings.js +51 -116
  43. package/dist/cjs/resources/listings.js.map +1 -1
  44. package/dist/cjs/resources/orders.d.ts +28 -16
  45. package/dist/cjs/resources/orders.js +43 -36
  46. package/dist/cjs/resources/orders.js.map +1 -1
  47. package/dist/cjs/resources/signup.d.ts +21 -9
  48. package/dist/cjs/resources/signup.js +20 -3
  49. package/dist/cjs/resources/signup.js.map +1 -1
  50. package/dist/cjs/resources/stripe.d.ts +18 -6
  51. package/dist/cjs/resources/stripe.js +18 -7
  52. package/dist/cjs/resources/stripe.js.map +1 -1
  53. package/dist/cjs/resources/webhooks.d.ts +59 -3
  54. package/dist/cjs/resources/webhooks.js +102 -21
  55. package/dist/cjs/resources/webhooks.js.map +1 -1
  56. package/dist/cjs/types/index.d.ts +4 -10
  57. package/dist/cjs/types/index.js +17 -9
  58. package/dist/cjs/types/index.js.map +1 -1
  59. package/dist/cjs/types/shared.d.ts +25 -147
  60. package/dist/cjs/types/shared.js +12 -60
  61. package/dist/cjs/types/shared.js.map +1 -1
  62. package/dist/esm/base-client.d.ts +9 -29
  63. package/dist/esm/base-client.js +58 -14
  64. package/dist/esm/base-client.js.map +1 -1
  65. package/dist/esm/client.d.ts +24 -20
  66. package/dist/esm/client.js +21 -18
  67. package/dist/esm/client.js.map +1 -1
  68. package/dist/esm/errors.d.ts +12 -0
  69. package/dist/esm/errors.js +27 -0
  70. package/dist/esm/errors.js.map +1 -1
  71. package/dist/esm/generated/api-types.d.ts +4089 -0
  72. package/dist/esm/generated/api-types.js +6 -0
  73. package/dist/esm/generated/api-types.js.map +1 -0
  74. package/dist/esm/generated/enums.d.ts +94 -0
  75. package/dist/esm/generated/enums.js +84 -0
  76. package/dist/esm/generated/enums.js.map +1 -0
  77. package/dist/esm/generated/operations.d.ts +233 -0
  78. package/dist/esm/generated/operations.js +36 -0
  79. package/dist/esm/generated/operations.js.map +1 -0
  80. package/dist/esm/generated/types.d.ts +68 -0
  81. package/dist/esm/generated/types.js +2 -0
  82. package/dist/esm/generated/types.js.map +1 -0
  83. package/dist/esm/index.d.ts +17 -23
  84. package/dist/esm/index.js +13 -12
  85. package/dist/esm/index.js.map +1 -1
  86. package/dist/esm/resources/account.d.ts +12 -7
  87. package/dist/esm/resources/account.js +19 -8
  88. package/dist/esm/resources/account.js.map +1 -1
  89. package/dist/esm/resources/api-keys.d.ts +19 -5
  90. package/dist/esm/resources/api-keys.js +17 -1
  91. package/dist/esm/resources/api-keys.js.map +1 -1
  92. package/dist/esm/resources/customers.d.ts +23 -0
  93. package/dist/esm/resources/customers.js +39 -0
  94. package/dist/esm/resources/customers.js.map +1 -0
  95. package/dist/esm/resources/files.d.ts +27 -0
  96. package/dist/esm/resources/files.js +33 -0
  97. package/dist/esm/resources/files.js.map +1 -0
  98. package/dist/esm/resources/index.d.ts +9 -7
  99. package/dist/esm/resources/index.js +9 -7
  100. package/dist/esm/resources/index.js.map +1 -1
  101. package/dist/esm/resources/listings.d.ts +36 -36
  102. package/dist/esm/resources/listings.js +51 -117
  103. package/dist/esm/resources/listings.js.map +1 -1
  104. package/dist/esm/resources/orders.d.ts +29 -17
  105. package/dist/esm/resources/orders.js +43 -36
  106. package/dist/esm/resources/orders.js.map +1 -1
  107. package/dist/esm/resources/signup.d.ts +22 -10
  108. package/dist/esm/resources/signup.js +20 -3
  109. package/dist/esm/resources/signup.js.map +1 -1
  110. package/dist/esm/resources/stripe.d.ts +19 -7
  111. package/dist/esm/resources/stripe.js +18 -7
  112. package/dist/esm/resources/stripe.js.map +1 -1
  113. package/dist/esm/resources/webhooks.d.ts +60 -4
  114. package/dist/esm/resources/webhooks.js +101 -21
  115. package/dist/esm/resources/webhooks.js.map +1 -1
  116. package/dist/esm/types/index.d.ts +4 -10
  117. package/dist/esm/types/index.js +2 -1
  118. package/dist/esm/types/index.js.map +1 -1
  119. package/dist/esm/types/shared.d.ts +25 -147
  120. package/dist/esm/types/shared.js +10 -59
  121. package/dist/esm/types/shared.js.map +1 -1
  122. package/package.json +5 -83
  123. package/dist/cjs/resources/stores.d.ts +0 -31
  124. package/dist/cjs/resources/stores.js +0 -67
  125. package/dist/cjs/resources/stores.js.map +0 -1
  126. package/dist/cjs/types/account.d.ts +0 -47
  127. package/dist/cjs/types/account.js +0 -6
  128. package/dist/cjs/types/account.js.map +0 -1
  129. package/dist/cjs/types/api-key.d.ts +0 -18
  130. package/dist/cjs/types/api-key.js +0 -6
  131. package/dist/cjs/types/api-key.js.map +0 -1
  132. package/dist/cjs/types/listing.d.ts +0 -187
  133. package/dist/cjs/types/listing.js +0 -6
  134. package/dist/cjs/types/listing.js.map +0 -1
  135. package/dist/cjs/types/order.d.ts +0 -75
  136. package/dist/cjs/types/order.js.map +0 -1
  137. package/dist/cjs/types/signup.d.ts +0 -24
  138. package/dist/cjs/types/signup.js +0 -6
  139. package/dist/cjs/types/signup.js.map +0 -1
  140. package/dist/cjs/types/store.d.ts +0 -70
  141. package/dist/cjs/types/store.js +0 -6
  142. package/dist/cjs/types/store.js.map +0 -1
  143. package/dist/cjs/types/stripe.d.ts +0 -12
  144. package/dist/cjs/types/stripe.js +0 -6
  145. package/dist/cjs/types/stripe.js.map +0 -1
  146. package/dist/cjs/types/webhook.d.ts +0 -88
  147. package/dist/cjs/types/webhook.js +0 -6
  148. package/dist/cjs/types/webhook.js.map +0 -1
  149. package/dist/esm/resources/stores.d.ts +0 -31
  150. package/dist/esm/resources/stores.js +0 -63
  151. package/dist/esm/resources/stores.js.map +0 -1
  152. package/dist/esm/types/account.d.ts +0 -47
  153. package/dist/esm/types/account.js +0 -5
  154. package/dist/esm/types/account.js.map +0 -1
  155. package/dist/esm/types/api-key.d.ts +0 -18
  156. package/dist/esm/types/api-key.js +0 -5
  157. package/dist/esm/types/api-key.js.map +0 -1
  158. package/dist/esm/types/listing.d.ts +0 -187
  159. package/dist/esm/types/listing.js +0 -5
  160. package/dist/esm/types/listing.js.map +0 -1
  161. package/dist/esm/types/order.d.ts +0 -75
  162. package/dist/esm/types/order.js +0 -5
  163. package/dist/esm/types/order.js.map +0 -1
  164. package/dist/esm/types/signup.d.ts +0 -24
  165. package/dist/esm/types/signup.js +0 -5
  166. package/dist/esm/types/signup.js.map +0 -1
  167. package/dist/esm/types/store.d.ts +0 -70
  168. package/dist/esm/types/store.js +0 -5
  169. package/dist/esm/types/store.js.map +0 -1
  170. package/dist/esm/types/stripe.d.ts +0 -12
  171. package/dist/esm/types/stripe.js +0 -5
  172. package/dist/esm/types/stripe.js.map +0 -1
  173. package/dist/esm/types/webhook.d.ts +0 -88
  174. package/dist/esm/types/webhook.js +0 -5
  175. package/dist/esm/types/webhook.js.map +0 -1
@@ -1,5 +0,0 @@
1
- /**
2
- * Order response types.
3
- */
4
- export {};
5
- //# sourceMappingURL=order.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"order.js","sourceRoot":"","sources":["../../../src/types/order.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1,24 +0,0 @@
1
- /**
2
- * Signup response types.
3
- */
4
- import type { AccountResponse } from './account';
5
- /** Response from the signup create endpoint. */
6
- export interface SignupResponse {
7
- /** Object type discriminator. Always "signup_session". */
8
- object: 'signup_session';
9
- /** Email the OTP was sent to. */
10
- email: string;
11
- /** Always "otp_sent". */
12
- status: 'otp_sent';
13
- /** Human-readable message. */
14
- message: string;
15
- }
16
- /** Response from the signup verify endpoint. */
17
- export interface VerifyResponse {
18
- /** Object type discriminator. Always "signup_result". */
19
- object: 'signup_result';
20
- /** The newly created account. */
21
- account: AccountResponse;
22
- /** Raw API key value — store this, it's only shown once. */
23
- api_key: string;
24
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Signup response types.
3
- */
4
- export {};
5
- //# sourceMappingURL=signup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signup.js","sourceRoot":"","sources":["../../../src/types/signup.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1,70 +0,0 @@
1
- /**
2
- * Store and domain response types.
3
- */
4
- /** Domain verification status. */
5
- export type DomainStatus = 'pending' | 'verified' | 'stale';
6
- /** Store object returned by the ListBee API. */
7
- export interface StoreResponse {
8
- /** Object type discriminator. Always "store". */
9
- object: 'store';
10
- /** Unique store identifier. */
11
- id: string;
12
- /** URL-safe handle used in platform URLs. */
13
- handle: string;
14
- /** Store display name. Falls back to @handle if not set. */
15
- name: string | null;
16
- /** Resolved display name: name if set, otherwise @handle. */
17
- display_name: string;
18
- /** Short store bio. */
19
- bio: string | null;
20
- /** Social media URLs. */
21
- social_links: string[];
22
- /** True when the store has a payment provider configured. */
23
- payment_connected: boolean;
24
- /** Payment provider name or null if not configured. */
25
- payment_provider: string | null;
26
- /** Default currency code (ISO 4217, lowercase). Null until payment configured. */
27
- currency: string | null;
28
- /** Custom domain configured on this store. Null if not set. */
29
- domain: string | null;
30
- /** Domain verification status. Null if no domain configured. */
31
- domain_status: DomainStatus | null;
32
- /** Number of listings in this store. */
33
- listing_count: number;
34
- /** ISO 8601 timestamp of when the store was created. */
35
- created_at: string;
36
- }
37
- /** Non-paginated list of stores. */
38
- export interface StoreListResponse {
39
- object: 'list';
40
- data: StoreResponse[];
41
- }
42
- /** Custom domain object returned by the ListBee API. */
43
- export interface DomainResponse {
44
- /** Object type discriminator. Always "domain". */
45
- object: 'domain';
46
- /** The custom domain. */
47
- domain: string;
48
- /** Verification status: pending, verified, or stale. */
49
- status: DomainStatus;
50
- /** The CNAME target the domain must point to. */
51
- cname_target: string;
52
- /** Timestamp when domain was verified. Null if not yet verified. */
53
- verified_at: string | null;
54
- }
55
- /** Parameters for creating a store. */
56
- export interface CreateStoreParams {
57
- /** URL-safe handle, unique globally. */
58
- handle: string;
59
- /** Optional display name. */
60
- name?: string;
61
- }
62
- /** Parameters for updating a store. */
63
- export interface UpdateStoreParams {
64
- /** Store display name. */
65
- name?: string;
66
- /** Short store bio. */
67
- bio?: string;
68
- /** Social media URLs (HTTPS only, max 5). */
69
- social_links?: string[];
70
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Store and domain response types.
3
- */
4
- export {};
5
- //# sourceMappingURL=store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/types/store.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Stripe resource response types.
3
- */
4
- /** Response from the Stripe Connect session endpoint. */
5
- export interface StripeConnectSessionResponse {
6
- /** Object type discriminator. Always "stripe_connect_session". */
7
- object: 'stripe_connect_session';
8
- /** Stripe Connect onboarding URL — redirect the user here. */
9
- url: string;
10
- /** ISO 8601 timestamp when this session expires. */
11
- expires_at: string;
12
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Stripe resource response types.
3
- */
4
- export {};
5
- //# sourceMappingURL=stripe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stripe.js","sourceRoot":"","sources":["../../../src/types/stripe.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1,88 +0,0 @@
1
- /**
2
- * Webhook response types.
3
- */
4
- import type { WebhookEventType } from './shared';
5
- /** Full webhook object returned by the ListBee API. */
6
- export interface WebhookResponse {
7
- /** Object type discriminator. Always "webhook". */
8
- object: 'webhook';
9
- /** Unique webhook identifier. */
10
- id: string;
11
- /** Display name. */
12
- name: string;
13
- /** HTTPS endpoint URL. */
14
- url: string;
15
- /** HMAC signing secret for verifying payloads. */
16
- secret: string;
17
- /** Event types to subscribe to. Empty array = all events. */
18
- events: WebhookEventType[];
19
- /** Whether this webhook is currently active. */
20
- enabled: boolean;
21
- /** ISO 8601 timestamp of when the webhook was created. */
22
- created_at: string;
23
- }
24
- /** Parameters for creating a webhook. */
25
- export interface CreateWebhookParams {
26
- /** Display name. */
27
- name: string;
28
- /** HTTPS endpoint URL. */
29
- url: string;
30
- /** Event types to subscribe to. Omit or empty = all events. */
31
- events?: WebhookEventType[];
32
- }
33
- /** Parameters for updating a webhook. All fields optional. */
34
- export interface UpdateWebhookParams {
35
- /** Display name. */
36
- name?: string;
37
- /** HTTPS endpoint URL. */
38
- url?: string;
39
- /** Event types to subscribe to. */
40
- events?: WebhookEventType[];
41
- /** Whether this webhook is active. */
42
- enabled?: boolean;
43
- }
44
- /** A single webhook delivery event. */
45
- export interface WebhookEventResponse {
46
- /** Object type discriminator. Always "webhook_event". */
47
- object: 'webhook_event';
48
- /** Unique event identifier. */
49
- id: string;
50
- /** The event type that triggered this delivery. */
51
- event_type: WebhookEventType;
52
- /** Delivery status. */
53
- status: 'pending' | 'delivered' | 'failed';
54
- /** Number of delivery attempts so far. */
55
- attempts: number;
56
- /** Maximum delivery attempts before marking as failed. */
57
- max_retries: number;
58
- /** HTTP status code from the last delivery attempt. */
59
- response_status: number | null;
60
- /** Error message from the last failed delivery attempt. */
61
- last_error: string | null;
62
- /** ISO 8601 timestamp of when the event was created. */
63
- created_at: string;
64
- /** ISO 8601 timestamp of successful delivery. */
65
- delivered_at: string | null;
66
- }
67
- /** Parameters for listing webhook events. */
68
- export interface ListWebhookEventsParams {
69
- /** Filter by delivery status. */
70
- status?: 'pending' | 'delivered' | 'failed';
71
- /** Maximum items per page (default 20). */
72
- limit?: number;
73
- /** Pagination cursor from a previous response. */
74
- cursor?: string;
75
- }
76
- /** Response from the webhook test endpoint. */
77
- export interface WebhookTestResponse {
78
- /** Object type discriminator. Always "webhook_test". */
79
- object: 'webhook_test';
80
- /** Whether the test delivery succeeded (endpoint returned 2xx). */
81
- success: boolean;
82
- /** HTTP status code from the endpoint. */
83
- status_code: number | null;
84
- /** Response body from the endpoint (truncated to 2000 chars). */
85
- response_body: string | null;
86
- /** Error message if delivery failed. */
87
- error: string | null;
88
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Webhook response types.
3
- */
4
- export {};
5
- //# sourceMappingURL=webhook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../src/types/webhook.ts"],"names":[],"mappings":"AAAA;;GAEG"}