@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.
@@ -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,
@@ -82,6 +85,7 @@ import type {
82
85
  PowerOfficeProject,
83
86
  PowerOfficeProjectsResponse,
84
87
  ProtectedEmployee,
88
+ ProviderCatalogResponse,
85
89
  RecordImpersonationActivityRequest,
86
90
  RenameDeviceRequest,
87
91
  ResetConfirmRequest,
@@ -132,6 +136,10 @@ export interface ApproveDeviceOperationRequest {
132
136
  approveDeviceRequest: ApproveDeviceRequest;
133
137
  }
134
138
 
139
+ export interface ApproveOAuthAuthorizationRequest {
140
+ authorizationRequest: AuthorizationRequest;
141
+ }
142
+
135
143
  export interface AssignBusinessEmployeeSystemRequest {
136
144
  id: string;
137
145
  upn: string;
@@ -453,6 +461,10 @@ export interface PreviewDeviceRequest {
453
461
  code: string;
454
462
  }
455
463
 
464
+ export interface PreviewOAuthAuthorizationRequest {
465
+ authorizationRequest: AuthorizationRequest;
466
+ }
467
+
456
468
  export interface ProvisionBusinessRequest {
457
469
  id: string;
458
470
  }
@@ -747,6 +759,60 @@ export class PlatformClient extends runtime.BaseAPI {
747
759
  return await response.value();
748
760
  }
749
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
+
750
816
  /**
751
817
  * Creates request options for assignBusinessEmployeeSystem without sending the request
752
818
  */
@@ -3113,6 +3179,50 @@ export class PlatformClient extends runtime.BaseAPI {
3113
3179
  return await response.value();
3114
3180
  }
3115
3181
 
3182
+ /**
3183
+ * Creates request options for getProviderCatalog without sending the request
3184
+ */
3185
+ async getProviderCatalogRequestOpts(): Promise<runtime.RequestOpts> {
3186
+ const queryParameters: any = {};
3187
+
3188
+ const headerParameters: runtime.HTTPHeaders = {};
3189
+
3190
+ if (this.configuration && this.configuration.accessToken) {
3191
+ // oauth required
3192
+ headerParameters["Authorization"] = await this.configuration.accessToken("Implicit", []);
3193
+ }
3194
+
3195
+
3196
+ let urlPath = `/v1.0/protected/catalog/providers`;
3197
+
3198
+ return {
3199
+ path: urlPath,
3200
+ method: 'GET',
3201
+ headers: headerParameters,
3202
+ query: queryParameters,
3203
+ };
3204
+ }
3205
+
3206
+ /**
3207
+ * Returns the global, platform-owned provider brand catalog (key, capability, title, logo, description). Single source of truth for provider branding across tenants.
3208
+ * List provider brand catalog
3209
+ */
3210
+ async getProviderCatalogRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProviderCatalogResponse>> {
3211
+ const requestOptions = await this.getProviderCatalogRequestOpts();
3212
+ const response = await this.request(requestOptions, initOverrides);
3213
+
3214
+ return new runtime.JSONApiResponse(response);
3215
+ }
3216
+
3217
+ /**
3218
+ * Returns the global, platform-owned provider brand catalog (key, capability, title, logo, description). Single source of truth for provider branding across tenants.
3219
+ * List provider brand catalog
3220
+ */
3221
+ async getProviderCatalog(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProviderCatalogResponse> {
3222
+ const response = await this.getProviderCatalogRaw(initOverrides);
3223
+ return await response.value();
3224
+ }
3225
+
3116
3226
  /**
3117
3227
  * Creates request options for getProvisioningStatus without sending the request
3118
3228
  */
@@ -5389,6 +5499,60 @@ export class PlatformClient extends runtime.BaseAPI {
5389
5499
  return await response.value();
5390
5500
  }
5391
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
+
5392
5556
  /**
5393
5557
  * Creates request options for provisionBusiness without sending the request
5394
5558
  */
@@ -5863,7 +6027,7 @@ export class PlatformClient extends runtime.BaseAPI {
5863
6027
  }
5864
6028
 
5865
6029
  /**
5866
- * 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.
5867
6031
  * Resolve the platform Sanity read config
5868
6032
  */
5869
6033
  async resolvePlatformSanityConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlatformSanityConfig>> {
@@ -5874,7 +6038,7 @@ export class PlatformClient extends runtime.BaseAPI {
5874
6038
  }
5875
6039
 
5876
6040
  /**
5877
- * 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.
5878
6042
  * Resolve the platform Sanity read config
5879
6043
  */
5880
6044
  async resolvePlatformSanityConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlatformSanityConfig> {
@@ -279,6 +279,62 @@ export interface ApproveDeviceRequest {
279
279
  */
280
280
  name?: string | null;
281
281
  }
282
+ /**
283
+ *
284
+ * @export
285
+ * @interface AuthorizationPreview
286
+ */
287
+ export interface AuthorizationPreview {
288
+ /**
289
+ *
290
+ * @type {string}
291
+ * @memberof AuthorizationPreview
292
+ */
293
+ businessName?: string | null;
294
+ /**
295
+ *
296
+ * @type {string}
297
+ * @memberof AuthorizationPreview
298
+ */
299
+ clientName?: string | null;
300
+ }
301
+ /**
302
+ *
303
+ * @export
304
+ * @interface AuthorizationRequest
305
+ */
306
+ export interface AuthorizationRequest {
307
+ /**
308
+ *
309
+ * @type {string}
310
+ * @memberof AuthorizationRequest
311
+ */
312
+ clientId?: string | null;
313
+ /**
314
+ *
315
+ * @type {string}
316
+ * @memberof AuthorizationRequest
317
+ */
318
+ codeChallenge?: string | null;
319
+ /**
320
+ *
321
+ * @type {string}
322
+ * @memberof AuthorizationRequest
323
+ */
324
+ codeChallengeMethod?: string | null;
325
+ /**
326
+ *
327
+ * @type {string}
328
+ * @memberof AuthorizationRequest
329
+ */
330
+ redirectUri?: string | null;
331
+ /**
332
+ *
333
+ * @type {string}
334
+ * @memberof AuthorizationRequest
335
+ */
336
+ resource?: string | null;
337
+ }
282
338
  /**
283
339
  *
284
340
  * @export
@@ -744,6 +800,12 @@ export interface BusinessConfig {
744
800
  * @memberof BusinessConfig
745
801
  */
746
802
  olafTeamsSettings?: OlafTeamsSettings;
803
+ /**
804
+ *
805
+ * @type {{ [key: string]: string; }}
806
+ * @memberof BusinessConfig
807
+ */
808
+ onboardingActivateUrlOverrides?: { [key: string]: string; } | null;
747
809
  /**
748
810
  *
749
811
  * @type {string}
@@ -2233,6 +2295,12 @@ export interface IntegrationSummary {
2233
2295
  * @memberof IntegrationSummary
2234
2296
  */
2235
2297
  key?: string | null;
2298
+ /**
2299
+ *
2300
+ * @type {string}
2301
+ * @memberof IntegrationSummary
2302
+ */
2303
+ logoUrl?: string | null;
2236
2304
  /**
2237
2305
  *
2238
2306
  * @type {Array<string>}
@@ -2386,6 +2454,19 @@ export interface InvoiceBasisLine {
2386
2454
  */
2387
2455
  unitPriceOre?: number | null;
2388
2456
  }
2457
+ /**
2458
+ *
2459
+ * @export
2460
+ * @interface IssuedAuthorizationCode
2461
+ */
2462
+ export interface IssuedAuthorizationCode {
2463
+ /**
2464
+ *
2465
+ * @type {string}
2466
+ * @memberof IssuedAuthorizationCode
2467
+ */
2468
+ code?: string | null;
2469
+ }
2389
2470
  /**
2390
2471
  *
2391
2472
  * @export
@@ -3330,6 +3411,12 @@ export interface PatchEmployee {
3330
3411
  * @memberof PatchEmployee
3331
3412
  */
3332
3413
  isSeekingProject?: boolean | null;
3414
+ /**
3415
+ *
3416
+ * @type {boolean}
3417
+ * @memberof PatchEmployee
3418
+ */
3419
+ leadershipGroupMember?: boolean | null;
3333
3420
  /**
3334
3421
  *
3335
3422
  * @type {string}
@@ -3378,12 +3465,6 @@ export interface PatchEmployee {
3378
3465
  * @memberof PatchEmployee
3379
3466
  */
3380
3467
  parentalLeaveCoverage?: PatchEmployeeParentalLeaveCoverageEnum | null;
3381
- /**
3382
- *
3383
- * @type {string}
3384
- * @memberof PatchEmployee
3385
- */
3386
- parentalLeaveStartDate?: string;
3387
3468
  /**
3388
3469
  *
3389
3470
  * @type {string}
@@ -4110,6 +4191,12 @@ export interface ProtectedEmployee {
4110
4191
  * @memberof ProtectedEmployee
4111
4192
  */
4112
4193
  isSeekingProject?: boolean;
4194
+ /**
4195
+ *
4196
+ * @type {boolean}
4197
+ * @memberof ProtectedEmployee
4198
+ */
4199
+ leadershipGroupMember?: boolean;
4113
4200
  /**
4114
4201
  *
4115
4202
  * @type {string}
@@ -4158,12 +4245,6 @@ export interface ProtectedEmployee {
4158
4245
  * @memberof ProtectedEmployee
4159
4246
  */
4160
4247
  parentalLeaveCoverage?: ProtectedEmployeeParentalLeaveCoverageEnum | null;
4161
- /**
4162
- *
4163
- * @type {string}
4164
- * @memberof ProtectedEmployee
4165
- */
4166
- parentalLeaveStartDate?: string;
4167
4248
  /**
4168
4249
  *
4169
4250
  * @type {string}
@@ -4300,6 +4381,56 @@ export const ProtectedEmployeeSanityTypeEnum = {
4300
4381
  } as const;
4301
4382
  export type ProtectedEmployeeSanityTypeEnum = typeof ProtectedEmployeeSanityTypeEnum[keyof typeof ProtectedEmployeeSanityTypeEnum];
4302
4383
 
4384
+ /**
4385
+ *
4386
+ * @export
4387
+ * @interface ProviderCatalogEntry
4388
+ */
4389
+ export interface ProviderCatalogEntry {
4390
+ /**
4391
+ *
4392
+ * @type {string}
4393
+ * @memberof ProviderCatalogEntry
4394
+ */
4395
+ capability?: string | null;
4396
+ /**
4397
+ *
4398
+ * @type {string}
4399
+ * @memberof ProviderCatalogEntry
4400
+ */
4401
+ description?: string | null;
4402
+ /**
4403
+ *
4404
+ * @type {string}
4405
+ * @memberof ProviderCatalogEntry
4406
+ */
4407
+ key?: string | null;
4408
+ /**
4409
+ *
4410
+ * @type {string}
4411
+ * @memberof ProviderCatalogEntry
4412
+ */
4413
+ logoUrl?: string | null;
4414
+ /**
4415
+ *
4416
+ * @type {string}
4417
+ * @memberof ProviderCatalogEntry
4418
+ */
4419
+ title?: string | null;
4420
+ }
4421
+ /**
4422
+ *
4423
+ * @export
4424
+ * @interface ProviderCatalogResponse
4425
+ */
4426
+ export interface ProviderCatalogResponse {
4427
+ /**
4428
+ *
4429
+ * @type {Array<ProviderCatalogEntry>}
4430
+ * @memberof ProviderCatalogResponse
4431
+ */
4432
+ providers?: Array<ProviderCatalogEntry> | null;
4433
+ }
4303
4434
  /**
4304
4435
  *
4305
4436
  * @export
@@ -4893,6 +5024,12 @@ export interface SanityEmployeeGroupsInner {
4893
5024
  * @memberof SanityEmployeeGroupsInner
4894
5025
  */
4895
5026
  scopeGrants?: Array<string>;
5027
+ /**
5028
+ *
5029
+ * @type {string}
5030
+ * @memberof SanityEmployeeGroupsInner
5031
+ */
5032
+ slackChannel?: string;
4896
5033
  }
4897
5034
 
4898
5035
 
@@ -6099,6 +6236,12 @@ export interface TenantInfo {
6099
6236
  * @memberof TenantInfo
6100
6237
  */
6101
6238
  keyVaultName?: string | null;
6239
+ /**
6240
+ *
6241
+ * @type {{ [key: string]: string; }}
6242
+ * @memberof TenantInfo
6243
+ */
6244
+ onboardingActivateUrlOverrides?: { [key: string]: string; } | null;
6102
6245
  /**
6103
6246
  *
6104
6247
  * @type {string}