feeef 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -409,6 +409,57 @@ var StoreRepository = class extends ModelRepository {
409
409
  async removeMember(storeId, memberId) {
410
410
  await this.client.delete(`/${this.resource}/${storeId}/members/${memberId}`);
411
411
  }
412
+ /**
413
+ * Creates a store invite (sends email to invitee).
414
+ * @param storeId - The store ID.
415
+ * @param data - The invite data.
416
+ * @returns A Promise that resolves to the created invite.
417
+ */
418
+ async createInvite(storeId, data) {
419
+ const res = await this.client.post(`/${this.resource}/${storeId}/invites`, data);
420
+ return res.data;
421
+ }
422
+ /**
423
+ * Lists invites for a store.
424
+ * @param storeId - The store ID.
425
+ * @param params - Optional filters (e.g. status).
426
+ * @returns A Promise that resolves to the list of invites.
427
+ */
428
+ async listInvites(storeId, params) {
429
+ const res = await this.client.get(`/${this.resource}/${storeId}/invites`, { params });
430
+ return res.data;
431
+ }
432
+ /**
433
+ * Revokes a pending invite.
434
+ * @param storeId - The store ID.
435
+ * @param inviteId - The invite ID.
436
+ */
437
+ async revokeInvite(storeId, inviteId) {
438
+ await this.client.delete(`/${this.resource}/${storeId}/invites/${inviteId}`);
439
+ }
440
+ /**
441
+ * Gets invite details (public or full if authorized).
442
+ * @param storeId - The store ID.
443
+ * @param inviteId - The invite ID.
444
+ * @returns A Promise that resolves to the invite.
445
+ */
446
+ async getInvite(storeId, inviteId) {
447
+ const res = await this.client.get(`/${this.resource}/${storeId}/invites/${inviteId}`);
448
+ return res.data;
449
+ }
450
+ /**
451
+ * Accepts an invite (authenticated user's email must match invite email).
452
+ * @param storeId - The store ID.
453
+ * @param inviteId - The invite ID.
454
+ * @param token - The invite token from the email link.
455
+ * @returns A Promise that resolves to the created store member.
456
+ */
457
+ async acceptInvite(storeId, inviteId, token) {
458
+ const res = await this.client.post(`/${this.resource}/${storeId}/invites/${inviteId}/accept`, {
459
+ token
460
+ });
461
+ return res.data;
462
+ }
412
463
  /**
413
464
  * Upgrades or renews a store's subscription plan.
414
465
  * @param id - The store ID.
@@ -3523,7 +3574,8 @@ var generatePublicStoreIntegrationMetaPixel = (metaPixel) => {
3523
3574
  })),
3524
3575
  active: metaPixel.active,
3525
3576
  objective: metaPixel.objective,
3526
- draftObjective: metaPixel.draftObjective
3577
+ draftObjective: metaPixel.draftObjective,
3578
+ mode: metaPixel.mode
3527
3579
  };
3528
3580
  };
3529
3581
  var generatePublicStoreIntegrationTiktokPixel = (tiktokPixel) => {
@@ -3534,7 +3586,8 @@ var generatePublicStoreIntegrationTiktokPixel = (tiktokPixel) => {
3534
3586
  })),
3535
3587
  active: tiktokPixel.active,
3536
3588
  objective: tiktokPixel.objective,
3537
- draftObjective: tiktokPixel.draftObjective
3589
+ draftObjective: tiktokPixel.draftObjective,
3590
+ mode: tiktokPixel.mode
3538
3591
  };
3539
3592
  };
3540
3593
  var generatePublicStoreIntegrationGoogleAnalytics = (googleAnalytics) => {
@@ -3610,6 +3663,13 @@ var StoreMemberRole = /* @__PURE__ */ ((StoreMemberRole2) => {
3610
3663
  StoreMemberRole2["confermer"] = "confermer";
3611
3664
  return StoreMemberRole2;
3612
3665
  })(StoreMemberRole || {});
3666
+ var StoreInviteStatus = /* @__PURE__ */ ((StoreInviteStatus2) => {
3667
+ StoreInviteStatus2["pending"] = "pending";
3668
+ StoreInviteStatus2["accepted"] = "accepted";
3669
+ StoreInviteStatus2["revoked"] = "revoked";
3670
+ StoreInviteStatus2["expired"] = "expired";
3671
+ return StoreInviteStatus2;
3672
+ })(StoreInviteStatus || {});
3613
3673
  var StoreActionType = /* @__PURE__ */ ((StoreActionType2) => {
3614
3674
  StoreActionType2["link"] = "link";
3615
3675
  StoreActionType2["whatsapp"] = "whatsapp";
@@ -3617,6 +3677,12 @@ var StoreActionType = /* @__PURE__ */ ((StoreActionType2) => {
3617
3677
  StoreActionType2["phone"] = "phone";
3618
3678
  return StoreActionType2;
3619
3679
  })(StoreActionType || {});
3680
+ var PixelReportMode = /* @__PURE__ */ ((PixelReportMode2) => {
3681
+ PixelReportMode2["server"] = "server";
3682
+ PixelReportMode2["client"] = "client";
3683
+ PixelReportMode2["both"] = "both";
3684
+ return PixelReportMode2;
3685
+ })(PixelReportMode || {});
3620
3686
  var WebhookEvent = /* @__PURE__ */ ((WebhookEvent2) => {
3621
3687
  WebhookEvent2["ORDER_CREATED"] = "orderCreated";
3622
3688
  WebhookEvent2["ORDER_UPDATED"] = "orderUpdated";
@@ -3880,6 +3946,7 @@ export {
3880
3946
  OrderRepository,
3881
3947
  OrderStatus,
3882
3948
  PaymentStatus,
3949
+ PixelReportMode,
3883
3950
  ProcolisDeliveryIntegrationApi,
3884
3951
  ProductRepository,
3885
3952
  ProductStatus,
@@ -3894,6 +3961,7 @@ export {
3894
3961
  StateRepository,
3895
3962
  StorageService,
3896
3963
  StoreActionType,
3964
+ StoreInviteStatus,
3897
3965
  StoreMemberRole,
3898
3966
  StoreRepository,
3899
3967
  StoreSubscriptionStatus,