@develit-services/bank 0.3.53 → 0.3.54

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.
@@ -283,7 +283,8 @@ const authorizeAccountInputSchema = zod.z.object({
283
283
  ott: zod.z.string(),
284
284
  urlParams: zod.z.string(),
285
285
  syncIntervalS: zod.z.number().int().positive().optional(),
286
- startSync: zod.z.boolean().optional()
286
+ startSync: zod.z.boolean().optional(),
287
+ lastSyncAt: zod.z.date().optional()
287
288
  });
288
289
 
289
290
  const simulateDepositInputSchema = zod.z.object({
@@ -851,7 +852,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
851
852
  return this.handleAction(
852
853
  { data: input, schema: authorizeAccountInputSchema },
853
854
  { successMessage: "Erste code saved." },
854
- async ({ ott, urlParams, syncIntervalS, startSync }) => {
855
+ async ({ ott, urlParams, syncIntervalS, startSync, lastSyncAt }) => {
855
856
  const ottRow = await getOttQuery(this.db, {
856
857
  ott
857
858
  });
@@ -881,7 +882,11 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
881
882
  );
882
883
  const upsertAccounts = accounts.map(
883
884
  (acc) => upsertAccountCommand(this.db, {
884
- account: syncIntervalS ? { ...acc, syncIntervalS } : acc
885
+ account: {
886
+ ...acc,
887
+ syncIntervalS,
888
+ lastSyncAt
889
+ }
885
890
  }).command
886
891
  );
887
892
  const deleteCredentials = alreadyExistingAccounts.map(
@@ -774,6 +774,7 @@ declare const authorizeAccountInputSchema: z.ZodObject<{
774
774
  urlParams: z.ZodString;
775
775
  syncIntervalS: z.ZodOptional<z.ZodNumber>;
776
776
  startSync: z.ZodOptional<z.ZodBoolean>;
777
+ lastSyncAt: z.ZodOptional<z.ZodDate>;
777
778
  }, z.core.$strip>;
778
779
  interface AuthorizeAccountInput extends z.infer<typeof authorizeAccountInputSchema> {
779
780
  }
@@ -774,6 +774,7 @@ declare const authorizeAccountInputSchema: z.ZodObject<{
774
774
  urlParams: z.ZodString;
775
775
  syncIntervalS: z.ZodOptional<z.ZodNumber>;
776
776
  startSync: z.ZodOptional<z.ZodBoolean>;
777
+ lastSyncAt: z.ZodOptional<z.ZodDate>;
777
778
  }, z.core.$strip>;
778
779
  interface AuthorizeAccountInput extends z.infer<typeof authorizeAccountInputSchema> {
779
780
  }
@@ -774,6 +774,7 @@ declare const authorizeAccountInputSchema: z.ZodObject<{
774
774
  urlParams: z.ZodString;
775
775
  syncIntervalS: z.ZodOptional<z.ZodNumber>;
776
776
  startSync: z.ZodOptional<z.ZodBoolean>;
777
+ lastSyncAt: z.ZodOptional<z.ZodDate>;
777
778
  }, z.core.$strip>;
778
779
  interface AuthorizeAccountInput extends z.infer<typeof authorizeAccountInputSchema> {
779
780
  }
@@ -281,7 +281,8 @@ const authorizeAccountInputSchema = z.object({
281
281
  ott: z.string(),
282
282
  urlParams: z.string(),
283
283
  syncIntervalS: z.number().int().positive().optional(),
284
- startSync: z.boolean().optional()
284
+ startSync: z.boolean().optional(),
285
+ lastSyncAt: z.date().optional()
285
286
  });
286
287
 
287
288
  const simulateDepositInputSchema = z.object({
@@ -849,7 +850,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
849
850
  return this.handleAction(
850
851
  { data: input, schema: authorizeAccountInputSchema },
851
852
  { successMessage: "Erste code saved." },
852
- async ({ ott, urlParams, syncIntervalS, startSync }) => {
853
+ async ({ ott, urlParams, syncIntervalS, startSync, lastSyncAt }) => {
853
854
  const ottRow = await getOttQuery(this.db, {
854
855
  ott
855
856
  });
@@ -879,7 +880,11 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
879
880
  );
880
881
  const upsertAccounts = accounts.map(
881
882
  (acc) => upsertAccountCommand(this.db, {
882
- account: syncIntervalS ? { ...acc, syncIntervalS } : acc
883
+ account: {
884
+ ...acc,
885
+ syncIntervalS,
886
+ lastSyncAt
887
+ }
883
888
  }).command
884
889
  );
885
890
  const deleteCredentials = alreadyExistingAccounts.map(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "0.3.53",
3
+ "version": "0.3.54",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {