@snokam/platform-client 3.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 +11 -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 +87 -12
- package/dist/models/index.d.ts +87 -12
- package/docs/AuthorizationPreview.md +15 -0
- package/docs/AuthorizationRequest.md +18 -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 +87 -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
|
|
@@ -2387,6 +2443,19 @@ export interface InvoiceBasisLine {
|
|
|
2387
2443
|
*/
|
|
2388
2444
|
unitPriceOre?: number | null;
|
|
2389
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
|
+
}
|
|
2390
2459
|
/**
|
|
2391
2460
|
*
|
|
2392
2461
|
* @export
|
|
@@ -3323,6 +3392,12 @@ export interface PatchEmployee {
|
|
|
3323
3392
|
* @memberof PatchEmployee
|
|
3324
3393
|
*/
|
|
3325
3394
|
isSeekingProject?: boolean | null;
|
|
3395
|
+
/**
|
|
3396
|
+
*
|
|
3397
|
+
* @type {boolean}
|
|
3398
|
+
* @memberof PatchEmployee
|
|
3399
|
+
*/
|
|
3400
|
+
leadershipGroupMember?: boolean | null;
|
|
3326
3401
|
/**
|
|
3327
3402
|
*
|
|
3328
3403
|
* @type {string}
|
|
@@ -3373,12 +3448,6 @@ export interface PatchEmployee {
|
|
|
3373
3448
|
* @memberof PatchEmployee
|
|
3374
3449
|
*/
|
|
3375
3450
|
parentalLeaveCoverage?: PatchEmployeeParentalLeaveCoverageEnum | null;
|
|
3376
|
-
/**
|
|
3377
|
-
*
|
|
3378
|
-
* @type {string}
|
|
3379
|
-
* @memberof PatchEmployee
|
|
3380
|
-
*/
|
|
3381
|
-
parentalLeaveStartDate?: string;
|
|
3382
3451
|
/**
|
|
3383
3452
|
*
|
|
3384
3453
|
* @type {string}
|
|
@@ -4092,6 +4161,12 @@ export interface ProtectedEmployee {
|
|
|
4092
4161
|
* @memberof ProtectedEmployee
|
|
4093
4162
|
*/
|
|
4094
4163
|
isSeekingProject?: boolean;
|
|
4164
|
+
/**
|
|
4165
|
+
*
|
|
4166
|
+
* @type {boolean}
|
|
4167
|
+
* @memberof ProtectedEmployee
|
|
4168
|
+
*/
|
|
4169
|
+
leadershipGroupMember?: boolean;
|
|
4095
4170
|
/**
|
|
4096
4171
|
*
|
|
4097
4172
|
* @type {string}
|
|
@@ -4142,12 +4217,6 @@ export interface ProtectedEmployee {
|
|
|
4142
4217
|
* @memberof ProtectedEmployee
|
|
4143
4218
|
*/
|
|
4144
4219
|
parentalLeaveCoverage?: ProtectedEmployeeParentalLeaveCoverageEnum | null;
|
|
4145
|
-
/**
|
|
4146
|
-
*
|
|
4147
|
-
* @type {string}
|
|
4148
|
-
* @memberof ProtectedEmployee
|
|
4149
|
-
*/
|
|
4150
|
-
parentalLeaveStartDate?: string;
|
|
4151
4220
|
/**
|
|
4152
4221
|
*
|
|
4153
4222
|
* @type {string}
|
|
@@ -4899,6 +4968,12 @@ export interface SanityEmployeeGroupsInner {
|
|
|
4899
4968
|
* @memberof SanityEmployeeGroupsInner
|
|
4900
4969
|
*/
|
|
4901
4970
|
scopeGrants?: Array<string>;
|
|
4971
|
+
/**
|
|
4972
|
+
*
|
|
4973
|
+
* @type {string}
|
|
4974
|
+
* @memberof SanityEmployeeGroupsInner
|
|
4975
|
+
*/
|
|
4976
|
+
slackChannel?: string;
|
|
4902
4977
|
}
|
|
4903
4978
|
/**
|
|
4904
4979
|
* @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,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
|
+
|
|
@@ -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 |
|
|
@@ -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 authorization 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
|
+
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
|
+
|
|
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 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
|
+
|
|
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)
|
package/package.json
CHANGED
|
@@ -22,6 +22,8 @@ import type {
|
|
|
22
22
|
AppCatalogEntry,
|
|
23
23
|
AppModule,
|
|
24
24
|
ApproveDeviceRequest,
|
|
25
|
+
AuthorizationPreview,
|
|
26
|
+
AuthorizationRequest,
|
|
25
27
|
BillingPaymentMethod,
|
|
26
28
|
BillingSessionRequest,
|
|
27
29
|
BillingSessionResponse,
|
|
@@ -57,6 +59,7 @@ import type {
|
|
|
57
59
|
IntegrationSummary,
|
|
58
60
|
InviteCredentialRequest,
|
|
59
61
|
InvoiceBasis,
|
|
62
|
+
IssuedAuthorizationCode,
|
|
60
63
|
LoginConfig,
|
|
61
64
|
MeApp,
|
|
62
65
|
MeterEnforcementDecision,
|
|
@@ -133,6 +136,10 @@ export interface ApproveDeviceOperationRequest {
|
|
|
133
136
|
approveDeviceRequest: ApproveDeviceRequest;
|
|
134
137
|
}
|
|
135
138
|
|
|
139
|
+
export interface ApproveOAuthAuthorizationRequest {
|
|
140
|
+
authorizationRequest: AuthorizationRequest;
|
|
141
|
+
}
|
|
142
|
+
|
|
136
143
|
export interface AssignBusinessEmployeeSystemRequest {
|
|
137
144
|
id: string;
|
|
138
145
|
upn: string;
|
|
@@ -454,6 +461,10 @@ export interface PreviewDeviceRequest {
|
|
|
454
461
|
code: string;
|
|
455
462
|
}
|
|
456
463
|
|
|
464
|
+
export interface PreviewOAuthAuthorizationRequest {
|
|
465
|
+
authorizationRequest: AuthorizationRequest;
|
|
466
|
+
}
|
|
467
|
+
|
|
457
468
|
export interface ProvisionBusinessRequest {
|
|
458
469
|
id: string;
|
|
459
470
|
}
|
|
@@ -748,6 +759,60 @@ export class PlatformClient extends runtime.BaseAPI {
|
|
|
748
759
|
return await response.value();
|
|
749
760
|
}
|
|
750
761
|
|
|
762
|
+
/**
|
|
763
|
+
* Creates request options for approveOAuthAuthorization without sending the request
|
|
764
|
+
*/
|
|
765
|
+
async approveOAuthAuthorizationRequestOpts(requestParameters: ApproveOAuthAuthorizationRequest): Promise<runtime.RequestOpts> {
|
|
766
|
+
if (requestParameters['authorizationRequest'] == null) {
|
|
767
|
+
throw new runtime.RequiredError(
|
|
768
|
+
'authorizationRequest',
|
|
769
|
+
'Required parameter "authorizationRequest" was null or undefined when calling approveOAuthAuthorization().'
|
|
770
|
+
);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
const queryParameters: any = {};
|
|
774
|
+
|
|
775
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
776
|
+
|
|
777
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
778
|
+
|
|
779
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
780
|
+
// oauth required
|
|
781
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("Implicit", []);
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
let urlPath = `/v1.0/protected/oauth/authorization`;
|
|
786
|
+
|
|
787
|
+
return {
|
|
788
|
+
path: urlPath,
|
|
789
|
+
method: 'POST',
|
|
790
|
+
headers: headerParameters,
|
|
791
|
+
query: queryParameters,
|
|
792
|
+
body: requestParameters['authorizationRequest'],
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Issues a single-use authorization code the client redeems at the token endpoint.
|
|
798
|
+
* Approve an authorization request as the signed-in user
|
|
799
|
+
*/
|
|
800
|
+
async approveOAuthAuthorizationRaw(requestParameters: ApproveOAuthAuthorizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IssuedAuthorizationCode>> {
|
|
801
|
+
const requestOptions = await this.approveOAuthAuthorizationRequestOpts(requestParameters);
|
|
802
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
803
|
+
|
|
804
|
+
return new runtime.JSONApiResponse(response);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Issues a single-use authorization code the client redeems at the token endpoint.
|
|
809
|
+
* Approve an authorization request as the signed-in user
|
|
810
|
+
*/
|
|
811
|
+
async approveOAuthAuthorization(requestParameters: ApproveOAuthAuthorizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IssuedAuthorizationCode> {
|
|
812
|
+
const response = await this.approveOAuthAuthorizationRaw(requestParameters, initOverrides);
|
|
813
|
+
return await response.value();
|
|
814
|
+
}
|
|
815
|
+
|
|
751
816
|
/**
|
|
752
817
|
* Creates request options for assignBusinessEmployeeSystem without sending the request
|
|
753
818
|
*/
|
|
@@ -5434,6 +5499,60 @@ export class PlatformClient extends runtime.BaseAPI {
|
|
|
5434
5499
|
return await response.value();
|
|
5435
5500
|
}
|
|
5436
5501
|
|
|
5502
|
+
/**
|
|
5503
|
+
* Creates request options for previewOAuthAuthorization without sending the request
|
|
5504
|
+
*/
|
|
5505
|
+
async previewOAuthAuthorizationRequestOpts(requestParameters: PreviewOAuthAuthorizationRequest): Promise<runtime.RequestOpts> {
|
|
5506
|
+
if (requestParameters['authorizationRequest'] == null) {
|
|
5507
|
+
throw new runtime.RequiredError(
|
|
5508
|
+
'authorizationRequest',
|
|
5509
|
+
'Required parameter "authorizationRequest" was null or undefined when calling previewOAuthAuthorization().'
|
|
5510
|
+
);
|
|
5511
|
+
}
|
|
5512
|
+
|
|
5513
|
+
const queryParameters: any = {};
|
|
5514
|
+
|
|
5515
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
5516
|
+
|
|
5517
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
5518
|
+
|
|
5519
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
5520
|
+
// oauth required
|
|
5521
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("Implicit", []);
|
|
5522
|
+
}
|
|
5523
|
+
|
|
5524
|
+
|
|
5525
|
+
let urlPath = `/v1.0/protected/oauth/authorization/preview`;
|
|
5526
|
+
|
|
5527
|
+
return {
|
|
5528
|
+
path: urlPath,
|
|
5529
|
+
method: 'POST',
|
|
5530
|
+
headers: headerParameters,
|
|
5531
|
+
query: queryParameters,
|
|
5532
|
+
body: requestParameters['authorizationRequest'],
|
|
5533
|
+
};
|
|
5534
|
+
}
|
|
5535
|
+
|
|
5536
|
+
/**
|
|
5537
|
+
* Validates the client, redirect URI and resource for the signed-in user and names the client.
|
|
5538
|
+
* Describe an authorization request before the user approves it
|
|
5539
|
+
*/
|
|
5540
|
+
async previewOAuthAuthorizationRaw(requestParameters: PreviewOAuthAuthorizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthorizationPreview>> {
|
|
5541
|
+
const requestOptions = await this.previewOAuthAuthorizationRequestOpts(requestParameters);
|
|
5542
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
5543
|
+
|
|
5544
|
+
return new runtime.JSONApiResponse(response);
|
|
5545
|
+
}
|
|
5546
|
+
|
|
5547
|
+
/**
|
|
5548
|
+
* Validates the client, redirect URI and resource for the signed-in user and names the client.
|
|
5549
|
+
* Describe an authorization request before the user approves it
|
|
5550
|
+
*/
|
|
5551
|
+
async previewOAuthAuthorization(requestParameters: PreviewOAuthAuthorizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthorizationPreview> {
|
|
5552
|
+
const response = await this.previewOAuthAuthorizationRaw(requestParameters, initOverrides);
|
|
5553
|
+
return await response.value();
|
|
5554
|
+
}
|
|
5555
|
+
|
|
5437
5556
|
/**
|
|
5438
5557
|
* Creates request options for provisionBusiness without sending the request
|
|
5439
5558
|
*/
|
|
@@ -5908,7 +6027,7 @@ export class PlatformClient extends runtime.BaseAPI {
|
|
|
5908
6027
|
}
|
|
5909
6028
|
|
|
5910
6029
|
/**
|
|
5911
|
-
* 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.
|
|
6030
|
+
* 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.
|
|
5912
6031
|
* Resolve the platform Sanity read config
|
|
5913
6032
|
*/
|
|
5914
6033
|
async resolvePlatformSanityConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlatformSanityConfig>> {
|
|
@@ -5919,7 +6038,7 @@ export class PlatformClient extends runtime.BaseAPI {
|
|
|
5919
6038
|
}
|
|
5920
6039
|
|
|
5921
6040
|
/**
|
|
5922
|
-
* 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.
|
|
6041
|
+
* 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.
|
|
5923
6042
|
* Resolve the platform Sanity read config
|
|
5924
6043
|
*/
|
|
5925
6044
|
async resolvePlatformSanityConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlatformSanityConfig> {
|