@widgetic/api-sdk-ts 1.11.109 → 1.11.151
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/CanvasesApi.d.ts +15 -15
- package/dist/apis/CompositionsApi.d.ts +257 -155
- package/dist/apis/CompositionsApi.js +338 -134
- package/dist/apis/CreditsApi.d.ts +11 -11
- package/dist/apis/CreditsApi.js +5 -5
- package/dist/apis/EntitlementsApi.d.ts +6 -6
- package/dist/apis/InvoicesApi.d.ts +6 -6
- package/dist/apis/InvoicesApi.js +2 -2
- package/dist/apis/ManagedUsersApi.d.ts +97 -63
- package/dist/apis/ManagedUsersApi.js +106 -39
- package/dist/apis/OperationsApi.d.ts +4 -4
- package/dist/apis/OperationsApi.js +5 -5
- package/dist/apis/OrganizationsApi.d.ts +74 -0
- package/dist/apis/OrganizationsApi.js +205 -0
- package/dist/apis/PartnersApi.d.ts +133 -133
- package/dist/apis/PartnersApi.js +19 -19
- package/dist/apis/PublicEmbedApi.d.ts +57 -42
- package/dist/apis/PublicEmbedApi.js +64 -29
- package/dist/apis/TokensApi.d.ts +2 -0
- package/dist/apis/TokensApi.js +2 -0
- package/dist/apis/UploadsApi.d.ts +40 -40
- package/dist/apis/UploadsApi.js +60 -60
- package/dist/apis/UsersApi.d.ts +30 -86
- package/dist/apis/UsersApi.js +6 -154
- package/dist/apis/WidgetsApi.d.ts +25 -25
- package/dist/apis/WidgetsApi.js +38 -38
- package/dist/apis/WorkflowsApi.d.ts +115 -157
- package/dist/apis/WorkflowsApi.js +111 -221
- package/dist/apis/index.d.ts +2 -2
- package/dist/apis/index.js +2 -2
- package/dist/esm/apis/BrandKitApi.js +344 -0
- package/dist/esm/apis/CompositionsApi.js +338 -134
- package/dist/esm/apis/CreditsApi.js +6 -6
- package/dist/esm/apis/InvoicesApi.js +1 -1
- package/dist/esm/apis/ManagedUsersApi.js +106 -39
- package/dist/esm/apis/OperationsApi.js +6 -6
- package/dist/esm/apis/OrganizationsApi.js +168 -0
- package/dist/esm/apis/PartnersApi.js +20 -20
- package/dist/esm/apis/PublicEmbedApi.js +65 -30
- package/dist/esm/apis/TokensApi.js +2 -0
- package/dist/esm/apis/UploadsApi.js +60 -60
- package/dist/esm/apis/UsersApi.js +7 -155
- package/dist/esm/apis/WidgetsApi.js +39 -39
- package/dist/esm/apis/WorkflowsApi.js +111 -221
- package/dist/esm/apis/index.js +2 -2
- package/dist/esm/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +8 -8
- package/dist/esm/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +8 -8
- package/dist/esm/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +8 -8
- package/dist/esm/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +8 -8
- package/dist/esm/models/AddOrganizationDomainResponse.js +51 -0
- package/dist/esm/models/AddOrganizationDomainResponseData.js +44 -0
- package/dist/esm/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +8 -8
- 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 +59 -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/BrandTextStyle.js +65 -0
- package/dist/esm/models/Canvas.js +3 -0
- package/dist/esm/models/CanvasActiveOperation.js +66 -0
- package/dist/esm/models/{CreateCompositionDatabaseRecord201Response.js → CompositionDatabaseRecordResponse.js} +8 -8
- package/dist/esm/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +8 -8
- package/dist/esm/models/CreateWidget201ResponseData.js +6 -0
- package/dist/esm/models/{CreateCompositionFromWidget201Response.js → DeleteOrganizationDomainResponse.js} +11 -11
- package/dist/esm/models/DeleteOrganizationDomainResponseData.js +41 -0
- package/dist/esm/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +11 -11
- package/dist/esm/models/{UploadsIdDelete200ResponseData.js → DeleteUpload200ResponseData.js} +8 -8
- package/dist/esm/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +8 -8
- package/dist/esm/models/EditorSession.js +4 -0
- package/dist/esm/models/GetOperationResponse.js +51 -0
- package/dist/esm/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +12 -11
- package/dist/esm/models/GetOperationResponseDataMetadata.js +69 -0
- package/dist/esm/models/GetOrganizationDomains200Response.js +51 -0
- package/dist/esm/models/{UploadsGet200Response.js → ListUploads200Response.js} +8 -8
- package/dist/esm/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +8 -8
- package/dist/esm/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +8 -8
- package/dist/esm/models/NewWidget.js +0 -1
- package/dist/esm/models/{PersonalWorkspaceDomain.js → OrganizationDomain.js} +12 -18
- package/dist/esm/models/PatchBrandKitAssetRequest.js +68 -0
- package/dist/esm/models/PatchBrandKitRequest.js +57 -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/PublicWorkflowEventsRequestEventsInner.js +11 -0
- package/dist/esm/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +8 -8
- package/dist/esm/models/PutBrandKitRequest.js +49 -0
- package/dist/esm/models/UpdateOrganizationDomainResponse.js +51 -0
- package/dist/esm/models/Upload.js +2 -0
- package/dist/esm/models/UserApiKey.js +2 -0
- package/dist/esm/models/ValidateToken200ResponseData.js +3 -0
- package/dist/esm/models/ValidateToken200ResponseDataWorkspace.js +43 -0
- package/dist/esm/models/Widget.js +6 -0
- package/dist/esm/models/WidgetClarification.js +52 -0
- package/dist/esm/models/WidgetClarificationOption.js +51 -0
- package/dist/esm/models/WidgetClarificationQuestion.js +64 -0
- package/dist/esm/models/WidgetCodeChange.js +68 -0
- package/dist/esm/models/WidgetCodeChanges.js +48 -0
- package/dist/esm/models/WidgetNextStep.js +71 -0
- package/dist/esm/models/WidgetPlan.js +61 -0
- package/dist/esm/models/WidgetPlanDecisions.js +72 -0
- package/dist/esm/models/WidgetPlanDecisionsAdaptersInner.js +47 -0
- package/dist/esm/models/WidgetPlanDecisionsLibrariesInner.js +51 -0
- package/dist/esm/models/WidgetPlanDecisionsResponsive.js +51 -0
- package/dist/esm/models/WidgetPlanTask.js +80 -0
- package/dist/esm/models/{CreateWorkspaceWorkflowFromPreset201Response.js → WorkflowDetailResponse.js} +8 -8
- package/dist/esm/models/WorkflowFailureReason.js +49 -0
- package/dist/esm/models/WorkflowFailureReasonCounter.js +52 -0
- package/dist/esm/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +8 -8
- package/dist/esm/models/WorkflowStats.js +3 -0
- package/dist/esm/models/index.js +59 -25
- package/dist/esm/runtime.js +1 -1
- package/dist/models/AccountCreditBalance.d.ts +2 -2
- package/dist/models/AccountCreditTransactionListResponse.d.ts +46 -0
- package/dist/models/{GetPartnerCreditTransactions200Response.js → AccountCreditTransactionListResponse.js} +13 -13
- package/dist/models/AdapterConnectionListResponse.d.ts +46 -0
- package/dist/models/{GetUserAdapterConnections200Response.js → AdapterConnectionListResponse.js} +13 -13
- package/dist/models/AdapterConnectionRemovalResponse.d.ts +46 -0
- package/dist/models/{RemoveUserAdapterConnection200Response.js → AdapterConnectionRemovalResponse.js} +13 -13
- package/dist/models/AdapterConnectionResponse.d.ts +46 -0
- package/dist/models/{SetUserAdapterConnection200Response.js → AdapterConnectionResponse.js} +13 -13
- package/dist/models/AddOrganizationDomainResponse.d.ts +46 -0
- package/dist/models/AddOrganizationDomainResponse.js +58 -0
- package/dist/models/AddOrganizationDomainResponseData.d.ts +39 -0
- package/dist/models/AddOrganizationDomainResponseData.js +51 -0
- package/dist/models/AiAnswersKnowledgeDocumentResponse.d.ts +46 -0
- package/dist/models/{AddAiAnswersKnowledgeDocument201Response.js → AiAnswersKnowledgeDocumentResponse.js} +13 -13
- 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 +60 -0
- package/dist/models/BrandKitTokens.js +66 -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/BrandTextStyle.d.ts +59 -0
- package/dist/models/BrandTextStyle.js +73 -0
- package/dist/models/Canvas.d.ts +7 -0
- package/dist/models/Canvas.js +3 -0
- package/dist/models/CanvasActiveOperation.d.ts +65 -0
- package/dist/models/CanvasActiveOperation.js +74 -0
- package/dist/models/CompositionDatabaseRecordResponse.d.ts +48 -0
- package/dist/models/CompositionDatabaseRecordResponse.js +57 -0
- package/dist/models/ContentItemWriteResultResponse.d.ts +46 -0
- package/dist/models/{CreateCompositionContentItem201Response.js → ContentItemWriteResultResponse.js} +13 -13
- package/dist/models/CreateWidget201ResponseData.d.ts +18 -0
- package/dist/models/CreateWidget201ResponseData.js +6 -0
- package/dist/models/DeleteOrganizationDomainResponse.d.ts +46 -0
- package/dist/models/DeleteOrganizationDomainResponse.js +58 -0
- package/dist/models/DeleteOrganizationDomainResponseData.d.ts +32 -0
- package/dist/models/DeleteOrganizationDomainResponseData.js +48 -0
- package/dist/models/DeleteUpload200Response.d.ts +46 -0
- package/dist/models/{OperationsIdGetResponse.js → DeleteUpload200Response.js} +16 -16
- package/dist/models/DeleteUpload200ResponseData.d.ts +32 -0
- package/dist/models/DeleteUpload200ResponseData.js +48 -0
- package/dist/models/DesignDefaultsResponse.d.ts +46 -0
- package/dist/models/{GetPartnerDesignDefaults200Response.js → DesignDefaultsResponse.js} +13 -13
- package/dist/models/EditorSession.d.ts +7 -0
- package/dist/models/EditorSession.js +4 -0
- package/dist/models/GetOperationResponse.d.ts +46 -0
- package/dist/models/GetOperationResponse.js +58 -0
- package/dist/models/GetOperationResponseData.d.ts +86 -0
- package/dist/models/{OperationsIdGetResponseData.js → GetOperationResponseData.js} +18 -17
- package/dist/models/GetOperationResponseDataMetadata.d.ts +87 -0
- package/dist/models/GetOperationResponseDataMetadata.js +77 -0
- package/dist/models/GetOrganizationDomains200Response.d.ts +46 -0
- package/dist/models/GetOrganizationDomains200Response.js +58 -0
- package/dist/models/ListUploads200Response.d.ts +46 -0
- package/dist/models/{UploadsGet200Response.js → ListUploads200Response.js} +13 -13
- package/dist/models/ManagedUserLimitsResponse.d.ts +46 -0
- package/dist/models/{GetManagedUserLimits200Response.js → ManagedUserLimitsResponse.js} +13 -13
- package/dist/models/ManagedUserRemovalResponse.d.ts +46 -0
- package/dist/models/{DeleteManagedUser200Response.js → ManagedUserRemovalResponse.js} +13 -13
- package/dist/models/NewEditorSession.d.ts +1 -1
- package/dist/models/NewWidget.d.ts +2 -3
- package/dist/models/NewWidget.js +0 -1
- package/dist/models/OrganizationDomain.d.ts +56 -0
- package/dist/models/OrganizationDomain.js +56 -0
- package/dist/models/PartnerBillingOverviewOperationalCredits.d.ts +1 -1
- package/dist/models/PatchBrandKitAssetRequest.d.ts +73 -0
- package/dist/models/PatchBrandKitAssetRequest.js +76 -0
- package/dist/models/PatchBrandKitRequest.d.ts +72 -0
- package/dist/models/PatchBrandKitRequest.js +64 -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/PublicWorkflowEventsRequestEventsInner.d.ts +21 -0
- package/dist/models/PublicWorkflowEventsRequestEventsInner.js +12 -1
- package/dist/models/PublicWorkflowResponse.d.ts +46 -0
- package/dist/models/{GetPublicWorkflow200Response.js → PublicWorkflowResponse.js} +13 -13
- package/dist/models/PutBrandKitRequest.d.ts +46 -0
- package/dist/models/PutBrandKitRequest.js +56 -0
- package/dist/models/UpdateOrganizationDomainResponse.d.ts +46 -0
- package/dist/models/UpdateOrganizationDomainResponse.js +58 -0
- package/dist/models/Upload.d.ts +7 -1
- package/dist/models/Upload.js +2 -0
- package/dist/models/UploadLimits.d.ts +3 -3
- package/dist/models/UserApiKey.d.ts +6 -0
- package/dist/models/UserApiKey.js +2 -0
- package/dist/models/ValidateToken200ResponseData.d.ts +7 -0
- package/dist/models/ValidateToken200ResponseData.js +3 -0
- package/dist/models/ValidateToken200ResponseDataWorkspace.d.ts +38 -0
- package/dist/models/ValidateToken200ResponseDataWorkspace.js +50 -0
- package/dist/models/Widget.d.ts +18 -0
- package/dist/models/Widget.js +6 -0
- package/dist/models/WidgetClarification.d.ts +45 -0
- package/dist/models/WidgetClarification.js +59 -0
- package/dist/models/WidgetClarificationOption.d.ts +44 -0
- package/dist/models/WidgetClarificationOption.js +58 -0
- package/dist/models/WidgetClarificationQuestion.d.ts +63 -0
- package/dist/models/WidgetClarificationQuestion.js +71 -0
- package/dist/models/WidgetCodeChange.d.ts +70 -0
- package/dist/models/WidgetCodeChange.js +76 -0
- package/dist/models/WidgetCodeChanges.d.ts +39 -0
- package/dist/models/WidgetCodeChanges.js +55 -0
- package/dist/models/WidgetNextStep.d.ts +69 -0
- package/dist/models/WidgetNextStep.js +79 -0
- package/dist/models/WidgetPlan.d.ts +58 -0
- package/dist/models/WidgetPlan.js +68 -0
- package/dist/models/WidgetPlanDecisions.d.ts +77 -0
- package/dist/models/WidgetPlanDecisions.js +79 -0
- package/dist/models/WidgetPlanDecisionsAdaptersInner.d.ts +38 -0
- package/dist/models/WidgetPlanDecisionsAdaptersInner.js +54 -0
- package/dist/models/WidgetPlanDecisionsLibrariesInner.d.ts +44 -0
- package/dist/models/WidgetPlanDecisionsLibrariesInner.js +58 -0
- package/dist/models/WidgetPlanDecisionsResponsive.d.ts +44 -0
- package/dist/models/WidgetPlanDecisionsResponsive.js +58 -0
- package/dist/models/WidgetPlanTask.d.ts +77 -0
- package/dist/models/WidgetPlanTask.js +88 -0
- package/dist/models/WorkflowDetailAllOfLastEditedBy.d.ts +2 -2
- package/dist/models/WorkflowDetailResponse.d.ts +46 -0
- package/dist/models/WorkflowDetailResponse.js +58 -0
- package/dist/models/WorkflowFailureReason.d.ts +31 -0
- package/dist/models/WorkflowFailureReason.js +57 -0
- package/dist/models/WorkflowFailureReasonCounter.d.ts +45 -0
- package/dist/models/WorkflowFailureReasonCounter.js +59 -0
- package/dist/models/WorkflowResponse.d.ts +46 -0
- package/dist/models/{SaveWorkspaceWorkflow200Response.js → WorkflowResponse.js} +13 -13
- package/dist/models/WorkflowStats.d.ts +16 -1
- package/dist/models/WorkflowStats.js +3 -0
- package/dist/models/index.d.ts +59 -25
- package/dist/models/index.js +59 -25
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/dist/apis/PartnerApi.d.ts +0 -2595
- package/dist/apis/PartnerApi.js +0 -6749
- package/dist/apis/WorkspacesApi.d.ts +0 -352
- package/dist/apis/WorkspacesApi.js +0 -946
- package/dist/esm/apis/PartnerApi.js +0 -6712
- package/dist/esm/apis/WorkspacesApi.js +0 -909
- package/dist/esm/models/DeletePersonalWorkspaceDomainResponse.js +0 -51
- package/dist/esm/models/DeletePersonalWorkspaceDomainResponseData.js +0 -41
- package/dist/esm/models/GetPersonalWorkspaceDomains200Response.js +0 -51
- package/dist/esm/models/PersonalWorkspaceDomainResult.js +0 -48
- package/dist/esm/models/PersonalWorkspaceDomainResultResponse.js +0 -51
- package/dist/esm/models/UploadsIdDelete200Response.js +0 -51
- package/dist/models/AddAiAnswersKnowledgeDocument201Response.d.ts +0 -46
- package/dist/models/CreateCompositionContentItem201Response.d.ts +0 -46
- package/dist/models/CreateCompositionDatabaseRecord201Response.d.ts +0 -48
- package/dist/models/CreateCompositionDatabaseRecord201Response.js +0 -57
- package/dist/models/CreateCompositionFromWidget201Response.d.ts +0 -46
- package/dist/models/CreateCompositionFromWidget201Response.js +0 -58
- package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.d.ts +0 -46
- package/dist/models/CreateWorkspaceWorkflowFromPreset201Response.js +0 -58
- package/dist/models/DeleteManagedUser200Response.d.ts +0 -46
- package/dist/models/DeletePersonalWorkspaceDomainResponse.d.ts +0 -46
- package/dist/models/DeletePersonalWorkspaceDomainResponse.js +0 -58
- package/dist/models/DeletePersonalWorkspaceDomainResponseData.d.ts +0 -32
- package/dist/models/DeletePersonalWorkspaceDomainResponseData.js +0 -48
- package/dist/models/GetManagedUserLimits200Response.d.ts +0 -46
- package/dist/models/GetPartnerCreditTransactions200Response.d.ts +0 -46
- package/dist/models/GetPartnerDesignDefaults200Response.d.ts +0 -46
- package/dist/models/GetPersonalWorkspaceDomains200Response.d.ts +0 -46
- package/dist/models/GetPersonalWorkspaceDomains200Response.js +0 -58
- package/dist/models/GetPublicWorkflow200Response.d.ts +0 -46
- package/dist/models/GetUserAdapterConnections200Response.d.ts +0 -46
- package/dist/models/OperationsIdGetResponse.d.ts +0 -46
- package/dist/models/OperationsIdGetResponseData.d.ts +0 -88
- package/dist/models/PersonalWorkspaceDomain.d.ts +0 -56
- package/dist/models/PersonalWorkspaceDomain.js +0 -62
- package/dist/models/PersonalWorkspaceDomainResult.d.ts +0 -39
- package/dist/models/PersonalWorkspaceDomainResult.js +0 -55
- package/dist/models/PersonalWorkspaceDomainResultResponse.d.ts +0 -46
- package/dist/models/PersonalWorkspaceDomainResultResponse.js +0 -58
- package/dist/models/RemoveUserAdapterConnection200Response.d.ts +0 -46
- package/dist/models/SaveWorkspaceWorkflow200Response.d.ts +0 -46
- package/dist/models/SetUserAdapterConnection200Response.d.ts +0 -46
- package/dist/models/UploadsGet200Response.d.ts +0 -46
- package/dist/models/UploadsIdDelete200Response.d.ts +0 -46
- package/dist/models/UploadsIdDelete200Response.js +0 -58
- package/dist/models/UploadsIdDelete200ResponseData.d.ts +0 -32
- package/dist/models/UploadsIdDelete200ResponseData.js +0 -48
package/dist/apis/UsersApi.js
CHANGED
|
@@ -53,44 +53,6 @@ const index_1 = require("../models/index");
|
|
|
53
53
|
*
|
|
54
54
|
*/
|
|
55
55
|
class UsersApi extends runtime.BaseAPI {
|
|
56
|
-
/**
|
|
57
|
-
* Adds a website to an account\'s own list. Give a website name such as `example.com`, or `*.example.com` for a website and all of its subdomains. A scheme, a port, a path, capital letters and a leading `www.` are dropped, so `https://www.Example.com/shop` is kept as `example.com`, and `example.com` covers `www.example.com` too. Something that is not a website name is refused, not stored. Until the first website is added nothing is restricted, and a widget can be shown anywhere. Once the list has one, a widget of the account is shown on the listed websites (and on Widgetic\'s own) and nowhere else. A page on your own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed, so there is nothing to add to test locally. So is the website where a partner your account administers integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), so there is nothing to add for it either and a list can never lock it out. A change can take about 15 seconds to reach every server. The list is a safeguard against other websites showing your widgets in a visitor\'s browser. It is not access control: anyone who knows a widget\'s id can still fetch its published content with a plain request that names no website. There is no limit on the list of an account that administers a partner, so a partner can add the website of each of its customers as they publish on their own domain, one call each. Any other account can list at most 50 websites, and the 51st is answered with a 409 (`BUSINESS_STATE_CONFLICT`). A wildcard such as `*.example.com` counts as one website, not one per subdomain, so use it instead of listing each subdomain. A page that frames a widget can name only so many websites to the browser (about fifty of ordinary length). Past that, the browser no longer checks the list for that page; the lookup that the Embed SDK makes for the widget still refuses every website that is not on the list.
|
|
58
|
-
* Allow a website to show your widgets
|
|
59
|
-
*/
|
|
60
|
-
async addPersonalWorkspaceDomainRaw(requestParameters, initOverrides) {
|
|
61
|
-
if (requestParameters['id'] == null) {
|
|
62
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling addPersonalWorkspaceDomain().');
|
|
63
|
-
}
|
|
64
|
-
if (requestParameters['addDomainRequest'] == null) {
|
|
65
|
-
throw new runtime.RequiredError('addDomainRequest', 'Required parameter "addDomainRequest" was null or undefined when calling addPersonalWorkspaceDomain().');
|
|
66
|
-
}
|
|
67
|
-
const queryParameters = {};
|
|
68
|
-
const headerParameters = {};
|
|
69
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
70
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
71
|
-
const token = this.configuration.accessToken;
|
|
72
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
73
|
-
if (tokenString) {
|
|
74
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
const response = await this.request({
|
|
78
|
-
path: `/users/{id}/workspace/domains`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
79
|
-
method: 'POST',
|
|
80
|
-
headers: headerParameters,
|
|
81
|
-
query: queryParameters,
|
|
82
|
-
body: (0, index_1.AddDomainRequestToJSON)(requestParameters['addDomainRequest']),
|
|
83
|
-
}, initOverrides);
|
|
84
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PersonalWorkspaceDomainResultResponseFromJSON)(jsonValue));
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Adds a website to an account\'s own list. Give a website name such as `example.com`, or `*.example.com` for a website and all of its subdomains. A scheme, a port, a path, capital letters and a leading `www.` are dropped, so `https://www.Example.com/shop` is kept as `example.com`, and `example.com` covers `www.example.com` too. Something that is not a website name is refused, not stored. Until the first website is added nothing is restricted, and a widget can be shown anywhere. Once the list has one, a widget of the account is shown on the listed websites (and on Widgetic\'s own) and nowhere else. A page on your own machine (`localhost`, `127.0.0.1` or `[::1]`, on any port) is always allowed, so there is nothing to add to test locally. So is the website where a partner your account administers integrates Widgetic, with every subdomain of it (`platformDomain` in the answer of `GET /partners/mine`), so there is nothing to add for it either and a list can never lock it out. A change can take about 15 seconds to reach every server. The list is a safeguard against other websites showing your widgets in a visitor\'s browser. It is not access control: anyone who knows a widget\'s id can still fetch its published content with a plain request that names no website. There is no limit on the list of an account that administers a partner, so a partner can add the website of each of its customers as they publish on their own domain, one call each. Any other account can list at most 50 websites, and the 51st is answered with a 409 (`BUSINESS_STATE_CONFLICT`). A wildcard such as `*.example.com` counts as one website, not one per subdomain, so use it instead of listing each subdomain. A page that frames a widget can name only so many websites to the browser (about fifty of ordinary length). Past that, the browser no longer checks the list for that page; the lookup that the Embed SDK makes for the widget still refuses every website that is not on the list.
|
|
88
|
-
* Allow a website to show your widgets
|
|
89
|
-
*/
|
|
90
|
-
async addPersonalWorkspaceDomain(requestParameters, initOverrides) {
|
|
91
|
-
const response = await this.addPersonalWorkspaceDomainRaw(requestParameters, initOverrides);
|
|
92
|
-
return await response.value();
|
|
93
|
-
}
|
|
94
56
|
/**
|
|
95
57
|
* Some credentials are an email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getUserAdapterConnections`). Saving one with `setUserAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets 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 account itself or a Widgetic administrator.
|
|
96
58
|
* Confirm an adapter address with the code that was emailed to it
|
|
@@ -125,7 +87,7 @@ class UsersApi extends runtime.BaseAPI {
|
|
|
125
87
|
query: queryParameters,
|
|
126
88
|
body: (0, index_1.ConfirmAdapterConnectionRequestToJSON)(requestParameters['confirmAdapterConnectionRequest']),
|
|
127
89
|
}, initOverrides);
|
|
128
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
90
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdapterConnectionResponseFromJSON)(jsonValue));
|
|
129
91
|
}
|
|
130
92
|
/**
|
|
131
93
|
* Some credentials are an email address Widgetic sends a widget\'s messages to (`confirmation: email_code` in `getUserAdapterConnections`). Saving one with `setUserAdapterConnection` emails a six-digit code to it; this gives the code back. Only then is the address used: until it is confirmed, the widgets 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 account itself or a Widgetic administrator.
|
|
@@ -136,7 +98,7 @@ class UsersApi extends runtime.BaseAPI {
|
|
|
136
98
|
return await response.value();
|
|
137
99
|
}
|
|
138
100
|
/**
|
|
139
|
-
* Makes a new API key for
|
|
101
|
+
* Makes a new API key for a partner (or staff) account and returns its secret in `key`. That is the only time the secret is shown: Widgetic keeps a hash, so a key that was not stored cannot be recovered, only replaced. To rotate a key, make the new one, switch the integration over to it, then delete the old one. A customer account does not make personal keys: a customer\'s keys are workspace keys, made in Settings, under API keys, for one workspace. They take the same presets and scopes as the ones below. A request for a customer account is refused with 403 and the code `PERSONAL_API_KEY_RETIRED`. A personal key a customer made before workspace keys replaced them keeps working until it is deleted or expires, and can still be listed, renamed, switched off and deleted here. Only a person signed in on widgetic.com can make a key: a request made with an API key, or with an SDK token, is refused with 403. That way a leaked key cannot be used to make a second one that survives its revocation. Make keys from the dashboard; a key can still list, rename, switch off and delete keys. An `Idempotency-Key` header is required (8 to 50 characters: letters, digits, `-` and `_`). A retry with the same header and the same body returns the same answer instead of making a second key, and the same header with a different body is refused with 422. Make keys one at a time: two requests for the same account that run at the same moment can overwrite each other. A key can be limited to what it needs. Send a `preset` (`read_only`, `content` or `full_access`) or a list of `scopes`, never both. Send neither for a key that can do everything its owner can, as every key made before scopes existed. A limited key is refused with 403 and the code `API_KEY_SCOPE_MISSING` on anything outside its scopes, so a key held by a build server or by a partner\'s backend can be given only the part of the API it uses. The scopes of a key are fixed when it is made: to widen one, make a new key and delete the old one. A limited key cannot make, change or delete keys, exchange tokens or reach the administration routes. The list of scopes is in the `ApiKeyScope` schema. A partner or staff account has no limit on how many keys it holds, and its keys name no workspace: they act as the account.
|
|
140
102
|
* Create an API key
|
|
141
103
|
*/
|
|
142
104
|
async createUserApiKeyRaw(requestParameters, initOverrides) {
|
|
@@ -172,49 +134,13 @@ class UsersApi extends runtime.BaseAPI {
|
|
|
172
134
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreatedUserApiKeyResponseFromJSON)(jsonValue));
|
|
173
135
|
}
|
|
174
136
|
/**
|
|
175
|
-
* Makes a new API key for
|
|
137
|
+
* Makes a new API key for a partner (or staff) account and returns its secret in `key`. That is the only time the secret is shown: Widgetic keeps a hash, so a key that was not stored cannot be recovered, only replaced. To rotate a key, make the new one, switch the integration over to it, then delete the old one. A customer account does not make personal keys: a customer\'s keys are workspace keys, made in Settings, under API keys, for one workspace. They take the same presets and scopes as the ones below. A request for a customer account is refused with 403 and the code `PERSONAL_API_KEY_RETIRED`. A personal key a customer made before workspace keys replaced them keeps working until it is deleted or expires, and can still be listed, renamed, switched off and deleted here. Only a person signed in on widgetic.com can make a key: a request made with an API key, or with an SDK token, is refused with 403. That way a leaked key cannot be used to make a second one that survives its revocation. Make keys from the dashboard; a key can still list, rename, switch off and delete keys. An `Idempotency-Key` header is required (8 to 50 characters: letters, digits, `-` and `_`). A retry with the same header and the same body returns the same answer instead of making a second key, and the same header with a different body is refused with 422. Make keys one at a time: two requests for the same account that run at the same moment can overwrite each other. A key can be limited to what it needs. Send a `preset` (`read_only`, `content` or `full_access`) or a list of `scopes`, never both. Send neither for a key that can do everything its owner can, as every key made before scopes existed. A limited key is refused with 403 and the code `API_KEY_SCOPE_MISSING` on anything outside its scopes, so a key held by a build server or by a partner\'s backend can be given only the part of the API it uses. The scopes of a key are fixed when it is made: to widen one, make a new key and delete the old one. A limited key cannot make, change or delete keys, exchange tokens or reach the administration routes. The list of scopes is in the `ApiKeyScope` schema. A partner or staff account has no limit on how many keys it holds, and its keys name no workspace: they act as the account.
|
|
176
138
|
* Create an API key
|
|
177
139
|
*/
|
|
178
140
|
async createUserApiKey(requestParameters, initOverrides) {
|
|
179
141
|
const response = await this.createUserApiKeyRaw(requestParameters, initOverrides);
|
|
180
142
|
return await response.value();
|
|
181
143
|
}
|
|
182
|
-
/**
|
|
183
|
-
* Removes one entry from an account\'s own list. When it was the last one, nothing is restricted any more and a widget can be shown anywhere again. A change can take about 15 seconds to reach every server.
|
|
184
|
-
* Stop allowing a website to show your widgets
|
|
185
|
-
*/
|
|
186
|
-
async deletePersonalWorkspaceDomainRaw(requestParameters, initOverrides) {
|
|
187
|
-
if (requestParameters['id'] == null) {
|
|
188
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deletePersonalWorkspaceDomain().');
|
|
189
|
-
}
|
|
190
|
-
if (requestParameters['domainId'] == null) {
|
|
191
|
-
throw new runtime.RequiredError('domainId', 'Required parameter "domainId" was null or undefined when calling deletePersonalWorkspaceDomain().');
|
|
192
|
-
}
|
|
193
|
-
const queryParameters = {};
|
|
194
|
-
const headerParameters = {};
|
|
195
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
196
|
-
const token = this.configuration.accessToken;
|
|
197
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
198
|
-
if (tokenString) {
|
|
199
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
const response = await this.request({
|
|
203
|
-
path: `/users/{id}/workspace/domains/{domainId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"domainId"}}`, encodeURIComponent(String(requestParameters['domainId']))),
|
|
204
|
-
method: 'DELETE',
|
|
205
|
-
headers: headerParameters,
|
|
206
|
-
query: queryParameters,
|
|
207
|
-
}, initOverrides);
|
|
208
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DeletePersonalWorkspaceDomainResponseFromJSON)(jsonValue));
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Removes one entry from an account\'s own list. When it was the last one, nothing is restricted any more and a widget can be shown anywhere again. A change can take about 15 seconds to reach every server.
|
|
212
|
-
* Stop allowing a website to show your widgets
|
|
213
|
-
*/
|
|
214
|
-
async deletePersonalWorkspaceDomain(requestParameters, initOverrides) {
|
|
215
|
-
const response = await this.deletePersonalWorkspaceDomainRaw(requestParameters, initOverrides);
|
|
216
|
-
return await response.value();
|
|
217
|
-
}
|
|
218
144
|
/**
|
|
219
145
|
* Deletes a key and the record of what it was used for. The key stops working at once on the server that took the request and within a minute on the others, and cannot be brought back: make a new one instead. To stop a key without losing it, switch it off with `updateUserApiKey`.
|
|
220
146
|
* Delete an API key
|
|
@@ -251,39 +177,6 @@ class UsersApi extends runtime.BaseAPI {
|
|
|
251
177
|
const response = await this.deleteUserApiKeyRaw(requestParameters, initOverrides);
|
|
252
178
|
return await response.value();
|
|
253
179
|
}
|
|
254
|
-
/**
|
|
255
|
-
* Lists the websites on an account\'s own list, newest first. It is the list Widgetic checks when a widget of the account is embedded: when it holds at least one website, the widget is shown on those websites (and on Widgetic\'s own) and nowhere else; when it is empty, the widget can be shown anywhere. If the account administers a partner, the websites set on the partner record by Widgetic are added to them. Widgets that belong to an organization use the organization\'s list instead. The answer holds the whole list, however long it is: a partner\'s list has no limit.
|
|
256
|
-
* List the websites allowed to show your widgets
|
|
257
|
-
*/
|
|
258
|
-
async getPersonalWorkspaceDomainsRaw(requestParameters, initOverrides) {
|
|
259
|
-
if (requestParameters['id'] == null) {
|
|
260
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getPersonalWorkspaceDomains().');
|
|
261
|
-
}
|
|
262
|
-
const queryParameters = {};
|
|
263
|
-
const headerParameters = {};
|
|
264
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
265
|
-
const token = this.configuration.accessToken;
|
|
266
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
267
|
-
if (tokenString) {
|
|
268
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
const response = await this.request({
|
|
272
|
-
path: `/users/{id}/workspace/domains`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
273
|
-
method: 'GET',
|
|
274
|
-
headers: headerParameters,
|
|
275
|
-
query: queryParameters,
|
|
276
|
-
}, initOverrides);
|
|
277
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetPersonalWorkspaceDomains200ResponseFromJSON)(jsonValue));
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Lists the websites on an account\'s own list, newest first. It is the list Widgetic checks when a widget of the account is embedded: when it holds at least one website, the widget is shown on those websites (and on Widgetic\'s own) and nowhere else; when it is empty, the widget can be shown anywhere. If the account administers a partner, the websites set on the partner record by Widgetic are added to them. Widgets that belong to an organization use the organization\'s list instead. The answer holds the whole list, however long it is: a partner\'s list has no limit.
|
|
281
|
-
* List the websites allowed to show your widgets
|
|
282
|
-
*/
|
|
283
|
-
async getPersonalWorkspaceDomains(requestParameters, initOverrides) {
|
|
284
|
-
const response = await this.getPersonalWorkspaceDomainsRaw(requestParameters, initOverrides);
|
|
285
|
-
return await response.value();
|
|
286
|
-
}
|
|
287
180
|
/**
|
|
288
181
|
* Widget adapters are capabilities a widget can use, and some of them act through a service the owner has an account with: an adapter that sends email needs the owner\'s email provider key, one that sends texts needs the owner\'s SMS provider key. This lists every key an adapter takes from an owner and whether this account has connected it, so a settings page can show what is missing. An empty list means no adapter takes a key from an owner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with `setUserAdapterConnection`; take it away with `removeUserAdapterConnection`. The widgets of customers a partner manages use the partner\'s keys instead (`getPartnerAdapterConnections`). The caller must be the account itself (an API key of that account works, with the `account:read` scope), or a Widgetic administrator.
|
|
289
182
|
* See which adapter keys an account has connected
|
|
@@ -307,7 +200,7 @@ class UsersApi extends runtime.BaseAPI {
|
|
|
307
200
|
headers: headerParameters,
|
|
308
201
|
query: queryParameters,
|
|
309
202
|
}, initOverrides);
|
|
310
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
203
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdapterConnectionListResponseFromJSON)(jsonValue));
|
|
311
204
|
}
|
|
312
205
|
/**
|
|
313
206
|
* Widget adapters are capabilities a widget can use, and some of them act through a service the owner has an account with: an adapter that sends email needs the owner\'s email provider key, one that sends texts needs the owner\'s SMS provider key. This lists every key an adapter takes from an owner and whether this account has connected it, so a settings page can show what is missing. An empty list means no adapter takes a key from an owner at the moment. The list never contains a key: only whether one is connected and when it was last set. Connect a key with `setUserAdapterConnection`; take it away with `removeUserAdapterConnection`. The widgets of customers a partner manages use the partner\'s keys instead (`getPartnerAdapterConnections`). The caller must be the account itself (an API key of that account works, with the `account:read` scope), or a Widgetic administrator.
|
|
@@ -418,7 +311,7 @@ class UsersApi extends runtime.BaseAPI {
|
|
|
418
311
|
headers: headerParameters,
|
|
419
312
|
query: queryParameters,
|
|
420
313
|
}, initOverrides);
|
|
421
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
314
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdapterConnectionRemovalResponseFromJSON)(jsonValue));
|
|
422
315
|
}
|
|
423
316
|
/**
|
|
424
317
|
* Removes a key an adapter was given. The adapter stops working for the widgets 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 account itself or a Widgetic administrator.
|
|
@@ -462,7 +355,7 @@ class UsersApi extends runtime.BaseAPI {
|
|
|
462
355
|
query: queryParameters,
|
|
463
356
|
body: (0, index_1.SetAdapterConnectionRequestToJSON)(requestParameters['setAdapterConnectionRequest']),
|
|
464
357
|
}, initOverrides);
|
|
465
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
358
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdapterConnectionResponseFromJSON)(jsonValue));
|
|
466
359
|
}
|
|
467
360
|
/**
|
|
468
361
|
* Gives an adapter the key it needs to act through a service you have an account with, for the widgets you made. Take the `adapterId` and `credentialKey` from `getUserAdapterConnections`. Saving a key that is already connected replaces it. **What Widgetic does with it.** The key is stored encrypted, bound to this account, 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. A server of Widgetic opens it for the one call a widget makes through the adapter, uses it to call the provider on your 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 an owner may keep it (some are for a partner 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, and the widget tells its owner. **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 `getUserAdapterConnections`). 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 `confirmUserAdapterConnection`. 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 owner is told once a day what to do. This needs an API key with full access. The caller must be the account itself or a Widgetic administrator. A retry is harmless: saving the same key twice only refreshes when it was set.
|
|
@@ -472,47 +365,6 @@ class UsersApi extends runtime.BaseAPI {
|
|
|
472
365
|
const response = await this.setUserAdapterConnectionRaw(requestParameters, initOverrides);
|
|
473
366
|
return await response.value();
|
|
474
367
|
}
|
|
475
|
-
/**
|
|
476
|
-
* Replaces the website of one entry on an account\'s own list. The same rules apply as when adding one (`addPersonalWorkspaceDomain`): a website name such as `example.com` or `*.example.com`, kept in its cleaned form, and refused when it is not a website name or is already on the list.
|
|
477
|
-
* Change a website on your list
|
|
478
|
-
*/
|
|
479
|
-
async updatePersonalWorkspaceDomainRaw(requestParameters, initOverrides) {
|
|
480
|
-
if (requestParameters['id'] == null) {
|
|
481
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updatePersonalWorkspaceDomain().');
|
|
482
|
-
}
|
|
483
|
-
if (requestParameters['domainId'] == null) {
|
|
484
|
-
throw new runtime.RequiredError('domainId', 'Required parameter "domainId" was null or undefined when calling updatePersonalWorkspaceDomain().');
|
|
485
|
-
}
|
|
486
|
-
if (requestParameters['updateDomainRequest'] == null) {
|
|
487
|
-
throw new runtime.RequiredError('updateDomainRequest', 'Required parameter "updateDomainRequest" was null or undefined when calling updatePersonalWorkspaceDomain().');
|
|
488
|
-
}
|
|
489
|
-
const queryParameters = {};
|
|
490
|
-
const headerParameters = {};
|
|
491
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
492
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
493
|
-
const token = this.configuration.accessToken;
|
|
494
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
495
|
-
if (tokenString) {
|
|
496
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
const response = await this.request({
|
|
500
|
-
path: `/users/{id}/workspace/domains/{domainId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))).replace(`{${"domainId"}}`, encodeURIComponent(String(requestParameters['domainId']))),
|
|
501
|
-
method: 'PUT',
|
|
502
|
-
headers: headerParameters,
|
|
503
|
-
query: queryParameters,
|
|
504
|
-
body: (0, index_1.UpdateDomainRequestToJSON)(requestParameters['updateDomainRequest']),
|
|
505
|
-
}, initOverrides);
|
|
506
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PersonalWorkspaceDomainResultResponseFromJSON)(jsonValue));
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* Replaces the website of one entry on an account\'s own list. The same rules apply as when adding one (`addPersonalWorkspaceDomain`): a website name such as `example.com` or `*.example.com`, kept in its cleaned form, and refused when it is not a website name or is already on the list.
|
|
510
|
-
* Change a website on your list
|
|
511
|
-
*/
|
|
512
|
-
async updatePersonalWorkspaceDomain(requestParameters, initOverrides) {
|
|
513
|
-
const response = await this.updatePersonalWorkspaceDomainRaw(requestParameters, initOverrides);
|
|
514
|
-
return await response.value();
|
|
515
|
-
}
|
|
516
368
|
/**
|
|
517
369
|
* Renames a key, or switches it off (`isActive: false`) or back on. A key that is switched off is refused at once by the server that took the request and within a minute by the others, and can be switched on again; deleting is for a key that is not coming back. The secret, the expiry and the scopes of a key cannot be changed. Only a key with full access can make these requests: a key limited to some scopes is refused with 403 and the code `API_KEY_SCOPE_MISSING`. Renaming and switching off can be done with an API key. Switching a key on needs a person signed in on widgetic.com: a request that asks for it with an API key or an SDK token is refused with 403, so a leaked key cannot bring a dormant key back to life.
|
|
518
370
|
* Rename an API key, or switch it off or on
|
|
@@ -10,26 +10,26 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type {
|
|
14
|
-
export interface
|
|
13
|
+
import type { CompositionResponse, CreateCompositionFromWidgetRequest, CreateWidget201Response, GetWidgets200Response, GetWidgetsBatchRequest, GetWidgetsBatchResponse, NewWidget } from '../models/index';
|
|
14
|
+
export interface CreateCompositionFromWidgetOperationRequest {
|
|
15
15
|
id: string;
|
|
16
16
|
idempotencyKey: string;
|
|
17
17
|
createCompositionFromWidgetRequest: CreateCompositionFromWidgetRequest;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface CreateWidgetRequest {
|
|
20
20
|
idempotencyKey: string;
|
|
21
21
|
newWidget: NewWidget;
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
24
|
-
getWidgetsBatchRequest: GetWidgetsBatchRequest;
|
|
25
|
-
}
|
|
26
|
-
export interface GetWidgets0Request {
|
|
23
|
+
export interface GetWidgetsRequest {
|
|
27
24
|
page?: number;
|
|
28
25
|
size?: number;
|
|
29
26
|
canvasId?: string;
|
|
30
27
|
managedUserId?: string;
|
|
31
28
|
managedUserExternalId?: string;
|
|
32
29
|
}
|
|
30
|
+
export interface GetWidgetsBatchOperationRequest {
|
|
31
|
+
getWidgetsBatchRequest: GetWidgetsBatchRequest;
|
|
32
|
+
}
|
|
33
33
|
/**
|
|
34
34
|
*
|
|
35
35
|
*/
|
|
@@ -38,40 +38,40 @@ export declare class WidgetsApi extends runtime.BaseAPI {
|
|
|
38
38
|
* After a managed user publishes a widget from the creator, call this with the widget id, the customer\'s managed user (when the widget is not already filed under one), and optional content, design, embed settings and locale. Every input is validated before a single insert; a failure never leaves a half-made composition. When the widget is already tagged with a managed user, you may omit `managedUserId`. When you send it, it must match that tag. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget\'s file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The widget must be published. The `Idempotency-Key` header is required.
|
|
39
39
|
* Create a composition for a widget in one call
|
|
40
40
|
*/
|
|
41
|
-
createCompositionFromWidgetRaw(requestParameters:
|
|
41
|
+
createCompositionFromWidgetRaw(requestParameters: CreateCompositionFromWidgetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CompositionResponse>>;
|
|
42
42
|
/**
|
|
43
43
|
* After a managed user publishes a widget from the creator, call this with the widget id, the customer\'s managed user (when the widget is not already filed under one), and optional content, design, embed settings and locale. Every input is validated before a single insert; a failure never leaves a half-made composition. When the widget is already tagged with a managed user, you may omit `managedUserId`. When you send it, it must match that tag. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget\'s file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The widget must be published. The `Idempotency-Key` header is required.
|
|
44
44
|
* Create a composition for a widget in one call
|
|
45
45
|
*/
|
|
46
|
-
createCompositionFromWidget(requestParameters:
|
|
46
|
+
createCompositionFromWidget(requestParameters: CreateCompositionFromWidgetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CompositionResponse>;
|
|
47
47
|
/**
|
|
48
|
-
* Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name). It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If a step after the widget was saved does not go through, the widget is still created, and `data.warnings` says what did not. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in
|
|
48
|
+
* Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name). It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If a step after the widget was saved does not go through, the widget is still created, and `data.warnings` says what did not. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in a workspace where you may create widgets (`organizationId`). Naming anything you cannot use is refused with 403, and the answer is the same whether it exists or not. Every widget belongs to one workspace. It goes where its project is; with no project, in the workspace you name (`organizationId`); and when you name neither, in the workspace the call works in (the one your API key or connection belongs to, or the one you last chose on widgetic.com). A project of one workspace together with the id of another is refused with 400. A person who belongs to no workspace yet is told so (403 `NO_WORKSPACE`), and a call that acts for no person (an internal service) must name the workspace. To make the widget for one of your managed users, send `managedUserId` or `managedUserExternalId`. The widget stays in your account and is yours to edit; the tag lets you list one user\'s widgets with `getWidgets`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. This call has a limit of its own: 120 per minute for each account (ask Widgetic if you need more). Past that the call is answered with 429 and a `Retry-After`. A widget has no database of its own: what the visitors of a composition leave is kept in the tables of that composition, made when the composition is. The `Idempotency-Key` header is required; send the same key when you retry, so one widget is created, not two.
|
|
49
49
|
* Create Widget
|
|
50
50
|
*/
|
|
51
|
-
createWidgetRaw(requestParameters:
|
|
51
|
+
createWidgetRaw(requestParameters: CreateWidgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateWidget201Response>>;
|
|
52
52
|
/**
|
|
53
|
-
* Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name). It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If a step after the widget was saved does not go through, the widget is still created, and `data.warnings` says what did not. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in
|
|
53
|
+
* Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name). It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If a step after the widget was saved does not go through, the widget is still created, and `data.warnings` says what did not. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in a workspace where you may create widgets (`organizationId`). Naming anything you cannot use is refused with 403, and the answer is the same whether it exists or not. Every widget belongs to one workspace. It goes where its project is; with no project, in the workspace you name (`organizationId`); and when you name neither, in the workspace the call works in (the one your API key or connection belongs to, or the one you last chose on widgetic.com). A project of one workspace together with the id of another is refused with 400. A person who belongs to no workspace yet is told so (403 `NO_WORKSPACE`), and a call that acts for no person (an internal service) must name the workspace. To make the widget for one of your managed users, send `managedUserId` or `managedUserExternalId`. The widget stays in your account and is yours to edit; the tag lets you list one user\'s widgets with `getWidgets`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. This call has a limit of its own: 120 per minute for each account (ask Widgetic if you need more). Past that the call is answered with 429 and a `Retry-After`. A widget has no database of its own: what the visitors of a composition leave is kept in the tables of that composition, made when the composition is. The `Idempotency-Key` header is required; send the same key when you retry, so one widget is created, not two.
|
|
54
54
|
* Create Widget
|
|
55
55
|
*/
|
|
56
|
-
createWidget(requestParameters:
|
|
57
|
-
/**
|
|
58
|
-
* Retrieves multiple widgets by their IDs in a single request. An id that is not found, or that is not yours, is reported in `errors` exactly like one that does not exist. Called with an editor session, only the widgets made for the session\'s managed user are returned.
|
|
59
|
-
* Get Widgets Batch
|
|
60
|
-
*/
|
|
61
|
-
getWidgetsBatchRaw(requestParameters: GetWidgetsBatch0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetWidgetsBatchResponse>>;
|
|
62
|
-
/**
|
|
63
|
-
* Retrieves multiple widgets by their IDs in a single request. An id that is not found, or that is not yours, is reported in `errors` exactly like one that does not exist. Called with an editor session, only the widgets made for the session\'s managed user are returned.
|
|
64
|
-
* Get Widgets Batch
|
|
65
|
-
*/
|
|
66
|
-
getWidgetsBatch(requestParameters: GetWidgetsBatch0Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetWidgetsBatchResponse>;
|
|
56
|
+
createWidget(requestParameters: CreateWidgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateWidget201Response>;
|
|
67
57
|
/**
|
|
68
58
|
* Lists the widgets your account owns, newest first. A widget is the reusable piece a composition is made from; this is your own library, not a catalogue of Widgetic\'s widgets. Pass `page` (counting from 1) and `size` (1 to 100, 20 when left out) to read the list one page at a time. `meta` then carries `total`, `hasNextPage` and `hasPreviousPage`, so a client can walk the list to its end. A page past the end is an empty list. Without `page` and `size` the call returns the whole list in one response, which only suits an account with a few widgets. Pass `canvasId` to list only the widgets on one of your canvases. That list is always returned whole, whatever `page` and `size` say. Pass `managedUserId` (Widgetic\'s id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the widgets made for that managed user. The widgets of your other managed users, and your own, are left out. It combines with `page`, `size` and `canvasId`. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`.
|
|
69
59
|
* List Widgets
|
|
70
60
|
*/
|
|
71
|
-
getWidgetsRaw(requestParameters:
|
|
61
|
+
getWidgetsRaw(requestParameters: GetWidgetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetWidgets200Response>>;
|
|
72
62
|
/**
|
|
73
63
|
* Lists the widgets your account owns, newest first. A widget is the reusable piece a composition is made from; this is your own library, not a catalogue of Widgetic\'s widgets. Pass `page` (counting from 1) and `size` (1 to 100, 20 when left out) to read the list one page at a time. `meta` then carries `total`, `hasNextPage` and `hasPreviousPage`, so a client can walk the list to its end. A page past the end is an empty list. Without `page` and `size` the call returns the whole list in one response, which only suits an account with a few widgets. Pass `canvasId` to list only the widgets on one of your canvases. That list is always returned whole, whatever `page` and `size` say. Pass `managedUserId` (Widgetic\'s id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the widgets made for that managed user. The widgets of your other managed users, and your own, are left out. It combines with `page`, `size` and `canvasId`. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`.
|
|
74
64
|
* List Widgets
|
|
75
65
|
*/
|
|
76
|
-
getWidgets(requestParameters?:
|
|
66
|
+
getWidgets(requestParameters?: GetWidgetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetWidgets200Response>;
|
|
67
|
+
/**
|
|
68
|
+
* Retrieves multiple widgets by their IDs in a single request. An id that is not found, or that is not yours, is reported in `errors` exactly like one that does not exist. Called with an editor session, only the widgets made for the session\'s managed user are returned.
|
|
69
|
+
* Get Widgets Batch
|
|
70
|
+
*/
|
|
71
|
+
getWidgetsBatchRaw(requestParameters: GetWidgetsBatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetWidgetsBatchResponse>>;
|
|
72
|
+
/**
|
|
73
|
+
* Retrieves multiple widgets by their IDs in a single request. An id that is not found, or that is not yours, is reported in `errors` exactly like one that does not exist. Called with an editor session, only the widgets made for the session\'s managed user are returned.
|
|
74
|
+
* Get Widgets Batch
|
|
75
|
+
*/
|
|
76
|
+
getWidgetsBatch(requestParameters: GetWidgetsBatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetWidgetsBatchResponse>;
|
|
77
77
|
}
|
package/dist/apis/WidgetsApi.js
CHANGED
|
@@ -87,7 +87,7 @@ class WidgetsApi extends runtime.BaseAPI {
|
|
|
87
87
|
query: queryParameters,
|
|
88
88
|
body: (0, index_1.CreateCompositionFromWidgetRequestToJSON)(requestParameters['createCompositionFromWidgetRequest']),
|
|
89
89
|
}, initOverrides);
|
|
90
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
90
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompositionResponseFromJSON)(jsonValue));
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* After a managed user publishes a widget from the creator, call this with the widget id, the customer\'s managed user (when the widget is not already filed under one), and optional content, design, embed settings and locale. Every input is validated before a single insert; a failure never leaves a half-made composition. When the widget is already tagged with a managed user, you may omit `managedUserId`. When you send it, it must match that tag. A widget that keeps what visitors send (a form, a vote, a rating) declares its tables in its own source (`src/lib/meta/database.json`); they are made for the composition here, in a schema of its own, as the widget was when it was last published. A widget that keeps nothing leaves the composition without tables. If the tables cannot be made just now, or the widget\'s file cannot be used, the composition is still created (`201`) and `meta.warnings` says why; the tables are made the next time the widget is generated. The widget must be published. The `Idempotency-Key` header is required.
|
|
@@ -98,7 +98,7 @@ class WidgetsApi extends runtime.BaseAPI {
|
|
|
98
98
|
return await response.value();
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
|
-
* Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name). It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If a step after the widget was saved does not go through, the widget is still created, and `data.warnings` says what did not. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in
|
|
101
|
+
* Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name). It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If a step after the widget was saved does not go through, the widget is still created, and `data.warnings` says what did not. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in a workspace where you may create widgets (`organizationId`). Naming anything you cannot use is refused with 403, and the answer is the same whether it exists or not. Every widget belongs to one workspace. It goes where its project is; with no project, in the workspace you name (`organizationId`); and when you name neither, in the workspace the call works in (the one your API key or connection belongs to, or the one you last chose on widgetic.com). A project of one workspace together with the id of another is refused with 400. A person who belongs to no workspace yet is told so (403 `NO_WORKSPACE`), and a call that acts for no person (an internal service) must name the workspace. To make the widget for one of your managed users, send `managedUserId` or `managedUserExternalId`. The widget stays in your account and is yours to edit; the tag lets you list one user\'s widgets with `getWidgets`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. This call has a limit of its own: 120 per minute for each account (ask Widgetic if you need more). Past that the call is answered with 429 and a `Retry-After`. A widget has no database of its own: what the visitors of a composition leave is kept in the tables of that composition, made when the composition is. The `Idempotency-Key` header is required; send the same key when you retry, so one widget is created, not two.
|
|
102
102
|
* Create Widget
|
|
103
103
|
*/
|
|
104
104
|
async createWidgetRaw(requestParameters, initOverrides) {
|
|
@@ -131,48 +131,13 @@ class WidgetsApi extends runtime.BaseAPI {
|
|
|
131
131
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateWidget201ResponseFromJSON)(jsonValue));
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
|
-
* Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name). It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If a step after the widget was saved does not go through, the widget is still created, and `data.warnings` says what did not. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in
|
|
134
|
+
* Creates a widget for your account: a named record with a type and some starting content, on a canvas of its own (or one of yours that you name). It costs no credits and has no code yet; the code is generated for it afterwards. The new widget is yours, and you can list it with `getWidgets`. A widget is a draft until you say otherwise (`isDraft: false`). If a step after the widget was saved does not go through, the widget is still created, and `data.warnings` says what did not. Read it before relying on the widget. A widget can be placed on one of your canvases (`canvasId`), in a project you can edit (`projectId`) or in a workspace where you may create widgets (`organizationId`). Naming anything you cannot use is refused with 403, and the answer is the same whether it exists or not. Every widget belongs to one workspace. It goes where its project is; with no project, in the workspace you name (`organizationId`); and when you name neither, in the workspace the call works in (the one your API key or connection belongs to, or the one you last chose on widgetic.com). A project of one workspace together with the id of another is refused with 400. A person who belongs to no workspace yet is told so (403 `NO_WORKSPACE`), and a call that acts for no person (an internal service) must name the workspace. To make the widget for one of your managed users, send `managedUserId` or `managedUserExternalId`. The widget stays in your account and is yours to edit; the tag lets you list one user\'s widgets with `getWidgets`. The managed user must be yours and active: one that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`, and one that is switched off with 409 and `MANAGED_USER_INACTIVE`. The tag is set here and does not change afterwards. This call has a limit of its own: 120 per minute for each account (ask Widgetic if you need more). Past that the call is answered with 429 and a `Retry-After`. A widget has no database of its own: what the visitors of a composition leave is kept in the tables of that composition, made when the composition is. The `Idempotency-Key` header is required; send the same key when you retry, so one widget is created, not two.
|
|
135
135
|
* Create Widget
|
|
136
136
|
*/
|
|
137
137
|
async createWidget(requestParameters, initOverrides) {
|
|
138
138
|
const response = await this.createWidgetRaw(requestParameters, initOverrides);
|
|
139
139
|
return await response.value();
|
|
140
140
|
}
|
|
141
|
-
/**
|
|
142
|
-
* Retrieves multiple widgets by their IDs in a single request. An id that is not found, or that is not yours, is reported in `errors` exactly like one that does not exist. Called with an editor session, only the widgets made for the session\'s managed user are returned.
|
|
143
|
-
* Get Widgets Batch
|
|
144
|
-
*/
|
|
145
|
-
async getWidgetsBatchRaw(requestParameters, initOverrides) {
|
|
146
|
-
if (requestParameters['getWidgetsBatchRequest'] == null) {
|
|
147
|
-
throw new runtime.RequiredError('getWidgetsBatchRequest', 'Required parameter "getWidgetsBatchRequest" was null or undefined when calling getWidgetsBatch().');
|
|
148
|
-
}
|
|
149
|
-
const queryParameters = {};
|
|
150
|
-
const headerParameters = {};
|
|
151
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
152
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
153
|
-
const token = this.configuration.accessToken;
|
|
154
|
-
const tokenString = await token("apiKeyAuth", []);
|
|
155
|
-
if (tokenString) {
|
|
156
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
const response = await this.request({
|
|
160
|
-
path: `/widgets/batch`,
|
|
161
|
-
method: 'POST',
|
|
162
|
-
headers: headerParameters,
|
|
163
|
-
query: queryParameters,
|
|
164
|
-
body: (0, index_1.GetWidgetsBatchRequestToJSON)(requestParameters['getWidgetsBatchRequest']),
|
|
165
|
-
}, initOverrides);
|
|
166
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetWidgetsBatchResponseFromJSON)(jsonValue));
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Retrieves multiple widgets by their IDs in a single request. An id that is not found, or that is not yours, is reported in `errors` exactly like one that does not exist. Called with an editor session, only the widgets made for the session\'s managed user are returned.
|
|
170
|
-
* Get Widgets Batch
|
|
171
|
-
*/
|
|
172
|
-
async getWidgetsBatch(requestParameters, initOverrides) {
|
|
173
|
-
const response = await this.getWidgetsBatchRaw(requestParameters, initOverrides);
|
|
174
|
-
return await response.value();
|
|
175
|
-
}
|
|
176
141
|
/**
|
|
177
142
|
* Lists the widgets your account owns, newest first. A widget is the reusable piece a composition is made from; this is your own library, not a catalogue of Widgetic\'s widgets. Pass `page` (counting from 1) and `size` (1 to 100, 20 when left out) to read the list one page at a time. `meta` then carries `total`, `hasNextPage` and `hasPreviousPage`, so a client can walk the list to its end. A page past the end is an empty list. Without `page` and `size` the call returns the whole list in one response, which only suits an account with a few widgets. Pass `canvasId` to list only the widgets on one of your canvases. That list is always returned whole, whatever `page` and `size` say. Pass `managedUserId` (Widgetic\'s id for one of your managed users) or `managedUserExternalId` (your own identifier for the user) to list only the widgets made for that managed user. The widgets of your other managed users, and your own, are left out. It combines with `page`, `size` and `canvasId`. A managed user that is not yours, or does not exist, is answered with 404 and `MANAGED_USER_NOT_FOUND`.
|
|
178
143
|
* List Widgets
|
|
@@ -218,5 +183,40 @@ class WidgetsApi extends runtime.BaseAPI {
|
|
|
218
183
|
const response = await this.getWidgetsRaw(requestParameters, initOverrides);
|
|
219
184
|
return await response.value();
|
|
220
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Retrieves multiple widgets by their IDs in a single request. An id that is not found, or that is not yours, is reported in `errors` exactly like one that does not exist. Called with an editor session, only the widgets made for the session\'s managed user are returned.
|
|
188
|
+
* Get Widgets Batch
|
|
189
|
+
*/
|
|
190
|
+
async getWidgetsBatchRaw(requestParameters, initOverrides) {
|
|
191
|
+
if (requestParameters['getWidgetsBatchRequest'] == null) {
|
|
192
|
+
throw new runtime.RequiredError('getWidgetsBatchRequest', 'Required parameter "getWidgetsBatchRequest" was null or undefined when calling getWidgetsBatch().');
|
|
193
|
+
}
|
|
194
|
+
const queryParameters = {};
|
|
195
|
+
const headerParameters = {};
|
|
196
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
197
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
198
|
+
const token = this.configuration.accessToken;
|
|
199
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
200
|
+
if (tokenString) {
|
|
201
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
const response = await this.request({
|
|
205
|
+
path: `/widgets/batch`,
|
|
206
|
+
method: 'POST',
|
|
207
|
+
headers: headerParameters,
|
|
208
|
+
query: queryParameters,
|
|
209
|
+
body: (0, index_1.GetWidgetsBatchRequestToJSON)(requestParameters['getWidgetsBatchRequest']),
|
|
210
|
+
}, initOverrides);
|
|
211
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetWidgetsBatchResponseFromJSON)(jsonValue));
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Retrieves multiple widgets by their IDs in a single request. An id that is not found, or that is not yours, is reported in `errors` exactly like one that does not exist. Called with an editor session, only the widgets made for the session\'s managed user are returned.
|
|
215
|
+
* Get Widgets Batch
|
|
216
|
+
*/
|
|
217
|
+
async getWidgetsBatch(requestParameters, initOverrides) {
|
|
218
|
+
const response = await this.getWidgetsBatchRaw(requestParameters, initOverrides);
|
|
219
|
+
return await response.value();
|
|
220
|
+
}
|
|
221
221
|
}
|
|
222
222
|
exports.WidgetsApi = WidgetsApi;
|