@snokam/platform-client 2.0.0 → 3.1.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 +221 -0
- package/README.md +10 -2
- package/dist/apis/PlatformClient.d.ts +51 -3
- package/dist/apis/PlatformClient.js +135 -2
- package/dist/esm/apis/PlatformClient.d.ts +51 -3
- package/dist/esm/apis/PlatformClient.js +135 -2
- package/dist/esm/models/index.d.ts +159 -12
- package/dist/models/index.d.ts +159 -12
- package/docs/AuthorizationPreview.md +15 -0
- package/docs/AuthorizationRequest.md +18 -0
- package/docs/BusinessConfig.md +1 -0
- package/docs/IntegrationSummary.md +1 -0
- package/docs/IssuedAuthorizationCode.md +14 -0
- package/docs/PatchEmployee.md +1 -1
- package/docs/PlatformClient.md +211 -1
- package/docs/ProtectedEmployee.md +1 -1
- package/docs/ProviderCatalogEntry.md +18 -0
- package/docs/ProviderCatalogResponse.md +14 -0
- package/docs/SanityEmployeeGroupsInner.md +1 -0
- package/docs/TenantInfo.md +1 -0
- package/package.json +1 -1
- package/src/apis/PlatformClient.ts +166 -2
- package/src/models/index.ts +155 -12
package/dist/models/index.d.ts
CHANGED
|
@@ -277,6 +277,62 @@ export interface ApproveDeviceRequest {
|
|
|
277
277
|
*/
|
|
278
278
|
name?: string | null;
|
|
279
279
|
}
|
|
280
|
+
/**
|
|
281
|
+
*
|
|
282
|
+
* @export
|
|
283
|
+
* @interface AuthorizationPreview
|
|
284
|
+
*/
|
|
285
|
+
export interface AuthorizationPreview {
|
|
286
|
+
/**
|
|
287
|
+
*
|
|
288
|
+
* @type {string}
|
|
289
|
+
* @memberof AuthorizationPreview
|
|
290
|
+
*/
|
|
291
|
+
businessName?: string | null;
|
|
292
|
+
/**
|
|
293
|
+
*
|
|
294
|
+
* @type {string}
|
|
295
|
+
* @memberof AuthorizationPreview
|
|
296
|
+
*/
|
|
297
|
+
clientName?: string | null;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
*
|
|
301
|
+
* @export
|
|
302
|
+
* @interface AuthorizationRequest
|
|
303
|
+
*/
|
|
304
|
+
export interface AuthorizationRequest {
|
|
305
|
+
/**
|
|
306
|
+
*
|
|
307
|
+
* @type {string}
|
|
308
|
+
* @memberof AuthorizationRequest
|
|
309
|
+
*/
|
|
310
|
+
clientId?: string | null;
|
|
311
|
+
/**
|
|
312
|
+
*
|
|
313
|
+
* @type {string}
|
|
314
|
+
* @memberof AuthorizationRequest
|
|
315
|
+
*/
|
|
316
|
+
codeChallenge?: string | null;
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
* @type {string}
|
|
320
|
+
* @memberof AuthorizationRequest
|
|
321
|
+
*/
|
|
322
|
+
codeChallengeMethod?: string | null;
|
|
323
|
+
/**
|
|
324
|
+
*
|
|
325
|
+
* @type {string}
|
|
326
|
+
* @memberof AuthorizationRequest
|
|
327
|
+
*/
|
|
328
|
+
redirectUri?: string | null;
|
|
329
|
+
/**
|
|
330
|
+
*
|
|
331
|
+
* @type {string}
|
|
332
|
+
* @memberof AuthorizationRequest
|
|
333
|
+
*/
|
|
334
|
+
resource?: string | null;
|
|
335
|
+
}
|
|
280
336
|
/**
|
|
281
337
|
*
|
|
282
338
|
* @export
|
|
@@ -741,6 +797,14 @@ export interface BusinessConfig {
|
|
|
741
797
|
* @memberof BusinessConfig
|
|
742
798
|
*/
|
|
743
799
|
olafTeamsSettings?: OlafTeamsSettings;
|
|
800
|
+
/**
|
|
801
|
+
*
|
|
802
|
+
* @type {{ [key: string]: string; }}
|
|
803
|
+
* @memberof BusinessConfig
|
|
804
|
+
*/
|
|
805
|
+
onboardingActivateUrlOverrides?: {
|
|
806
|
+
[key: string]: string;
|
|
807
|
+
} | null;
|
|
744
808
|
/**
|
|
745
809
|
*
|
|
746
810
|
* @type {string}
|
|
@@ -2221,6 +2285,12 @@ export interface IntegrationSummary {
|
|
|
2221
2285
|
* @memberof IntegrationSummary
|
|
2222
2286
|
*/
|
|
2223
2287
|
key?: string | null;
|
|
2288
|
+
/**
|
|
2289
|
+
*
|
|
2290
|
+
* @type {string}
|
|
2291
|
+
* @memberof IntegrationSummary
|
|
2292
|
+
*/
|
|
2293
|
+
logoUrl?: string | null;
|
|
2224
2294
|
/**
|
|
2225
2295
|
*
|
|
2226
2296
|
* @type {Array<string>}
|
|
@@ -2373,6 +2443,19 @@ export interface InvoiceBasisLine {
|
|
|
2373
2443
|
*/
|
|
2374
2444
|
unitPriceOre?: number | null;
|
|
2375
2445
|
}
|
|
2446
|
+
/**
|
|
2447
|
+
*
|
|
2448
|
+
* @export
|
|
2449
|
+
* @interface IssuedAuthorizationCode
|
|
2450
|
+
*/
|
|
2451
|
+
export interface IssuedAuthorizationCode {
|
|
2452
|
+
/**
|
|
2453
|
+
*
|
|
2454
|
+
* @type {string}
|
|
2455
|
+
* @memberof IssuedAuthorizationCode
|
|
2456
|
+
*/
|
|
2457
|
+
code?: string | null;
|
|
2458
|
+
}
|
|
2376
2459
|
/**
|
|
2377
2460
|
*
|
|
2378
2461
|
* @export
|
|
@@ -3309,6 +3392,12 @@ export interface PatchEmployee {
|
|
|
3309
3392
|
* @memberof PatchEmployee
|
|
3310
3393
|
*/
|
|
3311
3394
|
isSeekingProject?: boolean | null;
|
|
3395
|
+
/**
|
|
3396
|
+
*
|
|
3397
|
+
* @type {boolean}
|
|
3398
|
+
* @memberof PatchEmployee
|
|
3399
|
+
*/
|
|
3400
|
+
leadershipGroupMember?: boolean | null;
|
|
3312
3401
|
/**
|
|
3313
3402
|
*
|
|
3314
3403
|
* @type {string}
|
|
@@ -3359,12 +3448,6 @@ export interface PatchEmployee {
|
|
|
3359
3448
|
* @memberof PatchEmployee
|
|
3360
3449
|
*/
|
|
3361
3450
|
parentalLeaveCoverage?: PatchEmployeeParentalLeaveCoverageEnum | null;
|
|
3362
|
-
/**
|
|
3363
|
-
*
|
|
3364
|
-
* @type {string}
|
|
3365
|
-
* @memberof PatchEmployee
|
|
3366
|
-
*/
|
|
3367
|
-
parentalLeaveStartDate?: string;
|
|
3368
3451
|
/**
|
|
3369
3452
|
*
|
|
3370
3453
|
* @type {string}
|
|
@@ -4078,6 +4161,12 @@ export interface ProtectedEmployee {
|
|
|
4078
4161
|
* @memberof ProtectedEmployee
|
|
4079
4162
|
*/
|
|
4080
4163
|
isSeekingProject?: boolean;
|
|
4164
|
+
/**
|
|
4165
|
+
*
|
|
4166
|
+
* @type {boolean}
|
|
4167
|
+
* @memberof ProtectedEmployee
|
|
4168
|
+
*/
|
|
4169
|
+
leadershipGroupMember?: boolean;
|
|
4081
4170
|
/**
|
|
4082
4171
|
*
|
|
4083
4172
|
* @type {string}
|
|
@@ -4128,12 +4217,6 @@ export interface ProtectedEmployee {
|
|
|
4128
4217
|
* @memberof ProtectedEmployee
|
|
4129
4218
|
*/
|
|
4130
4219
|
parentalLeaveCoverage?: ProtectedEmployeeParentalLeaveCoverageEnum | null;
|
|
4131
|
-
/**
|
|
4132
|
-
*
|
|
4133
|
-
* @type {string}
|
|
4134
|
-
* @memberof ProtectedEmployee
|
|
4135
|
-
*/
|
|
4136
|
-
parentalLeaveStartDate?: string;
|
|
4137
4220
|
/**
|
|
4138
4221
|
*
|
|
4139
4222
|
* @type {string}
|
|
@@ -4264,6 +4347,56 @@ export declare const ProtectedEmployeeSanityTypeEnum: {
|
|
|
4264
4347
|
readonly Employee: "employee";
|
|
4265
4348
|
};
|
|
4266
4349
|
export type ProtectedEmployeeSanityTypeEnum = typeof ProtectedEmployeeSanityTypeEnum[keyof typeof ProtectedEmployeeSanityTypeEnum];
|
|
4350
|
+
/**
|
|
4351
|
+
*
|
|
4352
|
+
* @export
|
|
4353
|
+
* @interface ProviderCatalogEntry
|
|
4354
|
+
*/
|
|
4355
|
+
export interface ProviderCatalogEntry {
|
|
4356
|
+
/**
|
|
4357
|
+
*
|
|
4358
|
+
* @type {string}
|
|
4359
|
+
* @memberof ProviderCatalogEntry
|
|
4360
|
+
*/
|
|
4361
|
+
capability?: string | null;
|
|
4362
|
+
/**
|
|
4363
|
+
*
|
|
4364
|
+
* @type {string}
|
|
4365
|
+
* @memberof ProviderCatalogEntry
|
|
4366
|
+
*/
|
|
4367
|
+
description?: string | null;
|
|
4368
|
+
/**
|
|
4369
|
+
*
|
|
4370
|
+
* @type {string}
|
|
4371
|
+
* @memberof ProviderCatalogEntry
|
|
4372
|
+
*/
|
|
4373
|
+
key?: string | null;
|
|
4374
|
+
/**
|
|
4375
|
+
*
|
|
4376
|
+
* @type {string}
|
|
4377
|
+
* @memberof ProviderCatalogEntry
|
|
4378
|
+
*/
|
|
4379
|
+
logoUrl?: string | null;
|
|
4380
|
+
/**
|
|
4381
|
+
*
|
|
4382
|
+
* @type {string}
|
|
4383
|
+
* @memberof ProviderCatalogEntry
|
|
4384
|
+
*/
|
|
4385
|
+
title?: string | null;
|
|
4386
|
+
}
|
|
4387
|
+
/**
|
|
4388
|
+
*
|
|
4389
|
+
* @export
|
|
4390
|
+
* @interface ProviderCatalogResponse
|
|
4391
|
+
*/
|
|
4392
|
+
export interface ProviderCatalogResponse {
|
|
4393
|
+
/**
|
|
4394
|
+
*
|
|
4395
|
+
* @type {Array<ProviderCatalogEntry>}
|
|
4396
|
+
* @memberof ProviderCatalogResponse
|
|
4397
|
+
*/
|
|
4398
|
+
providers?: Array<ProviderCatalogEntry> | null;
|
|
4399
|
+
}
|
|
4267
4400
|
/**
|
|
4268
4401
|
*
|
|
4269
4402
|
* @export
|
|
@@ -4835,6 +4968,12 @@ export interface SanityEmployeeGroupsInner {
|
|
|
4835
4968
|
* @memberof SanityEmployeeGroupsInner
|
|
4836
4969
|
*/
|
|
4837
4970
|
scopeGrants?: Array<string>;
|
|
4971
|
+
/**
|
|
4972
|
+
*
|
|
4973
|
+
* @type {string}
|
|
4974
|
+
* @memberof SanityEmployeeGroupsInner
|
|
4975
|
+
*/
|
|
4976
|
+
slackChannel?: string;
|
|
4838
4977
|
}
|
|
4839
4978
|
/**
|
|
4840
4979
|
* @export
|
|
@@ -5995,6 +6134,14 @@ export interface TenantInfo {
|
|
|
5995
6134
|
* @memberof TenantInfo
|
|
5996
6135
|
*/
|
|
5997
6136
|
keyVaultName?: string | null;
|
|
6137
|
+
/**
|
|
6138
|
+
*
|
|
6139
|
+
* @type {{ [key: string]: string; }}
|
|
6140
|
+
* @memberof TenantInfo
|
|
6141
|
+
*/
|
|
6142
|
+
onboardingActivateUrlOverrides?: {
|
|
6143
|
+
[key: string]: string;
|
|
6144
|
+
} | null;
|
|
5998
6145
|
/**
|
|
5999
6146
|
*
|
|
6000
6147
|
* @type {string}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
# AuthorizationPreview
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`businessName` | string
|
|
10
|
+
`clientName` | string
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
14
|
+
|
|
15
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
# AuthorizationRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`clientId` | string
|
|
10
|
+
`codeChallenge` | string
|
|
11
|
+
`codeChallengeMethod` | string
|
|
12
|
+
`redirectUri` | string
|
|
13
|
+
`resource` | string
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
17
|
+
|
|
18
|
+
|
package/docs/BusinessConfig.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`activeProviders` | { [key: string]: string; }
|
|
10
10
|
`cvPartnerBaseUrl` | string
|
|
11
11
|
`olafTeamsSettings` | [OlafTeamsSettings](OlafTeamsSettings.md)
|
|
12
|
+
`onboardingActivateUrlOverrides` | { [key: string]: string; }
|
|
12
13
|
`sanityDataset` | string
|
|
13
14
|
`sanityProjectId` | string
|
|
14
15
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
# IssuedAuthorizationCode
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`code` | string
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
13
|
+
|
|
14
|
+
|
package/docs/PatchEmployee.md
CHANGED
|
@@ -32,6 +32,7 @@ Name | Type
|
|
|
32
32
|
`isExternal` | boolean
|
|
33
33
|
`isPublic` | boolean
|
|
34
34
|
`isSeekingProject` | boolean
|
|
35
|
+
`leadershipGroupMember` | boolean
|
|
35
36
|
`linkedin` | string
|
|
36
37
|
`manager` | [EmployeeReference](EmployeeReference.md)
|
|
37
38
|
`maritalStatus` | string
|
|
@@ -40,7 +41,6 @@ Name | Type
|
|
|
40
41
|
`nextOfKin` | [Array<SanityEmployeeNextOfKinInner>](SanityEmployeeNextOfKinInner.md)
|
|
41
42
|
`nrOfChildren` | number
|
|
42
43
|
`parentalLeaveCoverage` | string
|
|
43
|
-
`parentalLeaveStartDate` | string
|
|
44
44
|
`personalProjectRequirements` | string
|
|
45
45
|
`position` | string
|
|
46
46
|
`salaryConfig` | [PickSanityPatchEmployeeExcludeKeyofSanityPatchEmployeeScopeGrantsSalaryConfig](PickSanityPatchEmployeeExcludeKeyofSanityPatchEmployeeScopeGrantsSalaryConfig.md)
|
package/docs/PlatformClient.md
CHANGED
|
@@ -6,6 +6,7 @@ All URIs are relative to *https://snokam.snosky.no/api/platform*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**addCustomDomain**](PlatformClient.md#addcustomdomainoperation) | **POST** /v1.0/protected/businesses/{id}/custom-domains | Add a custom domain |
|
|
8
8
|
| [**approveDevice**](PlatformClient.md#approvedeviceoperation) | **POST** /v1.0/protected/businesses/{id}/devices | Approve a screen into this business |
|
|
9
|
+
| [**approveOAuthAuthorization**](PlatformClient.md#approveoauthauthorization) | **POST** /v1.0/protected/oauth/authorization | Approve an authorization request as the signed-in user |
|
|
9
10
|
| [**assignBusinessEmployeeSystem**](PlatformClient.md#assignbusinessemployeesystem) | **POST** /v1.0/protected/businesses/{id}/employees/{upn}/systems/{systemKey} | Grant an employee a seat in a third-party system |
|
|
10
11
|
| [**backfillBridgeWebhook**](PlatformClient.md#backfillbridgewebhook) | **POST** /v1.0/protected/businesses/{id}/bridge-webhook | Re-create a business\'s Sanity bridge webhook with a managed API key |
|
|
11
12
|
| [**checkIntegration**](PlatformClient.md#checkintegration) | **POST** /v1.0/protected/businesses/{id}/integrations/{key}/check | Run a live integration connectivity check |
|
|
@@ -51,6 +52,7 @@ All URIs are relative to *https://snokam.snosky.no/api/platform*
|
|
|
51
52
|
| [**getPlatformIntegrations**](PlatformClient.md#getplatformintegrations) | **GET** /v1.0/protected/platform/integrations | List platform-shared integrations |
|
|
52
53
|
| [**getPlatformOAuthAccessToken**](PlatformClient.md#getplatformoauthaccesstoken) | **GET** /v1.0/protected/platform/oauth/{provider}/access-token | Mint a fresh platform OAuth access token |
|
|
53
54
|
| [**getPlatformSecrets**](PlatformClient.md#getplatformsecrets) | **GET** /v1.0/protected/platform/secrets | List shared platform secrets |
|
|
55
|
+
| [**getProviderCatalog**](PlatformClient.md#getprovidercatalog) | **GET** /v1.0/protected/catalog/providers | List provider brand catalog |
|
|
54
56
|
| [**getProvisioningStatus**](PlatformClient.md#getprovisioningstatus) | **GET** /v1.0/protected/businesses/{id}/status | Get provisioning status |
|
|
55
57
|
| [**getTeamsAuthState**](PlatformClient.md#getteamsauthstate) | **GET** /v1.0/protected/businesses/{id}/teams/auth-state | Read the business\'s stored Teams authenticated join session |
|
|
56
58
|
| [**getTeamsUserAcsToken**](PlatformClient.md#getteamsuseracstoken) | **GET** /v1.0/protected/businesses/{id}/teams/acs-token | Mint an ACS access token for the connected M365 user as a Teams user |
|
|
@@ -95,6 +97,7 @@ All URIs are relative to *https://snokam.snosky.no/api/platform*
|
|
|
95
97
|
| [**powerOfficeOnboardingReturn**](PlatformClient.md#powerofficeonboardingreturn) | **GET** /v1.0/connect/poweroffice/return/{reference} | PowerOffice onboarding return |
|
|
96
98
|
| [**previewBillingInvoice**](PlatformClient.md#previewbillinginvoice) | **POST** /v1.0/protected/businesses/{id}/billing/invoice-preview | Preview a month\'s invoice basis |
|
|
97
99
|
| [**previewDevice**](PlatformClient.md#previewdevice) | **GET** /v1.0/protected/businesses/{id}/devices/preview | Look up a pairing code before approving |
|
|
100
|
+
| [**previewOAuthAuthorization**](PlatformClient.md#previewoauthauthorization) | **POST** /v1.0/protected/oauth/authorization/preview | Describe an authorization request before the user approves it |
|
|
98
101
|
| [**provisionBusiness**](PlatformClient.md#provisionbusiness) | **POST** /v1.0/protected/businesses/{id}/provision | Provision a business |
|
|
99
102
|
| [**publicCapabilities**](PlatformClient.md#publiccapabilities) | **GET** /v1.0/public/capabilities | Get capabilities |
|
|
100
103
|
| [**publicModules**](PlatformClient.md#publicmodules) | **GET** /v1.0/public/modules | Get available modules |
|
|
@@ -287,6 +290,78 @@ example().catch(console.error);
|
|
|
287
290
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
288
291
|
|
|
289
292
|
|
|
293
|
+
## approveOAuthAuthorization
|
|
294
|
+
|
|
295
|
+
> IssuedAuthorizationCode approveOAuthAuthorization(authorizationRequest)
|
|
296
|
+
|
|
297
|
+
Approve an authorization request as the signed-in user
|
|
298
|
+
|
|
299
|
+
Issues a single-use authorization code the client redeems at the token endpoint.
|
|
300
|
+
|
|
301
|
+
### Example
|
|
302
|
+
|
|
303
|
+
```ts
|
|
304
|
+
import {
|
|
305
|
+
Configuration,
|
|
306
|
+
PlatformClient,
|
|
307
|
+
} from '@snokam/platform-client';
|
|
308
|
+
import type { ApproveOAuthAuthorizationRequest } from '@snokam/platform-client';
|
|
309
|
+
|
|
310
|
+
async function example() {
|
|
311
|
+
console.log("🚀 Testing @snokam/platform-client SDK...");
|
|
312
|
+
const config = new Configuration({
|
|
313
|
+
// To configure OAuth2 access token for authorization: Implicit implicit
|
|
314
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
315
|
+
});
|
|
316
|
+
const api = new PlatformClient(config);
|
|
317
|
+
|
|
318
|
+
const body = {
|
|
319
|
+
// AuthorizationRequest
|
|
320
|
+
authorizationRequest: ...,
|
|
321
|
+
} satisfies ApproveOAuthAuthorizationRequest;
|
|
322
|
+
|
|
323
|
+
try {
|
|
324
|
+
const data = await api.approveOAuthAuthorization(body);
|
|
325
|
+
console.log(data);
|
|
326
|
+
} catch (error) {
|
|
327
|
+
console.error(error);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// Run the test
|
|
332
|
+
example().catch(console.error);
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Parameters
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
| Name | Type | Description | Notes |
|
|
339
|
+
|------------- | ------------- | ------------- | -------------|
|
|
340
|
+
| **authorizationRequest** | [AuthorizationRequest](AuthorizationRequest.md) | | |
|
|
341
|
+
|
|
342
|
+
### Return type
|
|
343
|
+
|
|
344
|
+
[**IssuedAuthorizationCode**](IssuedAuthorizationCode.md)
|
|
345
|
+
|
|
346
|
+
### Authorization
|
|
347
|
+
|
|
348
|
+
[Implicit implicit](../README.md#Implicit-implicit)
|
|
349
|
+
|
|
350
|
+
### HTTP request headers
|
|
351
|
+
|
|
352
|
+
- **Content-Type**: `application/json`
|
|
353
|
+
- **Accept**: `application/json`
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
### HTTP response details
|
|
357
|
+
| Status code | Description | Response headers |
|
|
358
|
+
|-------------|-------------|------------------|
|
|
359
|
+
| **200** | Payload of IssuedAuthorizationCode | - |
|
|
360
|
+
| **400** | Payload of String | - |
|
|
361
|
+
|
|
362
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
363
|
+
|
|
364
|
+
|
|
290
365
|
## assignBusinessEmployeeSystem
|
|
291
366
|
|
|
292
367
|
> EmployeeSystemAccess assignBusinessEmployeeSystem(id, upn, systemKey, roleId)
|
|
@@ -3476,6 +3551,69 @@ This endpoint does not need any parameter.
|
|
|
3476
3551
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3477
3552
|
|
|
3478
3553
|
|
|
3554
|
+
## getProviderCatalog
|
|
3555
|
+
|
|
3556
|
+
> ProviderCatalogResponse getProviderCatalog()
|
|
3557
|
+
|
|
3558
|
+
List provider brand catalog
|
|
3559
|
+
|
|
3560
|
+
Returns the global, platform-owned provider brand catalog (key, capability, title, logo, description). Single source of truth for provider branding across tenants.
|
|
3561
|
+
|
|
3562
|
+
### Example
|
|
3563
|
+
|
|
3564
|
+
```ts
|
|
3565
|
+
import {
|
|
3566
|
+
Configuration,
|
|
3567
|
+
PlatformClient,
|
|
3568
|
+
} from '@snokam/platform-client';
|
|
3569
|
+
import type { GetProviderCatalogRequest } from '@snokam/platform-client';
|
|
3570
|
+
|
|
3571
|
+
async function example() {
|
|
3572
|
+
console.log("🚀 Testing @snokam/platform-client SDK...");
|
|
3573
|
+
const config = new Configuration({
|
|
3574
|
+
// To configure OAuth2 access token for authorization: Implicit implicit
|
|
3575
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
3576
|
+
});
|
|
3577
|
+
const api = new PlatformClient(config);
|
|
3578
|
+
|
|
3579
|
+
try {
|
|
3580
|
+
const data = await api.getProviderCatalog();
|
|
3581
|
+
console.log(data);
|
|
3582
|
+
} catch (error) {
|
|
3583
|
+
console.error(error);
|
|
3584
|
+
}
|
|
3585
|
+
}
|
|
3586
|
+
|
|
3587
|
+
// Run the test
|
|
3588
|
+
example().catch(console.error);
|
|
3589
|
+
```
|
|
3590
|
+
|
|
3591
|
+
### Parameters
|
|
3592
|
+
|
|
3593
|
+
This endpoint does not need any parameter.
|
|
3594
|
+
|
|
3595
|
+
### Return type
|
|
3596
|
+
|
|
3597
|
+
[**ProviderCatalogResponse**](ProviderCatalogResponse.md)
|
|
3598
|
+
|
|
3599
|
+
### Authorization
|
|
3600
|
+
|
|
3601
|
+
[Implicit implicit](../README.md#Implicit-implicit)
|
|
3602
|
+
|
|
3603
|
+
### HTTP request headers
|
|
3604
|
+
|
|
3605
|
+
- **Content-Type**: Not defined
|
|
3606
|
+
- **Accept**: `application/json`
|
|
3607
|
+
|
|
3608
|
+
|
|
3609
|
+
### HTTP response details
|
|
3610
|
+
| Status code | Description | Response headers |
|
|
3611
|
+
|-------------|-------------|------------------|
|
|
3612
|
+
| **200** | Payload of ProviderCatalogResponse | - |
|
|
3613
|
+
|
|
3614
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3615
|
+
|
|
3616
|
+
|
|
3479
3617
|
## getProvisioningStatus
|
|
3480
3618
|
|
|
3481
3619
|
> Business getProvisioningStatus(id)
|
|
@@ -6570,6 +6708,78 @@ example().catch(console.error);
|
|
|
6570
6708
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
6571
6709
|
|
|
6572
6710
|
|
|
6711
|
+
## previewOAuthAuthorization
|
|
6712
|
+
|
|
6713
|
+
> AuthorizationPreview previewOAuthAuthorization(authorizationRequest)
|
|
6714
|
+
|
|
6715
|
+
Describe an authorization request before the user approves it
|
|
6716
|
+
|
|
6717
|
+
Validates the client, redirect URI and resource for the signed-in user and names the client.
|
|
6718
|
+
|
|
6719
|
+
### Example
|
|
6720
|
+
|
|
6721
|
+
```ts
|
|
6722
|
+
import {
|
|
6723
|
+
Configuration,
|
|
6724
|
+
PlatformClient,
|
|
6725
|
+
} from '@snokam/platform-client';
|
|
6726
|
+
import type { PreviewOAuthAuthorizationRequest } from '@snokam/platform-client';
|
|
6727
|
+
|
|
6728
|
+
async function example() {
|
|
6729
|
+
console.log("🚀 Testing @snokam/platform-client SDK...");
|
|
6730
|
+
const config = new Configuration({
|
|
6731
|
+
// To configure OAuth2 access token for authorization: Implicit implicit
|
|
6732
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
6733
|
+
});
|
|
6734
|
+
const api = new PlatformClient(config);
|
|
6735
|
+
|
|
6736
|
+
const body = {
|
|
6737
|
+
// AuthorizationRequest
|
|
6738
|
+
authorizationRequest: ...,
|
|
6739
|
+
} satisfies PreviewOAuthAuthorizationRequest;
|
|
6740
|
+
|
|
6741
|
+
try {
|
|
6742
|
+
const data = await api.previewOAuthAuthorization(body);
|
|
6743
|
+
console.log(data);
|
|
6744
|
+
} catch (error) {
|
|
6745
|
+
console.error(error);
|
|
6746
|
+
}
|
|
6747
|
+
}
|
|
6748
|
+
|
|
6749
|
+
// Run the test
|
|
6750
|
+
example().catch(console.error);
|
|
6751
|
+
```
|
|
6752
|
+
|
|
6753
|
+
### Parameters
|
|
6754
|
+
|
|
6755
|
+
|
|
6756
|
+
| Name | Type | Description | Notes |
|
|
6757
|
+
|------------- | ------------- | ------------- | -------------|
|
|
6758
|
+
| **authorizationRequest** | [AuthorizationRequest](AuthorizationRequest.md) | | |
|
|
6759
|
+
|
|
6760
|
+
### Return type
|
|
6761
|
+
|
|
6762
|
+
[**AuthorizationPreview**](AuthorizationPreview.md)
|
|
6763
|
+
|
|
6764
|
+
### Authorization
|
|
6765
|
+
|
|
6766
|
+
[Implicit implicit](../README.md#Implicit-implicit)
|
|
6767
|
+
|
|
6768
|
+
### HTTP request headers
|
|
6769
|
+
|
|
6770
|
+
- **Content-Type**: `application/json`
|
|
6771
|
+
- **Accept**: `application/json`
|
|
6772
|
+
|
|
6773
|
+
|
|
6774
|
+
### HTTP response details
|
|
6775
|
+
| Status code | Description | Response headers |
|
|
6776
|
+
|-------------|-------------|------------------|
|
|
6777
|
+
| **200** | Payload of AuthorizationPreview | - |
|
|
6778
|
+
| **400** | Payload of String | - |
|
|
6779
|
+
|
|
6780
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
6781
|
+
|
|
6782
|
+
|
|
6573
6783
|
## provisionBusiness
|
|
6574
6784
|
|
|
6575
6785
|
> Business provisionBusiness(id)
|
|
@@ -7188,7 +7398,7 @@ example().catch(console.error);
|
|
|
7188
7398
|
|
|
7189
7399
|
Resolve the platform Sanity read config
|
|
7190
7400
|
|
|
7191
|
-
Returns the shared platform Sanity project, dataset, studio URL and read token used as the content fallback layer for every tenant. All four values live in platform Key Vault (editable in platform-web), so nothing Sanity-related is baked onto frontends. This is a render-path config endpoint, so it accepts any principal from the platform Entra tenant — the platform managed identity in production, or a Snøkam developer\'s az session locally — with no operator role required.
|
|
7401
|
+
Returns the shared platform Sanity project, dataset, studio URL and read token used as the content fallback layer for every tenant. All four values live in platform Key Vault (editable in platform-web), so nothing Sanity-related is baked onto frontends. The answer is cached in-process for five minutes and served stale if Key Vault is briefly unreachable. This is a render-path config endpoint, so it accepts any principal from the platform Entra tenant — the platform managed identity in production, or a Snøkam developer\'s az session locally — with no operator role required.
|
|
7192
7402
|
|
|
7193
7403
|
### Example
|
|
7194
7404
|
|
|
@@ -31,6 +31,7 @@ Name | Type
|
|
|
31
31
|
`isExternal` | boolean
|
|
32
32
|
`isPublic` | boolean
|
|
33
33
|
`isSeekingProject` | boolean
|
|
34
|
+
`leadershipGroupMember` | boolean
|
|
34
35
|
`linkedin` | string
|
|
35
36
|
`manager` | [SanityEmployeeManager](SanityEmployeeManager.md)
|
|
36
37
|
`maritalStatus` | string
|
|
@@ -39,7 +40,6 @@ Name | Type
|
|
|
39
40
|
`nextOfKin` | [Array<SanityEmployeeNextOfKinInner>](SanityEmployeeNextOfKinInner.md)
|
|
40
41
|
`nrOfChildren` | number
|
|
41
42
|
`parentalLeaveCoverage` | string
|
|
42
|
-
`parentalLeaveStartDate` | string
|
|
43
43
|
`personalProjectRequirements` | string
|
|
44
44
|
`position` | string
|
|
45
45
|
`salaryConfig` | [SanityEmployeeSalaryConfig](SanityEmployeeSalaryConfig.md)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
# ProviderCatalogEntry
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`capability` | string
|
|
10
|
+
`description` | string
|
|
11
|
+
`key` | string
|
|
12
|
+
`logoUrl` | string
|
|
13
|
+
`title` | string
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
# ProviderCatalogResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`providers` | [Array<ProviderCatalogEntry>](ProviderCatalogEntry.md)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
13
|
+
|
|
14
|
+
|
|
@@ -17,6 +17,7 @@ Name | Type
|
|
|
17
17
|
`sanityType` | string
|
|
18
18
|
`sanityUpdatedAt` | string
|
|
19
19
|
`scopeGrants` | Array<string>
|
|
20
|
+
`slackChannel` | string
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
package/docs/TenantInfo.md
CHANGED