@activepieces/piece-aiprise 0.1.2 → 0.1.3
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/package.json +7 -12
- package/src/index.js +17 -64
- package/src/index.d.ts +0 -5
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/create-business-profile.d.ts +0 -22
- package/src/lib/actions/create-business-profile.d.ts.map +0 -1
- package/src/lib/actions/create-business-profile.js +0 -171
- package/src/lib/actions/create-business-profile.js.map +0 -1
- package/src/lib/actions/create-user-profile.d.ts +0 -23
- package/src/lib/actions/create-user-profile.d.ts.map +0 -1
- package/src/lib/actions/create-user-profile.js +0 -146
- package/src/lib/actions/create-user-profile.js.map +0 -1
- package/src/lib/actions/get-additional-user-info.d.ts +0 -7
- package/src/lib/actions/get-additional-user-info.d.ts.map +0 -1
- package/src/lib/actions/get-additional-user-info.js +0 -37
- package/src/lib/actions/get-additional-user-info.js.map +0 -1
- package/src/lib/actions/get-business-documents.d.ts +0 -7
- package/src/lib/actions/get-business-documents.d.ts.map +0 -1
- package/src/lib/actions/get-business-documents.js +0 -37
- package/src/lib/actions/get-business-documents.js.map +0 -1
- package/src/lib/actions/get-business-input-data.d.ts +0 -7
- package/src/lib/actions/get-business-input-data.d.ts.map +0 -1
- package/src/lib/actions/get-business-input-data.js +0 -38
- package/src/lib/actions/get-business-input-data.js.map +0 -1
- package/src/lib/actions/get-business-profile.d.ts +0 -7
- package/src/lib/actions/get-business-profile.d.ts.map +0 -1
- package/src/lib/actions/get-business-profile.js +0 -37
- package/src/lib/actions/get-business-profile.js.map +0 -1
- package/src/lib/actions/get-business-result.d.ts +0 -7
- package/src/lib/actions/get-business-result.d.ts.map +0 -1
- package/src/lib/actions/get-business-result.js +0 -38
- package/src/lib/actions/get-business-result.js.map +0 -1
- package/src/lib/actions/get-user-input-data.d.ts +0 -7
- package/src/lib/actions/get-user-input-data.d.ts.map +0 -1
- package/src/lib/actions/get-user-input-data.js +0 -38
- package/src/lib/actions/get-user-input-data.js.map +0 -1
- package/src/lib/actions/get-user-profile.d.ts +0 -7
- package/src/lib/actions/get-user-profile.d.ts.map +0 -1
- package/src/lib/actions/get-user-profile.js +0 -37
- package/src/lib/actions/get-user-profile.js.map +0 -1
- package/src/lib/actions/get-verification-result.d.ts +0 -7
- package/src/lib/actions/get-verification-result.d.ts.map +0 -1
- package/src/lib/actions/get-verification-result.js +0 -38
- package/src/lib/actions/get-verification-result.js.map +0 -1
- package/src/lib/actions/get-verification-url.d.ts +0 -8
- package/src/lib/actions/get-verification-url.d.ts.map +0 -1
- package/src/lib/actions/get-verification-url.js +0 -47
- package/src/lib/actions/get-verification-url.js.map +0 -1
- package/src/lib/actions/run-business-verification.d.ts +0 -8
- package/src/lib/actions/run-business-verification.d.ts.map +0 -1
- package/src/lib/actions/run-business-verification.js +0 -44
- package/src/lib/actions/run-business-verification.js.map +0 -1
- package/src/lib/actions/run-document-check.d.ts +0 -12
- package/src/lib/actions/run-document-check.d.ts.map +0 -1
- package/src/lib/actions/run-document-check.js +0 -74
- package/src/lib/actions/run-document-check.js.map +0 -1
- package/src/lib/actions/run-user-verification-profile.d.ts +0 -8
- package/src/lib/actions/run-user-verification-profile.d.ts.map +0 -1
- package/src/lib/actions/run-user-verification-profile.js +0 -44
- package/src/lib/actions/run-user-verification-profile.js.map +0 -1
- package/src/lib/actions/search-businesses.d.ts +0 -9
- package/src/lib/actions/search-businesses.d.ts.map +0 -1
- package/src/lib/actions/search-businesses.js +0 -54
- package/src/lib/actions/search-businesses.js.map +0 -1
- package/src/lib/actions/update-verification-result.d.ts +0 -8
- package/src/lib/actions/update-verification-result.d.ts.map +0 -1
- package/src/lib/actions/update-verification-result.js +0 -52
- package/src/lib/actions/update-verification-result.js.map +0 -1
- package/src/lib/common/auth.d.ts +0 -5
- package/src/lib/common/auth.d.ts.map +0 -1
- package/src/lib/common/auth.js +0 -32
- package/src/lib/common/auth.js.map +0 -1
- package/src/lib/common/index.d.ts +0 -20
- package/src/lib/common/index.d.ts.map +0 -1
- package/src/lib/common/index.js +0 -31
- package/src/lib/common/index.js.map +0 -1
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateVerificationResultAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const auth_1 = require("../common/auth");
|
|
9
|
-
exports.updateVerificationResultAction = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.aipriseAuth,
|
|
11
|
-
name: 'update_verification_result',
|
|
12
|
-
displayName: 'Override Identity Verification Decision',
|
|
13
|
-
description: 'Manually changes the outcome of an identity check — useful when a human reviewer needs to approve or decline a case that AiPrise flagged for manual review.',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: {
|
|
16
|
-
description: 'Manually overrides the decision on an existing identity verification, setting it to Approved, Declined, Review (back to manual review), or Deactivated. Use this to implement a human-review/escalation step on a case AiPrise flagged. Requires the verification session ID and the target decision. Idempotent — it sets the decision to an explicit value, so repeating the same call leaves the case in the same state.',
|
|
17
|
-
idempotent: true,
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
verification_session_id: pieces_framework_1.Property.ShortText({
|
|
21
|
-
displayName: 'Verification Session ID',
|
|
22
|
-
description: 'The ID of the verification whose decision you want to change. You can get this from the output of the **Start Identity Verification** action, or from the **session_id** field in any webhook payload from AiPrise.',
|
|
23
|
-
required: true,
|
|
24
|
-
}),
|
|
25
|
-
result: pieces_framework_1.Property.StaticDropdown({
|
|
26
|
-
displayName: 'New Decision',
|
|
27
|
-
description: 'The outcome you want to set. Choose **Approved** to pass the person, **Declined** to reject them, or **Pending** to put the case back into manual review.',
|
|
28
|
-
required: true,
|
|
29
|
-
options: {
|
|
30
|
-
options: [
|
|
31
|
-
{ label: 'Approved — pass the person', value: 'APPROVED' },
|
|
32
|
-
{ label: 'Declined — reject the person', value: 'DECLINED' },
|
|
33
|
-
{ label: 'Review — put in manual review', value: 'REVIEW' },
|
|
34
|
-
{ label: 'Deactivated — deactivate the profile', value: 'DEACTIVATED' },
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
}),
|
|
38
|
-
},
|
|
39
|
-
run(context) {
|
|
40
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const { verification_session_id, result } = context.propsValue;
|
|
42
|
-
const response = yield common_1.aiprise.makeRequest({
|
|
43
|
-
auth: context.auth.props,
|
|
44
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
45
|
-
path: '/verify/update_user_verification_result',
|
|
46
|
-
body: { verification_session_id, result },
|
|
47
|
-
});
|
|
48
|
-
return response;
|
|
49
|
-
});
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=update-verification-result.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-verification-result.js","sourceRoot":"","sources":["../../../../src/lib/actions/update-verification-result.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,sCAAoC;AACpC,yCAA6C;AAEhC,QAAA,8BAA8B,GAAG,IAAA,+BAAY,EAAC;IACzD,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,yCAAyC;IACtD,WAAW,EACT,6JAA6J;IAC/J,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,6ZAA6Z;QAC/Z,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,uBAAuB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1C,WAAW,EAAE,yBAAyB;YACtC,WAAW,EACT,qNAAqN;YACvN,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,WAAW,EACT,2JAA2J;YAC7J,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,UAAU,EAAE;oBAC1D,EAAE,KAAK,EAAE,8BAA8B,EAAE,KAAK,EAAE,UAAU,EAAE;oBAC5D,EAAE,KAAK,EAAE,+BAA+B,EAAE,KAAK,EAAE,QAAQ,EAAE;oBAC3D,EAAC,KAAK,EAAE,sCAAsC,EAAE,KAAK,EAAE,aAAa,EAAE;iBACvE;aACF;SACF,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC/D,MAAM,QAAQ,GAAG,MAAM,gBAAO,CAAC,WAAW,CAA0B;gBAClE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,yCAAyC;gBAC/C,IAAI,EAAE,EAAE,uBAAuB,EAAE,MAAM,EAAE;aAC1C,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
package/src/lib/common/auth.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const aipriseAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
secret_text: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
environment: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
4
|
-
}>;
|
|
5
|
-
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;EA0BtB,CAAC"}
|
package/src/lib/common/auth.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.aipriseAuth = void 0;
|
|
4
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
-
exports.aipriseAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
6
|
-
displayName: 'API Key',
|
|
7
|
-
description: `To get your AiPrise API key:
|
|
8
|
-
1. Log in to your [AiPrise dashboard](https://app.aiprise.com)
|
|
9
|
-
2. Go to **Settings > API Keys**
|
|
10
|
-
3. Copy your API key and paste it here
|
|
11
|
-
`,
|
|
12
|
-
required: true,
|
|
13
|
-
props: {
|
|
14
|
-
secret_text: pieces_framework_1.PieceAuth.SecretText({
|
|
15
|
-
displayName: 'API Key',
|
|
16
|
-
description: 'Your AiPrise API key',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
environment: pieces_framework_1.Property.StaticDropdown({
|
|
20
|
-
displayName: 'Environment',
|
|
21
|
-
description: 'Select the AiPrise environment to use',
|
|
22
|
-
required: true,
|
|
23
|
-
options: {
|
|
24
|
-
options: [
|
|
25
|
-
{ label: 'Production', value: 'production' },
|
|
26
|
-
{ label: 'Sandbox', value: 'sandbox' },
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
}),
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AAExD,QAAA,WAAW,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC9C,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE;;;;CAId;IACC,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,WAAW,EAAE,4BAAS,CAAC,UAAU,CAAC;YAChC,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,sBAAsB;YACnC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACnC,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;oBAC5C,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;iBACvC;aACF;SACF,CAAC;KACH;CACF,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { HttpMethod } from '@activepieces/pieces-common';
|
|
2
|
-
declare function getBaseUrl(environment: string): string;
|
|
3
|
-
declare function makeRequest<T>({ auth, method, path, body, }: {
|
|
4
|
-
auth: AipriseAuthValue;
|
|
5
|
-
method: HttpMethod;
|
|
6
|
-
path: string;
|
|
7
|
-
body?: Record<string, unknown>;
|
|
8
|
-
}): Promise<T>;
|
|
9
|
-
export declare const aiprise: {
|
|
10
|
-
PRODUCTION_BASE_URL: string;
|
|
11
|
-
SANDBOX_BASE_URL: string;
|
|
12
|
-
getBaseUrl: typeof getBaseUrl;
|
|
13
|
-
makeRequest: typeof makeRequest;
|
|
14
|
-
};
|
|
15
|
-
export type AipriseAuthValue = {
|
|
16
|
-
secret_text: string;
|
|
17
|
-
environment: string;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAKrE,iBAAS,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,iBAAe,WAAW,CAAC,CAAC,EAAE,EAC5B,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,GACL,EAAE;IACD,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,GAAG,OAAO,CAAC,CAAC,CAAC,CAWb;AAED,eAAO,MAAM,OAAO;;;;;CAKnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
package/src/lib/common/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.aiprise = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const PRODUCTION_BASE_URL = 'https://api.aiprise.com/api/v1';
|
|
7
|
-
const SANDBOX_BASE_URL = 'https://api-sandbox.aiprise.com/api/v1';
|
|
8
|
-
function getBaseUrl(environment) {
|
|
9
|
-
return environment === 'sandbox' ? SANDBOX_BASE_URL : PRODUCTION_BASE_URL;
|
|
10
|
-
}
|
|
11
|
-
function makeRequest(_a) {
|
|
12
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, method, path, body, }) {
|
|
13
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
14
|
-
method,
|
|
15
|
-
url: `${getBaseUrl(auth.environment)}${path}`,
|
|
16
|
-
headers: {
|
|
17
|
-
'X-API-KEY': auth.secret_text,
|
|
18
|
-
'Content-Type': 'application/json',
|
|
19
|
-
},
|
|
20
|
-
body,
|
|
21
|
-
});
|
|
22
|
-
return response.body;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
exports.aiprise = {
|
|
26
|
-
PRODUCTION_BASE_URL,
|
|
27
|
-
SANDBOX_BASE_URL,
|
|
28
|
-
getBaseUrl,
|
|
29
|
-
makeRequest,
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAqE;AAErE,MAAM,mBAAmB,GAAG,gCAAgC,CAAC;AAC7D,MAAM,gBAAgB,GAAG,wCAAwC,CAAC;AAElE,SAAS,UAAU,CAAC,WAAmB;IACrC,OAAO,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,mBAAmB,CAAC;AAC5E,CAAC;AAED,SAAe,WAAW;iEAAI,EAC5B,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,IAAI,GAML;QACC,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAI;YAC/C,MAAM;YACN,GAAG,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,EAAE;YAC7C,OAAO,EAAE;gBACP,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI;SACL,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CAAA;AAEY,QAAA,OAAO,GAAG;IACrB,mBAAmB;IACnB,gBAAgB;IAChB,UAAU;IACV,WAAW;CACZ,CAAC"}
|