@dereekb/firebase 12.4.3 → 12.4.5

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/index.cjs.js CHANGED
@@ -8626,6 +8626,9 @@ const notificationConverter = snapshotConverterFunctions({
8626
8626
  a: firestoreNumber({
8627
8627
  default: 0
8628
8628
  }),
8629
+ at: optionalFirestoreNumber({
8630
+ dontStoreIf: 0
8631
+ }),
8629
8632
  d: firestoreBoolean({
8630
8633
  default: false
8631
8634
  }),
@@ -9221,6 +9224,10 @@ function createNotificationTemplate(input) {
9221
9224
  s,
9222
9225
  m,
9223
9226
  g,
9227
+ ois: inputOis,
9228
+ ots: inputOts,
9229
+ explicitOptInSendOnly,
9230
+ explicitOptInTextSmsSendOnly,
9224
9231
  d: inputD
9225
9232
  } = input;
9226
9233
  const notificationModel = readFirestoreModelKey(inputNotificationModel);
@@ -9234,6 +9241,8 @@ function createNotificationTemplate(input) {
9234
9241
  d = filteredData;
9235
9242
  }
9236
9243
  }
9244
+ const ois = explicitOptInSendOnly ?? inputOis ?? null;
9245
+ const ots = explicitOptInTextSmsSendOnly ?? inputOts ?? null;
9237
9246
  const template = {
9238
9247
  notificationModel,
9239
9248
  st: sendType ?? st,
@@ -9250,6 +9259,8 @@ function createNotificationTemplate(input) {
9250
9259
  g: message ?? g,
9251
9260
  d
9252
9261
  },
9262
+ ois,
9263
+ ots,
9253
9264
  unique,
9254
9265
  overrideExistingTask
9255
9266
  };
@@ -9298,6 +9309,8 @@ function createNotificationDocumentPair(input) {
9298
9309
  es,
9299
9310
  ps,
9300
9311
  ns,
9312
+ ois,
9313
+ ots,
9301
9314
  tpr,
9302
9315
  unique: inputUnique,
9303
9316
  overrideExistingTask: inputOverrideExistingTask
@@ -9356,10 +9369,13 @@ function createNotificationDocumentPair(input) {
9356
9369
  d: n.d
9357
9370
  },
9358
9371
  a: 0,
9372
+ at: 0,
9359
9373
  d: false,
9360
9374
  tsr: [],
9361
9375
  esr: [],
9362
9376
  tpr: [],
9377
+ ois,
9378
+ ots,
9363
9379
  ts: ts ?? exports.NotificationSendState.QUEUED,
9364
9380
  es: es ?? exports.NotificationSendState.QUEUED,
9365
9381
  ps: ps ?? exports.NotificationSendState.QUEUED,
package/index.esm.js CHANGED
@@ -8624,6 +8624,9 @@ const notificationConverter = snapshotConverterFunctions({
8624
8624
  a: firestoreNumber({
8625
8625
  default: 0
8626
8626
  }),
8627
+ at: optionalFirestoreNumber({
8628
+ dontStoreIf: 0
8629
+ }),
8627
8630
  d: firestoreBoolean({
8628
8631
  default: false
8629
8632
  }),
@@ -9219,6 +9222,10 @@ function createNotificationTemplate(input) {
9219
9222
  s,
9220
9223
  m,
9221
9224
  g,
9225
+ ois: inputOis,
9226
+ ots: inputOts,
9227
+ explicitOptInSendOnly,
9228
+ explicitOptInTextSmsSendOnly,
9222
9229
  d: inputD
9223
9230
  } = input;
9224
9231
  const notificationModel = readFirestoreModelKey(inputNotificationModel);
@@ -9232,6 +9239,8 @@ function createNotificationTemplate(input) {
9232
9239
  d = filteredData;
9233
9240
  }
9234
9241
  }
9242
+ const ois = explicitOptInSendOnly ?? inputOis ?? null;
9243
+ const ots = explicitOptInTextSmsSendOnly ?? inputOts ?? null;
9235
9244
  const template = {
9236
9245
  notificationModel,
9237
9246
  st: sendType ?? st,
@@ -9248,6 +9257,8 @@ function createNotificationTemplate(input) {
9248
9257
  g: message ?? g,
9249
9258
  d
9250
9259
  },
9260
+ ois,
9261
+ ots,
9251
9262
  unique,
9252
9263
  overrideExistingTask
9253
9264
  };
@@ -9296,6 +9307,8 @@ function createNotificationDocumentPair(input) {
9296
9307
  es,
9297
9308
  ps,
9298
9309
  ns,
9310
+ ois,
9311
+ ots,
9299
9312
  tpr,
9300
9313
  unique: inputUnique,
9301
9314
  overrideExistingTask: inputOverrideExistingTask
@@ -9354,10 +9367,13 @@ function createNotificationDocumentPair(input) {
9354
9367
  d: n.d
9355
9368
  },
9356
9369
  a: 0,
9370
+ at: 0,
9357
9371
  d: false,
9358
9372
  tsr: [],
9359
9373
  esr: [],
9360
9374
  tpr: [],
9375
+ ois,
9376
+ ots,
9361
9377
  ts: ts ?? NotificationSendState.QUEUED,
9362
9378
  es: es ?? NotificationSendState.QUEUED,
9363
9379
  ps: ps ?? NotificationSendState.QUEUED,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/firebase",
3
- "version": "12.4.3",
3
+ "version": "12.4.5",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./src/index.d.ts",
@@ -81,6 +81,14 @@ export interface CreateNotificationTemplateInput extends Partial<Omit<CreateNoti
81
81
  * Overrides d
82
82
  */
83
83
  readonly data?: Maybe<object>;
84
+ /**
85
+ * Overrides ois
86
+ */
87
+ readonly explicitOptInSendOnly?: Maybe<boolean>;
88
+ /**
89
+ * Overrides ots
90
+ */
91
+ readonly explicitOptInTextSmsSendOnly?: Maybe<boolean>;
84
92
  }
85
93
  export declare function createNotificationTemplate(input: CreateNotificationTemplateInput): CreateNotificationTemplate;
86
94
  export interface ShouldSendCreatedNotificationInput {
@@ -397,11 +397,19 @@ export interface Notification extends NotificationSendFlags, NotificationSendChe
397
397
  */
398
398
  sat: Date;
399
399
  /**
400
- * Sending attempts count.
400
+ * Total sending attempts count.
401
401
  *
402
402
  * Only incremented when sending encounters an issue/error.
403
403
  */
404
404
  a: number;
405
+ /**
406
+ * Current task sending and delays attempts count.
407
+ *
408
+ * Only incremented when sending returns a delay or a failure for the current task checkpoint.
409
+ *
410
+ * Reset when a non-failure is returned, and when a checkpoint is completed.
411
+ */
412
+ at?: Maybe<number>;
405
413
  /**
406
414
  * Notification has been delivered or should be archived.
407
415
  *
@@ -10,6 +10,18 @@ export interface NotificationTask<D extends NotificationItemMetadata = {}> {
10
10
  * Notification document for this task
11
11
  */
12
12
  readonly notificationDocument: NotificationDocument;
13
+ /**
14
+ * The number of attempts that have occurred for this task.
15
+ *
16
+ * Corresponds to the "a" field in the notification task document.
17
+ */
18
+ readonly totalSendAttempts: number;
19
+ /**
20
+ * The sum of failures and checkpoint delays that have occurred for this task's current checkpoint.
21
+ *
22
+ * Corresponds to the "at" field in the notification task document.
23
+ */
24
+ readonly currentCheckpointSendAttempts: number;
13
25
  /**
14
26
  * Task type identifier of the notification, which is used to pass this task to the appropriate handler.
15
27
  *
@@ -26,14 +38,20 @@ export interface NotificationTask<D extends NotificationItemMetadata = {}> {
26
38
  readonly data?: Maybe<D>;
27
39
  /**
28
40
  * Current checkpoints for the notification task.
41
+ *
42
+ * Corresponds to the "tsr" field in the notification task document.
29
43
  */
30
44
  readonly checkpoints: NotificationTaskCheckpointString[];
31
45
  /**
32
46
  * Date the task was originally created at
47
+ *
48
+ * Corresponds to the "cat" field in the notification task document.
33
49
  */
34
50
  readonly createdAt: Date;
35
51
  /**
36
52
  * True if the task is flagged as unique.
53
+ *
54
+ * Corresponds to the "ut" field in the notification task document.
37
55
  */
38
56
  readonly unique: boolean;
39
57
  }
package/test/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [12.4.5](https://github.com/dereekb/dbx-components/compare/v12.4.4-dev...v12.4.5) (2025-09-14)
6
+
7
+
8
+
9
+ ## [12.4.4](https://github.com/dereekb/dbx-components/compare/v12.4.3-dev...v12.4.4) (2025-09-11)
10
+
11
+
12
+
5
13
  ## [12.4.3](https://github.com/dereekb/dbx-components/compare/v12.4.2-dev...v12.4.3) (2025-09-11)
6
14
 
7
15
 
package/test/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/firebase/test",
3
- "version": "12.4.3",
3
+ "version": "12.4.5",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "@dereekb/util": "*",