@snokam/platform-client 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +139 -0
- package/README.md +4 -3
- package/dist/apis/PlatformClient.d.ts +41 -23
- package/dist/apis/PlatformClient.js +103 -54
- package/dist/esm/apis/PlatformClient.d.ts +41 -23
- package/dist/esm/apis/PlatformClient.js +103 -54
- package/dist/esm/models/index.d.ts +29 -21
- package/dist/models/index.d.ts +29 -21
- package/docs/{SetActiveProviderRequest.md → ChooseProviderRequest.md} +1 -1
- package/docs/IntegrationSummary.md +1 -1
- package/docs/PlatformClient.md +155 -79
- package/docs/StudioSanityConfig.md +1 -0
- package/package.json +1 -1
- package/src/apis/PlatformClient.ts +137 -72
- package/src/models/index.ts +27 -21
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ActivateRequest, ActivateResult, AddCustomDomainRequest, ApiTokenSummary, ApiTokenVerifyResult, AppCatalogEntry, AppModule, ApproveDeviceRequest, BillingPaymentMethod, BillingSessionRequest, BillingSessionResponse, BridgeWebhookResult, Business, BusinessAccess, BusinessHealth, Capability, CreateApiTokenRequest, CreateUserRequest, CreatedApiToken, CredentialSummary, CustomDomainProvisioning, DevicePairRequestBody, DevicePairing, DevicePairingStatus, DevicePollRequestBody, DeviceScreen, DirectoryGroupsResponse, DirectoryLicensesResponse, DirectoryMailbox, DirectoryServicePrincipalsResponse, EmployeeSettings, EmployeeSystemAccess, EmployeeSystemConfig, FacebookAccount, GitHubRepo, GoogleAnalyticsProperty, GoogleAnalyticsSelection, ImpersonationHistoryEntry, IntegrationCheckResult, IntegrationSummary, InviteCredentialRequest, InvoiceBasis, LoginConfig, MeApp, MeterEnforcementDecision, OAuthAccessTokenResponse, OAuthStartResponse, OlafApiKeyResponse, OlafTeamsSettings, OnboardBusinessRequest, OnboardingConfig, OnboardingStatus, PasswordLoginRequest, PasswordLoginResult, PatchBusinessRequest, PatchEmployee, PendingDevicePreview, PlanInfo, PlatformIntegration, PlatformSanityConfig, PlatformSecretStatus, PowerOfficeConnectResponse, PowerOfficeProduct, PowerOfficeProductsResponse, PowerOfficeProject, PowerOfficeProjectsResponse, ProtectedEmployee, RecordImpersonationActivityRequest, RenameDeviceRequest, ResetConfirmRequest, ResetRequest, RevokeRequest, ScopeDefinition, SessionBootstrapRequest,
|
|
13
|
+
import type { ActivateRequest, ActivateResult, AddCustomDomainRequest, ApiTokenSummary, ApiTokenVerifyResult, AppCatalogEntry, AppModule, ApproveDeviceRequest, BillingPaymentMethod, BillingSessionRequest, BillingSessionResponse, BridgeWebhookResult, Business, BusinessAccess, BusinessHealth, Capability, ChooseProviderRequest, CreateApiTokenRequest, CreateUserRequest, CreatedApiToken, CredentialSummary, CustomDomainProvisioning, DevicePairRequestBody, DevicePairing, DevicePairingStatus, DevicePollRequestBody, DeviceScreen, DirectoryGroupsResponse, DirectoryLicensesResponse, DirectoryMailbox, DirectoryServicePrincipalsResponse, EmployeeSettings, EmployeeSystemAccess, EmployeeSystemConfig, FacebookAccount, GitHubRepo, GoogleAnalyticsProperty, GoogleAnalyticsSelection, ImpersonationHistoryEntry, IntegrationCheckResult, IntegrationSummary, InviteCredentialRequest, InvoiceBasis, LoginConfig, MeApp, MeterEnforcementDecision, OAuthAccessTokenResponse, OAuthStartResponse, OlafApiKeyResponse, OlafTeamsSettings, OnboardBusinessRequest, OnboardingConfig, OnboardingStatus, PasswordLoginRequest, PasswordLoginResult, PatchBusinessRequest, PatchEmployee, PendingDevicePreview, PlanInfo, PlatformIntegration, PlatformSanityConfig, PlatformSecretStatus, PowerOfficeConnectResponse, PowerOfficeProduct, PowerOfficeProductsResponse, PowerOfficeProject, PowerOfficeProjectsResponse, ProtectedEmployee, RecordImpersonationActivityRequest, RenameDeviceRequest, ResetConfirmRequest, ResetRequest, RevokeRequest, ScopeDefinition, SessionBootstrapRequest, SetFacebookAccountRequest, SetGoogleAnalyticsPropertyRequest, SetPlatformSecretRequest, SetScopeGrantsRequest, SetWorkReposRequest, SetWorkspaceRepoRequest, SignupConfig, SignupRequest, SignupResult, SsoExchangeRequest, StartImpersonationRequest, StartImpersonationResult, StudioSanityConfig, TeamsAcsTokenResponse, TeamsAuthStateResponse, TenantInfo, TenantSanityCredentials, TokenExchangeRequest, TokenExchangeResult, TokenReconciliationReport, TotpEnrollRequest, TotpEnrollResult, UpdateAppsRequest, UpdateSecretsRequest, UsageDailySeries, UsageEventsRequest, UsageRollup, UsageSummary, VerifyApiTokenRequest, WorkReposSelection, WorkspaceRepoSelection } from '../models/index';
|
|
14
14
|
export interface AddCustomDomainOperationRequest {
|
|
15
15
|
id: string;
|
|
16
16
|
addCustomDomainRequest: AddCustomDomainRequest;
|
|
@@ -35,6 +35,10 @@ export interface CheckIntegrationRequest {
|
|
|
35
35
|
export interface CheckPlatformIntegrationRequest {
|
|
36
36
|
key: string;
|
|
37
37
|
}
|
|
38
|
+
export interface ChooseProviderOperationRequest {
|
|
39
|
+
id: string;
|
|
40
|
+
chooseProviderRequest: ChooseProviderRequest;
|
|
41
|
+
}
|
|
38
42
|
export interface ConnectTenantRequest {
|
|
39
43
|
id: string;
|
|
40
44
|
}
|
|
@@ -74,6 +78,10 @@ export interface DisableCredentialRequest {
|
|
|
74
78
|
id: string;
|
|
75
79
|
credentialId: string;
|
|
76
80
|
}
|
|
81
|
+
export interface DisconnectIntegrationRequest {
|
|
82
|
+
id: string;
|
|
83
|
+
key: string;
|
|
84
|
+
}
|
|
77
85
|
export interface EndImpersonationRequest {
|
|
78
86
|
tokenId: string;
|
|
79
87
|
}
|
|
@@ -311,10 +319,6 @@ export interface SetAccountingReinvoiceProductRequest {
|
|
|
311
319
|
id: string;
|
|
312
320
|
powerOfficeProduct: PowerOfficeProduct;
|
|
313
321
|
}
|
|
314
|
-
export interface SetActiveProviderOperationRequest {
|
|
315
|
-
id: string;
|
|
316
|
-
setActiveProviderRequest: SetActiveProviderRequest;
|
|
317
|
-
}
|
|
318
322
|
export interface SetBusinessEmployeePhotoRequest {
|
|
319
323
|
id: string;
|
|
320
324
|
employeeId: string;
|
|
@@ -481,6 +485,20 @@ export declare class PlatformClient extends runtime.BaseAPI {
|
|
|
481
485
|
* Live-probe a platform integration
|
|
482
486
|
*/
|
|
483
487
|
checkPlatformIntegration(requestParameters: CheckPlatformIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntegrationCheckResult>;
|
|
488
|
+
/**
|
|
489
|
+
* Creates request options for chooseProvider without sending the request
|
|
490
|
+
*/
|
|
491
|
+
chooseProviderRequestOpts(requestParameters: ChooseProviderOperationRequest): Promise<runtime.RequestOpts>;
|
|
492
|
+
/**
|
|
493
|
+
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
494
|
+
* Choose the active provider for a capability
|
|
495
|
+
*/
|
|
496
|
+
chooseProviderRaw(requestParameters: ChooseProviderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Business>>;
|
|
497
|
+
/**
|
|
498
|
+
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
499
|
+
* Choose the active provider for a capability
|
|
500
|
+
*/
|
|
501
|
+
chooseProvider(requestParameters: ChooseProviderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Business>;
|
|
484
502
|
/**
|
|
485
503
|
* Creates request options for connectTenant without sending the request
|
|
486
504
|
*/
|
|
@@ -635,6 +653,20 @@ export declare class PlatformClient extends runtime.BaseAPI {
|
|
|
635
653
|
* Disable a password credential
|
|
636
654
|
*/
|
|
637
655
|
disableCredential(requestParameters: DisableCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
656
|
+
/**
|
|
657
|
+
* Creates request options for disconnectIntegration without sending the request
|
|
658
|
+
*/
|
|
659
|
+
disconnectIntegrationRequestOpts(requestParameters: DisconnectIntegrationRequest): Promise<runtime.RequestOpts>;
|
|
660
|
+
/**
|
|
661
|
+
* Deletes every secret the integration stores for this business — including the OAuth refresh token and cached access token — and clears the capability\'s provider choice when it pointed at this integration. Settings such as base URLs are left alone.
|
|
662
|
+
* Disconnect an integration
|
|
663
|
+
*/
|
|
664
|
+
disconnectIntegrationRaw(requestParameters: DisconnectIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Business>>;
|
|
665
|
+
/**
|
|
666
|
+
* Deletes every secret the integration stores for this business — including the OAuth refresh token and cached access token — and clears the capability\'s provider choice when it pointed at this integration. Settings such as base URLs are left alone.
|
|
667
|
+
* Disconnect an integration
|
|
668
|
+
*/
|
|
669
|
+
disconnectIntegration(requestParameters: DisconnectIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Business>;
|
|
638
670
|
/**
|
|
639
671
|
* Creates request options for endImpersonation without sending the request
|
|
640
672
|
*/
|
|
@@ -1782,13 +1814,13 @@ export declare class PlatformClient extends runtime.BaseAPI {
|
|
|
1782
1814
|
*/
|
|
1783
1815
|
resolveStudioSanityConfigRequestOpts(requestParameters: ResolveStudioSanityConfigRequest): Promise<runtime.RequestOpts>;
|
|
1784
1816
|
/**
|
|
1785
|
-
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
1786
|
-
* Resolve the Sanity Studio project/dataset for a host
|
|
1817
|
+
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host, plus that tenant\'s frontend app URLs so document \'Vis side\' links resolve per tenant. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project and no app URLs. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
1818
|
+
* Resolve the Sanity Studio project/dataset and frontend URLs for a host
|
|
1787
1819
|
*/
|
|
1788
1820
|
resolveStudioSanityConfigRaw(requestParameters: ResolveStudioSanityConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudioSanityConfig>>;
|
|
1789
1821
|
/**
|
|
1790
|
-
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
1791
|
-
* Resolve the Sanity Studio project/dataset for a host
|
|
1822
|
+
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host, plus that tenant\'s frontend app URLs so document \'Vis side\' links resolve per tenant. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project and no app URLs. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
1823
|
+
* Resolve the Sanity Studio project/dataset and frontend URLs for a host
|
|
1792
1824
|
*/
|
|
1793
1825
|
resolveStudioSanityConfig(requestParameters: ResolveStudioSanityConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudioSanityConfig>;
|
|
1794
1826
|
/**
|
|
@@ -1887,20 +1919,6 @@ export declare class PlatformClient extends runtime.BaseAPI {
|
|
|
1887
1919
|
* Set the re-invoice product code
|
|
1888
1920
|
*/
|
|
1889
1921
|
setAccountingReinvoiceProduct(requestParameters: SetAccountingReinvoiceProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
1890
|
-
/**
|
|
1891
|
-
* Creates request options for setActiveProvider without sending the request
|
|
1892
|
-
*/
|
|
1893
|
-
setActiveProviderRequestOpts(requestParameters: SetActiveProviderOperationRequest): Promise<runtime.RequestOpts>;
|
|
1894
|
-
/**
|
|
1895
|
-
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
1896
|
-
* Choose the active provider for a capability
|
|
1897
|
-
*/
|
|
1898
|
-
setActiveProviderRaw(requestParameters: SetActiveProviderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Business>>;
|
|
1899
|
-
/**
|
|
1900
|
-
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
1901
|
-
* Choose the active provider for a capability
|
|
1902
|
-
*/
|
|
1903
|
-
setActiveProvider(requestParameters: SetActiveProviderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Business>;
|
|
1904
1922
|
/**
|
|
1905
1923
|
* Creates request options for setBusinessEmployeePhoto without sending the request
|
|
1906
1924
|
*/
|
|
@@ -320,6 +320,56 @@ export class PlatformClient extends runtime.BaseAPI {
|
|
|
320
320
|
return yield response.value();
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Creates request options for chooseProvider without sending the request
|
|
325
|
+
*/
|
|
326
|
+
chooseProviderRequestOpts(requestParameters) {
|
|
327
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
328
|
+
if (requestParameters['id'] == null) {
|
|
329
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling chooseProvider().');
|
|
330
|
+
}
|
|
331
|
+
if (requestParameters['chooseProviderRequest'] == null) {
|
|
332
|
+
throw new runtime.RequiredError('chooseProviderRequest', 'Required parameter "chooseProviderRequest" was null or undefined when calling chooseProvider().');
|
|
333
|
+
}
|
|
334
|
+
const queryParameters = {};
|
|
335
|
+
const headerParameters = {};
|
|
336
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
337
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
338
|
+
// oauth required
|
|
339
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("Implicit", []);
|
|
340
|
+
}
|
|
341
|
+
let urlPath = `/v1.0/protected/businesses/{id}/integrations/chosen`;
|
|
342
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
343
|
+
return {
|
|
344
|
+
path: urlPath,
|
|
345
|
+
method: 'PUT',
|
|
346
|
+
headers: headerParameters,
|
|
347
|
+
query: queryParameters,
|
|
348
|
+
body: requestParameters['chooseProviderRequest'],
|
|
349
|
+
};
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
354
|
+
* Choose the active provider for a capability
|
|
355
|
+
*/
|
|
356
|
+
chooseProviderRaw(requestParameters, initOverrides) {
|
|
357
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
358
|
+
const requestOptions = yield this.chooseProviderRequestOpts(requestParameters);
|
|
359
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
360
|
+
return new runtime.JSONApiResponse(response);
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
365
|
+
* Choose the active provider for a capability
|
|
366
|
+
*/
|
|
367
|
+
chooseProvider(requestParameters, initOverrides) {
|
|
368
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
const response = yield this.chooseProviderRaw(requestParameters, initOverrides);
|
|
370
|
+
return yield response.value();
|
|
371
|
+
});
|
|
372
|
+
}
|
|
323
373
|
/**
|
|
324
374
|
* Creates request options for connectTenant without sending the request
|
|
325
375
|
*/
|
|
@@ -833,6 +883,55 @@ export class PlatformClient extends runtime.BaseAPI {
|
|
|
833
883
|
yield this.disableCredentialRaw(requestParameters, initOverrides);
|
|
834
884
|
});
|
|
835
885
|
}
|
|
886
|
+
/**
|
|
887
|
+
* Creates request options for disconnectIntegration without sending the request
|
|
888
|
+
*/
|
|
889
|
+
disconnectIntegrationRequestOpts(requestParameters) {
|
|
890
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
891
|
+
if (requestParameters['id'] == null) {
|
|
892
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling disconnectIntegration().');
|
|
893
|
+
}
|
|
894
|
+
if (requestParameters['key'] == null) {
|
|
895
|
+
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling disconnectIntegration().');
|
|
896
|
+
}
|
|
897
|
+
const queryParameters = {};
|
|
898
|
+
const headerParameters = {};
|
|
899
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
900
|
+
// oauth required
|
|
901
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("Implicit", []);
|
|
902
|
+
}
|
|
903
|
+
let urlPath = `/v1.0/protected/businesses/{id}/integrations/{key}`;
|
|
904
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
905
|
+
urlPath = urlPath.replace('{key}', encodeURIComponent(String(requestParameters['key'])));
|
|
906
|
+
return {
|
|
907
|
+
path: urlPath,
|
|
908
|
+
method: 'DELETE',
|
|
909
|
+
headers: headerParameters,
|
|
910
|
+
query: queryParameters,
|
|
911
|
+
};
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Deletes every secret the integration stores for this business — including the OAuth refresh token and cached access token — and clears the capability\'s provider choice when it pointed at this integration. Settings such as base URLs are left alone.
|
|
916
|
+
* Disconnect an integration
|
|
917
|
+
*/
|
|
918
|
+
disconnectIntegrationRaw(requestParameters, initOverrides) {
|
|
919
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
920
|
+
const requestOptions = yield this.disconnectIntegrationRequestOpts(requestParameters);
|
|
921
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
922
|
+
return new runtime.JSONApiResponse(response);
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Deletes every secret the integration stores for this business — including the OAuth refresh token and cached access token — and clears the capability\'s provider choice when it pointed at this integration. Settings such as base URLs are left alone.
|
|
927
|
+
* Disconnect an integration
|
|
928
|
+
*/
|
|
929
|
+
disconnectIntegration(requestParameters, initOverrides) {
|
|
930
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
931
|
+
const response = yield this.disconnectIntegrationRaw(requestParameters, initOverrides);
|
|
932
|
+
return yield response.value();
|
|
933
|
+
});
|
|
934
|
+
}
|
|
836
935
|
/**
|
|
837
936
|
* Creates request options for endImpersonation without sending the request
|
|
838
937
|
*/
|
|
@@ -4475,8 +4574,8 @@ export class PlatformClient extends runtime.BaseAPI {
|
|
|
4475
4574
|
});
|
|
4476
4575
|
}
|
|
4477
4576
|
/**
|
|
4478
|
-
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
4479
|
-
* Resolve the Sanity Studio project/dataset for a host
|
|
4577
|
+
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host, plus that tenant\'s frontend app URLs so document \'Vis side\' links resolve per tenant. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project and no app URLs. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
4578
|
+
* Resolve the Sanity Studio project/dataset and frontend URLs for a host
|
|
4480
4579
|
*/
|
|
4481
4580
|
resolveStudioSanityConfigRaw(requestParameters, initOverrides) {
|
|
4482
4581
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4486,8 +4585,8 @@ export class PlatformClient extends runtime.BaseAPI {
|
|
|
4486
4585
|
});
|
|
4487
4586
|
}
|
|
4488
4587
|
/**
|
|
4489
|
-
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
4490
|
-
* Resolve the Sanity Studio project/dataset for a host
|
|
4588
|
+
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host, plus that tenant\'s frontend app URLs so document \'Vis side\' links resolve per tenant. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project and no app URLs. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
4589
|
+
* Resolve the Sanity Studio project/dataset and frontend URLs for a host
|
|
4491
4590
|
*/
|
|
4492
4591
|
resolveStudioSanityConfig(requestParameters, initOverrides) {
|
|
4493
4592
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4835,56 +4934,6 @@ export class PlatformClient extends runtime.BaseAPI {
|
|
|
4835
4934
|
yield this.setAccountingReinvoiceProductRaw(requestParameters, initOverrides);
|
|
4836
4935
|
});
|
|
4837
4936
|
}
|
|
4838
|
-
/**
|
|
4839
|
-
* Creates request options for setActiveProvider without sending the request
|
|
4840
|
-
*/
|
|
4841
|
-
setActiveProviderRequestOpts(requestParameters) {
|
|
4842
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4843
|
-
if (requestParameters['id'] == null) {
|
|
4844
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling setActiveProvider().');
|
|
4845
|
-
}
|
|
4846
|
-
if (requestParameters['setActiveProviderRequest'] == null) {
|
|
4847
|
-
throw new runtime.RequiredError('setActiveProviderRequest', 'Required parameter "setActiveProviderRequest" was null or undefined when calling setActiveProvider().');
|
|
4848
|
-
}
|
|
4849
|
-
const queryParameters = {};
|
|
4850
|
-
const headerParameters = {};
|
|
4851
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
4852
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
4853
|
-
// oauth required
|
|
4854
|
-
headerParameters["Authorization"] = yield this.configuration.accessToken("Implicit", []);
|
|
4855
|
-
}
|
|
4856
|
-
let urlPath = `/v1.0/protected/businesses/{id}/integrations/active`;
|
|
4857
|
-
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
4858
|
-
return {
|
|
4859
|
-
path: urlPath,
|
|
4860
|
-
method: 'PUT',
|
|
4861
|
-
headers: headerParameters,
|
|
4862
|
-
query: queryParameters,
|
|
4863
|
-
body: requestParameters['setActiveProviderRequest'],
|
|
4864
|
-
};
|
|
4865
|
-
});
|
|
4866
|
-
}
|
|
4867
|
-
/**
|
|
4868
|
-
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
4869
|
-
* Choose the active provider for a capability
|
|
4870
|
-
*/
|
|
4871
|
-
setActiveProviderRaw(requestParameters, initOverrides) {
|
|
4872
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4873
|
-
const requestOptions = yield this.setActiveProviderRequestOpts(requestParameters);
|
|
4874
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
4875
|
-
return new runtime.JSONApiResponse(response);
|
|
4876
|
-
});
|
|
4877
|
-
}
|
|
4878
|
-
/**
|
|
4879
|
-
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
4880
|
-
* Choose the active provider for a capability
|
|
4881
|
-
*/
|
|
4882
|
-
setActiveProvider(requestParameters, initOverrides) {
|
|
4883
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4884
|
-
const response = yield this.setActiveProviderRaw(requestParameters, initOverrides);
|
|
4885
|
-
return yield response.value();
|
|
4886
|
-
});
|
|
4887
|
-
}
|
|
4888
4937
|
/**
|
|
4889
4938
|
* Creates request options for setBusinessEmployeePhoto without sending the request
|
|
4890
4939
|
*/
|
|
@@ -945,6 +945,25 @@ export interface Capability {
|
|
|
945
945
|
*/
|
|
946
946
|
platformProvided?: boolean | null;
|
|
947
947
|
}
|
|
948
|
+
/**
|
|
949
|
+
*
|
|
950
|
+
* @export
|
|
951
|
+
* @interface ChooseProviderRequest
|
|
952
|
+
*/
|
|
953
|
+
export interface ChooseProviderRequest {
|
|
954
|
+
/**
|
|
955
|
+
*
|
|
956
|
+
* @type {string}
|
|
957
|
+
* @memberof ChooseProviderRequest
|
|
958
|
+
*/
|
|
959
|
+
capability?: string | null;
|
|
960
|
+
/**
|
|
961
|
+
*
|
|
962
|
+
* @type {string}
|
|
963
|
+
* @memberof ChooseProviderRequest
|
|
964
|
+
*/
|
|
965
|
+
integrationKey?: string | null;
|
|
966
|
+
}
|
|
948
967
|
/**
|
|
949
968
|
*
|
|
950
969
|
* @export
|
|
@@ -2189,13 +2208,13 @@ export interface IntegrationSummary {
|
|
|
2189
2208
|
* @type {boolean}
|
|
2190
2209
|
* @memberof IntegrationSummary
|
|
2191
2210
|
*/
|
|
2192
|
-
|
|
2211
|
+
isConfigured?: boolean | null;
|
|
2193
2212
|
/**
|
|
2194
2213
|
*
|
|
2195
2214
|
* @type {boolean}
|
|
2196
2215
|
* @memberof IntegrationSummary
|
|
2197
2216
|
*/
|
|
2198
|
-
|
|
2217
|
+
isInUse?: boolean | null;
|
|
2199
2218
|
/**
|
|
2200
2219
|
*
|
|
2201
2220
|
* @type {string}
|
|
@@ -5443,25 +5462,6 @@ export interface SessionBootstrapRequest {
|
|
|
5443
5462
|
*/
|
|
5444
5463
|
bootstrapToken?: string | null;
|
|
5445
5464
|
}
|
|
5446
|
-
/**
|
|
5447
|
-
*
|
|
5448
|
-
* @export
|
|
5449
|
-
* @interface SetActiveProviderRequest
|
|
5450
|
-
*/
|
|
5451
|
-
export interface SetActiveProviderRequest {
|
|
5452
|
-
/**
|
|
5453
|
-
*
|
|
5454
|
-
* @type {string}
|
|
5455
|
-
* @memberof SetActiveProviderRequest
|
|
5456
|
-
*/
|
|
5457
|
-
capability?: string | null;
|
|
5458
|
-
/**
|
|
5459
|
-
*
|
|
5460
|
-
* @type {string}
|
|
5461
|
-
* @memberof SetActiveProviderRequest
|
|
5462
|
-
*/
|
|
5463
|
-
integrationKey?: string | null;
|
|
5464
|
-
}
|
|
5465
5465
|
/**
|
|
5466
5466
|
*
|
|
5467
5467
|
* @export
|
|
@@ -5794,6 +5794,14 @@ export interface StartImpersonationResult {
|
|
|
5794
5794
|
* @interface StudioSanityConfig
|
|
5795
5795
|
*/
|
|
5796
5796
|
export interface StudioSanityConfig {
|
|
5797
|
+
/**
|
|
5798
|
+
*
|
|
5799
|
+
* @type {{ [key: string]: string; }}
|
|
5800
|
+
* @memberof StudioSanityConfig
|
|
5801
|
+
*/
|
|
5802
|
+
appUrls?: {
|
|
5803
|
+
[key: string]: string;
|
|
5804
|
+
} | null;
|
|
5797
5805
|
/**
|
|
5798
5806
|
*
|
|
5799
5807
|
* @type {string}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -945,6 +945,25 @@ export interface Capability {
|
|
|
945
945
|
*/
|
|
946
946
|
platformProvided?: boolean | null;
|
|
947
947
|
}
|
|
948
|
+
/**
|
|
949
|
+
*
|
|
950
|
+
* @export
|
|
951
|
+
* @interface ChooseProviderRequest
|
|
952
|
+
*/
|
|
953
|
+
export interface ChooseProviderRequest {
|
|
954
|
+
/**
|
|
955
|
+
*
|
|
956
|
+
* @type {string}
|
|
957
|
+
* @memberof ChooseProviderRequest
|
|
958
|
+
*/
|
|
959
|
+
capability?: string | null;
|
|
960
|
+
/**
|
|
961
|
+
*
|
|
962
|
+
* @type {string}
|
|
963
|
+
* @memberof ChooseProviderRequest
|
|
964
|
+
*/
|
|
965
|
+
integrationKey?: string | null;
|
|
966
|
+
}
|
|
948
967
|
/**
|
|
949
968
|
*
|
|
950
969
|
* @export
|
|
@@ -2189,13 +2208,13 @@ export interface IntegrationSummary {
|
|
|
2189
2208
|
* @type {boolean}
|
|
2190
2209
|
* @memberof IntegrationSummary
|
|
2191
2210
|
*/
|
|
2192
|
-
|
|
2211
|
+
isConfigured?: boolean | null;
|
|
2193
2212
|
/**
|
|
2194
2213
|
*
|
|
2195
2214
|
* @type {boolean}
|
|
2196
2215
|
* @memberof IntegrationSummary
|
|
2197
2216
|
*/
|
|
2198
|
-
|
|
2217
|
+
isInUse?: boolean | null;
|
|
2199
2218
|
/**
|
|
2200
2219
|
*
|
|
2201
2220
|
* @type {string}
|
|
@@ -5443,25 +5462,6 @@ export interface SessionBootstrapRequest {
|
|
|
5443
5462
|
*/
|
|
5444
5463
|
bootstrapToken?: string | null;
|
|
5445
5464
|
}
|
|
5446
|
-
/**
|
|
5447
|
-
*
|
|
5448
|
-
* @export
|
|
5449
|
-
* @interface SetActiveProviderRequest
|
|
5450
|
-
*/
|
|
5451
|
-
export interface SetActiveProviderRequest {
|
|
5452
|
-
/**
|
|
5453
|
-
*
|
|
5454
|
-
* @type {string}
|
|
5455
|
-
* @memberof SetActiveProviderRequest
|
|
5456
|
-
*/
|
|
5457
|
-
capability?: string | null;
|
|
5458
|
-
/**
|
|
5459
|
-
*
|
|
5460
|
-
* @type {string}
|
|
5461
|
-
* @memberof SetActiveProviderRequest
|
|
5462
|
-
*/
|
|
5463
|
-
integrationKey?: string | null;
|
|
5464
|
-
}
|
|
5465
5465
|
/**
|
|
5466
5466
|
*
|
|
5467
5467
|
* @export
|
|
@@ -5794,6 +5794,14 @@ export interface StartImpersonationResult {
|
|
|
5794
5794
|
* @interface StudioSanityConfig
|
|
5795
5795
|
*/
|
|
5796
5796
|
export interface StudioSanityConfig {
|
|
5797
|
+
/**
|
|
5798
|
+
*
|
|
5799
|
+
* @type {{ [key: string]: string; }}
|
|
5800
|
+
* @memberof StudioSanityConfig
|
|
5801
|
+
*/
|
|
5802
|
+
appUrls?: {
|
|
5803
|
+
[key: string]: string;
|
|
5804
|
+
} | null;
|
|
5797
5805
|
/**
|
|
5798
5806
|
*
|
|
5799
5807
|
* @type {string}
|
|
@@ -13,8 +13,8 @@ Name | Type
|
|
|
13
13
|
`connectedSecretKey` | string
|
|
14
14
|
`description` | string
|
|
15
15
|
`displayName` | string
|
|
16
|
-
`isActive` | boolean
|
|
17
16
|
`isConfigured` | boolean
|
|
17
|
+
`isInUse` | boolean
|
|
18
18
|
`key` | string
|
|
19
19
|
`missingSecretKeys` | Array<string>
|
|
20
20
|
`operatorOnly` | boolean
|