firebase-rest-firestore 1.1.2 → 1.5.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.
Files changed (42) hide show
  1. package/dist/cjs/client.d.ts +417 -0
  2. package/dist/cjs/client.js +1078 -0
  3. package/dist/{index.d.ts → cjs/index.d.ts} +1 -1
  4. package/dist/{index.js → cjs/index.js} +1 -2
  5. package/dist/{types.d.ts → cjs/types.d.ts} +4 -0
  6. package/dist/cjs/utils/auth.d.ts +13 -0
  7. package/dist/{utils → cjs/utils}/auth.js +14 -10
  8. package/dist/cjs/utils/config.d.ts +6 -0
  9. package/dist/{utils → cjs/utils}/config.js +0 -12
  10. package/dist/cjs/utils/path.d.ts +73 -0
  11. package/dist/cjs/utils/path.js +176 -0
  12. package/dist/esm/client.d.ts +417 -0
  13. package/dist/esm/client.js +1066 -0
  14. package/dist/esm/index.d.ts +7 -0
  15. package/dist/esm/index.js +11 -0
  16. package/dist/esm/types.d.ts +69 -0
  17. package/dist/esm/types.js +1 -0
  18. package/dist/esm/utils/auth.d.ts +13 -0
  19. package/dist/esm/utils/auth.js +57 -0
  20. package/dist/esm/utils/config.d.ts +6 -0
  21. package/dist/esm/utils/config.js +11 -0
  22. package/dist/esm/utils/converter.d.ts +27 -0
  23. package/dist/esm/utils/converter.js +107 -0
  24. package/dist/esm/utils/path.d.ts +73 -0
  25. package/dist/esm/utils/path.js +169 -0
  26. package/dist/types/client.d.ts +417 -0
  27. package/dist/types/index.d.ts +7 -0
  28. package/dist/types/types.d.ts +69 -0
  29. package/dist/types/utils/auth.d.ts +13 -0
  30. package/dist/types/utils/config.d.ts +6 -0
  31. package/dist/types/utils/converter.d.ts +27 -0
  32. package/dist/types/utils/path.d.ts +73 -0
  33. package/package.json +18 -5
  34. package/dist/client.d.ts +0 -381
  35. package/dist/client.js +0 -878
  36. package/dist/utils/auth.d.ts +0 -13
  37. package/dist/utils/config.d.ts +0 -13
  38. package/dist/utils/path.d.ts +0 -14
  39. package/dist/utils/path.js +0 -27
  40. /package/dist/{types.js → cjs/types.js} +0 -0
  41. /package/dist/{utils → cjs/utils}/converter.d.ts +0 -0
  42. /package/dist/{utils → cjs/utils}/converter.js +0 -0
@@ -1,13 +0,0 @@
1
- import { FirestoreConfig } from "../types";
2
- /**
3
- * JWT(JSON Web Token)を作成する関数
4
- * @param config Firestore設定
5
- * @returns JWT文字列
6
- */
7
- export declare function createJWT(config: FirestoreConfig): Promise<string>;
8
- /**
9
- * Firestoreの認証トークンを取得する関数
10
- * @param config Firestore設定
11
- * @returns アクセストークン
12
- */
13
- export declare function getFirestoreToken(config: FirestoreConfig): Promise<string>;
@@ -1,13 +0,0 @@
1
- import { FirestoreConfig } from "../types";
2
- /**
3
- * 秘密鍵の文字列内にある改行コードのエスケープシーケンスを実際の改行に変換する
4
- * @param privateKey 変換する秘密鍵文字列
5
- * @returns 変換後の秘密鍵文字列
6
- */
7
- export declare function formatPrivateKey(privateKey: string): string;
8
- /**
9
- * FirestoreConfigオブジェクトの秘密鍵をフォーマットする
10
- * @param config 元のconfigオブジェクト
11
- * @returns 秘密鍵をフォーマットしたconfigオブジェクト
12
- */
13
- export declare function formatConfig(config: FirestoreConfig): FirestoreConfig;
@@ -1,14 +0,0 @@
1
- /**
2
- * Firestoreのベースパスを取得
3
- * @param projectId プロジェクトID
4
- * @param collectionName コレクション名(省略可)
5
- * @param databaseId データベースID(省略時は'(default)')
6
- * @returns Firestoreのベースパス
7
- */
8
- export declare function getFirestoreBasePath(projectId: string, collectionName?: string, databaseId?: string): string;
9
- /**
10
- * ドキュメントパスからIDを抽出
11
- * @param path ドキュメントパス
12
- * @returns ドキュメントID
13
- */
14
- export declare function getDocumentId(path?: string): string;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFirestoreBasePath = getFirestoreBasePath;
4
- exports.getDocumentId = getDocumentId;
5
- /**
6
- * Firestoreのベースパスを取得
7
- * @param projectId プロジェクトID
8
- * @param collectionName コレクション名(省略可)
9
- * @param databaseId データベースID(省略時は'(default)')
10
- * @returns Firestoreのベースパス
11
- */
12
- function getFirestoreBasePath(projectId, collectionName, databaseId) {
13
- const dbId = databaseId || "(default)";
14
- const basePath = `https://firestore.googleapis.com/v1/projects/${projectId}/databases/${dbId}/documents`;
15
- return collectionName ? `${basePath}/${collectionName}` : basePath;
16
- }
17
- /**
18
- * ドキュメントパスからIDを抽出
19
- * @param path ドキュメントパス
20
- * @returns ドキュメントID
21
- */
22
- function getDocumentId(path) {
23
- if (!path)
24
- return "";
25
- const pathParts = path.split("/");
26
- return pathParts[pathParts.length - 1];
27
- }
File without changes
File without changes
File without changes