@snokam/platform-client 3.0.0 → 3.1.1
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 +22 -0
- package/README.md +7 -2
- package/dist/apis/PlatformClient.d.ts +37 -3
- package/dist/apis/PlatformClient.js +94 -2
- package/dist/esm/apis/PlatformClient.d.ts +37 -3
- package/dist/esm/apis/PlatformClient.js +94 -2
- package/dist/esm/models/index.d.ts +93 -12
- package/dist/models/index.d.ts +93 -12
- package/docs/AuthorizationPreview.md +15 -0
- package/docs/AuthorizationRequest.md +19 -0
- package/docs/IssuedAuthorizationCode.md +14 -0
- package/docs/PatchEmployee.md +1 -1
- package/docs/PlatformClient.md +147 -1
- package/docs/ProtectedEmployee.md +1 -1
- package/docs/SanityEmployeeGroupsInner.md +1 -0
- package/package.json +1 -1
- package/src/apis/PlatformClient.ts +121 -2
- package/src/models/index.ts +93 -12
|
@@ -277,6 +277,68 @@ 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
|
+
/**
|
|
336
|
+
*
|
|
337
|
+
* @type {string}
|
|
338
|
+
* @memberof AuthorizationRequest
|
|
339
|
+
*/
|
|
340
|
+
userToken?: string | null;
|
|
341
|
+
}
|
|
280
342
|
/**
|
|
281
343
|
*
|
|
282
344
|
* @export
|
|
@@ -2387,6 +2449,19 @@ export interface InvoiceBasisLine {
|
|
|
2387
2449
|
*/
|
|
2388
2450
|
unitPriceOre?: number | null;
|
|
2389
2451
|
}
|
|
2452
|
+
/**
|
|
2453
|
+
*
|
|
2454
|
+
* @export
|
|
2455
|
+
* @interface IssuedAuthorizationCode
|
|
2456
|
+
*/
|
|
2457
|
+
export interface IssuedAuthorizationCode {
|
|
2458
|
+
/**
|
|
2459
|
+
*
|
|
2460
|
+
* @type {string}
|
|
2461
|
+
* @memberof IssuedAuthorizationCode
|
|
2462
|
+
*/
|
|
2463
|
+
code?: string | null;
|
|
2464
|
+
}
|
|
2390
2465
|
/**
|
|
2391
2466
|
*
|
|
2392
2467
|
* @export
|
|
@@ -3323,6 +3398,12 @@ export interface PatchEmployee {
|
|
|
3323
3398
|
* @memberof PatchEmployee
|
|
3324
3399
|
*/
|
|
3325
3400
|
isSeekingProject?: boolean | null;
|
|
3401
|
+
/**
|
|
3402
|
+
*
|
|
3403
|
+
* @type {boolean}
|
|
3404
|
+
* @memberof PatchEmployee
|
|
3405
|
+
*/
|
|
3406
|
+
leadershipGroupMember?: boolean | null;
|
|
3326
3407
|
/**
|
|
3327
3408
|
*
|
|
3328
3409
|
* @type {string}
|
|
@@ -3373,12 +3454,6 @@ export interface PatchEmployee {
|
|
|
3373
3454
|
* @memberof PatchEmployee
|
|
3374
3455
|
*/
|
|
3375
3456
|
parentalLeaveCoverage?: PatchEmployeeParentalLeaveCoverageEnum | null;
|
|
3376
|
-
/**
|
|
3377
|
-
*
|
|
3378
|
-
* @type {string}
|
|
3379
|
-
* @memberof PatchEmployee
|
|
3380
|
-
*/
|
|
3381
|
-
parentalLeaveStartDate?: string;
|
|
3382
3457
|
/**
|
|
3383
3458
|
*
|
|
3384
3459
|
* @type {string}
|
|
@@ -4092,6 +4167,12 @@ export interface ProtectedEmployee {
|
|
|
4092
4167
|
* @memberof ProtectedEmployee
|
|
4093
4168
|
*/
|
|
4094
4169
|
isSeekingProject?: boolean;
|
|
4170
|
+
/**
|
|
4171
|
+
*
|
|
4172
|
+
* @type {boolean}
|
|
4173
|
+
* @memberof ProtectedEmployee
|
|
4174
|
+
*/
|
|
4175
|
+
leadershipGroupMember?: boolean;
|
|
4095
4176
|
/**
|
|
4096
4177
|
*
|
|
4097
4178
|
* @type {string}
|
|
@@ -4142,12 +4223,6 @@ export interface ProtectedEmployee {
|
|
|
4142
4223
|
* @memberof ProtectedEmployee
|
|
4143
4224
|
*/
|
|
4144
4225
|
parentalLeaveCoverage?: ProtectedEmployeeParentalLeaveCoverageEnum | null;
|
|
4145
|
-
/**
|
|
4146
|
-
*
|
|
4147
|
-
* @type {string}
|
|
4148
|
-
* @memberof ProtectedEmployee
|
|
4149
|
-
*/
|
|
4150
|
-
parentalLeaveStartDate?: string;
|
|
4151
4226
|
/**
|
|
4152
4227
|
*
|
|
4153
4228
|
* @type {string}
|
|
@@ -4899,6 +4974,12 @@ export interface SanityEmployeeGroupsInner {
|
|
|
4899
4974
|
* @memberof SanityEmployeeGroupsInner
|
|
4900
4975
|
*/
|
|
4901
4976
|
scopeGrants?: Array<string>;
|
|
4977
|
+
/**
|
|
4978
|
+
*
|
|
4979
|
+
* @type {string}
|
|
4980
|
+
* @memberof SanityEmployeeGroupsInner
|
|
4981
|
+
*/
|
|
4982
|
+
slackChannel?: string;
|
|
4902
4983
|
}
|
|
4903
4984
|
/**
|
|
4904
4985
|
* @export
|
package/dist/models/index.d.ts
CHANGED
|
@@ -277,6 +277,68 @@ 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
|
+
/**
|
|
336
|
+
*
|
|
337
|
+
* @type {string}
|
|
338
|
+
* @memberof AuthorizationRequest
|
|
339
|
+
*/
|
|
340
|
+
userToken?: string | null;
|
|
341
|
+
}
|
|
280
342
|
/**
|
|
281
343
|
*
|
|
282
344
|
* @export
|
|
@@ -2387,6 +2449,19 @@ export interface InvoiceBasisLine {
|
|
|
2387
2449
|
*/
|
|
2388
2450
|
unitPriceOre?: number | null;
|
|
2389
2451
|
}
|
|
2452
|
+
/**
|
|
2453
|
+
*
|
|
2454
|
+
* @export
|
|
2455
|
+
* @interface IssuedAuthorizationCode
|
|
2456
|
+
*/
|
|
2457
|
+
export interface IssuedAuthorizationCode {
|
|
2458
|
+
/**
|
|
2459
|
+
*
|
|
2460
|
+
* @type {string}
|
|
2461
|
+
* @memberof IssuedAuthorizationCode
|
|
2462
|
+
*/
|
|
2463
|
+
code?: string | null;
|
|
2464
|
+
}
|
|
2390
2465
|
/**
|
|
2391
2466
|
*
|
|
2392
2467
|
* @export
|
|
@@ -3323,6 +3398,12 @@ export interface PatchEmployee {
|
|
|
3323
3398
|
* @memberof PatchEmployee
|
|
3324
3399
|
*/
|
|
3325
3400
|
isSeekingProject?: boolean | null;
|
|
3401
|
+
/**
|
|
3402
|
+
*
|
|
3403
|
+
* @type {boolean}
|
|
3404
|
+
* @memberof PatchEmployee
|
|
3405
|
+
*/
|
|
3406
|
+
leadershipGroupMember?: boolean | null;
|
|
3326
3407
|
/**
|
|
3327
3408
|
*
|
|
3328
3409
|
* @type {string}
|
|
@@ -3373,12 +3454,6 @@ export interface PatchEmployee {
|
|
|
3373
3454
|
* @memberof PatchEmployee
|
|
3374
3455
|
*/
|
|
3375
3456
|
parentalLeaveCoverage?: PatchEmployeeParentalLeaveCoverageEnum | null;
|
|
3376
|
-
/**
|
|
3377
|
-
*
|
|
3378
|
-
* @type {string}
|
|
3379
|
-
* @memberof PatchEmployee
|
|
3380
|
-
*/
|
|
3381
|
-
parentalLeaveStartDate?: string;
|
|
3382
3457
|
/**
|
|
3383
3458
|
*
|
|
3384
3459
|
* @type {string}
|
|
@@ -4092,6 +4167,12 @@ export interface ProtectedEmployee {
|
|
|
4092
4167
|
* @memberof ProtectedEmployee
|
|
4093
4168
|
*/
|
|
4094
4169
|
isSeekingProject?: boolean;
|
|
4170
|
+
/**
|
|
4171
|
+
*
|
|
4172
|
+
* @type {boolean}
|
|
4173
|
+
* @memberof ProtectedEmployee
|
|
4174
|
+
*/
|
|
4175
|
+
leadershipGroupMember?: boolean;
|
|
4095
4176
|
/**
|
|
4096
4177
|
*
|
|
4097
4178
|
* @type {string}
|
|
@@ -4142,12 +4223,6 @@ export interface ProtectedEmployee {
|
|
|
4142
4223
|
* @memberof ProtectedEmployee
|
|
4143
4224
|
*/
|
|
4144
4225
|
parentalLeaveCoverage?: ProtectedEmployeeParentalLeaveCoverageEnum | null;
|
|
4145
|
-
/**
|
|
4146
|
-
*
|
|
4147
|
-
* @type {string}
|
|
4148
|
-
* @memberof ProtectedEmployee
|
|
4149
|
-
*/
|
|
4150
|
-
parentalLeaveStartDate?: string;
|
|
4151
4226
|
/**
|
|
4152
4227
|
*
|
|
4153
4228
|
* @type {string}
|
|
@@ -4899,6 +4974,12 @@ export interface SanityEmployeeGroupsInner {
|
|
|
4899
4974
|
* @memberof SanityEmployeeGroupsInner
|
|
4900
4975
|
*/
|
|
4901
4976
|
scopeGrants?: Array<string>;
|
|
4977
|
+
/**
|
|
4978
|
+
*
|
|
4979
|
+
* @type {string}
|
|
4980
|
+
* @memberof SanityEmployeeGroupsInner
|
|
4981
|
+
*/
|
|
4982
|
+
slackChannel?: string;
|
|
4902
4983
|
}
|
|
4903
4984
|
/**
|
|
4904
4985
|
* @export
|
|
@@ -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,19 @@
|
|
|
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
|
+
`userToken` | string
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
18
|
+
|
|
19
|
+
|
|
@@ -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 | Record the user\'s approval of an app\'s sign-in request |
|
|
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 |
|
|
@@ -96,6 +97,7 @@ All URIs are relative to *https://snokam.snosky.no/api/platform*
|
|
|
96
97
|
| [**powerOfficeOnboardingReturn**](PlatformClient.md#powerofficeonboardingreturn) | **GET** /v1.0/connect/poweroffice/return/{reference} | PowerOffice onboarding return |
|
|
97
98
|
| [**previewBillingInvoice**](PlatformClient.md#previewbillinginvoice) | **POST** /v1.0/protected/businesses/{id}/billing/invoice-preview | Preview a month\'s invoice basis |
|
|
98
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 app\'s sign-in request before the user approves it |
|
|
99
101
|
| [**provisionBusiness**](PlatformClient.md#provisionbusiness) | **POST** /v1.0/protected/businesses/{id}/provision | Provision a business |
|
|
100
102
|
| [**publicCapabilities**](PlatformClient.md#publiccapabilities) | **GET** /v1.0/public/capabilities | Get capabilities |
|
|
101
103
|
| [**publicModules**](PlatformClient.md#publicmodules) | **GET** /v1.0/public/modules | Get available modules |
|
|
@@ -288,6 +290,78 @@ example().catch(console.error);
|
|
|
288
290
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
289
291
|
|
|
290
292
|
|
|
293
|
+
## approveOAuthAuthorization
|
|
294
|
+
|
|
295
|
+
> IssuedAuthorizationCode approveOAuthAuthorization(authorizationRequest)
|
|
296
|
+
|
|
297
|
+
Record the user\'s approval of an app\'s sign-in request
|
|
298
|
+
|
|
299
|
+
Called by the login site after the user consents. Issues a single-use authorization code the app 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
|
+
|
|
291
365
|
## assignBusinessEmployeeSystem
|
|
292
366
|
|
|
293
367
|
> EmployeeSystemAccess assignBusinessEmployeeSystem(id, upn, systemKey, roleId)
|
|
@@ -6634,6 +6708,78 @@ example().catch(console.error);
|
|
|
6634
6708
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
6635
6709
|
|
|
6636
6710
|
|
|
6711
|
+
## previewOAuthAuthorization
|
|
6712
|
+
|
|
6713
|
+
> AuthorizationPreview previewOAuthAuthorization(authorizationRequest)
|
|
6714
|
+
|
|
6715
|
+
Describe an app\'s sign-in request before the user approves it
|
|
6716
|
+
|
|
6717
|
+
Called by the login site. Validates the app, redirect URI and resource for the user whose access token is in the body, and names the app.
|
|
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
|
+
|
|
6637
6783
|
## provisionBusiness
|
|
6638
6784
|
|
|
6639
6785
|
> Business provisionBusiness(id)
|
|
@@ -7252,7 +7398,7 @@ example().catch(console.error);
|
|
|
7252
7398
|
|
|
7253
7399
|
Resolve the platform Sanity read config
|
|
7254
7400
|
|
|
7255
|
-
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.
|
|
7256
7402
|
|
|
7257
7403
|
### Example
|
|
7258
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)
|
|
@@ -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)
|