@naturalpay/sdk 0.2.0 → 0.2.1
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/CHANGELOG.md +119 -0
- package/LICENSE +7 -0
- package/README.md +340 -26
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +255 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +255 -0
- package/client.d.ts.map +1 -0
- package/client.js +548 -0
- package/client.js.map +1 -0
- package/client.mjs +544 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/lib/envelope.d.mts +4 -0
- package/lib/envelope.d.mts.map +1 -0
- package/lib/envelope.d.ts +4 -0
- package/lib/envelope.d.ts.map +1 -0
- package/lib/envelope.js +43 -0
- package/lib/envelope.js.map +1 -0
- package/lib/envelope.mjs +39 -0
- package/lib/envelope.mjs.map +1 -0
- package/package.json +142 -76
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/agents.d.mts +1392 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +1392 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/agents.js +192 -0
- package/resources/agents.js.map +1 -0
- package/resources/agents.mjs +188 -0
- package/resources/agents.mjs.map +1 -0
- package/resources/api-keys.d.mts +539 -0
- package/resources/api-keys.d.mts.map +1 -0
- package/resources/api-keys.d.ts +539 -0
- package/resources/api-keys.d.ts.map +1 -0
- package/resources/api-keys.js +100 -0
- package/resources/api-keys.js.map +1 -0
- package/resources/api-keys.mjs +96 -0
- package/resources/api-keys.mjs.map +1 -0
- package/resources/counterparties.d.mts +139 -0
- package/resources/counterparties.d.mts.map +1 -0
- package/resources/counterparties.d.ts +139 -0
- package/resources/counterparties.d.ts.map +1 -0
- package/resources/counterparties.js +32 -0
- package/resources/counterparties.js.map +1 -0
- package/resources/counterparties.mjs +28 -0
- package/resources/counterparties.mjs.map +1 -0
- package/resources/customers.d.mts +272 -0
- package/resources/customers.d.mts.map +1 -0
- package/resources/customers.d.ts +272 -0
- package/resources/customers.d.ts.map +1 -0
- package/resources/customers.js +48 -0
- package/resources/customers.js.map +1 -0
- package/resources/customers.mjs +44 -0
- package/resources/customers.mjs.map +1 -0
- package/resources/delegations.d.mts +458 -0
- package/resources/delegations.d.mts.map +1 -0
- package/resources/delegations.d.ts +458 -0
- package/resources/delegations.d.ts.map +1 -0
- package/resources/delegations.js +47 -0
- package/resources/delegations.js.map +1 -0
- package/resources/delegations.mjs +43 -0
- package/resources/delegations.mjs.map +1 -0
- package/resources/index.d.mts +12 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +12 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +27 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +13 -0
- package/resources/index.mjs.map +1 -0
- package/resources/invitations.d.mts +304 -0
- package/resources/invitations.d.mts.map +1 -0
- package/resources/invitations.d.ts +304 -0
- package/resources/invitations.d.ts.map +1 -0
- package/resources/invitations.js +85 -0
- package/resources/invitations.js.map +1 -0
- package/resources/invitations.mjs +81 -0
- package/resources/invitations.mjs.map +1 -0
- package/resources/parties.d.mts +364 -0
- package/resources/parties.d.mts.map +1 -0
- package/resources/parties.d.ts +364 -0
- package/resources/parties.d.ts.map +1 -0
- package/resources/parties.js +78 -0
- package/resources/parties.js.map +1 -0
- package/resources/parties.mjs +74 -0
- package/resources/parties.mjs.map +1 -0
- package/resources/payment-requests.d.mts +442 -0
- package/resources/payment-requests.d.mts.map +1 -0
- package/resources/payment-requests.d.ts +442 -0
- package/resources/payment-requests.d.ts.map +1 -0
- package/resources/payment-requests.js +87 -0
- package/resources/payment-requests.js.map +1 -0
- package/resources/payment-requests.mjs +83 -0
- package/resources/payment-requests.mjs.map +1 -0
- package/resources/payments.d.mts +174 -0
- package/resources/payments.d.mts.map +1 -0
- package/resources/payments.d.ts +174 -0
- package/resources/payments.d.ts.map +1 -0
- package/resources/payments.js +40 -0
- package/resources/payments.js.map +1 -0
- package/resources/payments.mjs +36 -0
- package/resources/payments.mjs.map +1 -0
- package/resources/transactions.d.mts +478 -0
- package/resources/transactions.d.mts.map +1 -0
- package/resources/transactions.d.ts +478 -0
- package/resources/transactions.d.ts.map +1 -0
- package/resources/transactions.js +48 -0
- package/resources/transactions.js.map +1 -0
- package/resources/transactions.mjs +44 -0
- package/resources/transactions.mjs.map +1 -0
- package/resources/wallet.d.mts +628 -0
- package/resources/wallet.d.mts.map +1 -0
- package/resources/wallet.d.ts +628 -0
- package/resources/wallet.d.ts.map +1 -0
- package/resources/wallet.js +161 -0
- package/resources/wallet.js.map +1 -0
- package/resources/wallet.mjs +157 -0
- package/resources/wallet.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1020 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +93 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +128 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/lib/envelope.ts +32 -0
- package/src/resource.ts +2 -0
- package/src/resources/agents.ts +1785 -0
- package/src/resources/api-keys.ts +743 -0
- package/src/resources/counterparties.ts +187 -0
- package/src/resources/customers.ts +365 -0
- package/src/resources/delegations.ts +580 -0
- package/src/resources/index.ts +95 -0
- package/src/resources/invitations.ts +414 -0
- package/src/resources/parties.ts +493 -0
- package/src/resources/payment-requests.ts +601 -0
- package/src/resources/payments.ts +228 -0
- package/src/resources/transactions.ts +610 -0
- package/src/resources/wallet.ts +864 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
- package/dist/index.cjs +0 -1737
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -929
- package/dist/index.d.ts +0 -929
- package/dist/index.js +0 -1705
- package/dist/index.js.map +0 -1
- package/dist/mcp/cli.cjs +0 -166
- package/dist/mcp/cli.cjs.map +0 -1
- package/dist/mcp/cli.d.cts +0 -1
- package/dist/mcp/cli.d.ts +0 -1
- package/dist/mcp/cli.js +0 -164
- package/dist/mcp/cli.js.map +0 -1
- package/dist/mcp/index.cjs +0 -8
- package/dist/mcp/index.cjs.map +0 -1
- package/dist/mcp/index.d.cts +0 -9
- package/dist/mcp/index.d.ts +0 -9
- package/dist/mcp/index.js +0 -6
- package/dist/mcp/index.js.map +0 -1
|
@@ -0,0 +1,1392 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Agent management
|
|
6
|
+
*/
|
|
7
|
+
export declare class Agents extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new agent for the authenticated party.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const agent = await client.agents.create({
|
|
14
|
+
* name: 'x',
|
|
15
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(params: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Update an existing agent's mutable fields or revoke it.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const agent = await client.agents.update(
|
|
26
|
+
* 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
27
|
+
* { 'Idempotency-Key': 'Idempotency-Key' },
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
update(agentID: string, params: AgentUpdateParams, options?: RequestOptions): APIPromise<AgentUpdateResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* List agents for the authenticated user's party.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const agents = await client.agents.list();
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
list(params?: AgentListParams | null | undefined, options?: RequestOptions): APIPromise<AgentListResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Developer-only. Creates one invitation per agent and sends a single Resend email
|
|
43
|
+
* to the customer.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const response = await client.agents.createInvitations({
|
|
48
|
+
* agents: [
|
|
49
|
+
* {
|
|
50
|
+
* agentId: 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
51
|
+
* permissions: ['string'],
|
|
52
|
+
* },
|
|
53
|
+
* ],
|
|
54
|
+
* customerEmail: 'dev@stainless.com',
|
|
55
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
createInvitations(params: AgentCreateInvitationsParams, options?: RequestOptions): APIPromise<AgentCreateInvitationsResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Get agent details by its unique ID.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const agent = await client.agents.get(
|
|
66
|
+
* 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
67
|
+
* );
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
get(agentID: string, params?: AgentGetParams | null | undefined, options?: RequestOptions): APIPromise<AgentGetResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* List agent delegation invitations
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const response =
|
|
77
|
+
* await client.agents.listInvitationsForDeveloper();
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
listInvitationsForDeveloper(params?: AgentListInvitationsForDeveloperParams | null | undefined, options?: RequestOptions): APIPromise<AgentListInvitationsForDeveloperResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* Delete an agent and clean up its delegations and policies.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* const agent = await client.agents.remove(
|
|
87
|
+
* 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
88
|
+
* { 'Idempotency-Key': 'Idempotency-Key' },
|
|
89
|
+
* );
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
remove(agentID: string, params: AgentRemoveParams, options?: RequestOptions): APIPromise<AgentRemoveResponse>;
|
|
93
|
+
}
|
|
94
|
+
export interface AgentCreateResponse {
|
|
95
|
+
data: AgentCreateResponse.Data;
|
|
96
|
+
}
|
|
97
|
+
export declare namespace AgentCreateResponse {
|
|
98
|
+
interface Data {
|
|
99
|
+
/**
|
|
100
|
+
* Resource ID
|
|
101
|
+
*/
|
|
102
|
+
id: string;
|
|
103
|
+
/**
|
|
104
|
+
* Resource attributes
|
|
105
|
+
*/
|
|
106
|
+
attributes: Data.Attributes;
|
|
107
|
+
/**
|
|
108
|
+
* Resource relationships
|
|
109
|
+
*/
|
|
110
|
+
relationships: Data.Relationships;
|
|
111
|
+
/**
|
|
112
|
+
* Resource type
|
|
113
|
+
*/
|
|
114
|
+
type: string;
|
|
115
|
+
}
|
|
116
|
+
namespace Data {
|
|
117
|
+
/**
|
|
118
|
+
* Resource attributes
|
|
119
|
+
*/
|
|
120
|
+
interface Attributes {
|
|
121
|
+
/**
|
|
122
|
+
* When this agent was created
|
|
123
|
+
*/
|
|
124
|
+
createdAt: string | null;
|
|
125
|
+
/**
|
|
126
|
+
* User who created this agent (usr\_\*)
|
|
127
|
+
*/
|
|
128
|
+
createdBy: string | null;
|
|
129
|
+
/**
|
|
130
|
+
* Agent description
|
|
131
|
+
*/
|
|
132
|
+
description: string | null;
|
|
133
|
+
/**
|
|
134
|
+
* Per-transaction spend cap for actions this agent initiates on its owner's party.
|
|
135
|
+
* null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
|
|
136
|
+
*/
|
|
137
|
+
limits: Attributes.Limits | null;
|
|
138
|
+
/**
|
|
139
|
+
* Agent display name
|
|
140
|
+
*/
|
|
141
|
+
name: string;
|
|
142
|
+
/**
|
|
143
|
+
* Observability stats (null when unavailable)
|
|
144
|
+
*/
|
|
145
|
+
observability: Attributes.Observability | null;
|
|
146
|
+
/**
|
|
147
|
+
* Agent status
|
|
148
|
+
*/
|
|
149
|
+
status: 'ACTIVE' | 'REVOKED';
|
|
150
|
+
/**
|
|
151
|
+
* When this agent was last updated
|
|
152
|
+
*/
|
|
153
|
+
updatedAt: string | null;
|
|
154
|
+
/**
|
|
155
|
+
* User who last updated this agent (usr\_\*)
|
|
156
|
+
*/
|
|
157
|
+
updatedBy: string | null;
|
|
158
|
+
}
|
|
159
|
+
namespace Attributes {
|
|
160
|
+
/**
|
|
161
|
+
* Per-transaction spend cap for actions this agent initiates on its owner's party.
|
|
162
|
+
* null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
|
|
163
|
+
*/
|
|
164
|
+
interface Limits {
|
|
165
|
+
/**
|
|
166
|
+
* Positive per-transaction limit in cents. null means no per-payment limit.
|
|
167
|
+
*/
|
|
168
|
+
perTransaction?: number | null;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Observability stats (null when unavailable)
|
|
172
|
+
*/
|
|
173
|
+
interface Observability {
|
|
174
|
+
/**
|
|
175
|
+
* Errors in last 24h
|
|
176
|
+
*/
|
|
177
|
+
errorCount: number;
|
|
178
|
+
/**
|
|
179
|
+
* Last activity timestamp
|
|
180
|
+
*/
|
|
181
|
+
lastActiveAt: string | null;
|
|
182
|
+
/**
|
|
183
|
+
* Requests in last 24h
|
|
184
|
+
*/
|
|
185
|
+
requestCount: number;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Resource relationships
|
|
190
|
+
*/
|
|
191
|
+
interface Relationships {
|
|
192
|
+
/**
|
|
193
|
+
* Party that owns the agent
|
|
194
|
+
*/
|
|
195
|
+
party: Relationships.Party;
|
|
196
|
+
}
|
|
197
|
+
namespace Relationships {
|
|
198
|
+
/**
|
|
199
|
+
* Party that owns the agent
|
|
200
|
+
*/
|
|
201
|
+
interface Party {
|
|
202
|
+
/**
|
|
203
|
+
* Related resource identifier
|
|
204
|
+
*/
|
|
205
|
+
data: Party.Data;
|
|
206
|
+
}
|
|
207
|
+
namespace Party {
|
|
208
|
+
/**
|
|
209
|
+
* Related resource identifier
|
|
210
|
+
*/
|
|
211
|
+
interface Data {
|
|
212
|
+
id: string;
|
|
213
|
+
/**
|
|
214
|
+
* Resource type
|
|
215
|
+
*/
|
|
216
|
+
type: string;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
export interface AgentUpdateResponse {
|
|
223
|
+
data: AgentUpdateResponse.Data;
|
|
224
|
+
}
|
|
225
|
+
export declare namespace AgentUpdateResponse {
|
|
226
|
+
interface Data {
|
|
227
|
+
/**
|
|
228
|
+
* Resource ID
|
|
229
|
+
*/
|
|
230
|
+
id: string;
|
|
231
|
+
/**
|
|
232
|
+
* Resource attributes
|
|
233
|
+
*/
|
|
234
|
+
attributes: Data.Attributes;
|
|
235
|
+
/**
|
|
236
|
+
* Resource relationships
|
|
237
|
+
*/
|
|
238
|
+
relationships: Data.Relationships;
|
|
239
|
+
/**
|
|
240
|
+
* Resource type
|
|
241
|
+
*/
|
|
242
|
+
type: string;
|
|
243
|
+
}
|
|
244
|
+
namespace Data {
|
|
245
|
+
/**
|
|
246
|
+
* Resource attributes
|
|
247
|
+
*/
|
|
248
|
+
interface Attributes {
|
|
249
|
+
/**
|
|
250
|
+
* When this agent was created
|
|
251
|
+
*/
|
|
252
|
+
createdAt: string | null;
|
|
253
|
+
/**
|
|
254
|
+
* User who created this agent (usr\_\*)
|
|
255
|
+
*/
|
|
256
|
+
createdBy: string | null;
|
|
257
|
+
/**
|
|
258
|
+
* Agent description
|
|
259
|
+
*/
|
|
260
|
+
description: string | null;
|
|
261
|
+
/**
|
|
262
|
+
* Per-transaction spend cap for actions this agent initiates on its owner's party.
|
|
263
|
+
* null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
|
|
264
|
+
*/
|
|
265
|
+
limits: Attributes.Limits | null;
|
|
266
|
+
/**
|
|
267
|
+
* Agent display name
|
|
268
|
+
*/
|
|
269
|
+
name: string;
|
|
270
|
+
/**
|
|
271
|
+
* Observability stats (null when unavailable)
|
|
272
|
+
*/
|
|
273
|
+
observability: Attributes.Observability | null;
|
|
274
|
+
/**
|
|
275
|
+
* Agent status
|
|
276
|
+
*/
|
|
277
|
+
status: 'ACTIVE' | 'REVOKED';
|
|
278
|
+
/**
|
|
279
|
+
* When this agent was last updated
|
|
280
|
+
*/
|
|
281
|
+
updatedAt: string | null;
|
|
282
|
+
/**
|
|
283
|
+
* User who last updated this agent (usr\_\*)
|
|
284
|
+
*/
|
|
285
|
+
updatedBy: string | null;
|
|
286
|
+
}
|
|
287
|
+
namespace Attributes {
|
|
288
|
+
/**
|
|
289
|
+
* Per-transaction spend cap for actions this agent initiates on its owner's party.
|
|
290
|
+
* null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
|
|
291
|
+
*/
|
|
292
|
+
interface Limits {
|
|
293
|
+
/**
|
|
294
|
+
* Positive per-transaction limit in cents. null means no per-payment limit.
|
|
295
|
+
*/
|
|
296
|
+
perTransaction?: number | null;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Observability stats (null when unavailable)
|
|
300
|
+
*/
|
|
301
|
+
interface Observability {
|
|
302
|
+
/**
|
|
303
|
+
* Errors in last 24h
|
|
304
|
+
*/
|
|
305
|
+
errorCount: number;
|
|
306
|
+
/**
|
|
307
|
+
* Last activity timestamp
|
|
308
|
+
*/
|
|
309
|
+
lastActiveAt: string | null;
|
|
310
|
+
/**
|
|
311
|
+
* Requests in last 24h
|
|
312
|
+
*/
|
|
313
|
+
requestCount: number;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Resource relationships
|
|
318
|
+
*/
|
|
319
|
+
interface Relationships {
|
|
320
|
+
/**
|
|
321
|
+
* Party that owns the agent
|
|
322
|
+
*/
|
|
323
|
+
party: Relationships.Party;
|
|
324
|
+
}
|
|
325
|
+
namespace Relationships {
|
|
326
|
+
/**
|
|
327
|
+
* Party that owns the agent
|
|
328
|
+
*/
|
|
329
|
+
interface Party {
|
|
330
|
+
/**
|
|
331
|
+
* Related resource identifier
|
|
332
|
+
*/
|
|
333
|
+
data: Party.Data;
|
|
334
|
+
}
|
|
335
|
+
namespace Party {
|
|
336
|
+
/**
|
|
337
|
+
* Related resource identifier
|
|
338
|
+
*/
|
|
339
|
+
interface Data {
|
|
340
|
+
id: string;
|
|
341
|
+
/**
|
|
342
|
+
* Resource type
|
|
343
|
+
*/
|
|
344
|
+
type: string;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
export interface AgentListResponse {
|
|
351
|
+
data: Array<AgentListResponse.Data>;
|
|
352
|
+
meta: AgentListResponse.Meta;
|
|
353
|
+
}
|
|
354
|
+
export declare namespace AgentListResponse {
|
|
355
|
+
interface Data {
|
|
356
|
+
/**
|
|
357
|
+
* Resource ID
|
|
358
|
+
*/
|
|
359
|
+
id: string;
|
|
360
|
+
/**
|
|
361
|
+
* Resource attributes
|
|
362
|
+
*/
|
|
363
|
+
attributes: Data.Attributes;
|
|
364
|
+
/**
|
|
365
|
+
* Resource relationships
|
|
366
|
+
*/
|
|
367
|
+
relationships: Data.Relationships;
|
|
368
|
+
/**
|
|
369
|
+
* Resource type
|
|
370
|
+
*/
|
|
371
|
+
type: string;
|
|
372
|
+
}
|
|
373
|
+
namespace Data {
|
|
374
|
+
/**
|
|
375
|
+
* Resource attributes
|
|
376
|
+
*/
|
|
377
|
+
interface Attributes {
|
|
378
|
+
/**
|
|
379
|
+
* When this agent was created
|
|
380
|
+
*/
|
|
381
|
+
createdAt: string | null;
|
|
382
|
+
/**
|
|
383
|
+
* User who created this agent (usr\_\*)
|
|
384
|
+
*/
|
|
385
|
+
createdBy: string | null;
|
|
386
|
+
/**
|
|
387
|
+
* Agent description
|
|
388
|
+
*/
|
|
389
|
+
description: string | null;
|
|
390
|
+
/**
|
|
391
|
+
* Per-transaction spend cap for actions this agent initiates on its owner's party.
|
|
392
|
+
* null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
|
|
393
|
+
*/
|
|
394
|
+
limits: Attributes.Limits | null;
|
|
395
|
+
/**
|
|
396
|
+
* Agent display name
|
|
397
|
+
*/
|
|
398
|
+
name: string;
|
|
399
|
+
/**
|
|
400
|
+
* Observability stats (null when unavailable)
|
|
401
|
+
*/
|
|
402
|
+
observability: Attributes.Observability | null;
|
|
403
|
+
/**
|
|
404
|
+
* Agent status
|
|
405
|
+
*/
|
|
406
|
+
status: 'ACTIVE' | 'REVOKED';
|
|
407
|
+
/**
|
|
408
|
+
* When this agent was last updated
|
|
409
|
+
*/
|
|
410
|
+
updatedAt: string | null;
|
|
411
|
+
/**
|
|
412
|
+
* User who last updated this agent (usr\_\*)
|
|
413
|
+
*/
|
|
414
|
+
updatedBy: string | null;
|
|
415
|
+
}
|
|
416
|
+
namespace Attributes {
|
|
417
|
+
/**
|
|
418
|
+
* Per-transaction spend cap for actions this agent initiates on its owner's party.
|
|
419
|
+
* null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
|
|
420
|
+
*/
|
|
421
|
+
interface Limits {
|
|
422
|
+
/**
|
|
423
|
+
* Positive per-transaction limit in cents. null means no per-payment limit.
|
|
424
|
+
*/
|
|
425
|
+
perTransaction?: number | null;
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Observability stats (null when unavailable)
|
|
429
|
+
*/
|
|
430
|
+
interface Observability {
|
|
431
|
+
/**
|
|
432
|
+
* Errors in last 24h
|
|
433
|
+
*/
|
|
434
|
+
errorCount: number;
|
|
435
|
+
/**
|
|
436
|
+
* Last activity timestamp
|
|
437
|
+
*/
|
|
438
|
+
lastActiveAt: string | null;
|
|
439
|
+
/**
|
|
440
|
+
* Requests in last 24h
|
|
441
|
+
*/
|
|
442
|
+
requestCount: number;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Resource relationships
|
|
447
|
+
*/
|
|
448
|
+
interface Relationships {
|
|
449
|
+
/**
|
|
450
|
+
* Party that owns the agent
|
|
451
|
+
*/
|
|
452
|
+
party: Relationships.Party;
|
|
453
|
+
}
|
|
454
|
+
namespace Relationships {
|
|
455
|
+
/**
|
|
456
|
+
* Party that owns the agent
|
|
457
|
+
*/
|
|
458
|
+
interface Party {
|
|
459
|
+
/**
|
|
460
|
+
* Related resource identifier
|
|
461
|
+
*/
|
|
462
|
+
data: Party.Data;
|
|
463
|
+
}
|
|
464
|
+
namespace Party {
|
|
465
|
+
/**
|
|
466
|
+
* Related resource identifier
|
|
467
|
+
*/
|
|
468
|
+
interface Data {
|
|
469
|
+
id: string;
|
|
470
|
+
/**
|
|
471
|
+
* Resource type
|
|
472
|
+
*/
|
|
473
|
+
type: string;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
interface Meta {
|
|
479
|
+
pagination: Meta.Pagination;
|
|
480
|
+
}
|
|
481
|
+
namespace Meta {
|
|
482
|
+
interface Pagination {
|
|
483
|
+
hasMore: boolean;
|
|
484
|
+
nextCursor: string | null;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
export interface AgentCreateInvitationsResponse {
|
|
489
|
+
/**
|
|
490
|
+
* Successfully created invitation resources
|
|
491
|
+
*/
|
|
492
|
+
data: Array<AgentCreateInvitationsResponse.Data>;
|
|
493
|
+
/**
|
|
494
|
+
* Batch invitation metadata
|
|
495
|
+
*/
|
|
496
|
+
meta: AgentCreateInvitationsResponse.Meta;
|
|
497
|
+
}
|
|
498
|
+
export declare namespace AgentCreateInvitationsResponse {
|
|
499
|
+
interface Data {
|
|
500
|
+
/**
|
|
501
|
+
* Invitation ID (adi\_\*)
|
|
502
|
+
*/
|
|
503
|
+
id: string;
|
|
504
|
+
/**
|
|
505
|
+
* Resource attributes
|
|
506
|
+
*/
|
|
507
|
+
attributes: Data.Attributes;
|
|
508
|
+
/**
|
|
509
|
+
* Related resource identifiers
|
|
510
|
+
*/
|
|
511
|
+
relationships: Data.Relationships;
|
|
512
|
+
/**
|
|
513
|
+
* Resource type
|
|
514
|
+
*/
|
|
515
|
+
type: string;
|
|
516
|
+
}
|
|
517
|
+
namespace Data {
|
|
518
|
+
/**
|
|
519
|
+
* Resource attributes
|
|
520
|
+
*/
|
|
521
|
+
interface Attributes {
|
|
522
|
+
/**
|
|
523
|
+
* When this invitation was accepted
|
|
524
|
+
*/
|
|
525
|
+
acceptedAt: string | null;
|
|
526
|
+
/**
|
|
527
|
+
* Display name of the agent being delegated
|
|
528
|
+
*/
|
|
529
|
+
agentName: string;
|
|
530
|
+
/**
|
|
531
|
+
* Why the invitation was cancelled
|
|
532
|
+
*/
|
|
533
|
+
cancelReason: 'AGENT_RETIRED' | 'DEVELOPER_RETIRED' | null;
|
|
534
|
+
/**
|
|
535
|
+
* When this invitation was created
|
|
536
|
+
*/
|
|
537
|
+
createdAt: string;
|
|
538
|
+
/**
|
|
539
|
+
* When this invitation was declined
|
|
540
|
+
*/
|
|
541
|
+
declinedAt: string | null;
|
|
542
|
+
/**
|
|
543
|
+
* Display name of the developer party
|
|
544
|
+
*/
|
|
545
|
+
developerName: string;
|
|
546
|
+
/**
|
|
547
|
+
* Status after applying expiry and cancel-reason overlays
|
|
548
|
+
*/
|
|
549
|
+
effectiveStatus: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
|
|
550
|
+
/**
|
|
551
|
+
* Customer email the invitation was sent to
|
|
552
|
+
*/
|
|
553
|
+
email: string;
|
|
554
|
+
/**
|
|
555
|
+
* When this invitation expires
|
|
556
|
+
*/
|
|
557
|
+
expiresAt: string;
|
|
558
|
+
/**
|
|
559
|
+
* Per-agent transaction limits
|
|
560
|
+
*/
|
|
561
|
+
limits: Attributes.Limits | null;
|
|
562
|
+
/**
|
|
563
|
+
* Permissions the agent will hold on accept
|
|
564
|
+
*/
|
|
565
|
+
permissions: Array<string>;
|
|
566
|
+
/**
|
|
567
|
+
* Raw persisted status
|
|
568
|
+
*/
|
|
569
|
+
status: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
|
|
570
|
+
/**
|
|
571
|
+
* When this invitation was last updated
|
|
572
|
+
*/
|
|
573
|
+
updatedAt: string;
|
|
574
|
+
}
|
|
575
|
+
namespace Attributes {
|
|
576
|
+
/**
|
|
577
|
+
* Per-agent transaction limits
|
|
578
|
+
*/
|
|
579
|
+
interface Limits {
|
|
580
|
+
/**
|
|
581
|
+
* Per-transaction cap, integer cents (USD).
|
|
582
|
+
*/
|
|
583
|
+
perTransaction?: number | null;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Related resource identifiers
|
|
588
|
+
*/
|
|
589
|
+
interface Relationships {
|
|
590
|
+
/**
|
|
591
|
+
* Agent being delegated
|
|
592
|
+
*/
|
|
593
|
+
agent: Relationships.Agent;
|
|
594
|
+
/**
|
|
595
|
+
* Resulting agent delegation once accepted; currently null on public create/list
|
|
596
|
+
* responses
|
|
597
|
+
*/
|
|
598
|
+
agentDelegation: Relationships.AgentDelegation;
|
|
599
|
+
/**
|
|
600
|
+
* Customer party the invitation was accepted on (null until accept)
|
|
601
|
+
*/
|
|
602
|
+
customerParty: Relationships.CustomerParty;
|
|
603
|
+
/**
|
|
604
|
+
* Developer party that issued the invitation
|
|
605
|
+
*/
|
|
606
|
+
developerParty: Relationships.DeveloperParty;
|
|
607
|
+
}
|
|
608
|
+
namespace Relationships {
|
|
609
|
+
/**
|
|
610
|
+
* Agent being delegated
|
|
611
|
+
*/
|
|
612
|
+
interface Agent {
|
|
613
|
+
/**
|
|
614
|
+
* Related resource identifier
|
|
615
|
+
*/
|
|
616
|
+
data: Agent.Data;
|
|
617
|
+
}
|
|
618
|
+
namespace Agent {
|
|
619
|
+
/**
|
|
620
|
+
* Related resource identifier
|
|
621
|
+
*/
|
|
622
|
+
interface Data {
|
|
623
|
+
id: string;
|
|
624
|
+
/**
|
|
625
|
+
* Resource type
|
|
626
|
+
*/
|
|
627
|
+
type: string;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Resulting agent delegation once accepted; currently null on public create/list
|
|
632
|
+
* responses
|
|
633
|
+
*/
|
|
634
|
+
interface AgentDelegation {
|
|
635
|
+
/**
|
|
636
|
+
* Related resource identifier
|
|
637
|
+
*/
|
|
638
|
+
data: AgentDelegation.Data | null;
|
|
639
|
+
}
|
|
640
|
+
namespace AgentDelegation {
|
|
641
|
+
/**
|
|
642
|
+
* Related resource identifier
|
|
643
|
+
*/
|
|
644
|
+
interface Data {
|
|
645
|
+
id: string;
|
|
646
|
+
/**
|
|
647
|
+
* Resource type
|
|
648
|
+
*/
|
|
649
|
+
type: string;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Customer party the invitation was accepted on (null until accept)
|
|
654
|
+
*/
|
|
655
|
+
interface CustomerParty {
|
|
656
|
+
/**
|
|
657
|
+
* Related resource identifier
|
|
658
|
+
*/
|
|
659
|
+
data: CustomerParty.Data | null;
|
|
660
|
+
}
|
|
661
|
+
namespace CustomerParty {
|
|
662
|
+
/**
|
|
663
|
+
* Related resource identifier
|
|
664
|
+
*/
|
|
665
|
+
interface Data {
|
|
666
|
+
id: string;
|
|
667
|
+
/**
|
|
668
|
+
* Resource type
|
|
669
|
+
*/
|
|
670
|
+
type: string;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Developer party that issued the invitation
|
|
675
|
+
*/
|
|
676
|
+
interface DeveloperParty {
|
|
677
|
+
/**
|
|
678
|
+
* Related resource identifier
|
|
679
|
+
*/
|
|
680
|
+
data: DeveloperParty.Data;
|
|
681
|
+
}
|
|
682
|
+
namespace DeveloperParty {
|
|
683
|
+
/**
|
|
684
|
+
* Related resource identifier
|
|
685
|
+
*/
|
|
686
|
+
interface Data {
|
|
687
|
+
id: string;
|
|
688
|
+
/**
|
|
689
|
+
* Resource type
|
|
690
|
+
*/
|
|
691
|
+
type: string;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Batch invitation metadata
|
|
698
|
+
*/
|
|
699
|
+
interface Meta {
|
|
700
|
+
/**
|
|
701
|
+
* Invitation IDs whose welcome-email send failed. Invitations are still persisted;
|
|
702
|
+
* use the resend-email flow to retry.
|
|
703
|
+
*/
|
|
704
|
+
emailFailures: Array<string>;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
export interface AgentGetResponse {
|
|
708
|
+
data: AgentGetResponse.Data;
|
|
709
|
+
}
|
|
710
|
+
export declare namespace AgentGetResponse {
|
|
711
|
+
interface Data {
|
|
712
|
+
/**
|
|
713
|
+
* Resource ID
|
|
714
|
+
*/
|
|
715
|
+
id: string;
|
|
716
|
+
/**
|
|
717
|
+
* Resource attributes
|
|
718
|
+
*/
|
|
719
|
+
attributes: Data.Attributes;
|
|
720
|
+
/**
|
|
721
|
+
* Resource relationships
|
|
722
|
+
*/
|
|
723
|
+
relationships: Data.Relationships;
|
|
724
|
+
/**
|
|
725
|
+
* Resource type
|
|
726
|
+
*/
|
|
727
|
+
type: string;
|
|
728
|
+
}
|
|
729
|
+
namespace Data {
|
|
730
|
+
/**
|
|
731
|
+
* Resource attributes
|
|
732
|
+
*/
|
|
733
|
+
interface Attributes {
|
|
734
|
+
/**
|
|
735
|
+
* When this agent was created
|
|
736
|
+
*/
|
|
737
|
+
createdAt: string | null;
|
|
738
|
+
/**
|
|
739
|
+
* User who created this agent (usr\_\*)
|
|
740
|
+
*/
|
|
741
|
+
createdBy: string | null;
|
|
742
|
+
/**
|
|
743
|
+
* Agent description
|
|
744
|
+
*/
|
|
745
|
+
description: string | null;
|
|
746
|
+
/**
|
|
747
|
+
* Per-transaction spend cap for actions this agent initiates on its owner's party.
|
|
748
|
+
* null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
|
|
749
|
+
*/
|
|
750
|
+
limits: Attributes.Limits | null;
|
|
751
|
+
/**
|
|
752
|
+
* Agent display name
|
|
753
|
+
*/
|
|
754
|
+
name: string;
|
|
755
|
+
/**
|
|
756
|
+
* Observability stats (null when unavailable)
|
|
757
|
+
*/
|
|
758
|
+
observability: Attributes.Observability | null;
|
|
759
|
+
/**
|
|
760
|
+
* Agent status
|
|
761
|
+
*/
|
|
762
|
+
status: 'ACTIVE' | 'REVOKED';
|
|
763
|
+
/**
|
|
764
|
+
* When this agent was last updated
|
|
765
|
+
*/
|
|
766
|
+
updatedAt: string | null;
|
|
767
|
+
/**
|
|
768
|
+
* User who last updated this agent (usr\_\*)
|
|
769
|
+
*/
|
|
770
|
+
updatedBy: string | null;
|
|
771
|
+
}
|
|
772
|
+
namespace Attributes {
|
|
773
|
+
/**
|
|
774
|
+
* Per-transaction spend cap for actions this agent initiates on its owner's party.
|
|
775
|
+
* null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
|
|
776
|
+
*/
|
|
777
|
+
interface Limits {
|
|
778
|
+
/**
|
|
779
|
+
* Positive per-transaction limit in cents. null means no per-payment limit.
|
|
780
|
+
*/
|
|
781
|
+
perTransaction?: number | null;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Observability stats (null when unavailable)
|
|
785
|
+
*/
|
|
786
|
+
interface Observability {
|
|
787
|
+
/**
|
|
788
|
+
* Errors in last 24h
|
|
789
|
+
*/
|
|
790
|
+
errorCount: number;
|
|
791
|
+
/**
|
|
792
|
+
* Last activity timestamp
|
|
793
|
+
*/
|
|
794
|
+
lastActiveAt: string | null;
|
|
795
|
+
/**
|
|
796
|
+
* Requests in last 24h
|
|
797
|
+
*/
|
|
798
|
+
requestCount: number;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Resource relationships
|
|
803
|
+
*/
|
|
804
|
+
interface Relationships {
|
|
805
|
+
/**
|
|
806
|
+
* Party that owns the agent
|
|
807
|
+
*/
|
|
808
|
+
party: Relationships.Party;
|
|
809
|
+
}
|
|
810
|
+
namespace Relationships {
|
|
811
|
+
/**
|
|
812
|
+
* Party that owns the agent
|
|
813
|
+
*/
|
|
814
|
+
interface Party {
|
|
815
|
+
/**
|
|
816
|
+
* Related resource identifier
|
|
817
|
+
*/
|
|
818
|
+
data: Party.Data;
|
|
819
|
+
}
|
|
820
|
+
namespace Party {
|
|
821
|
+
/**
|
|
822
|
+
* Related resource identifier
|
|
823
|
+
*/
|
|
824
|
+
interface Data {
|
|
825
|
+
id: string;
|
|
826
|
+
/**
|
|
827
|
+
* Resource type
|
|
828
|
+
*/
|
|
829
|
+
type: string;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
export interface AgentListInvitationsForDeveloperResponse {
|
|
836
|
+
data: Array<AgentListInvitationsForDeveloperResponse.Data>;
|
|
837
|
+
meta: AgentListInvitationsForDeveloperResponse.Meta;
|
|
838
|
+
}
|
|
839
|
+
export declare namespace AgentListInvitationsForDeveloperResponse {
|
|
840
|
+
interface Data {
|
|
841
|
+
/**
|
|
842
|
+
* Invitation ID (adi\_\*)
|
|
843
|
+
*/
|
|
844
|
+
id: string;
|
|
845
|
+
/**
|
|
846
|
+
* Resource attributes
|
|
847
|
+
*/
|
|
848
|
+
attributes: Data.Attributes;
|
|
849
|
+
/**
|
|
850
|
+
* Related resource identifiers
|
|
851
|
+
*/
|
|
852
|
+
relationships: Data.Relationships;
|
|
853
|
+
/**
|
|
854
|
+
* Resource type
|
|
855
|
+
*/
|
|
856
|
+
type: string;
|
|
857
|
+
}
|
|
858
|
+
namespace Data {
|
|
859
|
+
/**
|
|
860
|
+
* Resource attributes
|
|
861
|
+
*/
|
|
862
|
+
interface Attributes {
|
|
863
|
+
/**
|
|
864
|
+
* When this invitation was accepted
|
|
865
|
+
*/
|
|
866
|
+
acceptedAt: string | null;
|
|
867
|
+
/**
|
|
868
|
+
* Display name of the agent being delegated
|
|
869
|
+
*/
|
|
870
|
+
agentName: string;
|
|
871
|
+
/**
|
|
872
|
+
* Why the invitation was cancelled
|
|
873
|
+
*/
|
|
874
|
+
cancelReason: 'AGENT_RETIRED' | 'DEVELOPER_RETIRED' | null;
|
|
875
|
+
/**
|
|
876
|
+
* When this invitation was created
|
|
877
|
+
*/
|
|
878
|
+
createdAt: string;
|
|
879
|
+
/**
|
|
880
|
+
* When this invitation was declined
|
|
881
|
+
*/
|
|
882
|
+
declinedAt: string | null;
|
|
883
|
+
/**
|
|
884
|
+
* Display name of the developer party
|
|
885
|
+
*/
|
|
886
|
+
developerName: string;
|
|
887
|
+
/**
|
|
888
|
+
* Status after applying expiry and cancel-reason overlays
|
|
889
|
+
*/
|
|
890
|
+
effectiveStatus: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
|
|
891
|
+
/**
|
|
892
|
+
* Customer email the invitation was sent to
|
|
893
|
+
*/
|
|
894
|
+
email: string;
|
|
895
|
+
/**
|
|
896
|
+
* When this invitation expires
|
|
897
|
+
*/
|
|
898
|
+
expiresAt: string;
|
|
899
|
+
/**
|
|
900
|
+
* Per-agent transaction limits
|
|
901
|
+
*/
|
|
902
|
+
limits: Attributes.Limits | null;
|
|
903
|
+
/**
|
|
904
|
+
* Permissions the agent will hold on accept
|
|
905
|
+
*/
|
|
906
|
+
permissions: Array<string>;
|
|
907
|
+
/**
|
|
908
|
+
* Raw persisted status
|
|
909
|
+
*/
|
|
910
|
+
status: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
|
|
911
|
+
/**
|
|
912
|
+
* When this invitation was last updated
|
|
913
|
+
*/
|
|
914
|
+
updatedAt: string;
|
|
915
|
+
}
|
|
916
|
+
namespace Attributes {
|
|
917
|
+
/**
|
|
918
|
+
* Per-agent transaction limits
|
|
919
|
+
*/
|
|
920
|
+
interface Limits {
|
|
921
|
+
/**
|
|
922
|
+
* Per-transaction cap, integer cents (USD).
|
|
923
|
+
*/
|
|
924
|
+
perTransaction?: number | null;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Related resource identifiers
|
|
929
|
+
*/
|
|
930
|
+
interface Relationships {
|
|
931
|
+
/**
|
|
932
|
+
* Agent being delegated
|
|
933
|
+
*/
|
|
934
|
+
agent: Relationships.Agent;
|
|
935
|
+
/**
|
|
936
|
+
* Resulting agent delegation once accepted; currently null on public create/list
|
|
937
|
+
* responses
|
|
938
|
+
*/
|
|
939
|
+
agentDelegation: Relationships.AgentDelegation;
|
|
940
|
+
/**
|
|
941
|
+
* Customer party the invitation was accepted on (null until accept)
|
|
942
|
+
*/
|
|
943
|
+
customerParty: Relationships.CustomerParty;
|
|
944
|
+
/**
|
|
945
|
+
* Developer party that issued the invitation
|
|
946
|
+
*/
|
|
947
|
+
developerParty: Relationships.DeveloperParty;
|
|
948
|
+
}
|
|
949
|
+
namespace Relationships {
|
|
950
|
+
/**
|
|
951
|
+
* Agent being delegated
|
|
952
|
+
*/
|
|
953
|
+
interface Agent {
|
|
954
|
+
/**
|
|
955
|
+
* Related resource identifier
|
|
956
|
+
*/
|
|
957
|
+
data: Agent.Data;
|
|
958
|
+
}
|
|
959
|
+
namespace Agent {
|
|
960
|
+
/**
|
|
961
|
+
* Related resource identifier
|
|
962
|
+
*/
|
|
963
|
+
interface Data {
|
|
964
|
+
id: string;
|
|
965
|
+
/**
|
|
966
|
+
* Resource type
|
|
967
|
+
*/
|
|
968
|
+
type: string;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* Resulting agent delegation once accepted; currently null on public create/list
|
|
973
|
+
* responses
|
|
974
|
+
*/
|
|
975
|
+
interface AgentDelegation {
|
|
976
|
+
/**
|
|
977
|
+
* Related resource identifier
|
|
978
|
+
*/
|
|
979
|
+
data: AgentDelegation.Data | null;
|
|
980
|
+
}
|
|
981
|
+
namespace AgentDelegation {
|
|
982
|
+
/**
|
|
983
|
+
* Related resource identifier
|
|
984
|
+
*/
|
|
985
|
+
interface Data {
|
|
986
|
+
id: string;
|
|
987
|
+
/**
|
|
988
|
+
* Resource type
|
|
989
|
+
*/
|
|
990
|
+
type: string;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* Customer party the invitation was accepted on (null until accept)
|
|
995
|
+
*/
|
|
996
|
+
interface CustomerParty {
|
|
997
|
+
/**
|
|
998
|
+
* Related resource identifier
|
|
999
|
+
*/
|
|
1000
|
+
data: CustomerParty.Data | null;
|
|
1001
|
+
}
|
|
1002
|
+
namespace CustomerParty {
|
|
1003
|
+
/**
|
|
1004
|
+
* Related resource identifier
|
|
1005
|
+
*/
|
|
1006
|
+
interface Data {
|
|
1007
|
+
id: string;
|
|
1008
|
+
/**
|
|
1009
|
+
* Resource type
|
|
1010
|
+
*/
|
|
1011
|
+
type: string;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* Developer party that issued the invitation
|
|
1016
|
+
*/
|
|
1017
|
+
interface DeveloperParty {
|
|
1018
|
+
/**
|
|
1019
|
+
* Related resource identifier
|
|
1020
|
+
*/
|
|
1021
|
+
data: DeveloperParty.Data;
|
|
1022
|
+
}
|
|
1023
|
+
namespace DeveloperParty {
|
|
1024
|
+
/**
|
|
1025
|
+
* Related resource identifier
|
|
1026
|
+
*/
|
|
1027
|
+
interface Data {
|
|
1028
|
+
id: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* Resource type
|
|
1031
|
+
*/
|
|
1032
|
+
type: string;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
interface Meta {
|
|
1038
|
+
pagination: Meta.Pagination;
|
|
1039
|
+
}
|
|
1040
|
+
namespace Meta {
|
|
1041
|
+
interface Pagination {
|
|
1042
|
+
hasMore: boolean;
|
|
1043
|
+
nextCursor: string | null;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
export interface AgentRemoveResponse {
|
|
1048
|
+
data: AgentRemoveResponse.Data;
|
|
1049
|
+
meta: AgentRemoveResponse.Meta;
|
|
1050
|
+
}
|
|
1051
|
+
export declare namespace AgentRemoveResponse {
|
|
1052
|
+
interface Data {
|
|
1053
|
+
/**
|
|
1054
|
+
* Resource ID
|
|
1055
|
+
*/
|
|
1056
|
+
id: string;
|
|
1057
|
+
/**
|
|
1058
|
+
* Resource attributes
|
|
1059
|
+
*/
|
|
1060
|
+
attributes: Data.Attributes;
|
|
1061
|
+
/**
|
|
1062
|
+
* Resource relationships
|
|
1063
|
+
*/
|
|
1064
|
+
relationships: Data.Relationships;
|
|
1065
|
+
/**
|
|
1066
|
+
* Resource type
|
|
1067
|
+
*/
|
|
1068
|
+
type: string;
|
|
1069
|
+
}
|
|
1070
|
+
namespace Data {
|
|
1071
|
+
/**
|
|
1072
|
+
* Resource attributes
|
|
1073
|
+
*/
|
|
1074
|
+
interface Attributes {
|
|
1075
|
+
/**
|
|
1076
|
+
* When this agent was created
|
|
1077
|
+
*/
|
|
1078
|
+
createdAt: string | null;
|
|
1079
|
+
/**
|
|
1080
|
+
* User who created this agent (usr\_\*)
|
|
1081
|
+
*/
|
|
1082
|
+
createdBy: string | null;
|
|
1083
|
+
/**
|
|
1084
|
+
* Agent description
|
|
1085
|
+
*/
|
|
1086
|
+
description: string | null;
|
|
1087
|
+
/**
|
|
1088
|
+
* Per-transaction spend cap for actions this agent initiates on its owner's party.
|
|
1089
|
+
* null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
|
|
1090
|
+
*/
|
|
1091
|
+
limits: Attributes.Limits | null;
|
|
1092
|
+
/**
|
|
1093
|
+
* Agent display name
|
|
1094
|
+
*/
|
|
1095
|
+
name: string;
|
|
1096
|
+
/**
|
|
1097
|
+
* Observability stats (null when unavailable)
|
|
1098
|
+
*/
|
|
1099
|
+
observability: Attributes.Observability | null;
|
|
1100
|
+
/**
|
|
1101
|
+
* Agent status
|
|
1102
|
+
*/
|
|
1103
|
+
status: 'ACTIVE' | 'REVOKED';
|
|
1104
|
+
/**
|
|
1105
|
+
* When this agent was last updated
|
|
1106
|
+
*/
|
|
1107
|
+
updatedAt: string | null;
|
|
1108
|
+
/**
|
|
1109
|
+
* User who last updated this agent (usr\_\*)
|
|
1110
|
+
*/
|
|
1111
|
+
updatedBy: string | null;
|
|
1112
|
+
}
|
|
1113
|
+
namespace Attributes {
|
|
1114
|
+
/**
|
|
1115
|
+
* Per-transaction spend cap for actions this agent initiates on its owner's party.
|
|
1116
|
+
* null = no limit. Stored as Policy(scope=Agent(id)) in the policy service.
|
|
1117
|
+
*/
|
|
1118
|
+
interface Limits {
|
|
1119
|
+
/**
|
|
1120
|
+
* Positive per-transaction limit in cents. null means no per-payment limit.
|
|
1121
|
+
*/
|
|
1122
|
+
perTransaction?: number | null;
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* Observability stats (null when unavailable)
|
|
1126
|
+
*/
|
|
1127
|
+
interface Observability {
|
|
1128
|
+
/**
|
|
1129
|
+
* Errors in last 24h
|
|
1130
|
+
*/
|
|
1131
|
+
errorCount: number;
|
|
1132
|
+
/**
|
|
1133
|
+
* Last activity timestamp
|
|
1134
|
+
*/
|
|
1135
|
+
lastActiveAt: string | null;
|
|
1136
|
+
/**
|
|
1137
|
+
* Requests in last 24h
|
|
1138
|
+
*/
|
|
1139
|
+
requestCount: number;
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Resource relationships
|
|
1144
|
+
*/
|
|
1145
|
+
interface Relationships {
|
|
1146
|
+
/**
|
|
1147
|
+
* Party that owns the agent
|
|
1148
|
+
*/
|
|
1149
|
+
party: Relationships.Party;
|
|
1150
|
+
}
|
|
1151
|
+
namespace Relationships {
|
|
1152
|
+
/**
|
|
1153
|
+
* Party that owns the agent
|
|
1154
|
+
*/
|
|
1155
|
+
interface Party {
|
|
1156
|
+
/**
|
|
1157
|
+
* Related resource identifier
|
|
1158
|
+
*/
|
|
1159
|
+
data: Party.Data;
|
|
1160
|
+
}
|
|
1161
|
+
namespace Party {
|
|
1162
|
+
/**
|
|
1163
|
+
* Related resource identifier
|
|
1164
|
+
*/
|
|
1165
|
+
interface Data {
|
|
1166
|
+
id: string;
|
|
1167
|
+
/**
|
|
1168
|
+
* Resource type
|
|
1169
|
+
*/
|
|
1170
|
+
type: string;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
interface Meta {
|
|
1176
|
+
/**
|
|
1177
|
+
* Indicates the resource was deleted
|
|
1178
|
+
*/
|
|
1179
|
+
deleted: true;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
export interface AgentCreateParams {
|
|
1183
|
+
/**
|
|
1184
|
+
* Body param: Agent display name
|
|
1185
|
+
*/
|
|
1186
|
+
name: string;
|
|
1187
|
+
/**
|
|
1188
|
+
* Header param: Unique key for idempotent request handling. If a request with the
|
|
1189
|
+
* same key was already processed, the original response is returned.
|
|
1190
|
+
*/
|
|
1191
|
+
'Idempotency-Key': string;
|
|
1192
|
+
/**
|
|
1193
|
+
* Body param: Agent description
|
|
1194
|
+
*/
|
|
1195
|
+
description?: string;
|
|
1196
|
+
/**
|
|
1197
|
+
* Body param: Optional per-transaction limit for the agent
|
|
1198
|
+
*/
|
|
1199
|
+
limits?: AgentCreateParams.Limits;
|
|
1200
|
+
/**
|
|
1201
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1202
|
+
*/
|
|
1203
|
+
'X-Agent-ID'?: string;
|
|
1204
|
+
/**
|
|
1205
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
1206
|
+
* for agent observability.
|
|
1207
|
+
*/
|
|
1208
|
+
'X-Instance-ID'?: string;
|
|
1209
|
+
}
|
|
1210
|
+
export declare namespace AgentCreateParams {
|
|
1211
|
+
/**
|
|
1212
|
+
* Optional per-transaction limit for the agent
|
|
1213
|
+
*/
|
|
1214
|
+
interface Limits {
|
|
1215
|
+
/**
|
|
1216
|
+
* Positive per-transaction limit in cents. null means no per-payment limit.
|
|
1217
|
+
*/
|
|
1218
|
+
perTransaction?: number | null;
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
export interface AgentUpdateParams {
|
|
1222
|
+
/**
|
|
1223
|
+
* Header param: Unique key for idempotent request handling. If a request with the
|
|
1224
|
+
* same key was already processed, the original response is returned.
|
|
1225
|
+
*/
|
|
1226
|
+
'Idempotency-Key': string;
|
|
1227
|
+
/**
|
|
1228
|
+
* Body param: Updated description
|
|
1229
|
+
*/
|
|
1230
|
+
description?: string | null;
|
|
1231
|
+
/**
|
|
1232
|
+
* Body param: Per-transaction spend cap. null clears the limit; omitted leaves it
|
|
1233
|
+
* unchanged.
|
|
1234
|
+
*/
|
|
1235
|
+
limits?: AgentUpdateParams.Limits | null;
|
|
1236
|
+
/**
|
|
1237
|
+
* Body param: Updated name for the agent
|
|
1238
|
+
*/
|
|
1239
|
+
name?: string | null;
|
|
1240
|
+
/**
|
|
1241
|
+
* Body param: Updated status
|
|
1242
|
+
*/
|
|
1243
|
+
status?: 'ACTIVE' | 'REVOKED' | null;
|
|
1244
|
+
/**
|
|
1245
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1246
|
+
*/
|
|
1247
|
+
'X-Agent-ID'?: string;
|
|
1248
|
+
/**
|
|
1249
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
1250
|
+
* for agent observability.
|
|
1251
|
+
*/
|
|
1252
|
+
'X-Instance-ID'?: string;
|
|
1253
|
+
}
|
|
1254
|
+
export declare namespace AgentUpdateParams {
|
|
1255
|
+
/**
|
|
1256
|
+
* Per-transaction spend cap. null clears the limit; omitted leaves it unchanged.
|
|
1257
|
+
*/
|
|
1258
|
+
interface Limits {
|
|
1259
|
+
/**
|
|
1260
|
+
* Positive per-transaction limit in cents. null means no per-payment limit.
|
|
1261
|
+
*/
|
|
1262
|
+
perTransaction?: number | null;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
export interface AgentListParams {
|
|
1266
|
+
/**
|
|
1267
|
+
* Query param: Cursor for the next page
|
|
1268
|
+
*/
|
|
1269
|
+
cursor?: string;
|
|
1270
|
+
/**
|
|
1271
|
+
* Query param: Maximum number of agents to return
|
|
1272
|
+
*/
|
|
1273
|
+
limit?: number;
|
|
1274
|
+
/**
|
|
1275
|
+
* Query param: Filter by status
|
|
1276
|
+
*/
|
|
1277
|
+
status?: 'ACTIVE' | 'REVOKED';
|
|
1278
|
+
/**
|
|
1279
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1280
|
+
*/
|
|
1281
|
+
'X-Agent-ID'?: string;
|
|
1282
|
+
/**
|
|
1283
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
1284
|
+
* for agent observability.
|
|
1285
|
+
*/
|
|
1286
|
+
'X-Instance-ID'?: string;
|
|
1287
|
+
}
|
|
1288
|
+
export interface AgentCreateInvitationsParams {
|
|
1289
|
+
/**
|
|
1290
|
+
* Body param: Per-agent delegation requests (1-50)
|
|
1291
|
+
*/
|
|
1292
|
+
agents: Array<AgentCreateInvitationsParams.Agent>;
|
|
1293
|
+
/**
|
|
1294
|
+
* Body param: Email address of the customer to invite
|
|
1295
|
+
*/
|
|
1296
|
+
customerEmail: string;
|
|
1297
|
+
/**
|
|
1298
|
+
* Header param: Unique key for idempotent request handling. If a request with the
|
|
1299
|
+
* same key was already processed, the original response is returned.
|
|
1300
|
+
*/
|
|
1301
|
+
'Idempotency-Key': string;
|
|
1302
|
+
/**
|
|
1303
|
+
* Body param: Optional explicit expiry timestamp; server defaults to 7 days
|
|
1304
|
+
*/
|
|
1305
|
+
expiresAt?: string;
|
|
1306
|
+
/**
|
|
1307
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1308
|
+
*/
|
|
1309
|
+
'X-Agent-ID'?: string;
|
|
1310
|
+
/**
|
|
1311
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
1312
|
+
* for agent observability.
|
|
1313
|
+
*/
|
|
1314
|
+
'X-Instance-ID'?: string;
|
|
1315
|
+
}
|
|
1316
|
+
export declare namespace AgentCreateInvitationsParams {
|
|
1317
|
+
interface Agent {
|
|
1318
|
+
agentId: string;
|
|
1319
|
+
permissions: Array<string>;
|
|
1320
|
+
limits?: Agent.Limits;
|
|
1321
|
+
}
|
|
1322
|
+
namespace Agent {
|
|
1323
|
+
interface Limits {
|
|
1324
|
+
/**
|
|
1325
|
+
* Per-transaction cap, integer cents (USD).
|
|
1326
|
+
*/
|
|
1327
|
+
perTransaction?: number | null;
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
export interface AgentGetParams {
|
|
1332
|
+
/**
|
|
1333
|
+
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1334
|
+
*/
|
|
1335
|
+
'X-Agent-ID'?: string;
|
|
1336
|
+
/**
|
|
1337
|
+
* Required when X-Agent-ID is present. Session or conversation ID for agent
|
|
1338
|
+
* observability.
|
|
1339
|
+
*/
|
|
1340
|
+
'X-Instance-ID'?: string;
|
|
1341
|
+
}
|
|
1342
|
+
export interface AgentListInvitationsForDeveloperParams {
|
|
1343
|
+
/**
|
|
1344
|
+
* Query param
|
|
1345
|
+
*/
|
|
1346
|
+
agentId?: string;
|
|
1347
|
+
/**
|
|
1348
|
+
* Query param
|
|
1349
|
+
*/
|
|
1350
|
+
cursor?: string;
|
|
1351
|
+
/**
|
|
1352
|
+
* Query param
|
|
1353
|
+
*/
|
|
1354
|
+
customerEmail?: string;
|
|
1355
|
+
/**
|
|
1356
|
+
* Query param
|
|
1357
|
+
*/
|
|
1358
|
+
limit?: number;
|
|
1359
|
+
/**
|
|
1360
|
+
* Query param
|
|
1361
|
+
*/
|
|
1362
|
+
status?: Array<'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED'>;
|
|
1363
|
+
/**
|
|
1364
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1365
|
+
*/
|
|
1366
|
+
'X-Agent-ID'?: string;
|
|
1367
|
+
/**
|
|
1368
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
1369
|
+
* for agent observability.
|
|
1370
|
+
*/
|
|
1371
|
+
'X-Instance-ID'?: string;
|
|
1372
|
+
}
|
|
1373
|
+
export interface AgentRemoveParams {
|
|
1374
|
+
/**
|
|
1375
|
+
* Unique key for idempotent request handling. If a request with the same key was
|
|
1376
|
+
* already processed, the original response is returned.
|
|
1377
|
+
*/
|
|
1378
|
+
'Idempotency-Key': string;
|
|
1379
|
+
/**
|
|
1380
|
+
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1381
|
+
*/
|
|
1382
|
+
'X-Agent-ID'?: string;
|
|
1383
|
+
/**
|
|
1384
|
+
* Required when X-Agent-ID is present. Session or conversation ID for agent
|
|
1385
|
+
* observability.
|
|
1386
|
+
*/
|
|
1387
|
+
'X-Instance-ID'?: string;
|
|
1388
|
+
}
|
|
1389
|
+
export declare namespace Agents {
|
|
1390
|
+
export { type AgentCreateResponse as AgentCreateResponse, type AgentUpdateResponse as AgentUpdateResponse, type AgentListResponse as AgentListResponse, type AgentCreateInvitationsResponse as AgentCreateInvitationsResponse, type AgentGetResponse as AgentGetResponse, type AgentListInvitationsForDeveloperResponse as AgentListInvitationsForDeveloperResponse, type AgentRemoveResponse as AgentRemoveResponse, type AgentCreateParams as AgentCreateParams, type AgentUpdateParams as AgentUpdateParams, type AgentListParams as AgentListParams, type AgentCreateInvitationsParams as AgentCreateInvitationsParams, type AgentGetParams as AgentGetParams, type AgentListInvitationsForDeveloperParams as AgentListInvitationsForDeveloperParams, type AgentRemoveParams as AgentRemoveParams, };
|
|
1391
|
+
}
|
|
1392
|
+
//# sourceMappingURL=agents.d.ts.map
|