@widgetic/api-sdk 1.0.31 → 1.0.33
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/README.md +4 -0
- package/dist/apis/AdminApi.d.ts +30 -46
- package/dist/apis/AdminApi.js +53 -102
- package/dist/apis/AdminBillingApi.d.ts +2 -2
- package/dist/apis/AdminBillingApi.js +2 -2
- package/dist/apis/BillingApi.d.ts +44 -1
- package/dist/apis/BillingApi.js +127 -0
- package/dist/apis/CompositionsApi.d.ts +19 -15
- package/dist/apis/CompositionsApi.js +21 -14
- package/dist/apis/CreditsApi.d.ts +7 -7
- package/dist/apis/CreditsApi.js +5 -5
- package/dist/apis/OrganizationsApi.d.ts +35 -7
- package/dist/apis/OrganizationsApi.js +86 -6
- package/dist/apis/PartnerApi.d.ts +141 -36
- package/dist/apis/PartnerApi.js +333 -31
- package/dist/apis/PartnerCustomizationsApi.d.ts +4 -4
- package/dist/apis/PartnerCustomizationsApi.js +4 -4
- package/dist/apis/PartnersApi.d.ts +85 -67
- package/dist/apis/PartnersApi.js +198 -119
- package/dist/apis/PublicEmbedApi.d.ts +42 -3
- package/dist/apis/PublicEmbedApi.js +99 -2
- package/dist/apis/SubscriptionsApi.d.ts +2 -2
- package/dist/apis/SubscriptionsApi.js +2 -2
- package/dist/apis/UploadsApi.d.ts +4 -4
- package/dist/apis/UploadsApi.js +4 -4
- package/dist/apis/UsersApi.d.ts +4 -4
- package/dist/apis/UsersApi.js +4 -4
- package/dist/apis/index.d.ts +0 -4
- package/dist/apis/index.js +0 -4
- package/dist/esm/apis/AdminApi.d.ts +30 -46
- package/dist/esm/apis/AdminApi.js +54 -103
- package/dist/esm/apis/AdminBillingApi.d.ts +2 -2
- package/dist/esm/apis/AdminBillingApi.js +2 -2
- package/dist/esm/apis/BillingApi.d.ts +44 -1
- package/dist/esm/apis/BillingApi.js +128 -1
- package/dist/esm/apis/CompositionsApi.d.ts +19 -15
- package/dist/esm/apis/CompositionsApi.js +22 -15
- package/dist/esm/apis/CreditsApi.d.ts +7 -7
- package/dist/esm/apis/CreditsApi.js +6 -6
- package/dist/esm/apis/OrganizationsApi.d.ts +35 -7
- package/dist/esm/apis/OrganizationsApi.js +87 -7
- package/dist/esm/apis/PartnerApi.d.ts +141 -36
- package/dist/esm/apis/PartnerApi.js +334 -32
- package/dist/esm/apis/PartnerCustomizationsApi.d.ts +4 -4
- package/dist/esm/apis/PartnerCustomizationsApi.js +4 -4
- package/dist/esm/apis/PartnersApi.d.ts +85 -67
- package/dist/esm/apis/PartnersApi.js +198 -119
- package/dist/esm/apis/PublicEmbedApi.d.ts +42 -3
- package/dist/esm/apis/PublicEmbedApi.js +100 -3
- package/dist/esm/apis/SubscriptionsApi.d.ts +2 -2
- package/dist/esm/apis/SubscriptionsApi.js +2 -2
- package/dist/esm/apis/UploadsApi.d.ts +4 -4
- package/dist/esm/apis/UploadsApi.js +4 -4
- package/dist/esm/apis/UsersApi.d.ts +4 -4
- package/dist/esm/apis/UsersApi.js +4 -4
- package/dist/esm/apis/index.d.ts +0 -4
- package/dist/esm/apis/index.js +0 -4
- package/dist/esm/models/BillingUsersUserIdStorageCancelPackPostRequest.d.ts +40 -0
- package/dist/esm/models/BillingUsersUserIdStorageCancelPackPostRequest.js +43 -0
- package/dist/esm/models/BillingUsersUserIdStorageGet200Response.d.ts +39 -0
- package/dist/esm/models/BillingUsersUserIdStorageGet200Response.js +44 -0
- package/dist/esm/models/BillingUsersUserIdStorageGet200ResponseData.d.ts +33 -0
- package/dist/esm/models/BillingUsersUserIdStorageGet200ResponseData.js +42 -0
- package/dist/esm/models/Composition.d.ts +12 -0
- package/dist/esm/models/Composition.js +2 -0
- package/dist/esm/models/CompositionDataSource.d.ts +41 -0
- package/dist/esm/models/CompositionDataSource.js +47 -0
- package/dist/esm/models/CompositionEntriesReading.d.ts +20 -4
- package/dist/esm/models/CompositionEntriesReading.js +3 -0
- package/dist/esm/models/CompositionEntryAggregateTally.d.ts +15 -8
- package/dist/esm/models/CompositionEntryAggregatesBlock.d.ts +10 -0
- package/dist/esm/models/CompositionEntryItem.d.ts +4 -1
- package/dist/esm/models/CompositionEntryItemsMeta.d.ts +8 -0
- package/dist/esm/models/ConvertSoloToTeams200Response.d.ts +39 -0
- package/dist/esm/models/ConvertSoloToTeams200Response.js +44 -0
- package/dist/esm/models/CreatePartnerRequest.d.ts +7 -0
- package/dist/esm/models/CreatePartnerRequest.js +2 -0
- package/dist/esm/models/DeleteCompositionDataSource200Response.d.ts +32 -0
- package/dist/esm/models/DeleteCompositionDataSource200Response.js +43 -0
- package/dist/esm/models/GetCompositionContentSchema200Response.d.ts +2 -2
- package/dist/esm/models/GetOrganizationPricing200ResponseDataStorage.d.ts +3 -2
- package/dist/esm/models/GetOrganizationStorageUsage200ResponseDataStorageUsage.d.ts +5 -5
- package/dist/esm/models/GetPartnerCreditTransactions200Response.d.ts +39 -0
- package/dist/esm/models/GetPartnerCreditTransactions200Response.js +44 -0
- package/dist/esm/models/GetPublicCompositionEmbed200Response.d.ts +106 -0
- package/dist/esm/models/GetPublicCompositionEmbed200Response.js +67 -0
- package/dist/esm/models/GetPublicCompositionEmbed200ResponseDataSource.d.ts +38 -0
- package/dist/esm/models/GetPublicCompositionEmbed200ResponseDataSource.js +43 -0
- package/dist/esm/models/GetPublicCompositionEmbed200ResponseDirect.d.ts +44 -0
- package/dist/esm/models/GetPublicCompositionEmbed200ResponseDirect.js +45 -0
- package/dist/esm/models/GetPublicCompositionEmbed403Response.d.ts +51 -0
- package/dist/esm/models/GetPublicCompositionEmbed403Response.js +48 -0
- package/dist/esm/models/GetPublicCompositionEmbed403ResponseDetails.d.ts +46 -0
- package/dist/esm/models/GetPublicCompositionEmbed403ResponseDetails.js +50 -0
- package/dist/esm/models/GetPublicCompositionEmbed404Response.d.ts +47 -0
- package/dist/esm/models/GetPublicCompositionEmbed404Response.js +51 -0
- package/dist/esm/models/GetPublicCompositionEmbed429Response.d.ts +38 -0
- package/dist/esm/models/GetPublicCompositionEmbed429Response.js +43 -0
- package/dist/esm/models/IssuePartnerInvoiceRequest.d.ts +14 -1
- package/dist/esm/models/IssuePartnerInvoiceRequest.js +2 -0
- package/dist/esm/models/IssuedPartnerInvoice.d.ts +6 -0
- package/dist/esm/models/IssuedPartnerInvoice.js +4 -0
- package/dist/esm/models/ManagedUserEntryItem.d.ts +4 -1
- package/dist/esm/models/MyPartner.d.ts +7 -0
- package/dist/esm/models/MyPartner.js +4 -0
- package/dist/esm/models/MyPartners.d.ts +9 -1
- package/dist/esm/models/MyPartners.js +6 -1
- package/dist/esm/models/OrganizationsOrgIdBillingGet200ResponseData.d.ts +25 -5
- package/dist/esm/models/OrganizationsOrgIdBillingGet200ResponseData.js +9 -0
- package/dist/esm/models/Partner.d.ts +7 -0
- package/dist/esm/models/Partner.js +2 -0
- package/dist/esm/models/PartnerActivation.d.ts +1 -1
- package/dist/esm/models/PartnerBillingOverviewOperationalCredits.d.ts +0 -14
- package/dist/esm/models/PartnerBillingOverviewOperationalCredits.js +0 -4
- package/dist/esm/models/PartnerBillingProfile.d.ts +1 -1
- package/dist/esm/models/PartnerContract.d.ts +15 -3
- package/dist/esm/models/PartnerContract.js +6 -2
- package/dist/esm/models/PartnerCustomization.d.ts +15 -3
- package/dist/esm/models/PartnerCustomization.js +6 -2
- package/dist/esm/models/PartnerDetails.d.ts +7 -0
- package/dist/esm/models/PartnerDetails.js +2 -0
- package/dist/esm/models/PartnerEntryContextSecret.d.ts +39 -0
- package/dist/esm/models/PartnerEntryContextSecret.js +48 -0
- package/dist/esm/models/PartnerEntryContextSigning.d.ts +62 -0
- package/dist/esm/models/PartnerEntryContextSigning.js +63 -0
- package/dist/esm/models/PartnerExtraCreditsInvoice.d.ts +98 -0
- package/dist/esm/models/PartnerExtraCreditsInvoice.js +87 -0
- package/dist/esm/models/PartnerInvoiceSchedule.d.ts +66 -0
- package/dist/esm/models/PartnerInvoiceSchedule.js +67 -0
- package/dist/esm/models/PartnerInvoiceScheduleContract.d.ts +68 -0
- package/dist/esm/models/PartnerInvoiceScheduleContract.js +67 -0
- package/dist/esm/models/PartnerInvoiceScheduleNext.d.ts +94 -0
- package/dist/esm/models/PartnerInvoiceScheduleNext.js +91 -0
- package/dist/esm/models/PartnerInvoiceScheduleNextPeriod.d.ts +38 -0
- package/dist/esm/models/PartnerInvoiceScheduleNextPeriod.js +47 -0
- package/dist/esm/models/PartnerInvoiceScheduleOverdue.d.ts +38 -0
- package/dist/esm/models/PartnerInvoiceScheduleOverdue.js +47 -0
- package/dist/esm/models/PartnerInvoiceSchedulePeriod.d.ts +101 -0
- package/dist/esm/models/PartnerInvoiceSchedulePeriod.js +91 -0
- package/dist/esm/models/PartnerNotification.d.ts +1 -1
- package/dist/esm/models/PartnerNotificationEventType.d.ts +2 -0
- package/dist/esm/models/PartnerNotificationEventType.js +2 -0
- package/dist/esm/models/PartnerNotificationTestEventRequest.d.ts +33 -0
- package/dist/esm/models/PartnerNotificationTestEventRequest.js +44 -0
- package/dist/esm/models/PartnerNotificationTestEventResult.d.ts +50 -0
- package/dist/esm/models/PartnerNotificationTestEventResult.js +53 -0
- package/dist/esm/models/PartnerUpdateResult.d.ts +8 -16
- package/dist/esm/models/PartnerUpdateResult.js +2 -5
- package/dist/esm/models/PartnerWithWarnings.d.ts +7 -0
- package/dist/esm/models/PartnerWithWarnings.js +2 -0
- package/dist/esm/models/PersonalExtraStorage.d.ts +92 -0
- package/dist/esm/models/PersonalExtraStorage.js +83 -0
- package/dist/esm/models/PersonalExtraStorageBlock.d.ts +56 -0
- package/dist/esm/models/PersonalExtraStorageBlock.js +57 -0
- package/dist/esm/models/PersonalStorage.d.ts +80 -0
- package/dist/esm/models/PersonalStorage.js +73 -0
- package/dist/esm/models/PersonalStoragePack.d.ts +100 -0
- package/dist/esm/models/PersonalStoragePack.js +84 -0
- package/dist/esm/models/PostPublicCompositionEmbedStatus200Response.d.ts +39 -0
- package/dist/esm/models/PostPublicCompositionEmbedStatus200Response.js +44 -0
- package/dist/esm/models/PostPublicCompositionEmbedStatus200ResponseData.d.ts +45 -0
- package/dist/esm/models/PostPublicCompositionEmbedStatus200ResponseData.js +51 -0
- package/dist/esm/models/PostPublicCompositionEmbedStatus429Response.d.ts +32 -0
- package/dist/esm/models/PostPublicCompositionEmbedStatus429Response.js +41 -0
- package/dist/esm/models/PostPublicCompositionEmbedStatusRequest.d.ts +32 -0
- package/dist/esm/models/PostPublicCompositionEmbedStatusRequest.js +43 -0
- package/dist/esm/models/PublicCompositionEntryRequest.d.ts +1 -1
- package/dist/esm/models/RequestExtraCredits.d.ts +33 -0
- package/dist/esm/models/RequestExtraCredits.js +43 -0
- package/dist/esm/models/StorageChange.d.ts +4 -3
- package/dist/esm/models/SurfaceConversionResult.d.ts +85 -0
- package/dist/esm/models/SurfaceConversionResult.js +76 -0
- package/dist/esm/models/SurfaceConversionResultSubscription.d.ts +82 -0
- package/dist/esm/models/SurfaceConversionResultSubscription.js +62 -0
- package/dist/esm/models/UpdatePartnerCustomizationRequest.d.ts +3 -3
- package/dist/esm/models/UpdatePartnerCustomizationRequest.js +2 -2
- package/dist/esm/models/UpdatePartnerEntryContextSigningRequest.d.ts +32 -0
- package/dist/esm/models/UpdatePartnerEntryContextSigningRequest.js +43 -0
- package/dist/esm/models/UpdatePartnerRequest.d.ts +7 -24
- package/dist/esm/models/UpdatePartnerRequest.js +2 -8
- package/dist/esm/models/index.d.ts +37 -86
- package/dist/esm/models/index.js +37 -86
- package/dist/models/BillingUsersUserIdStorageCancelPackPostRequest.d.ts +40 -0
- package/dist/models/BillingUsersUserIdStorageCancelPackPostRequest.js +50 -0
- package/dist/models/BillingUsersUserIdStorageGet200Response.d.ts +39 -0
- package/dist/models/BillingUsersUserIdStorageGet200Response.js +51 -0
- package/dist/models/BillingUsersUserIdStorageGet200ResponseData.d.ts +33 -0
- package/dist/models/BillingUsersUserIdStorageGet200ResponseData.js +49 -0
- package/dist/models/Composition.d.ts +12 -0
- package/dist/models/Composition.js +2 -0
- package/dist/models/CompositionDataSource.d.ts +41 -0
- package/dist/models/CompositionDataSource.js +54 -0
- package/dist/models/CompositionEntriesReading.d.ts +20 -4
- package/dist/models/CompositionEntriesReading.js +3 -0
- package/dist/models/CompositionEntryAggregateTally.d.ts +15 -8
- package/dist/models/CompositionEntryAggregatesBlock.d.ts +10 -0
- package/dist/models/CompositionEntryItem.d.ts +4 -1
- package/dist/models/CompositionEntryItemsMeta.d.ts +8 -0
- package/dist/models/ConvertSoloToTeams200Response.d.ts +39 -0
- package/dist/models/ConvertSoloToTeams200Response.js +51 -0
- package/dist/models/CreatePartnerRequest.d.ts +7 -0
- package/dist/models/CreatePartnerRequest.js +2 -0
- package/dist/models/DeleteCompositionDataSource200Response.d.ts +32 -0
- package/dist/models/DeleteCompositionDataSource200Response.js +50 -0
- package/dist/models/GetCompositionContentSchema200Response.d.ts +2 -2
- package/dist/models/GetOrganizationPricing200ResponseDataStorage.d.ts +3 -2
- package/dist/models/GetOrganizationStorageUsage200ResponseDataStorageUsage.d.ts +5 -5
- package/dist/models/GetPartnerCreditTransactions200Response.d.ts +39 -0
- package/dist/models/GetPartnerCreditTransactions200Response.js +51 -0
- package/dist/models/GetPublicCompositionEmbed200Response.d.ts +106 -0
- package/dist/models/GetPublicCompositionEmbed200Response.js +74 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseDataSource.d.ts +38 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseDataSource.js +50 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseDirect.d.ts +44 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseDirect.js +52 -0
- package/dist/models/GetPublicCompositionEmbed403Response.d.ts +51 -0
- package/dist/models/GetPublicCompositionEmbed403Response.js +55 -0
- package/dist/models/GetPublicCompositionEmbed403ResponseDetails.d.ts +46 -0
- package/dist/models/GetPublicCompositionEmbed403ResponseDetails.js +58 -0
- package/dist/models/GetPublicCompositionEmbed404Response.d.ts +47 -0
- package/dist/models/GetPublicCompositionEmbed404Response.js +59 -0
- package/dist/models/GetPublicCompositionEmbed429Response.d.ts +38 -0
- package/dist/models/GetPublicCompositionEmbed429Response.js +50 -0
- package/dist/models/IssuePartnerInvoiceRequest.d.ts +14 -1
- package/dist/models/IssuePartnerInvoiceRequest.js +2 -0
- package/dist/models/IssuedPartnerInvoice.d.ts +6 -0
- package/dist/models/IssuedPartnerInvoice.js +4 -0
- package/dist/models/ManagedUserEntryItem.d.ts +4 -1
- package/dist/models/MyPartner.d.ts +7 -0
- package/dist/models/MyPartner.js +4 -0
- package/dist/models/MyPartners.d.ts +9 -1
- package/dist/models/MyPartners.js +6 -1
- package/dist/models/OrganizationsOrgIdBillingGet200ResponseData.d.ts +25 -5
- package/dist/models/OrganizationsOrgIdBillingGet200ResponseData.js +10 -0
- package/dist/models/Partner.d.ts +7 -0
- package/dist/models/Partner.js +2 -0
- package/dist/models/PartnerActivation.d.ts +1 -1
- package/dist/models/PartnerBillingOverviewOperationalCredits.d.ts +0 -14
- package/dist/models/PartnerBillingOverviewOperationalCredits.js +0 -4
- package/dist/models/PartnerBillingProfile.d.ts +1 -1
- package/dist/models/PartnerContract.d.ts +15 -3
- package/dist/models/PartnerContract.js +6 -2
- package/dist/models/PartnerCustomization.d.ts +15 -3
- package/dist/models/PartnerCustomization.js +6 -2
- package/dist/models/PartnerDetails.d.ts +7 -0
- package/dist/models/PartnerDetails.js +2 -0
- package/dist/models/PartnerEntryContextSecret.d.ts +39 -0
- package/dist/models/PartnerEntryContextSecret.js +55 -0
- package/dist/models/PartnerEntryContextSigning.d.ts +62 -0
- package/dist/models/PartnerEntryContextSigning.js +70 -0
- package/dist/models/PartnerExtraCreditsInvoice.d.ts +98 -0
- package/dist/models/PartnerExtraCreditsInvoice.js +94 -0
- package/dist/models/PartnerInvoiceSchedule.d.ts +66 -0
- package/dist/models/PartnerInvoiceSchedule.js +74 -0
- package/dist/models/PartnerInvoiceScheduleContract.d.ts +68 -0
- package/dist/models/PartnerInvoiceScheduleContract.js +74 -0
- package/dist/models/PartnerInvoiceScheduleNext.d.ts +94 -0
- package/dist/models/PartnerInvoiceScheduleNext.js +99 -0
- package/dist/models/PartnerInvoiceScheduleNextPeriod.d.ts +38 -0
- package/dist/models/PartnerInvoiceScheduleNextPeriod.js +54 -0
- package/dist/models/PartnerInvoiceScheduleOverdue.d.ts +38 -0
- package/dist/models/PartnerInvoiceScheduleOverdue.js +54 -0
- package/dist/models/PartnerInvoiceSchedulePeriod.d.ts +101 -0
- package/dist/models/PartnerInvoiceSchedulePeriod.js +99 -0
- package/dist/models/PartnerNotification.d.ts +1 -1
- package/dist/models/PartnerNotificationEventType.d.ts +2 -0
- package/dist/models/PartnerNotificationEventType.js +2 -0
- package/dist/models/PartnerNotificationTestEventRequest.d.ts +33 -0
- package/dist/models/PartnerNotificationTestEventRequest.js +51 -0
- package/dist/models/PartnerNotificationTestEventResult.d.ts +50 -0
- package/dist/models/PartnerNotificationTestEventResult.js +60 -0
- package/dist/models/PartnerUpdateResult.d.ts +8 -16
- package/dist/models/PartnerUpdateResult.js +2 -5
- package/dist/models/PartnerWithWarnings.d.ts +7 -0
- package/dist/models/PartnerWithWarnings.js +2 -0
- package/dist/models/PersonalExtraStorage.d.ts +92 -0
- package/dist/models/PersonalExtraStorage.js +91 -0
- package/dist/models/PersonalExtraStorageBlock.d.ts +56 -0
- package/dist/models/PersonalExtraStorageBlock.js +65 -0
- package/dist/models/PersonalStorage.d.ts +80 -0
- package/dist/models/PersonalStorage.js +80 -0
- package/dist/models/PersonalStoragePack.d.ts +100 -0
- package/dist/models/PersonalStoragePack.js +92 -0
- package/dist/models/PostPublicCompositionEmbedStatus200Response.d.ts +39 -0
- package/dist/models/PostPublicCompositionEmbedStatus200Response.js +51 -0
- package/dist/models/PostPublicCompositionEmbedStatus200ResponseData.d.ts +45 -0
- package/dist/models/PostPublicCompositionEmbedStatus200ResponseData.js +59 -0
- package/dist/models/PostPublicCompositionEmbedStatus429Response.d.ts +32 -0
- package/dist/models/PostPublicCompositionEmbedStatus429Response.js +48 -0
- package/dist/models/PostPublicCompositionEmbedStatusRequest.d.ts +32 -0
- package/dist/models/PostPublicCompositionEmbedStatusRequest.js +50 -0
- package/dist/models/PublicCompositionEntryRequest.d.ts +1 -1
- package/dist/models/RequestExtraCredits.d.ts +33 -0
- package/dist/models/RequestExtraCredits.js +50 -0
- package/dist/models/StorageChange.d.ts +4 -3
- package/dist/models/SurfaceConversionResult.d.ts +85 -0
- package/dist/models/SurfaceConversionResult.js +84 -0
- package/dist/models/SurfaceConversionResultSubscription.d.ts +82 -0
- package/dist/models/SurfaceConversionResultSubscription.js +70 -0
- package/dist/models/UpdatePartnerCustomizationRequest.d.ts +3 -3
- package/dist/models/UpdatePartnerCustomizationRequest.js +2 -2
- package/dist/models/UpdatePartnerEntryContextSigningRequest.d.ts +32 -0
- package/dist/models/UpdatePartnerEntryContextSigningRequest.js +50 -0
- package/dist/models/UpdatePartnerRequest.d.ts +7 -24
- package/dist/models/UpdatePartnerRequest.js +2 -8
- package/dist/models/index.d.ts +37 -86
- package/dist/models/index.js +37 -86
- package/package.json +3 -2
|
@@ -21,58 +21,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime.js';
|
|
24
|
-
import {
|
|
24
|
+
import { AdjustUserCredits200ResponseFromJSON, AdjustUserCreditsRequestToJSON, AdminHealthStatusFromJSON, CleanupOrphanedInvitations200ResponseFromJSON, CleanupOrphanedInvitationsRequestToJSON, CreatePartnerRequestToJSON, PartnerActivationFromJSON, PartnerBillingProfileSavedFromJSON, PartnerBillingProfileViewFromJSON, PartnerBillingReportFromJSON, PartnerDetailsFromJSON, PartnerEditorSessionSettingsFromJSON, PartnerInvoiceScheduleFromJSON, PartnerListFromJSON, PartnerUpdateResultFromJSON, PartnerWithWarningsFromJSON, RecordPartnerInvoicePaymentRequestToJSON, RecordedPartnerPaymentFromJSON, UpdatePartnerBillingProfileRequestToJSON, UpdatePartnerEditorSessionSettingsRequestToJSON, UpdatePartnerRequestToJSON, UpdatePartnerStatusRequestToJSON, } from '../models/index.js';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class AdminApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Admin only. A positive `amount`
|
|
31
|
-
* Add credits to, or remove credits from, a partner\'s wallet
|
|
32
|
-
*/
|
|
33
|
-
adjustPartnerCreditsRaw(requestParameters, initOverrides) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
if (requestParameters['partnerId'] == null) {
|
|
36
|
-
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling adjustPartnerCredits().');
|
|
37
|
-
}
|
|
38
|
-
if (requestParameters['adjustPartnerCreditsRequest'] == null) {
|
|
39
|
-
throw new runtime.RequiredError('adjustPartnerCreditsRequest', 'Required parameter "adjustPartnerCreditsRequest" was null or undefined when calling adjustPartnerCredits().');
|
|
40
|
-
}
|
|
41
|
-
const queryParameters = {};
|
|
42
|
-
const headerParameters = {};
|
|
43
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
45
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
46
|
-
}
|
|
47
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
48
|
-
const token = this.configuration.accessToken;
|
|
49
|
-
const tokenString = yield token("apiKeyAuth", []);
|
|
50
|
-
if (tokenString) {
|
|
51
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const response = yield this.request({
|
|
55
|
-
path: `/admin/partners/{partnerId}/credits`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
|
|
56
|
-
method: 'POST',
|
|
57
|
-
headers: headerParameters,
|
|
58
|
-
query: queryParameters,
|
|
59
|
-
body: AdjustPartnerCreditsRequestToJSON(requestParameters['adjustPartnerCreditsRequest']),
|
|
60
|
-
}, initOverrides);
|
|
61
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => AdjustPartnerCredits200ResponseFromJSON(jsonValue));
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Admin only. A positive `amount` adds credits to the partner wallet; a negative `amount` removes them (the wallet must hold them). An `amount` of 0, or one that is not a finite number, is refused with 400. **One top-up may not exceed $100,000** (`BILLING_CONFIG.PARTNER_WALLET`), which is 1,000,000 credits at the list price of $0.10 per credit. A larger amount is refused with 400 and nothing is credited. The same ceiling applies to `POST /admin/billing/refund` and to the `creditBalance` field of `PUT /admin/partners/{partnerId}`. Removing credits is not limited by it. The `Idempotency-Key` header is required and names the adjustment: a retry with the same key replays the first result (`replayed: true`) instead of moving the balance twice, and a request without one is refused with 400. This moves a PARTNER\'s wallet. A user\'s balance is moved by `POST /admin/billing/credits/adjust`.
|
|
66
|
-
* Add credits to, or remove credits from, a partner\'s wallet
|
|
67
|
-
*/
|
|
68
|
-
adjustPartnerCredits(requestParameters, initOverrides) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
const response = yield this.adjustPartnerCreditsRaw(requestParameters, initOverrides);
|
|
71
|
-
return yield response.value();
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Admin only. A positive `amount` grants free credits; a negative `amount` takes credits away (the balance must hold them). An `amount` of 0, or one that is not a finite number, is refused with 400. The `Idempotency-Key` header is required and names the adjustment: a retry with the same key replays the first result (`replayed: true`) instead of moving the balance twice, and a request without one is refused with 400. Free credits are limited per admin: one request may grant at most `ADMIN_GRANT_MAX_PER_REQUEST` credits (default 5000) and one admin may grant at most `ADMIN_GRANT_DAILY_LIMIT` credits alone per UTC day (default 10000), counted across this route, `POST /credits/add` and the grants route (`POST /admin-billing/grants`). Removing credits is not counted. A request over the per-request limit is refused with 400; one that would pass the daily limit is refused with 429 and `ADMIN_GRANT_LIMIT_REACHED` (`error.details` has the limit, what was used, what is left and when the day resets). This moves a USER\'s balance. A partner\'s wallet is moved by `POST /admin/partners/{partnerId}/credits`.
|
|
30
|
+
* Admin only. A positive `amount` grants free credits; a negative `amount` takes credits away (the balance must hold them). An `amount` of 0, or one that is not a finite number, is refused with 400. The `Idempotency-Key` header is required and names the adjustment: a retry with the same key replays the first result (`replayed: true`) instead of moving the balance twice, and a request without one is refused with 400. Free credits are limited per admin: one request may grant at most `ADMIN_GRANT_MAX_PER_REQUEST` credits (default 5000) and one admin may grant at most `ADMIN_GRANT_DAILY_LIMIT` credits alone per UTC day (default 10000), counted across this route, `POST /credits/add` and the grants route (`POST /admin-billing/grants`). Removing credits is not counted. A request over the per-request limit is refused with 400; one that would pass the daily limit is refused with 429 and `ADMIN_GRANT_LIMIT_REACHED` (`error.details` has the limit, what was used, what is left and when the day resets). This moves a USER\'s balance, which includes the account a partner\'s builds are charged to (its administrator\'s): the credits of a paid partner invoice are added there, and a clawback of them is made here. No route writes to a partner\'s own wallet any more, so this is the one place a partner\'s credits are taken back.
|
|
76
31
|
* Add credits to, or remove credits from, a user\'s balance
|
|
77
32
|
*/
|
|
78
33
|
adjustUserCreditsRaw(requestParameters, initOverrides) {
|
|
@@ -104,7 +59,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
104
59
|
});
|
|
105
60
|
}
|
|
106
61
|
/**
|
|
107
|
-
* Admin only. A positive `amount` grants free credits; a negative `amount` takes credits away (the balance must hold them). An `amount` of 0, or one that is not a finite number, is refused with 400. The `Idempotency-Key` header is required and names the adjustment: a retry with the same key replays the first result (`replayed: true`) instead of moving the balance twice, and a request without one is refused with 400. Free credits are limited per admin: one request may grant at most `ADMIN_GRANT_MAX_PER_REQUEST` credits (default 5000) and one admin may grant at most `ADMIN_GRANT_DAILY_LIMIT` credits alone per UTC day (default 10000), counted across this route, `POST /credits/add` and the grants route (`POST /admin-billing/grants`). Removing credits is not counted. A request over the per-request limit is refused with 400; one that would pass the daily limit is refused with 429 and `ADMIN_GRANT_LIMIT_REACHED` (`error.details` has the limit, what was used, what is left and when the day resets). This moves a USER\'s balance.
|
|
62
|
+
* Admin only. A positive `amount` grants free credits; a negative `amount` takes credits away (the balance must hold them). An `amount` of 0, or one that is not a finite number, is refused with 400. The `Idempotency-Key` header is required and names the adjustment: a retry with the same key replays the first result (`replayed: true`) instead of moving the balance twice, and a request without one is refused with 400. Free credits are limited per admin: one request may grant at most `ADMIN_GRANT_MAX_PER_REQUEST` credits (default 5000) and one admin may grant at most `ADMIN_GRANT_DAILY_LIMIT` credits alone per UTC day (default 10000), counted across this route, `POST /credits/add` and the grants route (`POST /admin-billing/grants`). Removing credits is not counted. A request over the per-request limit is refused with 400; one that would pass the daily limit is refused with 429 and `ADMIN_GRANT_LIMIT_REACHED` (`error.details` has the limit, what was used, what is left and when the day resets). This moves a USER\'s balance, which includes the account a partner\'s builds are charged to (its administrator\'s): the credits of a paid partner invoice are added there, and a clawback of them is made here. No route writes to a partner\'s own wallet any more, so this is the one place a partner\'s credits are taken back.
|
|
108
63
|
* Add credits to, or remove credits from, a user\'s balance
|
|
109
64
|
*/
|
|
110
65
|
adjustUserCredits(requestParameters, initOverrides) {
|
|
@@ -193,7 +148,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
193
148
|
});
|
|
194
149
|
}
|
|
195
150
|
/**
|
|
196
|
-
* Admin only. This is how a partner comes to exist; there is no self-serve sign-up for one. **Before calling it**, the user who will administer the partner must exist and have the `partner` role (`PUT /admin/users/{userId}/role`). Every partner route belongs to that role, so a partner administered by an ordinary user would be created and then be unusable; such a request is refused with 400 and says so. A user with the `admin` role is accepted too. **A partner has no API key of its own, and none is issued.** The administrator calls the API with the `wgt_prt_` key of their own account: they make it themselves (`POST /users/{id}/keys`, or the dashboard\'s key screen), or Widgetic staff make it for them (the same route, called by an admin). **The new partner starts inactive, and is unusable until an administrator activates it.** A partner has no trial and pays from day one, so nothing it or its customers do works yet: its embeds are not served, its editor sessions are refused and its API key can only read and manage its billing. Activate it with `PUT /admin/partners/{partnerId}/status` (`active`) once the contract and a verified storage destination are in place (`GET /admin/partners/{partnerId}/activation` lists what is missing). Sending `isActive: true` here is refused, because it would skip that check. The new partner starts with
|
|
151
|
+
* Admin only. This is how a partner comes to exist; there is no self-serve sign-up for one. **Before calling it**, the user who will administer the partner must exist and have the `partner` role (`PUT /admin/users/{userId}/role`). Every partner route belongs to that role, so a partner administered by an ordinary user would be created and then be unusable; such a request is refused with 400 and says so. A user with the `admin` role is accepted too. **A partner has no API key of its own, and none is issued.** The administrator calls the API with the `wgt_prt_` key of their own account: they make it themselves (`POST /users/{id}/keys`, or the dashboard\'s key screen), or Widgetic staff make it for them (the same route, called by an admin). **The new partner starts inactive, and is unusable until an administrator activates it.** A partner has no trial and pays from day one, so nothing it or its customers do works yet: its embeds are not served, its editor sessions are refused and its API key can only read and manage its billing. Activate it with `PUT /admin/partners/{partnerId}/status` (`active`) once the contract and a verified storage destination are in place (`GET /admin/partners/{partnerId}/activation` lists what is missing). Sending `isActive: true` here is refused, because it would skip that check. The new partner starts with no credits and no contract. It is credited by a paid invoice that carries credits (`POST /admin-billing/partner/{partnerId}/invoice`), and the contract terms are recorded with `POST /partner-customizations/{partnerId}`. Neither is a field of this request, and a field this request does not name is refused with 400 rather than ignored. Creating the partner also records the partner plan on its administrator\'s own account (`plan.partner`). A partner is not bought, so the administrator\'s account holds no subscription of its own. If that record could not be written the partner is still created (a refusal would hide that it exists, and a retry would be a 409) and `warnings` says so; sending the status `active` for the partner again (`PUT /admin/partners/{partnerId}/status`) records it. Pausing or deactivating the partner stops what it published from being served. A partner `name` is unique: one already in use is refused with 409 and nothing is created. This route takes no `Idempotency-Key`: the unique name makes a retry safe on its own. A retry after a dropped response gets 409 for the partner the first attempt created; find it with `GET /admin/partners` (`searchTerm`).
|
|
197
152
|
* Create a partner
|
|
198
153
|
*/
|
|
199
154
|
createPartnerRaw(requestParameters, initOverrides) {
|
|
@@ -222,7 +177,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
222
177
|
});
|
|
223
178
|
}
|
|
224
179
|
/**
|
|
225
|
-
* Admin only. This is how a partner comes to exist; there is no self-serve sign-up for one. **Before calling it**, the user who will administer the partner must exist and have the `partner` role (`PUT /admin/users/{userId}/role`). Every partner route belongs to that role, so a partner administered by an ordinary user would be created and then be unusable; such a request is refused with 400 and says so. A user with the `admin` role is accepted too. **A partner has no API key of its own, and none is issued.** The administrator calls the API with the `wgt_prt_` key of their own account: they make it themselves (`POST /users/{id}/keys`, or the dashboard\'s key screen), or Widgetic staff make it for them (the same route, called by an admin). **The new partner starts inactive, and is unusable until an administrator activates it.** A partner has no trial and pays from day one, so nothing it or its customers do works yet: its embeds are not served, its editor sessions are refused and its API key can only read and manage its billing. Activate it with `PUT /admin/partners/{partnerId}/status` (`active`) once the contract and a verified storage destination are in place (`GET /admin/partners/{partnerId}/activation` lists what is missing). Sending `isActive: true` here is refused, because it would skip that check. The new partner starts with
|
|
180
|
+
* Admin only. This is how a partner comes to exist; there is no self-serve sign-up for one. **Before calling it**, the user who will administer the partner must exist and have the `partner` role (`PUT /admin/users/{userId}/role`). Every partner route belongs to that role, so a partner administered by an ordinary user would be created and then be unusable; such a request is refused with 400 and says so. A user with the `admin` role is accepted too. **A partner has no API key of its own, and none is issued.** The administrator calls the API with the `wgt_prt_` key of their own account: they make it themselves (`POST /users/{id}/keys`, or the dashboard\'s key screen), or Widgetic staff make it for them (the same route, called by an admin). **The new partner starts inactive, and is unusable until an administrator activates it.** A partner has no trial and pays from day one, so nothing it or its customers do works yet: its embeds are not served, its editor sessions are refused and its API key can only read and manage its billing. Activate it with `PUT /admin/partners/{partnerId}/status` (`active`) once the contract and a verified storage destination are in place (`GET /admin/partners/{partnerId}/activation` lists what is missing). Sending `isActive: true` here is refused, because it would skip that check. The new partner starts with no credits and no contract. It is credited by a paid invoice that carries credits (`POST /admin-billing/partner/{partnerId}/invoice`), and the contract terms are recorded with `POST /partner-customizations/{partnerId}`. Neither is a field of this request, and a field this request does not name is refused with 400 rather than ignored. Creating the partner also records the partner plan on its administrator\'s own account (`plan.partner`). A partner is not bought, so the administrator\'s account holds no subscription of its own. If that record could not be written the partner is still created (a refusal would hide that it exists, and a retry would be a 409) and `warnings` says so; sending the status `active` for the partner again (`PUT /admin/partners/{partnerId}/status`) records it. Pausing or deactivating the partner stops what it published from being served. A partner `name` is unique: one already in use is refused with 409 and nothing is created. This route takes no `Idempotency-Key`: the unique name makes a retry safe on its own. A retry after a dropped response gets 409 for the partner the first attempt created; find it with `GET /admin/partners` (`searchTerm`).
|
|
226
181
|
* Create a partner
|
|
227
182
|
*/
|
|
228
183
|
createPartner(requestParameters, initOverrides) {
|
|
@@ -303,7 +258,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
303
258
|
});
|
|
304
259
|
}
|
|
305
260
|
/**
|
|
306
|
-
* Admin only. Reads the billing profile of a partner: the legal name, the billing emails, the billing address, the tax number and the payment terms, and what the invoices will say with them. A partner that has none saved has the defaults (the partner\'s own name, its contact email,
|
|
261
|
+
* Admin only. Reads the billing profile of a partner: the legal name, the billing emails, the billing address, the tax number and the payment terms, and what the invoices will say with them. A partner that has none saved has the defaults (the partner\'s own name, its contact email, 7 days, no address), and `gaps` says what is missing for an invoice to carry the right tax. Nothing is changed by reading it.
|
|
307
262
|
* What a partner\'s invoices are addressed with
|
|
308
263
|
*/
|
|
309
264
|
getPartnerBillingProfileRaw(requestParameters, initOverrides) {
|
|
@@ -330,7 +285,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
330
285
|
});
|
|
331
286
|
}
|
|
332
287
|
/**
|
|
333
|
-
* Admin only. Reads the billing profile of a partner: the legal name, the billing emails, the billing address, the tax number and the payment terms, and what the invoices will say with them. A partner that has none saved has the defaults (the partner\'s own name, its contact email,
|
|
288
|
+
* Admin only. Reads the billing profile of a partner: the legal name, the billing emails, the billing address, the tax number and the payment terms, and what the invoices will say with them. A partner that has none saved has the defaults (the partner\'s own name, its contact email, 7 days, no address), and `gaps` says what is missing for an invoice to carry the right tax. Nothing is changed by reading it.
|
|
334
289
|
* What a partner\'s invoices are addressed with
|
|
335
290
|
*/
|
|
336
291
|
getPartnerBillingProfile(requestParameters, initOverrides) {
|
|
@@ -386,7 +341,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
386
341
|
});
|
|
387
342
|
}
|
|
388
343
|
/**
|
|
389
|
-
* Admin only. The partner, with three things an administrator needs beside it: the billing overview (wallet,
|
|
344
|
+
* Admin only. The partner, with three things an administrator needs beside it: the billing overview (wallet, the ten newest ledger rows, the contract if one is recorded), the statistics of the last month\'s wallet activity, and a little metadata. The overview and the statistics are read at request time and are `null` when they could not be assembled: the partner itself is still returned. `monthlyStats.userCount` is `null` while the partner\'s member list cannot be read.
|
|
390
345
|
* Get a partner with its billing overview and last month\'s statistics
|
|
391
346
|
*/
|
|
392
347
|
getPartnerDetailsRaw(requestParameters, initOverrides) {
|
|
@@ -413,7 +368,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
413
368
|
});
|
|
414
369
|
}
|
|
415
370
|
/**
|
|
416
|
-
* Admin only. The partner, with three things an administrator needs beside it: the billing overview (wallet,
|
|
371
|
+
* Admin only. The partner, with three things an administrator needs beside it: the billing overview (wallet, the ten newest ledger rows, the contract if one is recorded), the statistics of the last month\'s wallet activity, and a little metadata. The overview and the statistics are read at request time and are `null` when they could not be assembled: the partner itself is still returned. `monthlyStats.userCount` is `null` while the partner\'s member list cannot be read.
|
|
417
372
|
* Get a partner with its billing overview and last month\'s statistics
|
|
418
373
|
*/
|
|
419
374
|
getPartnerDetails(requestParameters, initOverrides) {
|
|
@@ -459,6 +414,43 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
459
414
|
return yield response.value();
|
|
460
415
|
});
|
|
461
416
|
}
|
|
417
|
+
/**
|
|
418
|
+
* Admin only. Shows what the daily invoicing run does with a partner\'s contract: the terms it runs on, the invoice that goes out next (the period, the day, the credits, the price of a credit and the amount before tax), the periods the run has taken so far with where each invoice stands, and the contract invoices the partner owes past their due day. The first invoice goes out on the contract\'s start date, the others 7 days before their period starts, for the credits of the period at the contract\'s price of a credit; the credits are added when the invoice is paid and expire when the period ends. `next` is worked out with the rules the run uses, so it is what the next run will do, including why it will not issue anything (`blocked`). Nothing is changed by reading it.
|
|
419
|
+
* When a partner\'s contract is invoiced next, and what it owes
|
|
420
|
+
*/
|
|
421
|
+
getPartnerInvoiceScheduleRaw(requestParameters, initOverrides) {
|
|
422
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
423
|
+
if (requestParameters['partnerId'] == null) {
|
|
424
|
+
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling getPartnerInvoiceSchedule().');
|
|
425
|
+
}
|
|
426
|
+
const queryParameters = {};
|
|
427
|
+
const headerParameters = {};
|
|
428
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
429
|
+
const token = this.configuration.accessToken;
|
|
430
|
+
const tokenString = yield token("apiKeyAuth", []);
|
|
431
|
+
if (tokenString) {
|
|
432
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
const response = yield this.request({
|
|
436
|
+
path: `/admin/partners/{partnerId}/invoice-schedule`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
|
|
437
|
+
method: 'GET',
|
|
438
|
+
headers: headerParameters,
|
|
439
|
+
query: queryParameters,
|
|
440
|
+
}, initOverrides);
|
|
441
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PartnerInvoiceScheduleFromJSON(jsonValue));
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Admin only. Shows what the daily invoicing run does with a partner\'s contract: the terms it runs on, the invoice that goes out next (the period, the day, the credits, the price of a credit and the amount before tax), the periods the run has taken so far with where each invoice stands, and the contract invoices the partner owes past their due day. The first invoice goes out on the contract\'s start date, the others 7 days before their period starts, for the credits of the period at the contract\'s price of a credit; the credits are added when the invoice is paid and expire when the period ends. `next` is worked out with the rules the run uses, so it is what the next run will do, including why it will not issue anything (`blocked`). Nothing is changed by reading it.
|
|
446
|
+
* When a partner\'s contract is invoiced next, and what it owes
|
|
447
|
+
*/
|
|
448
|
+
getPartnerInvoiceSchedule(requestParameters, initOverrides) {
|
|
449
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
450
|
+
const response = yield this.getPartnerInvoiceScheduleRaw(requestParameters, initOverrides);
|
|
451
|
+
return yield response.value();
|
|
452
|
+
});
|
|
453
|
+
}
|
|
462
454
|
/**
|
|
463
455
|
* Admin only. `scope=mine` is the signed-in admin\'s widgets. `scope=others` is every other account. `scope=all` is every account. `preset=true` keeps widgets marked for signup copy. A normal account cannot call this route.
|
|
464
456
|
* List widgets for the admin console
|
|
@@ -557,7 +549,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
557
549
|
});
|
|
558
550
|
}
|
|
559
551
|
/**
|
|
560
|
-
* Admin only. For an invoice that was paid by bank transfer, cheque or any other way outside Stripe. It marks the invoice paid in Stripe (`paid_out_of_band`), and Stripe then reports the payment exactly as it reports a card payment: the partner\'s invoice list is brought up to date (status and paid date), the reminders stop, the partner receives its receipt, and the administrators are told the payment arrived. Nothing is written to the partner\'s invoice list here, so the list changes a moment after the answer, when Stripe\'s report arrives; an administrator never updates a status by hand. The invoice is named by its id in the partner\'s invoice list and must belong to this partner. An invoice Stripe already holds as paid is answered (`recorded: false`) and nothing happens again, so a double click or a retry is safe. An invoice Stripe holds as void, uncollectible or still a draft cannot be marked paid (409 `INVOICE_NOT_PAYABLE`), and one that was never issued through Stripe has nothing to mark (409 `INVOICE_HAS_NO_STRIPE_INVOICE`). The audit trail records who recorded it, with the optional `note` (a bank reference, say).
|
|
552
|
+
* Admin only. For an invoice that was paid by bank transfer, cheque or any other way outside Stripe. It marks the invoice paid in Stripe (`paid_out_of_band`), and Stripe then reports the payment exactly as it reports a card payment: the partner\'s invoice list is brought up to date (status and paid date), the reminders stop, the partner receives its receipt, and the administrators are told the payment arrived. An invoice that was issued for credits (`credits` on `issuePartnerInvoice`) also adds them to the partner administrator\'s account at that moment, once. Nothing is written to the partner\'s invoice list here, so the list changes a moment after the answer, when Stripe\'s report arrives; an administrator never updates a status by hand. The invoice is named by its id in the partner\'s invoice list and must belong to this partner. An invoice Stripe already holds as paid is answered (`recorded: false`) and nothing happens again, so a double click or a retry is safe. An invoice Stripe holds as void, uncollectible or still a draft cannot be marked paid (409 `INVOICE_NOT_PAYABLE`), and one that was never issued through Stripe has nothing to mark (409 `INVOICE_HAS_NO_STRIPE_INVOICE`). The audit trail records who recorded it, with the optional `note` (a bank reference, say).
|
|
561
553
|
* Record a payment that arrived outside Stripe
|
|
562
554
|
*/
|
|
563
555
|
recordPartnerInvoicePaymentRaw(requestParameters, initOverrides) {
|
|
@@ -592,7 +584,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
592
584
|
});
|
|
593
585
|
}
|
|
594
586
|
/**
|
|
595
|
-
* Admin only. For an invoice that was paid by bank transfer, cheque or any other way outside Stripe. It marks the invoice paid in Stripe (`paid_out_of_band`), and Stripe then reports the payment exactly as it reports a card payment: the partner\'s invoice list is brought up to date (status and paid date), the reminders stop, the partner receives its receipt, and the administrators are told the payment arrived. Nothing is written to the partner\'s invoice list here, so the list changes a moment after the answer, when Stripe\'s report arrives; an administrator never updates a status by hand. The invoice is named by its id in the partner\'s invoice list and must belong to this partner. An invoice Stripe already holds as paid is answered (`recorded: false`) and nothing happens again, so a double click or a retry is safe. An invoice Stripe holds as void, uncollectible or still a draft cannot be marked paid (409 `INVOICE_NOT_PAYABLE`), and one that was never issued through Stripe has nothing to mark (409 `INVOICE_HAS_NO_STRIPE_INVOICE`). The audit trail records who recorded it, with the optional `note` (a bank reference, say).
|
|
587
|
+
* Admin only. For an invoice that was paid by bank transfer, cheque or any other way outside Stripe. It marks the invoice paid in Stripe (`paid_out_of_band`), and Stripe then reports the payment exactly as it reports a card payment: the partner\'s invoice list is brought up to date (status and paid date), the reminders stop, the partner receives its receipt, and the administrators are told the payment arrived. An invoice that was issued for credits (`credits` on `issuePartnerInvoice`) also adds them to the partner administrator\'s account at that moment, once. Nothing is written to the partner\'s invoice list here, so the list changes a moment after the answer, when Stripe\'s report arrives; an administrator never updates a status by hand. The invoice is named by its id in the partner\'s invoice list and must belong to this partner. An invoice Stripe already holds as paid is answered (`recorded: false`) and nothing happens again, so a double click or a retry is safe. An invoice Stripe holds as void, uncollectible or still a draft cannot be marked paid (409 `INVOICE_NOT_PAYABLE`), and one that was never issued through Stripe has nothing to mark (409 `INVOICE_HAS_NO_STRIPE_INVOICE`). The audit trail records who recorded it, with the optional `note` (a bank reference, say).
|
|
596
588
|
* Record a payment that arrived outside Stripe
|
|
597
589
|
*/
|
|
598
590
|
recordPartnerInvoicePayment(requestParameters, initOverrides) {
|
|
@@ -602,49 +594,8 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
602
594
|
});
|
|
603
595
|
}
|
|
604
596
|
/**
|
|
605
|
-
* Admin only.
|
|
606
|
-
*
|
|
607
|
-
*/
|
|
608
|
-
refundPartnerCreditsRaw(requestParameters, initOverrides) {
|
|
609
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
610
|
-
if (requestParameters['refundPartnerCreditsRequest'] == null) {
|
|
611
|
-
throw new runtime.RequiredError('refundPartnerCreditsRequest', 'Required parameter "refundPartnerCreditsRequest" was null or undefined when calling refundPartnerCredits().');
|
|
612
|
-
}
|
|
613
|
-
const queryParameters = {};
|
|
614
|
-
const headerParameters = {};
|
|
615
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
616
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
617
|
-
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
618
|
-
}
|
|
619
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
620
|
-
const token = this.configuration.accessToken;
|
|
621
|
-
const tokenString = yield token("apiKeyAuth", []);
|
|
622
|
-
if (tokenString) {
|
|
623
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
const response = yield this.request({
|
|
627
|
-
path: `/admin/billing/refund`,
|
|
628
|
-
method: 'POST',
|
|
629
|
-
headers: headerParameters,
|
|
630
|
-
query: queryParameters,
|
|
631
|
-
body: RefundPartnerCreditsRequestToJSON(requestParameters['refundPartnerCreditsRequest']),
|
|
632
|
-
}, initOverrides);
|
|
633
|
-
return new runtime.VoidApiResponse(response);
|
|
634
|
-
});
|
|
635
|
-
}
|
|
636
|
-
/**
|
|
637
|
-
* Admin only. Adds `amount` credits to the partner wallet as a refund. The `Idempotency-Key` header is required: a retry with the same key replays the first refund instead of issuing a second one. A refund is held to the same ceiling as a top-up: **at most $100,000 per operation** (1,000,000 credits at $0.10 per credit). A larger amount is refused with 400 and nothing is credited.
|
|
638
|
-
* Credit a partner\'s wallet back with a refund
|
|
639
|
-
*/
|
|
640
|
-
refundPartnerCredits(requestParameters, initOverrides) {
|
|
641
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
642
|
-
yield this.refundPartnerCreditsRaw(requestParameters, initOverrides);
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* Admin only. Every field is optional; send the ones to change. The profile fields (`name`, `email`, `webhookUrl`, `allowedDomains`, `billingSettings`) are stored on the partner. `autoReloadAmount` and `autoReloadThreshold` are stored with the partner\'s auto-reload settings, which are a different record: an edit to one of them keeps the other and the rest of the configuration. `creditBalance` is a **target balance**, not a stored value. The wallet is moved by the difference between it and the balance the ledger holds now, as a ledger row, by the same keyed path `POST /admin/partners/{partnerId}/credits` uses. So a request that sets it **must** carry an `Idempotency-Key` (a request without one is refused with 400 and changes nothing, not even the fields beside it), a top-up is held to the same ceiling of $100,000 per operation, and a retry with the same key replays the first result instead of moving the wallet twice. `notes` becomes the reason on that ledger row. A request that sets no balance needs no key. `isActive` only flips the switch, and goes through the same check as `PUT /admin/partners/{partnerId}/status`: activating a partner that was never activated is refused with 409 `PARTNER_NOT_READY` until its contract and storage destination are in place, and the fields beside it are not written when it is refused. To pause a partner with a recorded reason, or to resume one so that everything the pause turned off is restored, use `PUT /admin/partners/{partnerId}/status`. The response is the partner as it is after the edit; `creditAdjustment` and `autoReload` report what was done to the wallet and the settings, when the request touched them.
|
|
647
|
-
* Edit a partner\'s profile, wallet balance or auto-reload settings
|
|
597
|
+
* Admin only. Every field is optional; send the ones to change. The profile fields (`name`, `email`, `webhookUrl`, `allowedDomains`, `platformDomain`, `billingSettings`) are stored on the partner. This route no longer touches the partner\'s wallet, and four fields it used to accept are retired: `autoReloadAmount` and `autoReloadThreshold` (a wallet is not reloaded automatically), `creditBalance` (a wallet is not set to a balance by hand) and `notes` (the reason that went with a balance change). A request that carries any of them is refused with 400 that names it, and nothing in the request is written, not even the fields beside it. Credits come with a paid partner invoice (`POST /admin-billing/partner/{partnerId}/invoice` with `credits`), and they are added to the partner\'s administrator\'s account; a clawback of them is made on that account, with `POST /admin/billing/credits/adjust`. `isActive` only flips the switch, and goes through the same check as `PUT /admin/partners/{partnerId}/status`: activating a partner that was never activated is refused with 409 `PARTNER_NOT_READY` until its contract and storage destination are in place, and the fields beside it are not written when it is refused. To pause a partner with a recorded reason, or to resume one so that everything the pause turned off is restored, use `PUT /admin/partners/{partnerId}/status`. The response is the partner as it is after the edit.
|
|
598
|
+
* Edit a partner\'s profile
|
|
648
599
|
*/
|
|
649
600
|
updatePartnerRaw(requestParameters, initOverrides) {
|
|
650
601
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -678,8 +629,8 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
678
629
|
});
|
|
679
630
|
}
|
|
680
631
|
/**
|
|
681
|
-
* Admin only. Every field is optional; send the ones to change. The profile fields (`name`, `email`, `webhookUrl`, `allowedDomains`, `billingSettings`) are stored on the partner.
|
|
682
|
-
* Edit a partner\'s profile
|
|
632
|
+
* Admin only. Every field is optional; send the ones to change. The profile fields (`name`, `email`, `webhookUrl`, `allowedDomains`, `platformDomain`, `billingSettings`) are stored on the partner. This route no longer touches the partner\'s wallet, and four fields it used to accept are retired: `autoReloadAmount` and `autoReloadThreshold` (a wallet is not reloaded automatically), `creditBalance` (a wallet is not set to a balance by hand) and `notes` (the reason that went with a balance change). A request that carries any of them is refused with 400 that names it, and nothing in the request is written, not even the fields beside it. Credits come with a paid partner invoice (`POST /admin-billing/partner/{partnerId}/invoice` with `credits`), and they are added to the partner\'s administrator\'s account; a clawback of them is made on that account, with `POST /admin/billing/credits/adjust`. `isActive` only flips the switch, and goes through the same check as `PUT /admin/partners/{partnerId}/status`: activating a partner that was never activated is refused with 409 `PARTNER_NOT_READY` until its contract and storage destination are in place, and the fields beside it are not written when it is refused. To pause a partner with a recorded reason, or to resume one so that everything the pause turned off is restored, use `PUT /admin/partners/{partnerId}/status`. The response is the partner as it is after the edit.
|
|
633
|
+
* Edit a partner\'s profile
|
|
683
634
|
*/
|
|
684
635
|
updatePartner(requestParameters, initOverrides) {
|
|
685
636
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -772,7 +723,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
772
723
|
});
|
|
773
724
|
}
|
|
774
725
|
/**
|
|
775
|
-
* Admin only. Sets the partner\'s standing (the `status` field every partner response carries). - `active` activates a new partner, or resumes a paused one: it is switched on, and a suspension\'s reason and time are cleared. **Activating a partner that was never activated (or was deactivated) is refused with 409 `PARTNER_NOT_READY` until a contract is in force and a verified storage destination is set** (`error.details.requirements` lists each, and `GET /admin/partners/{partnerId}/activation` reads them without changing anything). Resuming a paused partner is never held up by that. It also records the partner plan on the partner\'s administrator again if that was missing (a partner created before the plan was recorded, or whose write failed); if that could not be done the partner is still reinstated and `warnings` says so. - `inactive` switches the partner off without a reason; a suspension\'s reason and time are cleared, so a partner moved from suspended to inactive is no longer reported as suspended. - `suspended` is the pause: it switches the partner off and records `reason` (default `Suspended by admin`) and the time. It is manual only. An unpaid invoice is chased and reported to the administrators,
|
|
726
|
+
* Admin only. Sets the partner\'s standing (the `status` field every partner response carries). - `active` activates a new partner, or resumes a paused one: it is switched on, and a suspension\'s reason and time are cleared. **Activating a partner that was never activated (or was deactivated) is refused with 409 `PARTNER_NOT_READY` until a contract is in force and a verified storage destination is set** (`error.details.requirements` lists each, and `GET /admin/partners/{partnerId}/activation` reads them without changing anything). Resuming a paused partner is never held up by that. It also records the partner plan on the partner\'s administrator again if that was missing (a partner created before the plan was recorded, or whose write failed); if that could not be done the partner is still reinstated and `warnings` says so. - `inactive` switches the partner off without a reason; a suspension\'s reason and time are cleared, so a partner moved from suspended to inactive is no longer reported as suspended. - `suspended` is the pause: it switches the partner off and records `reason` (default `Suspended by admin`) and the time. It is manual only. An unpaid invoice is chased and reported to the administrators, and never pauses a partner by itself: a contract invoice left unpaid past its due date STOPS the partner on its own from the day after (standing `payment_arrears`, refused with 403 `PARTNER_PAYMENT_ARREARS`). That records nothing on the partner and is not a status you set: it ends the moment the invoice is paid, voided or written off, and an invoice for extra credits never causes it. While a partner is not `active` it is unusable, and what it published is not served: its embeds answer as if they did not exist, editor sessions are refused, its customers cannot create or generate anything, and every write or generation by its API key is refused with 403 `PARTNER_SUSPENDED` (or `PARTNER_INACTIVE`). This takes hold within 15 seconds at most, on every instance. The partner\'s own administrator can still sign in and use billing, invoices, credits, the contract and notifications. Resuming the partner restores everything, with no new token for a customer. A person who administers two partners is served while either is active, and an administrator account that also holds a subscription of its own is served on that. Sending the standing the partner already has is accepted; for `suspended` it replaces the recorded reason and time.
|
|
776
727
|
* Activate, deactivate or suspend a partner
|
|
777
728
|
*/
|
|
778
729
|
updatePartnerStatusRaw(requestParameters, initOverrides) {
|
|
@@ -804,7 +755,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
804
755
|
});
|
|
805
756
|
}
|
|
806
757
|
/**
|
|
807
|
-
* Admin only. Sets the partner\'s standing (the `status` field every partner response carries). - `active` activates a new partner, or resumes a paused one: it is switched on, and a suspension\'s reason and time are cleared. **Activating a partner that was never activated (or was deactivated) is refused with 409 `PARTNER_NOT_READY` until a contract is in force and a verified storage destination is set** (`error.details.requirements` lists each, and `GET /admin/partners/{partnerId}/activation` reads them without changing anything). Resuming a paused partner is never held up by that. It also records the partner plan on the partner\'s administrator again if that was missing (a partner created before the plan was recorded, or whose write failed); if that could not be done the partner is still reinstated and `warnings` says so. - `inactive` switches the partner off without a reason; a suspension\'s reason and time are cleared, so a partner moved from suspended to inactive is no longer reported as suspended. - `suspended` is the pause: it switches the partner off and records `reason` (default `Suspended by admin`) and the time. It is manual only. An unpaid invoice is chased and reported to the administrators,
|
|
758
|
+
* Admin only. Sets the partner\'s standing (the `status` field every partner response carries). - `active` activates a new partner, or resumes a paused one: it is switched on, and a suspension\'s reason and time are cleared. **Activating a partner that was never activated (or was deactivated) is refused with 409 `PARTNER_NOT_READY` until a contract is in force and a verified storage destination is set** (`error.details.requirements` lists each, and `GET /admin/partners/{partnerId}/activation` reads them without changing anything). Resuming a paused partner is never held up by that. It also records the partner plan on the partner\'s administrator again if that was missing (a partner created before the plan was recorded, or whose write failed); if that could not be done the partner is still reinstated and `warnings` says so. - `inactive` switches the partner off without a reason; a suspension\'s reason and time are cleared, so a partner moved from suspended to inactive is no longer reported as suspended. - `suspended` is the pause: it switches the partner off and records `reason` (default `Suspended by admin`) and the time. It is manual only. An unpaid invoice is chased and reported to the administrators, and never pauses a partner by itself: a contract invoice left unpaid past its due date STOPS the partner on its own from the day after (standing `payment_arrears`, refused with 403 `PARTNER_PAYMENT_ARREARS`). That records nothing on the partner and is not a status you set: it ends the moment the invoice is paid, voided or written off, and an invoice for extra credits never causes it. While a partner is not `active` it is unusable, and what it published is not served: its embeds answer as if they did not exist, editor sessions are refused, its customers cannot create or generate anything, and every write or generation by its API key is refused with 403 `PARTNER_SUSPENDED` (or `PARTNER_INACTIVE`). This takes hold within 15 seconds at most, on every instance. The partner\'s own administrator can still sign in and use billing, invoices, credits, the contract and notifications. Resuming the partner restores everything, with no new token for a customer. A person who administers two partners is served while either is active, and an administrator account that also holds a subscription of its own is served on that. Sending the standing the partner already has is accepted; for `suspended` it replaces the recorded reason and time.
|
|
808
759
|
* Activate, deactivate or suspend a partner
|
|
809
760
|
*/
|
|
810
761
|
updatePartnerStatus(requestParameters, initOverrides) {
|
|
@@ -319,12 +319,12 @@ export declare class AdminBillingApi extends runtime.BaseAPI {
|
|
|
319
319
|
*/
|
|
320
320
|
adminBillingTeamsSearchGet(requestParameters?: AdminBillingTeamsSearchGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
321
321
|
/**
|
|
322
|
-
* Issues a Stripe invoice to a partner and has Stripe email it to the partner\'s billing address (the first billing email on its billing profile, else its contact email). The price is the contract price on the partner\'s customization unless `amountUsd` is given; the partner must have a contract either way. The invoice is addressed to the legal name on the billing profile (else the partner\'s name) and is due after the payment terms on it (
|
|
322
|
+
* Issues a Stripe invoice to a partner and has Stripe email it to the partner\'s billing address (the first billing email on its billing profile, else its contact email). The price is the contract price on the partner\'s customization unless `amountUsd` is given (or `credits`, see CREDITS below); the partner must have a contract either way. The invoice is addressed to the legal name on the billing profile (else the partner\'s name) and is due after the payment terms on it (7 days until they are set) unless `daysUntilDue` says otherwise. TAX. Stripe Tax works the tax out from the billing address on the profile, and a valid tax ID on it turns the tax of a business abroad into the reverse charge. The response says what the price, the tax and the total are. When Stripe cannot place the partner, the invoice is still issued, without tax, and `taxNote` says so. A tax ID Stripe does not accept is refused with 422 `TAX_ID_INVALID` before anything is issued. CREDITS. This is how a partner gets credits: it pays an invoice for them. Give `credits` and the invoice is for that many Widgetic credits (priced at the list price of a credit unless `amountUsd` is given). They are added to the account of the partner\'s administrator, where the partner\'s builds are charged, when the invoice is paid, whether the partner pays it or an administrator records a payment received outside Stripe, and once per invoice however often Stripe reports the payment. Nothing is added while the invoice is open, void or uncollectible. There is no cap of ours: the invoice is the limit (Stripe\'s own limits on the amount of a payment still apply). An invoice issued without `credits` adds none, whatever its price. A partner with no administrator account cannot be invoiced for credits (422 `NO_PARTNER_ADMINISTRATOR`). The invoice is recorded in the partner\'s invoice list (`getInvoicesByPartnerId`) as `open`, and follows what Stripe reports from then on: `failed` (with the reason) when a payment fails, `paid` when it is paid (also when an administrator records a payment received outside Stripe), `void` when it is voided and `uncollectible` when it is written off. Nobody has to update a status by hand. An `Idempotency-Key` is required, and it is what makes a retry safe: the same key with the same body returns the invoice already issued, the same key with a different body is refused with 422, and a duplicate that arrives while the first is still running is refused with 409. Use one key per invoice you mean to send, and a new key for the next one. Every invoice issued is written to the billing audit log under the administrator who issued it.
|
|
323
323
|
* Issue a contract invoice to a partner
|
|
324
324
|
*/
|
|
325
325
|
issuePartnerInvoiceRaw(requestParameters: IssuePartnerInvoiceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IssuedPartnerInvoice>>;
|
|
326
326
|
/**
|
|
327
|
-
* Issues a Stripe invoice to a partner and has Stripe email it to the partner\'s billing address (the first billing email on its billing profile, else its contact email). The price is the contract price on the partner\'s customization unless `amountUsd` is given; the partner must have a contract either way. The invoice is addressed to the legal name on the billing profile (else the partner\'s name) and is due after the payment terms on it (
|
|
327
|
+
* Issues a Stripe invoice to a partner and has Stripe email it to the partner\'s billing address (the first billing email on its billing profile, else its contact email). The price is the contract price on the partner\'s customization unless `amountUsd` is given (or `credits`, see CREDITS below); the partner must have a contract either way. The invoice is addressed to the legal name on the billing profile (else the partner\'s name) and is due after the payment terms on it (7 days until they are set) unless `daysUntilDue` says otherwise. TAX. Stripe Tax works the tax out from the billing address on the profile, and a valid tax ID on it turns the tax of a business abroad into the reverse charge. The response says what the price, the tax and the total are. When Stripe cannot place the partner, the invoice is still issued, without tax, and `taxNote` says so. A tax ID Stripe does not accept is refused with 422 `TAX_ID_INVALID` before anything is issued. CREDITS. This is how a partner gets credits: it pays an invoice for them. Give `credits` and the invoice is for that many Widgetic credits (priced at the list price of a credit unless `amountUsd` is given). They are added to the account of the partner\'s administrator, where the partner\'s builds are charged, when the invoice is paid, whether the partner pays it or an administrator records a payment received outside Stripe, and once per invoice however often Stripe reports the payment. Nothing is added while the invoice is open, void or uncollectible. There is no cap of ours: the invoice is the limit (Stripe\'s own limits on the amount of a payment still apply). An invoice issued without `credits` adds none, whatever its price. A partner with no administrator account cannot be invoiced for credits (422 `NO_PARTNER_ADMINISTRATOR`). The invoice is recorded in the partner\'s invoice list (`getInvoicesByPartnerId`) as `open`, and follows what Stripe reports from then on: `failed` (with the reason) when a payment fails, `paid` when it is paid (also when an administrator records a payment received outside Stripe), `void` when it is voided and `uncollectible` when it is written off. Nobody has to update a status by hand. An `Idempotency-Key` is required, and it is what makes a retry safe: the same key with the same body returns the invoice already issued, the same key with a different body is refused with 422, and a duplicate that arrives while the first is still running is refused with 409. Use one key per invoice you mean to send, and a new key for the next one. Every invoice issued is written to the billing audit log under the administrator who issued it.
|
|
328
328
|
* Issue a contract invoice to a partner
|
|
329
329
|
*/
|
|
330
330
|
issuePartnerInvoice(requestParameters: IssuePartnerInvoiceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IssuedPartnerInvoice>;
|
|
@@ -961,7 +961,7 @@ export class AdminBillingApi extends runtime.BaseAPI {
|
|
|
961
961
|
});
|
|
962
962
|
}
|
|
963
963
|
/**
|
|
964
|
-
* Issues a Stripe invoice to a partner and has Stripe email it to the partner\'s billing address (the first billing email on its billing profile, else its contact email). The price is the contract price on the partner\'s customization unless `amountUsd` is given; the partner must have a contract either way. The invoice is addressed to the legal name on the billing profile (else the partner\'s name) and is due after the payment terms on it (
|
|
964
|
+
* Issues a Stripe invoice to a partner and has Stripe email it to the partner\'s billing address (the first billing email on its billing profile, else its contact email). The price is the contract price on the partner\'s customization unless `amountUsd` is given (or `credits`, see CREDITS below); the partner must have a contract either way. The invoice is addressed to the legal name on the billing profile (else the partner\'s name) and is due after the payment terms on it (7 days until they are set) unless `daysUntilDue` says otherwise. TAX. Stripe Tax works the tax out from the billing address on the profile, and a valid tax ID on it turns the tax of a business abroad into the reverse charge. The response says what the price, the tax and the total are. When Stripe cannot place the partner, the invoice is still issued, without tax, and `taxNote` says so. A tax ID Stripe does not accept is refused with 422 `TAX_ID_INVALID` before anything is issued. CREDITS. This is how a partner gets credits: it pays an invoice for them. Give `credits` and the invoice is for that many Widgetic credits (priced at the list price of a credit unless `amountUsd` is given). They are added to the account of the partner\'s administrator, where the partner\'s builds are charged, when the invoice is paid, whether the partner pays it or an administrator records a payment received outside Stripe, and once per invoice however often Stripe reports the payment. Nothing is added while the invoice is open, void or uncollectible. There is no cap of ours: the invoice is the limit (Stripe\'s own limits on the amount of a payment still apply). An invoice issued without `credits` adds none, whatever its price. A partner with no administrator account cannot be invoiced for credits (422 `NO_PARTNER_ADMINISTRATOR`). The invoice is recorded in the partner\'s invoice list (`getInvoicesByPartnerId`) as `open`, and follows what Stripe reports from then on: `failed` (with the reason) when a payment fails, `paid` when it is paid (also when an administrator records a payment received outside Stripe), `void` when it is voided and `uncollectible` when it is written off. Nobody has to update a status by hand. An `Idempotency-Key` is required, and it is what makes a retry safe: the same key with the same body returns the invoice already issued, the same key with a different body is refused with 422, and a duplicate that arrives while the first is still running is refused with 409. Use one key per invoice you mean to send, and a new key for the next one. Every invoice issued is written to the billing audit log under the administrator who issued it.
|
|
965
965
|
* Issue a contract invoice to a partner
|
|
966
966
|
*/
|
|
967
967
|
issuePartnerInvoiceRaw(requestParameters, initOverrides) {
|
|
@@ -993,7 +993,7 @@ export class AdminBillingApi extends runtime.BaseAPI {
|
|
|
993
993
|
});
|
|
994
994
|
}
|
|
995
995
|
/**
|
|
996
|
-
* Issues a Stripe invoice to a partner and has Stripe email it to the partner\'s billing address (the first billing email on its billing profile, else its contact email). The price is the contract price on the partner\'s customization unless `amountUsd` is given; the partner must have a contract either way. The invoice is addressed to the legal name on the billing profile (else the partner\'s name) and is due after the payment terms on it (
|
|
996
|
+
* Issues a Stripe invoice to a partner and has Stripe email it to the partner\'s billing address (the first billing email on its billing profile, else its contact email). The price is the contract price on the partner\'s customization unless `amountUsd` is given (or `credits`, see CREDITS below); the partner must have a contract either way. The invoice is addressed to the legal name on the billing profile (else the partner\'s name) and is due after the payment terms on it (7 days until they are set) unless `daysUntilDue` says otherwise. TAX. Stripe Tax works the tax out from the billing address on the profile, and a valid tax ID on it turns the tax of a business abroad into the reverse charge. The response says what the price, the tax and the total are. When Stripe cannot place the partner, the invoice is still issued, without tax, and `taxNote` says so. A tax ID Stripe does not accept is refused with 422 `TAX_ID_INVALID` before anything is issued. CREDITS. This is how a partner gets credits: it pays an invoice for them. Give `credits` and the invoice is for that many Widgetic credits (priced at the list price of a credit unless `amountUsd` is given). They are added to the account of the partner\'s administrator, where the partner\'s builds are charged, when the invoice is paid, whether the partner pays it or an administrator records a payment received outside Stripe, and once per invoice however often Stripe reports the payment. Nothing is added while the invoice is open, void or uncollectible. There is no cap of ours: the invoice is the limit (Stripe\'s own limits on the amount of a payment still apply). An invoice issued without `credits` adds none, whatever its price. A partner with no administrator account cannot be invoiced for credits (422 `NO_PARTNER_ADMINISTRATOR`). The invoice is recorded in the partner\'s invoice list (`getInvoicesByPartnerId`) as `open`, and follows what Stripe reports from then on: `failed` (with the reason) when a payment fails, `paid` when it is paid (also when an administrator records a payment received outside Stripe), `void` when it is voided and `uncollectible` when it is written off. Nobody has to update a status by hand. An `Idempotency-Key` is required, and it is what makes a retry safe: the same key with the same body returns the invoice already issued, the same key with a different body is refused with 422, and a duplicate that arrives while the first is still running is refused with 409. Use one key per invoice you mean to send, and a new key for the next one. Every invoice issued is written to the billing audit log under the administrator who issued it.
|
|
997
997
|
* Issue a contract invoice to a partner
|
|
998
998
|
*/
|
|
999
999
|
issuePartnerInvoice(requestParameters, initOverrides) {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BillingPricingGet200Response, BillingUsersUserIdInvoicesGet200Response, BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200Response, BillingUsersUserIdPortalPostRequest, BillingUsersUserIdSubscriptionCancelPost200Response, BillingUsersUserIdSubscriptionCancelPostRequest, BillingUsersUserIdSubscriptionGet200Response, BillingUsersUserIdSubscriptionPayPost200Response, BillingUsersUserIdSubscriptionPost200Response, BillingUsersUserIdSubscriptionPostRequest, OrganizationsOrgIdBillingPaymentMethodsGet200Response, OrganizationsOrgIdBillingPaymentMethodsPost200Response, OrganizationsOrgIdBillingPaymentMethodsPostRequest, OrganizationsOrgIdBillingPaymentMethodsSetupIntentPost200Response, OrganizationsOrgIdBillingPortalPost200Response, UploadsIdDelete200Response } from '../models/index';
|
|
13
|
+
import type { BillingPricingGet200Response, BillingUsersUserIdInvoicesGet200Response, BillingUsersUserIdPaymentMethodsPaymentMethodIdDefaultPut200Response, BillingUsersUserIdPortalPostRequest, BillingUsersUserIdStorageCancelPackPostRequest, BillingUsersUserIdStorageGet200Response, BillingUsersUserIdSubscriptionCancelPost200Response, BillingUsersUserIdSubscriptionCancelPostRequest, BillingUsersUserIdSubscriptionGet200Response, BillingUsersUserIdSubscriptionPayPost200Response, BillingUsersUserIdSubscriptionPost200Response, BillingUsersUserIdSubscriptionPostRequest, OrganizationsOrgIdBillingPaymentMethodsGet200Response, OrganizationsOrgIdBillingPaymentMethodsPost200Response, OrganizationsOrgIdBillingPaymentMethodsPostRequest, OrganizationsOrgIdBillingPaymentMethodsSetupIntentPost200Response, OrganizationsOrgIdBillingPortalPost200Response, PurchaseStoragePack200Response, PurchaseStoragePackRequest, UploadsIdDelete200Response } from '../models/index';
|
|
14
14
|
export interface BillingUsersUserIdInvoicesGetRequest {
|
|
15
15
|
userId: string;
|
|
16
16
|
limit?: number;
|
|
@@ -40,6 +40,19 @@ export interface BillingUsersUserIdPortalPostOperationRequest {
|
|
|
40
40
|
idempotencyKey?: string;
|
|
41
41
|
billingUsersUserIdPortalPostRequest?: BillingUsersUserIdPortalPostRequest;
|
|
42
42
|
}
|
|
43
|
+
export interface BillingUsersUserIdStorageCancelPackPostOperationRequest {
|
|
44
|
+
userId: string;
|
|
45
|
+
billingUsersUserIdStorageCancelPackPostRequest: BillingUsersUserIdStorageCancelPackPostRequest;
|
|
46
|
+
idempotencyKey?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface BillingUsersUserIdStorageGetRequest {
|
|
49
|
+
userId: string;
|
|
50
|
+
}
|
|
51
|
+
export interface BillingUsersUserIdStoragePurchasePackPostRequest {
|
|
52
|
+
userId: string;
|
|
53
|
+
purchaseStoragePackRequest: PurchaseStoragePackRequest;
|
|
54
|
+
idempotencyKey?: string;
|
|
55
|
+
}
|
|
43
56
|
export interface BillingUsersUserIdSubscriptionCancelPostOperationRequest {
|
|
44
57
|
userId: string;
|
|
45
58
|
idempotencyKey?: string;
|
|
@@ -129,6 +142,36 @@ export declare class BillingApi extends runtime.BaseAPI {
|
|
|
129
142
|
* Create a Stripe billing portal session for managing cards and invoices
|
|
130
143
|
*/
|
|
131
144
|
billingUsersUserIdPortalPost(requestParameters: BillingUsersUserIdPortalPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationsOrgIdBillingPortalPost200Response>;
|
|
145
|
+
/**
|
|
146
|
+
* Gives back extra storage: removes `pack_size_gb` GB from the person\'s storage add-on, or all of it with `remove_all`. The add-on stops billing for the GB removed; what was already paid for the rest of the current period is credited on the next invoice. Removing storage does not delete files. A person who holds more than their limit afterwards can read and delete what they have but cannot upload until they are back under the limit. Send either `pack_size_gb` or `remove_all: true`, not both. The `Idempotency-Key` header is required and names this change: a retry with the same key replays the first result. Removing is allowed on an overdue subscription and on one that ends with the period, so a person is never stuck paying for storage they want to drop. Users can only change their own storage.
|
|
147
|
+
* Remove Extra Storage from Your Own Storage
|
|
148
|
+
*/
|
|
149
|
+
billingUsersUserIdStorageCancelPackPostRaw(requestParameters: BillingUsersUserIdStorageCancelPackPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PurchaseStoragePack200Response>>;
|
|
150
|
+
/**
|
|
151
|
+
* Gives back extra storage: removes `pack_size_gb` GB from the person\'s storage add-on, or all of it with `remove_all`. The add-on stops billing for the GB removed; what was already paid for the rest of the current period is credited on the next invoice. Removing storage does not delete files. A person who holds more than their limit afterwards can read and delete what they have but cannot upload until they are back under the limit. Send either `pack_size_gb` or `remove_all: true`, not both. The `Idempotency-Key` header is required and names this change: a retry with the same key replays the first result. Removing is allowed on an overdue subscription and on one that ends with the period, so a person is never stuck paying for storage they want to drop. Users can only change their own storage.
|
|
152
|
+
* Remove Extra Storage from Your Own Storage
|
|
153
|
+
*/
|
|
154
|
+
billingUsersUserIdStorageCancelPackPost(requestParameters: BillingUsersUserIdStorageCancelPackPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PurchaseStoragePack200Response>;
|
|
155
|
+
/**
|
|
156
|
+
* Returns a person\'s own storage and the extra storage they can add to it on Solo, in one call: the limit the upload check holds their own workspace to (plan plus extra storage), what they have stored, the extra storage they hold (one row per storage item on the subscription) and what it costs per billing period, and whether storage can be added or removed right now (`extraStorage.canAdd` and `extraStorage.canRemove`) with the reason when it cannot (`extraStorage.addBlockedReason`; its codes are the ones the purchase request answers with). A partner account is never offered extra storage (`PARTNER_STORAGE_NOT_SOLD`): its files are kept in its own storage destination. This is the person\'s OWN workspace. The storage of a team they belong to is the team\'s pool, read with `GET /organizations/{orgId}/storage/usage`; extra storage bought here does not add to it. Users can only read their own storage; internal callers can read anyone\'s.
|
|
157
|
+
* Get Your Own Storage and Extra Storage
|
|
158
|
+
*/
|
|
159
|
+
billingUsersUserIdStorageGetRaw(requestParameters: BillingUsersUserIdStorageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingUsersUserIdStorageGet200Response>>;
|
|
160
|
+
/**
|
|
161
|
+
* Returns a person\'s own storage and the extra storage they can add to it on Solo, in one call: the limit the upload check holds their own workspace to (plan plus extra storage), what they have stored, the extra storage they hold (one row per storage item on the subscription) and what it costs per billing period, and whether storage can be added or removed right now (`extraStorage.canAdd` and `extraStorage.canRemove`) with the reason when it cannot (`extraStorage.addBlockedReason`; its codes are the ones the purchase request answers with). A partner account is never offered extra storage (`PARTNER_STORAGE_NOT_SOLD`): its files are kept in its own storage destination. This is the person\'s OWN workspace. The storage of a team they belong to is the team\'s pool, read with `GET /organizations/{orgId}/storage/usage`; extra storage bought here does not add to it. Users can only read their own storage; internal callers can read anyone\'s.
|
|
162
|
+
* Get Your Own Storage and Extra Storage
|
|
163
|
+
*/
|
|
164
|
+
billingUsersUserIdStorageGet(requestParameters: BillingUsersUserIdStorageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingUsersUserIdStorageGet200Response>;
|
|
165
|
+
/**
|
|
166
|
+
* Adds extra storage to the person\'s own Solo subscription. Extra storage is a RECURRING add-on, not a one-time purchase: it is one more item on the same subscription as the plan, billed every period (per GB per month on a monthly subscription, per GB per year on a yearly one) until it is removed or the subscription ends. The GB are charged now, prorated for the rest of the current period, to the subscription\'s payment method, and join the person\'s own storage as soon as the charge succeeds. If the charge fails (for example a declined card) nothing is added and the request is refused with 402 `PAYMENT_FAILED`. Storage is sold in packs (the pricing payload\'s `storage.defaultPackSizeGb`, 50 GB). Ask for as many packs as you need in one request by sending a multiple of the pack size: `pack_size_gb: 50` is one pack, `100` is two, `500` is ten. `pack_size_gb` is added to what the person already has, so buying again adds more. Remove storage with `POST /billing/users/{userId}/storage/cancel-pack`. The extra storage adds to the person\'s OWN workspace only. It is not shared with a team the person belongs to: a team\'s storage is the team\'s pool, and its admins buy storage for it. The `Idempotency-Key` header is required and names this change: a retry with the same key replays the first result instead of adding the storage twice. A refused request gives the key back: after a declined card (402 `PAYMENT_FAILED`), fix the payment method and send the request again with the same key. It is charged as a new attempt and is not answered with the old decline. Only a Solo subscription that Stripe bills and that is active can have extra storage. During the free trial the request is refused with 409 `TRIAL_NOT_ENDED` (storage added then would be free until the trial ends); a person with no Solo subscription is refused with a plan restriction pointing at Solo, and the owner account of a Shopify store (whose plan Shopify bills) with 409 `BILLED_THROUGH_SHOPIFY`. Users can only change their own storage. Extra storage is not sold to an account that administers a partner (403 `PARTNER_STORAGE_NOT_SOLD`): the files of a partner account are kept in the partner\'s own storage destination and never use Widgetic storage, so there would be nothing for the storage to add to. Giving storage back stays open to such an account.
|
|
167
|
+
* Add Extra Storage to Your Own Storage
|
|
168
|
+
*/
|
|
169
|
+
billingUsersUserIdStoragePurchasePackPostRaw(requestParameters: BillingUsersUserIdStoragePurchasePackPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PurchaseStoragePack200Response>>;
|
|
170
|
+
/**
|
|
171
|
+
* Adds extra storage to the person\'s own Solo subscription. Extra storage is a RECURRING add-on, not a one-time purchase: it is one more item on the same subscription as the plan, billed every period (per GB per month on a monthly subscription, per GB per year on a yearly one) until it is removed or the subscription ends. The GB are charged now, prorated for the rest of the current period, to the subscription\'s payment method, and join the person\'s own storage as soon as the charge succeeds. If the charge fails (for example a declined card) nothing is added and the request is refused with 402 `PAYMENT_FAILED`. Storage is sold in packs (the pricing payload\'s `storage.defaultPackSizeGb`, 50 GB). Ask for as many packs as you need in one request by sending a multiple of the pack size: `pack_size_gb: 50` is one pack, `100` is two, `500` is ten. `pack_size_gb` is added to what the person already has, so buying again adds more. Remove storage with `POST /billing/users/{userId}/storage/cancel-pack`. The extra storage adds to the person\'s OWN workspace only. It is not shared with a team the person belongs to: a team\'s storage is the team\'s pool, and its admins buy storage for it. The `Idempotency-Key` header is required and names this change: a retry with the same key replays the first result instead of adding the storage twice. A refused request gives the key back: after a declined card (402 `PAYMENT_FAILED`), fix the payment method and send the request again with the same key. It is charged as a new attempt and is not answered with the old decline. Only a Solo subscription that Stripe bills and that is active can have extra storage. During the free trial the request is refused with 409 `TRIAL_NOT_ENDED` (storage added then would be free until the trial ends); a person with no Solo subscription is refused with a plan restriction pointing at Solo, and the owner account of a Shopify store (whose plan Shopify bills) with 409 `BILLED_THROUGH_SHOPIFY`. Users can only change their own storage. Extra storage is not sold to an account that administers a partner (403 `PARTNER_STORAGE_NOT_SOLD`): the files of a partner account are kept in the partner\'s own storage destination and never use Widgetic storage, so there would be nothing for the storage to add to. Giving storage back stays open to such an account.
|
|
172
|
+
* Add Extra Storage to Your Own Storage
|
|
173
|
+
*/
|
|
174
|
+
billingUsersUserIdStoragePurchasePackPost(requestParameters: BillingUsersUserIdStoragePurchasePackPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PurchaseStoragePack200Response>;
|
|
132
175
|
/**
|
|
133
176
|
* Cancel the active subscription
|
|
134
177
|
*/
|