@glissandoo/lib 1.125.0 → 1.126.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.
@@ -0,0 +1,23 @@
1
+ export declare namespace ApiKeyFbFunctionsTypes {
2
+ interface ApiKeySummary {
3
+ id: string;
4
+ name: string;
5
+ createdAt: string;
6
+ }
7
+ interface CreateParams {
8
+ name: string;
9
+ }
10
+ interface CreateResult extends ApiKeySummary {
11
+ key: string;
12
+ }
13
+ type ListParams = void;
14
+ interface ListResult {
15
+ keys: ApiKeySummary[];
16
+ }
17
+ interface RevokeParams {
18
+ id: string;
19
+ }
20
+ interface RevokeResult {
21
+ id: string;
22
+ }
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,8 @@
1
1
  export declare enum FbFunctionName {
2
2
  PublicApi = "api",
3
+ ApiKeyCreate = "apiKey-create",
4
+ ApiKeyList = "apiKey-list",
5
+ ApiKeyRevoke = "apiKey-revoke",
3
6
  AuthGetToken = "authGetToken",
4
7
  AuthLogin = "authLogin",
5
8
  AuthLogout = "authLogout",
@@ -4,6 +4,9 @@ exports.FbFunctionName = void 0;
4
4
  var FbFunctionName;
5
5
  (function (FbFunctionName) {
6
6
  FbFunctionName["PublicApi"] = "api";
7
+ FbFunctionName["ApiKeyCreate"] = "apiKey-create";
8
+ FbFunctionName["ApiKeyList"] = "apiKey-list";
9
+ FbFunctionName["ApiKeyRevoke"] = "apiKey-revoke";
7
10
  FbFunctionName["AuthGetToken"] = "authGetToken";
8
11
  FbFunctionName["AuthLogin"] = "authLogin";
9
12
  FbFunctionName["AuthLogout"] = "authLogout";
@@ -11,6 +11,9 @@ var GCloudRegions;
11
11
  const defaultRegion = GCloudRegions.UsCentral1;
12
12
  const regionByFunctions = {
13
13
  [index_1.FbFunctionName.PublicApi]: GCloudRegions.EuropeWest6,
14
+ [index_1.FbFunctionName.ApiKeyCreate]: GCloudRegions.EuropeWest6,
15
+ [index_1.FbFunctionName.ApiKeyList]: GCloudRegions.EuropeWest6,
16
+ [index_1.FbFunctionName.ApiKeyRevoke]: GCloudRegions.EuropeWest6,
14
17
  [index_1.FbFunctionName.AuthGetToken]: GCloudRegions.EuropeWest6,
15
18
  [index_1.FbFunctionName.AuthLogin]: GCloudRegions.EuropeWest6,
16
19
  [index_1.FbFunctionName.AuthLogout]: GCloudRegions.EuropeWest6,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.125.0",
3
+ "version": "1.126.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -241,6 +241,7 @@ export type Database = {
241
241
  playerIds: string[];
242
242
  players: Json;
243
243
  promoter: string | null;
244
+ questions: Json | null;
244
245
  relEvents: string[];
245
246
  repeat: Json | null;
246
247
  repertory: Json;
@@ -288,6 +289,7 @@ export type Database = {
288
289
  playerIds: string[];
289
290
  players: Json;
290
291
  promoter?: string | null;
292
+ questions?: Json | null;
291
293
  relEvents: string[];
292
294
  repeat?: Json | null;
293
295
  repertory: Json;
@@ -335,6 +337,7 @@ export type Database = {
335
337
  playerIds?: string[];
336
338
  players?: Json;
337
339
  promoter?: string | null;
340
+ questions?: Json | null;
338
341
  relEvents?: string[];
339
342
  repeat?: Json | null;
340
343
  repertory?: Json;
@@ -484,6 +487,7 @@ export type Database = {
484
487
  createdAt: string;
485
488
  createdOn: Database['public']['Enums']['created_on'];
486
489
  customerId: string | null;
490
+ customFields: Json | null;
487
491
  deletedAt: string | null;
488
492
  deletedBy: string | null;
489
493
  description: string | null;
@@ -528,6 +532,7 @@ export type Database = {
528
532
  createdAt?: string;
529
533
  createdOn: Database['public']['Enums']['created_on'];
530
534
  customerId?: string | null;
535
+ customFields?: Json | null;
531
536
  deletedAt?: string | null;
532
537
  deletedBy?: string | null;
533
538
  description?: string | null;
@@ -572,6 +577,7 @@ export type Database = {
572
577
  createdAt?: string;
573
578
  createdOn?: Database['public']['Enums']['created_on'];
574
579
  customerId?: string | null;
580
+ customFields?: Json | null;
575
581
  deletedAt?: string | null;
576
582
  deletedBy?: string | null;
577
583
  description?: string | null;
@@ -1451,18 +1457,24 @@ export type Database = {
1451
1457
  };
1452
1458
  publicApiRateLimit: {
1453
1459
  Row: {
1460
+ dailyCount: number;
1461
+ dailyResetAt: string;
1454
1462
  requestCount: number;
1455
1463
  resetAt: string;
1456
1464
  updatedAt: string;
1457
1465
  userId: string;
1458
1466
  };
1459
1467
  Insert: {
1468
+ dailyCount?: number;
1469
+ dailyResetAt?: string;
1460
1470
  requestCount: number;
1461
1471
  resetAt: string;
1462
1472
  updatedAt?: string;
1463
1473
  userId: string;
1464
1474
  };
1465
1475
  Update: {
1476
+ dailyCount?: number;
1477
+ dailyResetAt?: string;
1466
1478
  requestCount?: number;
1467
1479
  resetAt?: string;
1468
1480
  updatedAt?: string;
@@ -1741,6 +1753,7 @@ export type Database = {
1741
1753
  createdAt: string | null;
1742
1754
  createdOn: Database['public']['Enums']['created_on'] | null;
1743
1755
  customerId: string | null;
1756
+ customFields: Json | null;
1744
1757
  deletedAt: string | null;
1745
1758
  deletedBy: string | null;
1746
1759
  description: string | null;
@@ -1792,12 +1805,16 @@ export type Database = {
1792
1805
  };
1793
1806
  consumePublicApiRateLimit: {
1794
1807
  Args: {
1808
+ p_cost: number;
1809
+ p_daily_max: number;
1795
1810
  p_max_requests: number;
1796
1811
  p_user_id: string;
1797
1812
  p_window_seconds: number;
1798
1813
  };
1799
1814
  Returns: {
1800
1815
  allowed: boolean;
1816
+ dailyRemaining: number;
1817
+ dailyResetAt: string;
1801
1818
  remaining: number;
1802
1819
  resetAt: string;
1803
1820
  }[];
@@ -242,6 +242,7 @@ export type Database = {
242
242
  playerIds: string[];
243
243
  players: Json;
244
244
  promoter: string | null;
245
+ questions: Json | null;
245
246
  relEvents: string[];
246
247
  repeat: Json | null;
247
248
  repertory: Json;
@@ -289,6 +290,7 @@ export type Database = {
289
290
  playerIds: string[];
290
291
  players: Json;
291
292
  promoter?: string | null;
293
+ questions?: Json | null;
292
294
  relEvents: string[];
293
295
  repeat?: Json | null;
294
296
  repertory: Json;
@@ -336,6 +338,7 @@ export type Database = {
336
338
  playerIds?: string[];
337
339
  players?: Json;
338
340
  promoter?: string | null;
341
+ questions?: Json | null;
339
342
  relEvents?: string[];
340
343
  repeat?: Json | null;
341
344
  repertory?: Json;
@@ -485,6 +488,7 @@ export type Database = {
485
488
  createdAt: string;
486
489
  createdOn: Database['public']['Enums']['created_on'];
487
490
  customerId: string | null;
491
+ customFields: Json | null;
488
492
  deletedAt: string | null;
489
493
  deletedBy: string | null;
490
494
  description: string | null;
@@ -529,6 +533,7 @@ export type Database = {
529
533
  createdAt?: string;
530
534
  createdOn: Database['public']['Enums']['created_on'];
531
535
  customerId?: string | null;
536
+ customFields?: Json | null;
532
537
  deletedAt?: string | null;
533
538
  deletedBy?: string | null;
534
539
  description?: string | null;
@@ -573,6 +578,7 @@ export type Database = {
573
578
  createdAt?: string;
574
579
  createdOn?: Database['public']['Enums']['created_on'];
575
580
  customerId?: string | null;
581
+ customFields?: Json | null;
576
582
  deletedAt?: string | null;
577
583
  deletedBy?: string | null;
578
584
  description?: string | null;
@@ -1460,18 +1466,24 @@ export type Database = {
1460
1466
  };
1461
1467
  publicApiRateLimit: {
1462
1468
  Row: {
1469
+ dailyCount: number;
1470
+ dailyResetAt: string;
1463
1471
  requestCount: number;
1464
1472
  resetAt: string;
1465
1473
  updatedAt: string;
1466
1474
  userId: string;
1467
1475
  };
1468
1476
  Insert: {
1477
+ dailyCount?: number;
1478
+ dailyResetAt?: string;
1469
1479
  requestCount: number;
1470
1480
  resetAt: string;
1471
1481
  updatedAt?: string;
1472
1482
  userId: string;
1473
1483
  };
1474
1484
  Update: {
1485
+ dailyCount?: number;
1486
+ dailyResetAt?: string;
1475
1487
  requestCount?: number;
1476
1488
  resetAt?: string;
1477
1489
  updatedAt?: string;
@@ -1750,6 +1762,7 @@ export type Database = {
1750
1762
  createdAt: string | null;
1751
1763
  createdOn: Database['public']['Enums']['created_on'] | null;
1752
1764
  customerId: string | null;
1765
+ customFields: Json | null;
1753
1766
  deletedAt: string | null;
1754
1767
  deletedBy: string | null;
1755
1768
  description: string | null;
@@ -1798,12 +1811,16 @@ export type Database = {
1798
1811
  };
1799
1812
  consumePublicApiRateLimit: {
1800
1813
  Args: {
1814
+ p_cost: number;
1815
+ p_daily_max: number;
1801
1816
  p_max_requests: number;
1802
1817
  p_user_id: string;
1803
1818
  p_window_seconds: number;
1804
1819
  };
1805
1820
  Returns: {
1806
1821
  allowed: boolean;
1822
+ dailyRemaining: number;
1823
+ dailyResetAt: string;
1807
1824
  remaining: number;
1808
1825
  resetAt: string;
1809
1826
  }[];