mftsccs-node 0.0.79-dev → 0.0.81-dev
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.
|
@@ -171,12 +171,15 @@ export declare class Transaction {
|
|
|
171
171
|
*/
|
|
172
172
|
DeleteConnectionsBetween(query: Partial<FetchConnectionQuery>): Promise<number[]>;
|
|
173
173
|
/**
|
|
174
|
-
* Queues connections matching multiple queries for deletion on commit
|
|
174
|
+
* Queues connections matching multiple queries for deletion on commit, plus
|
|
175
|
+
* any already-known connection IDs passed directly.
|
|
175
176
|
*
|
|
176
|
-
* The queries are resolved in one API call
|
|
177
|
-
* merged into this transaction's pending
|
|
177
|
+
* The queries (if any) are resolved in one API call; their connection IDs
|
|
178
|
+
* are merged with `knownConnectionIds` into this transaction's pending
|
|
179
|
+
* deletion queue. Pass an empty `queries` array to queue only IDs you
|
|
180
|
+
* already have, with no extra lookup call.
|
|
178
181
|
*/
|
|
179
|
-
DeleteConnectionsBetweenBulk(queries: Partial<FetchConnectionQuery>[]): Promise<number[]>;
|
|
182
|
+
DeleteConnectionsBetweenBulk(queries: Partial<FetchConnectionQuery>[], knownConnectionIds?: number[]): Promise<number[]>;
|
|
180
183
|
/**
|
|
181
184
|
* Creates a new instance concept within the transaction.
|
|
182
185
|
* The concept represents a data instance of a specified type with associated metadata.
|
|
@@ -55,51 +55,7 @@ export declare class HttpResponse {
|
|
|
55
55
|
*/
|
|
56
56
|
get ok(): boolean;
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
* Make an HTTP request with automatic retry on 401 Unauthorized.
|
|
60
|
-
*
|
|
61
|
-
* If a 401 error occurs and OAuth credentials are available, this function
|
|
62
|
-
* will automatically refresh the token and retry the request once.
|
|
63
|
-
*
|
|
64
|
-
* @async
|
|
65
|
-
* @param {string} method - HTTP method (GET, POST, PUT, DELETE, etc.)
|
|
66
|
-
* @param {string} url - The URL to request
|
|
67
|
-
* @param {Record<string, string>} [headers] - Optional headers dict
|
|
68
|
-
* @param {any} [body] - Optional request body (JSON will be stringified)
|
|
69
|
-
* @param {number} [maxRetries=1] - Maximum number of retries on 401
|
|
70
|
-
* @returns {Promise<HttpResponse>} HttpResponse object with status, body, and headers
|
|
71
|
-
* @throws {TokenRefreshError} If token refresh fails
|
|
72
|
-
* @throws {Error} For other network errors
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
* ```typescript
|
|
76
|
-
* const headers = { "Content-Type": "application/json" };
|
|
77
|
-
* const response = await requestWithRetry(
|
|
78
|
-
* "POST",
|
|
79
|
-
* url,
|
|
80
|
-
* headers,
|
|
81
|
-
* { id: 123 }
|
|
82
|
-
* );
|
|
83
|
-
* if (response.ok) {
|
|
84
|
-
* const data = await response.json();
|
|
85
|
-
* console.log(data);
|
|
86
|
-
* }
|
|
87
|
-
* ```
|
|
88
|
-
*
|
|
89
|
-
* @example
|
|
90
|
-
* ```typescript
|
|
91
|
-
* // Automatic token refresh on 401
|
|
92
|
-
* try {
|
|
93
|
-
* const response = await requestWithRetry("GET", url);
|
|
94
|
-
* // If receives 401, will automatically refresh token and retry
|
|
95
|
-
* } catch (error) {
|
|
96
|
-
* if (error instanceof TokenRefreshError) {
|
|
97
|
-
* console.error('Authentication failed:', error.message);
|
|
98
|
-
* }
|
|
99
|
-
* }
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
export declare function requestWithRetry(method: string, url: string, headers?: Record<string, string>, body?: any, maxRetries?: number): Promise<HttpResponse>;
|
|
58
|
+
export declare function requestWithRetry(method: string, url: string, headers?: Record<string, string>, body?: any, maxRetries?: number, timeoutMs?: number): Promise<HttpResponse>;
|
|
103
59
|
/**
|
|
104
60
|
* Fetch-compatible wrapper backed by requestWithRetry.
|
|
105
61
|
*
|
|
@@ -117,9 +117,6 @@ import { PatcherStructure } from '../DataStructures/PatcherStructure';
|
|
|
117
117
|
* @see {@link PatcherStructure} for the structure of the patcher parameter
|
|
118
118
|
* @see {@link CreateTheCompositionWithCache} for creating nested compositions
|
|
119
119
|
* @see {@link GetTheConcept} for concept retrieval
|
|
120
|
-
* @see {@link
|
|
121
|
-
* @see {@link CreateTheConnectionGeneral} for creating connections between concepts
|
|
122
|
-
* @see {@link DeleteConnectionById} for connection deletion
|
|
123
|
-
* @see {@link SyncData.SyncDataOnline} for backend synchronization
|
|
120
|
+
* @see {@link Transaction} for the create/delete ordering and rollback semantics
|
|
124
121
|
*/
|
|
125
122
|
export default function UpdateComposition(patcherStructure: PatcherStructure): Promise<any>;
|