@activepieces/piece-coupa 0.0.2 → 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 +7 -18
- package/src/i18n/de.json +106 -0
- package/src/i18n/es.json +106 -0
- package/src/i18n/fr.json +106 -0
- package/src/i18n/ja.json +106 -0
- package/src/i18n/nl.json +106 -0
- package/src/i18n/pt.json +106 -0
- package/src/i18n/zh.json +106 -0
- package/src/index.js +13 -74
- package/src/index.d.ts +0 -7
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/add-file-attachment.d.ts +0 -23
- package/src/lib/actions/add-file-attachment.d.ts.map +0 -1
- package/src/lib/actions/add-file-attachment.js +0 -127
- package/src/lib/actions/add-file-attachment.js.map +0 -1
- package/src/lib/actions/cancel-purchase-order.d.ts +0 -14
- package/src/lib/actions/cancel-purchase-order.d.ts.map +0 -1
- package/src/lib/actions/cancel-purchase-order.js +0 -35
- package/src/lib/actions/cancel-purchase-order.js.map +0 -1
- package/src/lib/actions/close-purchase-order.d.ts +0 -14
- package/src/lib/actions/close-purchase-order.d.ts.map +0 -1
- package/src/lib/actions/close-purchase-order.js +0 -35
- package/src/lib/actions/close-purchase-order.js.map +0 -1
- package/src/lib/actions/create-object.d.ts +0 -12
- package/src/lib/actions/create-object.d.ts.map +0 -1
- package/src/lib/actions/create-object.js +0 -44
- package/src/lib/actions/create-object.js.map +0 -1
- package/src/lib/actions/get-object-by-id.d.ts +0 -17
- package/src/lib/actions/get-object-by-id.d.ts.map +0 -1
- package/src/lib/actions/get-object-by-id.js +0 -44
- package/src/lib/actions/get-object-by-id.js.map +0 -1
- package/src/lib/actions/get-remit-to-addresses.d.ts +0 -15
- package/src/lib/actions/get-remit-to-addresses.d.ts.map +0 -1
- package/src/lib/actions/get-remit-to-addresses.js +0 -80
- package/src/lib/actions/get-remit-to-addresses.js.map +0 -1
- package/src/lib/actions/get-supplier-sites.d.ts +0 -14
- package/src/lib/actions/get-supplier-sites.d.ts.map +0 -1
- package/src/lib/actions/get-supplier-sites.js +0 -40
- package/src/lib/actions/get-supplier-sites.js.map +0 -1
- package/src/lib/actions/grant-approval.d.ts +0 -14
- package/src/lib/actions/grant-approval.d.ts.map +0 -1
- package/src/lib/actions/grant-approval.js +0 -35
- package/src/lib/actions/grant-approval.js.map +0 -1
- package/src/lib/actions/reject-approval.d.ts +0 -15
- package/src/lib/actions/reject-approval.d.ts.map +0 -1
- package/src/lib/actions/reject-approval.js +0 -48
- package/src/lib/actions/reject-approval.js.map +0 -1
- package/src/lib/actions/search-objects.d.ts +0 -11
- package/src/lib/actions/search-objects.d.ts.map +0 -1
- package/src/lib/actions/search-objects.js +0 -46
- package/src/lib/actions/search-objects.js.map +0 -1
- package/src/lib/actions/set-integration-run-status.d.ts +0 -10
- package/src/lib/actions/set-integration-run-status.d.ts.map +0 -1
- package/src/lib/actions/set-integration-run-status.js +0 -49
- package/src/lib/actions/set-integration-run-status.js.map +0 -1
- package/src/lib/actions/update-object.d.ts +0 -18
- package/src/lib/actions/update-object.d.ts.map +0 -1
- package/src/lib/actions/update-object.js +0 -46
- package/src/lib/actions/update-object.js.map +0 -1
- package/src/lib/auth.d.ts +0 -7
- package/src/lib/auth.d.ts.map +0 -1
- package/src/lib/auth.js +0 -50
- package/src/lib/auth.js.map +0 -1
- package/src/lib/common/client.d.ts +0 -34
- package/src/lib/common/client.d.ts.map +0 -1
- package/src/lib/common/client.js +0 -146
- package/src/lib/common/client.js.map +0 -1
- package/src/lib/common/props.d.ts +0 -47
- package/src/lib/common/props.d.ts.map +0 -1
- package/src/lib/common/props.js +0 -366
- package/src/lib/common/props.js.map +0 -1
- package/src/lib/common/utils.d.ts +0 -22
- package/src/lib/common/utils.d.ts.map +0 -1
- package/src/lib/common/utils.js +0 -182
- package/src/lib/common/utils.js.map +0 -1
- package/src/lib/triggers/new-or-updated-object.d.ts +0 -39
- package/src/lib/triggers/new-or-updated-object.d.ts.map +0 -1
- package/src/lib/triggers/new-or-updated-object.js +0 -101
- package/src/lib/triggers/new-or-updated-object.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grant-approval.js","sourceRoot":"","sources":["../../../../src/lib/actions/grant-approval.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAA8D;AAC9D,kCAAoC;AACpC,6CAA+C;AAC/C,2CAA0D;AAC1D,2CAAgD;AAEnC,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EACT,0IAA0I;IAC5I,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,gTAAgT;QAClT,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,+BAAuB;KACpC;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAA0B;gBAC3D,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,WAAW,EAAE,cAAc,UAAU,CAAC,UAAU,UAAU;aAC3D,CAAC,CAAC;YACH,OAAO,IAAA,qBAAa,EAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const rejectApproval: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
6
|
-
}>, {
|
|
7
|
-
approvalId: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
8
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
10
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
11
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
12
|
-
}>>;
|
|
13
|
-
reason: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=reject-approval.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reject-approval.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/reject-approval.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc;;;;;;;;;;;;;EAoCzB,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rejectApproval = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
const utils_1 = require("../common/utils");
|
|
11
|
-
exports.rejectApproval = (0, pieces_framework_1.createAction)({
|
|
12
|
-
auth: auth_1.coupaAuth,
|
|
13
|
-
name: 'reject_approval',
|
|
14
|
-
displayName: 'Reject Approval',
|
|
15
|
-
description: 'Rejects a pending approval in Coupa (e.g. a requisition or purchase order awaiting your decision). Pick the approval from the dropdown.',
|
|
16
|
-
audience: 'both',
|
|
17
|
-
aiMetadata: {
|
|
18
|
-
description: 'Reject a pending Coupa approval (e.g. a requisition or purchase order awaiting decision) by its approval ID, optionally recording a rejection reason. Use Grant Approval to approve instead. Not idempotent: the approval must be in a pending state, and re-running after it is decided may fail.',
|
|
19
|
-
idempotent: false,
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
approvalId: props_1.pendingApprovalDropdown,
|
|
23
|
-
reason: pieces_framework_1.Property.LongText({
|
|
24
|
-
displayName: 'Rejection Reason',
|
|
25
|
-
description: 'Optional note explaining why the approval was rejected.',
|
|
26
|
-
required: false,
|
|
27
|
-
}),
|
|
28
|
-
},
|
|
29
|
-
run(_a) {
|
|
30
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
31
|
-
const client = new client_1.CoupaClient(auth.props);
|
|
32
|
-
// Coupa expects the rejection reason as a URL query parameter, not in the
|
|
33
|
-
// request body: PUT /api/approvals/{id}/reject?reason=... (the client
|
|
34
|
-
// URL-encodes it). See Coupa Core API "Approvals" docs.
|
|
35
|
-
const query = {};
|
|
36
|
-
if (propsValue.reason) {
|
|
37
|
-
query['reason'] = propsValue.reason;
|
|
38
|
-
}
|
|
39
|
-
const result = yield client.request({
|
|
40
|
-
method: pieces_common_1.HttpMethod.PUT,
|
|
41
|
-
resourceUri: `/approvals/${propsValue.approvalId}/reject`,
|
|
42
|
-
query,
|
|
43
|
-
});
|
|
44
|
-
return (0, utils_1.flattenRecord)(result);
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=reject-approval.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reject-approval.js","sourceRoot":"","sources":["../../../../src/lib/actions/reject-approval.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AACxE,kCAAoC;AACpC,6CAA+C;AAC/C,2CAA0D;AAC1D,2CAAgD;AAEnC,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EACT,yIAAyI;IAC3I,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,oSAAoS;QACtS,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,+BAAuB;QACnC,MAAM,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACxB,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3C,0EAA0E;YAC1E,sEAAsE;YACtE,wDAAwD;YACxD,MAAM,KAAK,GAAuC,EAAE,CAAC;YACrD,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;gBACtB,KAAK,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC;YACtC,CAAC;YACD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAA0B;gBAC3D,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,WAAW,EAAE,cAAc,UAAU,CAAC,UAAU,SAAS;gBACzD,KAAK;aACN,CAAC,CAAC;YACH,OAAO,IAAA,qBAAa,EAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const searchObjects: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
6
|
-
}>, {
|
|
7
|
-
module: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
-
customResource: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
queryParams: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=search-objects.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-objects.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-objects.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,aAAa;;;;;;;;;EAwCxB,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchObjects = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../auth");
|
|
7
|
-
const client_1 = require("../common/client");
|
|
8
|
-
const props_1 = require("../common/props");
|
|
9
|
-
const utils_1 = require("../common/utils");
|
|
10
|
-
exports.searchObjects = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.coupaAuth,
|
|
12
|
-
name: 'search_objects',
|
|
13
|
-
displayName: 'Search Objects (Batch)',
|
|
14
|
-
description: 'Searches records in a Coupa module with pagination (50 per page) and returns standardized fields.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Search and list records in a Coupa module — purchase orders, suppliers, contracts, or any other resource via the custom-module option — using optional Coupa query parameters as filters, auto-paginating through all matching pages. Use this to find records by criteria; use Get Object by ID when you already have an ID. Read-only and idempotent, but unfiltered searches on large modules can be slow.',
|
|
18
|
-
idempotent: true,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
module: props_1.moduleProperty,
|
|
22
|
-
customResource: props_1.customModuleResourceProperty,
|
|
23
|
-
queryParams: props_1.optionalQueryParamsProperty,
|
|
24
|
-
},
|
|
25
|
-
run(_a) {
|
|
26
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
27
|
-
const client = new client_1.CoupaClient(auth.props);
|
|
28
|
-
const resource = (0, props_1.resolveModuleResource)(propsValue.module, propsValue.customResource);
|
|
29
|
-
const query = (0, props_1.parseOptionalQuery)(propsValue.queryParams);
|
|
30
|
-
const records = yield client.fetchAllRecords(resource, query);
|
|
31
|
-
if (propsValue.module !== '__custom__') {
|
|
32
|
-
const coupaModule = (0, props_1.toCoupaModule)(propsValue.module);
|
|
33
|
-
const formatted = (0, utils_1.formatCoupaOutputs)(records, coupaModule);
|
|
34
|
-
return {
|
|
35
|
-
total_count: formatted.length,
|
|
36
|
-
records: formatted,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
total_count: records.length,
|
|
41
|
-
records,
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=search-objects.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-objects.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-objects.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,kCAAoC;AACpC,6CAA+C;AAC/C,2CAOyB;AACzB,2CAAqD;AAExC,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,wBAAwB;IACrC,WAAW,EACT,mGAAmG;IACrG,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,+YAA+Y;QACjZ,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,MAAM,EAAE,sBAAc;QACtB,cAAc,EAAE,oCAA4B;QAC5C,WAAW,EAAE,mCAA2B;KACzC;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3C,MAAM,QAAQ,GAAG,IAAA,6BAAqB,EACpC,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,cAAc,CAC1B,CAAC;YACF,MAAM,KAAK,GAAG,IAAA,0BAAkB,EAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YACzD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YAE9D,IAAI,UAAU,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;gBACvC,MAAM,WAAW,GAAG,IAAA,qBAAa,EAAC,UAAU,CAAC,MAAM,CAAC,CAAC;gBACrD,MAAM,SAAS,GAAG,IAAA,0BAAkB,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;gBAC3D,OAAO;oBACL,WAAW,EAAE,SAAS,CAAC,MAAM;oBAC7B,OAAO,EAAE,SAAS;iBACnB,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,WAAW,EAAE,OAAO,CAAC,MAAM;gBAC3B,OAAO;aACR,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const setIntegrationRunStatus: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
6
|
-
}>, {
|
|
7
|
-
integrationRunId: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
8
|
-
status: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
9
|
-
}>;
|
|
10
|
-
//# sourceMappingURL=set-integration-run-status.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-integration-run-status.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/set-integration-run-status.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,uBAAuB;;;;;;;;EAqClC,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setIntegrationRunStatus = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
const utils_1 = require("../common/utils");
|
|
11
|
-
exports.setIntegrationRunStatus = (0, pieces_framework_1.createAction)({
|
|
12
|
-
auth: auth_1.coupaAuth,
|
|
13
|
-
name: 'set_integration_run_status',
|
|
14
|
-
displayName: 'Set Integration Run Status',
|
|
15
|
-
description: 'Updates an integration run status (`run`, `success`, `fail`, `pause`, or `pending`).',
|
|
16
|
-
audience: 'both',
|
|
17
|
-
aiMetadata: {
|
|
18
|
-
description: 'Set the status of a Coupa integration run by ID to one of: run, success, fail, pause, or pending — used to report progress of an external integration job back to Coupa. Not idempotent: each call is a status transition, and Coupa may reject transitions that are invalid from the run\'s current state.',
|
|
19
|
-
idempotent: false,
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
integrationRunId: props_1.objectIdProperty,
|
|
23
|
-
status: pieces_framework_1.Property.StaticDropdown({
|
|
24
|
-
displayName: 'Status',
|
|
25
|
-
required: true,
|
|
26
|
-
options: {
|
|
27
|
-
disabled: false,
|
|
28
|
-
options: [
|
|
29
|
-
{ label: 'Running', value: 'run' },
|
|
30
|
-
{ label: 'Successful', value: 'success' },
|
|
31
|
-
{ label: 'Failed', value: 'fail' },
|
|
32
|
-
{ label: 'Paused', value: 'pause' },
|
|
33
|
-
{ label: 'Pending', value: 'pending' },
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
},
|
|
38
|
-
run(_a) {
|
|
39
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
40
|
-
const client = new client_1.CoupaClient(auth.props);
|
|
41
|
-
const result = yield client.request({
|
|
42
|
-
method: pieces_common_1.HttpMethod.PUT,
|
|
43
|
-
resourceUri: `/integration_runs/${propsValue.integrationRunId}/${propsValue.status}`,
|
|
44
|
-
});
|
|
45
|
-
return (0, utils_1.flattenRecord)(result);
|
|
46
|
-
});
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
//# sourceMappingURL=set-integration-run-status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-integration-run-status.js","sourceRoot":"","sources":["../../../../src/lib/actions/set-integration-run-status.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AACxE,kCAAoC;AACpC,6CAA+C;AAC/C,2CAAmD;AACnD,2CAAgD;AAEnC,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IAClD,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,4BAA4B;IACzC,WAAW,EACT,sFAAsF;IACxF,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,6SAA6S;QAC/S,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,gBAAgB,EAAE,wBAAgB;QAClC,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC9B,WAAW,EAAE,QAAQ;YACrB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE;oBAClC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE;oBACzC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;oBAClC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;oBACnC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;iBACvC;aACF;SACF,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAA0B;gBAC3D,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,WAAW,EAAE,qBAAqB,UAAU,CAAC,gBAAgB,IAAI,UAAU,CAAC,MAAM,EAAE;aACrF,CAAC,CAAC;YACH,OAAO,IAAA,qBAAa,EAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const updateObject: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
6
|
-
}>, {
|
|
7
|
-
module: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
-
customResource: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
record: import("@activepieces/pieces-framework").DynamicProperties<true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
10
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
12
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
13
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
14
|
-
}>>;
|
|
15
|
-
bodyHelp: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
16
|
-
body: import("@activepieces/pieces-framework").JsonProperty<true>;
|
|
17
|
-
}>;
|
|
18
|
-
//# sourceMappingURL=update-object.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-object.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-object.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;EAqCvB,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateObject = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const props_1 = require("../common/props");
|
|
10
|
-
const utils_1 = require("../common/utils");
|
|
11
|
-
exports.updateObject = (0, pieces_framework_1.createAction)({
|
|
12
|
-
auth: auth_1.coupaAuth,
|
|
13
|
-
name: 'update_object',
|
|
14
|
-
displayName: 'Update Object',
|
|
15
|
-
description: 'Updates a record by ID in the selected Coupa module (Purchase Orders, Suppliers, or Contracts).',
|
|
16
|
-
audience: 'both',
|
|
17
|
-
aiMetadata: {
|
|
18
|
-
description: 'Update an existing Coupa record by ID — in purchase orders, suppliers, contracts, or any other resource via the custom-module option — by PUTting a raw JSON body of the fields to change. Requires a known record ID; use Create Object for new records. Effectively idempotent: re-sending the same body to the same ID yields the same record state.',
|
|
19
|
-
idempotent: true,
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
module: props_1.moduleProperty,
|
|
23
|
-
customResource: props_1.customModuleResourceProperty,
|
|
24
|
-
record: props_1.objectSelector,
|
|
25
|
-
bodyHelp: props_1.requestBodyHelp,
|
|
26
|
-
body: props_1.requestBodyProperty,
|
|
27
|
-
},
|
|
28
|
-
run(_a) {
|
|
29
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
30
|
-
const client = new client_1.CoupaClient(auth.props);
|
|
31
|
-
const resource = (0, props_1.resolveModuleResource)(propsValue.module, propsValue.customResource);
|
|
32
|
-
const objectId = propsValue.record['objectId'];
|
|
33
|
-
const body = (0, utils_1.parseJsonBody)(propsValue.body);
|
|
34
|
-
const result = yield client.request({
|
|
35
|
-
method: pieces_common_1.HttpMethod.PUT,
|
|
36
|
-
resourceUri: `/${resource}/${objectId}`,
|
|
37
|
-
body,
|
|
38
|
-
});
|
|
39
|
-
if (propsValue.module !== '__custom__') {
|
|
40
|
-
return (0, utils_1.formatCoupaOutput)(result, (0, props_1.toCoupaModule)(propsValue.module));
|
|
41
|
-
}
|
|
42
|
-
return result;
|
|
43
|
-
});
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=update-object.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-object.js","sourceRoot":"","sources":["../../../../src/lib/actions/update-object.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAA8D;AAC9D,kCAAoC;AACpC,6CAA+C;AAC/C,2CAQyB;AACzB,2CAAmE;AAEtD,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EACT,iGAAiG;IACnG,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,yVAAyV;QAC3V,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,MAAM,EAAE,sBAAc;QACtB,cAAc,EAAE,oCAA4B;QAC5C,MAAM,EAAE,sBAAc;QACtB,QAAQ,EAAE,uBAAe;QACzB,IAAI,EAAE,2BAAmB;KAC1B;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3C,MAAM,QAAQ,GAAG,IAAA,6BAAqB,EACpC,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,cAAc,CAC1B,CAAC;YACF,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC/C,MAAM,IAAI,GAAG,IAAA,qBAAa,EAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC5C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAA0B;gBAC3D,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,WAAW,EAAE,IAAI,QAAQ,IAAI,QAAQ,EAAE;gBACvC,IAAI;aACL,CAAC,CAAC;YACH,IAAI,UAAU,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;gBACvC,OAAO,IAAA,yBAAiB,EAAC,MAAM,EAAE,IAAA,qBAAa,EAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YACrE,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
package/src/lib/auth.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const coupaAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
6
|
-
}>;
|
|
7
|
-
//# sourceMappingURL=auth.d.ts.map
|
package/src/lib/auth.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;EA6CpB,CAAC"}
|
package/src/lib/auth.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.coupaAuth = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const client_1 = require("./common/client");
|
|
7
|
-
exports.coupaAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
8
|
-
description: 'Connect using an OAuth 2.0 OpenID Connect client with the **Client Credentials** grant. In Coupa, go to **Setup → Integrations → OAuth2/OpenID Connect Clients**, create a client, and copy the Client ID and Client Secret. Scopes use the form `core.accounting.read` — list yours at `https://{your-instance}/oauth2/scopes`.',
|
|
9
|
-
required: true,
|
|
10
|
-
props: {
|
|
11
|
-
instanceUrl: pieces_framework_1.Property.ShortText({
|
|
12
|
-
displayName: 'Coupa Instance URL',
|
|
13
|
-
description: 'Your Coupa hostname only, e.g. `company.coupahost.com` (without `https://`).',
|
|
14
|
-
required: true,
|
|
15
|
-
}),
|
|
16
|
-
clientId: pieces_framework_1.PieceAuth.SecretText({
|
|
17
|
-
displayName: 'Client ID',
|
|
18
|
-
required: true,
|
|
19
|
-
}),
|
|
20
|
-
clientSecret: pieces_framework_1.PieceAuth.SecretText({
|
|
21
|
-
displayName: 'Client Secret',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
scope: pieces_framework_1.Property.LongText({
|
|
25
|
-
displayName: 'OAuth Scopes',
|
|
26
|
-
description: 'Space-separated scopes granted to your OIDC client, e.g. `core.purchase_order.read core.purchase_order.write`.',
|
|
27
|
-
required: true,
|
|
28
|
-
defaultValue: 'core.common.read core.common.write',
|
|
29
|
-
}),
|
|
30
|
-
},
|
|
31
|
-
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
32
|
-
try {
|
|
33
|
-
const client = new client_1.CoupaClient({
|
|
34
|
-
instanceUrl: auth.instanceUrl,
|
|
35
|
-
clientId: auth.clientId,
|
|
36
|
-
clientSecret: auth.clientSecret,
|
|
37
|
-
scope: auth.scope,
|
|
38
|
-
});
|
|
39
|
-
yield client.getAccessToken();
|
|
40
|
-
return { valid: true };
|
|
41
|
-
}
|
|
42
|
-
catch (_b) {
|
|
43
|
-
return {
|
|
44
|
-
valid: false,
|
|
45
|
-
error: 'Could not authenticate with Coupa. Check the instance URL, Client ID/Secret, and that the OIDC client uses the Client Credentials grant.',
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
}),
|
|
49
|
-
});
|
|
50
|
-
//# sourceMappingURL=auth.js.map
|
package/src/lib/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAAqE;AACrE,4CAA8C;AAEjC,QAAA,SAAS,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC5C,WAAW,EACT,kUAAkU;IACpU,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,oBAAoB;YACjC,WAAW,EACT,8EAA8E;YAChF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,4BAAS,CAAC,UAAU,CAAC;YAC7B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,4BAAS,CAAC,UAAU,CAAC;YACjC,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,WAAW,EACT,gHAAgH;YAClH,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,oCAAoC;SACnD,CAAC;KACH;IACD,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC;gBAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;YACH,MAAM,MAAM,CAAC,cAAc,EAAE,CAAC;YAC9B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACzB,CAAC;QAAC,WAAM,CAAC;YACP,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EACH,0IAA0I;aAC7I,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { HttpMethod, HttpMessageBody } from '@activepieces/pieces-common';
|
|
2
|
-
import FormData from 'form-data';
|
|
3
|
-
export type CoupaAuthProps = {
|
|
4
|
-
instanceUrl: string;
|
|
5
|
-
clientId: string;
|
|
6
|
-
clientSecret: string;
|
|
7
|
-
scope: string;
|
|
8
|
-
};
|
|
9
|
-
export declare class CoupaClient {
|
|
10
|
-
private readonly auth;
|
|
11
|
-
private readonly baseUrl;
|
|
12
|
-
private readonly tokenUrl;
|
|
13
|
-
private accessToken;
|
|
14
|
-
private tokenExpiresAt;
|
|
15
|
-
private tokenPromise;
|
|
16
|
-
constructor(auth: CoupaAuthProps);
|
|
17
|
-
getAccessToken(): Promise<string>;
|
|
18
|
-
private fetchAccessToken;
|
|
19
|
-
request<T extends HttpMessageBody>({ method, resourceUri, query, body, headers, }: {
|
|
20
|
-
method: HttpMethod;
|
|
21
|
-
resourceUri: string;
|
|
22
|
-
query?: Record<string, string | number | boolean | undefined>;
|
|
23
|
-
body?: unknown;
|
|
24
|
-
headers?: Record<string, string>;
|
|
25
|
-
}): Promise<T>;
|
|
26
|
-
requestMultipart<T extends HttpMessageBody>({ resourceUri, formData, }: {
|
|
27
|
-
resourceUri: string;
|
|
28
|
-
formData: FormData;
|
|
29
|
-
}): Promise<T>;
|
|
30
|
-
paginateRecords(resource: string, query?: Record<string, string | number | boolean | undefined>): AsyncGenerator<Record<string, unknown>[]>;
|
|
31
|
-
fetchAllRecords(resource: string, query?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>[]>;
|
|
32
|
-
}
|
|
33
|
-
export declare const COUPA_PAGE_SIZE = 50;
|
|
34
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,eAAe,EAGhB,MAAM,6BAA6B,CAAC;AACrC,OAAO,QAAQ,MAAM,WAAW,CAAC;AAGjC,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAKF,qBAAa,WAAW;IAOV,OAAO,CAAC,QAAQ,CAAC,IAAI;IANjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IA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 -1,146 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.COUPA_PAGE_SIZE = exports.CoupaClient = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
|
-
const COUPA_PAGE_LIMIT = 50;
|
|
8
|
-
const TOKEN_REFRESH_BUFFER_MS = 5 * 60 * 1000;
|
|
9
|
-
class CoupaClient {
|
|
10
|
-
constructor(auth) {
|
|
11
|
-
this.auth = auth;
|
|
12
|
-
this.accessToken = null;
|
|
13
|
-
this.tokenExpiresAt = 0;
|
|
14
|
-
this.tokenPromise = null;
|
|
15
|
-
const host = (0, utils_1.normalizeInstanceUrl)(this.auth.instanceUrl);
|
|
16
|
-
this.baseUrl = `https://${host}/api`;
|
|
17
|
-
this.tokenUrl = `https://${host}/oauth2/token`;
|
|
18
|
-
}
|
|
19
|
-
getAccessToken() {
|
|
20
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
if (this.accessToken && Date.now() < this.tokenExpiresAt) {
|
|
22
|
-
return this.accessToken;
|
|
23
|
-
}
|
|
24
|
-
// Reuse a single in-flight token request so concurrent calls within the
|
|
25
|
-
// same run don't each hit the token endpoint (avoids a TOCTOU race).
|
|
26
|
-
if (!this.tokenPromise) {
|
|
27
|
-
this.tokenPromise = this.fetchAccessToken().finally(() => {
|
|
28
|
-
this.tokenPromise = null;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
return this.tokenPromise;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
fetchAccessToken() {
|
|
35
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
37
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
38
|
-
url: this.tokenUrl,
|
|
39
|
-
headers: {
|
|
40
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
41
|
-
},
|
|
42
|
-
body: new URLSearchParams({
|
|
43
|
-
client_id: this.auth.clientId,
|
|
44
|
-
client_secret: this.auth.clientSecret,
|
|
45
|
-
grant_type: 'client_credentials',
|
|
46
|
-
scope: this.auth.scope,
|
|
47
|
-
}),
|
|
48
|
-
});
|
|
49
|
-
this.accessToken = response.body.access_token;
|
|
50
|
-
this.tokenExpiresAt =
|
|
51
|
-
Date.now() + response.body.expires_in * 1000 - TOKEN_REFRESH_BUFFER_MS;
|
|
52
|
-
return this.accessToken;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
request(_a) {
|
|
56
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ method, resourceUri, query, body, headers, }) {
|
|
57
|
-
const token = yield this.getAccessToken();
|
|
58
|
-
const queryParams = {};
|
|
59
|
-
if (query) {
|
|
60
|
-
for (const [key, value] of Object.entries(query)) {
|
|
61
|
-
if (value !== undefined && value !== null) {
|
|
62
|
-
queryParams[key] = String(value);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const path = resourceUri.startsWith('/') ? resourceUri : `/${resourceUri}`;
|
|
67
|
-
const request = {
|
|
68
|
-
method,
|
|
69
|
-
url: `${this.baseUrl}${path}`,
|
|
70
|
-
headers: Object.assign({ Authorization: `Bearer ${token}`, Accept: 'application/json', 'Content-Type': 'application/json' }, headers),
|
|
71
|
-
queryParams,
|
|
72
|
-
body,
|
|
73
|
-
};
|
|
74
|
-
try {
|
|
75
|
-
const response = yield pieces_common_1.httpClient.sendRequest(request);
|
|
76
|
-
return response.body;
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
throw new Error((0, utils_1.formatCoupaError)(error));
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
requestMultipart(_a) {
|
|
84
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ resourceUri, formData, }) {
|
|
85
|
-
const token = yield this.getAccessToken();
|
|
86
|
-
const path = resourceUri.startsWith('/') ? resourceUri : `/${resourceUri}`;
|
|
87
|
-
try {
|
|
88
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
89
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
90
|
-
url: `${this.baseUrl}${path}`,
|
|
91
|
-
headers: Object.assign({ Authorization: `Bearer ${token}`, Accept: 'application/json' }, formData.getHeaders()),
|
|
92
|
-
body: formData,
|
|
93
|
-
});
|
|
94
|
-
return response.body;
|
|
95
|
-
}
|
|
96
|
-
catch (error) {
|
|
97
|
-
throw new Error((0, utils_1.formatCoupaError)(error));
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
paginateRecords(resource_1) {
|
|
102
|
-
return tslib_1.__asyncGenerator(this, arguments, function* paginateRecords_1(resource, query = {}) {
|
|
103
|
-
let offset = 0;
|
|
104
|
-
while (true) {
|
|
105
|
-
const page = yield tslib_1.__await(this.request({
|
|
106
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
107
|
-
resourceUri: `/${resource}`,
|
|
108
|
-
query: Object.assign(Object.assign({}, query), { limit: COUPA_PAGE_LIMIT, offset }),
|
|
109
|
-
}));
|
|
110
|
-
if (!Array.isArray(page) || page.length === 0) {
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
yield yield tslib_1.__await(page);
|
|
114
|
-
if (page.length < COUPA_PAGE_LIMIT) {
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
offset += COUPA_PAGE_LIMIT;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
fetchAllRecords(resource_1) {
|
|
122
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* (resource, query = {}) {
|
|
123
|
-
var _a, e_1, _b, _c;
|
|
124
|
-
const records = [];
|
|
125
|
-
try {
|
|
126
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.paginateRecords(resource, query)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
127
|
-
_c = _f.value;
|
|
128
|
-
_d = false;
|
|
129
|
-
const page = _c;
|
|
130
|
-
records.push(...page);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
134
|
-
finally {
|
|
135
|
-
try {
|
|
136
|
-
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
137
|
-
}
|
|
138
|
-
finally { if (e_1) throw e_1.error; }
|
|
139
|
-
}
|
|
140
|
-
return records;
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
exports.CoupaClient = CoupaClient;
|
|
145
|
-
exports.COUPA_PAGE_SIZE = COUPA_PAGE_LIMIT;
|
|
146
|
-
//# sourceMappingURL=client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":";;;;AAAA,+DAMqC;AAErC,mCAAiE;AASjE,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,uBAAuB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAE9C,MAAa,WAAW;IAOtB,YAA6B,IAAoB;QAApB,SAAI,GAAJ,IAAI,CAAgB;QAJzC,gBAAW,GAAkB,IAAI,CAAC;QAClC,mBAAc,GAAG,CAAC,CAAC;QACnB,iBAAY,GAA2B,IAAI,CAAC;QAGlD,MAAM,IAAI,GAAG,IAAA,4BAAoB,EAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzD,IAAI,CAAC,OAAO,GAAG,WAAW,IAAI,MAAM,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,WAAW,IAAI,eAAe,CAAC;IACjD,CAAC;IAEK,cAAc;;YAClB,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,GAAG,EAAE,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AAO,GAA8B,EAAE,CAAC;;gBAC9C,KAAyB,eAAA,KAAA,sBAAA,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA,IAAA,sDAAE,CAAC;oBAAxC,cAAqC;oBAArC,WAAqC;oBAAnD,MAAM,IAAI,KAAA,CAAA;oBACnB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;gBACxB,CAAC;;;;;;;;;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;KAAA;CACF;AArKD,kCAqKC;AAEY,QAAA,eAAe,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { CoupaModule } from './utils';
|
|
2
|
-
export declare const COUPA_MODULE_OPTIONS: {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
}[];
|
|
6
|
-
export declare const moduleProperty: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
-
export declare const customModuleResourceProperty: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
export declare const objectIdProperty: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
9
|
-
export declare const requestBodyProperty: import("@activepieces/pieces-framework").JsonProperty<true>;
|
|
10
|
-
export declare const requestBodyHelp: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
11
|
-
export declare const optionalQueryParamsProperty: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
12
|
-
export declare const purchaseOrderDropdown: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
13
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
14
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
15
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
16
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
17
|
-
}>>;
|
|
18
|
-
export declare const contractDropdown: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
19
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
20
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
21
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
22
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
23
|
-
}>>;
|
|
24
|
-
export declare const supplierDropdown: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
25
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
26
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
27
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
28
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
29
|
-
}>>;
|
|
30
|
-
export declare const pendingApprovalDropdown: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
31
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
32
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
33
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
34
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
35
|
-
}>>;
|
|
36
|
-
export declare const objectSelector: import("@activepieces/pieces-framework").DynamicProperties<true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
37
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
38
|
-
clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
39
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
40
|
-
scope: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
41
|
-
}>>;
|
|
42
|
-
export declare const attachmentModuleProperty: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
43
|
-
export declare const remitToParentTypeProperty: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
44
|
-
export declare function resolveModuleResource(module: string | undefined, customResource: string | undefined): string;
|
|
45
|
-
export declare function toCoupaModule(module: string): CoupaModule;
|
|
46
|
-
export declare function parseOptionalQuery(queryJson: unknown): Record<string, string | number | boolean | undefined>;
|
|
47
|
-
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/props.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAY,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,oBAAoB;;;GAKhC,CAAC;AAEF,eAAO,MAAM,cAAc,+EASzB,CAAC;AAEH,eAAO,MAAM,4BAA4B,mEAKvC,CAAC;AAEH,eAAO,MAAM,gBAAgB,+DAI3B,CAAC;AAEH,eAAO,MAAM,mBAAmB,6DAK9B,CAAC;AAEH,eAAO,MAAM,eAAe,yGAiB1B,CAAC;AAEH,eAAO,MAAM,2BAA2B,8DAKtC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;GAmDhC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;GA+C3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;GA4C3B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;GAqDlC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;GAkBzB,CAAC;AAEH,eAAO,MAAM,wBAAwB,+EAYnC,CAAC;AAEH,eAAO,MAAM,yBAAyB,+EAYpC,CAAC;AAEH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,MAAM,CAWR;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAOzD;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,OAAO,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CA0BvD"}
|