listbee 0.4.0 → 0.6.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 (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 -15
  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 -40
  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 -10
  58. package/dist/cjs/types/index.js.map +1 -1
  59. package/dist/cjs/types/shared.d.ts +25 -145
  60. package/dist/cjs/types/shared.js +12 -66
  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 +56 -12
  64. package/dist/esm/base-client.js.map +1 -1
  65. package/dist/esm/client.d.ts +17 -13
  66. package/dist/esm/client.js +14 -11
  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 +7 -13
  84. package/dist/esm/index.js +5 -4
  85. package/dist/esm/index.js.map +1 -1
  86. package/dist/esm/resources/account.d.ts +11 -6
  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 +18 -4
  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 +3 -1
  99. package/dist/esm/resources/index.js +3 -1
  100. package/dist/esm/resources/index.js.map +1 -1
  101. package/dist/esm/resources/listings.d.ts +35 -35
  102. package/dist/esm/resources/listings.js +50 -116
  103. package/dist/esm/resources/listings.js.map +1 -1
  104. package/dist/esm/resources/orders.d.ts +28 -16
  105. package/dist/esm/resources/orders.js +43 -40
  106. package/dist/esm/resources/orders.js.map +1 -1
  107. package/dist/esm/resources/signup.d.ts +21 -9
  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 +18 -6
  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 +59 -3
  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 -145
  120. package/dist/esm/types/shared.js +10 -65
  121. package/dist/esm/types/shared.js.map +1 -1
  122. package/package.json +4 -82
  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 -189
  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 -74
  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 -189
  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 -74
  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
package/dist/cjs/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * ListBee TypeScript SDK — public exports.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ActionCode = exports.ActionKind = exports.WebhookEventType = exports.FulfillmentStatus = exports.OrderStatus = exports.CheckoutFieldType = exports.FulfillmentMode = exports.DeliverableType = exports.ContentType = exports.WebhooksResource = exports.StoresResource = exports.StripeResource = exports.SignupResource = exports.OrdersResource = exports.ApiKeysResource = exports.ListingsResource = exports.AccountResource = exports.WebhookVerificationError = exports.ValidationError = exports.RateLimitError = exports.NotFoundError = exports.ListBeeError = exports.InternalServerError = exports.ConflictError = exports.AuthenticationError = exports.APITimeoutError = exports.APIStatusError = exports.APIConnectionError = exports.CursorPage = exports.ListBee = void 0;
6
+ exports.WebhookEventType = exports.OrderStatus = exports.ListingStatus = exports.FulfillmentMode = exports.ErrorCode = exports.DeliverableType = exports.DeliverableStatus = exports.CheckoutFieldType = exports.BlurMode = exports.ActionKind = exports.ActionCode = exports.WebhooksResource = exports.StripeResource = exports.SignupResource = exports.OrdersResource = exports.ListingsResource = exports.FilesResource = exports.CustomersResource = exports.ApiKeysResource = exports.AccountResource = exports.WebhookVerificationError = exports.ValidationError = exports.RateLimitError = exports.PayloadTooLargeError = exports.NotFoundError = exports.ListBeeError = exports.InternalServerError = exports.ForbiddenError = exports.ConflictError = exports.BadRequestError = exports.AuthenticationError = exports.APITimeoutError = exports.APIStatusError = exports.APIConnectionError = exports.CursorPage = exports.ListBee = void 0;
7
7
  // Client
8
8
  var client_1 = require("./client");
9
9
  Object.defineProperty(exports, "ListBee", { enumerable: true, get: function () { return client_1.ListBee; } });
@@ -15,39 +15,46 @@ Object.defineProperty(exports, "APIConnectionError", { enumerable: true, get: fu
15
15
  Object.defineProperty(exports, "APIStatusError", { enumerable: true, get: function () { return errors_1.APIStatusError; } });
16
16
  Object.defineProperty(exports, "APITimeoutError", { enumerable: true, get: function () { return errors_1.APITimeoutError; } });
17
17
  Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return errors_1.AuthenticationError; } });
18
+ Object.defineProperty(exports, "BadRequestError", { enumerable: true, get: function () { return errors_1.BadRequestError; } });
18
19
  Object.defineProperty(exports, "ConflictError", { enumerable: true, get: function () { return errors_1.ConflictError; } });
20
+ Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return errors_1.ForbiddenError; } });
19
21
  Object.defineProperty(exports, "InternalServerError", { enumerable: true, get: function () { return errors_1.InternalServerError; } });
20
22
  Object.defineProperty(exports, "ListBeeError", { enumerable: true, get: function () { return errors_1.ListBeeError; } });
21
23
  Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return errors_1.NotFoundError; } });
