@whop/sdk 0.0.1-canary.0 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/client.d.mts +16 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +16 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +7 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +7 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/apps.d.mts +16 -0
  12. package/resources/apps.d.mts.map +1 -1
  13. package/resources/apps.d.ts +16 -0
  14. package/resources/apps.d.ts.map +1 -1
  15. package/resources/checkout-configurations.d.mts +21 -18
  16. package/resources/checkout-configurations.d.mts.map +1 -1
  17. package/resources/checkout-configurations.d.ts +21 -18
  18. package/resources/checkout-configurations.d.ts.map +1 -1
  19. package/resources/checkout-configurations.js +1 -1
  20. package/resources/checkout-configurations.mjs +1 -1
  21. package/resources/experiences.d.mts +32 -0
  22. package/resources/experiences.d.mts.map +1 -1
  23. package/resources/experiences.d.ts +32 -0
  24. package/resources/experiences.d.ts.map +1 -1
  25. package/resources/forums.d.mts +112 -0
  26. package/resources/forums.d.mts.map +1 -0
  27. package/resources/forums.d.ts +112 -0
  28. package/resources/forums.d.ts.map +1 -0
  29. package/resources/forums.js +41 -0
  30. package/resources/forums.js.map +1 -0
  31. package/resources/forums.mjs +37 -0
  32. package/resources/forums.mjs.map +1 -0
  33. package/resources/index.d.mts +3 -1
  34. package/resources/index.d.mts.map +1 -1
  35. package/resources/index.d.ts +3 -1
  36. package/resources/index.d.ts.map +1 -1
  37. package/resources/index.js +5 -1
  38. package/resources/index.js.map +1 -1
  39. package/resources/index.mjs +2 -0
  40. package/resources/index.mjs.map +1 -1
  41. package/resources/invoices.d.mts +5 -2
  42. package/resources/invoices.d.mts.map +1 -1
  43. package/resources/invoices.d.ts +5 -2
  44. package/resources/invoices.d.ts.map +1 -1
  45. package/resources/members.d.mts +270 -0
  46. package/resources/members.d.mts.map +1 -0
  47. package/resources/members.d.ts +270 -0
  48. package/resources/members.d.ts.map +1 -0
  49. package/resources/members.js +35 -0
  50. package/resources/members.js.map +1 -0
  51. package/resources/members.mjs +31 -0
  52. package/resources/members.mjs.map +1 -0
  53. package/resources/plans.d.mts +5 -2
  54. package/resources/plans.d.mts.map +1 -1
  55. package/resources/plans.d.ts +5 -2
  56. package/resources/plans.d.ts.map +1 -1
  57. package/resources/shared.d.mts +176 -11
  58. package/resources/shared.d.mts.map +1 -1
  59. package/resources/shared.d.ts +176 -11
  60. package/resources/shared.d.ts.map +1 -1
  61. package/resources/users.d.mts +18 -1
  62. package/resources/users.d.mts.map +1 -1
  63. package/resources/users.d.ts +18 -1
  64. package/resources/users.d.ts.map +1 -1
  65. package/resources/users.js.map +1 -1
  66. package/resources/users.mjs.map +1 -1
  67. package/resources/webhooks.d.mts +224 -2
  68. package/resources/webhooks.d.mts.map +1 -1
  69. package/resources/webhooks.d.ts +224 -2
  70. package/resources/webhooks.d.ts.map +1 -1
  71. package/src/client.ts +63 -2
  72. package/src/resources/apps.ts +18 -0
  73. package/src/resources/checkout-configurations.ts +21 -18
  74. package/src/resources/experiences.ts +36 -0
  75. package/src/resources/forums.ts +152 -0
  76. package/src/resources/index.ts +24 -0
  77. package/src/resources/invoices.ts +5 -2
  78. package/src/resources/members.ts +337 -0
  79. package/src/resources/plans.ts +5 -2
  80. package/src/resources/shared.ts +217 -11
  81. package/src/resources/users.ts +20 -1
  82. package/src/resources/webhooks.ts +293 -1
  83. package/src/version.ts +1 -1
  84. package/version.d.mts +1 -1
  85. package/version.d.mts.map +1 -1
  86. package/version.d.ts +1 -1
  87. package/version.d.ts.map +1 -1
  88. package/version.js +1 -1
  89. package/version.js.map +1 -1
  90. package/version.mjs +1 -1
  91. package/version.mjs.map +1 -1
