@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
package/dist/apis/BillingApi.js
CHANGED
|
@@ -324,6 +324,133 @@ class BillingApi extends runtime.BaseAPI {
|
|
|
324
324
|
return yield response.value();
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
|
+
/**
|
|
328
|
+
* 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.
|
|
329
|
+
* Remove Extra Storage from Your Own Storage
|
|
330
|
+
*/
|
|
331
|
+
billingUsersUserIdStorageCancelPackPostRaw(requestParameters, initOverrides) {
|
|
332
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
+
if (requestParameters['userId'] == null) {
|
|
334
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling billingUsersUserIdStorageCancelPackPost().');
|
|
335
|
+
}
|
|
336
|
+
if (requestParameters['billingUsersUserIdStorageCancelPackPostRequest'] == null) {
|
|
337
|
+
throw new runtime.RequiredError('billingUsersUserIdStorageCancelPackPostRequest', 'Required parameter "billingUsersUserIdStorageCancelPackPostRequest" was null or undefined when calling billingUsersUserIdStorageCancelPackPost().');
|
|
338
|
+
}
|
|
339
|
+
const queryParameters = {};
|
|
340
|
+
const headerParameters = {};
|
|
341
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
342
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
343
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
344
|
+
}
|
|
345
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
346
|
+
const token = this.configuration.accessToken;
|
|
347
|
+
const tokenString = yield token("bearerAuth", []);
|
|
348
|
+
if (tokenString) {
|
|
349
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
const response = yield this.request({
|
|
353
|
+
path: `/billing/users/{userId}/storage/cancel-pack`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
354
|
+
method: 'POST',
|
|
355
|
+
headers: headerParameters,
|
|
356
|
+
query: queryParameters,
|
|
357
|
+
body: (0, index_1.BillingUsersUserIdStorageCancelPackPostRequestToJSON)(requestParameters['billingUsersUserIdStorageCancelPackPostRequest']),
|
|
358
|
+
}, initOverrides);
|
|
359
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PurchaseStoragePack200ResponseFromJSON)(jsonValue));
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* 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.
|
|
364
|
+
* Remove Extra Storage from Your Own Storage
|
|
365
|
+
*/
|
|
366
|
+
billingUsersUserIdStorageCancelPackPost(requestParameters, initOverrides) {
|
|
367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
+
const response = yield this.billingUsersUserIdStorageCancelPackPostRaw(requestParameters, initOverrides);
|
|
369
|
+
return yield response.value();
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* 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.
|
|
374
|
+
* Get Your Own Storage and Extra Storage
|
|
375
|
+
*/
|
|
376
|
+
billingUsersUserIdStorageGetRaw(requestParameters, initOverrides) {
|
|
377
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
378
|
+
if (requestParameters['userId'] == null) {
|
|
379
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling billingUsersUserIdStorageGet().');
|
|
380
|
+
}
|
|
381
|
+
const queryParameters = {};
|
|
382
|
+
const headerParameters = {};
|
|
383
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
384
|
+
const token = this.configuration.accessToken;
|
|
385
|
+
const tokenString = yield token("bearerAuth", []);
|
|
386
|
+
if (tokenString) {
|
|
387
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
const response = yield this.request({
|
|
391
|
+
path: `/billing/users/{userId}/storage`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
392
|
+
method: 'GET',
|
|
393
|
+
headers: headerParameters,
|
|
394
|
+
query: queryParameters,
|
|
395
|
+
}, initOverrides);
|
|
396
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BillingUsersUserIdStorageGet200ResponseFromJSON)(jsonValue));
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* 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.
|
|
401
|
+
* Get Your Own Storage and Extra Storage
|
|
402
|
+
*/
|
|
403
|
+
billingUsersUserIdStorageGet(requestParameters, initOverrides) {
|
|
404
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
405
|
+
const response = yield this.billingUsersUserIdStorageGetRaw(requestParameters, initOverrides);
|
|
406
|
+
return yield response.value();
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* 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.
|
|
411
|
+
* Add Extra Storage to Your Own Storage
|
|
412
|
+
*/
|
|
413
|
+
billingUsersUserIdStoragePurchasePackPostRaw(requestParameters, initOverrides) {
|
|
414
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
415
|
+
if (requestParameters['userId'] == null) {
|
|
416
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling billingUsersUserIdStoragePurchasePackPost().');
|
|
417
|
+
}
|
|
418
|
+
if (requestParameters['purchaseStoragePackRequest'] == null) {
|
|
419
|
+
throw new runtime.RequiredError('purchaseStoragePackRequest', 'Required parameter "purchaseStoragePackRequest" was null or undefined when calling billingUsersUserIdStoragePurchasePackPost().');
|
|
420
|
+
}
|
|
421
|
+
const queryParameters = {};
|
|
422
|
+
const headerParameters = {};
|
|
423
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
424
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
425
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
426
|
+
}
|
|
427
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
428
|
+
const token = this.configuration.accessToken;
|
|
429
|
+
const tokenString = yield token("bearerAuth", []);
|
|
430
|
+
if (tokenString) {
|
|
431
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
const response = yield this.request({
|
|
435
|
+
path: `/billing/users/{userId}/storage/purchase-pack`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
436
|
+
method: 'POST',
|
|
437
|
+
headers: headerParameters,
|
|
438
|
+
query: queryParameters,
|
|
439
|
+
body: (0, index_1.PurchaseStoragePackRequestToJSON)(requestParameters['purchaseStoragePackRequest']),
|
|
440
|
+
}, initOverrides);
|
|
441
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PurchaseStoragePack200ResponseFromJSON)(jsonValue));
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* 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.
|
|
446
|
+
* Add Extra Storage to Your Own Storage
|
|
447
|
+
*/
|
|
448
|
+
billingUsersUserIdStoragePurchasePackPost(requestParameters, initOverrides) {
|
|
449
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
450
|
+
const response = yield this.billingUsersUserIdStoragePurchasePackPostRaw(requestParameters, initOverrides);
|
|
451
|
+
return yield response.value();
|
|
452
|
+
});
|
|
453
|
+
}
|
|
327
454
|
/**
|
|
328
455
|
* Cancel the active subscription
|
|
329
456
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CheckCompositionAccess200Response, Composition, CompositionEntriesDescription, CompositionEntriesReading, CreateCompositionContentItemRequest, CreateCompositionFromWidget201Response, DeleteCompositionContentItem200Response, DuplicateComposition202Response, DuplicateCompositionRequest, GetAllCompositions200Response, GetCompositionContentSchema200Response, GetCompositionDesignSchema200Response, GetCompositionEmbedSchema200Response, GetCompositionPreview200Response, GetCompositionVersions200Response, GetCompositionsBatch200Response, GetCompositionsBatchRequest, NewComposition, SetCompositionDataSourceRequest, SetDynamicContent200Response, SetDynamicContentRequest, UpdateComposition, UpdateCompositionStatusRequest, ValidateCompositionContent200Response } from '../models/index';
|
|
13
|
+
import type { CheckCompositionAccess200Response, Composition, CompositionDataSource, CompositionEntriesDescription, CompositionEntriesReading, CreateCompositionContentItemRequest, CreateCompositionFromWidget201Response, DeleteCompositionContentItem200Response, DeleteCompositionDataSource200Response, DuplicateComposition202Response, DuplicateCompositionRequest, GetAllCompositions200Response, GetCompositionContentSchema200Response, GetCompositionDesignSchema200Response, GetCompositionEmbedSchema200Response, GetCompositionPreview200Response, GetCompositionVersions200Response, GetCompositionsBatch200Response, GetCompositionsBatchRequest, NewComposition, SetCompositionDataSourceRequest, SetDynamicContent200Response, SetDynamicContentRequest, UpdateComposition, UpdateCompositionStatusRequest, ValidateCompositionContent200Response } from '../models/index';
|
|
14
14
|
export interface CheckCompositionAccessRequest {
|
|
15
15
|
id: string;
|
|
16
16
|
}
|
|
@@ -224,13 +224,15 @@ export declare class CompositionsApi extends runtime.BaseAPI {
|
|
|
224
224
|
*/
|
|
225
225
|
deleteCompositionContentItem(requestParameters: DeleteCompositionContentItem0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteCompositionContentItem200Response>;
|
|
226
226
|
/**
|
|
227
|
+
* Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
|
|
227
228
|
* Remove the composition data source binding
|
|
228
229
|
*/
|
|
229
|
-
deleteCompositionDataSourceRaw(requestParameters: DeleteCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
230
|
+
deleteCompositionDataSourceRaw(requestParameters: DeleteCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteCompositionDataSource200Response>>;
|
|
230
231
|
/**
|
|
232
|
+
* Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
|
|
231
233
|
* Remove the composition data source binding
|
|
232
234
|
*/
|
|
233
|
-
deleteCompositionDataSource(requestParameters: DeleteCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
235
|
+
deleteCompositionDataSource(requestParameters: DeleteCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteCompositionDataSource200Response>;
|
|
234
236
|
/**
|
|
235
237
|
* Deletes a specific record from a table in the composition\'s database.
|
|
236
238
|
* Delete Record From Composition Database
|
|
@@ -282,12 +284,12 @@ export declare class CompositionsApi extends runtime.BaseAPI {
|
|
|
282
284
|
*/
|
|
283
285
|
getAllCompositions(requestParameters?: GetAllCompositions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllCompositions200Response>;
|
|
284
286
|
/**
|
|
285
|
-
* Retrieves a specific composition by its ID.
|
|
287
|
+
* Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
|
|
286
288
|
* Get Composition
|
|
287
289
|
*/
|
|
288
290
|
getCompositionByIdRaw(requestParameters: GetCompositionById0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateCompositionFromWidget201Response>>;
|
|
289
291
|
/**
|
|
290
|
-
* Retrieves a specific composition by its ID.
|
|
292
|
+
* Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
|
|
291
293
|
* Get Composition
|
|
292
294
|
*/
|
|
293
295
|
getCompositionById(requestParameters: GetCompositionById0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateCompositionFromWidget201Response>;
|
|
@@ -312,13 +314,15 @@ export declare class CompositionsApi extends runtime.BaseAPI {
|
|
|
312
314
|
*/
|
|
313
315
|
getCompositionContent(requestParameters: GetCompositionContent0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
314
316
|
/**
|
|
317
|
+
* The data source that is bound to the composition: `url` and `refreshSeconds`. The answer\'s `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
|
|
315
318
|
* Read the composition data source binding
|
|
316
319
|
*/
|
|
317
|
-
getCompositionDataSourceRaw(requestParameters: GetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
320
|
+
getCompositionDataSourceRaw(requestParameters: GetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CompositionDataSource>>;
|
|
318
321
|
/**
|
|
322
|
+
* The data source that is bound to the composition: `url` and `refreshSeconds`. The answer\'s `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
|
|
319
323
|
* Read the composition data source binding
|
|
320
324
|
*/
|
|
321
|
-
getCompositionDataSource(requestParameters: GetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
325
|
+
getCompositionDataSource(requestParameters: GetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompositionDataSource>;
|
|
322
326
|
/**
|
|
323
327
|
* Retrieves a specific record from a table in the composition\'s database.
|
|
324
328
|
* Get Record From Composition Database
|
|
@@ -400,12 +404,12 @@ export declare class CompositionsApi extends runtime.BaseAPI {
|
|
|
400
404
|
*/
|
|
401
405
|
getCompositionVersions(requestParameters: GetCompositionVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCompositionVersions200Response>;
|
|
402
406
|
/**
|
|
403
|
-
* Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed.
|
|
407
|
+
* Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner\'s list never has to name it.
|
|
404
408
|
* Get Compositions Batch
|
|
405
409
|
*/
|
|
406
410
|
getCompositionsBatchRaw(requestParameters: GetCompositionsBatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCompositionsBatch200Response>>;
|
|
407
411
|
/**
|
|
408
|
-
* Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed.
|
|
412
|
+
* Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner\'s list never has to name it.
|
|
409
413
|
* Get Compositions Batch
|
|
410
414
|
*/
|
|
411
415
|
getCompositionsBatch(requestParameters: GetCompositionsBatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCompositionsBatch200Response>;
|
|
@@ -418,25 +422,25 @@ export declare class CompositionsApi extends runtime.BaseAPI {
|
|
|
418
422
|
*/
|
|
419
423
|
patchCompositionContentItem(requestParameters: PatchCompositionContentItem0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
420
424
|
/**
|
|
421
|
-
* Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. This read is bounded on purpose: it never returns more than 25 entries, 20 groups, 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
425
|
+
* Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
422
426
|
* Read the Entries of a Composition\'s Table
|
|
423
427
|
*/
|
|
424
428
|
readCompositionEntriesRaw(requestParameters: ReadCompositionEntries0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CompositionEntriesReading>>;
|
|
425
429
|
/**
|
|
426
|
-
* Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. This read is bounded on purpose: it never returns more than 25 entries, 20 groups, 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
430
|
+
* Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
427
431
|
* Read the Entries of a Composition\'s Table
|
|
428
432
|
*/
|
|
429
433
|
readCompositionEntries(requestParameters: ReadCompositionEntries0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompositionEntriesReading>;
|
|
430
434
|
/**
|
|
431
|
-
* Stores an https URL the widget runtime may read on load and every `refresh_seconds`. The URL must name a public host (no loopback, link-local or metadata addresses).
|
|
435
|
+
* Stores an https URL the widget runtime may read on load and every `refresh_seconds`. The URL must name a public host (no loopback, link-local or metadata addresses). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
|
|
432
436
|
* Bind a public JSON data source for embed refresh
|
|
433
437
|
*/
|
|
434
|
-
setCompositionDataSourceRaw(requestParameters: SetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
438
|
+
setCompositionDataSourceRaw(requestParameters: SetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CompositionDataSource>>;
|
|
435
439
|
/**
|
|
436
|
-
* Stores an https URL the widget runtime may read on load and every `refresh_seconds`. The URL must name a public host (no loopback, link-local or metadata addresses).
|
|
440
|
+
* Stores an https URL the widget runtime may read on load and every `refresh_seconds`. The URL must name a public host (no loopback, link-local or metadata addresses). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
|
|
437
441
|
* Bind a public JSON data source for embed refresh
|
|
438
442
|
*/
|
|
439
|
-
setCompositionDataSource(requestParameters: SetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
443
|
+
setCompositionDataSource(requestParameters: SetCompositionDataSource0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompositionDataSource>;
|
|
440
444
|
/**
|
|
441
445
|
* Updates the content of a composition dynamically with optional schema validation. An editor session (see `createManagedUserEditorSession`) can send only `content`, `validate` and `partial`, and only for a composition made for its managed user. A body that names `version`, `source` or any other field is refused with `403` and `EDITOR_SESSION_FIELD_NOT_ALLOWED`.
|
|
442
446
|
* Set Dynamic Content
|
|
@@ -253,6 +253,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
255
|
/**
|
|
256
|
+
* Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
|
|
256
257
|
* Remove the composition data source binding
|
|
257
258
|
*/
|
|
258
259
|
deleteCompositionDataSourceRaw(requestParameters, initOverrides) {
|
|
@@ -278,15 +279,17 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
278
279
|
headers: headerParameters,
|
|
279
280
|
query: queryParameters,
|
|
280
281
|
}, initOverrides);
|
|
281
|
-
return new runtime.
|
|
282
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeleteCompositionDataSource200ResponseFromJSON)(jsonValue));
|
|
282
283
|
});
|
|
283
284
|
}
|
|
284
285
|
/**
|
|
286
|
+
* Removes the binding. Asking again, or asking for a composition that had none, is not an error: the composition has no data source afterwards, and that is all `removed: true` says.
|
|
285
287
|
* Remove the composition data source binding
|
|
286
288
|
*/
|
|
287
289
|
deleteCompositionDataSource(requestParameters, initOverrides) {
|
|
288
290
|
return __awaiter(this, void 0, void 0, function* () {
|
|
289
|
-
yield this.deleteCompositionDataSourceRaw(requestParameters, initOverrides);
|
|
291
|
+
const response = yield this.deleteCompositionDataSourceRaw(requestParameters, initOverrides);
|
|
292
|
+
return yield response.value();
|
|
290
293
|
});
|
|
291
294
|
}
|
|
292
295
|
/**
|
|
@@ -511,7 +514,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
511
514
|
});
|
|
512
515
|
}
|
|
513
516
|
/**
|
|
514
|
-
* Retrieves a specific composition by its ID.
|
|
517
|
+
* Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
|
|
515
518
|
* Get Composition
|
|
516
519
|
*/
|
|
517
520
|
getCompositionByIdRaw(requestParameters, initOverrides) {
|
|
@@ -538,7 +541,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
538
541
|
});
|
|
539
542
|
}
|
|
540
543
|
/**
|
|
541
|
-
* Retrieves a specific composition by its ID.
|
|
544
|
+
* Retrieves a specific composition by its ID. The answer carries `direct`, which says whether the widget the composition is made from is drawn straight into your page (`true`) or inside a frame (`false`), or `null` while the widget has no published version. Read it before you go live: a widget drawn without a frame writes its entries from your own page, so the public entry route accepts them only from a website on the composition\'s allowed list, and refuses them while that list is empty (the public JSON of the composition stays open to every website). A widget in a frame writes from Widgetic\'s own frame and is accepted whatever the list says.
|
|
542
545
|
* Get Composition
|
|
543
546
|
*/
|
|
544
547
|
getCompositionById(requestParameters, initOverrides) {
|
|
@@ -622,6 +625,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
622
625
|
});
|
|
623
626
|
}
|
|
624
627
|
/**
|
|
628
|
+
* The data source that is bound to the composition: `url` and `refreshSeconds`. The answer\'s `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
|
|
625
629
|
* Read the composition data source binding
|
|
626
630
|
*/
|
|
627
631
|
getCompositionDataSourceRaw(requestParameters, initOverrides) {
|
|
@@ -644,15 +648,17 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
644
648
|
headers: headerParameters,
|
|
645
649
|
query: queryParameters,
|
|
646
650
|
}, initOverrides);
|
|
647
|
-
return new runtime.
|
|
651
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionDataSourceFromJSON)(jsonValue));
|
|
648
652
|
});
|
|
649
653
|
}
|
|
650
654
|
/**
|
|
655
|
+
* The data source that is bound to the composition: `url` and `refreshSeconds`. The answer\'s `data` is `null` when none is bound, and also when what is stored does not pass the rule for a public https address (a binding written by another path, such as the general embed-settings update, is never shown to a page unless it passes the same checks as this route).
|
|
651
656
|
* Read the composition data source binding
|
|
652
657
|
*/
|
|
653
658
|
getCompositionDataSource(requestParameters, initOverrides) {
|
|
654
659
|
return __awaiter(this, void 0, void 0, function* () {
|
|
655
|
-
yield this.getCompositionDataSourceRaw(requestParameters, initOverrides);
|
|
660
|
+
const response = yield this.getCompositionDataSourceRaw(requestParameters, initOverrides);
|
|
661
|
+
return yield response.value();
|
|
656
662
|
});
|
|
657
663
|
}
|
|
658
664
|
/**
|
|
@@ -959,7 +965,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
959
965
|
});
|
|
960
966
|
}
|
|
961
967
|
/**
|
|
962
|
-
* Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed.
|
|
968
|
+
* Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner\'s list never has to name it.
|
|
963
969
|
* Get Compositions Batch
|
|
964
970
|
*/
|
|
965
971
|
getCompositionsBatchRaw(requestParameters, initOverrides) {
|
|
@@ -988,7 +994,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
988
994
|
});
|
|
989
995
|
}
|
|
990
996
|
/**
|
|
991
|
-
* Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed.
|
|
997
|
+
* Retrieves multiple compositions by their IDs in a single request. This endpoint includes domain validation for embed contexts and is used by the embed SDK. Each composition is checked on its own. If its owner listed the websites it may appear on (the workspace\'s domain list, or the `allowedDomains` of a partner the owner administers) and the request comes from another website (the `Origin` header, or the host of `Referer` when there is no `Origin`), that composition is left out of `compositions` and reported in `errors` as `Domain access denied: <reason>`; the others are still returned. A request that names no website, and an owner who listed nothing, are not restricted, and a page on the visitor\'s own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed. So is the website where a partner integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), for the compositions of that partner: a partner\'s list never has to name it.
|
|
992
998
|
* Get Compositions Batch
|
|
993
999
|
*/
|
|
994
1000
|
getCompositionsBatch(requestParameters, initOverrides) {
|
|
@@ -1049,7 +1055,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1049
1055
|
});
|
|
1050
1056
|
}
|
|
1051
1057
|
/**
|
|
1052
|
-
* Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. This read is bounded on purpose: it never returns more than 25 entries, 20 groups, 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
1058
|
+
* Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
1053
1059
|
* Read the Entries of a Composition\'s Table
|
|
1054
1060
|
*/
|
|
1055
1061
|
readCompositionEntriesRaw(requestParameters, initOverrides) {
|
|
@@ -1103,7 +1109,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1103
1109
|
});
|
|
1104
1110
|
}
|
|
1105
1111
|
/**
|
|
1106
|
-
* Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. This read is bounded on purpose: it never returns more than 25 entries, 20 groups, 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
1112
|
+
* Counts the entries visitors left in one table, tallies them per value of a column on request, and returns the newest entries only when asked to. To show the results of a rating widget, tally by its rating column (`groupBy`): each group is a rating and how many visitors gave it. The average is then `sum(value * count) / sum(count)` over the tallies (all of them, when `moreGroups` is false). - **`totalRows`** is how many entries the table holds in all. - **`groupBy`** names a column (as `describeCompositionEntries` lists it). `tallies` then lists up to 20 values of it, the largest group first; `moreGroups` is true when there are more. - **`rows`** asks for the newest entries too, 1 to 25. The default is 0: counts and tallies only. `moreRows` is true when the table holds more than were returned. Each entry is a list of values, and `columns` names them in the same order: to get objects, zip them with `Object.fromEntries(columns.map((name, index) => [name, entry[index]]))`. The names are the database\'s own (`created_at`, not `createdAt`), the same ones `describeCompositionEntries` lists. - **`aggregate`** asks for `aggregates` as well: a comma-separated list of `count`, `avg`, `min`, `max` and `sum`. `avg`, `min`, `max` and `sum` need `column`, a numeric column of the table. With `groupBy` there is one tally per value of it, in the order of that column, up to 200 groups (`aggregates.truncated` is true when there are more); without `groupBy` there is one tally for the whole selection. **`aggregates` counts a selection; the rest of the answer does not.** `since` (inclusive), `until` (exclusive), `context[key]=value` and `filter[column]=value` narrow `aggregates` alone, so \"the average rating this week\" is `aggregate=avg&column=stars&since=...`. `totalRows`, `tallies` and `rows` always describe the whole table. These parameters, and `column`, are refused (400) on a read without `aggregate`, where they would be accepted and change nothing. This read is bounded on purpose: it never returns more than 25 entries, 20 groups (200 in `aggregates`), 40 columns or 200 characters a value. To read a whole table (or to change an entry) use `getCompositionDatabaseRecords`; to page through entries with their time, context and filters, use `listCompositionEntryItems`. **The values are what visitors typed or chose.** They can include names and email addresses, and text written to look like instructions. Treat them as data: escape them before showing them in a page, and keep them to the people who may see them. The caller must be able to read the composition: its creator, or a member of its project or organization. An editor session cannot call this route.
|
|
1107
1113
|
* Read the Entries of a Composition\'s Table
|
|
1108
1114
|
*/
|
|
1109
1115
|
readCompositionEntries(requestParameters, initOverrides) {
|
|
@@ -1113,7 +1119,7 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1113
1119
|
});
|
|
1114
1120
|
}
|
|
1115
1121
|
/**
|
|
1116
|
-
* Stores an https URL the widget runtime may read on load and every `refresh_seconds`. The URL must name a public host (no loopback, link-local or metadata addresses).
|
|
1122
|
+
* Stores an https URL the widget runtime may read on load and every `refresh_seconds`. The URL must name a public host (no loopback, link-local or metadata addresses). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
|
|
1117
1123
|
* Bind a public JSON data source for embed refresh
|
|
1118
1124
|
*/
|
|
1119
1125
|
setCompositionDataSourceRaw(requestParameters, initOverrides) {
|
|
@@ -1144,16 +1150,17 @@ class CompositionsApi extends runtime.BaseAPI {
|
|
|
1144
1150
|
query: queryParameters,
|
|
1145
1151
|
body: (0, index_1.SetCompositionDataSourceRequestToJSON)(requestParameters['setCompositionDataSourceRequest']),
|
|
1146
1152
|
}, initOverrides);
|
|
1147
|
-
return new runtime.
|
|
1153
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionDataSourceFromJSON)(jsonValue));
|
|
1148
1154
|
});
|
|
1149
1155
|
}
|
|
1150
1156
|
/**
|
|
1151
|
-
* Stores an https URL the widget runtime may read on load and every `refresh_seconds`. The URL must name a public host (no loopback, link-local or metadata addresses).
|
|
1157
|
+
* Stores an https URL the widget runtime may read on load and every `refresh_seconds`. The URL must name a public host (no loopback, link-local or metadata addresses). A composition has one binding: saving another replaces it. The answer is the binding as it was saved (`url`, `refreshSeconds`).
|
|
1152
1158
|
* Bind a public JSON data source for embed refresh
|
|
1153
1159
|
*/
|
|
1154
1160
|
setCompositionDataSource(requestParameters, initOverrides) {
|
|
1155
1161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1156
|
-
yield this.setCompositionDataSourceRaw(requestParameters, initOverrides);
|
|
1162
|
+
const response = yield this.setCompositionDataSourceRaw(requestParameters, initOverrides);
|
|
1163
|
+
return yield response.value();
|
|
1157
1164
|
});
|
|
1158
1165
|
}
|
|
1159
1166
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AccountCreditBalance,
|
|
13
|
+
import type { AccountCreditBalance, GetPartnerCreditTransactions200Response } from '../models/index';
|
|
14
14
|
export interface AddCreditsRequest {
|
|
15
15
|
body: object;
|
|
16
16
|
idempotencyKey?: string;
|
|
@@ -57,25 +57,25 @@ export declare class CreditsApi extends runtime.BaseAPI {
|
|
|
57
57
|
*/
|
|
58
58
|
getAllCreditBalances(requestParameters?: GetAllCreditBalancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<object>>;
|
|
59
59
|
/**
|
|
60
|
-
* Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. An account that has never held credits reads a balance of 0.
|
|
60
|
+
* Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. An account that has never held credits reads a balance of 0. `getPartnerCreditBalance` reads this same balance by partner id.
|
|
61
61
|
* Get an account\'s credit balance
|
|
62
62
|
*/
|
|
63
63
|
getUserCreditBalanceRaw(requestParameters: GetUserCreditBalance0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountCreditBalance>>;
|
|
64
64
|
/**
|
|
65
|
-
* Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. An account that has never held credits reads a balance of 0.
|
|
65
|
+
* Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. An account that has never held credits reads a balance of 0. `getPartnerCreditBalance` reads this same balance by partner id.
|
|
66
66
|
* Get an account\'s credit balance
|
|
67
67
|
*/
|
|
68
68
|
getUserCreditBalance(requestParameters: GetUserCreditBalance0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountCreditBalance>;
|
|
69
69
|
/**
|
|
70
|
-
* Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s.
|
|
70
|
+
* Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
|
|
71
71
|
* List an account\'s credit ledger
|
|
72
72
|
*/
|
|
73
|
-
getUserCreditTransactionsRaw(requestParameters: GetUserCreditTransactions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
73
|
+
getUserCreditTransactionsRaw(requestParameters: GetUserCreditTransactions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPartnerCreditTransactions200Response>>;
|
|
74
74
|
/**
|
|
75
|
-
* Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s.
|
|
75
|
+
* Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
|
|
76
76
|
* List an account\'s credit ledger
|
|
77
77
|
*/
|
|
78
|
-
getUserCreditTransactions(requestParameters: GetUserCreditTransactions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
78
|
+
getUserCreditTransactions(requestParameters: GetUserCreditTransactions0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPartnerCreditTransactions200Response>;
|
|
79
79
|
/**
|
|
80
80
|
* Subtracts credits from a user\'s balance. Admin only. A `referenceId` in the body names the deduction event; when it is omitted the request\'s `Idempotency-Key` header is used instead, and the request is refused with 400 when neither is present, so a retried deduction cannot be applied twice.
|
|
81
81
|
* Subtract credits from user balance
|
package/dist/apis/CreditsApi.js
CHANGED
|
@@ -112,7 +112,7 @@ class CreditsApi extends runtime.BaseAPI {
|
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
115
|
-
* Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. An account that has never held credits reads a balance of 0.
|
|
115
|
+
* Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. An account that has never held credits reads a balance of 0. `getPartnerCreditBalance` reads this same balance by partner id.
|
|
116
116
|
* Get an account\'s credit balance
|
|
117
117
|
*/
|
|
118
118
|
getUserCreditBalanceRaw(requestParameters, initOverrides) {
|
|
@@ -139,7 +139,7 @@ class CreditsApi extends runtime.BaseAPI {
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
142
|
-
* Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. An account that has never held credits reads a balance of 0.
|
|
142
|
+
* Returns the credits an account holds: the balance, and how much of it is reserved by operations that are still running. An account reads its own balance; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. An account that has never held credits reads a balance of 0. `getPartnerCreditBalance` reads this same balance by partner id.
|
|
143
143
|
* Get an account\'s credit balance
|
|
144
144
|
*/
|
|
145
145
|
getUserCreditBalance(requestParameters, initOverrides) {
|
|
@@ -149,7 +149,7 @@ class CreditsApi extends runtime.BaseAPI {
|
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
|
-
* Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s.
|
|
152
|
+
* Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
|
|
153
153
|
* List an account\'s credit ledger
|
|
154
154
|
*/
|
|
155
155
|
getUserCreditTransactionsRaw(requestParameters, initOverrides) {
|
|
@@ -181,11 +181,11 @@ class CreditsApi extends runtime.BaseAPI {
|
|
|
181
181
|
headers: headerParameters,
|
|
182
182
|
query: queryParameters,
|
|
183
183
|
}, initOverrides);
|
|
184
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
184
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPartnerCreditTransactions200ResponseFromJSON)(jsonValue));
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
/**
|
|
188
|
-
* Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s.
|
|
188
|
+
* Lists the entries of an account\'s credit ledger, newest first. This is also how an account\'s usage is read: every operation that spends credits is a `debit` entry, so summing the `debit` entries over a period gives the credits consumed in it, and the other types give what was added. An account reads its own ledger; with a partner\'s API key, that is the account of the person who administers the partner. Widgetic administrators can read any account\'s. `getPartnerCreditTransactions` reads this same ledger by partner id. The page is always bounded: `limit` defaults to 100 and is capped at 500, `offset` defaults to 0.
|
|
189
189
|
* List an account\'s credit ledger
|
|
190
190
|
*/
|
|
191
191
|
getUserCreditTransactions(requestParameters, initOverrides) {
|