anymal-protocol 1.0.61 → 1.0.62
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/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -223,6 +223,14 @@ declare enum ActionType {
|
|
|
223
223
|
CONTRACT = "CONTRACT",
|
|
224
224
|
EXTERNAL = "EXTERNAL"
|
|
225
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* The source type
|
|
228
|
+
*/
|
|
229
|
+
declare enum ActionSourceType {
|
|
230
|
+
USER = "USER",
|
|
231
|
+
ORGANIZATION = "ORGANIZATION",
|
|
232
|
+
APP = "APP"
|
|
233
|
+
}
|
|
226
234
|
/**
|
|
227
235
|
* Represents a single action record returned by the backend.
|
|
228
236
|
*/
|
|
@@ -306,7 +314,7 @@ interface SubmitResponse {
|
|
|
306
314
|
/**
|
|
307
315
|
* Generic submission function
|
|
308
316
|
*/
|
|
309
|
-
declare function submitAction(idToken: string, pid: string, payload: ActionPayload, endpointBaseUrl: string): Promise<SubmitResponse>;
|
|
317
|
+
declare function submitAction(idToken: string, pid: string, sourceType: ActionSourceType, payload: ActionPayload, endpointBaseUrl: string): Promise<SubmitResponse>;
|
|
310
318
|
|
|
311
319
|
declare function useFetchActions(): (idToken: string, actionsServiceBaseUrl: string, pid: string, status?: string, limit?: number, offset?: number) => Promise<FetchActionsResponse | null>;
|
|
312
320
|
|
package/dist/index.d.ts
CHANGED
|
@@ -223,6 +223,14 @@ declare enum ActionType {
|
|
|
223
223
|
CONTRACT = "CONTRACT",
|
|
224
224
|
EXTERNAL = "EXTERNAL"
|
|
225
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* The source type
|
|
228
|
+
*/
|
|
229
|
+
declare enum ActionSourceType {
|
|
230
|
+
USER = "USER",
|
|
231
|
+
ORGANIZATION = "ORGANIZATION",
|
|
232
|
+
APP = "APP"
|
|
233
|
+
}
|
|
226
234
|
/**
|
|
227
235
|
* Represents a single action record returned by the backend.
|
|
228
236
|
*/
|
|
@@ -306,7 +314,7 @@ interface SubmitResponse {
|
|
|
306
314
|
/**
|
|
307
315
|
* Generic submission function
|
|
308
316
|
*/
|
|
309
|
-
declare function submitAction(idToken: string, pid: string, payload: ActionPayload, endpointBaseUrl: string): Promise<SubmitResponse>;
|
|
317
|
+
declare function submitAction(idToken: string, pid: string, sourceType: ActionSourceType, payload: ActionPayload, endpointBaseUrl: string): Promise<SubmitResponse>;
|
|
310
318
|
|
|
311
319
|
declare function useFetchActions(): (idToken: string, actionsServiceBaseUrl: string, pid: string, status?: string, limit?: number, offset?: number) => Promise<FetchActionsResponse | null>;
|
|
312
320
|
|
package/dist/index.js
CHANGED
|
@@ -2112,12 +2112,12 @@ async function generateAppSignature(privateKeyHex, clientId, redirectUri, state)
|
|
|
2112
2112
|
}
|
|
2113
2113
|
|
|
2114
2114
|
// src/helpers/ActionHelpers.tsx
|
|
2115
|
-
async function submitAction(idToken, pid, payload, endpointBaseUrl) {
|
|
2115
|
+
async function submitAction(idToken, pid, sourceType, payload, endpointBaseUrl) {
|
|
2116
2116
|
const api = endpointBaseUrl + "/actions";
|
|
2117
2117
|
const response = await fetch(api, {
|
|
2118
2118
|
method: "POST",
|
|
2119
2119
|
headers: { "Content-Type": "application/json", "Authorization": "Bearer " + idToken },
|
|
2120
|
-
body: JSON.stringify({ actionId: payload.actionId, pid, payload })
|
|
2120
|
+
body: JSON.stringify({ actionId: payload.actionId, pid, source_type: sourceType, payload })
|
|
2121
2121
|
});
|
|
2122
2122
|
if (!response.ok) {
|
|
2123
2123
|
const err = await response.json();
|
package/dist/index.mjs
CHANGED
|
@@ -1980,12 +1980,12 @@ var generateBytes32Nonce = () => {
|
|
|
1980
1980
|
};
|
|
1981
1981
|
|
|
1982
1982
|
// src/helpers/ActionHelpers.tsx
|
|
1983
|
-
async function submitAction(idToken, pid, payload, endpointBaseUrl) {
|
|
1983
|
+
async function submitAction(idToken, pid, sourceType, payload, endpointBaseUrl) {
|
|
1984
1984
|
const api = endpointBaseUrl + "/actions";
|
|
1985
1985
|
const response = await fetch(api, {
|
|
1986
1986
|
method: "POST",
|
|
1987
1987
|
headers: { "Content-Type": "application/json", "Authorization": "Bearer " + idToken },
|
|
1988
|
-
body: JSON.stringify({ actionId: payload.actionId, pid, payload })
|
|
1988
|
+
body: JSON.stringify({ actionId: payload.actionId, pid, source_type: sourceType, payload })
|
|
1989
1989
|
});
|
|
1990
1990
|
if (!response.ok) {
|
|
1991
1991
|
const err = await response.json();
|
package/package.json
CHANGED