24
+ Object.defineProperty(exports, "PayloadTooLargeError", { enumerable: true, get: function () { return errors_1.PayloadTooLargeError; } });
22
25
  Object.defineProperty(exports, "RateLimitError", { enumerable: true, get: function () { return errors_1.RateLimitError; } });
23
26
  Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return errors_1.ValidationError; } });
24
27
  Object.defineProperty(exports, "WebhookVerificationError", { enumerable: true, get: function () { return errors_1.WebhookVerificationError; } });
25
28
  // Resources
26
29
  var account_1 = require("./resources/account");
27
30
  Object.defineProperty(exports, "AccountResource", { enumerable: true, get: function () { return account_1.AccountResource; } });
28
- var listings_1 = require("./resources/listings");
29
- Object.defineProperty(exports, "ListingsResource", { enumerable: true, get: function () { return listings_1.ListingsResource; } });
30
31
  var api_keys_1 = require("./resources/api-keys");
31
32
  Object.defineProperty(exports, "ApiKeysResource", { enumerable: true, get: function () { return api_keys_1.ApiKeysResource; } });
33
+ var customers_1 = require("./resources/customers");
34
+ Object.defineProperty(exports, "CustomersResource", { enumerable: true, get: function () { return customers_1.CustomersResource; } });
35
+ var files_1 = require("./resources/files");
36
+ Object.defineProperty(exports, "FilesResource", { enumerable: true, get: function () { return files_1.FilesResource; } });
37
+ var listings_1 = require("./resources/listings");
38
+ Object.defineProperty(exports, "ListingsResource", { enumerable: true, get: function () { return listings_1.ListingsResource; } });
32
39
  var orders_1 = require("./resources/orders");
33
40
  Object.defineProperty(exports, "OrdersResource", { enumerable: true, get: function () { return orders_1.OrdersResource; } });
34
41
  var signup_1 = require("./resources/signup");
35
42
  Object.defineProperty(exports, "SignupResource", { enumerable: true, get: function () { return signup_1.SignupResource; } });
36
43
  var stripe_1 = require("./resources/stripe");
37
44
  Object.defineProperty(exports, "StripeResource", { enumerable: true, get: function () { return stripe_1.StripeResource; } });
38
- var stores_1 = require("./resources/stores");
39
- Object.defineProperty(exports, "StoresResource", { enumerable: true, get: function () { return stores_1.StoresResource; } });
40
45
  var webhooks_1 = require("./resources/webhooks");
41
46
  Object.defineProperty(exports, "WebhooksResource", { enumerable: true, get: function () { return webhooks_1.WebhooksResource; } });
42
47
  // Enums (runtime values)
