Compare commits
No commits in common. "74f79ae0b7c92327a97ef4fa95edc87a3befe75e" and "bbfc07478fb68862a6c578b3529fb9deedc7a8f9" have entirely different histories.
74f79ae0b7
...
bbfc07478f
27
conf/example.json
Normal file
27
conf/example.json
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"log": [
|
||||||
|
{
|
||||||
|
"kind": "stdout",
|
||||||
|
"data": {
|
||||||
|
"threshold": "info",
|
||||||
|
"format": "jsonl_structured"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"session_management": {
|
||||||
|
"in_memory": false,
|
||||||
|
"lifetime": 3600
|
||||||
|
},
|
||||||
|
"authentication": {
|
||||||
|
"kind": "internal",
|
||||||
|
"data": {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"kind": "sqlite",
|
||||||
|
"data": {
|
||||||
|
"path": "../zeitbild.sqlite"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"name": "bob",
|
"name": "bob",
|
||||||
"email_address": "bob@example.org",
|
"email_address": "bob@example.org",
|
||||||
"dav_token": "bob_dav",
|
"dav_token": "a5f10bc2d4ded8c5a07c5cb1c4e8b74363abce59d626574f0a83e67d499d9d5f",
|
||||||
"password": "bob"
|
"password": "bob"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
22
lib/plankton/plankton.d.ts
vendored
22
lib/plankton/plankton.d.ts
vendored
|
|
@ -1,11 +1,11 @@
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
declare type int = number;
|
type int = number;
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
declare type float = number;
|
type float = number;
|
||||||
declare var process: any;
|
declare var process: any;
|
||||||
declare var require: any;
|
declare var require: any;
|
||||||
declare class Buffer {
|
declare class Buffer {
|
||||||
|
|
@ -22,7 +22,7 @@ declare namespace lib_plankton.base {
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
declare type type_pseudopointer<type_value> = {
|
type type_pseudopointer<type_value> = {
|
||||||
value: type_value;
|
value: type_value;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
|
|
@ -1498,7 +1498,7 @@ declare namespace lib_plankton.conf {
|
||||||
*/
|
*/
|
||||||
type type_schema = ({
|
type type_schema = ({
|
||||||
enum?: Array<any>;
|
enum?: Array<any>;
|
||||||
default?: (null | any);
|
default?: any;
|
||||||
description?: string;
|
description?: string;
|
||||||
} | {
|
} | {
|
||||||
type: "null";
|
type: "null";
|
||||||
|
|
@ -1507,32 +1507,32 @@ declare namespace lib_plankton.conf {
|
||||||
type: "boolean";
|
type: "boolean";
|
||||||
nullable?: boolean;
|
nullable?: boolean;
|
||||||
enum?: Array<boolean>;
|
enum?: Array<boolean>;
|
||||||
default?: (null | boolean);
|
default?: boolean;
|
||||||
description?: string;
|
description?: string;
|
||||||
} | {
|
} | {
|
||||||
type: "integer";
|
type: "integer";
|
||||||
nullable?: boolean;
|
nullable?: boolean;
|
||||||
enum?: Array<int>;
|
enum?: Array<int>;
|
||||||
default?: (null | int);
|
default?: int;
|
||||||
description?: string;
|
description?: string;
|
||||||
} | {
|
} | {
|
||||||
type: "number";
|
type: "number";
|
||||||
nullable?: boolean;
|
nullable?: boolean;
|
||||||
enum?: Array<number>;
|
enum?: Array<number>;
|
||||||
default?: (null | number);
|
default?: number;
|
||||||
description?: string;
|
description?: string;
|
||||||
} | {
|
} | {
|
||||||
type: "string";
|
type: "string";
|
||||||
nullable?: boolean;
|
nullable?: boolean;
|
||||||
enum?: Array<string>;
|
enum?: Array<string>;
|
||||||
default?: (null | string);
|
default?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
} | {
|
} | {
|
||||||
type: "array";
|
type: "array";
|
||||||
nullable?: boolean;
|
nullable?: boolean;
|
||||||
items: type_schema;
|
items: type_schema;
|
||||||
enum?: Array<Array<any>>;
|
enum?: Array<Array<any>>;
|
||||||
default?: (null | Array<any>);
|
default?: Array<any>;
|
||||||
description?: string;
|
description?: string;
|
||||||
} | {
|
} | {
|
||||||
type: "object";
|
type: "object";
|
||||||
|
|
@ -1541,7 +1541,7 @@ declare namespace lib_plankton.conf {
|
||||||
required?: Array<string>;
|
required?: Array<string>;
|
||||||
additionalProperties?: (false | type_schema);
|
additionalProperties?: (false | type_schema);
|
||||||
enum?: Array<Record<string, any>>;
|
enum?: Array<Record<string, any>>;
|
||||||
default?: (Record<string, any> | null);
|
default?: Record<string, any>;
|
||||||
description?: string;
|
description?: string;
|
||||||
} | {
|
} | {
|
||||||
anyOf: Array<type_schema>;
|
anyOf: Array<type_schema>;
|
||||||
|
|
@ -2315,7 +2315,7 @@ declare namespace lib_plankton.storage.memory {
|
||||||
clear(): Promise<void>;
|
clear(): Promise<void>;
|
||||||
write(key: any, value: any): Promise<boolean>;
|
write(key: any, value: any): Promise<boolean>;
|
||||||
delete(key: any): Promise<void>;
|
delete(key: any): Promise<void>;
|
||||||
read(key: any): Promise<type_item>;
|
read(key: any): Promise<Awaited<type_item>>;
|
||||||
search(term: any): Promise<{
|
search(term: any): Promise<{
|
||||||
key: string;
|
key: string;
|
||||||
preview: string;
|
preview: string;
|
||||||
|
|
|
||||||
|
|
@ -1486,7 +1486,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
function step(op) {
|
function step(op) {
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
while (_) try {
|
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
switch (op[0]) {
|
switch (op[0]) {
|
||||||
|
|
@ -6814,7 +6814,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
function step(op) {
|
function step(op) {
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
while (_) try {
|
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
switch (op[0]) {
|
switch (op[0]) {
|
||||||
|
|
@ -10266,7 +10266,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
function step(op) {
|
function step(op) {
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
while (_) try {
|
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
switch (op[0]) {
|
switch (op[0]) {
|
||||||
|
|
@ -15148,7 +15148,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
function step(op) {
|
function step(op) {
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
while (_) try {
|
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
switch (op[0]) {
|
switch (op[0]) {
|
||||||
|
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
{
|
|
||||||
"version": 1,
|
|
||||||
"log": [
|
|
||||||
{
|
|
||||||
"kind": "stdout",
|
|
||||||
"data": {
|
|
||||||
"threshold": "info",
|
|
||||||
"format": "jsonl_structured"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"session_management": {
|
|
||||||
"in_memory": false,
|
|
||||||
"lifetime": 3600
|
|
||||||
},
|
|
||||||
"authentication": {
|
|
||||||
"kind": "internal",
|
|
||||||
"data": {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"database": {
|
|
||||||
"kind": "sqlite",
|
|
||||||
"data": {
|
|
||||||
"path": "../zeitbild.sqlite"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"caldav": {
|
|
||||||
"address": "http://localhost:8000/calendars/-/lampukistan",
|
|
||||||
"username": "lampukistan-{{username}}",
|
|
||||||
"password": "{{password}}",
|
|
||||||
"setup_hints": [
|
|
||||||
{
|
|
||||||
"label": "Android",
|
|
||||||
"link": "https://www.android-user.de/caldavcarddav-kalender-und-adressbuecher-ohne-google-synchronisieren/",
|
|
||||||
"remark": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "iOS",
|
|
||||||
"link": "https://all-inkl.com/wichtig/anleitungen/programme/e-mail/caldav-kalenderfunktion/ios-mail_460.html",
|
|
||||||
"remark": "eigentlich für Server 'all-inkl.com' — Zugangsdaten müssen entsprechend geändert werden"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Thunderbird",
|
|
||||||
"link": "https://www.uni-bielefeld.de/einrichtungen/bits/services/kuz/e-mail-und-kalender/anleitung/kalender-konfiguration-unter-thunderbird/",
|
|
||||||
"remark": "eigentlich für Server 'uni-bielefeld.de' — Zugangsdaten müssen entsprechend geändert werden"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Evolution",
|
|
||||||
"link": "https://help.gnome.org/users/evolution/stable/calendar-caldav.html.de"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "MS Outlook",
|
|
||||||
"link": "https://www.united-domains.de/help/faq-article/wie-synchronisiere-ich-meinen-kalender-caldav-mit-ms-outlook/",
|
|
||||||
"remark": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,152 +0,0 @@
|
||||||
namespace _zeitbild.api
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
export function register_user_dav_conf(
|
|
||||||
rest_subject : lib_plankton.rest_http.type_rest
|
|
||||||
) : void
|
|
||||||
{
|
|
||||||
register<
|
|
||||||
null,
|
|
||||||
(
|
|
||||||
null
|
|
||||||
|
|
|
||||||
{
|
|
||||||
address : string;
|
|
||||||
username : string;
|
|
||||||
password : (null | string);
|
|
||||||
setup_hints : Array<
|
|
||||||
{
|
|
||||||
label : string;
|
|
||||||
link : string;
|
|
||||||
remark : (null | string);
|
|
||||||
}
|
|
||||||
>;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
>(
|
|
||||||
rest_subject,
|
|
||||||
lib_plankton.http.enum_method.get,
|
|
||||||
"/user_dav_conf",
|
|
||||||
{
|
|
||||||
"description": "gibt die CalDAV-Zugangsdaten eines Nutzers aus",
|
|
||||||
"output_schema": () => ({
|
|
||||||
"nullable": true,
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"address": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"password": {
|
|
||||||
"nullable": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"setup_hints": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"label": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"link": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"remark": {
|
|
||||||
"nullable": true,
|
|
||||||
"type": "string",
|
|
||||||
"default": null,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"label",
|
|
||||||
"link",
|
|
||||||
],
|
|
||||||
"additionalProperties": false
|
|
||||||
},
|
|
||||||
"default": []
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"address",
|
|
||||||
"username",
|
|
||||||
"password",
|
|
||||||
"setup_hints",
|
|
||||||
],
|
|
||||||
"additionalProperties": false
|
|
||||||
}),
|
|
||||||
"restriction": restriction_logged_in,
|
|
||||||
"execution": async (stuff) => {
|
|
||||||
let result : (
|
|
||||||
null
|
|
||||||
|
|
|
||||||
{
|
|
||||||
address : string;
|
|
||||||
username : string;
|
|
||||||
password : (null | string);
|
|
||||||
setup_hints : Array<
|
|
||||||
{
|
|
||||||
label : string;
|
|
||||||
link : string;
|
|
||||||
remark : (null | string);
|
|
||||||
}
|
|
||||||
>;
|
|
||||||
}
|
|
||||||
) = null;
|
|
||||||
const raw : (null | any) = _zeitbild.conf.get()["caldav"];
|
|
||||||
if (raw === null)
|
|
||||||
{
|
|
||||||
result = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const session : {key : string; value : lib_plankton.session.type_session;} = await session_from_stuff(stuff);
|
|
||||||
const user_id : _zeitbild.type_user_id = await _zeitbild.service.user.identify(session.value.name);
|
|
||||||
const user_object : _zeitbild.type_user_object = await _zeitbild.service.user.get(user_id);
|
|
||||||
const arguments_ : Record<string, string> = Object.fromEntries(
|
|
||||||
[
|
|
||||||
{"key": "username", "value": user_object.name},
|
|
||||||
{"key": "password", "value": user_object.dav_token},
|
|
||||||
]
|
|
||||||
.filter(
|
|
||||||
entry => (entry.value !== null)
|
|
||||||
)
|
|
||||||
.map(
|
|
||||||
entry => ([entry.key, entry.value as string])
|
|
||||||
)
|
|
||||||
);
|
|
||||||
result = {
|
|
||||||
"address": lib_plankton.string.coin(raw["address"], arguments_),
|
|
||||||
"username": lib_plankton.string.coin(raw["username"], arguments_),
|
|
||||||
"password": (
|
|
||||||
(user_object.dav_token === null)
|
|
||||||
?
|
|
||||||
null
|
|
||||||
:
|
|
||||||
lib_plankton.string.coin(raw["password"], arguments_)
|
|
||||||
),
|
|
||||||
"setup_hints": raw["setup_hints"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return Promise.resolve(
|
|
||||||
{
|
|
||||||
"status_code": 200,
|
|
||||||
"data": result,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
namespace _zeitbild.api
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
export function register_user_dav_token(
|
|
||||||
rest_subject : lib_plankton.rest_http.type_rest
|
|
||||||
) : void
|
|
||||||
{
|
|
||||||
register<
|
|
||||||
// string,
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
>(
|
|
||||||
rest_subject,
|
|
||||||
lib_plankton.http.enum_method.patch,
|
|
||||||
"/user_dav_token",
|
|
||||||
{
|
|
||||||
"description": "setzt/überschreibt den DAV-Token eines Nutzers",
|
|
||||||
/*
|
|
||||||
"input_schema": () => ({
|
|
||||||
"nullable": false,
|
|
||||||
"type": "string"
|
|
||||||
}),
|
|
||||||
*/
|
|
||||||
"input_schema": () => ({
|
|
||||||
"nullable": true,
|
|
||||||
}),
|
|
||||||
"output_schema": () => ({
|
|
||||||
"nullable": true
|
|
||||||
}),
|
|
||||||
"restriction": restriction_logged_in,
|
|
||||||
"execution": async (stuff) => {
|
|
||||||
const session : {key : string; value : lib_plankton.session.type_session;} = await session_from_stuff(stuff);
|
|
||||||
const user_id : _zeitbild.type_user_id = await _zeitbild.service.user.identify(session.value.name);
|
|
||||||
// TODO: outsource to user service?
|
|
||||||
const user_object : _zeitbild.type_user_object = await _zeitbild.service.user.get(user_id);
|
|
||||||
// user_object.dav_token = stuff.input;
|
|
||||||
user_object.dav_token = lib_plankton.random.generate_string({"length": 12});
|
|
||||||
await _zeitbild.service.user.change(user_id, user_object);
|
|
||||||
return Promise.resolve(
|
|
||||||
{
|
|
||||||
"status_code": 200,
|
|
||||||
"data": null,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -31,15 +31,6 @@ namespace _zeitbild.api
|
||||||
_zeitbild.api.register_session_end(rest_subject);
|
_zeitbild.api.register_session_end(rest_subject);
|
||||||
_zeitbild.api.register_session_oidc(rest_subject);
|
_zeitbild.api.register_session_oidc(rest_subject);
|
||||||
}
|
}
|
||||||
// user
|
|
||||||
{
|
|
||||||
_zeitbild.api.register_users(rest_subject);
|
|
||||||
// caldav
|
|
||||||
{
|
|
||||||
_zeitbild.api.register_user_dav_conf(rest_subject);
|
|
||||||
_zeitbild.api.register_user_dav_token(rest_subject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// calendar
|
// calendar
|
||||||
{
|
{
|
||||||
_zeitbild.api.register_calendar_list(rest_subject);
|
_zeitbild.api.register_calendar_list(rest_subject);
|
||||||
|
|
@ -61,6 +52,7 @@ namespace _zeitbild.api
|
||||||
}
|
}
|
||||||
// misc
|
// misc
|
||||||
{
|
{
|
||||||
|
_zeitbild.api.register_users(rest_subject);
|
||||||
_zeitbild.api.register_events(rest_subject);
|
_zeitbild.api.register_events(rest_subject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -299,60 +299,6 @@ namespace _zeitbild.conf
|
||||||
"default": {
|
"default": {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"caldav": {
|
|
||||||
"nullable": true,
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"address": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"password": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"setup_hints": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"label": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"link": {
|
|
||||||
"nullable": false,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"remark": {
|
|
||||||
"nullable": true,
|
|
||||||
"type": "string",
|
|
||||||
"default": null
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"label",
|
|
||||||
"link",
|
|
||||||
],
|
|
||||||
"additionalProperties": false
|
|
||||||
},
|
|
||||||
"default": []
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"address",
|
|
||||||
"username",
|
|
||||||
"password"
|
|
||||||
],
|
|
||||||
"additionalProperties": false,
|
|
||||||
"default": null
|
|
||||||
},
|
|
||||||
"misc": {
|
"misc": {
|
||||||
"nullable": false,
|
"nullable": false,
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
||||||
|
|
@ -121,19 +121,6 @@ namespace _zeitbild.repository.user
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
export async function update(
|
|
||||||
user_id : _zeitbild.type_user_id,
|
|
||||||
user_object : _zeitbild.type_user_object
|
|
||||||
) : Promise<void>
|
|
||||||
{
|
|
||||||
const dispersal : Record<string, any> = encode(user_object);
|
|
||||||
await get_store().update(user_id, dispersal);
|
|
||||||
return Promise.resolve<void>(undefined);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
export async function identify(
|
export async function identify(
|
||||||
|
|
|
||||||
|
|
@ -47,15 +47,4 @@ namespace _zeitbild.service.user
|
||||||
return _zeitbild.repository.user.create(user_object);
|
return _zeitbild.repository.user.create(user_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
export function change(
|
|
||||||
user_id : _zeitbild.type_user_id,
|
|
||||||
user_object : _zeitbild.type_user_object
|
|
||||||
) : Promise<void>
|
|
||||||
{
|
|
||||||
return _zeitbild.repository.user.update(user_id, user_object);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,6 @@ ${dir_temp}/zeitbild-unlinked.js: \
|
||||||
${dir_source}/api/actions/session_oidc.ts \
|
${dir_source}/api/actions/session_oidc.ts \
|
||||||
${dir_source}/api/actions/session_end.ts \
|
${dir_source}/api/actions/session_end.ts \
|
||||||
${dir_source}/api/actions/users.ts \
|
${dir_source}/api/actions/users.ts \
|
||||||
${dir_source}/api/actions/user_dav_conf.ts \
|
|
||||||
${dir_source}/api/actions/user_dav_token.ts \
|
|
||||||
${dir_source}/api/actions/calendar_list.ts \
|
${dir_source}/api/actions/calendar_list.ts \
|
||||||
${dir_source}/api/actions/calendar_get.ts \
|
${dir_source}/api/actions/calendar_get.ts \
|
||||||
${dir_source}/api/actions/calendar_add.ts \
|
${dir_source}/api/actions/calendar_add.ts \
|
||||||
|
|
|
||||||
|
|
@ -34,17 +34,15 @@ modules="${modules} map"
|
||||||
modules="${modules} pit"
|
modules="${modules} pit"
|
||||||
modules="${modules} auth"
|
modules="${modules} auth"
|
||||||
modules="${modules} sha256"
|
modules="${modules} sha256"
|
||||||
modules="${modules} random"
|
|
||||||
|
|
||||||
|
|
||||||
## exec
|
## exec
|
||||||
|
|
||||||
mkdir -p ${dir}
|
|
||||||
mkdir /tmp/sandbox -p
|
mkdir /tmp/sandbox -p
|
||||||
cd /tmp/sandbox
|
cd /tmp/sandbox
|
||||||
ptk fetch node ${modules}
|
ptk fetch node ${modules}
|
||||||
schwamm --include=/tmp/sandboxplankton.swm.json --output=dump:logic-decl > ${dir}/plankton.d.ts
|
schwamm --include=plankton.swm.json --output=dump:logic-decl > ${dir}/plankton.d.ts
|
||||||
schwamm --include=/tmp/sandboxplankton.swm.json --output=dump:logic-impl > ${dir}/plankton.js
|
schwamm --include=plankton.swm.json --output=dump:logic-impl > ${dir}/plankton.js
|
||||||
exit
|
exit
|
||||||
|
|
||||||
mkdir -p ${dir}
|
mkdir -p ${dir}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue