@proveanything/smartlinks 1.5.1 → 1.5.2

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.
@@ -1,127 +1,129 @@
1
1
  import type { AppCase, CreateCaseInput, UpdateCaseInput, AppendHistoryInput, CaseSummaryRequest, CaseSummaryResponse, CaseListQueryParams, AppThread, CreateThreadInput, UpdateThreadInput, ReplyInput, ThreadListQueryParams, AppRecord, CreateRecordInput, UpdateRecordInput, RecordListQueryParams, PaginatedResponse, AggregateRequest, AggregateResponse, RelatedResponse } from '../types/appObjects';
2
- export declare namespace cases {
3
- /**
4
- * Create a new case
5
- * POST /cases
6
- */
7
- function create(collectionId: string, appId: string, input: CreateCaseInput, admin?: boolean): Promise<AppCase>;
8
- /**
9
- * List cases with optional query parameters
10
- * GET /cases
11
- */
12
- function list(collectionId: string, appId: string, params?: CaseListQueryParams, admin?: boolean): Promise<PaginatedResponse<AppCase>>;
13
- /**
14
- * Get a single case by ID
15
- * GET /cases/:caseId
16
- */
17
- function get(collectionId: string, appId: string, caseId: string, admin?: boolean): Promise<AppCase>;
18
- /**
19
- * Update a case
20
- * PATCH /cases/:caseId
21
- * Admin can update any field, public (owner) can only update data and owner zones
22
- */
23
- function update(collectionId: string, appId: string, caseId: string, input: UpdateCaseInput, admin?: boolean): Promise<AppCase>;
24
- /**
25
- * Soft delete a case
26
- * DELETE /cases/:caseId
27
- */
28
- function remove(collectionId: string, appId: string, caseId: string, admin?: boolean): Promise<{
29
- success: boolean;
30
- }>;
31
- /**
32
- * Get aggregate statistics for cases
33
- * POST /cases/aggregate
34
- */
35
- function aggregate(collectionId: string, appId: string, request: AggregateRequest, admin?: boolean): Promise<AggregateResponse>;
36
- /**
37
- * Get case summary (admin only)
38
- * POST /cases/summary
39
- */
40
- function summary(collectionId: string, appId: string, request?: CaseSummaryRequest): Promise<CaseSummaryResponse>;
41
- /**
42
- * Append an entry to case history (admin only)
43
- * POST /cases/:caseId/history
44
- */
45
- function appendHistory(collectionId: string, appId: string, caseId: string, input: AppendHistoryInput): Promise<AppCase>;
46
- /**
47
- * Get related threads and records for a case (admin only)
48
- * GET /cases/:caseId/related
49
- */
50
- function related(collectionId: string, appId: string, caseId: string): Promise<RelatedResponse>;
51
- }
52
- export declare namespace threads {
53
- /**
54
- * Create a new thread
55
- * POST /threads
56
- */
57
- function create(collectionId: string, appId: string, input: CreateThreadInput, admin?: boolean): Promise<AppThread>;
58
- /**
59
- * List threads with optional query parameters
60
- * GET /threads
61
- */
62
- function list(collectionId: string, appId: string, params?: ThreadListQueryParams, admin?: boolean): Promise<PaginatedResponse<AppThread>>;
63
- /**
64
- * Get a single thread by ID
65
- * GET /threads/:threadId
66
- */
67
- function get(collectionId: string, appId: string, threadId: string, admin?: boolean): Promise<AppThread>;
68
- /**
69
- * Update a thread
70
- * PATCH /threads/:threadId
71
- * Admin can update any field, public (owner) can only update body, tags, data, owner
72
- */
73
- function update(collectionId: string, appId: string, threadId: string, input: UpdateThreadInput, admin?: boolean): Promise<AppThread>;
74
- /**
75
- * Soft delete a thread
76
- * DELETE /threads/:threadId
77
- */
78
- function remove(collectionId: string, appId: string, threadId: string, admin?: boolean): Promise<{
79
- success: boolean;
80
- }>;
81
- /**
82
- * Add a reply to a thread
83
- * POST /threads/:threadId/reply
84
- * Atomically appends to replies array, increments replyCount, updates lastReplyAt
85
- */
86
- function reply(collectionId: string, appId: string, threadId: string, input: ReplyInput, admin?: boolean): Promise<AppThread>;
87
- /**
88
- * Get aggregate statistics for threads
89
- * POST /threads/aggregate
90
- */
91
- function aggregate(collectionId: string, appId: string, request: AggregateRequest, admin?: boolean): Promise<AggregateResponse>;
92
- }
93
- export declare namespace records {
94
- /**
95
- * Create a new record
96
- * POST /records
97
- */
98
- function create(collectionId: string, appId: string, input: CreateRecordInput, admin?: boolean): Promise<AppRecord>;
99
- /**
100
- * List records with optional query parameters
101
- * GET /records
102
- */
103
- function list(collectionId: string, appId: string, params?: RecordListQueryParams, admin?: boolean): Promise<PaginatedResponse<AppRecord>>;
104
- /**
105
- * Get a single record by ID
106
- * GET /records/:recordId
107
- */
108
- function get(collectionId: string, appId: string, recordId: string, admin?: boolean): Promise<AppRecord>;
109
- /**
110
- * Update a record
111
- * PATCH /records/:recordId
112
- * Admin can update any field, public (owner) can only update data and owner
113
- */
114
- function update(collectionId: string, appId: string, recordId: string, input: UpdateRecordInput, admin?: boolean): Promise<AppRecord>;
115
- /**
116
- * Soft delete a record
117
- * DELETE /records/:recordId
118
- */
119
- function remove(collectionId: string, appId: string, recordId: string, admin?: boolean): Promise<{
120
- success: boolean;
121
- }>;
122
- /**
123
- * Get aggregate statistics for records
124
- * POST /records/aggregate
125
- */
126
- function aggregate(collectionId: string, appId: string, request: AggregateRequest, admin?: boolean): Promise<AggregateResponse>;
2
+ export declare namespace app {
3
+ namespace cases {
4
+ /**
5
+ * Create a new case
6
+ * POST /cases
7
+ */
8
+ function create(collectionId: string, appId: string, input: CreateCaseInput, admin?: boolean): Promise<AppCase>;
9
+ /**
10
+ * List cases with optional query parameters
11
+ * GET /cases
12
+ */
13
+ function list(collectionId: string, appId: string, params?: CaseListQueryParams, admin?: boolean): Promise<PaginatedResponse<AppCase>>;
14
+ /**
15
+ * Get a single case by ID
16
+ * GET /cases/:caseId
17
+ */
18
+ function get(collectionId: string, appId: string, caseId: string, admin?: boolean): Promise<AppCase>;
19
+ /**
20
+ * Update a case
21
+ * PATCH /cases/:caseId
22
+ * Admin can update any field, public (owner) can only update data and owner zones
23
+ */
24
+ function update(collectionId: string, appId: string, caseId: string, input: UpdateCaseInput, admin?: boolean): Promise<AppCase>;
25
+ /**
26
+ * Soft delete a case
27
+ * DELETE /cases/:caseId
28
+ */
29
+ function remove(collectionId: string, appId: string, caseId: string, admin?: boolean): Promise<{
30
+ success: boolean;
31
+ }>;
32
+ /**
33
+ * Get aggregate statistics for cases
34
+ * POST /cases/aggregate
35
+ */
36
+ function aggregate(collectionId: string, appId: string, request: AggregateRequest, admin?: boolean): Promise<AggregateResponse>;
37
+ /**
38
+ * Get case summary (admin only)
39
+ * POST /cases/summary
40
+ */
41
+ function summary(collectionId: string, appId: string, request?: CaseSummaryRequest): Promise<CaseSummaryResponse>;
42
+ /**
43
+ * Append an entry to case history (admin only)
44
+ * POST /cases/:caseId/history
45
+ */
46
+ function appendHistory(collectionId: string, appId: string, caseId: string, input: AppendHistoryInput): Promise<AppCase>;
47
+ /**
48
+ * Get related threads and records for a case (admin only)
49
+ * GET /cases/:caseId/related
50
+ */
51
+ function related(collectionId: string, appId: string, caseId: string): Promise<RelatedResponse>;
52
+ }
53
+ namespace threads {
54
+ /**
55
+ * Create a new thread
56
+ * POST /threads
57
+ */
58
+ function create(collectionId: string, appId: string, input: CreateThreadInput, admin?: boolean): Promise<AppThread>;
59
+ /**
60
+ * List threads with optional query parameters
61
+ * GET /threads
62
+ */
63
+ function list(collectionId: string, appId: string, params?: ThreadListQueryParams, admin?: boolean): Promise<PaginatedResponse<AppThread>>;
64
+ /**
65
+ * Get a single thread by ID
66
+ * GET /threads/:threadId
67
+ */
68
+ function get(collectionId: string, appId: string, threadId: string, admin?: boolean): Promise<AppThread>;
69
+ /**
70
+ * Update a thread
71
+ * PATCH /threads/:threadId
72
+ * Admin can update any field, public (owner) can only update body, tags, data, owner
73
+ */
74
+ function update(collectionId: string, appId: string, threadId: string, input: UpdateThreadInput, admin?: boolean): Promise<AppThread>;
75
+ /**
76
+ * Soft delete a thread
77
+ * DELETE /threads/:threadId
78
+ */
79
+ function remove(collectionId: string, appId: string, threadId: string, admin?: boolean): Promise<{
80
+ success: boolean;
81
+ }>;
82
+ /**
83
+ * Add a reply to a thread
84
+ * POST /threads/:threadId/reply
85
+ * Atomically appends to replies array, increments replyCount, updates lastReplyAt
86
+ */
87
+ function reply(collectionId: string, appId: string, threadId: string, input: ReplyInput, admin?: boolean): Promise<AppThread>;
88
+ /**
89
+ * Get aggregate statistics for threads
90
+ * POST /threads/aggregate
91
+ */
92
+ function aggregate(collectionId: string, appId: string, request: AggregateRequest, admin?: boolean): Promise<AggregateResponse>;
93
+ }
94
+ namespace records {
95
+ /**
96
+ * Create a new record
97
+ * POST /records
98
+ */
99
+ function create(collectionId: string, appId: string, input: CreateRecordInput, admin?: boolean): Promise<AppRecord>;
100
+ /**
101
+ * List records with optional query parameters
102
+ * GET /records
103
+ */
104
+ function list(collectionId: string, appId: string, params?: RecordListQueryParams, admin?: boolean): Promise<PaginatedResponse<AppRecord>>;
105
+ /**
106
+ * Get a single record by ID
107
+ * GET /records/:recordId
108
+ */
109
+ function get(collectionId: string, appId: string, recordId: string, admin?: boolean): Promise<AppRecord>;
110
+ /**
111
+ * Update a record
112
+ * PATCH /records/:recordId
113
+ * Admin can update any field, public (owner) can only update data and owner
114
+ */
115
+ function update(collectionId: string, appId: string, recordId: string, input: UpdateRecordInput, admin?: boolean): Promise<AppRecord>;
116
+ /**
117
+ * Soft delete a record
118
+ * DELETE /records/:recordId
119
+ */
120
+ function remove(collectionId: string, appId: string, recordId: string, admin?: boolean): Promise<{
121
+ success: boolean;
122
+ }>;
123
+ /**
124
+ * Get aggregate statistics for records
125
+ * POST /records/aggregate
126
+ */
127
+ function aggregate(collectionId: string, appId: string, request: AggregateRequest, admin?: boolean): Promise<AggregateResponse>;
128
+ }
127
129
  }