@tolt/api 0.7.0 → 1.0.0
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/dist/BaseClient.js +1 -0
- package/dist/Client.d.ts +3 -3
- package/dist/Client.js +3 -3
- package/dist/api/errors/BadRequestError.d.ts +2 -2
- package/dist/api/errors/ConflictError.d.ts +2 -2
- package/dist/api/errors/ContentTooLargeError.d.ts +2 -2
- package/dist/api/errors/NotFoundError.d.ts +2 -2
- package/dist/api/errors/TooManyRequestsError.d.ts +2 -2
- package/dist/api/errors/UnauthorizedError.d.ts +2 -2
- package/dist/api/resources/clicks/client/Client.d.ts +10 -7
- package/dist/api/resources/clicks/client/Client.js +82 -68
- package/dist/api/resources/clicks/client/requests/CreateClickRequest.d.ts +28 -0
- package/dist/api/resources/clicks/client/requests/{GetClicksRequest.d.ts → GetClickRequest.d.ts} +1 -1
- package/dist/api/resources/clicks/client/requests/index.d.ts +2 -1
- package/dist/api/resources/clicks/types/{CreateClicksResponse.d.ts → CreateClickResponse.d.ts} +1 -1
- package/dist/api/resources/clicks/types/{GetClicksResponse.d.ts → GetClickResponse.d.ts} +1 -1
- package/dist/api/resources/clicks/types/index.d.ts +2 -3
- package/dist/api/resources/clicks/types/index.js +2 -3
- package/dist/api/resources/commissions/client/Client.d.ts +19 -15
- package/dist/api/resources/commissions/client/Client.js +94 -76
- package/dist/api/resources/commissions/client/requests/{DeleteCommissionsRequest.d.ts → ApproveCommissionRequest.d.ts} +1 -1
- package/dist/api/resources/commissions/client/requests/CreateCommissionRequest.d.ts +40 -0
- package/dist/api/resources/commissions/client/requests/CreateCommissionRequest.js +9 -0
- package/dist/api/resources/commissions/client/requests/{DeclineCommissionsRequest.d.ts → DeclineCommissionRequest.d.ts} +1 -1
- package/dist/api/resources/commissions/client/requests/{ApproveCommissionsRequest.d.ts → DeleteCommissionRequest.d.ts} +1 -1
- package/dist/api/resources/commissions/client/requests/{GetCommissionsRequest.d.ts → GetCommissionRequest.d.ts} +1 -1
- package/dist/api/resources/commissions/client/requests/{UpdateCommissionsRequest.d.ts → UpdateCommissionRequest.d.ts} +3 -3
- package/dist/api/resources/commissions/client/requests/UpdateCommissionRequest.js +9 -0
- package/dist/api/resources/commissions/client/requests/index.d.ts +6 -5
- package/dist/api/resources/commissions/client/requests/index.js +2 -1
- package/dist/api/resources/commissions/types/{UpdateCommissionsResponse.d.ts → ApproveCommissionResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/{DeleteCommissionsResponse.d.ts → CreateCommissionResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/{CreateCommissionsResponse.d.ts → DeclineCommissionResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/DeleteCommissionResponse.d.ts +6 -0
- package/dist/api/resources/commissions/types/{GetCommissionsResponse.d.ts → GetCommissionResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/UpdateCommissionResponse.d.ts +6 -0
- package/dist/api/resources/commissions/types/index.d.ts +6 -7
- package/dist/api/resources/commissions/types/index.js +6 -7
- package/dist/api/resources/customers/client/Client.d.ts +9 -10
- package/dist/api/resources/customers/client/Client.js +84 -71
- package/dist/api/resources/customers/client/requests/{CreateCustomersRequest.d.ts → CreateCustomerRequest.d.ts} +3 -3
- package/dist/api/resources/customers/client/requests/{CreateCustomersRequest.js → CreateCustomerRequest.js} +4 -4
- package/dist/api/resources/customers/client/requests/{DeleteCustomersRequest.d.ts → DeleteCustomerRequest.d.ts} +1 -1
- package/dist/api/resources/customers/client/requests/{GetCustomersRequest.d.ts → GetCustomerRequest.d.ts} +1 -1
- package/dist/api/resources/customers/client/requests/{UpdateCustomersRequest.d.ts → UpdateCustomerRequest.d.ts} +3 -3
- package/dist/api/resources/customers/client/requests/{UpdateCustomersRequest.js → UpdateCustomerRequest.js} +4 -4
- package/dist/api/resources/customers/client/requests/index.d.ts +4 -4
- package/dist/api/resources/customers/client/requests/index.js +2 -2
- package/dist/api/resources/customers/types/{DeleteCustomersResponse.d.ts → CreateCustomerResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/{UpdateCustomersResponse.d.ts → DeleteCustomerResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/{GetCustomersResponse.d.ts → GetCustomerResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/{CreateCustomersResponse.d.ts → UpdateCustomerResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/index.d.ts +4 -4
- package/dist/api/resources/customers/types/index.js +4 -4
- package/dist/api/resources/{embed → embedTokens}/client/Client.d.ts +9 -11
- package/dist/api/resources/{embed → embedTokens}/client/Client.js +7 -9
- package/dist/api/resources/embedTokens/client/index.d.ts +1 -0
- package/dist/api/resources/embedTokens/client/index.js +1 -0
- package/dist/api/resources/embedTokens/client/requests/CreateEmbedTokenRequest.d.ts +21 -0
- package/dist/api/resources/embedTokens/client/requests/index.d.ts +1 -0
- package/dist/api/resources/embedTokens/exports.d.ts +2 -0
- package/dist/api/resources/{embed → embedTokens}/exports.js +1 -1
- package/dist/api/resources/{embed/types/CreateTokenEmbedResponse.d.ts → embedTokens/types/CreateEmbedTokenResponse.d.ts} +1 -1
- package/dist/api/resources/embedTokens/types/index.d.ts +1 -0
- package/dist/api/resources/embedTokens/types/index.js +1 -0
- package/dist/api/resources/flows/client/Client.d.ts +3 -4
- package/dist/api/resources/flows/client/Client.js +74 -64
- package/dist/api/resources/flows/client/requests/{GetFlowsRequest.d.ts → GetFlowRequest.d.ts} +1 -1
- package/dist/api/resources/flows/client/requests/ListFlowsRequest.d.ts +1 -1
- package/dist/api/resources/flows/client/requests/index.d.ts +1 -1
- package/dist/api/resources/flows/types/{GetFlowsResponse.d.ts → GetFlowResponse.d.ts} +1 -1
- package/dist/api/resources/flows/types/index.d.ts +1 -2
- package/dist/api/resources/flows/types/index.js +1 -2
- package/dist/api/resources/groups/client/Client.d.ts +3 -4
- package/dist/api/resources/groups/client/Client.js +71 -61
- package/dist/api/resources/groups/client/requests/{GetGroupsRequest.d.ts → GetGroupRequest.d.ts} +1 -1
- package/dist/api/resources/groups/client/requests/ListGroupsRequest.d.ts +1 -1
- package/dist/api/resources/groups/client/requests/index.d.ts +1 -1
- package/dist/api/resources/groups/types/{GetGroupsResponse.d.ts → GetGroupResponse.d.ts} +1 -1
- package/dist/api/resources/groups/types/index.d.ts +1 -2
- package/dist/api/resources/groups/types/index.js +1 -2
- package/dist/api/resources/index.d.ts +3 -2
- package/dist/api/resources/index.js +3 -2
- package/dist/api/resources/links/client/Client.d.ts +11 -12
- package/dist/api/resources/links/client/Client.js +80 -70
- package/dist/api/resources/links/client/requests/{CreateLinksRequest.d.ts → CreateLinkRequest.d.ts} +1 -1
- package/dist/api/resources/links/client/requests/{DeleteLinksRequest.d.ts → DeleteLinkRequest.d.ts} +1 -1
- package/dist/api/resources/links/client/requests/{GetByParamValueLinksRequest.d.ts → GetLinkByParamValueRequest.d.ts} +1 -1
- package/dist/api/resources/links/client/requests/{GetLinksRequest.d.ts → GetLinkRequest.d.ts} +1 -1
- package/dist/api/resources/links/client/requests/{UpdateLinksRequest.d.ts → UpdateLinkRequest.d.ts} +1 -1
- package/dist/api/resources/links/client/requests/index.d.ts +5 -5
- package/dist/api/resources/links/types/{DeleteLinksResponse.d.ts → CreateLinkResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/{CreateLinksResponse.d.ts → DeleteLinkResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/GetLinkByParamValueResponse.d.ts +6 -0
- package/dist/api/resources/links/types/{GetLinksResponse.d.ts → GetLinkResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/{UpdateLinksResponse.d.ts → UpdateLinkResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/index.d.ts +5 -5
- package/dist/api/resources/links/types/index.js +5 -5
- package/dist/api/resources/partners/client/Client.d.ts +13 -14
- package/dist/api/resources/partners/client/Client.js +82 -72
- package/dist/api/resources/partners/client/requests/{ApprovePartnersRequest.d.ts → ApprovePartnerRequest.d.ts} +1 -1
- package/dist/api/resources/partners/client/requests/{CreatePartnersRequest.d.ts → CreatePartnerRequest.d.ts} +4 -4
- package/dist/api/resources/partners/client/requests/{CreatePartnersRequest.js → CreatePartnerRequest.js} +4 -4
- package/dist/api/resources/partners/client/requests/{GetPartnersRequest.d.ts → GetPartnerRequest.d.ts} +1 -1
- package/dist/api/resources/partners/client/requests/{RejectPartnersRequest.d.ts → RejectPartnerRequest.d.ts} +1 -1
- package/dist/api/resources/partners/client/requests/{SuspendPartnersRequest.d.ts → SuspendPartnerRequest.d.ts} +1 -1
- package/dist/api/resources/partners/client/requests/{UpdatePartnersRequest.d.ts → UpdatePartnerRequest.d.ts} +1 -1
- package/dist/api/resources/partners/client/requests/index.d.ts +6 -6
- package/dist/api/resources/partners/client/requests/index.js +1 -1
- package/dist/api/resources/partners/types/{RejectPartnersResponse.d.ts → ApprovePartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{CreatePartnersResponse.d.ts → CreatePartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{GetPartnersResponse.d.ts → GetPartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{UpdatePartnersResponse.d.ts → RejectPartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{ApprovePartnersResponse.d.ts → SuspendPartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{SuspendPartnersResponse.d.ts → UpdatePartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/index.d.ts +6 -6
- package/dist/api/resources/partners/types/index.js +6 -6
- package/dist/api/resources/programs/client/Client.d.ts +3 -4
- package/dist/api/resources/programs/client/Client.js +69 -59
- package/dist/api/resources/programs/client/requests/{GetProgramsRequest.d.ts → GetProgramRequest.d.ts} +1 -1
- package/dist/api/resources/programs/client/requests/index.d.ts +1 -1
- package/dist/api/resources/programs/types/{GetProgramsResponse.d.ts → GetProgramResponse.d.ts} +1 -1
- package/dist/api/resources/programs/types/index.d.ts +1 -1
- package/dist/api/resources/programs/types/index.js +1 -1
- package/dist/api/resources/promotionCodes/client/Client.d.ts +9 -10
- package/dist/api/resources/promotionCodes/client/Client.js +81 -68
- package/dist/api/resources/promotionCodes/client/requests/{CreatePromotionCodesRequest.d.ts → CreatePromotionCodeRequest.d.ts} +3 -3
- package/dist/api/resources/promotionCodes/client/requests/{CreatePromotionCodesRequest.js → CreatePromotionCodeRequest.js} +4 -4
- package/dist/api/resources/promotionCodes/client/requests/{DeletePromotionCodesRequest.d.ts → DeletePromotionCodeRequest.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/client/requests/{GetPromotionCodesRequest.d.ts → GetPromotionCodeRequest.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/client/requests/{UpdatePromotionCodesRequest.d.ts → UpdatePromotionCodeRequest.d.ts} +3 -3
- package/dist/api/resources/promotionCodes/client/requests/{UpdatePromotionCodesRequest.js → UpdatePromotionCodeRequest.js} +4 -4
- package/dist/api/resources/promotionCodes/client/requests/index.d.ts +4 -4
- package/dist/api/resources/promotionCodes/client/requests/index.js +2 -2
- package/dist/api/resources/promotionCodes/types/{CreatePromotionCodesResponse.d.ts → CreatePromotionCodeResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/{DeletePromotionCodesResponse.d.ts → DeletePromotionCodeResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/{GetPromotionCodesResponse.d.ts → GetPromotionCodeResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/{UpdatePromotionCodesResponse.d.ts → UpdatePromotionCodeResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/index.d.ts +4 -4
- package/dist/api/resources/promotionCodes/types/index.js +4 -4
- package/dist/api/resources/reports/client/Client.d.ts +12 -14
- package/dist/api/resources/reports/client/Client.js +158 -119
- package/dist/api/resources/reports/client/requests/{CustomerStatsReportsRequest.d.ts → ReportsCustomersRequest.d.ts} +1 -1
- package/dist/api/resources/reports/client/requests/{LinksReportsRequest.d.ts → ReportsLinksRequest.d.ts} +1 -1
- package/dist/api/resources/reports/client/requests/{OverviewReportsRequest.d.ts → ReportsOverviewRequest.d.ts} +1 -1
- package/dist/api/resources/reports/client/requests/{PartnersReportsRequest.d.ts → ReportsPartnersRequest.d.ts} +1 -1
- package/dist/api/resources/reports/client/requests/{TimeseriesReportsRequest.d.ts → ReportsTimeseriesRequest.d.ts} +1 -1
- package/dist/api/resources/reports/client/requests/index.d.ts +5 -5
- package/dist/api/resources/reports/types/{CustomerStatsReportsResponse.d.ts → ReportsCustomersResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/{LinksReportsResponse.d.ts → ReportsLinksResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/{OverviewReportsResponse.d.ts → ReportsOverviewResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/{PartnersReportsResponse.d.ts → ReportsPartnersResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/{TimeseriesReportsResponse.d.ts → ReportsTimeseriesResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/index.d.ts +5 -5
- package/dist/api/resources/reports/types/index.js +5 -5
- package/dist/api/resources/transactions/client/Client.d.ts +13 -14
- package/dist/api/resources/transactions/client/Client.js +87 -74
- package/dist/api/resources/transactions/client/requests/{CreateTransactionsRequest.d.ts → CreateTransactionRequest.d.ts} +1 -1
- package/dist/api/resources/transactions/client/requests/{DeleteTransactionsRequest.d.ts → DeleteTransactionRequest.d.ts} +1 -1
- package/dist/api/resources/transactions/client/requests/{GetTransactionsRequest.d.ts → GetTransactionRequest.d.ts} +1 -1
- package/dist/api/resources/transactions/client/requests/{RefundTransactionsRequest.d.ts → RefundTransactionRequest.d.ts} +1 -1
- package/dist/api/resources/transactions/client/requests/{RerunFlowsTransactionsRequest.d.ts → RerunTransactionFlowsRequest.d.ts} +1 -1
- package/dist/api/resources/transactions/client/requests/{UpdateTransactionsRequest.d.ts → UpdateTransactionRequest.d.ts} +1 -1
- package/dist/api/resources/transactions/client/requests/index.d.ts +6 -6
- package/dist/api/resources/transactions/types/{CreateTransactionsResponse.d.ts → CreateTransactionResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{DeleteTransactionsResponse.d.ts → DeleteTransactionResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{GetTransactionsResponse.d.ts → GetTransactionResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{RefundTransactionsResponse.d.ts → RefundTransactionResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{RerunFlowsTransactionsResponse.d.ts → RerunTransactionFlowsResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/UpdateTransactionResponse.d.ts +6 -0
- package/dist/api/resources/transactions/types/index.d.ts +6 -6
- package/dist/api/resources/transactions/types/index.js +6 -6
- package/dist/api/types/{Error_.d.ts → ErrorResponse.d.ts} +4 -4
- package/dist/api/types/{Error_.js → ErrorResponse.js} +4 -4
- package/dist/api/types/index.d.ts +1 -1
- package/dist/api/types/index.js +1 -1
- package/dist/core/exports.d.ts +1 -0
- package/dist/core/exports.js +1 -0
- package/dist/core/fetcher/Fetcher.js +35 -4
- package/dist/core/fetcher/getErrorResponseBody.js +21 -8
- package/dist/core/fetcher/getResponseBody.d.ts +16 -0
- package/dist/core/fetcher/getResponseBody.js +26 -22
- package/dist/core/fetcher/makePassthroughRequest.js +18 -2
- package/dist/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/core/fetcher/makeRequest.js +45 -13
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +23 -2
- package/dist/core/fetcher/signals.d.ts +1 -0
- package/dist/core/fetcher/signals.js +1 -1
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +2 -0
- package/dist/core/pagination/Page.d.ts +33 -0
- package/dist/core/pagination/Page.js +49 -0
- package/dist/core/pagination/exports.d.ts +1 -0
- package/dist/core/pagination/index.d.ts +1 -0
- package/dist/core/pagination/index.js +1 -0
- package/dist/core/url/encodePathParam.d.ts +3 -1
- package/dist/core/url/encodePathParam.js +8 -2
- package/dist/core/utils/index.d.ts +1 -0
- package/dist/core/utils/index.js +1 -0
- package/dist/core/utils/setObjectProperty.d.ts +12 -0
- package/dist/core/utils/setObjectProperty.js +45 -0
- package/dist/errors/ToltApiError.js +15 -1
- package/package.json +7 -2
- package/dist/api/resources/clicks/types/CreateClicksRequest.d.ts +0 -1
- package/dist/api/resources/commissions/client/requests/UpdateCommissionsRequest.js +0 -9
- package/dist/api/resources/commissions/types/ApproveCommissionsResponse.d.ts +0 -6
- package/dist/api/resources/commissions/types/CreateCommissionsRequest.d.ts +0 -1
- package/dist/api/resources/commissions/types/DeclineCommissionsResponse.d.ts +0 -6
- package/dist/api/resources/embed/exports.d.ts +0 -2
- package/dist/api/resources/embed/types/CreateTokenEmbedRequest.d.ts +0 -1
- package/dist/api/resources/embed/types/index.d.ts +0 -2
- package/dist/api/resources/embed/types/index.js +0 -2
- package/dist/api/resources/flows/types/ListFlowsRequestActive.d.ts +0 -6
- package/dist/api/resources/flows/types/ListFlowsRequestActive.js +0 -6
- package/dist/api/resources/groups/types/ListGroupsRequestDefault.d.ts +0 -6
- package/dist/api/resources/groups/types/ListGroupsRequestDefault.js +0 -6
- package/dist/api/resources/links/types/GetByParamValueLinksResponse.d.ts +0 -6
- package/dist/api/resources/transactions/types/UpdateTransactionsResponse.d.ts +0 -6
- package/dist/api/resources/transactions/types/UpdateTransactionsResponse.js +0 -2
- /package/dist/api/resources/clicks/client/requests/{GetClicksRequest.js → CreateClickRequest.js} +0 -0
- /package/dist/api/resources/clicks/{types/CreateClicksRequest.js → client/requests/GetClickRequest.js} +0 -0
- /package/dist/api/resources/clicks/types/{CreateClicksResponse.js → CreateClickResponse.js} +0 -0
- /package/dist/api/resources/clicks/types/{GetClicksResponse.js → GetClickResponse.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{ApproveCommissionsRequest.js → ApproveCommissionRequest.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{DeclineCommissionsRequest.js → DeclineCommissionRequest.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{DeleteCommissionsRequest.js → DeleteCommissionRequest.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{GetCommissionsRequest.js → GetCommissionRequest.js} +0 -0
- /package/dist/api/resources/commissions/types/{ApproveCommissionsResponse.js → ApproveCommissionResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{CreateCommissionsRequest.js → CreateCommissionResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{CreateCommissionsResponse.js → DeclineCommissionResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{DeclineCommissionsResponse.js → DeleteCommissionResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{DeleteCommissionsResponse.js → GetCommissionResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{GetCommissionsResponse.js → UpdateCommissionResponse.js} +0 -0
- /package/dist/api/resources/{commissions/types/UpdateCommissionsResponse.js → customers/client/requests/DeleteCustomerRequest.js} +0 -0
- /package/dist/api/resources/customers/client/requests/{DeleteCustomersRequest.js → GetCustomerRequest.js} +0 -0
- /package/dist/api/resources/customers/{client/requests/GetCustomersRequest.js → types/CreateCustomerResponse.js} +0 -0
- /package/dist/api/resources/customers/types/{CreateCustomersResponse.js → DeleteCustomerResponse.js} +0 -0
- /package/dist/api/resources/customers/types/{DeleteCustomersResponse.js → GetCustomerResponse.js} +0 -0
- /package/dist/api/resources/customers/types/{GetCustomersResponse.js → UpdateCustomerResponse.js} +0 -0
- /package/dist/api/resources/{customers/types/UpdateCustomersResponse.js → embedTokens/client/requests/CreateEmbedTokenRequest.js} +0 -0
- /package/dist/api/resources/{embed/client → embedTokens/client/requests}/index.js +0 -0
- /package/dist/api/resources/{embed → embedTokens}/index.d.ts +0 -0
- /package/dist/api/resources/{embed → embedTokens}/index.js +0 -0
- /package/dist/api/resources/{embed/types/CreateTokenEmbedRequest.js → embedTokens/types/CreateEmbedTokenResponse.js} +0 -0
- /package/dist/api/resources/{embed/types/CreateTokenEmbedResponse.js → flows/client/requests/GetFlowRequest.js} +0 -0
- /package/dist/api/resources/flows/{client/requests/GetFlowsRequest.js → types/GetFlowResponse.js} +0 -0
- /package/dist/api/resources/{flows/types/GetFlowsResponse.js → groups/client/requests/GetGroupRequest.js} +0 -0
- /package/dist/api/resources/groups/{client/requests/GetGroupsRequest.js → types/GetGroupResponse.js} +0 -0
- /package/dist/api/resources/{groups/types/GetGroupsResponse.js → links/client/requests/CreateLinkRequest.js} +0 -0
- /package/dist/api/resources/links/client/requests/{CreateLinksRequest.js → DeleteLinkRequest.js} +0 -0
- /package/dist/api/resources/links/client/requests/{DeleteLinksRequest.js → GetLinkByParamValueRequest.js} +0 -0
- /package/dist/api/resources/links/client/requests/{GetByParamValueLinksRequest.js → GetLinkRequest.js} +0 -0
- /package/dist/api/resources/links/client/requests/{GetLinksRequest.js → UpdateLinkRequest.js} +0 -0
- /package/dist/api/resources/links/{client/requests/UpdateLinksRequest.js → types/CreateLinkResponse.js} +0 -0
- /package/dist/api/resources/links/types/{CreateLinksResponse.js → DeleteLinkResponse.js} +0 -0
- /package/dist/api/resources/links/types/{DeleteLinksResponse.js → GetLinkByParamValueResponse.js} +0 -0
- /package/dist/api/resources/links/types/{GetByParamValueLinksResponse.js → GetLinkResponse.js} +0 -0
- /package/dist/api/resources/links/types/{GetLinksResponse.js → UpdateLinkResponse.js} +0 -0
- /package/dist/api/resources/{links/types/UpdateLinksResponse.js → partners/client/requests/ApprovePartnerRequest.js} +0 -0
- /package/dist/api/resources/partners/client/requests/{ApprovePartnersRequest.js → GetPartnerRequest.js} +0 -0
- /package/dist/api/resources/partners/client/requests/{GetPartnersRequest.js → RejectPartnerRequest.js} +0 -0
- /package/dist/api/resources/partners/client/requests/{RejectPartnersRequest.js → SuspendPartnerRequest.js} +0 -0
- /package/dist/api/resources/partners/client/requests/{SuspendPartnersRequest.js → UpdatePartnerRequest.js} +0 -0
- /package/dist/api/resources/partners/{client/requests/UpdatePartnersRequest.js → types/ApprovePartnerResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{ApprovePartnersResponse.js → CreatePartnerResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{CreatePartnersResponse.js → GetPartnerResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{GetPartnersResponse.js → RejectPartnerResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{RejectPartnersResponse.js → SuspendPartnerResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{SuspendPartnersResponse.js → UpdatePartnerResponse.js} +0 -0
- /package/dist/api/resources/{partners/types/UpdatePartnersResponse.js → programs/client/requests/GetProgramRequest.js} +0 -0
- /package/dist/api/resources/programs/{client/requests/GetProgramsRequest.js → types/GetProgramResponse.js} +0 -0
- /package/dist/api/resources/{programs/types/GetProgramsResponse.js → promotionCodes/client/requests/DeletePromotionCodeRequest.js} +0 -0
- /package/dist/api/resources/promotionCodes/client/requests/{DeletePromotionCodesRequest.js → GetPromotionCodeRequest.js} +0 -0
- /package/dist/api/resources/promotionCodes/{client/requests/GetPromotionCodesRequest.js → types/CreatePromotionCodeResponse.js} +0 -0
- /package/dist/api/resources/promotionCodes/types/{CreatePromotionCodesResponse.js → DeletePromotionCodeResponse.js} +0 -0
- /package/dist/api/resources/promotionCodes/types/{DeletePromotionCodesResponse.js → GetPromotionCodeResponse.js} +0 -0
- /package/dist/api/resources/promotionCodes/types/{GetPromotionCodesResponse.js → UpdatePromotionCodeResponse.js} +0 -0
- /package/dist/api/resources/{promotionCodes/types/UpdatePromotionCodesResponse.js → reports/client/requests/ReportsCustomersRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{CustomerStatsReportsRequest.js → ReportsLinksRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{LinksReportsRequest.js → ReportsOverviewRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{OverviewReportsRequest.js → ReportsPartnersRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{PartnersReportsRequest.js → ReportsTimeseriesRequest.js} +0 -0
- /package/dist/api/resources/reports/{client/requests/TimeseriesReportsRequest.js → types/ReportsCustomersResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{CustomerStatsReportsResponse.js → ReportsLinksResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{LinksReportsResponse.js → ReportsOverviewResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{OverviewReportsResponse.js → ReportsPartnersResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{PartnersReportsResponse.js → ReportsTimeseriesResponse.js} +0 -0
- /package/dist/api/resources/{reports/types/TimeseriesReportsResponse.js → transactions/client/requests/CreateTransactionRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{CreateTransactionsRequest.js → DeleteTransactionRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{DeleteTransactionsRequest.js → GetTransactionRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{GetTransactionsRequest.js → RefundTransactionRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{RefundTransactionsRequest.js → RerunTransactionFlowsRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{RerunFlowsTransactionsRequest.js → UpdateTransactionRequest.js} +0 -0
- /package/dist/api/resources/transactions/{client/requests/UpdateTransactionsRequest.js → types/CreateTransactionResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{CreateTransactionsResponse.js → DeleteTransactionResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{DeleteTransactionsResponse.js → GetTransactionResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{GetTransactionsResponse.js → RefundTransactionResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{RefundTransactionsResponse.js → RerunTransactionFlowsResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{RerunFlowsTransactionsResponse.js → UpdateTransactionResponse.js} +0 -0
- /package/dist/{api/resources/embed/client/index.d.ts → core/pagination/exports.js} +0 -0
|
@@ -27,73 +27,83 @@ export class LinksClient {
|
|
|
27
27
|
* @example
|
|
28
28
|
* await client.links.list()
|
|
29
29
|
*/
|
|
30
|
-
list(request = {}, requestOptions) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (_response.ok) {
|
|
71
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
72
|
-
}
|
|
73
|
-
if (_response.error.reason === "status-code") {
|
|
74
|
-
switch (_response.error.statusCode) {
|
|
75
|
-
case 400:
|
|
76
|
-
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
77
|
-
case 401:
|
|
78
|
-
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
79
|
-
case 413:
|
|
80
|
-
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
81
|
-
case 429:
|
|
82
|
-
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
83
|
-
default:
|
|
84
|
-
throw new errors.ToltApiError({
|
|
85
|
-
statusCode: _response.error.statusCode,
|
|
86
|
-
body: _response.error.body,
|
|
87
|
-
rawResponse: _response.rawResponse,
|
|
88
|
-
});
|
|
30
|
+
async list(request = {}, requestOptions) {
|
|
31
|
+
const list = core.HttpResponsePromise.interceptFunction(async (request) => {
|
|
32
|
+
const { limit, order, sort, starting_after: startingAfter, ending_before: endingBefore, created_after: createdAfter, created_before: createdBefore, updated_after: updatedAfter, updated_before: updatedBefore, program_id: programId, partner_id: partnerId, param, value, search, } = request;
|
|
33
|
+
const _queryParams = {
|
|
34
|
+
limit,
|
|
35
|
+
order: order != null ? order : undefined,
|
|
36
|
+
sort: sort != null ? sort : undefined,
|
|
37
|
+
starting_after: startingAfter,
|
|
38
|
+
ending_before: endingBefore,
|
|
39
|
+
created_after: createdAfter != null ? createdAfter : undefined,
|
|
40
|
+
created_before: createdBefore != null ? createdBefore : undefined,
|
|
41
|
+
updated_after: updatedAfter != null ? updatedAfter : undefined,
|
|
42
|
+
updated_before: updatedBefore != null ? updatedBefore : undefined,
|
|
43
|
+
program_id: programId,
|
|
44
|
+
partner_id: partnerId,
|
|
45
|
+
param,
|
|
46
|
+
value,
|
|
47
|
+
search,
|
|
48
|
+
};
|
|
49
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
50
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
51
|
+
const _response = await core.fetcher({
|
|
52
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
53
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
54
|
+
environments.ToltApiEnvironment.Default, "v2/links"),
|
|
55
|
+
method: "GET",
|
|
56
|
+
headers: _headers,
|
|
57
|
+
queryString: core.url
|
|
58
|
+
.queryBuilder()
|
|
59
|
+
.addMany(_queryParams)
|
|
60
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
61
|
+
.build(),
|
|
62
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
63
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
64
|
+
abortSignal: requestOptions?.abortSignal,
|
|
65
|
+
fetchFn: this._options?.fetch,
|
|
66
|
+
logging: this._options.logging,
|
|
67
|
+
});
|
|
68
|
+
if (_response.ok) {
|
|
69
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
89
70
|
}
|
|
90
|
-
|
|
91
|
-
|
|
71
|
+
if (_response.error.reason === "status-code") {
|
|
72
|
+
switch (_response.error.statusCode) {
|
|
73
|
+
case 400:
|
|
74
|
+
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
75
|
+
case 401:
|
|
76
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
77
|
+
case 413:
|
|
78
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
79
|
+
case 429:
|
|
80
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
81
|
+
default:
|
|
82
|
+
throw new errors.ToltApiError({
|
|
83
|
+
statusCode: _response.error.statusCode,
|
|
84
|
+
body: _response.error.body,
|
|
85
|
+
rawResponse: _response.rawResponse,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/links");
|
|
90
|
+
});
|
|
91
|
+
const dataWithRawResponse = await list(request).withRawResponse();
|
|
92
|
+
return new core.Page({
|
|
93
|
+
response: dataWithRawResponse.data,
|
|
94
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
95
|
+
hasNextPage: (response) => response?.next_cursor != null &&
|
|
96
|
+
!(typeof response?.next_cursor === "string" && response?.next_cursor === ""),
|
|
97
|
+
getItems: (response) => response?.data ?? [],
|
|
98
|
+
loadPage: (response) => {
|
|
99
|
+
return list(core.setObjectProperty(request, "starting_after", response?.next_cursor));
|
|
100
|
+
},
|
|
101
|
+
});
|
|
92
102
|
}
|
|
93
103
|
/**
|
|
94
104
|
* Creates a referral link for a partner. The value must be unique for its parameter, and param defaults to the program's.
|
|
95
105
|
*
|
|
96
|
-
* @param {ToltApi.
|
|
106
|
+
* @param {ToltApi.CreateLinkRequest} request
|
|
97
107
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
108
|
*
|
|
99
109
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -128,7 +138,7 @@ export class LinksClient {
|
|
|
128
138
|
requestType: "json",
|
|
129
139
|
body: mergeAdditionalBodyParameters(request, requestOptions?.additionalBodyParameters),
|
|
130
140
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
131
|
-
maxRetries:
|
|
141
|
+
maxRetries: 0,
|
|
132
142
|
abortSignal: requestOptions?.abortSignal,
|
|
133
143
|
fetchFn: this._options?.fetch,
|
|
134
144
|
logging: this._options.logging,
|
|
@@ -161,7 +171,7 @@ export class LinksClient {
|
|
|
161
171
|
/**
|
|
162
172
|
* Looks up a single link by its parameter and value (value matched case-insensitively). Returns 404 when none matches.
|
|
163
173
|
*
|
|
164
|
-
* @param {ToltApi.
|
|
174
|
+
* @param {ToltApi.GetLinkByParamValueRequest} request
|
|
165
175
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
166
176
|
*
|
|
167
177
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -234,7 +244,7 @@ export class LinksClient {
|
|
|
234
244
|
/**
|
|
235
245
|
* Gets an ordinary or campaign-managed link by ID.
|
|
236
246
|
*
|
|
237
|
-
* @param {ToltApi.
|
|
247
|
+
* @param {ToltApi.GetLinkRequest} request
|
|
238
248
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
239
249
|
*
|
|
240
250
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
@@ -259,7 +269,7 @@ export class LinksClient {
|
|
|
259
269
|
const _response = await core.fetcher({
|
|
260
270
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
261
271
|
(await core.Supplier.get(this._options.environment)) ??
|
|
262
|
-
environments.ToltApiEnvironment.Default, `v2/links/${core.url.encodePathParam(id)}`),
|
|
272
|
+
environments.ToltApiEnvironment.Default, `v2/links/${core.url.encodePathParam(id, errors.ToltApiError)}`),
|
|
263
273
|
method: "GET",
|
|
264
274
|
headers: _headers,
|
|
265
275
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
@@ -295,7 +305,7 @@ export class LinksClient {
|
|
|
295
305
|
/**
|
|
296
306
|
* Updates an ordinary link. Campaign-managed links must be changed through campaigns.
|
|
297
307
|
*
|
|
298
|
-
* @param {ToltApi.
|
|
308
|
+
* @param {ToltApi.UpdateLinkRequest} request
|
|
299
309
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
300
310
|
*
|
|
301
311
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -323,7 +333,7 @@ export class LinksClient {
|
|
|
323
333
|
const _response = await core.fetcher({
|
|
324
334
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
325
335
|
(await core.Supplier.get(this._options.environment)) ??
|
|
326
|
-
environments.ToltApiEnvironment.Default, `v2/links/${core.url.encodePathParam(id)}`),
|
|
336
|
+
environments.ToltApiEnvironment.Default, `v2/links/${core.url.encodePathParam(id, errors.ToltApiError)}`),
|
|
327
337
|
method: "PUT",
|
|
328
338
|
headers: _headers,
|
|
329
339
|
contentType: "application/json",
|
|
@@ -364,7 +374,7 @@ export class LinksClient {
|
|
|
364
374
|
/**
|
|
365
375
|
* Deletes an ordinary link. Campaign-managed links must be changed through campaigns.
|
|
366
376
|
*
|
|
367
|
-
* @param {ToltApi.
|
|
377
|
+
* @param {ToltApi.DeleteLinkRequest} request
|
|
368
378
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
369
379
|
*
|
|
370
380
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -390,7 +400,7 @@ export class LinksClient {
|
|
|
390
400
|
const _response = await core.fetcher({
|
|
391
401
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
392
402
|
(await core.Supplier.get(this._options.environment)) ??
|
|
393
|
-
environments.ToltApiEnvironment.Default, `v2/links/${core.url.encodePathParam(id)}`),
|
|
403
|
+
environments.ToltApiEnvironment.Default, `v2/links/${core.url.encodePathParam(id, errors.ToltApiError)}`),
|
|
394
404
|
method: "DELETE",
|
|
395
405
|
headers: _headers,
|
|
396
406
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
package/dist/api/resources/links/client/requests/{CreateLinksRequest.d.ts → CreateLinkRequest.d.ts}
RENAMED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* partner_id: "part_NLYzgNKuSuASvrvoxNtau6SY"
|
|
7
7
|
* }
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
9
|
+
export interface CreateLinkRequest {
|
|
10
10
|
/** Slug that identifies the partner in referral URLs, such as `sam` in `?ref=sam`, saved in lowercase. Pick one that no other link uses with the same parameter; a taken slug returns an error. */
|
|
11
11
|
value: string;
|
|
12
12
|
/** Query parameter of the link, e.g. `ref` in `?ref=sam`. Leave it out or send an empty string to use the program's first link parameter, which is what gets stored. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export type {
|
|
3
|
-
export type {
|
|
4
|
-
export type {
|
|
1
|
+
export type { CreateLinkRequest } from "./CreateLinkRequest.js";
|
|
2
|
+
export type { DeleteLinkRequest } from "./DeleteLinkRequest.js";
|
|
3
|
+
export type { GetLinkByParamValueRequest } from "./GetLinkByParamValueRequest.js";
|
|
4
|
+
export type { GetLinkRequest } from "./GetLinkRequest.js";
|
|
5
5
|
export type { ListLinksRequest } from "./ListLinksRequest.js";
|
|
6
|
-
export type {
|
|
6
|
+
export type { UpdateLinkRequest } from "./UpdateLinkRequest.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
1
|
+
export * from "./CreateLinkResponse.js";
|
|
2
|
+
export * from "./DeleteLinkResponse.js";
|
|
3
|
+
export * from "./GetLinkByParamValueResponse.js";
|
|
4
|
+
export * from "./GetLinkResponse.js";
|
|
5
5
|
export * from "./ListLinksRequestOrder.js";
|
|
6
6
|
export * from "./ListLinksRequestSort.js";
|
|
7
7
|
export * from "./ListLinksResponse.js";
|
|
8
|
-
export * from "./
|
|
8
|
+
export * from "./UpdateLinkResponse.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
1
|
+
export * from "./CreateLinkResponse.js";
|
|
2
|
+
export * from "./DeleteLinkResponse.js";
|
|
3
|
+
export * from "./GetLinkByParamValueResponse.js";
|
|
4
|
+
export * from "./GetLinkResponse.js";
|
|
5
5
|
export * from "./ListLinksRequestOrder.js";
|
|
6
6
|
export * from "./ListLinksRequestSort.js";
|
|
7
7
|
export * from "./ListLinksResponse.js";
|
|
8
|
-
export * from "./
|
|
8
|
+
export * from "./UpdateLinkResponse.js";
|
|
@@ -67,12 +67,11 @@ export declare class PartnersClient {
|
|
|
67
67
|
* @example
|
|
68
68
|
* await client.partners.list()
|
|
69
69
|
*/
|
|
70
|
-
list(request?: ToltApi.ListPartnersRequest, requestOptions?: PartnersClient.RequestOptions): core.
|
|
71
|
-
private __list;
|
|
70
|
+
list(request?: ToltApi.ListPartnersRequest, requestOptions?: PartnersClient.RequestOptions): Promise<core.Page<ToltApi.PartnerDetails, ToltApi.ListPartnersResponse>>;
|
|
72
71
|
/**
|
|
73
72
|
* Creates an onboarded partner together with their referral link. The link value defaults to a slug of the partner's name or email and the parameter to the program's first link parameter. Omit group_id to place the partner in the program's default group.
|
|
74
73
|
*
|
|
75
|
-
* @param {ToltApi.
|
|
74
|
+
* @param {ToltApi.CreatePartnerRequest} request
|
|
76
75
|
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
76
|
*
|
|
78
77
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -96,12 +95,12 @@ export declare class PartnersClient {
|
|
|
96
95
|
* }
|
|
97
96
|
* })
|
|
98
97
|
*/
|
|
99
|
-
create(request: ToltApi.
|
|
98
|
+
create(request: ToltApi.CreatePartnerRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.CreatePartnerResponse>;
|
|
100
99
|
private __create;
|
|
101
100
|
/**
|
|
102
101
|
* Gets a partner by ID, with their profile, status, group and program.
|
|
103
102
|
*
|
|
104
|
-
* @param {ToltApi.
|
|
103
|
+
* @param {ToltApi.GetPartnerRequest} request
|
|
105
104
|
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
106
105
|
*
|
|
107
106
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
@@ -116,12 +115,12 @@ export declare class PartnersClient {
|
|
|
116
115
|
* id: "part_NLYzgNKuSuASvrvoxNtau6SY"
|
|
117
116
|
* })
|
|
118
117
|
*/
|
|
119
|
-
get(request: ToltApi.
|
|
118
|
+
get(request: ToltApi.GetPartnerRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.GetPartnerResponse>;
|
|
120
119
|
private __get;
|
|
121
120
|
/**
|
|
122
121
|
* Edits profile fields and group membership. Status changes go through the approve, reject and suspend actions.
|
|
123
122
|
*
|
|
124
|
-
* @param {ToltApi.
|
|
123
|
+
* @param {ToltApi.UpdatePartnerRequest} request
|
|
125
124
|
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
126
125
|
*
|
|
127
126
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -140,12 +139,12 @@ export declare class PartnersClient {
|
|
|
140
139
|
* group_id: "grp_zUQ8Pt281MsbNDApmDPN3Y2a"
|
|
141
140
|
* })
|
|
142
141
|
*/
|
|
143
|
-
update(request: ToltApi.
|
|
142
|
+
update(request: ToltApi.UpdatePartnerRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.UpdatePartnerResponse>;
|
|
144
143
|
private __update;
|
|
145
144
|
/**
|
|
146
145
|
* Makes the partner active. A partner who was not already active is sent the program's approval email.
|
|
147
146
|
*
|
|
148
|
-
* @param {ToltApi.
|
|
147
|
+
* @param {ToltApi.ApprovePartnerRequest} request
|
|
149
148
|
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
150
149
|
*
|
|
151
150
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
@@ -160,12 +159,12 @@ export declare class PartnersClient {
|
|
|
160
159
|
* id: "part_NLYzgNKuSuASvrvoxNtau6SY"
|
|
161
160
|
* })
|
|
162
161
|
*/
|
|
163
|
-
approve(request: ToltApi.
|
|
162
|
+
approve(request: ToltApi.ApprovePartnerRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.ApprovePartnerResponse>;
|
|
164
163
|
private __approve;
|
|
165
164
|
/**
|
|
166
165
|
* Rejects the partner. A partner who was not already rejected is sent the program's rejection email with the note.
|
|
167
166
|
*
|
|
168
|
-
* @param {ToltApi.
|
|
167
|
+
* @param {ToltApi.RejectPartnerRequest} request
|
|
169
168
|
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
170
169
|
*
|
|
171
170
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -181,12 +180,12 @@ export declare class PartnersClient {
|
|
|
181
180
|
* id: "part_NLYzgNKuSuASvrvoxNtau6SY"
|
|
182
181
|
* })
|
|
183
182
|
*/
|
|
184
|
-
reject(request: ToltApi.
|
|
183
|
+
reject(request: ToltApi.RejectPartnerRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.RejectPartnerResponse>;
|
|
185
184
|
private __reject;
|
|
186
185
|
/**
|
|
187
186
|
* Suspends the partner, with an optional suspension_reason. Use the approve action to make them active again.
|
|
188
187
|
*
|
|
189
|
-
* @param {ToltApi.
|
|
188
|
+
* @param {ToltApi.SuspendPartnerRequest} request
|
|
190
189
|
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
191
190
|
*
|
|
192
191
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -202,6 +201,6 @@ export declare class PartnersClient {
|
|
|
202
201
|
* id: "part_NLYzgNKuSuASvrvoxNtau6SY"
|
|
203
202
|
* })
|
|
204
203
|
*/
|
|
205
|
-
suspend(request: ToltApi.
|
|
204
|
+
suspend(request: ToltApi.SuspendPartnerRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.SuspendPartnerResponse>;
|
|
206
205
|
private __suspend;
|
|
207
206
|
}
|