een-api-toolkit 0.3.15 → 0.3.16

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/dist/index.d.ts CHANGED
@@ -868,6 +868,30 @@ export declare type FeedMediaType = 'video' | 'audio' | 'image' | 'halfDuplex' |
868
868
  */
869
869
  export declare type FeedStreamType = 'main' | 'preview' | 'talkdown';
870
870
 
871
+ /**
872
+ * Convert ISO 8601 timestamp from Z format to +00:00 format.
873
+ *
874
+ * @remarks
875
+ * The EEN API requires timestamps in +00:00 format, not Z format.
876
+ * This function converts timestamps like `2024-01-01T00:00:00.000Z`
877
+ * to `2024-01-01T00:00:00.000+00:00`.
878
+ *
879
+ * @param timestamp - ISO 8601 timestamp string
880
+ * @returns Timestamp in +00:00 format
881
+ *
882
+ * @example
883
+ * ```typescript
884
+ * formatTimestamp('2024-01-01T00:00:00.000Z')
885
+ * // Returns: '2024-01-01T00:00:00.000+00:00'
886
+ *
887
+ * formatTimestamp(new Date().toISOString())
888
+ * // Returns: timestamp with +00:00 suffix
889
+ * ```
890
+ *
891
+ * @category Utilities
892
+ */
893
+ export declare function formatTimestamp(timestamp: string): string;
894
+
871
895
  /**
872
896
  * Exchange authorization code for access token
873
897
  */
package/dist/index.js CHANGED
@@ -91,6 +91,9 @@ function l(e) {
91
91
  function r(e, n, t, i) {
92
92
  return { data: null, error: { code: e, message: n, status: t, details: i } };
93
93
  }
94
+ function p(e) {
95
+ return e.endsWith("+00:00") ? e : e.endsWith("Z") ? e.replace("Z", "+00:00") : e;
96
+ }
94
97
  let F = null;
95
98
  function Re() {
96
99
  return F || (F = Promise.resolve().then(() => ye).then((e) => e.refreshToken)), F;
@@ -873,9 +876,6 @@ async function ke(e) {
873
876
  return r("API_ERROR", t || e.statusText || "API error", n);
874
877
  }
875
878
  }
876
- function p(e) {
877
- return e.endsWith("+00:00") ? e : e.endsWith("Z") ? e.replace("Z", "+00:00") : e;
878
- }
879
879
  async function Ve(e) {
880
880
  const n = _();
881
881
  if (!n.isAuthenticated)
@@ -1243,6 +1243,7 @@ async function G(e) {
1243
1243
  export {
1244
1244
  me as STORAGE_STRATEGY_DESCRIPTIONS,
1245
1245
  r as failure,
1246
+ p as formatTimestamp,
1246
1247
  M as getAccessToken,
1247
1248
  Ye as getAlert,
1248
1249
  Ee as getAuthUrl,