@tollwyn/baukasten 0.0.2 → 1.2.3
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/README.md +254 -1
- package/dist/bin/check.d.ts +2 -0
- package/dist/bin/check.js +38 -0
- package/dist/bin/migrate.d.ts +2 -0
- package/dist/bin/migrate.js +111 -0
- package/dist/bin/stubs.d.ts +2 -0
- package/dist/bin/stubs.js +38 -0
- package/dist/bin/test-accounts.d.ts +2 -0
- package/dist/bin/test-accounts.js +62 -0
- package/dist/check.d.ts +20 -0
- package/dist/check.js +285 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -0
- package/dist/product.d.ts +161 -0
- package/dist/product.js +152 -0
- package/dist/server/accounts.d.ts +128 -0
- package/dist/server/accounts.js +282 -0
- package/dist/server/adapter/db.d.ts +5 -0
- package/dist/server/adapter/db.js +63 -0
- package/dist/server/adapter/log.d.ts +3 -0
- package/dist/server/adapter/log.js +12 -0
- package/dist/server/adapter/mailer.d.ts +4 -0
- package/dist/server/adapter/mailer.js +56 -0
- package/dist/server/adapter/migrate.d.ts +21 -0
- package/dist/server/adapter/migrate.js +113 -0
- package/dist/server/adapter/secrets.d.ts +2 -0
- package/dist/server/adapter/secrets.js +40 -0
- package/dist/server/adapter/stripe.d.ts +11 -0
- package/dist/server/adapter/stripe.js +333 -0
- package/dist/server/api.d.ts +25 -0
- package/dist/server/api.js +98 -0
- package/dist/server/baukasten-migrations.d.ts +4 -0
- package/dist/server/baukasten-migrations.js +126 -0
- package/dist/server/billing.d.ts +94 -0
- package/dist/server/billing.js +349 -0
- package/dist/server/catalog.d.ts +39 -0
- package/dist/server/catalog.js +193 -0
- package/dist/server/config.d.ts +108 -0
- package/dist/server/config.js +244 -0
- package/dist/server/endpoints.d.ts +44 -0
- package/dist/server/endpoints.js +159 -0
- package/dist/server/fields.d.ts +7 -0
- package/dist/server/fields.js +18 -0
- package/dist/server/headers.d.ts +1 -0
- package/dist/server/headers.js +9 -0
- package/dist/server/health.d.ts +34 -0
- package/dist/server/health.js +116 -0
- package/dist/server/hook.d.ts +92 -0
- package/dist/server/hook.js +293 -0
- package/dist/server/index.d.ts +18 -0
- package/dist/server/index.js +11 -0
- package/dist/server/legal/de.d.ts +2 -0
- package/dist/server/legal/de.js +251 -0
- package/dist/server/legal/document.d.ts +37 -0
- package/dist/server/legal/document.js +30 -0
- package/dist/server/legal/en.d.ts +2 -0
- package/dist/server/legal/en.js +251 -0
- package/dist/server/legal/fleet.d.ts +114 -0
- package/dist/server/legal/fleet.js +89 -0
- package/dist/server/legal/index.d.ts +3 -0
- package/dist/server/legal/index.js +11 -0
- package/dist/server/limits.d.ts +58 -0
- package/dist/server/limits.js +76 -0
- package/dist/server/log.d.ts +26 -0
- package/dist/server/log.js +61 -0
- package/dist/server/machine.d.ts +4 -0
- package/dist/server/machine.js +57 -0
- package/dist/server/mail.d.ts +20 -0
- package/dist/server/mail.js +29 -0
- package/dist/server/messages.d.ts +105 -0
- package/dist/server/messages.js +232 -0
- package/dist/server/migrations.d.ts +28 -0
- package/dist/server/migrations.js +59 -0
- package/dist/server/openapi.d.ts +24 -0
- package/dist/server/openapi.js +173 -0
- package/dist/server/pages.d.ts +158 -0
- package/dist/server/pages.js +491 -0
- package/dist/server/ports.d.ts +273 -0
- package/dist/server/ports.js +1 -0
- package/dist/server/runs.d.ts +30 -0
- package/dist/server/runs.js +55 -0
- package/dist/server/sales.d.ts +38 -0
- package/dist/server/sales.js +132 -0
- package/dist/server/services.d.ts +57 -0
- package/dist/server/services.js +44 -0
- package/dist/server/start.d.ts +14 -0
- package/dist/server/start.js +65 -0
- package/dist/server/stripe.d.ts +33 -0
- package/dist/server/stripe.js +29 -0
- package/dist/server/terms.d.ts +7 -0
- package/dist/server/terms.js +9 -0
- package/dist/server/test-accounts.d.ts +28 -0
- package/dist/server/test-accounts.js +62 -0
- package/dist/server/via.d.ts +9 -0
- package/dist/server/via.js +15 -0
- package/dist/server/web.d.ts +48 -0
- package/dist/server/web.js +105 -0
- package/dist/shopify/adapter/shopify.d.ts +8 -0
- package/dist/shopify/adapter/shopify.js +232 -0
- package/dist/shopify/admin.d.ts +33 -0
- package/dist/shopify/admin.js +47 -0
- package/dist/shopify/app.d.ts +60 -0
- package/dist/shopify/app.js +67 -0
- package/dist/shopify/config.d.ts +53 -0
- package/dist/shopify/config.js +133 -0
- package/dist/shopify/constants.d.ts +27 -0
- package/dist/shopify/constants.js +27 -0
- package/dist/shopify/headers.d.ts +1 -0
- package/dist/shopify/headers.js +8 -0
- package/dist/shopify/hmac.d.ts +1 -0
- package/dist/shopify/hmac.js +9 -0
- package/dist/shopify/hook.d.ts +60 -0
- package/dist/shopify/hook.js +508 -0
- package/dist/shopify/id-token.d.ts +12 -0
- package/dist/shopify/id-token.js +66 -0
- package/dist/shopify/index.d.ts +19 -0
- package/dist/shopify/index.js +15 -0
- package/dist/shopify/legal/de.d.ts +3 -0
- package/dist/shopify/legal/de.js +123 -0
- package/dist/shopify/legal/en.d.ts +3 -0
- package/dist/shopify/legal/en.js +121 -0
- package/dist/shopify/legal/index.d.ts +19 -0
- package/dist/shopify/legal/index.js +8 -0
- package/dist/shopify/legal/shopify.d.ts +16 -0
- package/dist/shopify/legal/shopify.js +21 -0
- package/dist/shopify/migrations.d.ts +4 -0
- package/dist/shopify/migrations.js +67 -0
- package/dist/shopify/pages.d.ts +45 -0
- package/dist/shopify/pages.js +146 -0
- package/dist/shopify/ports.d.ts +77 -0
- package/dist/shopify/ports.js +1 -0
- package/dist/shopify/sales.d.ts +4 -0
- package/dist/shopify/sales.js +27 -0
- package/dist/shopify/scopes.d.ts +2 -0
- package/dist/shopify/scopes.js +13 -0
- package/dist/shopify/seal.d.ts +12 -0
- package/dist/shopify/seal.js +60 -0
- package/dist/shopify/shop.d.ts +4 -0
- package/dist/shopify/shop.js +15 -0
- package/dist/shopify/shops.d.ts +76 -0
- package/dist/shopify/shops.js +256 -0
- package/dist/shopify/sveltekit.d.ts +19 -0
- package/dist/shopify/sveltekit.js +18 -0
- package/dist/shopify/texts.d.ts +28 -0
- package/dist/shopify/texts.js +49 -0
- package/dist/shopify/toml.d.ts +22 -0
- package/dist/shopify/toml.js +125 -0
- package/dist/shopify/webhooks.d.ts +65 -0
- package/dist/shopify/webhooks.js +220 -0
- package/dist/stubs.d.ts +15 -0
- package/dist/stubs.js +287 -0
- package/dist/sveltekit.d.ts +20 -0
- package/dist/sveltekit.js +18 -0
- package/dist/testing/app.d.ts +36 -0
- package/dist/testing/app.js +155 -0
- package/dist/testing/browser.d.ts +21 -0
- package/dist/testing/browser.js +21 -0
- package/dist/testing/connection.d.ts +7 -0
- package/dist/testing/connection.js +303 -0
- package/dist/testing/database.d.ts +21 -0
- package/dist/testing/database.js +54 -0
- package/dist/testing/env-example.d.ts +4 -0
- package/dist/testing/env-example.js +33 -0
- package/dist/testing/index.d.ts +9 -0
- package/dist/testing/index.js +9 -0
- package/dist/testing/shopify-connection.d.ts +8 -0
- package/dist/testing/shopify-connection.js +313 -0
- package/dist/testing/shopify.d.ts +71 -0
- package/dist/testing/shopify.js +278 -0
- package/dist/testing/smtp.d.ts +38 -0
- package/dist/testing/smtp.js +165 -0
- package/dist/testing/stripe.d.ts +128 -0
- package/dist/testing/stripe.js +511 -0
- package/dist/texts.d.ts +139 -0
- package/dist/texts.js +265 -0
- package/dist/ui/AccountPage.svelte +143 -0
- package/dist/ui/AccountPage.svelte.d.ts +10 -0
- package/dist/ui/ConfirmEmailPage.svelte +21 -0
- package/dist/ui/ConfirmEmailPage.svelte.d.ts +10 -0
- package/dist/ui/ErrorPage.svelte +14 -0
- package/dist/ui/ErrorPage.svelte.d.ts +3 -0
- package/dist/ui/Field.svelte +12 -0
- package/dist/ui/Field.svelte.d.ts +10 -0
- package/dist/ui/ForgotPasswordPage.svelte +32 -0
- package/dist/ui/ForgotPasswordPage.svelte.d.ts +7 -0
- package/dist/ui/Form.svelte +30 -0
- package/dist/ui/Form.svelte.d.ts +11 -0
- package/dist/ui/Frame.svelte +84 -0
- package/dist/ui/Frame.svelte.d.ts +12 -0
- package/dist/ui/LegalPage.svelte +38 -0
- package/dist/ui/LegalPage.svelte.d.ts +9 -0
- package/dist/ui/Linked.svelte +5 -0
- package/dist/ui/Linked.svelte.d.ts +8 -0
- package/dist/ui/LoginPage.svelte +41 -0
- package/dist/ui/LoginPage.svelte.d.ts +10 -0
- package/dist/ui/LogoutPage.svelte +19 -0
- package/dist/ui/LogoutPage.svelte.d.ts +9 -0
- package/dist/ui/ResetPasswordPage.svelte +30 -0
- package/dist/ui/ResetPasswordPage.svelte.d.ts +10 -0
- package/dist/ui/SignupPage.svelte +52 -0
- package/dist/ui/SignupPage.svelte.d.ts +10 -0
- package/dist/ui/VerifyEmailPage.svelte +50 -0
- package/dist/ui/VerifyEmailPage.svelte.d.ts +10 -0
- package/dist/ui/base.css +287 -0
- package/dist/ui/data.d.ts +167 -0
- package/dist/ui/data.js +1 -0
- package/dist/ui/frame.d.ts +17 -0
- package/dist/ui/frame.js +27 -0
- package/dist/ui/index.d.ts +15 -0
- package/dist/ui/index.js +15 -0
- package/dist/variables.d.ts +20 -0
- package/dist/variables.js +62 -0
- package/package.json +88 -4
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { API_PATHS } from './endpoints.js';
|
|
2
|
+
const ref = (name) => ({ $ref: `#/components/schemas/${name}` });
|
|
3
|
+
const json = (schema) => ({ 'application/json': { schema } });
|
|
4
|
+
export function openApiPart(origin, messages) {
|
|
5
|
+
const o = messages.openApi;
|
|
6
|
+
const error = (description) => ({ description, content: json(ref('Error')) });
|
|
7
|
+
return {
|
|
8
|
+
paths: {
|
|
9
|
+
[API_PATHS.signup]: {
|
|
10
|
+
post: {
|
|
11
|
+
operationId: 'signUp',
|
|
12
|
+
summary: o.signup,
|
|
13
|
+
security: [],
|
|
14
|
+
requestBody: {
|
|
15
|
+
required: true,
|
|
16
|
+
content: json({
|
|
17
|
+
type: 'object',
|
|
18
|
+
required: ['email', 'accept_terms', 'acting_for_business'],
|
|
19
|
+
properties: {
|
|
20
|
+
email: { type: 'string', format: 'email', maxLength: 254, description: o.email },
|
|
21
|
+
accept_terms: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
const: true,
|
|
24
|
+
description: `${o.acceptTerms} ${origin}/terms`
|
|
25
|
+
},
|
|
26
|
+
acting_for_business: {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
const: true,
|
|
29
|
+
description: o.actingForBusiness
|
|
30
|
+
},
|
|
31
|
+
via: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
maxLength: 32,
|
|
34
|
+
pattern: '^[a-z0-9]+(-[a-z0-9]+)*$',
|
|
35
|
+
description: o.via
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
},
|
|
40
|
+
responses: {
|
|
41
|
+
'201': {
|
|
42
|
+
description: o.signupCreated,
|
|
43
|
+
content: json({
|
|
44
|
+
type: 'object',
|
|
45
|
+
required: ['api_key', 'account'],
|
|
46
|
+
properties: { api_key: { type: 'string' }, account: ref('Account') }
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
'400': error(o.errors.invalidJson),
|
|
50
|
+
'403': error(o.errors.forbidden),
|
|
51
|
+
'409': error(o.errors.emailTaken),
|
|
52
|
+
'422': error(o.errors.invalidRequest),
|
|
53
|
+
'429': error(o.errors.rateLimited)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
[API_PATHS.account]: {
|
|
58
|
+
get: {
|
|
59
|
+
operationId: 'getAccount',
|
|
60
|
+
summary: o.account,
|
|
61
|
+
security: [{ apiKey: [] }],
|
|
62
|
+
responses: {
|
|
63
|
+
'200': { description: o.account, content: json(ref('Account')) },
|
|
64
|
+
'401': error(o.errors.unauthorized),
|
|
65
|
+
'429': error(o.errors.rateLimited)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
[API_PATHS.checkout]: {
|
|
70
|
+
post: {
|
|
71
|
+
operationId: 'openCheckout',
|
|
72
|
+
summary: o.checkout,
|
|
73
|
+
description: o.checkoutBody,
|
|
74
|
+
security: [{ apiKey: [] }],
|
|
75
|
+
requestBody: {
|
|
76
|
+
required: true,
|
|
77
|
+
content: json({
|
|
78
|
+
type: 'object',
|
|
79
|
+
required: ['price'],
|
|
80
|
+
properties: {
|
|
81
|
+
price: { type: 'string', description: o.price },
|
|
82
|
+
quantity: { type: 'integer', minimum: 1, description: o.quantity }
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
},
|
|
86
|
+
responses: {
|
|
87
|
+
'200': { description: o.url, content: json(ref('Url')) },
|
|
88
|
+
'400': error(o.errors.invalidJson),
|
|
89
|
+
'401': error(o.errors.unauthorized),
|
|
90
|
+
'409': error(o.errors.subscribed),
|
|
91
|
+
'422': error(o.errors.invalidRequest),
|
|
92
|
+
'429': error(o.errors.rateLimited),
|
|
93
|
+
'503': error(o.errors.notConfigured)
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
[API_PATHS.portal]: {
|
|
98
|
+
post: {
|
|
99
|
+
operationId: 'openPortal',
|
|
100
|
+
summary: o.portal,
|
|
101
|
+
security: [{ apiKey: [] }],
|
|
102
|
+
responses: {
|
|
103
|
+
'200': { description: o.url, content: json(ref('Url')) },
|
|
104
|
+
'401': error(o.errors.unauthorized),
|
|
105
|
+
'409': error(o.errors.noCustomer),
|
|
106
|
+
'429': error(o.errors.rateLimited),
|
|
107
|
+
'503': error(o.errors.notConfigured)
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
components: {
|
|
113
|
+
schemas: {
|
|
114
|
+
Error: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
required: ['error'],
|
|
117
|
+
properties: {
|
|
118
|
+
error: {
|
|
119
|
+
type: 'object',
|
|
120
|
+
required: ['code', 'message'],
|
|
121
|
+
properties: {
|
|
122
|
+
code: { type: 'string' },
|
|
123
|
+
message: { type: 'string' },
|
|
124
|
+
details: {}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
Url: {
|
|
130
|
+
type: 'object',
|
|
131
|
+
required: ['url'],
|
|
132
|
+
properties: { url: { type: 'string', format: 'uri', description: o.url } }
|
|
133
|
+
},
|
|
134
|
+
Account: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
required: ['id', 'email', 'email_verified', 'created_at'],
|
|
137
|
+
properties: {
|
|
138
|
+
id: { type: 'string', format: 'uuid' },
|
|
139
|
+
email: { type: 'string', format: 'email' },
|
|
140
|
+
email_verified: { type: 'boolean' },
|
|
141
|
+
created_at: { type: 'string', format: 'date-time' }
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
securitySchemes: {
|
|
146
|
+
apiKey: { type: 'http', scheme: 'bearer', description: o.apiKey }
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* `document` with the part of the baukasten. The product's own paths use its security scheme
|
|
153
|
+
* `apiKey` and its schema `Error`; a name both define is an error, not an override.
|
|
154
|
+
*/
|
|
155
|
+
export function mergeOpenApi(document, part) {
|
|
156
|
+
const merge = (what, theirs, own) => {
|
|
157
|
+
const both = Object.keys(own ?? {}).filter((key) => key in theirs);
|
|
158
|
+
if (both.length > 0) {
|
|
159
|
+
throw new Error(`the OpenAPI document of the product defines ${what} of the baukasten: ${both.join(', ')}`);
|
|
160
|
+
}
|
|
161
|
+
return { ...theirs, ...own };
|
|
162
|
+
};
|
|
163
|
+
const components = document.components ?? {};
|
|
164
|
+
return {
|
|
165
|
+
...document,
|
|
166
|
+
paths: merge('paths', part.paths, document.paths),
|
|
167
|
+
components: {
|
|
168
|
+
...components,
|
|
169
|
+
schemas: merge('schemas', part.components.schemas, components.schemas),
|
|
170
|
+
securitySchemes: merge('security schemes', part.components.securitySchemes, components.securitySchemes)
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { type RequestEvent } from '@sveltejs/kit';
|
|
2
|
+
import type { Brand } from '../product.js';
|
|
3
|
+
import type { AccountData, ConfirmData, FrameData, LegalData, LoginData, LogoutData, ResetData, SignupData, VerifyData } from '../ui/data.js';
|
|
4
|
+
import { type Services } from './services.js';
|
|
5
|
+
type LoadEvent = {
|
|
6
|
+
locals: App.Locals;
|
|
7
|
+
url: URL;
|
|
8
|
+
};
|
|
9
|
+
/** The marks of the product as the frame shows them: the picture of a shared link at its whole address. */
|
|
10
|
+
export declare function frameBrand(brand: Brand | undefined, origin: string): FrameData['brand'];
|
|
11
|
+
export type Pages = ReturnType<typeof createPages>;
|
|
12
|
+
export declare function createPages(services: () => Services): {
|
|
13
|
+
layout: {
|
|
14
|
+
load: ({ locals, url }: LoadEvent) => {
|
|
15
|
+
frame: FrameData;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
imprint: {
|
|
19
|
+
load: () => {
|
|
20
|
+
legal: LegalData;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
privacy: {
|
|
24
|
+
load: () => {
|
|
25
|
+
legal: LegalData;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
terms: {
|
|
29
|
+
load: () => {
|
|
30
|
+
legal: LegalData;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
signup: {
|
|
34
|
+
load: ({ locals, url }: LoadEvent) => {
|
|
35
|
+
signup: SignupData;
|
|
36
|
+
};
|
|
37
|
+
actions: {
|
|
38
|
+
default: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
39
|
+
email: string;
|
|
40
|
+
error: string;
|
|
41
|
+
}>>;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
login: {
|
|
45
|
+
load: ({ locals, url }: LoadEvent) => {
|
|
46
|
+
login: LoginData;
|
|
47
|
+
};
|
|
48
|
+
actions: {
|
|
49
|
+
default: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
50
|
+
email: string;
|
|
51
|
+
error: string;
|
|
52
|
+
}>>;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
logout: {
|
|
56
|
+
load: ({ locals, url }: LoadEvent) => {
|
|
57
|
+
logout: LogoutData;
|
|
58
|
+
};
|
|
59
|
+
actions: {
|
|
60
|
+
default: ({ cookies }: RequestEvent) => Promise<never>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
forgotPassword: {
|
|
64
|
+
actions: {
|
|
65
|
+
default: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
66
|
+
email: string;
|
|
67
|
+
error: string;
|
|
68
|
+
}> | {
|
|
69
|
+
email: string;
|
|
70
|
+
sent: boolean;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
resetPassword: {
|
|
75
|
+
load: ({ url }: LoadEvent) => Promise<{
|
|
76
|
+
reset: ResetData;
|
|
77
|
+
}>;
|
|
78
|
+
actions: {
|
|
79
|
+
default: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
80
|
+
error: string;
|
|
81
|
+
}>>;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* The link of the mail opens a page with a button instead of confirming on GET, so that a mail
|
|
86
|
+
* scanner that opens links does not use it up. Confirming never logs into an account that has
|
|
87
|
+
* a password: whoever holds a mistyped address must not get in. An account from the API has
|
|
88
|
+
* none; it may set one here and is logged in.
|
|
89
|
+
*/
|
|
90
|
+
verifyEmail: {
|
|
91
|
+
load: ({ locals, url }: LoadEvent) => Promise<{
|
|
92
|
+
verify: VerifyData;
|
|
93
|
+
}>;
|
|
94
|
+
actions: {
|
|
95
|
+
confirm: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
96
|
+
error: string;
|
|
97
|
+
}>>;
|
|
98
|
+
resend: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
99
|
+
error: string;
|
|
100
|
+
}> | {
|
|
101
|
+
resent: string;
|
|
102
|
+
}>;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
confirmEmail: {
|
|
106
|
+
load: ({ url }: LoadEvent) => Promise<{
|
|
107
|
+
confirm: ConfirmData;
|
|
108
|
+
}>;
|
|
109
|
+
actions: {
|
|
110
|
+
default: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
111
|
+
error: string;
|
|
112
|
+
}>>;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
account: {
|
|
116
|
+
load: (event: LoadEvent) => Promise<{
|
|
117
|
+
account: AccountData;
|
|
118
|
+
}>;
|
|
119
|
+
actions: {
|
|
120
|
+
createKey: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
121
|
+
action: "createKey";
|
|
122
|
+
error: string;
|
|
123
|
+
}> | {
|
|
124
|
+
action: "createKey";
|
|
125
|
+
key: string;
|
|
126
|
+
}>;
|
|
127
|
+
revokeKey: (event: RequestEvent) => Promise<{
|
|
128
|
+
action: "revokeKey";
|
|
129
|
+
}>;
|
|
130
|
+
changePassword: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
131
|
+
action: "changePassword";
|
|
132
|
+
error: string;
|
|
133
|
+
}> | {
|
|
134
|
+
action: "changePassword";
|
|
135
|
+
done: boolean;
|
|
136
|
+
}>;
|
|
137
|
+
changeEmail: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
138
|
+
action: "changeEmail";
|
|
139
|
+
email: string;
|
|
140
|
+
error: string;
|
|
141
|
+
}> | {
|
|
142
|
+
action: "changeEmail";
|
|
143
|
+
email: string;
|
|
144
|
+
sentTo: string;
|
|
145
|
+
}>;
|
|
146
|
+
/**
|
|
147
|
+
* Only a customer has a portal; opening it must not make one, which with the live key
|
|
148
|
+
* makes the account live.
|
|
149
|
+
*/
|
|
150
|
+
portal: (event: RequestEvent) => Promise<never>;
|
|
151
|
+
delete: (event: RequestEvent) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
152
|
+
action: "delete";
|
|
153
|
+
error: string;
|
|
154
|
+
}>>;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
export {};
|