43
- var shared_1 = require("./types/shared");
44
- Object.defineProperty(exports, "ContentType", { enumerable: true, get: function () { return shared_1.ContentType; } });
45
- Object.defineProperty(exports, "DeliverableType", { enumerable: true, get: function () { return shared_1.DeliverableType; } });
46
- Object.defineProperty(exports, "FulfillmentMode", { enumerable: true, get: function () { return shared_1.FulfillmentMode; } });
47
- Object.defineProperty(exports, "CheckoutFieldType", { enumerable: true, get: function () { return shared_1.CheckoutFieldType; } });
48
- Object.defineProperty(exports, "OrderStatus", { enumerable: true, get: function () { return shared_1.OrderStatus; } });
49
- Object.defineProperty(exports, "FulfillmentStatus", { enumerable: true, get: function () { return shared_1.FulfillmentStatus; } });
50
- Object.defineProperty(exports, "WebhookEventType", { enumerable: true, get: function () { return shared_1.WebhookEventType; } });
51
- Object.defineProperty(exports, "ActionKind", { enumerable: true, get: function () { return shared_1.ActionKind; } });
52
- Object.defineProperty(exports, "ActionCode", { enumerable: true, get: function () { return shared_1.ActionCode; } });
48
+ var enums_1 = require("./generated/enums");
49
+ Object.defineProperty(exports, "ActionCode", { enumerable: true, get: function () { return enums_1.ActionCode; } });
50
+ Object.defineProperty(exports, "ActionKind", { enumerable: true, get: function () { return enums_1.ActionKind; } });
51
+ Object.defineProperty(exports, "BlurMode", { enumerable: true, get: function () { return enums_1.BlurMode; } });
52
+ Object.defineProperty(exports, "CheckoutFieldType", { enumerable: true, get: function () { return enums_1.CheckoutFieldType; } });
53
+ Object.defineProperty(exports, "DeliverableStatus", { enumerable: true, get: function () { return enums_1.DeliverableStatus; } });
54
+ Object.defineProperty(exports, "DeliverableType", { enumerable: true, get: function () { return enums_1.DeliverableType; } });
55
+ Object.defineProperty(exports, "ErrorCode", { enumerable: true, get: function () { return enums_1.ErrorCode; } });
56
+ Object.defineProperty(exports, "FulfillmentMode", { enumerable: true, get: function () { return enums_1.FulfillmentMode; } });
57
+ Object.defineProperty(exports, "ListingStatus", { enumerable: true, get: function () { return enums_1.ListingStatus; } });
58
+ Object.defineProperty(exports, "OrderStatus", { enumerable: true, get: function () { return enums_1.OrderStatus; } });
59
+ Object.defineProperty(exports, "WebhookEventType", { enumerable: true, get: function () { return enums_1.WebhookEventType; } });
53
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,SAAS;AACT,mCAAmC;AAA1B,iGAAA,OAAO,OAAA;AAEhB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AAGnB,SAAS;AACT,mCAYkB;AAXhB,4GAAA,kBAAkB,OAAA;AAClB,wGAAA,cAAc,OAAA;AACd,yGAAA,eAAe,OAAA;AACf,6GAAA,mBAAmB,OAAA;AACnB,uGAAA,aAAa,OAAA;AACb,6GAAA,mBAAmB,OAAA;AACnB,sGAAA,YAAY,OAAA;AACZ,uGAAA,aAAa,OAAA;AACb,wGAAA,cAAc,OAAA;AACd,yGAAA,eAAe,OAAA;AACf,kHAAA,wBAAwB,OAAA;AAG1B,YAAY;AACZ,+CAAsD;AAA7C,0GAAA,eAAe,OAAA;AACxB,iDAAwD;AAA/C,4GAAA,gBAAgB,OAAA;AACzB,iDAAuD;AAA9C,2GAAA,eAAe,OAAA;AACxB,6CAAoD;AAA3C,wGAAA,cAAc,OAAA;AACvB,6CAAoD;AAA3C,wGAAA,cAAc,OAAA;AACvB,6CAAoD;AAA3C,wGAAA,cAAc,OAAA;AACvB,6CAAoD;AAA3C,wGAAA,cAAc,OAAA;AACvB,iDAAwD;AAA/C,4GAAA,gBAAgB,OAAA;AAEzB,yBAAyB;AACzB,yCAA4K;AAAnK,qGAAA,WAAW,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAAE,oGAAA,UAAU,OAAA;AAAE,oGAAA,UAAU,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,SAAS;AACT,mCAAmC;AAA1B,iGAAA,OAAO,OAAA;AAEhB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AAGnB,SAAS;AACT,mCAekB;AAdhB,4GAAA,kBAAkB,OAAA;AAClB,wGAAA,cAAc,OAAA;AACd,yGAAA,eAAe,OAAA;AACf,6GAAA,mBAAmB,OAAA;AACnB,yGAAA,eAAe,OAAA;AACf,uGAAA,aAAa,OAAA;AACb,wGAAA,cAAc,OAAA;AACd,6GAAA,mBAAmB,OAAA;AACnB,sGAAA,YAAY,OAAA;AACZ,uGAAA,aAAa,OAAA;AACb,8GAAA,oBAAoB,OAAA;AACpB,wGAAA,cAAc,OAAA;AACd,yGAAA,eAAe,OAAA;AACf,kHAAA,wBAAwB,OAAA;AAG1B,YAAY;AACZ,+CAAsD;AAA7C,0GAAA,eAAe,OAAA;AACxB,iDAAuD;AAA9C,2GAAA,eAAe,OAAA;AACxB,mDAA0D;AAAjD,8GAAA,iBAAiB,OAAA;AAC1B,2CAAkD;AAAzC,sGAAA,aAAa,OAAA;AACtB,iDAAwD;AAA/C,4GAAA,gBAAgB,OAAA;AACzB,6CAAoD;AAA3C,wGAAA,cAAc,OAAA;AACvB,6CAAoD;AAA3C,wGAAA,cAAc,OAAA;AACvB,6CAAoD;AAA3C,wGAAA,cAAc,OAAA;AACvB,iDAAwD;AAA/C,4GAAA,gBAAgB,OAAA;AAEzB,yBAAyB;AACzB,2CAY2B;AAXzB,mGAAA,UAAU,OAAA;AACV,mGAAA,UAAU,OAAA;AACV,iGAAA,QAAQ,OAAA;AACR,0GAAA,iBAAiB,OAAA;AACjB,0GAAA,iBAAiB,OAAA;AACjB,wGAAA,eAAe,OAAA;AACf,kGAAA,SAAS,OAAA;AACT,wGAAA,eAAe,OAAA;AACf,sGAAA,aAAa,OAAA;AACb,oGAAA,WAAW,OAAA;AACX,yGAAA,gBAAgB,OAAA"}
@@ -1,8 +1,9 @@
1
1
  /**
2
- * Account resource — GET and PUT /v1/account.
2
+ * Account resource — GET, PUT, DELETE /v1/account.
3
3
  */
