@eide/foir-cli 0.11.0 → 0.11.1
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/cli.js +16 -36
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2359,9 +2359,6 @@ import {
|
|
|
2359
2359
|
UpdateCustomerProfileSchemaRequestSchema,
|
|
2360
2360
|
GetCustomerResolutionAttributesRequestSchema,
|
|
2361
2361
|
GetEditorConfigsRequestSchema,
|
|
2362
|
-
ListEmailActionsRequestSchema,
|
|
2363
|
-
ListResendTemplatesRequestSchema,
|
|
2364
|
-
UpdateEmailActionRequestSchema,
|
|
2365
2362
|
ListVariantCatalogRequestSchema,
|
|
2366
2363
|
GetVariantCatalogEntryRequestSchema,
|
|
2367
2364
|
CreateVariantCatalogEntryRequestSchema,
|
|
@@ -2741,34 +2738,6 @@ function createSettingsMethods(client) {
|
|
|
2741
2738
|
create8(ClearRecentlyOpenedRequestSchema, {})
|
|
2742
2739
|
);
|
|
2743
2740
|
return resp.success;
|
|
2744
|
-
},
|
|
2745
|
-
// ── Email Actions ──────────────────────────────────────────
|
|
2746
|
-
async listEmailActions(params = {}) {
|
|
2747
|
-
return client.listEmailActions(
|
|
2748
|
-
create8(ListEmailActionsRequestSchema, {
|
|
2749
|
-
limit: params.limit ?? 50,
|
|
2750
|
-
offset: params.offset ?? 0
|
|
2751
|
-
})
|
|
2752
|
-
);
|
|
2753
|
-
},
|
|
2754
|
-
async updateEmailAction(params) {
|
|
2755
|
-
const resp = await client.updateEmailAction(
|
|
2756
|
-
create8(UpdateEmailActionRequestSchema, {
|
|
2757
|
-
key: params.key,
|
|
2758
|
-
resendTemplateId: params.resendTemplateId,
|
|
2759
|
-
defaultFrom: params.defaultFrom,
|
|
2760
|
-
defaultSubject: params.defaultSubject,
|
|
2761
|
-
customData: params.customData,
|
|
2762
|
-
isActive: params.isActive
|
|
2763
|
-
})
|
|
2764
|
-
);
|
|
2765
|
-
return resp.action ?? null;
|
|
2766
|
-
},
|
|
2767
|
-
async listResendTemplates() {
|
|
2768
|
-
const resp = await client.listResendTemplates(
|
|
2769
|
-
create8(ListResendTemplatesRequestSchema, {})
|
|
2770
|
-
);
|
|
2771
|
-
return resp.templates ?? [];
|
|
2772
2741
|
}
|
|
2773
2742
|
};
|
|
2774
2743
|
}
|
|
@@ -3612,11 +3581,22 @@ function pad(str, width) {
|
|
|
3612
3581
|
}
|
|
3613
3582
|
return str.padEnd(width);
|
|
3614
3583
|
}
|
|
3615
|
-
function timeAgo(
|
|
3616
|
-
if (
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3584
|
+
function timeAgo(value) {
|
|
3585
|
+
if (value == null) return "\u2014";
|
|
3586
|
+
let date;
|
|
3587
|
+
if (value instanceof Date) {
|
|
3588
|
+
date = value;
|
|
3589
|
+
} else if (typeof value === "string") {
|
|
3590
|
+
date = new Date(value);
|
|
3591
|
+
} else if (typeof value === "object" && "seconds" in value && value.seconds != null) {
|
|
3592
|
+
const seconds = typeof value.seconds === "bigint" ? Number(value.seconds) : value.seconds;
|
|
3593
|
+
const nanos = value.nanos ?? 0;
|
|
3594
|
+
date = new Date(seconds * 1e3 + Math.floor(nanos / 1e6));
|
|
3595
|
+
} else {
|
|
3596
|
+
return "\u2014";
|
|
3597
|
+
}
|
|
3598
|
+
if (Number.isNaN(date.getTime())) return "\u2014";
|
|
3599
|
+
const diffMs = Date.now() - date.getTime();
|
|
3620
3600
|
if (diffMs < 0) return "future";
|
|
3621
3601
|
const minutes = Math.floor(diffMs / 6e4);
|
|
3622
3602
|
if (minutes < 1) return "just now";
|