@klappay/types 3.8.0 → 4.0.0

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.mts CHANGED
@@ -2955,7 +2955,7 @@ declare const SetRecipientPayoutSchema: z.ZodObject<{
2955
2955
  }>;
2956
2956
  type SetRecipientPayoutInput = z.infer<typeof SetRecipientPayoutSchema>;
2957
2957
 
2958
- declare const TransactionSourceSchema: z.ZodEnum<["moralis_webhook", "reconciliation_job", "sandbox"]>;
2958
+ declare const TransactionSourceSchema: z.ZodEnum<["contract_watcher", "reconciliation_job", "sandbox"]>;
2959
2959
  type TransactionSource = z.infer<typeof TransactionSourceSchema>;
2960
2960
  declare const TimelineEventTypeSchema: z.ZodEnum<["charge.created", "charge.expired", "transaction.detected", "split.distributed", "webhook.dispatched", "webhook.delivered", "webhook.failed", "transfer.reclaimed"]>;
2961
2961
  type TimelineEventType = z.infer<typeof TimelineEventTypeSchema>;
@@ -2964,7 +2964,7 @@ declare const TimelineEventSchema: z.ZodObject<{
2964
2964
  at: z.ZodString;
2965
2965
  txHash: z.ZodOptional<z.ZodString>;
2966
2966
  amount: z.ZodOptional<z.ZodNumber>;
2967
- source: z.ZodOptional<z.ZodEnum<["moralis_webhook", "reconciliation_job", "sandbox"]>>;
2967
+ source: z.ZodOptional<z.ZodEnum<["contract_watcher", "reconciliation_job", "sandbox"]>>;
2968
2968
  token: z.ZodOptional<z.ZodEnum<["USDC", "USDT"]>>;
2969
2969
  network: z.ZodOptional<z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>>;
2970
2970
  causedTransition: z.ZodOptional<z.ZodBoolean>;
@@ -2977,7 +2977,7 @@ declare const TimelineEventSchema: z.ZodObject<{
2977
2977
  token?: "USDC" | "USDT" | undefined;
2978
2978
  network?: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb" | undefined;
2979
2979
  amount?: number | undefined;
2980
- source?: "moralis_webhook" | "reconciliation_job" | "sandbox" | undefined;
2980
+ source?: "contract_watcher" | "reconciliation_job" | "sandbox" | undefined;
2981
2981
  txHash?: string | undefined;
2982
2982
  causedTransition?: boolean | undefined;
2983
2983
  attempts?: number | undefined;
@@ -2989,7 +2989,7 @@ declare const TimelineEventSchema: z.ZodObject<{
2989
2989
  token?: "USDC" | "USDT" | undefined;
2990
2990
  network?: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb" | undefined;
2991
2991
  amount?: number | undefined;
2992
- source?: "moralis_webhook" | "reconciliation_job" | "sandbox" | undefined;
2992
+ source?: "contract_watcher" | "reconciliation_job" | "sandbox" | undefined;
2993
2993
  txHash?: string | undefined;
2994
2994
  causedTransition?: boolean | undefined;
2995
2995
  attempts?: number | undefined;
@@ -3005,7 +3005,7 @@ declare const HealthSchema: z.ZodObject<{
3005
3005
  db: z.ZodEnum<["ok", "error"]>;
3006
3006
  pendingWebhooks: z.ZodNumber;
3007
3007
  oldestPendingChargeAgeSeconds: z.ZodNullable<z.ZodNumber>;
3008
- lastMoralisEventAgeSeconds: z.ZodNullable<z.ZodNumber>;
3008
+ lastContractWatcherEventAgeSeconds: z.ZodNullable<z.ZodNumber>;
3009
3009
  }, "strip", z.ZodTypeAny, {
3010
3010
  status: "error" | "ok";
3011
3011
  version: string;
@@ -3013,7 +3013,7 @@ declare const HealthSchema: z.ZodObject<{
3013
3013
  db: "error" | "ok";
3014
3014
  pendingWebhooks: number;
3015
3015
  oldestPendingChargeAgeSeconds: number | null;
3016
- lastMoralisEventAgeSeconds: number | null;
3016
+ lastContractWatcherEventAgeSeconds: number | null;
3017
3017
  }, {
3018
3018
  status: "error" | "ok";
3019
3019
  version: string;
@@ -3021,7 +3021,7 @@ declare const HealthSchema: z.ZodObject<{
3021
3021
  db: "error" | "ok";
3022
3022
  pendingWebhooks: number;
3023
3023
  oldestPendingChargeAgeSeconds: number | null;
3024
- lastMoralisEventAgeSeconds: number | null;
3024
+ lastContractWatcherEventAgeSeconds: number | null;
3025
3025
  }>;
3026
3026
  type Health = z.infer<typeof HealthSchema>;
3027
3027
 
package/dist/index.d.ts CHANGED
@@ -2955,7 +2955,7 @@ declare const SetRecipientPayoutSchema: z.ZodObject<{
2955
2955
  }>;
2956
2956
  type SetRecipientPayoutInput = z.infer<typeof SetRecipientPayoutSchema>;
2957
2957
 
2958
- declare const TransactionSourceSchema: z.ZodEnum<["moralis_webhook", "reconciliation_job", "sandbox"]>;
2958
+ declare const TransactionSourceSchema: z.ZodEnum<["contract_watcher", "reconciliation_job", "sandbox"]>;
2959
2959
  type TransactionSource = z.infer<typeof TransactionSourceSchema>;
2960
2960
  declare const TimelineEventTypeSchema: z.ZodEnum<["charge.created", "charge.expired", "transaction.detected", "split.distributed", "webhook.dispatched", "webhook.delivered", "webhook.failed", "transfer.reclaimed"]>;
2961
2961
  type TimelineEventType = z.infer<typeof TimelineEventTypeSchema>;
@@ -2964,7 +2964,7 @@ declare const TimelineEventSchema: z.ZodObject<{
2964
2964
  at: z.ZodString;
2965
2965
  txHash: z.ZodOptional<z.ZodString>;
2966
2966
  amount: z.ZodOptional<z.ZodNumber>;
2967
- source: z.ZodOptional<z.ZodEnum<["moralis_webhook", "reconciliation_job", "sandbox"]>>;
2967
+ source: z.ZodOptional<z.ZodEnum<["contract_watcher", "reconciliation_job", "sandbox"]>>;
2968
2968
  token: z.ZodOptional<z.ZodEnum<["USDC", "USDT"]>>;
2969
2969
  network: z.ZodOptional<z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>>;
2970
2970
  causedTransition: z.ZodOptional<z.ZodBoolean>;
@@ -2977,7 +2977,7 @@ declare const TimelineEventSchema: z.ZodObject<{
2977
2977
  token?: "USDC" | "USDT" | undefined;
2978
2978
  network?: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb" | undefined;
2979
2979
  amount?: number | undefined;
2980
- source?: "moralis_webhook" | "reconciliation_job" | "sandbox" | undefined;
2980
+ source?: "contract_watcher" | "reconciliation_job" | "sandbox" | undefined;
2981
2981
  txHash?: string | undefined;
2982
2982
  causedTransition?: boolean | undefined;
2983
2983
  attempts?: number | undefined;
@@ -2989,7 +2989,7 @@ declare const TimelineEventSchema: z.ZodObject<{
2989
2989
  token?: "USDC" | "USDT" | undefined;
2990
2990
  network?: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb" | undefined;
2991
2991
  amount?: number | undefined;
2992
- source?: "moralis_webhook" | "reconciliation_job" | "sandbox" | undefined;
2992
+ source?: "contract_watcher" | "reconciliation_job" | "sandbox" | undefined;
2993
2993
  txHash?: string | undefined;
2994
2994
  causedTransition?: boolean | undefined;
2995
2995
  attempts?: number | undefined;
@@ -3005,7 +3005,7 @@ declare const HealthSchema: z.ZodObject<{
3005
3005
  db: z.ZodEnum<["ok", "error"]>;
3006
3006
  pendingWebhooks: z.ZodNumber;
3007
3007
  oldestPendingChargeAgeSeconds: z.ZodNullable<z.ZodNumber>;
3008
- lastMoralisEventAgeSeconds: z.ZodNullable<z.ZodNumber>;
3008
+ lastContractWatcherEventAgeSeconds: z.ZodNullable<z.ZodNumber>;
3009
3009
  }, "strip", z.ZodTypeAny, {
3010
3010
  status: "error" | "ok";
3011
3011
  version: string;
@@ -3013,7 +3013,7 @@ declare const HealthSchema: z.ZodObject<{
3013
3013
  db: "error" | "ok";
3014
3014
  pendingWebhooks: number;
3015
3015
  oldestPendingChargeAgeSeconds: number | null;
3016
- lastMoralisEventAgeSeconds: number | null;
3016
+ lastContractWatcherEventAgeSeconds: number | null;
3017
3017
  }, {
3018
3018
  status: "error" | "ok";
3019
3019
  version: string;
@@ -3021,7 +3021,7 @@ declare const HealthSchema: z.ZodObject<{
3021
3021
  db: "error" | "ok";
3022
3022
  pendingWebhooks: number;
3023
3023
  oldestPendingChargeAgeSeconds: number | null;
3024
- lastMoralisEventAgeSeconds: number | null;
3024
+ lastContractWatcherEventAgeSeconds: number | null;
3025
3025
  }>;
3026
3026
  type Health = z.infer<typeof HealthSchema>;
3027
3027
 
package/dist/index.js CHANGED
@@ -1054,8 +1054,8 @@ var SetRecipientPayoutSchema = import_zod17.z.object({
1054
1054
 
1055
1055
  // src/timeline.ts
1056
1056
  var import_zod18 = require("zod");
1057
- var TransactionSourceSchema = import_zod18.z.enum(["moralis_webhook", "reconciliation_job", "sandbox"]).describe(
1058
- "How this transfer was detected: `moralis_webhook` (the normal path), `reconciliation_job` (a fallback poller caught it after the webhook was missed or delayed), or `sandbox` (simulated via `POST /v1/sandbox/charges/{id}/trigger`, no real on-chain transfer)."
1057
+ var TransactionSourceSchema = import_zod18.z.enum(["contract_watcher", "reconciliation_job", "sandbox"]).describe(
1058
+ "How this transfer was detected: `contract_watcher` (the normal path \u2014 a real-time on-chain event subscription), `reconciliation_job` (a fallback poller caught it after the watcher missed or delayed it), or `sandbox` (simulated via `POST /v1/sandbox/charges/{id}/trigger`, no real on-chain transfer)."
1059
1059
  );
1060
1060
  var TimelineEventTypeSchema = import_zod18.z.enum([
1061
1061
  "charge.created",
@@ -1112,7 +1112,7 @@ var HealthSchema = import_zod19.z.object({
1112
1112
  db: import_zod19.z.enum(["ok", "error"]).describe("Result of a real database connectivity check, not just a process-alive check."),
1113
1113
  pendingWebhooks: import_zod19.z.number().describe("Count of webhook deliveries still awaiting a successful attempt."),
1114
1114
  oldestPendingChargeAgeSeconds: import_zod19.z.number().nullable().describe("Age of the oldest still-unpaid charge, in seconds. `null` if there are none."),
1115
- lastMoralisEventAgeSeconds: import_zod19.z.number().nullable().describe(
1115
+ lastContractWatcherEventAgeSeconds: import_zod19.z.number().nullable().describe(
1116
1116
  "Seconds since the last on-chain payment notification was received \u2014 a cheap signal for whether payment detection is currently working. `null` if none have ever been received."
1117
1117
  )
1118
1118
  });