4
4
  import type { BaseClient } from '../base-client';
5
- import type { AccountResponse, UpdateAccountParams } from '../types/account';
5
+ import type { AccountResponse, UpdateAccountParams } from '../generated/types';
6
+ import type { RequestOptions } from '../types/shared';
6
7
  /** Resource for the /v1/account endpoint. */
7
8
  export declare class AccountResource {
8
9
  private readonly _client;
@@ -16,10 +17,14 @@ export declare class AccountResource {
16
17
  /**
17
18
  * Update account settings.
18
19
  *
19
- * @param params - Fields to update.
20
- * @param params.ga_measurement_id - Google Analytics 4 Measurement ID (e.g. "G-XXXXXXXXXX").
21
- * Pass `null` to clear the existing value.
20
+ * @param params - Fields to update (display_name, bio, avatar, ga_measurement_id).
22
21
  * @returns The updated AccountResponse.
23
22
  */
24
- update(params?: UpdateAccountParams): Promise<AccountResponse>;
23
+ update(params?: UpdateAccountParams, options?: RequestOptions): Promise<AccountResponse>;
24
+ /**
25
+ * Permanently delete the authenticated account.
26
+ *
27
+ * PII is anonymized, API keys revoked. Irreversible.
28
+ */
29
+ delete(): Promise<void>;
25
30
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Account resource — GET and PUT /v1/account.
3
+ * Account resource — GET, PUT, DELETE /v1/account.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AccountResource = void 0;
@@ -21,19 +21,30 @@ class AccountResource {
21
21
  /**
22
22
  * Update account settings.
23
23
  *
24
- * @param params - Fields to update.
25
- * @param params.ga_measurement_id - Google Analytics 4 Measurement ID (e.g. "G-XXXXXXXXXX").
26
- * Pass `null` to clear the existing value.
24
+ * @param params - Fields to update (display_name, bio, avatar, ga_measurement_id).
27
25
  * @returns The updated AccountResponse.
28
26
  */
29
- async update(params = {}) {
27
+ async update(params = {}, options) {
30
28
  const body = {};
31
- if ('ga_measurement_id' in params) {
29
+ if ('display_name' in params)
30
+ body['display_name'] = params.display_name;
31
+ if ('bio' in params)
32
+ body['bio'] = params.bio;
33
+ if ('avatar' in params)
34
+ body['avatar'] = params.avatar;
35
+ if ('ga_measurement_id' in params)
32
36
  body['ga_measurement_id'] = params.ga_measurement_id;
33
- }
34
- const response = await this._client.put('/v1/account', body);
37
+ const response = await this._client.put('/v1/account', body, options);
35
38
  return (await response.json());
36
39
  }
40
+ /**
41
+ * Permanently delete the authenticated account.
42
+ *
43
+ * PII is anonymized, API keys revoked. Irreversible.
44
+ */
45
+ async delete() {
46
+ await this._client.delete('/v1/account');
47
+ }
37
48
  }
38
49
  exports.AccountResource = AccountResource;
39
50
  //# sourceMappingURL=account.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"account.js","sourceRoot":"","sources":["../../../src/resources/account.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAKH,6CAA6C;AAC7C,MAAa,eAAe;IAC1B,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD;;;;OAIG;IACH,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACvD,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoB,CAAC;IACpD,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,MAAM,CAAC,SAA8B,EAAE;QAC3C,MAAM,IAAI,GAA4B,EAAE,CAAC;QACzC,IAAI,mBAAmB,IAAI,MAAM,EAAE,CAAC;YAClC,IAAI,CAAC,mBAAmB,CAAC,GAAG,MAAM,CAAC,iBAAiB,CAAC;QACvD,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC7D,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoB,CAAC;IACpD,CAAC;CACF;AA7BD,0CA6BC"}
1
+ {"version":3,"file":"account.js","sourceRoot":"","sources":["../../../src/resources/account.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAMH,6CAA6C;AAC7C,MAAa,eAAe;IAC1B,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD;;;;OAIG;IACH,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACvD,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoB,CAAC;IACpD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,SAA8B,EAAE,EAAE,OAAwB;QACrE,MAAM,IAAI,GAA4B,EAAE,CAAC;QACzC,IAAI,cAAc,IAAI,MAAM;YAAE,IAAI,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC;QACzE,IAAI,KAAK,IAAI,MAAM;YAAE,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC;QAC9C,IAAI,QAAQ,IAAI,MAAM;YAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QACvD,IAAI,mBAAmB,IAAI,MAAM;YAAE,IAAI,CAAC,mBAAmB,CAAC,GAAG,MAAM,CAAC,iBAAiB,CAAC;QACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACtE,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoB,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM;QACV,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAC3C,CAAC;CACF;AArCD,0CAqCC"}
@@ -2,13 +2,27 @@
2
2
  * API Keys resource — GET, POST, DELETE /v1/api-keys.
3
3
  */
4
4
  import type { BaseClient } from '../base-client';
5
- import type { ApiKeyResponse } from '../types/api-key';
5
+ import type { ApiKeyResponse, CreateApiKeyParams } from '../generated/types';
6
6
  export declare class ApiKeysResource {
7
7
  private readonly _client;
8
8
  constructor(_client: BaseClient);
9
+ /**
10
+ * List all API keys for the authenticated account.
11
+ *
12
+ * @returns Array of ApiKeyResponse objects (not paginated).
13
+ */
9
14
  list(): Promise<ApiKeyResponse[]>;
10
- create(params: {
11
- name: string;
12
- }): Promise<ApiKeyResponse>;
15
+ /**
16
+ * Create a new API key.
17
+ *
18
+ * @param params - API key creation parameters (name).
19
+ * @returns The created ApiKeyResponse with key value populated.
20
+ */
21
+ create(params: CreateApiKeyParams): Promise<ApiKeyResponse>;
22
+ /**
23
+ * Delete (revoke) an API key.
24
+ *
25
+ * @param keyId - The API key entity ID (e.g. "lbk_abc123").
26
+ */
13
27
  delete(keyId: string): Promise<void>;
14
28
  }
@@ -8,16 +8,32 @@ class ApiKeysResource {
8
8
  constructor(_client) {
9
9
  this._client = _client;
10
10
  }
11
+ /**
12
+ * List all API keys for the authenticated account.
13
+ *
14
+ * @returns Array of ApiKeyResponse objects (not paginated).
15
+ */
11
16
  async list() {
12
17
  var _a;
13
18
  const response = await this._client.get('/v1/api-keys');
14
19
  const body = (await response.json());
15
20
  return ((_a = body.data) !== null && _a !== void 0 ? _a : []);
16
21
  }
22
+ /**
23
+ * Create a new API key.
24
+ *
25
+ * @param params - API key creation parameters (name).
26
+ * @returns The created ApiKeyResponse with key value populated.
27
+ */
17
28
  async create(params) {
18
- const response = await this._client.post('/v1/api-keys', { name: params.name });
29
+ const response = await this._client.post('/v1/api-keys', params);
19
30
  return (await response.json());
20
31
  }
32
+ /**
33
+ * Delete (revoke) an API key.
34
+ *
35
+ * @param keyId - The API key entity ID (e.g. "lbk_abc123").
36
+ */
21
37
  async delete(keyId) {
22
38
  await this._client.delete(`/v1/api-keys/${keyId}`);
23
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../../../src/resources/api-keys.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAKH,MAAa,eAAe;IAC1B,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD,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,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAqB,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAwB;QACnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAChF,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAmB,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAa;QACxB,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,KAAK,EAAE,CAAC,CAAC;IACrD,CAAC;CACF;AAjBD,0CAiBC"}
1
+ {"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../../../src/resources/api-keys.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAKH,MAAa,eAAe;IAC1B,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD;;;;OAIG;IACH,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,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAqB,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,MAA0B;QACrC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;QACjE,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAmB,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,KAAa;QACxB,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,KAAK,EAAE,CAAC,CAAC;IACrD,CAAC;CACF;AAjCD,0CAiCC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Customers resource — GET /v1/customers, GET /v1/customers/{customer_id}.
3
+ */
4
+ import type { BaseClient, CursorPage } from '../base-client';
5
+ import type { CustomerResponse, ListCustomersParams } from '../generated/types';
6
+ export declare class CustomersResource {
7
+ private readonly _client;
8
+ constructor(_client: BaseClient);
9
+ /**
10
+ * Return a paginated list of customers.
11
+ *
12
+ * @param params - Filter and pagination parameters.
13
+ * @returns A CursorPage of CustomerResponse objects.
14
+ */
15
+ list(params?: ListCustomersParams): Promise<CursorPage<CustomerResponse>>;
16
+ /**
17
+ * Retrieve a customer by ID.
18
+ *
19
+ * @param customerId - The customer ID (e.g. "cus_abc123").
20
+ * @returns The CustomerResponse.
21
+ */
22
+ get(customerId: string): Promise<CustomerResponse>;
23
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /**
3
+ * Customers resource — GET /v1/customers, GET /v1/customers/{customer_id}.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CustomersResource = void 0;
7
+ class CustomersResource {
8
+ constructor(_client) {
9
+ this._client = _client;
10
+ }
11
+ /**
12
+ * Return a paginated list of customers.
13
+ *
14
+ * @param params - Filter and pagination parameters.
15
+ * @returns A CursorPage of CustomerResponse objects.
16
+ */
17
+ async list(params = {}) {
18
+ var _a;
19
+ const queryParams = {
20
+ limit: (_a = params.limit) !== null && _a !== void 0 ? _a : 20,
21
+ };
22
+ if (params.email != null)
23
+ queryParams['email'] = params.email;
24
+ if (params.created_after != null)
25
+ queryParams['created_after'] = params.created_after;
26
+ if (params.created_before != null)
27
+ queryParams['created_before'] = params.created_before;
28
+ if (params.cursor != null)
29
+ queryParams['cursor'] = params.cursor;
30
+ return this._client.getPage('/v1/customers', queryParams, (item) => item);
31
+ }
32
+ /**
33
+ * Retrieve a customer by ID.
34
+ *
35
+ * @param customerId - The customer ID (e.g. "cus_abc123").
36
+ * @returns The CustomerResponse.
37
+ */
38
+ async get(customerId) {
39
+ const response = await this._client.get(`/v1/customers/${customerId}`);
40
+ return (await response.json());
41
+ }
42
+ }
43
+ exports.CustomersResource = CustomersResource;
44
+ //# sourceMappingURL=customers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.js","sourceRoot":"","sources":["../../../src/resources/customers.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAKH,MAAa,iBAAiB;IAC5B,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CAAC,SAA8B,EAAE;;QACzC,MAAM,WAAW,GAA8C;YAC7D,KAAK,EAAE,MAAA,MAAM,CAAC,KAAK,mCAAI,EAAE;SAC1B,CAAC;QACF,IAAI,MAAM,CAAC,KAAK,IAAI,IAAI;YAAE,WAAW,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;QAC9D,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI;YAAE,WAAW,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC;QACtF,IAAI,MAAM,CAAC,cAAc,IAAI,IAAI;YAAE,WAAW,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC;QACzF,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI;YAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAmB,eAAe,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAwB,CAAC,CAAC;IAClH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CAAC,UAAkB;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,UAAU,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAqB,CAAC;IACrD,CAAC;CACF;AA9BD,8CA8BC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Files resource — POST /v1/files (multipart upload).
3
+ */
4
+ /// <reference types="node" />
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';
9
+ export declare class FilesResource {
10
+ private readonly _client;
11
+ constructor(_client: BaseClient);
12
+ /**
13
+ * Upload a file for use as a listing deliverable, cover image, or account avatar.
14
+ *
15
+ * Returns a file token valid for 24 hours. Pass the token to:
16
+ * - PUT /v1/listings/{id}/deliverables (as type: 'file', token: '...')
17
+ * - POST /v1/listings (as 'cover')
18
+ * - PUT /v1/account (as 'avatar')
19
+ *
20
+ * Max size: 25 MB.
21
+ *
22
+ * @param file - File content as Buffer or Blob.
23
+ * @param options - Request options.
24
+ * @returns The FileResponse with the file token.
25
+ */
26
+ upload(file: Buffer | Blob, options?: RequestOptions): Promise<FileResponse>;
27
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ /**
3
+ * Files resource — POST /v1/files (multipart upload).
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FilesResource = void 0;
7
+ class FilesResource {
8
+ constructor(_client) {
9
+ this._client = _client;
10
+ }
11
+ /**
12
+ * Upload a file for use as a listing deliverable, cover image, or account avatar.
13
+ *
14
+ * Returns a file token valid for 24 hours. Pass the token to:
15
+ * - PUT /v1/listings/{id}/deliverables (as type: 'file', token: '...')
16
+ * - POST /v1/listings (as 'cover')
17
+ * - PUT /v1/account (as 'avatar')
18
+ *
19
+ * Max size: 25 MB.
20
+ *
21
+ * @param file - File content as Buffer or Blob.
22
+ * @param options - Request options.
23
+ * @returns The FileResponse with the file token.
24
+ */
25
+ async upload(file, options) {
26
+ const formData = new FormData();
27
+ if (Buffer.isBuffer(file)) {
28
+ formData.append('file', new Blob([file]));
29
+ }
30
+ else {
31
+ formData.append('file', file);
32
+ }
33
+ return this._client.postMultipart('/v1/files', formData, options);
34
+ }
35
+ }
36
+ exports.FilesResource = FilesResource;
37
+ //# sourceMappingURL=files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/resources/files.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAMH,MAAa,aAAa;IACxB,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,MAAM,CAAC,IAAmB,EAAE,OAAwB;QACxD,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAChC,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAe,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACF;AA1BD,sCA0BC"}
@@ -1,6 +1,8 @@
1
1
  export { AccountResource } from './account';
2
- export { ListingsResource } from './listings';
3
2
  export { ApiKeysResource } from './api-keys';
3
+ export { CustomersResource } from './customers';
4
+ export { FilesResource } from './files';
5
+ export { ListingsResource } from './listings';
4
6
  export { OrdersResource } from './orders';
5
7
  export { SignupResource } from './signup';
6
8
  export { StripeResource } from './stripe';
@@ -1,12 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebhooksResource = exports.StripeResource = exports.SignupResource = exports.OrdersResource = exports.ApiKeysResource = exports.ListingsResource = exports.AccountResource = void 0;
3
+ exports.WebhooksResource = exports.StripeResource = exports.SignupResource = exports.OrdersResource = exports.ListingsResource = exports.FilesResource = exports.CustomersResource = exports.ApiKeysResource = exports.AccountResource = void 0;
4
4
  var account_1 = require("./account");
5
5
  Object.defineProperty(exports, "AccountResource", { enumerable: true, get: function () { return account_1.AccountResource; } });
6
- var listings_1 = require("./listings");
7
- Object.defineProperty(exports, "ListingsResource", { enumerable: true, get: function () { return listings_1.ListingsResource; } });
8
6
  var api_keys_1 = require("./api-keys");
9
7
  Object.defineProperty(exports, "ApiKeysResource", { enumerable: true, get: function () { return api_keys_1.ApiKeysResource; } });
8
+ var customers_1 = require("./customers");
9
+ Object.defineProperty(exports, "CustomersResource", { enumerable: true, get: function () { return customers_1.CustomersResource; } });
10
+ var files_1 = require("./files");
11
+ Object.defineProperty(exports, "FilesResource", { enumerable: true, get: function () { return files_1.FilesResource; } });
12
+ var listings_1 = require("./listings");
13
+ Object.defineProperty(exports, "ListingsResource", { enumerable: true, get: function () { return listings_1.ListingsResource; } });
10
14
  var orders_1 = require("./orders");
11
15
  Object.defineProperty(exports, "OrdersResource", { enumerable: true, get: function () { return orders_1.OrdersResource; } });
12
16
  var signup_1 = require("./signup");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/index.ts"],"names":[],"mappings":";;;AAAA,qCAA4C;AAAnC,0GAAA,eAAe,OAAA;AACxB,uCAA8C;AAArC,4GAAA,gBAAgB,OAAA;AACzB,uCAA6C;AAApC,2GAAA,eAAe,OAAA;AACxB,mCAA0C;AAAjC,wGAAA,cAAc,OAAA;AACvB,mCAA0C;AAAjC,wGAAA,cAAc,OAAA;AACvB,mCAA0C;AAAjC,wGAAA,cAAc,OAAA;AACvB,uCAA8C;AAArC,4GAAA,gBAAgB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/index.ts"],"names":[],"mappings":";;;AAAA,qCAA4C;AAAnC,0GAAA,eAAe,OAAA;AACxB,uCAA6C;AAApC,2GAAA,eAAe,OAAA;AACxB,yCAAgD;AAAvC,8GAAA,iBAAiB,OAAA;AAC1B,iCAAwC;AAA/B,sGAAA,aAAa,OAAA;AACtB,uCAA8C;AAArC,4GAAA,gBAAgB,OAAA;AACzB,mCAA0C;AAAjC,wGAAA,cAAc,OAAA;AACvB,mCAA0C;AAAjC,wGAAA,cAAc,OAAA;AACvB,mCAA0C;AAAjC,wGAAA,cAAc,OAAA;AACvB,uCAA8C;AAArC,4GAAA,gBAAgB,OAAA"}
@@ -1,8 +1,9 @@
1
1
  /**
2
- * Listings resource — CRUD + pause/resume for /v1/listings.
2
+ * Listings resource — CRUD + publish + deliverables for /v1/listings.
3
3
  */
4
4
  import type { BaseClient, CursorPage } from '../base-client';
5
- import type { CreateListingParams, ListingResponse, UpdateListingParams } from '../types/listing';
5
+ import type { CreateListingParams, ListingResponse, UpdateListingParams, ListListingsParams, SetDeliverablesParams } from '../generated/types';
6
+ import type { RequestOptions } from '../types/shared';
6
7
  /** Resource for the /v1/listings endpoint. */
7
8
  export declare class ListingsResource {
8
9
  private readonly _client;
@@ -10,61 +11,60 @@ export declare class ListingsResource {
10
11
  /**
11
12
  * Create a new listing.
12
13
  *
13
- * Builds the request body from provided params. `cover_blur` is only
14
- * included when it differs from the API default of "auto".
15
- * Currency is inherited from the account.
16
- *
17
14
  * @param params - Listing creation parameters.
15
+ * @param options - Request options (timeoutMs, idempotencyKey).
18
16
  * @returns The created ListingResponse.
19
17
  */
20
- create(params: CreateListingParams): Promise<ListingResponse>;
18
+ create(params: CreateListingParams, options?: RequestOptions): Promise<ListingResponse>;
21
19
  /**
22
- * Retrieve a listing by its URL slug.
20
+ * Return a paginated list of listings.
23
21
  *
24
- * @param slug - The listing's URL slug (e.g. "seo-playbook").
25
- * @returns The ListingResponse for that slug.
22
+ * @param params - Filter and pagination parameters.
23
+ * @returns A CursorPage of ListingResponse objects.
26
24
  */
27
- get(slug: string): Promise<ListingResponse>;
25
+ list(params?: ListListingsParams): Promise<CursorPage<ListingResponse>>;
28
26
  /**
29
- * Return a paginated list of listings.
27
+ * Retrieve a listing by ID.
30
28
  *
31
- * @param params - Pagination parameters.
32
- * @param params.limit - Maximum items per page (default 20).
33
- * @param params.cursor - Pagination cursor from a previous response.
34
- * @returns A CursorPage of ListingResponse objects.
29
+ * @param listingId - The listing ID (e.g. "lst_abc123").
30
+ * @returns The ListingResponse.
35
31
  */
36
- list(params?: {
37
- limit?: number;
38
- cursor?: string;
39
- }): Promise<CursorPage<ListingResponse>>;
32
+ get(listingId: string): Promise<ListingResponse>;
40
33
  /**
41
34
  * Update an existing listing.
42
35
  *
43
- * Only the supplied fields are updated; all others remain unchanged.
44
- *
45
- * @param slug - The listing's URL slug (e.g. "seo-playbook").
36
+ * @param listingId - The listing ID (e.g. "lst_abc123").
46
37
  * @param params - Fields to update.
47
38
  * @returns The updated ListingResponse.
48
39
  */
49
- update(slug: string, params: UpdateListingParams): Promise<ListingResponse>;
40
+ update(listingId: string, params: UpdateListingParams): Promise<ListingResponse>;
50
41
  /**
51
- * Pause a listing, preventing new purchases.
42
+ * Delete a listing.
52
43
  *
53
- * @param slug - The listing's URL slug (e.g. "seo-playbook").
54
- * @returns The paused ListingResponse.
44
+ * @param listingId - The listing ID (e.g. "lst_abc123").
55
45
  */
56
- pause(slug: string): Promise<ListingResponse>;
46
+ delete(listingId: string): Promise<void>;
57
47
  /**
58
- * Resume a paused listing, allowing new purchases.
48
+ * Publish a draft listing.
59
49
  *
60
- * @param slug - The listing's URL slug (e.g. "seo-playbook").
61
- * @returns The resumed ListingResponse.
50
+ * @param listingId - The listing ID (e.g. "lst_abc123").
51
+ * @param options - Request options.
52
+ * @returns The published ListingResponse.
62
53
  */
63
- resume(slug: string): Promise<ListingResponse>;
54
+ publish(listingId: string, options?: RequestOptions): Promise<ListingResponse>;
64
55
  /**
65
- * Delete a listing.
56
+ * Set deliverables on a listing (replaces all existing).
57
+ *
58
+ * @param listingId - The listing ID (e.g. "lst_abc123").
59
+ * @param params - Deliverables array.
60
+ * @returns The updated ListingResponse.
61
+ */
62
+ setDeliverables(listingId: string, params: SetDeliverablesParams): Promise<ListingResponse>;
63
+ /**
64
+ * Remove all deliverables from a listing.
66
65
  *
67
- * @param slug - The listing's URL slug (e.g. "seo-playbook").
66
+ * @param listingId - The listing ID (e.g. "lst_abc123").
67
+ * @returns The updated ListingResponse.
68
68
  */
69
- delete(slug: string): Promise<void>;
69
+ removeDeliverables(listingId: string): Promise<ListingResponse>;
70
70
  }