@qrush/types 2.1.33 → 2.1.35
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/dist/ApiKeys.d.ts +49 -0
- package/dist/ApiKeys.js +17 -0
- package/dist/Events.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +7 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Timestamp } from "@firebase/firestore";
|
|
2
|
+
/**
|
|
3
|
+
* API Key stored in Firestore
|
|
4
|
+
* Security: Only SHA-256 hash stored, never plain text
|
|
5
|
+
*/
|
|
6
|
+
export interface IFireApiKey {
|
|
7
|
+
id: string;
|
|
8
|
+
key: string;
|
|
9
|
+
keyPrefix: string;
|
|
10
|
+
userId: string;
|
|
11
|
+
userName?: string;
|
|
12
|
+
userEmail?: string;
|
|
13
|
+
name: string;
|
|
14
|
+
createdAt: Timestamp;
|
|
15
|
+
updatedAt?: Timestamp;
|
|
16
|
+
lastUsedAt?: Timestamp;
|
|
17
|
+
expiresAt?: Timestamp;
|
|
18
|
+
isActive: boolean;
|
|
19
|
+
webhookUrl?: string;
|
|
20
|
+
webhookSecret: string;
|
|
21
|
+
webhookEnabled: boolean;
|
|
22
|
+
allowedDomains?: string[];
|
|
23
|
+
rateLimit: {
|
|
24
|
+
requestsPerMinute: number;
|
|
25
|
+
requestsPerDay: number;
|
|
26
|
+
};
|
|
27
|
+
permissions: {
|
|
28
|
+
events: boolean;
|
|
29
|
+
locations: boolean;
|
|
30
|
+
promotions: boolean;
|
|
31
|
+
};
|
|
32
|
+
locationIds: string[];
|
|
33
|
+
locationSnapshots?: Array<{
|
|
34
|
+
id: string;
|
|
35
|
+
title: string;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Data required to create a new API key (excludes auto-generated fields)
|
|
40
|
+
*/
|
|
41
|
+
export type IFireApiKeyCreationData = Omit<IFireApiKey, "id" | "key" | "keyPrefix" | "createdAt" | "updatedAt" | "lastUsedAt" | "webhookSecret">;
|
|
42
|
+
/**
|
|
43
|
+
* Data for updating an existing API key
|
|
44
|
+
*/
|
|
45
|
+
export type IFireApiKeyUpdateData = Partial<Omit<IFireApiKey, "id" | "key" | "keyPrefix" | "createdAt">>;
|
|
46
|
+
/**
|
|
47
|
+
* Default values for new API key form
|
|
48
|
+
*/
|
|
49
|
+
export declare const DEFAULT_API_KEY_VALUES: Partial<IFireApiKeyCreationData>;
|
package/dist/ApiKeys.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default values for new API key form
|
|
3
|
+
*/
|
|
4
|
+
export const DEFAULT_API_KEY_VALUES = {
|
|
5
|
+
isActive: true,
|
|
6
|
+
webhookEnabled: false,
|
|
7
|
+
rateLimit: {
|
|
8
|
+
requestsPerMinute: 60,
|
|
9
|
+
requestsPerDay: 10000,
|
|
10
|
+
},
|
|
11
|
+
permissions: {
|
|
12
|
+
events: true,
|
|
13
|
+
locations: true,
|
|
14
|
+
promotions: false,
|
|
15
|
+
},
|
|
16
|
+
locationIds: [],
|
|
17
|
+
};
|
package/dist/Events.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export interface IFireEvent {
|
|
|
31
31
|
guestCount: number;
|
|
32
32
|
demoEvent: boolean;
|
|
33
33
|
draftMode: boolean;
|
|
34
|
+
status: 'auto_draft' | 'draft' | 'published';
|
|
34
35
|
topPickEvent?: boolean | undefined;
|
|
35
36
|
promotedBy?: "LFF" | "DFF" | undefined;
|
|
36
37
|
isPersonalEvent?: boolean | undefined;
|
|
@@ -48,6 +49,8 @@ export interface IFireEvent {
|
|
|
48
49
|
}[];
|
|
49
50
|
createdAt?: Timestamp;
|
|
50
51
|
modifiedAt?: Timestamp | null;
|
|
52
|
+
publishedAt?: Timestamp | null;
|
|
53
|
+
lastAutoSaveAt?: Timestamp;
|
|
51
54
|
createdBy: string;
|
|
52
55
|
/**
|
|
53
56
|
* @deprecated Use locationUID instead
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qrush/types",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.35",
|
|
4
4
|
"description": "Shared TypeScript types for the QRush ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -106,6 +106,12 @@
|
|
|
106
106
|
"react-native": "./dist/Artist.js",
|
|
107
107
|
"import": "./dist/Artist.js",
|
|
108
108
|
"require": "./dist/Artist.js"
|
|
109
|
+
},
|
|
110
|
+
"./ApiKeys": {
|
|
111
|
+
"types": "./dist/ApiKeys.d.ts",
|
|
112
|
+
"react-native": "./dist/ApiKeys.js",
|
|
113
|
+
"import": "./dist/ApiKeys.js",
|
|
114
|
+
"require": "./dist/ApiKeys.js"
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
117
|
}
|