feeef 0.8.0 → 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.
@@ -1766,7 +1817,8 @@ function createImageGenerationFormData(input) {
1766
1817
  if (input.title && input.title.trim().length > 0) formData.append("title", input.title.trim());
1767
1818
  if (input.prompt && input.prompt.trim().length > 0) formData.append("prompt", input.prompt.trim());
1768
1819
  if (input.aspectRatio) formData.append("aspectRatio", input.aspectRatio);
1769
- formData.append("resolution", input.resolution ?? "MEDIA_RESOLUTION_LOW");
1820
+ if (input.imageSize) formData.append("imageSize", input.imageSize);
1821
+ formData.append("resolution", input.resolution ?? "MEDIA_RESOLUTION_HIGH");
1770
1822
  if (input.systemInstructions && input.systemInstructions.trim().length > 0) {
1771
1823
  formData.append("systemInstructions", input.systemInstructions.trim());
1772
1824
  }
@@ -3522,7 +3574,8 @@ var generatePublicStoreIntegrationMetaPixel = (metaPixel) => {
3522
3574
  })),
3523
3575
  active: metaPixel.active,
3524
3576
  objective: metaPixel.objective,
3525
- draftObjective: metaPixel.draftObjective
3577
+ draftObjective: metaPixel.draftObjective,
3578
+ mode: metaPixel.mode
3526
3579
  };
3527
3580
  };
3528
3581
  var generatePublicStoreIntegrationTiktokPixel = (tiktokPixel) => {
@@ -3533,7 +3586,8 @@ var generatePublicStoreIntegrationTiktokPixel = (tiktokPixel) => {
3533
3586
  })),
3534
3587
  active: tiktokPixel.active,
3535
3588
  objective: tiktokPixel.objective,
3536
- draftObjective: tiktokPixel.draftObjective
3589
+ draftObjective: tiktokPixel.draftObjective,
3590
+ mode: tiktokPixel.mode
3537
3591
  };
3538
3592
  };
3539
3593
  var generatePublicStoreIntegrationGoogleAnalytics = (googleAnalytics) => {
@@ -3609,6 +3663,13 @@ var StoreMemberRole = /* @__PURE__ */ ((StoreMemberRole2) => {
3609
3663
  StoreMemberRole2["confermer"] = "confermer";
3610
3664
  return StoreMemberRole2;
3611
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 || {});
3612
3673
  var StoreActionType = /* @__PURE__ */ ((StoreActionType2) => {
3613
3674
  StoreActionType2["link"] = "link";
3614
3675
  StoreActionType2["whatsapp"] = "whatsapp";
@@ -3616,6 +3677,12 @@ var StoreActionType = /* @__PURE__ */ ((StoreActionType2) => {
3616
3677
  StoreActionType2["phone"] = "phone";
3617
3678
  return StoreActionType2;
3618
3679
  })(StoreActionType || {});
3680
+ var PixelReportMode = /* @__PURE__ */ ((PixelReportMode2) => {
3681
+ PixelReportMode2["server"] = "server";
3682
+ PixelReportMode2["client"] = "client";
3683
+ PixelReportMode2["both"] = "both";
3684
+ return PixelReportMode2;
3685
+ })(PixelReportMode || {});
3619
3686
  var WebhookEvent = /* @__PURE__ */ ((WebhookEvent2) => {
3620
3687
  WebhookEvent2["ORDER_CREATED"] = "orderCreated";
3621
3688
  WebhookEvent2["ORDER_UPDATED"] = "orderUpdated";
@@ -3879,6 +3946,7 @@ export {
3879
3946
  OrderRepository,
3880
3947
  OrderStatus,
3881
3948
  PaymentStatus,
3949
+ PixelReportMode,
3882
3950
  ProcolisDeliveryIntegrationApi,
3883
3951
  ProductRepository,
3884
3952
  ProductStatus,
@@ -3893,6 +3961,7 @@ export {
3893
3961
  StateRepository,
3894
3962
  StorageService,
3895
3963
  StoreActionType,
3964
+ StoreInviteStatus,
3896
3965
  StoreMemberRole,
3897
3966
  StoreRepository,
3898
3967
  StoreSubscriptionStatus,