@naturalpay/sdk 0.1.4 → 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 -1688
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -879
- package/dist/index.d.ts +0 -879
- package/dist/index.js +0 -1657
- 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,304 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Party invitation management
|
|
6
|
+
*/
|
|
7
|
+
export declare class Invitations extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create one or more invitations to join the authenticated user's party.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const invitation = await client.invitations.create({
|
|
14
|
+
* invitations: [
|
|
15
|
+
* { email: 'dev@stainless.com', role: 'OWNER' },
|
|
16
|
+
* ],
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(params: InvitationCreateParams, options?: RequestOptions): APIPromise<InvitationCreateResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* List invitations with optional filters by party, email, or status.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const invitations = await client.invitations.list();
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
list(params?: InvitationListParams | null | undefined, options?: RequestOptions): APIPromise<InvitationListResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Revoke a pending invitation so it can no longer be accepted.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.invitations.revoke(
|
|
36
|
+
* 'invitationId',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
revoke(invitationID: string, params?: InvitationRevokeParams | null | undefined, options?: RequestOptions): APIPromise<InvitationRevokeResponse>;
|
|
41
|
+
}
|
|
42
|
+
export interface InvitationCreateResponse {
|
|
43
|
+
/**
|
|
44
|
+
* Successfully created invitation resources
|
|
45
|
+
*/
|
|
46
|
+
data: Array<InvitationCreateResponse.Data>;
|
|
47
|
+
/**
|
|
48
|
+
* Batch invitation metadata
|
|
49
|
+
*/
|
|
50
|
+
meta: InvitationCreateResponse.Meta;
|
|
51
|
+
}
|
|
52
|
+
export declare namespace InvitationCreateResponse {
|
|
53
|
+
interface Data {
|
|
54
|
+
/**
|
|
55
|
+
* Invitation ID (inv_xxx)
|
|
56
|
+
*/
|
|
57
|
+
id: string;
|
|
58
|
+
/**
|
|
59
|
+
* Resource attributes
|
|
60
|
+
*/
|
|
61
|
+
attributes: Data.Attributes;
|
|
62
|
+
/**
|
|
63
|
+
* Resource type
|
|
64
|
+
*/
|
|
65
|
+
type: string;
|
|
66
|
+
}
|
|
67
|
+
namespace Data {
|
|
68
|
+
/**
|
|
69
|
+
* Resource attributes
|
|
70
|
+
*/
|
|
71
|
+
interface Attributes {
|
|
72
|
+
/**
|
|
73
|
+
* When this invitation was accepted
|
|
74
|
+
*/
|
|
75
|
+
acceptedAt: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* When this invitation was created
|
|
78
|
+
*/
|
|
79
|
+
createdAt: string;
|
|
80
|
+
/**
|
|
81
|
+
* Invitee email address
|
|
82
|
+
*/
|
|
83
|
+
email: string;
|
|
84
|
+
/**
|
|
85
|
+
* When this invitation expires
|
|
86
|
+
*/
|
|
87
|
+
expiresAt: string;
|
|
88
|
+
/**
|
|
89
|
+
* Role assigned on acceptance
|
|
90
|
+
*/
|
|
91
|
+
role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
|
|
92
|
+
/**
|
|
93
|
+
* Invitation status
|
|
94
|
+
*/
|
|
95
|
+
status: 'PENDING' | 'ACCEPTED' | 'REVOKED';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Batch invitation metadata
|
|
100
|
+
*/
|
|
101
|
+
interface Meta {
|
|
102
|
+
/**
|
|
103
|
+
* Failed invitation attempts with error details
|
|
104
|
+
*/
|
|
105
|
+
failed: Array<Meta.Failed>;
|
|
106
|
+
}
|
|
107
|
+
namespace Meta {
|
|
108
|
+
/**
|
|
109
|
+
* Failed invitation result
|
|
110
|
+
*/
|
|
111
|
+
interface Failed {
|
|
112
|
+
/**
|
|
113
|
+
* Email address that was invited
|
|
114
|
+
*/
|
|
115
|
+
email: string;
|
|
116
|
+
/**
|
|
117
|
+
* Error message for failed invitation
|
|
118
|
+
*/
|
|
119
|
+
error: string;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export interface InvitationListResponse {
|
|
124
|
+
data: Array<InvitationListResponse.Data>;
|
|
125
|
+
meta: InvitationListResponse.Meta;
|
|
126
|
+
}
|
|
127
|
+
export declare namespace InvitationListResponse {
|
|
128
|
+
interface Data {
|
|
129
|
+
/**
|
|
130
|
+
* Invitation ID (inv_xxx)
|
|
131
|
+
*/
|
|
132
|
+
id: string;
|
|
133
|
+
/**
|
|
134
|
+
* Resource attributes
|
|
135
|
+
*/
|
|
136
|
+
attributes: Data.Attributes;
|
|
137
|
+
/**
|
|
138
|
+
* Resource type
|
|
139
|
+
*/
|
|
140
|
+
type: string;
|
|
141
|
+
}
|
|
142
|
+
namespace Data {
|
|
143
|
+
/**
|
|
144
|
+
* Resource attributes
|
|
145
|
+
*/
|
|
146
|
+
interface Attributes {
|
|
147
|
+
/**
|
|
148
|
+
* When this invitation was accepted
|
|
149
|
+
*/
|
|
150
|
+
acceptedAt: string | null;
|
|
151
|
+
/**
|
|
152
|
+
* When this invitation was created
|
|
153
|
+
*/
|
|
154
|
+
createdAt: string;
|
|
155
|
+
/**
|
|
156
|
+
* Invitee email address
|
|
157
|
+
*/
|
|
158
|
+
email: string;
|
|
159
|
+
/**
|
|
160
|
+
* When this invitation expires
|
|
161
|
+
*/
|
|
162
|
+
expiresAt: string;
|
|
163
|
+
/**
|
|
164
|
+
* Role assigned on acceptance
|
|
165
|
+
*/
|
|
166
|
+
role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
|
|
167
|
+
/**
|
|
168
|
+
* Invitation status
|
|
169
|
+
*/
|
|
170
|
+
status: 'PENDING' | 'ACCEPTED' | 'REVOKED';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
interface Meta {
|
|
174
|
+
pagination: Meta.Pagination;
|
|
175
|
+
}
|
|
176
|
+
namespace Meta {
|
|
177
|
+
interface Pagination {
|
|
178
|
+
hasMore: boolean;
|
|
179
|
+
nextCursor: string | null;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
export interface InvitationRevokeResponse {
|
|
184
|
+
data: InvitationRevokeResponse.Data;
|
|
185
|
+
}
|
|
186
|
+
export declare namespace InvitationRevokeResponse {
|
|
187
|
+
interface Data {
|
|
188
|
+
/**
|
|
189
|
+
* Invitation ID (inv_xxx)
|
|
190
|
+
*/
|
|
191
|
+
id: string;
|
|
192
|
+
/**
|
|
193
|
+
* Resource attributes
|
|
194
|
+
*/
|
|
195
|
+
attributes: Data.Attributes;
|
|
196
|
+
/**
|
|
197
|
+
* Resource type
|
|
198
|
+
*/
|
|
199
|
+
type: string;
|
|
200
|
+
}
|
|
201
|
+
namespace Data {
|
|
202
|
+
/**
|
|
203
|
+
* Resource attributes
|
|
204
|
+
*/
|
|
205
|
+
interface Attributes {
|
|
206
|
+
/**
|
|
207
|
+
* When this invitation was accepted
|
|
208
|
+
*/
|
|
209
|
+
acceptedAt: string | null;
|
|
210
|
+
/**
|
|
211
|
+
* When this invitation was created
|
|
212
|
+
*/
|
|
213
|
+
createdAt: string;
|
|
214
|
+
/**
|
|
215
|
+
* Invitee email address
|
|
216
|
+
*/
|
|
217
|
+
email: string;
|
|
218
|
+
/**
|
|
219
|
+
* When this invitation expires
|
|
220
|
+
*/
|
|
221
|
+
expiresAt: string;
|
|
222
|
+
/**
|
|
223
|
+
* Role assigned on acceptance
|
|
224
|
+
*/
|
|
225
|
+
role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
|
|
226
|
+
/**
|
|
227
|
+
* Invitation status
|
|
228
|
+
*/
|
|
229
|
+
status: 'PENDING' | 'ACCEPTED' | 'REVOKED';
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
export interface InvitationCreateParams {
|
|
234
|
+
/**
|
|
235
|
+
* Body param: List of invitations to create (max 100)
|
|
236
|
+
*/
|
|
237
|
+
invitations: Array<InvitationCreateParams.Invitation>;
|
|
238
|
+
/**
|
|
239
|
+
* Body param: Days until invitation expires (1-30)
|
|
240
|
+
*/
|
|
241
|
+
expiresInDays?: number;
|
|
242
|
+
/**
|
|
243
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
244
|
+
*/
|
|
245
|
+
'X-Agent-ID'?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
248
|
+
* for agent observability.
|
|
249
|
+
*/
|
|
250
|
+
'X-Instance-ID'?: string;
|
|
251
|
+
}
|
|
252
|
+
export declare namespace InvitationCreateParams {
|
|
253
|
+
/**
|
|
254
|
+
* Single invitation in batch request
|
|
255
|
+
*/
|
|
256
|
+
interface Invitation {
|
|
257
|
+
/**
|
|
258
|
+
* Email address to invite
|
|
259
|
+
*/
|
|
260
|
+
email: string;
|
|
261
|
+
/**
|
|
262
|
+
* Role to assign on acceptance
|
|
263
|
+
*/
|
|
264
|
+
role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
export interface InvitationListParams {
|
|
268
|
+
/**
|
|
269
|
+
* Query param: Filter by email
|
|
270
|
+
*/
|
|
271
|
+
email?: string;
|
|
272
|
+
/**
|
|
273
|
+
* Query param: Filter by party
|
|
274
|
+
*/
|
|
275
|
+
partyId?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Query param: Filter by status
|
|
278
|
+
*/
|
|
279
|
+
status?: 'PENDING' | 'ACCEPTED' | 'REVOKED';
|
|
280
|
+
/**
|
|
281
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
282
|
+
*/
|
|
283
|
+
'X-Agent-ID'?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
286
|
+
* for agent observability.
|
|
287
|
+
*/
|
|
288
|
+
'X-Instance-ID'?: string;
|
|
289
|
+
}
|
|
290
|
+
export interface InvitationRevokeParams {
|
|
291
|
+
/**
|
|
292
|
+
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
293
|
+
*/
|
|
294
|
+
'X-Agent-ID'?: string;
|
|
295
|
+
/**
|
|
296
|
+
* Required when X-Agent-ID is present. Session or conversation ID for agent
|
|
297
|
+
* observability.
|
|
298
|
+
*/
|
|
299
|
+
'X-Instance-ID'?: string;
|
|
300
|
+
}
|
|
301
|
+
export declare namespace Invitations {
|
|
302
|
+
export { type InvitationCreateResponse as InvitationCreateResponse, type InvitationListResponse as InvitationListResponse, type InvitationRevokeResponse as InvitationRevokeResponse, type InvitationCreateParams as InvitationCreateParams, type InvitationListParams as InvitationListParams, type InvitationRevokeParams as InvitationRevokeParams, };
|
|
303
|
+
}
|
|
304
|
+
//# sourceMappingURL=invitations.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitations.d.mts","sourceRoot":"","sources":["../src/resources/invitations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAetG;;;;;;;OAOG;IACH,IAAI,CACF,MAAM,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAerC;;;;;;;;;OASG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,MAAM,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;CAaxC;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAE3C;;OAEG;IACH,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAC;CACrC;AAED,yBAAiB,wBAAwB,CAAC;IACxC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC;QAE5B;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,IAAI,CAAC;QACpB;;WAEG;QACH,UAAiB,UAAU;YACzB;;eAEG;YACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;YAE1B;;eAEG;YACH,SAAS,EAAE,MAAM,CAA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;QAEd;;WAEG;QACH,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;KAC/C;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAE5C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,304 @@
|
|
|
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
|
+
* Party invitation management
|
|
6
|
+
*/
|
|
7
|
+
export declare class Invitations extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create one or more invitations to join the authenticated user's party.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const invitation = await client.invitations.create({
|
|
14
|
+
* invitations: [
|
|
15
|
+
* { email: 'dev@stainless.com', role: 'OWNER' },
|
|
16
|
+
* ],
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(params: InvitationCreateParams, options?: RequestOptions): APIPromise<InvitationCreateResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* List invitations with optional filters by party, email, or status.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const invitations = await client.invitations.list();
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
list(params?: InvitationListParams | null | undefined, options?: RequestOptions): APIPromise<InvitationListResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Revoke a pending invitation so it can no longer be accepted.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.invitations.revoke(
|
|
36
|
+
* 'invitationId',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
revoke(invitationID: string, params?: InvitationRevokeParams | null | undefined, options?: RequestOptions): APIPromise<InvitationRevokeResponse>;
|
|
41
|
+
}
|
|
42
|
+
export interface InvitationCreateResponse {
|
|
43
|
+
/**
|
|
44
|
+
* Successfully created invitation resources
|
|
45
|
+
*/
|
|
46
|
+
data: Array<InvitationCreateResponse.Data>;
|
|
47
|
+
/**
|
|
48
|
+
* Batch invitation metadata
|
|
49
|
+
*/
|
|
50
|
+
meta: InvitationCreateResponse.Meta;
|
|
51
|
+
}
|
|
52
|
+
export declare namespace InvitationCreateResponse {
|
|
53
|
+
interface Data {
|
|
54
|
+
/**
|
|
55
|
+
* Invitation ID (inv_xxx)
|
|
56
|
+
*/
|
|
57
|
+
id: string;
|
|
58
|
+
/**
|
|
59
|
+
* Resource attributes
|
|
60
|
+
*/
|
|
61
|
+
attributes: Data.Attributes;
|
|
62
|
+
/**
|
|
63
|
+
* Resource type
|
|
64
|
+
*/
|
|
65
|
+
type: string;
|
|
66
|
+
}
|
|
67
|
+
namespace Data {
|
|
68
|
+
/**
|
|
69
|
+
* Resource attributes
|
|
70
|
+
*/
|
|
71
|
+
interface Attributes {
|
|
72
|
+
/**
|
|
73
|
+
* When this invitation was accepted
|
|
74
|
+
*/
|
|
75
|
+
acceptedAt: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* When this invitation was created
|
|
78
|
+
*/
|
|
79
|
+
createdAt: string;
|
|
80
|
+
/**
|
|
81
|
+
* Invitee email address
|
|
82
|
+
*/
|
|
83
|
+
email: string;
|
|
84
|
+
/**
|
|
85
|
+
* When this invitation expires
|
|
86
|
+
*/
|
|
87
|
+
expiresAt: string;
|
|
88
|
+
/**
|
|
89
|
+
* Role assigned on acceptance
|
|
90
|
+
*/
|
|
91
|
+
role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
|
|
92
|
+
/**
|
|
93
|
+
* Invitation status
|
|
94
|
+
*/
|
|
95
|
+
status: 'PENDING' | 'ACCEPTED' | 'REVOKED';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Batch invitation metadata
|
|
100
|
+
*/
|
|
101
|
+
interface Meta {
|
|
102
|
+
/**
|
|
103
|
+
* Failed invitation attempts with error details
|
|
104
|
+
*/
|
|
105
|
+
failed: Array<Meta.Failed>;
|
|
106
|
+
}
|
|
107
|
+
namespace Meta {
|
|
108
|
+
/**
|
|
109
|
+
* Failed invitation result
|
|
110
|
+
*/
|
|
111
|
+
interface Failed {
|
|
112
|
+
/**
|
|
113
|
+
* Email address that was invited
|
|
114
|
+
*/
|
|
115
|
+
email: string;
|
|
116
|
+
/**
|
|
117
|
+
* Error message for failed invitation
|
|
118
|
+
*/
|
|
119
|
+
error: string;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export interface InvitationListResponse {
|
|
124
|
+
data: Array<InvitationListResponse.Data>;
|
|
125
|
+
meta: InvitationListResponse.Meta;
|
|
126
|
+
}
|
|
127
|
+
export declare namespace InvitationListResponse {
|
|
128
|
+
interface Data {
|
|
129
|
+
/**
|
|
130
|
+
* Invitation ID (inv_xxx)
|
|
131
|
+
*/
|
|
132
|
+
id: string;
|
|
133
|
+
/**
|
|
134
|
+
* Resource attributes
|
|
135
|
+
*/
|
|
136
|
+
attributes: Data.Attributes;
|
|
137
|
+
/**
|
|
138
|
+
* Resource type
|
|
139
|
+
*/
|
|
140
|
+
type: string;
|
|
141
|
+
}
|
|
142
|
+
namespace Data {
|
|
143
|
+
/**
|
|
144
|
+
* Resource attributes
|
|
145
|
+
*/
|
|
146
|
+
interface Attributes {
|
|
147
|
+
/**
|
|
148
|
+
* When this invitation was accepted
|
|
149
|
+
*/
|
|
150
|
+
acceptedAt: string | null;
|
|
151
|
+
/**
|
|
152
|
+
* When this invitation was created
|
|
153
|
+
*/
|
|
154
|
+
createdAt: string;
|
|
155
|
+
/**
|
|
156
|
+
* Invitee email address
|
|
157
|
+
*/
|
|
158
|
+
email: string;
|
|
159
|
+
/**
|
|
160
|
+
* When this invitation expires
|
|
161
|
+
*/
|
|
162
|
+
expiresAt: string;
|
|
163
|
+
/**
|
|
164
|
+
* Role assigned on acceptance
|
|
165
|
+
*/
|
|
166
|
+
role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
|
|
167
|
+
/**
|
|
168
|
+
* Invitation status
|
|
169
|
+
*/
|
|
170
|
+
status: 'PENDING' | 'ACCEPTED' | 'REVOKED';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
interface Meta {
|
|
174
|
+
pagination: Meta.Pagination;
|
|
175
|
+
}
|
|
176
|
+
namespace Meta {
|
|
177
|
+
interface Pagination {
|
|
178
|
+
hasMore: boolean;
|
|
179
|
+
nextCursor: string | null;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
export interface InvitationRevokeResponse {
|
|
184
|
+
data: InvitationRevokeResponse.Data;
|
|
185
|
+
}
|
|
186
|
+
export declare namespace InvitationRevokeResponse {
|
|
187
|
+
interface Data {
|
|
188
|
+
/**
|
|
189
|
+
* Invitation ID (inv_xxx)
|
|
190
|
+
*/
|
|
191
|
+
id: string;
|
|
192
|
+
/**
|
|
193
|
+
* Resource attributes
|
|
194
|
+
*/
|
|
195
|
+
attributes: Data.Attributes;
|
|
196
|
+
/**
|
|
197
|
+
* Resource type
|
|
198
|
+
*/
|
|
199
|
+
type: string;
|
|
200
|
+
}
|
|
201
|
+
namespace Data {
|
|
202
|
+
/**
|
|
203
|
+
* Resource attributes
|
|
204
|
+
*/
|
|
205
|
+
interface Attributes {
|
|
206
|
+
/**
|
|
207
|
+
* When this invitation was accepted
|
|
208
|
+
*/
|
|
209
|
+
acceptedAt: string | null;
|
|
210
|
+
/**
|
|
211
|
+
* When this invitation was created
|
|
212
|
+
*/
|
|
213
|
+
createdAt: string;
|
|
214
|
+
/**
|
|
215
|
+
* Invitee email address
|
|
216
|
+
*/
|
|
217
|
+
email: string;
|
|
218
|
+
/**
|
|
219
|
+
* When this invitation expires
|
|
220
|
+
*/
|
|
221
|
+
expiresAt: string;
|
|
222
|
+
/**
|
|
223
|
+
* Role assigned on acceptance
|
|
224
|
+
*/
|
|
225
|
+
role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
|
|
226
|
+
/**
|
|
227
|
+
* Invitation status
|
|
228
|
+
*/
|
|
229
|
+
status: 'PENDING' | 'ACCEPTED' | 'REVOKED';
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
export interface InvitationCreateParams {
|
|
234
|
+
/**
|
|
235
|
+
* Body param: List of invitations to create (max 100)
|
|
236
|
+
*/
|
|
237
|
+
invitations: Array<InvitationCreateParams.Invitation>;
|
|
238
|
+
/**
|
|
239
|
+
* Body param: Days until invitation expires (1-30)
|
|
240
|
+
*/
|
|
241
|
+
expiresInDays?: number;
|
|
242
|
+
/**
|
|
243
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
244
|
+
*/
|
|
245
|
+
'X-Agent-ID'?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
248
|
+
* for agent observability.
|
|
249
|
+
*/
|
|
250
|
+
'X-Instance-ID'?: string;
|
|
251
|
+
}
|
|
252
|
+
export declare namespace InvitationCreateParams {
|
|
253
|
+
/**
|
|
254
|
+
* Single invitation in batch request
|
|
255
|
+
*/
|
|
256
|
+
interface Invitation {
|
|
257
|
+
/**
|
|
258
|
+
* Email address to invite
|
|
259
|
+
*/
|
|
260
|
+
email: string;
|
|
261
|
+
/**
|
|
262
|
+
* Role to assign on acceptance
|
|
263
|
+
*/
|
|
264
|
+
role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
export interface InvitationListParams {
|
|
268
|
+
/**
|
|
269
|
+
* Query param: Filter by email
|
|
270
|
+
*/
|
|
271
|
+
email?: string;
|
|
272
|
+
/**
|
|
273
|
+
* Query param: Filter by party
|
|
274
|
+
*/
|
|
275
|
+
partyId?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Query param: Filter by status
|
|
278
|
+
*/
|
|
279
|
+
status?: 'PENDING' | 'ACCEPTED' | 'REVOKED';
|
|
280
|
+
/**
|
|
281
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
282
|
+
*/
|
|
283
|
+
'X-Agent-ID'?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
286
|
+
* for agent observability.
|
|
287
|
+
*/
|
|
288
|
+
'X-Instance-ID'?: string;
|
|
289
|
+
}
|
|
290
|
+
export interface InvitationRevokeParams {
|
|
291
|
+
/**
|
|
292
|
+
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
293
|
+
*/
|
|
294
|
+
'X-Agent-ID'?: string;
|
|
295
|
+
/**
|
|
296
|
+
* Required when X-Agent-ID is present. Session or conversation ID for agent
|
|
297
|
+
* observability.
|
|
298
|
+
*/
|
|
299
|
+
'X-Instance-ID'?: string;
|
|
300
|
+
}
|
|
301
|
+
export declare namespace Invitations {
|
|
302
|
+
export { type InvitationCreateResponse as InvitationCreateResponse, type InvitationListResponse as InvitationListResponse, type InvitationRevokeResponse as InvitationRevokeResponse, type InvitationCreateParams as InvitationCreateParams, type InvitationListParams as InvitationListParams, type InvitationRevokeParams as InvitationRevokeParams, };
|
|
303
|
+
}
|
|
304
|
+
//# sourceMappingURL=invitations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitations.d.ts","sourceRoot":"","sources":["../src/resources/invitations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAetG;;;;;;;OAOG;IACH,IAAI,CACF,MAAM,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAerC;;;;;;;;;OASG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,MAAM,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;CAaxC;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAE3C;;OAEG;IACH,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAC;CACrC;AAED,yBAAiB,wBAAwB,CAAC;IACxC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,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