@activepieces/piece-aiprise 0.0.3 → 0.0.4
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 +1 -1
- package/src/index.d.ts.map +1 -1
- package/src/index.js +6 -0
- package/src/index.js.map +1 -1
- package/src/lib/actions/get-business-profile.d.ts +4 -0
- package/src/lib/actions/get-business-profile.d.ts.map +1 -0
- package/src/lib/actions/get-business-profile.js +32 -0
- package/src/lib/actions/get-business-profile.js.map +1 -0
- package/src/lib/actions/get-user-profile.d.ts +4 -0
- package/src/lib/actions/get-user-profile.d.ts.map +1 -0
- package/src/lib/actions/get-user-profile.js +32 -0
- package/src/lib/actions/get-user-profile.js.map +1 -0
- package/src/lib/actions/search-businesses.d.ts +6 -0
- package/src/lib/actions/search-businesses.d.ts.map +1 -0
- package/src/lib/actions/search-businesses.js +49 -0
- package/src/lib/actions/search-businesses.js.map +1 -0
package/package.json
CHANGED
package/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,WAAW,mEAQtB,CAAC;AAEH,eAAO,MAAM,OAAO,mHAmClB,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -18,6 +18,9 @@ const create_business_profile_1 = require("./lib/actions/create-business-profile
|
|
|
18
18
|
const create_user_profile_1 = require("./lib/actions/create-user-profile");
|
|
19
19
|
const get_additional_user_info_1 = require("./lib/actions/get-additional-user-info");
|
|
20
20
|
const get_business_documents_1 = require("./lib/actions/get-business-documents");
|
|
21
|
+
const get_user_profile_1 = require("./lib/actions/get-user-profile");
|
|
22
|
+
const get_business_profile_1 = require("./lib/actions/get-business-profile");
|
|
23
|
+
const search_businesses_1 = require("./lib/actions/search-businesses");
|
|
21
24
|
exports.aipriseAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
22
25
|
displayName: 'API Key',
|
|
23
26
|
description: `To get your AiPrise API key:
|
|
@@ -47,6 +50,9 @@ exports.aiprise = (0, pieces_framework_1.createPiece)({
|
|
|
47
50
|
run_document_check_1.runDocumentCheckAction,
|
|
48
51
|
create_business_profile_1.createBusinessProfileAction,
|
|
49
52
|
create_user_profile_1.createUserProfileAction,
|
|
53
|
+
get_user_profile_1.getUserProfileAction,
|
|
54
|
+
get_business_profile_1.getBusinessProfileAction,
|
|
55
|
+
search_businesses_1.searchBusinessesAction,
|
|
50
56
|
get_additional_user_info_1.getAdditionalUserInfoAction,
|
|
51
57
|
get_business_documents_1.getBusinessDocumentsAction,
|
|
52
58
|
(0, pieces_common_1.createCustomApiCallAction)({
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAwE;AACxE,iDAAqD;AAErD,+FAA+F;AAC/F,6EAA8E;AAC9E,mFAAoF;AACpF,2EAA2E;AAC3E,yFAA0F;AAC1F,uFAAwF;AACxF,2EAA4E;AAC5E,mFAAmF;AACnF,yEAA0E;AAC1E,mFAAoF;AACpF,2EAA4E;AAC5E,qFAAqF;AACrF,iFAAkF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAwE;AACxE,iDAAqD;AAErD,+FAA+F;AAC/F,6EAA8E;AAC9E,mFAAoF;AACpF,2EAA2E;AAC3E,yFAA0F;AAC1F,uFAAwF;AACxF,2EAA4E;AAC5E,mFAAmF;AACnF,yEAA0E;AAC1E,mFAAoF;AACpF,2EAA4E;AAC5E,qFAAqF;AACrF,iFAAkF;AAClF,qEAAsE;AACtE,6EAA8E;AAC9E,uEAAyE;AAE5D,QAAA,WAAW,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC9C,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE;;;;CAId;IACC,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAEU,QAAA,OAAO,GAAG,IAAA,8BAAW,EAAC;IACjC,WAAW,EAAE,SAAS;IACtB,WAAW,EACT,2IAA2I;IAC7I,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,iDAAiD;IAC1D,UAAU,EAAE,CAAC,sBAAa,CAAC,qBAAqB,CAAC;IACjD,IAAI,EAAE,mBAAW;IACjB,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,OAAO,EAAE;QACP,gEAAgC;QAChC,+CAAwB;QACxB,qDAA2B;QAC3B,4CAAsB;QACtB,2DAA8B;QAC9B,yDAA6B;QAC7B,6CAAuB;QACvB,oDAA0B;QAC1B,2CAAsB;QACtB,qDAA2B;QAC3B,6CAAuB;QACvB,uCAAoB;QACpB,+CAAwB;QACxB,0CAAsB;QACtB,sDAA2B;QAC3B,mDAA0B;QAC1B,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,gCAAgC;YAC/C,IAAI,EAAE,mBAAW;YACjB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,WAAW,EAAE,IAAI,CAAC,WAAW;iBAC9B,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getBusinessProfileAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
business_profile_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
4
|
+
//# sourceMappingURL=get-business-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-business-profile.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-business-profile.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB;;EAsBnC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBusinessProfileAction = 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 __1 = require("../../");
|
|
9
|
+
exports.getBusinessProfileAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: __1.aipriseAuth,
|
|
11
|
+
name: 'get_business_profile',
|
|
12
|
+
displayName: 'Get Business Profile',
|
|
13
|
+
description: 'Fetches a business profile from AiPrise by its ID — including the stored company details, addresses, tags, linked verification sessions, and metadata.',
|
|
14
|
+
props: {
|
|
15
|
+
business_profile_id: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Business Profile ID',
|
|
17
|
+
description: 'The ID of the business profile to retrieve. You can get this from the output of the **Create Business Profile** action, or from the `business_profile_id` field in any webhook payload from AiPrise.',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const { business_profile_id } = context.propsValue;
|
|
24
|
+
return common_1.aiprise.makeRequest({
|
|
25
|
+
apiKey: context.auth.secret_text,
|
|
26
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
27
|
+
path: `/verify/get_business_profile/${encodeURIComponent(business_profile_id)}`,
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=get-business-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-business-profile.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-business-profile.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,sCAAoC;AACpC,8BAAqC;AAExB,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EACT,wJAAwJ;IAC1J,KAAK,EAAE;QACL,mBAAmB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtC,WAAW,EAAE,qBAAqB;YAClC,WAAW,EACT,sMAAsM;YACxM,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACnD,OAAO,gBAAO,CAAC,WAAW,CAA0B;gBAClD,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAChC,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,gCAAgC,kBAAkB,CAAC,mBAAmB,CAAC,EAAE;aAChF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getUserProfileAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
user_profile_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
}>;
|
|
4
|
+
//# sourceMappingURL=get-user-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-user-profile.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-user-profile.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;EAsB/B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUserProfileAction = 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 __1 = require("../../");
|
|
9
|
+
exports.getUserProfileAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: __1.aipriseAuth,
|
|
11
|
+
name: 'get_user_profile',
|
|
12
|
+
displayName: 'Get User Profile',
|
|
13
|
+
description: "Fetches a user profile from AiPrise by its ID — including the person's stored details, tags, linked verification sessions, and metadata.",
|
|
14
|
+
props: {
|
|
15
|
+
user_profile_id: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'User Profile ID',
|
|
17
|
+
description: 'The ID of the user profile to retrieve. You can get this from the output of the **Create User Profile** action, or from the `user_profile_id` field in any webhook payload from AiPrise.',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const { user_profile_id } = context.propsValue;
|
|
24
|
+
return common_1.aiprise.makeRequest({
|
|
25
|
+
apiKey: context.auth.secret_text,
|
|
26
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
27
|
+
path: `/verify/get_user_profile/${encodeURIComponent(user_profile_id)}`,
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=get-user-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-user-profile.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-user-profile.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,sCAAoC;AACpC,8BAAqC;AAExB,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EACT,0IAA0I;IAC5I,KAAK,EAAE;QACL,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EACT,0LAA0L;YAC5L,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC/C,OAAO,gBAAO,CAAC,WAAW,CAA0B;gBAClD,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAChC,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,4BAA4B,kBAAkB,CAAC,eAAe,CAAC,EAAE;aACxE,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const searchBusinessesAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
country_code: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
state_code: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=search-businesses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-businesses.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-businesses.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB;;;;EAwCjC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.searchBusinessesAction = 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 __1 = require("../../");
|
|
9
|
+
exports.searchBusinessesAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: __1.aipriseAuth,
|
|
11
|
+
name: 'search_businesses',
|
|
12
|
+
displayName: 'Search Businesses',
|
|
13
|
+
description: 'Searches public business registries by name and country, returning a list of matching companies with their entity IDs, types, and addresses. Useful for looking up a business before creating a profile or running a verification.',
|
|
14
|
+
props: {
|
|
15
|
+
name: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Business Name',
|
|
17
|
+
description: 'The business name to search for. Partial matches are supported by AiPrise.',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
country_code: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'Country Code',
|
|
22
|
+
description: '2-letter ISO country code where the business is registered (e.g. US, GB).',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
state_code: pieces_framework_1.Property.ShortText({
|
|
26
|
+
displayName: 'State/Province Code',
|
|
27
|
+
description: 'Optional state or province code to narrow the search (e.g. CA, NY for the US). Leave empty to search the whole country.',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
run(context) {
|
|
32
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const { name, country_code, state_code } = context.propsValue;
|
|
34
|
+
const body = {
|
|
35
|
+
name,
|
|
36
|
+
country_code,
|
|
37
|
+
};
|
|
38
|
+
if (state_code)
|
|
39
|
+
body['state_code'] = state_code;
|
|
40
|
+
return common_1.aiprise.makeRequest({
|
|
41
|
+
apiKey: context.auth.secret_text,
|
|
42
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
43
|
+
path: '/data/business/search',
|
|
44
|
+
body,
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=search-businesses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-businesses.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-businesses.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,sCAAoC;AACpC,8BAAqC;AAExB,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EACT,oOAAoO;IACtO,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,4EAA4E;YACzF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,2EAA2E;YACxF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,qBAAqB;YAClC,WAAW,EACT,yHAAyH;YAC3H,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE9D,MAAM,IAAI,GAA4B;gBACpC,IAAI;gBACJ,YAAY;aACb,CAAC;YACF,IAAI,UAAU;gBAAE,IAAI,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC;YAEhD,OAAO,gBAAO,CAAC,WAAW,CAA0B;gBAClD,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAChC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,uBAAuB;gBAC7B,IAAI;aACL,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|