@inglorious/web 6.26.0 → 6.26.1
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/package.json +1 -1
- package/types/auth.d.ts +43 -2
- package/types/native-update.d.ts +8 -2
- package/types/push.d.ts +5 -2
- package/types/share.d.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/web",
|
|
3
|
-
"version": "6.26.
|
|
3
|
+
"version": "6.26.1",
|
|
4
4
|
"description": "A new web framework that leverages the power of the Inglorious Store combined with the performance and simplicity of lit-html.",
|
|
5
5
|
"author": "Matteo Antony Mistretta <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
|
|
6
6
|
"contributors": [
|
package/types/auth.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AsyncEvents } from "@inglorious/store/async"
|
|
2
|
+
|
|
1
3
|
import { Api } from "./mount"
|
|
2
4
|
|
|
3
5
|
/** The signed-in user, as the backend describes them. */
|
|
@@ -122,8 +124,47 @@ export type AuthType = {
|
|
|
122
124
|
accountEraseAsk: Handler
|
|
123
125
|
accountEraseCancel: Handler
|
|
124
126
|
accountErase: Handler
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
} & AsyncEvents<"emailCheck", AuthEntity, string, boolean> &
|
|
128
|
+
AsyncEvents<
|
|
129
|
+
"signIn",
|
|
130
|
+
AuthEntity,
|
|
131
|
+
{ email: string; password: string },
|
|
132
|
+
AuthUser
|
|
133
|
+
> &
|
|
134
|
+
AsyncEvents<
|
|
135
|
+
"signUp",
|
|
136
|
+
AuthEntity,
|
|
137
|
+
{ email: string; password: string; data?: Record<string, unknown> },
|
|
138
|
+
AuthUser | null
|
|
139
|
+
> &
|
|
140
|
+
AsyncEvents<"codeSend", AuthEntity, string, void> &
|
|
141
|
+
AsyncEvents<
|
|
142
|
+
"codeVerify",
|
|
143
|
+
AuthEntity,
|
|
144
|
+
{ email: string; code: string; purpose: AuthCodePurpose },
|
|
145
|
+
AuthUser
|
|
146
|
+
> &
|
|
147
|
+
AsyncEvents<
|
|
148
|
+
"linkVerify",
|
|
149
|
+
AuthEntity,
|
|
150
|
+
{ tokenHash: string; purpose: AuthCodePurpose },
|
|
151
|
+
AuthSignIn
|
|
152
|
+
> &
|
|
153
|
+
AsyncEvents<
|
|
154
|
+
"resend",
|
|
155
|
+
AuthEntity,
|
|
156
|
+
{ email: string; purpose: AuthCodePurpose },
|
|
157
|
+
void
|
|
158
|
+
> &
|
|
159
|
+
AsyncEvents<"resetSend", AuthEntity, string, void> &
|
|
160
|
+
AsyncEvents<
|
|
161
|
+
"passwordReset",
|
|
162
|
+
AuthEntity,
|
|
163
|
+
{ email: string; code: string; password: string },
|
|
164
|
+
AuthUser
|
|
165
|
+
> &
|
|
166
|
+
AsyncEvents<"signOut", AuthEntity, void, void> &
|
|
167
|
+
AsyncEvents<"accountErase", AuthEntity, void, void>
|
|
127
168
|
|
|
128
169
|
/** The type behind a sign-in screen, holding the signed-in `user`. */
|
|
129
170
|
export declare function createAuth(config: AuthConfig): AuthType
|
package/types/native-update.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AsyncEvents } from "@inglorious/store/async"
|
|
2
|
+
|
|
1
3
|
import { Api } from "./mount"
|
|
2
4
|
|
|
3
5
|
export interface NativeUpdateRequirement {
|
|
@@ -42,8 +44,12 @@ export type NativeUpdateType = {
|
|
|
42
44
|
): void
|
|
43
45
|
/** Opens the store. */
|
|
44
46
|
nativeUpdateApply(entity: NativeUpdateEntity): void
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
} & AsyncEvents<
|
|
48
|
+
"nativeUpdateCheck",
|
|
49
|
+
NativeUpdateEntity,
|
|
50
|
+
NativeUpdateCheckPayload,
|
|
51
|
+
{ build: number; requirement: NativeUpdateRequirement | null }
|
|
52
|
+
>
|
|
47
53
|
|
|
48
54
|
/** The type that blocks a native build older than the minimum allowed. */
|
|
49
55
|
export declare function createNativeUpdate(
|
package/types/push.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AsyncEvents } from "@inglorious/store/async"
|
|
2
|
+
|
|
1
3
|
import { Api } from "./mount"
|
|
2
4
|
|
|
3
5
|
export type PushPermission = "granted" | "denied" | "prompt"
|
|
@@ -45,8 +47,9 @@ export type PushPromptType = {
|
|
|
45
47
|
pushAsk(entity: PushPromptEntity, payload?: unknown, api?: Api): void
|
|
46
48
|
/** The prompt's no, remembered on this device. */
|
|
47
49
|
pushDecline(entity: PushPromptEntity): void
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
} & AsyncEvents<"pushCheck", PushPromptEntity, void, PushPermission | null> &
|
|
51
|
+
AsyncEvents<"pushAsk", PushPromptEntity, void, PushPermission> &
|
|
52
|
+
AsyncEvents<"pushRegister", PushPromptEntity, void, void>
|
|
50
53
|
|
|
51
54
|
/** The type that asks a device for pushes and keeps it registered. */
|
|
52
55
|
export declare function createPushPrompt(
|
package/types/share.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AsyncEvents } from "@inglorious/store/async"
|
|
2
|
+
|
|
1
3
|
/** What `createShare` needs of `Share` from `@capacitor/share`. */
|
|
2
4
|
export interface SharePlugin {
|
|
3
5
|
share(options: {
|
|
@@ -29,9 +31,7 @@ export interface ShareEntity {
|
|
|
29
31
|
|
|
30
32
|
export type ShareType = {
|
|
31
33
|
create(entity: ShareEntity): void
|
|
32
|
-
|
|
33
|
-
[handler: string]: unknown
|
|
34
|
-
}
|
|
34
|
+
} & AsyncEvents<"share", ShareEntity, ShareContent, ShareEntity["result"]>
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* The type behind a share button: the system's sheet in a native app, a
|