feeef 0.9.2 → 0.9.4

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
@@ -612,6 +612,29 @@ var UserRepository = class extends ModelRepository {
612
612
  };
613
613
  return this.auth;
614
614
  }
615
+ /**
616
+ * Generates a short-lived, single-use Feeef auth code for cross-device / QR login.
617
+ *
618
+ * POST `/users/auth/code` (auth required).
619
+ */
620
+ async createAuthCode(options = {}) {
621
+ const res = await this.client.post(`/${this.resource}/auth/code`, {
622
+ redirect: options.redirect
623
+ });
624
+ return res.data;
625
+ }
626
+ /**
627
+ * Signs in using a one-time Feeef auth code (OAuth-like semantics).
628
+ *
629
+ * POST `/users/auth/code/consume` (public). On success it returns a bearer token and user.
630
+ */
631
+ async signinWithCode(options) {
632
+ const res = await this.client.post(`/${this.resource}/auth/code/consume`, {
633
+ authCode: options.authCode
634
+ });
635
+ this.auth = res.data;
636
+ return this.auth;
637
+ }
615
638
  /**
616
639
  * Signs out the currently authenticated user.
617
640
  * Deletes the token on the server and clears local auth state.
@@ -4045,6 +4068,7 @@ var generatePublicStoreIntegrations = (integrations) => {
4045
4068
  tiktokPixel,
4046
4069
  googleAnalytics,
4047
4070
  googleTags,
4071
+ clarity,
4048
4072
  orderdz,
4049
4073
  webhooks,
4050
4074
  ai,
@@ -4057,6 +4081,7 @@ var generatePublicStoreIntegrations = (integrations) => {
4057
4081
  tiktokPixel: generatePublicStoreIntegrationTiktokPixel(tiktokPixel) || null,
4058
4082
  googleAnalytics: generatePublicStoreIntegrationGoogleAnalytics(googleAnalytics) || null,
4059
4083
  googleTags: generatePublicStoreIntegrationGoogleTags(googleTags) || null,
4084
+ clarity: generatePublicStoreIntegrationClarity(clarity) || null,
4060
4085
  googleSheet: null,
4061
4086
  ai: generatePublicStoreIntegrationAi(ai) || null,
4062
4087
  orderdz: generatePublicStoreIntegrationOrderdz(orderdz) || null,
@@ -4130,6 +4155,16 @@ var generatePublicStoreIntegrationGoogleTags = (googleTags) => {
4130
4155
  active
4131
4156
  };
4132
4157
  };
4158
+ var generatePublicStoreIntegrationClarity = (clarity) => {
4159
+ if (!clarity) return null;
4160
+ if (!clarity.active) return null;
4161
+ const code = typeof clarity.trackingCode === "string" ? clarity.trackingCode.trim() : "";
4162
+ if (!code) return null;
4163
+ return {
4164
+ active: true,
4165
+ trackingCode: code
4166
+ };
4167
+ };
4133
4168
  var generatePublicStoreIntegrationAi = (ai) => {
4134
4169
  if (!ai) return null;
4135
4170
  return {
@@ -5025,6 +5060,7 @@ export {
5025
5060
  generatePublicIntegrationsDataPaymentMethod,
5026
5061
  generatePublicIntegrationsDataTiktokPixel,
5027
5062
  generatePublicStoreIntegrationAi,
5063
+ generatePublicStoreIntegrationClarity,
5028
5064
  generatePublicStoreIntegrationCustomFields,
5029
5065
  generatePublicStoreIntegrationGoogleAnalytics,
5030
5066
  generatePublicStoreIntegrationGoogleSheet,