fields: objectToValueProto()

in src/providers/firestore.ts [86:107]


        fields: objectToValueProto(data),
        createTime: dateToTimestampProto(
          get(options, 'createTime', new Date().toISOString())
        ),
        updateTime: dateToTimestampProto(
          get(options, 'updateTime', new Date().toISOString())
        ),
        name: resource,
      };

  const readTimeProto = dateToTimestampProto(
    get(options, 'readTime') || new Date().toISOString()
  );
  return firestoreService.snapshot_(proto, readTimeProto, 'json');
}

/** Fetch an example document snapshot already populated with data. Can be passed into a wrapped
 * Firestore onCreate or onDelete function.
 */
export function exampleDocumentSnapshot(): firestore.DocumentSnapshot {
  return makeDocumentSnapshot(
    {