@widgetic/api-sdk-ts 1.11.64 → 1.11.111
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 +1 -1
- package/dist/apis/BrandKitApi.d.ts +130 -0
- package/dist/apis/BrandKitApi.js +381 -0
- package/dist/apis/CompositionsApi.d.ts +24 -6
- package/dist/apis/CompositionsApi.js +73 -6
- package/dist/apis/ManagedUsersApi.d.ts +2 -2
- package/dist/apis/ManagedUsersApi.js +2 -2
- package/dist/apis/PartnerApi.d.ts +614 -21
- package/dist/apis/PartnerApi.js +1767 -169
- package/dist/apis/PartnersApi.d.ts +63 -5
- package/dist/apis/PartnersApi.js +158 -4
- package/dist/apis/PublicEmbedApi.d.ts +62 -7
- package/dist/apis/PublicEmbedApi.js +126 -6
- package/dist/apis/UsersApi.d.ts +19 -3
- package/dist/apis/UsersApi.js +46 -2
- package/dist/apis/WorkflowsApi.d.ts +394 -0
- package/dist/apis/WorkflowsApi.js +1056 -0
- package/dist/apis/WorkspacesApi.d.ts +352 -0
- package/dist/apis/WorkspacesApi.js +946 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/BrandKitApi.js +344 -0
- package/dist/esm/apis/CompositionsApi.js +73 -6
- package/dist/esm/apis/ManagedUsersApi.js +2 -2
- package/dist/esm/apis/PartnerApi.js +1767 -169
- package/dist/esm/apis/PartnersApi.js +159 -5
- package/dist/esm/apis/PublicEmbedApi.js +127 -7
- package/dist/esm/apis/UsersApi.js +47 -3
- package/dist/esm/apis/WorkflowsApi.js +1019 -0
- package/dist/esm/apis/WorkspacesApi.js +909 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/AdapterConnection.js +12 -0
- package/dist/esm/models/BrandColor.js +64 -0
- package/dist/esm/models/BrandFont.js +72 -0
- package/dist/esm/models/BrandKitAssetView.js +96 -0
- package/dist/esm/models/BrandKitFigmaSource.js +59 -0
- package/dist/esm/models/BrandKitTokens.js +56 -0
- package/dist/esm/models/BrandKitTokensFonts.js +48 -0
- package/dist/esm/models/BrandKitView.js +75 -0
- package/dist/esm/models/BrandKitViewOwner.js +54 -0
- package/dist/esm/models/BrandKitViewResponse.js +51 -0
- package/dist/esm/models/BrandSpacing.js +71 -0
- package/dist/esm/models/Composition.js +5 -0
- package/dist/esm/models/CompositionLastEditedBy.js +43 -0
- package/dist/esm/models/ConfirmAdapterConnectionRequest.js +43 -0
- package/dist/esm/models/CreateWidget201ResponseData.js +2 -4
- package/dist/esm/models/CreateWorkspaceWorkflowFromPreset201Response.js +51 -0
- package/dist/esm/models/CreateWorkspaceWorkflowFromPresetRequest.js +45 -0
- package/dist/esm/models/CreateWorkspaceWorkflowRequest.js +47 -0
- package/dist/esm/models/DeleteWorkspaceWorkflow200Response.js +51 -0
- package/dist/esm/models/EditorSession.js +2 -1
- package/dist/esm/models/GetPublicCompositionEmbed200Response.js +9 -0
- package/dist/esm/models/GetPublicCompositionEmbed200ResponseAdapters.js +44 -0
- package/dist/esm/models/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.js +41 -0
- package/dist/esm/models/GetPublicCompositionEmbed200ResponseEntries.js +43 -0
- package/dist/esm/models/GetPublicCompositionEmbed200ResponseMedia.js +41 -0
- package/dist/esm/models/GetPublicWorkflow200Response.js +51 -0
- package/dist/esm/models/GetWorkspaceWorkflowStats200Response.js +51 -0
- package/dist/esm/models/GetWorkspaceWorkflowVersion200Response.js +51 -0
- package/dist/esm/models/ListPartnerWorkflowPresets200Response.js +51 -0
- package/dist/esm/models/ListWorkspaceWorkflowCompositionOptions200Response.js +51 -0
- package/dist/esm/models/ListWorkspaceWorkflowPresets200Response.js +51 -0
- package/dist/esm/models/ListWorkspaceWorkflowVersions200Response.js +51 -0
- package/dist/esm/models/ListWorkspaceWorkflows200Response.js +51 -0
- package/dist/esm/models/NewEditorSession.js +2 -1
- package/dist/esm/models/OfferWorkflowPresetRequest.js +49 -0
- package/dist/esm/models/OfferedWorkflowPreset.js +101 -0
- package/dist/esm/models/OfferedWorkflowPresetList.js +44 -0
- package/dist/esm/models/OfferedWorkflowPresetWidget.js +51 -0
- package/dist/esm/models/PartnerNotificationEventType.js +5 -1
- package/dist/esm/models/PatchBrandKitAssetRequest.js +68 -0
- package/dist/esm/models/PatchBrandKitRequest.js +54 -0
- package/dist/esm/models/PatchBrandKitRequestFonts.js +48 -0
- package/dist/esm/models/PatchBrandKitRequestSpacing.js +55 -0
- package/dist/esm/models/PostBrandKitIconRequest.js +47 -0
- package/dist/esm/models/PublicWorkflow.js +73 -0
- package/dist/esm/models/PublicWorkflowEventsAccepted.js +47 -0
- package/dist/esm/models/PublicWorkflowEventsRequest.js +53 -0
- package/dist/esm/models/PublicWorkflowEventsRequestEventsInner.js +57 -0
- package/dist/esm/models/PublicWorkflowEventsRequestHeightsInner.js +47 -0
- package/dist/esm/models/PublicWorkflowTranslation.js +47 -0
- package/dist/esm/models/PublishWorkspaceWorkflow200Response.js +51 -0
- package/dist/esm/models/PublishWorkspaceWorkflowRequest.js +43 -0
- package/dist/esm/models/PutBrandKitRequest.js +49 -0
- package/dist/esm/models/RemovePartnerWorkflowPreset200Response.js +51 -0
- package/dist/esm/models/ReportPublicWorkflowEvents200Response.js +51 -0
- package/dist/esm/models/SaveWorkspaceWorkflow200Response.js +51 -0
- package/dist/esm/models/SaveWorkspaceWorkflowRequest.js +50 -0
- package/dist/esm/models/SetPartnerWorkflowPreset200Response.js +51 -0
- package/dist/esm/models/Widget.js +2 -4
- package/dist/esm/models/Workflow.js +96 -0
- package/dist/esm/models/WorkflowCompositionAction.js +53 -0
- package/dist/esm/models/WorkflowCompositionField.js +63 -0
- package/dist/esm/models/WorkflowCompositionOption.js +67 -0
- package/dist/esm/models/WorkflowCompositionOptionActions.js +57 -0
- package/dist/esm/models/WorkflowCompositionOptionInputs.js +61 -0
- package/dist/esm/models/WorkflowCompositionOptions.js +56 -0
- package/dist/esm/models/WorkflowConditionCase.js +61 -0
- package/dist/esm/models/WorkflowConditionTest.js +67 -0
- package/dist/esm/models/WorkflowCounter.js +47 -0
- package/dist/esm/models/WorkflowDetail.js +113 -0
- package/dist/esm/models/WorkflowDetailAllOfLastEditedBy.js +43 -0
- package/dist/esm/models/WorkflowEdge.js +55 -0
- package/dist/esm/models/WorkflowFieldReference.js +66 -0
- package/dist/esm/models/WorkflowGraph.js +59 -0
- package/dist/esm/models/WorkflowIssue.js +62 -0
- package/dist/esm/models/WorkflowList.js +56 -0
- package/dist/esm/models/WorkflowNode.js +68 -0
- package/dist/esm/models/WorkflowNodePosition.js +47 -0
- package/dist/esm/models/WorkflowPresetChoice.js +60 -0
- package/dist/esm/models/WorkflowPresetChoices.js +44 -0
- package/dist/esm/models/WorkflowPresetRemoval.js +43 -0
- package/dist/esm/models/WorkflowPresetWidget.js +47 -0
- package/dist/esm/models/WorkflowPublishResult.js +54 -0
- package/dist/esm/models/WorkflowRemoved.js +43 -0
- package/dist/esm/models/WorkflowSchedule.js +66 -0
- package/dist/esm/models/WorkflowStats.js +68 -0
- package/dist/esm/models/WorkflowStatus.js +48 -0
- package/dist/esm/models/WorkflowTrigger.js +64 -0
- package/dist/esm/models/WorkflowTriggerValuesInner.js +55 -0
- package/dist/esm/models/WorkflowVersion.js +62 -0
- package/dist/esm/models/WorkflowVersionDetail.js +71 -0
- package/dist/esm/models/WorkflowVersionList.js +44 -0
- package/dist/esm/models/WorkflowVersionPublishedBy.js +43 -0
- package/dist/esm/models/index.js +85 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/AdapterConnection.d.ts +18 -0
- package/dist/models/AdapterConnection.js +12 -0
- package/dist/models/BrandColor.d.ts +60 -0
- package/dist/models/BrandColor.js +72 -0
- package/dist/models/BrandFont.d.ts +73 -0
- package/dist/models/BrandFont.js +80 -0
- package/dist/models/BrandKitAssetView.d.ts +130 -0
- package/dist/models/BrandKitAssetView.js +104 -0
- package/dist/models/BrandKitFigmaSource.d.ts +56 -0
- package/dist/models/BrandKitFigmaSource.js +66 -0
- package/dist/models/BrandKitTokens.d.ts +53 -0
- package/dist/models/BrandKitTokens.js +63 -0
- package/dist/models/BrandKitTokensFonts.d.ts +51 -0
- package/dist/models/BrandKitTokensFonts.js +55 -0
- package/dist/models/BrandKitView.d.ts +90 -0
- package/dist/models/BrandKitView.js +82 -0
- package/dist/models/BrandKitViewOwner.d.ts +46 -0
- package/dist/models/BrandKitViewOwner.js +62 -0
- package/dist/models/BrandKitViewResponse.d.ts +46 -0
- package/dist/models/BrandKitViewResponse.js +58 -0
- package/dist/models/BrandSpacing.d.ts +74 -0
- package/dist/models/BrandSpacing.js +78 -0
- package/dist/models/Composition.d.ts +13 -0
- package/dist/models/Composition.js +5 -0
- package/dist/models/CompositionLastEditedBy.d.ts +52 -0
- package/dist/models/CompositionLastEditedBy.js +50 -0
- package/dist/models/ConfirmAdapterConnectionRequest.d.ts +32 -0
- package/dist/models/ConfirmAdapterConnectionRequest.js +50 -0
- package/dist/models/CreateWidget201ResponseData.d.ts +2 -8
- package/dist/models/CreateWidget201ResponseData.js +2 -4
- package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.d.ts +46 -0
- package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.js +58 -0
- package/dist/models/CreateWorkspaceWorkflowFromPresetRequest.d.ts +38 -0
- package/dist/models/CreateWorkspaceWorkflowFromPresetRequest.js +52 -0
- package/dist/models/CreateWorkspaceWorkflowRequest.d.ts +44 -0
- package/dist/models/CreateWorkspaceWorkflowRequest.js +54 -0
- package/dist/models/DeleteWorkspaceWorkflow200Response.d.ts +46 -0
- package/dist/models/DeleteWorkspaceWorkflow200Response.js +58 -0
- package/dist/models/EditorSession.d.ts +1 -0
- package/dist/models/EditorSession.js +2 -1
- package/dist/models/GetPublicCompositionEmbed200Response.d.ts +22 -1
- package/dist/models/GetPublicCompositionEmbed200Response.js +9 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseAdapters.d.ts +39 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseAdapters.js +51 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.d.ts +32 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.js +48 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseEntries.d.ts +38 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseEntries.js +50 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseMedia.d.ts +32 -0
- package/dist/models/GetPublicCompositionEmbed200ResponseMedia.js +48 -0
- package/dist/models/GetPublicWorkflow200Response.d.ts +46 -0
- package/dist/models/GetPublicWorkflow200Response.js +58 -0
- package/dist/models/GetWorkspaceWorkflowStats200Response.d.ts +46 -0
- package/dist/models/GetWorkspaceWorkflowStats200Response.js +58 -0
- package/dist/models/GetWorkspaceWorkflowVersion200Response.d.ts +46 -0
- package/dist/models/GetWorkspaceWorkflowVersion200Response.js +58 -0
- package/dist/models/ListPartnerWorkflowPresets200Response.d.ts +46 -0
- package/dist/models/ListPartnerWorkflowPresets200Response.js +58 -0
- package/dist/models/ListWorkspaceWorkflowCompositionOptions200Response.d.ts +46 -0
- package/dist/models/ListWorkspaceWorkflowCompositionOptions200Response.js +58 -0
- package/dist/models/ListWorkspaceWorkflowPresets200Response.d.ts +46 -0
- package/dist/models/ListWorkspaceWorkflowPresets200Response.js +58 -0
- package/dist/models/ListWorkspaceWorkflowVersions200Response.d.ts +46 -0
- package/dist/models/ListWorkspaceWorkflowVersions200Response.js +58 -0
- package/dist/models/ListWorkspaceWorkflows200Response.d.ts +46 -0
- package/dist/models/ListWorkspaceWorkflows200Response.js +58 -0
- package/dist/models/NewComposition.d.ts +16 -3
- package/dist/models/NewEditorSession.d.ts +2 -1
- package/dist/models/NewEditorSession.js +2 -1
- package/dist/models/OfferWorkflowPresetRequest.d.ts +50 -0
- package/dist/models/OfferWorkflowPresetRequest.js +56 -0
- package/dist/models/OfferedWorkflowPreset.d.ts +120 -0
- package/dist/models/OfferedWorkflowPreset.js +109 -0
- package/dist/models/OfferedWorkflowPresetList.d.ts +33 -0
- package/dist/models/OfferedWorkflowPresetList.js +51 -0
- package/dist/models/OfferedWorkflowPresetWidget.d.ts +44 -0
- package/dist/models/OfferedWorkflowPresetWidget.js +58 -0
- package/dist/models/PartnerNotification.d.ts +1 -1
- package/dist/models/PartnerNotificationEventType.d.ts +4 -0
- package/dist/models/PartnerNotificationEventType.js +5 -1
- package/dist/models/PatchBrandKitAssetRequest.d.ts +73 -0
- package/dist/models/PatchBrandKitAssetRequest.js +76 -0
- package/dist/models/PatchBrandKitRequest.d.ts +65 -0
- package/dist/models/PatchBrandKitRequest.js +61 -0
- package/dist/models/PatchBrandKitRequestFonts.d.ts +51 -0
- package/dist/models/PatchBrandKitRequestFonts.js +55 -0
- package/dist/models/PatchBrandKitRequestSpacing.d.ts +74 -0
- package/dist/models/PatchBrandKitRequestSpacing.js +62 -0
- package/dist/models/PostBrandKitIconRequest.d.ts +38 -0
- package/dist/models/PostBrandKitIconRequest.js +54 -0
- package/dist/models/PublicWorkflow.d.ts +109 -0
- package/dist/models/PublicWorkflow.js +81 -0
- package/dist/models/PublicWorkflowEventsAccepted.d.ts +44 -0
- package/dist/models/PublicWorkflowEventsAccepted.js +54 -0
- package/dist/models/PublicWorkflowEventsRequest.d.ts +59 -0
- package/dist/models/PublicWorkflowEventsRequest.js +60 -0
- package/dist/models/PublicWorkflowEventsRequestEventsInner.d.ts +53 -0
- package/dist/models/PublicWorkflowEventsRequestEventsInner.js +65 -0
- package/dist/models/PublicWorkflowEventsRequestHeightsInner.d.ts +38 -0
- package/dist/models/PublicWorkflowEventsRequestHeightsInner.js +54 -0
- package/dist/models/PublicWorkflowTranslation.d.ts +40 -0
- package/dist/models/PublicWorkflowTranslation.js +54 -0
- package/dist/models/PublishWorkspaceWorkflow200Response.d.ts +46 -0
- package/dist/models/PublishWorkspaceWorkflow200Response.js +58 -0
- package/dist/models/PublishWorkspaceWorkflowRequest.d.ts +32 -0
- package/dist/models/PublishWorkspaceWorkflowRequest.js +50 -0
- package/dist/models/PutBrandKitRequest.d.ts +46 -0
- package/dist/models/PutBrandKitRequest.js +56 -0
- package/dist/models/RemovePartnerWorkflowPreset200Response.d.ts +46 -0
- package/dist/models/RemovePartnerWorkflowPreset200Response.js +58 -0
- package/dist/models/ReportPublicWorkflowEvents200Response.d.ts +46 -0
- package/dist/models/ReportPublicWorkflowEvents200Response.js +58 -0
- package/dist/models/SaveWorkspaceWorkflow200Response.d.ts +46 -0
- package/dist/models/SaveWorkspaceWorkflow200Response.js +58 -0
- package/dist/models/SaveWorkspaceWorkflowRequest.d.ts +51 -0
- package/dist/models/SaveWorkspaceWorkflowRequest.js +57 -0
- package/dist/models/SetAdapterConnectionRequest.d.ts +1 -1
- package/dist/models/SetPartnerWorkflowPreset200Response.d.ts +46 -0
- package/dist/models/SetPartnerWorkflowPreset200Response.js +58 -0
- package/dist/models/UpdateComposition.d.ts +3 -1
- package/dist/models/Widget.d.ts +2 -8
- package/dist/models/Widget.js +2 -4
- package/dist/models/Workflow.d.ts +133 -0
- package/dist/models/Workflow.js +103 -0
- package/dist/models/WorkflowCompositionAction.d.ts +52 -0
- package/dist/models/WorkflowCompositionAction.js +60 -0
- package/dist/models/WorkflowCompositionField.d.ts +59 -0
- package/dist/models/WorkflowCompositionField.js +71 -0
- package/dist/models/WorkflowCompositionOption.d.ts +73 -0
- package/dist/models/WorkflowCompositionOption.js +74 -0
- package/dist/models/WorkflowCompositionOptionActions.d.ts +55 -0
- package/dist/models/WorkflowCompositionOptionActions.js +65 -0
- package/dist/models/WorkflowCompositionOptionInputs.d.ts +64 -0
- package/dist/models/WorkflowCompositionOptionInputs.js +69 -0
- package/dist/models/WorkflowCompositionOptions.d.ts +51 -0
- package/dist/models/WorkflowCompositionOptions.js +63 -0
- package/dist/models/WorkflowConditionCase.d.ts +61 -0
- package/dist/models/WorkflowConditionCase.js +69 -0
- package/dist/models/WorkflowConditionTest.d.ts +68 -0
- package/dist/models/WorkflowConditionTest.js +75 -0
- package/dist/models/WorkflowCounter.d.ts +38 -0
- package/dist/models/WorkflowCounter.js +54 -0
- package/dist/models/WorkflowDetail.d.ts +166 -0
- package/dist/models/WorkflowDetail.js +120 -0
- package/dist/models/WorkflowDetailAllOfLastEditedBy.d.ts +42 -0
- package/dist/models/WorkflowDetailAllOfLastEditedBy.js +50 -0
- package/dist/models/WorkflowEdge.d.ts +50 -0
- package/dist/models/WorkflowEdge.js +62 -0
- package/dist/models/WorkflowFieldReference.d.ts +63 -0
- package/dist/models/WorkflowFieldReference.js +74 -0
- package/dist/models/WorkflowGraph.d.ts +53 -0
- package/dist/models/WorkflowGraph.js +67 -0
- package/dist/models/WorkflowIssue.d.ts +72 -0
- package/dist/models/WorkflowIssue.js +70 -0
- package/dist/models/WorkflowList.d.ts +51 -0
- package/dist/models/WorkflowList.js +63 -0
- package/dist/models/WorkflowNode.d.ts +83 -0
- package/dist/models/WorkflowNode.js +76 -0
- package/dist/models/WorkflowNodePosition.d.ts +38 -0
- package/dist/models/WorkflowNodePosition.js +54 -0
- package/dist/models/WorkflowPresetChoice.d.ts +60 -0
- package/dist/models/WorkflowPresetChoice.js +67 -0
- package/dist/models/WorkflowPresetChoices.d.ts +33 -0
- package/dist/models/WorkflowPresetChoices.js +51 -0
- package/dist/models/WorkflowPresetRemoval.d.ts +32 -0
- package/dist/models/WorkflowPresetRemoval.js +50 -0
- package/dist/models/WorkflowPresetWidget.d.ts +38 -0
- package/dist/models/WorkflowPresetWidget.js +54 -0
- package/dist/models/WorkflowPublishResult.d.ts +47 -0
- package/dist/models/WorkflowPublishResult.js +61 -0
- package/dist/models/WorkflowRemoved.d.ts +32 -0
- package/dist/models/WorkflowRemoved.js +50 -0
- package/dist/models/WorkflowSchedule.d.ts +69 -0
- package/dist/models/WorkflowSchedule.js +74 -0
- package/dist/models/WorkflowStats.d.ts +77 -0
- package/dist/models/WorkflowStats.js +75 -0
- package/dist/models/WorkflowStatus.d.ts +30 -0
- package/dist/models/WorkflowStatus.js +56 -0
- package/dist/models/WorkflowTrigger.d.ts +77 -0
- package/dist/models/WorkflowTrigger.js +72 -0
- package/dist/models/WorkflowTriggerValuesInner.d.ts +47 -0
- package/dist/models/WorkflowTriggerValuesInner.js +63 -0
- package/dist/models/WorkflowVersion.d.ts +63 -0
- package/dist/models/WorkflowVersion.js +69 -0
- package/dist/models/WorkflowVersionDetail.d.ts +76 -0
- package/dist/models/WorkflowVersionDetail.js +78 -0
- package/dist/models/WorkflowVersionList.d.ts +33 -0
- package/dist/models/WorkflowVersionList.js +51 -0
- package/dist/models/WorkflowVersionPublishedBy.d.ts +38 -0
- package/dist/models/WorkflowVersionPublishedBy.js +50 -0
- package/dist/models/index.d.ts +85 -0
- package/dist/models/index.js +85 -0
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +1 -1
- package/package.json +2 -2
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AccountCreditBalanceResponse, GetPartnerBillingOverview200Response, GetPartnerCreditTransactions200Response, GetPartnerDesignDefaults200Response, GetUserAdapterConnections200Response, ListPartnerPresets200Response, MyPartnersResponse, PartnerAnalyticsByManagedUserResponse, PartnerAnalyticsSummaryResponse, PartnerAnalyticsTimelineResponse, PartnerAnalyticsTopWidgetsResponse, PartnerContractResponse, PartnerDataDatabaseRemovalResponse, PartnerDataDatabaseResponse, PartnerEntryContextSecretResponse, PartnerEntryContextSigningResponse, PartnerExtraCreditsInvoiceResponse, PartnerNotificationDeliveryLogResponse, PartnerNotificationDeliveryResponse, PartnerNotificationPageResponse, PartnerNotificationSettingsChangeResponse, PartnerNotificationSettingsResponse, PartnerNotificationTestEventRequest, PartnerNotificationTestEventResultResponse, PartnerPresetRemovalResponse, PartnerPresetResponse, PartnerStorageDestinationResponse, PartnerStorageRemovalResponse, PartnerStorageUsageResponse, RemoveUserAdapterConnection200Response, RequestExtraCredits, SetAdapterConnectionRequest, SetPartnerDataDatabaseRequest, SetPartnerDesignDefaultsRequest, SetPartnerPresetRequest, SetPartnerStorageDestinationRequest, SetUserAdapterConnection200Response, UpdatePartnerEntryContextSigningRequest, UpdatePartnerNotificationSettingsRequest } from '../models/index';
|
|
13
|
+
import type { AccountCreditBalanceResponse, ConfirmAdapterConnectionRequest, GetPartnerBillingOverview200Response, GetPartnerCreditTransactions200Response, GetPartnerDesignDefaults200Response, GetUserAdapterConnections200Response, ListPartnerPresets200Response, ListPartnerWorkflowPresets200Response, MyPartnersResponse, OfferWorkflowPresetRequest, PartnerAnalyticsByManagedUserResponse, PartnerAnalyticsSummaryResponse, PartnerAnalyticsTimelineResponse, PartnerAnalyticsTopWidgetsResponse, PartnerContractResponse, PartnerDataDatabaseRemovalResponse, PartnerDataDatabaseResponse, PartnerEntryContextSecretResponse, PartnerEntryContextSigningResponse, PartnerExtraCreditsInvoiceResponse, PartnerNotificationDeliveryLogResponse, PartnerNotificationDeliveryResponse, PartnerNotificationPageResponse, PartnerNotificationSettingsChangeResponse, PartnerNotificationSettingsResponse, PartnerNotificationTestEventRequest, PartnerNotificationTestEventResultResponse, PartnerPresetRemovalResponse, PartnerPresetResponse, PartnerStorageDestinationResponse, PartnerStorageRemovalResponse, PartnerStorageUsageResponse, RemovePartnerWorkflowPreset200Response, RemoveUserAdapterConnection200Response, RequestExtraCredits, SetAdapterConnectionRequest, SetPartnerDataDatabaseRequest, SetPartnerDesignDefaultsRequest, SetPartnerPresetRequest, SetPartnerStorageDestinationRequest, SetPartnerWorkflowPreset200Response, SetUserAdapterConnection200Response, UpdatePartnerEntryContextSigningRequest, UpdatePartnerNotificationSettingsRequest } from '../models/index';
|
|
14
|
+
export interface ConfirmPartnerAdapterConnection0Request {
|
|
15
|
+
partnerId: string;
|
|
16
|
+
adapterId: string;
|
|
17
|
+
credentialKey: string;
|
|
18
|
+
confirmAdapterConnectionRequest: ConfirmAdapterConnectionRequest;
|
|
19
|
+
}
|
|
14
20
|
export interface CreatePartnerExtraCreditsInvoice0Request {
|
|
15
21
|
partnerId: string;
|
|
16
22
|
idempotencyKey: string;
|
|
@@ -95,6 +101,9 @@ export interface ListPartnerNotifications0Request {
|
|
|
95
101
|
export interface ListPartnerPresets0Request {
|
|
96
102
|
partnerId: string;
|
|
97
103
|
}
|
|
104
|
+
export interface ListPartnerWorkflowPresets0Request {
|
|
105
|
+
partnerId: string;
|
|
106
|
+
}
|
|
98
107
|
export interface RemovePartnerAdapterConnection0Request {
|
|
99
108
|
partnerId: string;
|
|
100
109
|
adapterId: string;
|
|
@@ -110,6 +119,10 @@ export interface RemovePartnerPreset0Request {
|
|
|
110
119
|
export interface RemovePartnerStorageDestination0Request {
|
|
111
120
|
partnerId: string;
|
|
112
121
|
}
|
|
122
|
+
export interface RemovePartnerWorkflowPreset0Request {
|
|
123
|
+
partnerId: string;
|
|
124
|
+
key: string;
|
|
125
|
+
}
|
|
113
126
|
export interface ReplayPartnerNotificationDelivery0Request {
|
|
114
127
|
partnerId: string;
|
|
115
128
|
deliveryId: string;
|
|
@@ -151,6 +164,11 @@ export interface SetPartnerStorageDestination0Request {
|
|
|
151
164
|
partnerId: string;
|
|
152
165
|
setPartnerStorageDestinationRequest: SetPartnerStorageDestinationRequest;
|
|
153
166
|
}
|
|
167
|
+
export interface SetPartnerWorkflowPreset0Request {
|
|
168
|
+
partnerId: string;
|
|
169
|
+
key: string;
|
|
170
|
+
offerWorkflowPresetRequest: OfferWorkflowPresetRequest;
|
|
171
|
+
}
|
|
154
172
|
export interface UpdatePartnerEntryContextSigning0Request {
|
|
155
173
|
partnerId: string;
|
|
156
174
|
updatePartnerEntryContextSigningRequest: UpdatePartnerEntryContextSigningRequest;
|
|
@@ -172,12 +190,22 @@ export interface VerifyPartnerStorageDestination0Request {
|
|
|
172
190
|
*/
|
|
173
191
|
export declare class PartnersApi extends runtime.BaseAPI {
|
|
174
192
|
/**
|
|
175
|
-
*
|
|
193
|
+
* Some credentials are an email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one with `setPartnerAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets of the partner\'s customers that need it are not charged and their visitors are told the feature is unavailable. The code works for 30 minutes and for five wrong tries. After that, save the address again and a new code is emailed (not sooner than a minute after the last one). A code that is not made of digits is refused without counting as a try. Confirming an address that is already confirmed answers 200 with the same state, so a retry of a request that went through is harmless. Saving a different address, or the same one before it was confirmed, starts again. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
194
|
+
* Confirm a partner\'s adapter address with the code that was emailed to it
|
|
195
|
+
*/
|
|
196
|
+
confirmPartnerAdapterConnectionRaw(requestParameters: ConfirmPartnerAdapterConnection0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SetUserAdapterConnection200Response>>;
|
|
197
|
+
/**
|
|
198
|
+
* Some credentials are an email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one with `setPartnerAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets of the partner\'s customers that need it are not charged and their visitors are told the feature is unavailable. The code works for 30 minutes and for five wrong tries. After that, save the address again and a new code is emailed (not sooner than a minute after the last one). A code that is not made of digits is refused without counting as a try. Confirming an address that is already confirmed answers 200 with the same state, so a retry of a request that went through is harmless. Saving a different address, or the same one before it was confirmed, starts again. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
199
|
+
* Confirm a partner\'s adapter address with the code that was emailed to it
|
|
200
|
+
*/
|
|
201
|
+
confirmPartnerAdapterConnection(requestParameters: ConfirmPartnerAdapterConnection0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SetUserAdapterConnection200Response>;
|
|
202
|
+
/**
|
|
203
|
+
* Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`). Available only to partners that have an active paid contract in force with Widgetic (`NO_PAID_CONTRACT` when none is in force) and no overdue contract invoice (`CONTRACT_INVOICE_OVERDUE` while a contract invoice is past its due day). A partner that has run out of credits during its period can buy more at the list price. 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 purchase you mean to make, and a new key for the next one. At most 10 requests an hour. Who may ask: the person who administers the partner, or a Widgetic administrator. A key limited to scopes needs `billing:write`.
|
|
176
204
|
* Buy extra credits for a partner
|
|
177
205
|
*/
|
|
178
206
|
createPartnerExtraCreditsInvoiceRaw(requestParameters: CreatePartnerExtraCreditsInvoice0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PartnerExtraCreditsInvoiceResponse>>;
|
|
179
207
|
/**
|
|
180
|
-
* Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`).
|
|
208
|
+
* Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`). Available only to partners that have an active paid contract in force with Widgetic (`NO_PAID_CONTRACT` when none is in force) and no overdue contract invoice (`CONTRACT_INVOICE_OVERDUE` while a contract invoice is past its due day). A partner that has run out of credits during its period can buy more at the list price. 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 purchase you mean to make, and a new key for the next one. At most 10 requests an hour. Who may ask: the person who administers the partner, or a Widgetic administrator. A key limited to scopes needs `billing:write`.
|
|
181
209
|
* Buy extra credits for a partner
|
|
182
210
|
*/
|
|
183
211
|
createPartnerExtraCreditsInvoice(requestParameters: CreatePartnerExtraCreditsInvoice0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PartnerExtraCreditsInvoiceResponse>;
|
|
@@ -369,6 +397,16 @@ export declare class PartnersApi extends runtime.BaseAPI {
|
|
|
369
397
|
* List the widgets a partner offers as presets
|
|
370
398
|
*/
|
|
371
399
|
listPartnerPresets(requestParameters: ListPartnerPresets0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListPartnerPresets200Response>;
|
|
400
|
+
/**
|
|
401
|
+
* The partner\'s starting points, ordered by `position` and then by `key`: the published workflows it offers its managed users when they make a new workflow. Each says whether people can start from it now and, when they cannot, why. The list is the same for every managed user, and a managed user is shown only what is available. A starting point is one of the partner account\'s own published workflows, built from compositions the account made for itself (not for a customer or a team) and from widgets the partner already offers as presets (`setPartnerPreset`), and it uses at most 10 widgets. A partner offers up to 50. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
|
|
402
|
+
* List the workflows a partner offers as places to start
|
|
403
|
+
*/
|
|
404
|
+
listPartnerWorkflowPresetsRaw(requestParameters: ListPartnerWorkflowPresets0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListPartnerWorkflowPresets200Response>>;
|
|
405
|
+
/**
|
|
406
|
+
* The partner\'s starting points, ordered by `position` and then by `key`: the published workflows it offers its managed users when they make a new workflow. Each says whether people can start from it now and, when they cannot, why. The list is the same for every managed user, and a managed user is shown only what is available. A starting point is one of the partner account\'s own published workflows, built from compositions the account made for itself (not for a customer or a team) and from widgets the partner already offers as presets (`setPartnerPreset`), and it uses at most 10 widgets. A partner offers up to 50. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
|
|
407
|
+
* List the workflows a partner offers as places to start
|
|
408
|
+
*/
|
|
409
|
+
listPartnerWorkflowPresets(requestParameters: ListPartnerWorkflowPresets0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListPartnerWorkflowPresets200Response>;
|
|
372
410
|
/**
|
|
373
411
|
* Removes a key an adapter was given. The adapter stops working for the widgets of the partner\'s customers that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with `removed: false`: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
374
412
|
* Remove an adapter key from a partner
|
|
@@ -409,6 +447,16 @@ export declare class PartnersApi extends runtime.BaseAPI {
|
|
|
409
447
|
* Stop storing a partner\'s uploaded files in its own bucket
|
|
410
448
|
*/
|
|
411
449
|
removePartnerStorageDestination(requestParameters: RemovePartnerStorageDestination0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PartnerStorageRemovalResponse>;
|
|
450
|
+
/**
|
|
451
|
+
* Removes the starting point under `key`. The workflow itself is not touched, and neither are the workflows people already started from it. Removing a starting point the partner does not offer is not an error: the answer is `removed: false`.
|
|
452
|
+
* Stop offering a workflow as a place to start
|
|
453
|
+
*/
|
|
454
|
+
removePartnerWorkflowPresetRaw(requestParameters: RemovePartnerWorkflowPreset0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RemovePartnerWorkflowPreset200Response>>;
|
|
455
|
+
/**
|
|
456
|
+
* Removes the starting point under `key`. The workflow itself is not touched, and neither are the workflows people already started from it. Removing a starting point the partner does not offer is not an error: the answer is `removed: false`.
|
|
457
|
+
* Stop offering a workflow as a place to start
|
|
458
|
+
*/
|
|
459
|
+
removePartnerWorkflowPreset(requestParameters: RemovePartnerWorkflowPreset0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RemovePartnerWorkflowPreset200Response>;
|
|
412
460
|
/**
|
|
413
461
|
* Sends one earlier **webhook** delivery again to your **current** webhook address, with the same event `id` (`webhook-id`) as the original notification so a receiver that remembers ids can ignore a duplicate, and a new `createdAt` and signature made with your current secret. The attempt is recorded in the delivery log as a new row that points at the delivery you replayed. Set a webhook address (and secret) under notification settings before you replay. Changing the settings needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
414
462
|
* Send a webhook delivery again
|
|
@@ -450,12 +498,12 @@ export declare class PartnersApi extends runtime.BaseAPI {
|
|
|
450
498
|
*/
|
|
451
499
|
sendPartnerNotificationTestEvent(requestParameters: SendPartnerNotificationTestEvent0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PartnerNotificationTestEventResultResponse>;
|
|
452
500
|
/**
|
|
453
|
-
* Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner\'s behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. A widget whose adapter has no key connected is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to
|
|
501
|
+
* Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner\'s behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one checks that it is one email address and emails a six-digit code to it; the answer says `awaitingConfirmation: true`, and nothing is sent to the address until the code is given back with `confirmPartnerAdapterConnection`. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to do. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
|
|
454
502
|
* Connect an adapter key to a partner
|
|
455
503
|
*/
|
|
456
504
|
setPartnerAdapterConnectionRaw(requestParameters: SetPartnerAdapterConnection0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SetUserAdapterConnection200Response>>;
|
|
457
505
|
/**
|
|
458
|
-
* Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner\'s behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. A widget whose adapter has no key connected is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to
|
|
506
|
+
* Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner\'s behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one checks that it is one email address and emails a six-digit code to it; the answer says `awaitingConfirmation: true`, and nothing is sent to the address until the code is given back with `confirmPartnerAdapterConnection`. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to do. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
|
|
459
507
|
* Connect an adapter key to a partner
|
|
460
508
|
*/
|
|
461
509
|
setPartnerAdapterConnection(requestParameters: SetPartnerAdapterConnection0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SetUserAdapterConnection200Response>;
|
|
@@ -499,6 +547,16 @@ export declare class PartnersApi extends runtime.BaseAPI {
|
|
|
499
547
|
* Set where a partner\'s uploaded files are stored
|
|
500
548
|
*/
|
|
501
549
|
setPartnerStorageDestination(requestParameters: SetPartnerStorageDestination0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PartnerStorageDestinationResponse>;
|
|
550
|
+
/**
|
|
551
|
+
* Offers one of the partner account\'s own published workflows to its managed users under `key`. If the partner already offers something under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole starting point: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit. A workflow is offered once. What people get is the workflow\'s live version as it is when they start, so publishing the workflow changes what new starts get; workflows people already started are never touched. The offer is refused, and `error.details.reason` says why, when the workflow: - is not the partner account\'s own (a workflow of a team or of a customer, or of somebody else), or does not exist: 404, the same for both; - is archived (409 `workflow_archived`), or was never published (409 `workflow_not_published`); - shows no composition (422 `workflow_empty`), or a block shows a composition made for a customer or a team (422 `composition_not_own`); - chains more than 10 widgets (422 `too_many_widgets`), or a widget that the partner does not offer as a preset (422 `widget_not_preset`; `error.details.widgets` lists them, each with its `id` and `name`, so they can be offered first with `setPartnerPreset`); - is already offered under another key (409 `workflow_already_offered`; `error.details.key` says which), or the partner already offers 50 (409 `too_many_presets`). The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator, who offers the partner\'s workflow on its behalf.
|
|
552
|
+
* Offer a workflow as a place to start, or replace what a key offers
|
|
553
|
+
*/
|
|
554
|
+
setPartnerWorkflowPresetRaw(requestParameters: SetPartnerWorkflowPreset0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SetPartnerWorkflowPreset200Response>>;
|
|
555
|
+
/**
|
|
556
|
+
* Offers one of the partner account\'s own published workflows to its managed users under `key`. If the partner already offers something under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole starting point: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit. A workflow is offered once. What people get is the workflow\'s live version as it is when they start, so publishing the workflow changes what new starts get; workflows people already started are never touched. The offer is refused, and `error.details.reason` says why, when the workflow: - is not the partner account\'s own (a workflow of a team or of a customer, or of somebody else), or does not exist: 404, the same for both; - is archived (409 `workflow_archived`), or was never published (409 `workflow_not_published`); - shows no composition (422 `workflow_empty`), or a block shows a composition made for a customer or a team (422 `composition_not_own`); - chains more than 10 widgets (422 `too_many_widgets`), or a widget that the partner does not offer as a preset (422 `widget_not_preset`; `error.details.widgets` lists them, each with its `id` and `name`, so they can be offered first with `setPartnerPreset`); - is already offered under another key (409 `workflow_already_offered`; `error.details.key` says which), or the partner already offers 50 (409 `too_many_presets`). The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator, who offers the partner\'s workflow on its behalf.
|
|
557
|
+
* Offer a workflow as a place to start, or replace what a key offers
|
|
558
|
+
*/
|
|
559
|
+
setPartnerWorkflowPreset(requestParameters: SetPartnerWorkflowPreset0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SetPartnerWorkflowPreset200Response>;
|
|
502
560
|
/**
|
|
503
561
|
* Chooses what the gateway does with an entry whose `context` carries no valid signature. With `required: false` (the default) an entry that carries a signature is checked and refused when the signature is wrong or out of date, and an entry that carries none is accepted, as it always was. With `required: true` an entry without a valid signature is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`: use it once every page of yours that embeds a composition signs its context. Signatures cannot be required before you have made a secret (`rotatePartnerEntryContextSecret`): the answer is 409, so that you cannot lock your own compositions out of taking entries. The change reaches every part of the gateway within a minute. Saving the same choice twice leaves the same state, so a retry is harmless and `Idempotency-Key` is optional. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
504
562
|
* Require a signed context, or stop requiring it
|
package/dist/apis/PartnersApi.js
CHANGED
|
@@ -54,7 +54,51 @@ const index_1 = require("../models/index");
|
|
|
54
54
|
*/
|
|
55
55
|
class PartnersApi extends runtime.BaseAPI {
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Some credentials are an email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one with `setPartnerAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets of the partner\'s customers that need it are not charged and their visitors are told the feature is unavailable. The code works for 30 minutes and for five wrong tries. After that, save the address again and a new code is emailed (not sooner than a minute after the last one). A code that is not made of digits is refused without counting as a try. Confirming an address that is already confirmed answers 200 with the same state, so a retry of a request that went through is harmless. Saving a different address, or the same one before it was confirmed, starts again. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
58
|
+
* Confirm a partner\'s adapter address with the code that was emailed to it
|
|
59
|
+
*/
|
|
60
|
+
async confirmPartnerAdapterConnectionRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['partnerId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling confirmPartnerAdapterConnection().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['adapterId'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('adapterId', 'Required parameter "adapterId" was null or undefined when calling confirmPartnerAdapterConnection().');
|
|
66
|
+
}
|
|
67
|
+
if (requestParameters['credentialKey'] == null) {
|
|
68
|
+
throw new runtime.RequiredError('credentialKey', 'Required parameter "credentialKey" was null or undefined when calling confirmPartnerAdapterConnection().');
|
|
69
|
+
}
|
|
70
|
+
if (requestParameters['confirmAdapterConnectionRequest'] == null) {
|
|
71
|
+
throw new runtime.RequiredError('confirmAdapterConnectionRequest', 'Required parameter "confirmAdapterConnectionRequest" was null or undefined when calling confirmPartnerAdapterConnection().');
|
|
72
|
+
}
|
|
73
|
+
const queryParameters = {};
|
|
74
|
+
const headerParameters = {};
|
|
75
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
76
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
77
|
+
const token = this.configuration.accessToken;
|
|
78
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
79
|
+
if (tokenString) {
|
|
80
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const response = await this.request({
|
|
84
|
+
path: `/partners/{partnerId}/adapter-connections/{adapterId}/{credentialKey}/confirm`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"adapterId"}}`, encodeURIComponent(String(requestParameters['adapterId']))).replace(`{${"credentialKey"}}`, encodeURIComponent(String(requestParameters['credentialKey']))),
|
|
85
|
+
method: 'POST',
|
|
86
|
+
headers: headerParameters,
|
|
87
|
+
query: queryParameters,
|
|
88
|
+
body: (0, index_1.ConfirmAdapterConnectionRequestToJSON)(requestParameters['confirmAdapterConnectionRequest']),
|
|
89
|
+
}, initOverrides);
|
|
90
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SetUserAdapterConnection200ResponseFromJSON)(jsonValue));
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Some credentials are an email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one with `setPartnerAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets of the partner\'s customers that need it are not charged and their visitors are told the feature is unavailable. The code works for 30 minutes and for five wrong tries. After that, save the address again and a new code is emailed (not sooner than a minute after the last one). A code that is not made of digits is refused without counting as a try. Confirming an address that is already confirmed answers 200 with the same state, so a retry of a request that went through is harmless. Saving a different address, or the same one before it was confirmed, starts again. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
94
|
+
* Confirm a partner\'s adapter address with the code that was emailed to it
|
|
95
|
+
*/
|
|
96
|
+
async confirmPartnerAdapterConnection(requestParameters, initOverrides) {
|
|
97
|
+
const response = await this.confirmPartnerAdapterConnectionRaw(requestParameters, initOverrides);
|
|
98
|
+
return await response.value();
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`). Available only to partners that have an active paid contract in force with Widgetic (`NO_PAID_CONTRACT` when none is in force) and no overdue contract invoice (`CONTRACT_INVOICE_OVERDUE` while a contract invoice is past its due day). A partner that has run out of credits during its period can buy more at the list price. 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 purchase you mean to make, and a new key for the next one. At most 10 requests an hour. Who may ask: the person who administers the partner, or a Widgetic administrator. A key limited to scopes needs `billing:write`.
|
|
58
102
|
* Buy extra credits for a partner
|
|
59
103
|
*/
|
|
60
104
|
async createPartnerExtraCreditsInvoiceRaw(requestParameters, initOverrides) {
|
|
@@ -90,7 +134,7 @@ class PartnersApi extends runtime.BaseAPI {
|
|
|
90
134
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PartnerExtraCreditsInvoiceResponseFromJSON)(jsonValue));
|
|
91
135
|
}
|
|
92
136
|
/**
|
|
93
|
-
* Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`).
|
|
137
|
+
* Asks Widgetic for an invoice for extra credits, on top of the credits of the contract. Name the dollars; the invoice is for the most whole credits they buy at the **list price** of a credit (the price a contract may lower belongs to the contract), so it is never for more than you asked: 12.34 buys 123 credits and the invoice says 12.30. The smallest purchase is 10 dollars and one request buys at most 100000 (ask Widgetic for an invoice for more). Pay the invoice with the link in the answer. When it is paid the credits are added **once, for good**, to the account of the person who administers the partner, which is the account everything the partner builds is charged to (`getPartnerCreditBalance` shows it). Extra credits **do not expire**, unlike the credits of a contract period, which end with it. Nothing is added before the invoice is paid, and an unpaid invoice for extra credits never stops the partner: only an unpaid invoice of the contract does (`payment_arrears`). Available only to partners that have an active paid contract in force with Widgetic (`NO_PAID_CONTRACT` when none is in force) and no overdue contract invoice (`CONTRACT_INVOICE_OVERDUE` while a contract invoice is past its due day). A partner that has run out of credits during its period can buy more at the list price. 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 purchase you mean to make, and a new key for the next one. At most 10 requests an hour. Who may ask: the person who administers the partner, or a Widgetic administrator. A key limited to scopes needs `billing:write`.
|
|
94
138
|
* Buy extra credits for a partner
|
|
95
139
|
*/
|
|
96
140
|
async createPartnerExtraCreditsInvoice(requestParameters, initOverrides) {
|
|
@@ -794,6 +838,39 @@ class PartnersApi extends runtime.BaseAPI {
|
|
|
794
838
|
const response = await this.listPartnerPresetsRaw(requestParameters, initOverrides);
|
|
795
839
|
return await response.value();
|
|
796
840
|
}
|
|
841
|
+
/**
|
|
842
|
+
* The partner\'s starting points, ordered by `position` and then by `key`: the published workflows it offers its managed users when they make a new workflow. Each says whether people can start from it now and, when they cannot, why. The list is the same for every managed user, and a managed user is shown only what is available. A starting point is one of the partner account\'s own published workflows, built from compositions the account made for itself (not for a customer or a team) and from widgets the partner already offers as presets (`setPartnerPreset`), and it uses at most 10 widgets. A partner offers up to 50. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
|
|
843
|
+
* List the workflows a partner offers as places to start
|
|
844
|
+
*/
|
|
845
|
+
async listPartnerWorkflowPresetsRaw(requestParameters, initOverrides) {
|
|
846
|
+
if (requestParameters['partnerId'] == null) {
|
|
847
|
+
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling listPartnerWorkflowPresets().');
|
|
848
|
+
}
|
|
849
|
+
const queryParameters = {};
|
|
850
|
+
const headerParameters = {};
|
|
851
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
852
|
+
const token = this.configuration.accessToken;
|
|
853
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
854
|
+
if (tokenString) {
|
|
855
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
const response = await this.request({
|
|
859
|
+
path: `/partners/{partnerId}/workflow-presets`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))),
|
|
860
|
+
method: 'GET',
|
|
861
|
+
headers: headerParameters,
|
|
862
|
+
query: queryParameters,
|
|
863
|
+
}, initOverrides);
|
|
864
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListPartnerWorkflowPresets200ResponseFromJSON)(jsonValue));
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* The partner\'s starting points, ordered by `position` and then by `key`: the published workflows it offers its managed users when they make a new workflow. Each says whether people can start from it now and, when they cannot, why. The list is the same for every managed user, and a managed user is shown only what is available. A starting point is one of the partner account\'s own published workflows, built from compositions the account made for itself (not for a customer or a team) and from widgets the partner already offers as presets (`setPartnerPreset`), and it uses at most 10 widgets. A partner offers up to 50. The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator.
|
|
868
|
+
* List the workflows a partner offers as places to start
|
|
869
|
+
*/
|
|
870
|
+
async listPartnerWorkflowPresets(requestParameters, initOverrides) {
|
|
871
|
+
const response = await this.listPartnerWorkflowPresetsRaw(requestParameters, initOverrides);
|
|
872
|
+
return await response.value();
|
|
873
|
+
}
|
|
797
874
|
/**
|
|
798
875
|
* Removes a key an adapter was given. The adapter stops working for the widgets of the partner\'s customers that need it: their visitors are told the feature is unavailable. Nothing else of the widgets changes, and connecting a key again brings them back. Removing a key that is not connected answers 200 with `removed: false`: the state asked for is the state it is in. A key of an adapter that has since been retired from the catalog can still be removed. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
799
876
|
* Remove an adapter key from a partner
|
|
@@ -935,6 +1012,42 @@ class PartnersApi extends runtime.BaseAPI {
|
|
|
935
1012
|
const response = await this.removePartnerStorageDestinationRaw(requestParameters, initOverrides);
|
|
936
1013
|
return await response.value();
|
|
937
1014
|
}
|
|
1015
|
+
/**
|
|
1016
|
+
* Removes the starting point under `key`. The workflow itself is not touched, and neither are the workflows people already started from it. Removing a starting point the partner does not offer is not an error: the answer is `removed: false`.
|
|
1017
|
+
* Stop offering a workflow as a place to start
|
|
1018
|
+
*/
|
|
1019
|
+
async removePartnerWorkflowPresetRaw(requestParameters, initOverrides) {
|
|
1020
|
+
if (requestParameters['partnerId'] == null) {
|
|
1021
|
+
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling removePartnerWorkflowPreset().');
|
|
1022
|
+
}
|
|
1023
|
+
if (requestParameters['key'] == null) {
|
|
1024
|
+
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling removePartnerWorkflowPreset().');
|
|
1025
|
+
}
|
|
1026
|
+
const queryParameters = {};
|
|
1027
|
+
const headerParameters = {};
|
|
1028
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1029
|
+
const token = this.configuration.accessToken;
|
|
1030
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
1031
|
+
if (tokenString) {
|
|
1032
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
const response = await this.request({
|
|
1036
|
+
path: `/partners/{partnerId}/workflow-presets/{key}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
|
|
1037
|
+
method: 'DELETE',
|
|
1038
|
+
headers: headerParameters,
|
|
1039
|
+
query: queryParameters,
|
|
1040
|
+
}, initOverrides);
|
|
1041
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.RemovePartnerWorkflowPreset200ResponseFromJSON)(jsonValue));
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* Removes the starting point under `key`. The workflow itself is not touched, and neither are the workflows people already started from it. Removing a starting point the partner does not offer is not an error: the answer is `removed: false`.
|
|
1045
|
+
* Stop offering a workflow as a place to start
|
|
1046
|
+
*/
|
|
1047
|
+
async removePartnerWorkflowPreset(requestParameters, initOverrides) {
|
|
1048
|
+
const response = await this.removePartnerWorkflowPresetRaw(requestParameters, initOverrides);
|
|
1049
|
+
return await response.value();
|
|
1050
|
+
}
|
|
938
1051
|
/**
|
|
939
1052
|
* Sends one earlier **webhook** delivery again to your **current** webhook address, with the same event `id` (`webhook-id`) as the original notification so a receiver that remembers ids can ignore a duplicate, and a new `createdAt` and signature made with your current secret. The attempt is recorded in the delivery log as a new row that points at the delivery you replayed. Set a webhook address (and secret) under notification settings before you replay. Changing the settings needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
940
1053
|
* Send a webhook delivery again
|
|
@@ -1100,7 +1213,7 @@ class PartnersApi extends runtime.BaseAPI {
|
|
|
1100
1213
|
return await response.value();
|
|
1101
1214
|
}
|
|
1102
1215
|
/**
|
|
1103
|
-
* Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner\'s behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. A widget whose adapter has no key connected is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to
|
|
1216
|
+
* Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner\'s behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one checks that it is one email address and emails a six-digit code to it; the answer says `awaitingConfirmation: true`, and nothing is sent to the address until the code is given back with `confirmPartnerAdapterConnection`. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to do. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
|
|
1104
1217
|
* Connect an adapter key to a partner
|
|
1105
1218
|
*/
|
|
1106
1219
|
async setPartnerAdapterConnectionRaw(requestParameters, initOverrides) {
|
|
@@ -1136,7 +1249,7 @@ class PartnersApi extends runtime.BaseAPI {
|
|
|
1136
1249
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SetUserAdapterConnection200ResponseFromJSON)(jsonValue));
|
|
1137
1250
|
}
|
|
1138
1251
|
/**
|
|
1139
|
-
* Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner\'s behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. A widget whose adapter has no key connected is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to
|
|
1252
|
+
* Gives an adapter the key it needs to act through a service the partner has an account with, for the widgets of the customers the partner manages. Take the `adapterId` and `credentialKey` from `getPartnerAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this partner, this adapter and this credential, so that a stored value cannot be moved to another. It is never returned, never logged and never shown to a visitor of a widget or to your customers. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on the partner\'s behalf, and discards it. To cut that off, remove the key here, or revoke it with the provider. **What is checked.** That the adapter exists and takes this credential, that a partner may keep it (some are for an owner only) and that the text is one line of at most 2048 characters. Whether the provider accepts the key is not checked here: it shows the first time a widget uses it. **An address that has to be confirmed.** Some credentials are not a key but the email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getPartnerAdapterConnections`). Saving one checks that it is one email address and emails a six-digit code to it; the answer says `awaitingConfirmation: true`, and nothing is sent to the address until the code is given back with `confirmPartnerAdapterConnection`. Saving the same address again before it is confirmed emails a new code (not sooner than a minute after the last); saving the address that is already confirmed changes nothing. If the code cannot be emailed, nothing is saved. A widget whose adapter has no key connected, or whose address is not confirmed yet, is not charged and does not run that adapter: its visitors are told the feature is unavailable, and the partner is told once a day what to do. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
|
|
1140
1253
|
* Connect an adapter key to a partner
|
|
1141
1254
|
*/
|
|
1142
1255
|
async setPartnerAdapterConnection(requestParameters, initOverrides) {
|
|
@@ -1298,6 +1411,47 @@ class PartnersApi extends runtime.BaseAPI {
|
|
|
1298
1411
|
const response = await this.setPartnerStorageDestinationRaw(requestParameters, initOverrides);
|
|
1299
1412
|
return await response.value();
|
|
1300
1413
|
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Offers one of the partner account\'s own published workflows to its managed users under `key`. If the partner already offers something under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole starting point: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit. A workflow is offered once. What people get is the workflow\'s live version as it is when they start, so publishing the workflow changes what new starts get; workflows people already started are never touched. The offer is refused, and `error.details.reason` says why, when the workflow: - is not the partner account\'s own (a workflow of a team or of a customer, or of somebody else), or does not exist: 404, the same for both; - is archived (409 `workflow_archived`), or was never published (409 `workflow_not_published`); - shows no composition (422 `workflow_empty`), or a block shows a composition made for a customer or a team (422 `composition_not_own`); - chains more than 10 widgets (422 `too_many_widgets`), or a widget that the partner does not offer as a preset (422 `widget_not_preset`; `error.details.widgets` lists them, each with its `id` and `name`, so they can be offered first with `setPartnerPreset`); - is already offered under another key (409 `workflow_already_offered`; `error.details.key` says which), or the partner already offers 50 (409 `too_many_presets`). The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator, who offers the partner\'s workflow on its behalf.
|
|
1416
|
+
* Offer a workflow as a place to start, or replace what a key offers
|
|
1417
|
+
*/
|
|
1418
|
+
async setPartnerWorkflowPresetRaw(requestParameters, initOverrides) {
|
|
1419
|
+
if (requestParameters['partnerId'] == null) {
|
|
1420
|
+
throw new runtime.RequiredError('partnerId', 'Required parameter "partnerId" was null or undefined when calling setPartnerWorkflowPreset().');
|
|
1421
|
+
}
|
|
1422
|
+
if (requestParameters['key'] == null) {
|
|
1423
|
+
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling setPartnerWorkflowPreset().');
|
|
1424
|
+
}
|
|
1425
|
+
if (requestParameters['offerWorkflowPresetRequest'] == null) {
|
|
1426
|
+
throw new runtime.RequiredError('offerWorkflowPresetRequest', 'Required parameter "offerWorkflowPresetRequest" was null or undefined when calling setPartnerWorkflowPreset().');
|
|
1427
|
+
}
|
|
1428
|
+
const queryParameters = {};
|
|
1429
|
+
const headerParameters = {};
|
|
1430
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1431
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1432
|
+
const token = this.configuration.accessToken;
|
|
1433
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
1434
|
+
if (tokenString) {
|
|
1435
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
const response = await this.request({
|
|
1439
|
+
path: `/partners/{partnerId}/workflow-presets/{key}`.replace(`{${"partnerId"}}`, encodeURIComponent(String(requestParameters['partnerId']))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))),
|
|
1440
|
+
method: 'PUT',
|
|
1441
|
+
headers: headerParameters,
|
|
1442
|
+
query: queryParameters,
|
|
1443
|
+
body: (0, index_1.OfferWorkflowPresetRequestToJSON)(requestParameters['offerWorkflowPresetRequest']),
|
|
1444
|
+
}, initOverrides);
|
|
1445
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SetPartnerWorkflowPreset200ResponseFromJSON)(jsonValue));
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* Offers one of the partner account\'s own published workflows to its managed users under `key`. If the partner already offers something under that key it is replaced, so sending the same request twice is safe. Saving replaces the whole starting point: a `title`, `description` or `position` you leave out goes back to its default. Keys are 1 to 64 characters: lowercase letters, digits, hyphens and underscores, the first a letter or a digit. A workflow is offered once. What people get is the workflow\'s live version as it is when they start, so publishing the workflow changes what new starts get; workflows people already started are never touched. The offer is refused, and `error.details.reason` says why, when the workflow: - is not the partner account\'s own (a workflow of a team or of a customer, or of somebody else), or does not exist: 404, the same for both; - is archived (409 `workflow_archived`), or was never published (409 `workflow_not_published`); - shows no composition (422 `workflow_empty`), or a block shows a composition made for a customer or a team (422 `composition_not_own`); - chains more than 10 widgets (422 `too_many_widgets`), or a widget that the partner does not offer as a preset (422 `widget_not_preset`; `error.details.widgets` lists them, each with its `id` and `name`, so they can be offered first with `setPartnerPreset`); - is already offered under another key (409 `workflow_already_offered`; `error.details.key` says which), or the partner already offers 50 (409 `too_many_presets`). The caller must be the person who administers the partner (an API key of that account works), or a Widgetic administrator, who offers the partner\'s workflow on its behalf.
|
|
1449
|
+
* Offer a workflow as a place to start, or replace what a key offers
|
|
1450
|
+
*/
|
|
1451
|
+
async setPartnerWorkflowPreset(requestParameters, initOverrides) {
|
|
1452
|
+
const response = await this.setPartnerWorkflowPresetRaw(requestParameters, initOverrides);
|
|
1453
|
+
return await response.value();
|
|
1454
|
+
}
|
|
1301
1455
|
/**
|
|
1302
1456
|
* Chooses what the gateway does with an entry whose `context` carries no valid signature. With `required: false` (the default) an entry that carries a signature is checked and refused when the signature is wrong or out of date, and an entry that carries none is accepted, as it always was. With `required: true` an entry without a valid signature is refused with 403 `CONTEXT_SIGNATURE_REQUIRED`: use it once every page of yours that embeds a composition signs its context. Signatures cannot be required before you have made a secret (`rotatePartnerEntryContextSecret`): the answer is 409, so that you cannot lock your own compositions out of taking entries. The change reaches every part of the gateway within a minute. Saving the same choice twice leaves the same state, so a retry is harmless and `Idempotency-Key` is optional. This needs an API key with full access. The caller must be the person who administers the partner, or a Widgetic administrator.
|
|
1303
1457
|
* Require a signed context, or stop requiring it
|