ozmoz 0.1.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.
package/index.d.ts ADDED
@@ -0,0 +1,131 @@
1
+ /* eslint-disable */
2
+ /* prettier-ignore */
3
+ // @ts-nocheck
4
+ export {}
5
+
6
+ type OzOtpOptions = {
7
+ email: string;
8
+ appName?: string;
9
+ subject?: string;
10
+ message?: string;
11
+ logoUrl?: string;
12
+ };
13
+
14
+ type OzPhoneOtpOptions = {
15
+ phoneNumber: string;
16
+ appName?: string;
17
+ };
18
+
19
+ type OzFacebookAuthOptions = {
20
+ accessToken?: string;
21
+ scope?: string;
22
+ };
23
+
24
+ type OzProp = {
25
+ value?: any;
26
+ fallback?: string;
27
+ 'invalid-fallback'?: string;
28
+ currency?: string;
29
+ locale?: string;
30
+ allowed?: string;
31
+ alt?: string;
32
+ table?: any;
33
+ id?: string;
34
+ field?: string;
35
+ 'label-true'?: string;
36
+ 'label-false'?: string;
37
+ 'orphan-fallback'?: string;
38
+ 'loading-fallback'?: string;
39
+ 'malformed-fallback'?: string;
40
+ class?: string;
41
+ className?: string;
42
+ children?: any;
43
+ [key: string]: any;
44
+ };
45
+
46
+ type OzMethod = (...args: any[]) => Promise<any>;
47
+
48
+ interface OzTagNames {
49
+ Text: string;
50
+ Number: string;
51
+ Toggle: string;
52
+ Date: string;
53
+ Enum: string;
54
+ Media: string;
55
+ Reference: string;
56
+ }
57
+
58
+ // Surface publique du SDK. Les noms de membres sont vérifiés contre src/index.js par
59
+ // assertTypesMatchImplementation (package-build.js) : toute méthode déclarée ici mais
60
+ // non implémentée fait échouer le build. Les signatures détaillées sont générées dans
61
+ // src/ozmoz.d.ts du projet par `npx ozmoz sync`.
62
+ export interface OzClient extends OzTagNames {
63
+ call: any;
64
+ getUser: OzMethod;
65
+ add: OzMethod;
66
+ addWithId: OzMethod;
67
+ addWithUserId: OzMethod;
68
+ addWithMedia: OzMethod;
69
+ update: OzMethod;
70
+ delete: OzMethod;
71
+ getDocsG: OzMethod;
72
+ getDocsU: OzMethod;
73
+ getDoc: OzMethod;
74
+ getAuthUser: OzMethod;
75
+ join: OzMethod;
76
+ seed: OzMethod;
77
+ sendotpsvro: OzMethod;
78
+ verifyotpsvro: OzMethod;
79
+ sendOtpByPhone: OzMethod;
80
+ verifyOtpPhoneSvro: OzMethod;
81
+ verifyFacebookAuth: OzMethod;
82
+ isAuthenticated: OzMethod;
83
+ logout: OzMethod;
84
+ acl: {
85
+ grant: OzMethod;
86
+ revoke: OzMethod;
87
+ can: OzMethod;
88
+ };
89
+ }
90
+
91
+ export const oz: OzClient;
92
+ export const OzUI: OzTagNames;
93
+ export default oz;
94
+
95
+ declare global {
96
+ type OzTables = string;
97
+ const oz: any;
98
+ const OzUI: any;
99
+
100
+ interface Window {
101
+ oz: any;
102
+ OzUI: any;
103
+ FB?: any;
104
+ }
105
+
106
+ namespace JSX {
107
+ interface IntrinsicElements {
108
+ 'oz-text': OzProp;
109
+ 'oz-number': OzProp;
110
+ 'oz-toggle': OzProp;
111
+ 'oz-date': OzProp;
112
+ 'oz-enum': OzProp;
113
+ 'oz-media': OzProp;
114
+ 'oz-reference': OzProp;
115
+ }
116
+ }
117
+
118
+ namespace React {
119
+ namespace JSX {
120
+ interface IntrinsicElements {
121
+ 'oz-text': OzProp;
122
+ 'oz-number': OzProp;
123
+ 'oz-toggle': OzProp;
124
+ 'oz-date': OzProp;
125
+ 'oz-enum': OzProp;
126
+ 'oz-media': OzProp;
127
+ 'oz-reference': OzProp;
128
+ }
129
+ }
130
+ }
131
+ }
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "ozmoz",
3
+ "version": "0.1.0",
4
+ "description": "SDK and CLI for the oz.* data API and the <oz-*> web components.",
5
+ "license": "UNLICENSED",
6
+ "keywords": ["ozmoz", "sdk", "cli", "mcp", "ai-agents", "web-components"],
7
+ "main": "dist/index.js",
8
+ "type": "module",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./index.d.ts",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "types": "index.d.ts",
16
+ "unpkg": "dist/ozmoz.iife.js",
17
+ "jsdelivr": "dist/ozmoz.iife.js",
18
+ "bin": {
19
+ "ozmoz": "dist/cli.cjs"
20
+ },
21
+ "scripts": {
22
+ "build:pkg": "node package-build.js && npm run build:browser",
23
+ "build:browser": "node scripts/build-browser.mjs",
24
+ "prepublishOnly": "npm run build:pkg"
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "index.d.ts",
29
+ "scripts/setup-lib.cjs"
30
+ ],
31
+ "dependencies": {},
32
+ "devDependencies": {
33
+ "@modelcontextprotocol/sdk": "^1.30.0",
34
+ "esbuild": "^0.28.1",
35
+ "firebase": "^12.16.0",
36
+ "typescript": "^7.0.2",
37
+ "zod": "^4.6.5"
38
+ }
39
+ }