@@ -127,11 +127,293 @@ export interface InvoiceVoidedWebhookEvent {
127
127
  type: 'invoice.voided';
128
128
  }
129
129
 
130
+ export interface MembershipActivatedWebhookEvent {
131
+ /**
132
+ * A unique ID for every single webhook request
133
+ */
134
+ id: string;
135
+
136
+ /**
137
+ * The API version for this webhook
138
+ */
139
+ api_version: 'v1';
140
+
141
+ /**
142
+ * A membership represents a purchase between a User and a Company for a specific
143
+ * Product.
144
+ */
145
+ data: Shared.Membership;
146
+
147
+ /**
148
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
149
+ */
150
+ timestamp: string;
151
+
152
+ /**
153
+ * The webhook event type
154
+ */
155
+ type: 'membership.activated';
156
+ }
157
+
158
+ export interface MembershipDeactivatedWebhookEvent {
159
+ /**
160
+ * A unique ID for every single webhook request
161
+ */
162
+ id: string;
163
+
164
+ /**
165
+ * The API version for this webhook
166
+ */
167
+ api_version: 'v1';
168
+
169
+ /**
170
+ * A membership represents a purchase between a User and a Company for a specific
171
+ * Product.
172
+ */
173
+ data: Shared.Membership;
174
+
175
+ /**
176
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
177
+ */
178
+ timestamp: string;
179
+
180
+ /**
181
+ * The webhook event type
182
+ */
183
+ type: 'membership.deactivated';
184
+ }
185
+
186
+ export interface EntryCreatedWebhookEvent {
187
+ /**
188
+ * A unique ID for every single webhook request
189
+ */
190
+ id: string;
191
+
192
+ /**
193
+ * The API version for this webhook
194
+ */
195
+ api_version: 'v1';
196
+
197
+ /**
198
+ * An object representing an entry in a waitlist.
199
+ */
200
+ data: Shared.Entry;
201
+
202
+ /**
203
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
204
+ */
205
+ timestamp: string;
206
+
207
+ /**
208
+ * The webhook event type
209
+ */
210
+ type: 'entry.created';
211
+ }
212
+
213
+ export interface EntryApprovedWebhookEvent {
214
+ /**
215
+ * A unique ID for every single webhook request
216
+ */
217
+ id: string;
218
+
219
+ /**
220
+ * The API version for this webhook
221
+ */
222
+ api_version: 'v1';
223
+
224
+ /**
225
+ * An object representing an entry in a waitlist.
226
+ */
227
+ data: Shared.Entry;
228
+
229
+ /**
230
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
231
+ */
232
+ timestamp: string;
233
+
234
+ /**
235
+ * The webhook event type
236
+ */
237
+ type: 'entry.approved';
238
+ }
239
+
240
+ export interface EntryDeniedWebhookEvent {
241
+ /**
242
+ * A unique ID for every single webhook request
243
+ */
244
+ id: string;
245
+
246
+ /**
247
+ * The API version for this webhook
248
+ */
249
+ api_version: 'v1';
250
+
251
+ /**
252
+ * An object representing an entry in a waitlist.
253
+ */
254
+ data: Shared.Entry;
255
+
256
+ /**
257
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
258
+ */
259
+ timestamp: string;
260
+
261
+ /**
262
+ * The webhook event type
263
+ */
264
+ type: 'entry.denied';
265
+ }
266
+
267
+ export interface EntryDeletedWebhookEvent {
268
+ /**
269
+ * A unique ID for every single webhook request
270
+ */
271
+ id: string;
272
+
273
+ /**
274
+ * The API version for this webhook
275
+ */
276
+ api_version: 'v1';
277
+
278
+ /**
279
+ * An object representing an entry in a waitlist.
280
+ */
281
+ data: Shared.Entry;
282
+
283
+ /**
284
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
285
+ */
286
+ timestamp: string;
287
+
288
+ /**
289
+ * The webhook event type
290
+ */
291
+ type: 'entry.deleted';
292
+ }
293
+
294
+ export interface CourseLessonInteractionCompletedWebhookEvent {
295
+ /**
296
+ * A unique ID for every single webhook request
297
+ */
298
+ id: string;
299
+
300
+ /**
301
+ * The API version for this webhook
302
+ */
303
+ api_version: 'v1';
304
+
305
+ /**
306
+ * A lesson interaction tracking user progress in courses
307
+ */
308
+ data: Shared.CourseLessonInteraction;
309
+
310
+ /**
311
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
312
+ */
313
+ timestamp: string;
314
+
315
+ /**
316
+ * The webhook event type
317
+ */
318
+ type: 'course_lesson_interaction.completed';
319
+ }
320
+
321
+ export interface PaymentSucceededWebhookEvent {
322
+ /**
323
+ * A unique ID for every single webhook request
324
+ */
325
+ id: string;
326
+
327
+ /**
328
+ * The API version for this webhook
329
+ */
330
+ api_version: 'v1';
331
+
332
+ /**
333
+ * An object representing a receipt for a membership.
334
+ */
335
+ data: Shared.Payment;
336
+
337
+ /**
338
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
339
+ */
340
+ timestamp: string;
341
+
342
+ /**
343
+ * The webhook event type
344
+ */
345
+ type: 'payment.succeeded';
346
+ }
347
+
348
+ export interface PaymentFailedWebhookEvent {
349
+ /**
350
+ * A unique ID for every single webhook request
351
+ */
352
+ id: string;
353
+
354
+ /**
355
+ * The API version for this webhook
356
+ */
357
+ api_version: 'v1';
358
+
359
+ /**
360
+ * An object representing a receipt for a membership.
361
+ */
362
+ data: Shared.Payment;
363
+
364
+ /**
365
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
366
+ */
367
+ timestamp: string;
368
+
369
+ /**
370
+ * The webhook event type
371
+ */
372
+ type: 'payment.failed';
373
+ }
374
+
375
+ export interface PaymentPendingWebhookEvent {
376
+ /**
377
+ * A unique ID for every single webhook request
378
+ */
379
+ id: string;
380
+
381
+ /**
382
+ * The API version for this webhook
383
+ */
384
+ api_version: 'v1';
385
+
386
+ /**
387
+ * An object representing a receipt for a membership.
388
+ */
389
+ data: Shared.Payment;
390
+
391
+ /**
392
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
393
+ */
394
+ timestamp: string;
395
+
396
+ /**
397
+ * The webhook event type
398
+ */
399
+ type: 'payment.pending';
400
+ }
401
+
130
402
  export type UnwrapWebhookEvent =
