listbee 0.3.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.
Files changed (146) hide show
  1. package/README.md +552 -0
  2. package/dist/cjs/base-client.d.ts +65 -0
  3. package/dist/cjs/base-client.js +167 -0
  4. package/dist/cjs/base-client.js.map +1 -0
  5. package/dist/cjs/client.d.ts +58 -0
  6. package/dist/cjs/client.js +54 -0
  7. package/dist/cjs/client.js.map +1 -0
  8. package/dist/cjs/constants.d.ts +17 -0
  9. package/dist/cjs/constants.js +21 -0
  10. package/dist/cjs/constants.js.map +1 -0
  11. package/dist/cjs/errors.d.ts +89 -0
  12. package/dist/cjs/errors.js +141 -0
  13. package/dist/cjs/errors.js.map +1 -0
  14. package/dist/cjs/index.d.ts +26 -0
  15. package/dist/cjs/index.js +49 -0
  16. package/dist/cjs/index.js.map +1 -0
  17. package/dist/cjs/resources/account.d.ts +25 -0
  18. package/dist/cjs/resources/account.js +39 -0
  19. package/dist/cjs/resources/account.js.map +1 -0
  20. package/dist/cjs/resources/api-keys.d.ts +14 -0
  21. package/dist/cjs/resources/api-keys.js +26 -0
  22. package/dist/cjs/resources/api-keys.js.map +1 -0
  23. package/dist/cjs/resources/index.d.ts +7 -0
  24. package/dist/cjs/resources/index.js +18 -0
  25. package/dist/cjs/resources/index.js.map +1 -0
  26. package/dist/cjs/resources/listings.d.ts +70 -0
  27. package/dist/cjs/resources/listings.js +161 -0
  28. package/dist/cjs/resources/listings.js.map +1 -0
  29. package/dist/cjs/resources/orders.d.ts +11 -0
  30. package/dist/cjs/resources/orders.js +36 -0
  31. package/dist/cjs/resources/orders.js.map +1 -0
  32. package/dist/cjs/resources/signup.d.ts +16 -0
  33. package/dist/cjs/resources/signup.js +21 -0
  34. package/dist/cjs/resources/signup.js.map +1 -0
  35. package/dist/cjs/resources/stores.d.ts +31 -0
  36. package/dist/cjs/resources/stores.js +67 -0
  37. package/dist/cjs/resources/stores.js.map +1 -0
  38. package/dist/cjs/resources/stripe.d.ts +15 -0
  39. package/dist/cjs/resources/stripe.js +25 -0
  40. package/dist/cjs/resources/stripe.js.map +1 -0
  41. package/dist/cjs/resources/webhooks.d.ts +15 -0
  42. package/dist/cjs/resources/webhooks.js +55 -0
  43. package/dist/cjs/resources/webhooks.js.map +1 -0
  44. package/dist/cjs/types/account.d.ts +47 -0
  45. package/dist/cjs/types/account.js +6 -0
  46. package/dist/cjs/types/account.js.map +1 -0
  47. package/dist/cjs/types/api-key.d.ts +18 -0
  48. package/dist/cjs/types/api-key.js +6 -0
  49. package/dist/cjs/types/api-key.js.map +1 -0
  50. package/dist/cjs/types/index.d.ts +10 -0
  51. package/dist/cjs/types/index.js +10 -0
  52. package/dist/cjs/types/index.js.map +1 -0
  53. package/dist/cjs/types/listing.d.ts +177 -0
  54. package/dist/cjs/types/listing.js +6 -0
  55. package/dist/cjs/types/listing.js.map +1 -0
  56. package/dist/cjs/types/order.d.ts +42 -0
  57. package/dist/cjs/types/order.js +6 -0
  58. package/dist/cjs/types/order.js.map +1 -0
  59. package/dist/cjs/types/shared.d.ts +87 -0
  60. package/dist/cjs/types/shared.js +41 -0
  61. package/dist/cjs/types/shared.js.map +1 -0
  62. package/dist/cjs/types/signup.d.ts +24 -0
  63. package/dist/cjs/types/signup.js +6 -0
  64. package/dist/cjs/types/signup.js.map +1 -0
  65. package/dist/cjs/types/store.d.ts +70 -0
  66. package/dist/cjs/types/store.js +6 -0
  67. package/dist/cjs/types/store.js.map +1 -0
  68. package/dist/cjs/types/stripe.d.ts +12 -0
  69. package/dist/cjs/types/stripe.js +6 -0
  70. package/dist/cjs/types/stripe.js.map +1 -0
  71. package/dist/cjs/types/webhook.d.ts +88 -0
  72. package/dist/cjs/types/webhook.js +6 -0
  73. package/dist/cjs/types/webhook.js.map +1 -0
  74. package/dist/esm/base-client.d.ts +65 -0
  75. package/dist/esm/base-client.js +159 -0
  76. package/dist/esm/base-client.js.map +1 -0
  77. package/dist/esm/client.d.ts +58 -0
  78. package/dist/esm/client.js +50 -0
  79. package/dist/esm/client.js.map +1 -0
  80. package/dist/esm/constants.d.ts +17 -0
  81. package/dist/esm/constants.js +18 -0
  82. package/dist/esm/constants.js.map +1 -0
  83. package/dist/esm/errors.d.ts +89 -0
  84. package/dist/esm/errors.js +124 -0
  85. package/dist/esm/errors.js.map +1 -0
  86. package/dist/esm/index.d.ts +26 -0
  87. package/dist/esm/index.js +20 -0
  88. package/dist/esm/index.js.map +1 -0
  89. package/dist/esm/resources/account.d.ts +25 -0
  90. package/dist/esm/resources/account.js +35 -0
  91. package/dist/esm/resources/account.js.map +1 -0
  92. package/dist/esm/resources/api-keys.d.ts +14 -0
  93. package/dist/esm/resources/api-keys.js +21 -0
  94. package/dist/esm/resources/api-keys.js.map +1 -0
  95. package/dist/esm/resources/index.d.ts +7 -0
  96. package/dist/esm/resources/index.js +8 -0
  97. package/dist/esm/resources/index.js.map +1 -0
  98. package/dist/esm/resources/listings.d.ts +70 -0
  99. package/dist/esm/resources/listings.js +156 -0
  100. package/dist/esm/resources/listings.js.map +1 -0
  101. package/dist/esm/resources/orders.d.ts +11 -0
  102. package/dist/esm/resources/orders.js +31 -0
  103. package/dist/esm/resources/orders.js.map +1 -0
  104. package/dist/esm/resources/signup.d.ts +16 -0
  105. package/dist/esm/resources/signup.js +17 -0
  106. package/dist/esm/resources/signup.js.map +1 -0
  107. package/dist/esm/resources/stores.d.ts +31 -0
  108. package/dist/esm/resources/stores.js +63 -0
  109. package/dist/esm/resources/stores.js.map +1 -0
  110. package/dist/esm/resources/stripe.d.ts +15 -0
  111. package/dist/esm/resources/stripe.js +21 -0
  112. package/dist/esm/resources/stripe.js.map +1 -0
  113. package/dist/esm/resources/webhooks.d.ts +15 -0
  114. package/dist/esm/resources/webhooks.js +49 -0
  115. package/dist/esm/resources/webhooks.js.map +1 -0
  116. package/dist/esm/types/account.d.ts +47 -0
  117. package/dist/esm/types/account.js +5 -0
  118. package/dist/esm/types/account.js.map +1 -0
  119. package/dist/esm/types/api-key.d.ts +18 -0
  120. package/dist/esm/types/api-key.js +5 -0
  121. package/dist/esm/types/api-key.js.map +1 -0
  122. package/dist/esm/types/index.d.ts +10 -0
  123. package/dist/esm/types/index.js +2 -0
  124. package/dist/esm/types/index.js.map +1 -0
  125. package/dist/esm/types/listing.d.ts +177 -0
  126. package/dist/esm/types/listing.js +5 -0
  127. package/dist/esm/types/listing.js.map +1 -0
  128. package/dist/esm/types/order.d.ts +42 -0
  129. package/dist/esm/types/order.js +5 -0
  130. package/dist/esm/types/order.js.map +1 -0
  131. package/dist/esm/types/shared.d.ts +87 -0
  132. package/dist/esm/types/shared.js +38 -0
  133. package/dist/esm/types/shared.js.map +1 -0
  134. package/dist/esm/types/signup.d.ts +24 -0
  135. package/dist/esm/types/signup.js +5 -0
  136. package/dist/esm/types/signup.js.map +1 -0
  137. package/dist/esm/types/store.d.ts +70 -0
  138. package/dist/esm/types/store.js +5 -0
  139. package/dist/esm/types/store.js.map +1 -0
  140. package/dist/esm/types/stripe.d.ts +12 -0
  141. package/dist/esm/types/stripe.js +5 -0
  142. package/dist/esm/types/stripe.js.map +1 -0
  143. package/dist/esm/types/webhook.d.ts +88 -0
  144. package/dist/esm/types/webhook.js +5 -0
  145. package/dist/esm/types/webhook.js.map +1 -0
  146. package/package.json +136 -0
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Orders resource — GET /v1/orders/{id}, GET /v1/orders.
3
+ */
4
+ export class OrdersResource {
5
+ constructor(_client) {
6
+ this._client = _client;
7
+ }
8
+ async get(orderId) {
9
+ const response = await this._client.get(`/v1/orders/${orderId}`);
10
+ return (await response.json());
11
+ }
12
+ async list(params = {}) {
13
+ const queryParams = {
14
+ limit: params.limit ?? 20,
15
+ };
16
+ if (params.status !== undefined)
17
+ queryParams['status'] = params.status;
18
+ if (params.listing !== undefined)
19
+ queryParams['listing'] = params.listing;
20
+ if (params.created_after !== undefined) {
21
+ queryParams['created_after'] = params.created_after instanceof Date ? params.created_after.toISOString() : params.created_after;
22
+ }
23
+ if (params.created_before !== undefined) {
24
+ queryParams['created_before'] = params.created_before instanceof Date ? params.created_before.toISOString() : params.created_before;
25
+ }
26
+ if (params.cursor !== undefined)
27
+ queryParams['cursor'] = params.cursor;
28
+ return this._client.getPage('/v1/orders', queryParams, (item) => item);
29
+ }
30
+ }
31
+ //# sourceMappingURL=orders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orders.js","sourceRoot":"","sources":["../../../src/resources/orders.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,MAAM,OAAO,cAAc;IACzB,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD,KAAK,CAAC,GAAG,CAAC,OAAe;QACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,OAAO,EAAE,CAAC,CAAC;QACjE,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAkB,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,SAA2B,EAAE;QACtC,MAAM,WAAW,GAA8C;YAC7D,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE;SAC1B,CAAC;QACF,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS;YAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QACvE,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS;YAAE,WAAW,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;QAC1E,IAAI,MAAM,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YACvC,WAAW,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,aAAa,YAAY,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QAClI,CAAC;QACD,IAAI,MAAM,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;YACxC,WAAW,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,cAAc,YAAY,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC;QACtI,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS;YAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QAEvE,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAgB,YAAY,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAqB,CAAC,CAAC;IACzG,CAAC;CACF"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Signup resource — POST /v1/account/signup, POST /v1/account/verify.
3
+ */
4
+ import type { BaseClient } from '../base-client';
5
+ import type { SignupResponse, VerifyResponse } from '../types/signup';
6
+ export declare class SignupResource {
7
+ private readonly _client;
8
+ constructor(_client: BaseClient);
9
+ create(params: {
10
+ email: string;
11
+ }): Promise<SignupResponse>;
12
+ verify(params: {
13
+ email: string;
14
+ code: string;
15
+ }): Promise<VerifyResponse>;
16
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Signup resource — POST /v1/account/signup, POST /v1/account/verify.
3
+ */
4
+ export class SignupResource {
5
+ constructor(_client) {
6
+ this._client = _client;
7
+ }
8
+ async create(params) {
9
+ const response = await this._client.post('/v1/account/signup', { email: params.email }, { authenticated: false });
10
+ return (await response.json());
11
+ }
12
+ async verify(params) {
13
+ const response = await this._client.post('/v1/account/verify', { email: params.email, code: params.code }, { authenticated: false });
14
+ return (await response.json());
15
+ }
16
+ }
17
+ //# sourceMappingURL=signup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signup.js","sourceRoot":"","sources":["../../../src/resources/signup.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,MAAM,OAAO,cAAc;IACzB,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD,KAAK,CAAC,MAAM,CAAC,MAAyB;QACpC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;QAClH,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAmB,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAuC;QAClD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;QACrI,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAmB,CAAC;IACnD,CAAC;CACF"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Stores resource — CRUD, Stripe Connect, and domain management for /v1/stores.
3
+ */
4
+ import type { BaseClient } from '../base-client';
5
+ import type { StoreResponse, StoreListResponse, DomainResponse, CreateStoreParams, UpdateStoreParams } from '../types/store';
6
+ import type { StripeConnectSessionResponse } from '../types/stripe';
7
+ /** Resource for the /v1/stores endpoint. */
8
+ export declare class StoresResource {
9
+ private readonly _client;
10
+ constructor(_client: BaseClient);
11
+ /** Create a new store. */
12
+ create(params: CreateStoreParams): Promise<StoreResponse>;
13
+ /** List all stores for the authenticated account (non-paginated). */
14
+ list(): Promise<StoreListResponse>;
15
+ /** Retrieve a store by ID. */
16
+ get(storeId: string): Promise<StoreResponse>;
17
+ /** Update a store. Only supplied fields are changed. */
18
+ update(storeId: string, params: UpdateStoreParams): Promise<StoreResponse>;
19
+ /** Delete a store. */
20
+ delete(storeId: string): Promise<void>;
21
+ /** Start Stripe Connect onboarding for a store. */
22
+ connectStripe(storeId: string): Promise<StripeConnectSessionResponse>;
23
+ /** Set a custom domain on a store. */
24
+ setDomain(storeId: string, params: {
25
+ domain: string;
26
+ }): Promise<DomainResponse>;
27
+ /** Verify a store's custom domain DNS configuration. */
28
+ verifyDomain(storeId: string): Promise<DomainResponse>;
29
+ /** Remove a store's custom domain. */
30
+ removeDomain(storeId: string): Promise<void>;
31
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Stores resource — CRUD, Stripe Connect, and domain management for /v1/stores.
3
+ */
4
+ /** Resource for the /v1/stores endpoint. */
5
+ export class StoresResource {
6
+ constructor(_client) {
7
+ this._client = _client;
8
+ }
9
+ /** Create a new store. */
10
+ async create(params) {
11
+ const body = { handle: params.handle };
12
+ if (params.name !== undefined)
13
+ body['name'] = params.name;
14
+ const response = await this._client.post('/v1/stores', body);
15
+ return (await response.json());
16
+ }
17
+ /** List all stores for the authenticated account (non-paginated). */
18
+ async list() {
19
+ const response = await this._client.get('/v1/stores');
20
+ return (await response.json());
21
+ }
22
+ /** Retrieve a store by ID. */
23
+ async get(storeId) {
24
+ const response = await this._client.get(`/v1/stores/${storeId}`);
25
+ return (await response.json());
26
+ }
27
+ /** Update a store. Only supplied fields are changed. */
28
+ async update(storeId, params) {
29
+ const body = {};
30
+ if (params.name !== undefined)
31
+ body['name'] = params.name;
32
+ if (params.bio !== undefined)
33
+ body['bio'] = params.bio;
34
+ if (params.social_links !== undefined)
35
+ body['social_links'] = params.social_links;
36
+ const response = await this._client.patch(`/v1/stores/${storeId}`, body);
37
+ return (await response.json());
38
+ }
39
+ /** Delete a store. */
40
+ async delete(storeId) {
41
+ await this._client.delete(`/v1/stores/${storeId}`);
42
+ }
43
+ /** Start Stripe Connect onboarding for a store. */
44
+ async connectStripe(storeId) {
45
+ const response = await this._client.post(`/v1/stores/${storeId}/stripe/connect`);
46
+ return (await response.json());
47
+ }
48
+ /** Set a custom domain on a store. */
49
+ async setDomain(storeId, params) {
50
+ const response = await this._client.put(`/v1/stores/${storeId}/domain`, { domain: params.domain });
51
+ return (await response.json());
52
+ }
53
+ /** Verify a store's custom domain DNS configuration. */
54
+ async verifyDomain(storeId) {
55
+ const response = await this._client.post(`/v1/stores/${storeId}/domain/verify`);
56
+ return (await response.json());
57
+ }
58
+ /** Remove a store's custom domain. */
59
+ async removeDomain(storeId) {
60
+ await this._client.delete(`/v1/stores/${storeId}/domain`);
61
+ }
62
+ }
63
+ //# sourceMappingURL=stores.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stores.js","sourceRoot":"","sources":["../../../src/resources/stores.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,4CAA4C;AAC5C,MAAM,OAAO,cAAc;IACzB,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD,0BAA0B;IAC1B,KAAK,CAAC,MAAM,CAAC,MAAyB;QACpC,MAAM,IAAI,GAA4B,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;QAChE,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS;YAAE,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;QAC1D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QAC7D,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAkB,CAAC;IAClD,CAAC;IAED,qEAAqE;IACrE,KAAK,CAAC,IAAI;QACR,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACtD,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAsB,CAAC;IACtD,CAAC;IAED,8BAA8B;IAC9B,KAAK,CAAC,GAAG,CAAC,OAAe;QACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,OAAO,EAAE,CAAC,CAAC;QACjE,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAkB,CAAC;IAClD,CAAC;IAED,wDAAwD;IACxD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,MAAyB;QACrD,MAAM,IAAI,GAA4B,EAAE,CAAC;QACzC,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS;YAAE,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;QAC1D,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS;YAAE,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC;QACvD,IAAI,MAAM,CAAC,YAAY,KAAK,SAAS;YAAE,IAAI,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC;QAClF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,cAAc,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;QACzE,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAkB,CAAC;IAClD,CAAC;IAED,sBAAsB;IACtB,KAAK,CAAC,MAAM,CAAC,OAAe;QAC1B,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,mDAAmD;IACnD,KAAK,CAAC,aAAa,CAAC,OAAe;QACjC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,OAAO,iBAAiB,CAAC,CAAC;QACjF,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAiC,CAAC;IACjE,CAAC;IAED,sCAAsC;IACtC,KAAK,CAAC,SAAS,CAAC,OAAe,EAAE,MAA0B;QACzD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,OAAO,SAAS,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACnG,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAmB,CAAC;IACnD,CAAC;IAED,wDAAwD;IACxD,KAAK,CAAC,YAAY,CAAC,OAAe;QAChC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,OAAO,gBAAgB,CAAC,CAAC;QAChF,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAmB,CAAC;IACnD,CAAC;IAED,sCAAsC;IACtC,KAAK,CAAC,YAAY,CAAC,OAAe;QAChC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,OAAO,SAAS,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Stripe resource — POST /v1/account/stripe-key, POST /v1/account/stripe/connect, DELETE /v1/account/stripe.
3
+ */
4
+ import type { BaseClient } from '../base-client';
5
+ import type { AccountResponse } from '../types/account';
6
+ import type { StripeConnectSessionResponse } from '../types/stripe';
7
+ export declare class StripeResource {
8
+ private readonly _client;
9
+ constructor(_client: BaseClient);
10
+ setKey(params: {
11
+ secretKey: string;
12
+ }): Promise<AccountResponse>;
13
+ connect(): Promise<StripeConnectSessionResponse>;
14
+ disconnect(): Promise<AccountResponse>;
15
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Stripe resource — POST /v1/account/stripe-key, POST /v1/account/stripe/connect, DELETE /v1/account/stripe.
3
+ */
4
+ export class StripeResource {
5
+ constructor(_client) {
6
+ this._client = _client;
7
+ }
8
+ async setKey(params) {
9
+ const response = await this._client.post('/v1/account/stripe-key', { secret_key: params.secretKey });
10
+ return (await response.json());
11
+ }
12
+ async connect() {
13
+ const response = await this._client.post('/v1/account/stripe/connect');
14
+ return (await response.json());
15
+ }
16
+ async disconnect() {
17
+ const response = await this._client.delete('/v1/account/stripe');
18
+ return (await response.json());
19
+ }
20
+ }
21
+ //# sourceMappingURL=stripe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripe.js","sourceRoot":"","sources":["../../../src/resources/stripe.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,OAAO,cAAc;IACzB,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD,KAAK,CAAC,MAAM,CAAC,MAA6B;QACxC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;QACrG,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoB,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;QACvE,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAiC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,UAAU;QACd,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;QACjE,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoB,CAAC;IACpD,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Webhooks resource — CRUD + events + test for /v1/webhooks.
3
+ */
4
+ import type { BaseClient, CursorPage } from '../base-client';
5
+ import type { WebhookResponse, CreateWebhookParams, UpdateWebhookParams, WebhookEventResponse, ListWebhookEventsParams, WebhookTestResponse } from '../types/webhook';
6
+ export declare class WebhooksResource {
7
+ private readonly _client;
8
+ constructor(_client: BaseClient);
9
+ create(params: CreateWebhookParams): Promise<WebhookResponse>;
10
+ list(): Promise<WebhookResponse[]>;
11
+ update(webhookId: string, params: UpdateWebhookParams): Promise<WebhookResponse>;
12
+ delete(webhookId: string): Promise<void>;
13
+ listEvents(webhookId: string, params?: ListWebhookEventsParams): Promise<CursorPage<WebhookEventResponse>>;
14
+ test(webhookId: string): Promise<WebhookTestResponse>;
15
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Webhooks resource — CRUD + events + test for /v1/webhooks.
3
+ */
4
+ export class WebhooksResource {
5
+ constructor(_client) {
6
+ this._client = _client;
7
+ }
8
+ async create(params) {
9
+ const body = { name: params.name, url: params.url };
10
+ if (params.events !== undefined)
11
+ body['events'] = params.events;
12
+ const response = await this._client.post('/v1/webhooks', body);
13
+ return (await response.json());
14
+ }
15
+ async list() {
16
+ const response = await this._client.get('/v1/webhooks');
17
+ const body = (await response.json());
18
+ return (body.data ?? []);
19
+ }
20
+ async update(webhookId, params) {
21
+ const body = {};
22
+ if (params.name !== undefined)
23
+ body['name'] = params.name;
24
+ if (params.url !== undefined)
25
+ body['url'] = params.url;
26
+ if (params.events !== undefined)
27
+ body['events'] = params.events;
28
+ if (params.enabled !== undefined)
29
+ body['enabled'] = params.enabled;
30
+ const response = await this._client.put(`/v1/webhooks/${webhookId}`, body);
31
+ return (await response.json());
32
+ }
33
+ async delete(webhookId) {
34
+ await this._client.delete(`/v1/webhooks/${webhookId}`);
35
+ }
36
+ async listEvents(webhookId, params = {}) {
37
+ const queryParams = { limit: params.limit ?? 20 };
38
+ if (params.status !== undefined)
39
+ queryParams['status'] = params.status;
40
+ if (params.cursor !== undefined)
41
+ queryParams['cursor'] = params.cursor;
42
+ return this._client.getPage(`/v1/webhooks/${webhookId}/events`, queryParams, (item) => item);
43
+ }
44
+ async test(webhookId) {
45
+ const response = await this._client.post(`/v1/webhooks/${webhookId}/test`);
46
+ return (await response.json());
47
+ }
48
+ }
49
+ //# sourceMappingURL=webhooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../src/resources/webhooks.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,MAAM,OAAO,gBAAgB;IAC3B,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD,KAAK,CAAC,MAAM,CAAC,MAA2B;QACtC,MAAM,IAAI,GAA4B,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;QAC7E,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS;YAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QAChE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QAC/D,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoB,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACxD,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAyB,CAAC;QAC7D,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAsB,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,SAAiB,EAAE,MAA2B;QACzD,MAAM,IAAI,GAA4B,EAAE,CAAC;QACzC,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS;YAAE,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;QAC1D,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS;YAAE,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC;QACvD,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS;YAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QAChE,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;QACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,SAAS,EAAE,EAAE,IAAI,CAAC,CAAC;QAC3E,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoB,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,SAAiB;QAC5B,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,SAAS,EAAE,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,SAAiB,EAAE,SAAkC,EAAE;QACtE,MAAM,WAAW,GAA8C,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;QAC7F,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS;YAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QACvE,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS;YAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAuB,gBAAgB,SAAS,SAAS,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAA4B,CAAC,CAAC;IAC7I,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,SAAiB;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,SAAS,OAAO,CAAC,CAAC;QAC3E,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAwB,CAAC;IACxD,CAAC;CACF"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Account response types.
3
+ */
4
+ import type { AccountReadiness } from './shared';
5
+ /** Aggregate statistics for an account. */
6
+ export interface AccountStats {
7
+ /** Total revenue in the smallest currency unit across all orders. */
8
+ total_revenue: number;
9
+ /** Total number of orders across all listings. */
10
+ total_orders: number;
11
+ /** Total number of listings on the account. */
12
+ total_listings: number;
13
+ }
14
+ /** Full account object returned by the ListBee API. */
15
+ export interface AccountResponse {
16
+ /** Object type discriminator. Always "account". */
17
+ object: 'account';
18
+ /** Unique account identifier. */
19
+ id: string;
20
+ /** Account email address. */
21
+ email: string;
22
+ /** Current plan tier. */
23
+ plan: string;
24
+ /** Transaction fee rate as a decimal string (e.g. "0.10" = 10%). */
25
+ fee_rate: string;
26
+ /** Three-letter ISO currency code, uppercase. Set during onboarding. */
27
+ currency: string | null;
28
+ /**
29
+ * Google Analytics 4 Measurement ID (e.g. "G-XXXXXXXXXX").
30
+ * Used to track conversions on checkout pages.
31
+ */
32
+ ga_measurement_id: string | null;
33
+ /** Aggregate statistics for this account. */
34
+ stats: AccountStats;
35
+ /** Account operational readiness. */
36
+ readiness: AccountReadiness;
37
+ /** ISO 8601 timestamp of when the account was created. */
38
+ created_at: string;
39
+ }
40
+ /** Parameters for updating account settings. */
41
+ export interface UpdateAccountParams {
42
+ /**
43
+ * Google Analytics 4 Measurement ID (e.g. "G-XXXXXXXXXX").
44
+ * Pass null to clear the existing value.
45
+ */
46
+ ga_measurement_id?: string | null;
47
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Account response types.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.js","sourceRoot":"","sources":["../../../src/types/account.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * API key response types.
3
+ */
4
+ /** Full API key object returned by the ListBee API. */
5
+ export interface ApiKeyResponse {
6
+ /** Object type discriminator. Always "api_key". */
7
+ object: 'api_key';
8
+ /** Unique API key identifier. */
9
+ id: string;
10
+ /** Human-readable label. */
11
+ name: string;
12
+ /** First 8 characters of the key value. */
13
+ prefix: string;
14
+ /** Full key value — only populated on create, null in list. */
15
+ key: string | null;
16
+ /** ISO 8601 timestamp of when the key was created. */
17
+ created_at: string;
18
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * API key response types.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=api-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-key.js","sourceRoot":"","sources":["../../../src/types/api-key.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,10 @@
1
+ export type { AccountReadiness, ListingReadiness, ReadinessAction, ListResponse } from './shared';
2
+ export { ContentType, OrderStatus, WebhookEventType, ActionKind, ActionCode } from './shared';
3
+ export type { AccountResponse, UpdateAccountParams, AccountStats } from './account';
4
+ export type { BlurMode, CreateListingParams, FaqItem, ListingResponse, ListingStatus, Review, UpdateListingParams, } from './listing';
5
+ export type { ApiKeyResponse } from './api-key';
6
+ export type { OrderResponse, ListOrdersParams } from './order';
7
+ export type { SignupResponse, VerifyResponse } from './signup';
8
+ export type { StripeConnectSessionResponse } from './stripe';
9
+ export type { WebhookResponse, CreateWebhookParams, UpdateWebhookParams, WebhookEventResponse, ListWebhookEventsParams, WebhookTestResponse, } from './webhook';
10
+ export type { StoreResponse, StoreListResponse, DomainResponse, DomainStatus, CreateStoreParams, UpdateStoreParams } from './store';
@@ -0,0 +1,2 @@
1
+ export { ContentType, OrderStatus, WebhookEventType, ActionKind, ActionCode } from './shared';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,177 @@
1
+ /**
2
+ * Listing response types.
3
+ */
4
+ import type { ListingReadiness } from './shared';
5
+ /** A single buyer review card displayed on the listing product page. */
6
+ export interface Review {
7
+ /** Reviewer display name. */
8
+ name: string;
9
+ /** Star rating (1–5). */
10
+ rating: number;
11
+ /** Review body text. */
12
+ content: string;
13
+ }
14
+ /** A single FAQ accordion item displayed on the listing product page. */
15
+ export interface FaqItem {
16
+ /** Question text. */
17
+ q: string;
18
+ /** Answer text. */
19
+ a: string;
20
+ }
21
+ /** Cover image blur mode. */
22
+ export type BlurMode = 'auto' | 'true' | 'false';
23
+ /** Listing status. */
24
+ export type ListingStatus = 'active' | 'paused' | 'draft';
25
+ /** Full listing object returned by the ListBee API. */
26
+ export interface ListingResponse {
27
+ /** Object type discriminator. Always "listing". */
28
+ object: 'listing';
29
+ /** Unique listing identifier. */
30
+ id: string;
31
+ /** URL slug used on the product page. */
32
+ slug: string;
33
+ /** Product name shown on the product page. */
34
+ name: string;
35
+ /** Longer product description, plain text. */
36
+ description: string | null;
37
+ /** Short line shown below the product name. */
38
+ tagline: string | null;
39
+ /** Bullet-point feature badges shown on the product page. */
40
+ highlights: string[];
41
+ /** Buy button text. Defaults to "Buy Now" when not set. */
42
+ cta: string | null;
43
+ /** Price in the smallest currency unit (e.g. 2900 = $29.00). */
44
+ price: number;
45
+ /** Auto-detected from the content value at creation. */
46
+ content_type: string;
47
+ /** true if content was successfully fetched and stored. */
48
+ has_content: boolean;
49
+ /** true if a cover image exists (uploaded or auto-generated). */
50
+ has_cover: boolean;
51
+ /** Strikethrough price in smallest currency unit. */
52
+ compare_at_price: number | null;
53
+ /** Short promotional badges shown on the product page. */
54
+ badges: string[];
55
+ /** Cover image blur mode. */
56
+ cover_blur: BlurMode;
57
+ /** Seller-provided aggregate star rating (1–5). */
58
+ rating: number | null;
59
+ /** Seller-provided review or purchase count shown alongside the rating. */
60
+ rating_count: number | null;
61
+ /** Featured review cards shown on the product page. */
62
+ reviews: Review[];
63
+ /** FAQ accordion items shown on the product page. */
64
+ faqs: FaqItem[];
65
+ /** Arbitrary key-value pairs forwarded in webhook events. */
66
+ metadata: Record<string, unknown> | null;
67
+ /**
68
+ * UTM source tag attached to checkout links (e.g. "twitter").
69
+ * Null means use account defaults.
70
+ */
71
+ utm_source: string | null;
72
+ /**
73
+ * UTM medium tag attached to checkout links (e.g. "social").
74
+ * Null means use account defaults.
75
+ */
76
+ utm_medium: string | null;
77
+ /**
78
+ * UTM campaign tag attached to checkout links (e.g. "launch-week").
79
+ * Null means use account defaults.
80
+ */
81
+ utm_campaign: string | null;
82
+ /** Current listing status. */
83
+ status: ListingStatus;
84
+ /** Full product page URL — share this with buyers. */
85
+ url: string | null;
86
+ /** Monetization readiness. */
87
+ readiness: ListingReadiness;
88
+ /** ISO 8601 timestamp of when the listing was created. */
89
+ created_at: string;
90
+ }
91
+ /** Parameters for creating a listing. */
92
+ export interface CreateListingParams {
93
+ /** Product name shown on the product page. */
94
+ name: string;
95
+ /** Price in the smallest currency unit (e.g. 2900 = $29.00). */
96
+ price: number;
97
+ /** File URL, redirect URL, or plain text to deliver after purchase. */
98
+ content: string;
99
+ /** Store to create this listing in. Required when account has multiple stores. */
100
+ store_id?: string;
101
+ /** Longer product description, plain text. */
102
+ description?: string;
103
+ /** Short line shown below the product name. */
104
+ tagline?: string;
105
+ /** Bullet-point feature badges shown on the product page. */
106
+ highlights?: string[];
107
+ /** Buy button text. Defaults to "Buy Now" when not set. */
108
+ cta?: string;
109
+ /** URL of a cover image to fetch and store. */
110
+ cover_url?: string;
111
+ /** Arbitrary key-value pairs forwarded in webhook events. */
112
+ metadata?: Record<string, unknown>;
113
+ /** Strikethrough price in smallest currency unit. */
114
+ compare_at_price?: number;
115
+ /** Short promotional badges shown on the product page. */
116
+ badges?: string[];
117
+ /**
118
+ * Cover blur mode — "auto", "true", or "false".
119
+ * Only sent when different from "auto".
120
+ */
121
+ cover_blur?: BlurMode;
122
+ /** Seller-provided aggregate star rating (1–5). */
123
+ rating?: number;
124
+ /** Seller-provided review or purchase count. */
125
+ rating_count?: number;
126
+ /** Featured review cards shown on the product page. */
127
+ reviews?: Review[];
128
+ /** FAQ accordion items shown on the product page. */
129
+ faqs?: FaqItem[];
130
+ /** UTM source tag attached to checkout links. Null means use account defaults. */
131
+ utm_source?: string | null;
132
+ /** UTM medium tag attached to checkout links. Null means use account defaults. */
133
+ utm_medium?: string | null;
134
+ /** UTM campaign tag attached to checkout links. Null means use account defaults. */
135
+ utm_campaign?: string | null;
136
+ /** Request timeout in milliseconds. Defaults to LISTING_CREATE_TIMEOUT_MS (120s). */
137
+ timeoutMs?: number;
138
+ }
139
+ /** Parameters for updating a listing. */
140
+ export interface UpdateListingParams {
141
+ /** Product name shown on the product page. */
142
+ name?: string;
143
+ /** Price in the smallest currency unit (e.g. 2900 = $29.00). */
144
+ price?: number;
145
+ /** Longer product description, plain text. */
146
+ description?: string;
147
+ /** Short line shown below the product name. */
148
+ tagline?: string;
149
+ /** Bullet-point feature badges shown on the product page. */
150
+ highlights?: string[];
151
+ /** Buy button text. */
152
+ cta?: string;
153
+ /** URL of a cover image to fetch and store. */
154
+ cover_url?: string;
155
+ /** Arbitrary key-value pairs forwarded in webhook events. */
156
+ metadata?: Record<string, unknown>;
157
+ /** Strikethrough price in smallest currency unit. */
158
+ compare_at_price?: number;
159
+ /** Short promotional badges shown on the product page. */
160
+ badges?: string[];
161
+ /** Cover blur mode — "auto", "true", or "false". */
162
+ cover_blur?: BlurMode;
163
+ /** Seller-provided aggregate star rating (1–5). */
164
+ rating?: number;
165
+ /** Seller-provided review or purchase count. */
166
+ rating_count?: number;
167
+ /** Featured review cards shown on the product page. */
168
+ reviews?: Review[];
169
+ /** FAQ accordion items shown on the product page. */
170
+ faqs?: FaqItem[];
171
+ /** UTM source tag attached to checkout links. Null means use account defaults. */
172
+ utm_source?: string | null;
173
+ /** UTM medium tag attached to checkout links. Null means use account defaults. */
174
+ utm_medium?: string | null;
175
+ /** UTM campaign tag attached to checkout links. Null means use account defaults. */
176
+ utm_campaign?: string | null;
177
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Listing response types.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=listing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listing.js","sourceRoot":"","sources":["../../../src/types/listing.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Order response types.
3
+ */
4
+ import type { OrderStatus } from './shared';
5
+ /** Full order object returned by the ListBee API. */
6
+ export interface OrderResponse {
7
+ /** Object type discriminator. Always "order". */
8
+ object: 'order';
9
+ /** Unique order identifier. */
10
+ id: string;
11
+ /** ID of the listing that was purchased. */
12
+ listing_id: string;
13
+ /** Buyer's email address. */
14
+ buyer_email: string;
15
+ /** Amount in smallest currency unit (e.g. 2900 = $29.00). */
16
+ amount: number;
17
+ /** Three-letter ISO 4217 currency code, uppercase. */
18
+ currency: string;
19
+ /** Stripe Checkout Session ID. */
20
+ stripe_session_id: string;
21
+ /** Stripe PaymentIntent ID. */
22
+ stripe_payment_intent_id: string;
23
+ /** Order status. */
24
+ status: OrderStatus;
25
+ /** ISO 8601 timestamp of when the order was created. */
26
+ created_at: string;
27
+ }
28
+ /** Parameters for listing orders. */
29
+ export interface ListOrdersParams {
30
+ /** Filter by order status. */
31
+ status?: OrderStatus;
32
+ /** Filter by listing slug. */
33
+ listing?: string;
34
+ /** Only orders created after this date (ISO 8601 string or Date). */
35
+ created_after?: string | Date;
36
+ /** Only orders created before this date (ISO 8601 string or Date). */
37
+ created_before?: string | Date;
38
+ /** Maximum items per page (1-100, default 20). */
39
+ limit?: number;
40
+ /** Pagination cursor from a previous response. */
41
+ cursor?: string;
42
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Order response types.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order.js","sourceRoot":"","sources":["../../../src/types/order.ts"],"names":[],"mappings":"AAAA;;GAEG"}