@proveanything/smartlinks 1.2.3 → 1.3.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/README.md +75 -0
- package/dist/README.md +569 -0
- package/dist/api/asset.js +6 -5
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +2 -0
- package/dist/api/realtime.d.ts +103 -0
- package/dist/api/realtime.js +113 -0
- package/{API_SUMMARY.md → dist/docs/API_SUMMARY.md} +226 -1
- package/dist/docs/i18n.md +287 -0
- package/dist/docs/liquid-templates.md +484 -0
- package/dist/docs/realtime.md +764 -0
- package/dist/docs/theme-defaults.md +100 -0
- package/dist/docs/theme.system.md +338 -0
- package/dist/docs/widgets.md +510 -0
- package/dist/http.js +132 -19
- package/dist/types/asset.d.ts +2 -0
- package/dist/types/error.d.ts +69 -3
- package/dist/types/error.js +98 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/realtime.d.ts +44 -0
- package/dist/types/realtime.js +2 -0
- package/package.json +3 -4
- package/dist/api/actions.d.ts +0 -32
- package/dist/api/actions.js +0 -99
- package/dist/build-docs.js +0 -61
- package/dist/types/actions.d.ts +0 -123
- package/dist/types/actions.js +0 -2
package/dist/build-docs.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var child_process_1 = require("child_process");
|
|
4
|
-
var fs_1 = require("fs");
|
|
5
|
-
var path_1 = require("path");
|
|
6
|
-
// Run TypeDoc to generate markdown docs in temp-docs
|
|
7
|
-
(0, child_process_1.execSync)("npx typedoc --out temp-docs --plugin typedoc-plugin-markdown --entryPoints src/index.ts --excludePrivate --excludeInternal --hideBreadcrumbs --hidePageTitle", { stdio: "inherit" });
|
|
8
|
-
var tempDocsDir = (0, path_1.join)(__dirname, "..", "temp-docs");
|
|
9
|
-
var docsDir = (0, path_1.join)(__dirname, "..", "docs");
|
|
10
|
-
var outPath = (0, path_1.join)(docsDir, "README.md");
|
|
11
|
-
if (!(0, fs_1.existsSync)(docsDir))
|
|
12
|
-
(0, fs_1.mkdirSync)(docsDir);
|
|
13
|
-
var files = (0, fs_1.readdirSync)(tempDocsDir)
|
|
14
|
-
.filter(function (f) { return (0, path_1.extname)(f) === ".md"; })
|
|
15
|
-
.sort(function (a, b) { return a === "modules.md" ? -1 : a.localeCompare(b); }); // modules.md first
|
|
16
|
-
var content = "# Smartlinks SDK Documentation\n\n";
|
|
17
|
-
for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
|
|
18
|
-
var file = files_1[_i];
|
|
19
|
-
var fileContent = (0, fs_1.readFileSync)((0, path_1.join)(tempDocsDir, file), "utf-8");
|
|
20
|
-
// Remove redundant titles (except for the first file)
|
|
21
|
-
content += file === "modules.md"
|
|
22
|
-
? fileContent + "\n\n"
|
|
23
|
-
: fileContent.replace(/^# .*\n/, "") + "\n\n";
|
|
24
|
-
}
|
|
25
|
-
(0, fs_1.writeFileSync)(outPath, content);
|
|
26
|
-
console.log("Documentation built at docs/README.md");
|
|
27
|
-
var fs = require("fs");
|
|
28
|
-
var path = require("path");
|
|
29
|
-
// Use process.cwd() to ensure relative to project root
|
|
30
|
-
var docsJsonPath = path.join(process.cwd(), "docs", "documentation.json");
|
|
31
|
-
var readmePath = path.join(process.cwd(), "README.md");
|
|
32
|
-
function extractFullApiDocs(json) {
|
|
33
|
-
// This is a minimal implementation. For a full-featured generator,
|
|
34
|
-
// parse all namespaces, functions, and types from the TypeDoc JSON.
|
|
35
|
-
// Here, we just dump the JSON for demonstration.
|
|
36
|
-
// Replace this with a real markdown generator as needed.
|
|
37
|
-
return [
|
|
38
|
-
"# @proveanything/smartlinks",
|
|
39
|
-
"",
|
|
40
|
-
"This README is auto-generated from the TypeScript API documentation.",
|
|
41
|
-
"",
|
|
42
|
-
"## API Reference",
|
|
43
|
-
"",
|
|
44
|
-
"```json",
|
|
45
|
-
JSON.stringify(json, null, 2),
|
|
46
|
-
"```",
|
|
47
|
-
"",
|
|
48
|
-
"_Replace this with a full markdown generator for production use._"
|
|
49
|
-
].join("\n");
|
|
50
|
-
}
|
|
51
|
-
function main() {
|
|
52
|
-
console.log("Looking for docs JSON at:", docsJsonPath);
|
|
53
|
-
if (!fs.existsSync(docsJsonPath)) {
|
|
54
|
-
throw new Error("documentation.json not found. Run `npm run docs` first.");
|
|
55
|
-
}
|
|
56
|
-
var json = JSON.parse(fs.readFileSync(docsJsonPath, "utf-8"));
|
|
57
|
-
var markdown = extractFullApiDocs(json);
|
|
58
|
-
fs.writeFileSync(readmePath, markdown, "utf-8");
|
|
59
|
-
console.log("README.md generated from API documentation.");
|
|
60
|
-
}
|
|
61
|
-
main();
|
package/dist/types/actions.d.ts
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import type { IdField } from './common';
|
|
2
|
-
export interface AdminByUserRequest {
|
|
3
|
-
userId?: string;
|
|
4
|
-
contactId?: string;
|
|
5
|
-
appId?: string;
|
|
6
|
-
actionId?: string;
|
|
7
|
-
broadcastId?: string;
|
|
8
|
-
outcome?: string | null;
|
|
9
|
-
from?: string;
|
|
10
|
-
to?: string;
|
|
11
|
-
limit?: number;
|
|
12
|
-
}
|
|
13
|
-
export interface AdminCountsByOutcomeRequest {
|
|
14
|
-
appId?: string;
|
|
15
|
-
actionId?: string;
|
|
16
|
-
from?: string;
|
|
17
|
-
to?: string;
|
|
18
|
-
limit?: number;
|
|
19
|
-
dedupeLatest?: boolean;
|
|
20
|
-
idField?: IdField;
|
|
21
|
-
}
|
|
22
|
-
export interface AdminActorIdsByActionRequest {
|
|
23
|
-
actionId: string;
|
|
24
|
-
idField?: IdField;
|
|
25
|
-
outcome?: string | null;
|
|
26
|
-
includeOutcome?: boolean;
|
|
27
|
-
from?: string;
|
|
28
|
-
to?: string;
|
|
29
|
-
limit?: number;
|
|
30
|
-
}
|
|
31
|
-
export interface PublicCountsByOutcomeRequest {
|
|
32
|
-
appId: string;
|
|
33
|
-
actionId: string;
|
|
34
|
-
from?: string;
|
|
35
|
-
to?: string;
|
|
36
|
-
limit?: number;
|
|
37
|
-
}
|
|
38
|
-
export interface PublicByUserRequest {
|
|
39
|
-
appId: string;
|
|
40
|
-
actionId: string;
|
|
41
|
-
from?: string;
|
|
42
|
-
to?: string;
|
|
43
|
-
limit?: number;
|
|
44
|
-
}
|
|
45
|
-
export interface ActionEventRow {
|
|
46
|
-
orgId: string;
|
|
47
|
-
collectionId: string;
|
|
48
|
-
timestamp: string;
|
|
49
|
-
appId?: string;
|
|
50
|
-
actionId?: string;
|
|
51
|
-
broadcastId?: string;
|
|
52
|
-
userId?: string;
|
|
53
|
-
contactId?: string;
|
|
54
|
-
outcome?: string | null;
|
|
55
|
-
metadata?: Record<string, unknown>;
|
|
56
|
-
[k: string]: unknown;
|
|
57
|
-
}
|
|
58
|
-
export interface OutcomeCount {
|
|
59
|
-
outcome: string | null;
|
|
60
|
-
count: number;
|
|
61
|
-
}
|
|
62
|
-
export type ActorId = string;
|
|
63
|
-
export interface ActorWithOutcome {
|
|
64
|
-
id: string;
|
|
65
|
-
outcome: string | null;
|
|
66
|
-
}
|
|
67
|
-
export interface AppendActionBody {
|
|
68
|
-
userId?: string;
|
|
69
|
-
contactId?: string;
|
|
70
|
-
actionId: string;
|
|
71
|
-
appId?: string;
|
|
72
|
-
broadcastId?: string;
|
|
73
|
-
outcome?: string;
|
|
74
|
-
timestamp?: string;
|
|
75
|
-
metadata?: Record<string, unknown>;
|
|
76
|
-
[k: string]: any;
|
|
77
|
-
}
|
|
78
|
-
export interface ActionPermissions {
|
|
79
|
-
allowOwnRead?: boolean;
|
|
80
|
-
allowPublicSummary?: boolean;
|
|
81
|
-
allowAuthenticatedSummary?: boolean;
|
|
82
|
-
}
|
|
83
|
-
export interface ActionRecord {
|
|
84
|
-
id?: string;
|
|
85
|
-
collectionId: string;
|
|
86
|
-
appId: string;
|
|
87
|
-
permissions?: ActionPermissions;
|
|
88
|
-
data?: {
|
|
89
|
-
display?: {
|
|
90
|
-
title?: string;
|
|
91
|
-
description?: string;
|
|
92
|
-
icon?: string;
|
|
93
|
-
color?: string;
|
|
94
|
-
};
|
|
95
|
-
actionType?: string;
|
|
96
|
-
[key: string]: unknown;
|
|
97
|
-
};
|
|
98
|
-
createdAt: string;
|
|
99
|
-
}
|
|
100
|
-
export interface ActionList {
|
|
101
|
-
items: ActionRecord[];
|
|
102
|
-
limit: number;
|
|
103
|
-
offset: number;
|
|
104
|
-
}
|
|
105
|
-
export interface CreateActionBody {
|
|
106
|
-
id: string;
|
|
107
|
-
appId: string;
|
|
108
|
-
permissions?: ActionPermissions;
|
|
109
|
-
data?: Record<string, unknown>;
|
|
110
|
-
}
|
|
111
|
-
export interface UpdateActionBody {
|
|
112
|
-
appId?: string;
|
|
113
|
-
permissions?: ActionPermissions;
|
|
114
|
-
data?: Record<string, unknown>;
|
|
115
|
-
}
|
|
116
|
-
export interface ListActionsQuery {
|
|
117
|
-
appId?: string;
|
|
118
|
-
limit?: number;
|
|
119
|
-
offset?: number;
|
|
120
|
-
}
|
|
121
|
-
export type ActionQueryByUser = AdminByUserRequest;
|
|
122
|
-
export type ActionCountsQuery = AdminCountsByOutcomeRequest;
|
|
123
|
-
export type ActorIdsByActionQuery = AdminActorIdsByActionRequest;
|
package/dist/types/actions.js
DELETED