131
403
  | InvoiceCreatedWebhookEvent
132
404
  | InvoicePaidWebhookEvent
133
405
  | InvoicePastDueWebhookEvent
134
- | InvoiceVoidedWebhookEvent;
406
+ | InvoiceVoidedWebhookEvent
407
+ | MembershipActivatedWebhookEvent
408
+ | MembershipDeactivatedWebhookEvent
409
+ | EntryCreatedWebhookEvent
410
+ | EntryApprovedWebhookEvent
411
+ | EntryDeniedWebhookEvent
412
+ | EntryDeletedWebhookEvent
413
+ | CourseLessonInteractionCompletedWebhookEvent
414
+ | PaymentSucceededWebhookEvent
415
+ | PaymentFailedWebhookEvent
416
+ | PaymentPendingWebhookEvent;
135
417
 
136
418
  export declare namespace Webhooks {
137
419
  export {
@@ -139,6 +421,16 @@ export declare namespace Webhooks {
139
421
  type InvoicePaidWebhookEvent as InvoicePaidWebhookEvent,
140
422
  type InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent,
141
423
  type InvoiceVoidedWebhookEvent as InvoiceVoidedWebhookEvent,
424
+ type MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent,
425
+ type MembershipDeactivatedWebhookEvent as MembershipDeactivatedWebhookEvent,
426
+ type EntryCreatedWebhookEvent as EntryCreatedWebhookEvent,
427
+ type EntryApprovedWebhookEvent as EntryApprovedWebhookEvent,
428
+ type EntryDeniedWebhookEvent as EntryDeniedWebhookEvent,
429
+ type EntryDeletedWebhookEvent as EntryDeletedWebhookEvent,
430
+ type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent,
431
+ type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent,
432
+ type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent,
433
+ type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent,
142
434
  type UnwrapWebhookEvent as UnwrapWebhookEvent,
143
435
  };
144
436
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-canary.0'; // x-release-please-version
1
+ export const VERSION = '0.0.2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.1-canary.0";
1
+ export declare const VERSION = "0.0.2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
1
+ {"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.1-canary.0";
1
+ export declare const VERSION = "0.0.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.0.1-canary.0'; // x-release-please-version
4
+ exports.VERSION = '0.0.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,gBAAgB,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.0.1-canary.0'; // x-release-please-version
1
+ export const VERSION = '0.0.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
package/version.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}