@flipdish/authorization 0.2.61 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,13 +1,3886 @@
1
+ type AuthToken = string | undefined;
2
+ interface Auth {
3
+ /**
4
+ * Which part of the request do we use to send the auth?
5
+ *
6
+ * @default 'header'
7
+ */
8
+ in?: 'header' | 'query' | 'cookie';
9
+ /**
10
+ * A unique identifier for the security scheme.
11
+ *
12
+ * Defined only when there are multiple security schemes whose `Auth`
13
+ * shape would otherwise be identical.
14
+ */
15
+ key?: string;
16
+ /**
17
+ * Header or query parameter name.
18
+ *
19
+ * @default 'Authorization'
20
+ */
21
+ name?: string;
22
+ scheme?: 'basic' | 'bearer';
23
+ type: 'apiKey' | 'http';
24
+ }
25
+
26
+ interface SerializerOptions<T> {
27
+ /**
28
+ * @default true
29
+ */
30
+ explode: boolean;
31
+ style: T;
32
+ }
33
+ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
34
+ type ObjectStyle = 'form' | 'deepObject';
35
+
36
+ type QuerySerializer = (query: Record<string, unknown>) => string;
37
+ type BodySerializer = (body: unknown) => unknown;
38
+ type QuerySerializerOptionsObject = {
39
+ allowReserved?: boolean;
40
+ array?: Partial<SerializerOptions<ArrayStyle>>;
41
+ object?: Partial<SerializerOptions<ObjectStyle>>;
42
+ };
43
+ type QuerySerializerOptions = QuerySerializerOptionsObject & {
44
+ /**
45
+ * Per-parameter serialization overrides. When provided, these settings
46
+ * override the global array/object settings for specific parameter names.
47
+ */
48
+ parameters?: Record<string, QuerySerializerOptionsObject>;
49
+ };
50
+
51
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
52
+ type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
53
+ /**
54
+ * Returns the final request URL.
55
+ */
56
+ buildUrl: BuildUrlFn;
57
+ getConfig: () => Config;
58
+ request: RequestFn;
59
+ setConfig: (config: Config) => Config;
60
+ } & {
61
+ [K in HttpMethod]: MethodFn;
62
+ } & ([SseFn] extends [never] ? {
63
+ sse?: never;
64
+ } : {
65
+ sse: {
66
+ [K in HttpMethod]: SseFn;
67
+ };
68
+ });
69
+ interface Config$1 {
70
+ /**
71
+ * Auth token or a function returning auth token. The resolved value will be
72
+ * added to the request payload as defined by its `security` array.
73
+ */
74
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
75
+ /**
76
+ * A function for serializing request body parameter. By default,
77
+ * {@link JSON.stringify()} will be used.
78
+ */
79
+ bodySerializer?: BodySerializer | null;
80
+ /**
81
+ * An object containing any HTTP headers that you want to pre-populate your
82
+ * `Headers` object with.
83
+ *
84
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
85
+ */
86
+ headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
87
+ /**
88
+ * The request method.
89
+ *
90
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
91
+ */
92
+ method?: Uppercase<HttpMethod>;
93
+ /**
94
+ * A function for serializing request query parameters. By default, arrays
95
+ * will be exploded in form style, objects will be exploded in deepObject
96
+ * style, and reserved characters are percent-encoded.
97
+ *
98
+ * This method will have no effect if the native `paramsSerializer()` Axios
99
+ * API function is used.
100
+ *
101
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
102
+ */
103
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
104
+ /**
105
+ * A function validating request data. This is useful if you want to ensure
106
+ * the request conforms to the desired shape, so it can be safely sent to
107
+ * the server.
108
+ */
109
+ requestValidator?: (data: unknown) => Promise<unknown>;
110
+ /**
111
+ * A function transforming response data before it's returned. This is useful
112
+ * for post-processing data, e.g., converting ISO strings into Date objects.
113
+ */
114
+ responseTransformer?: (data: unknown) => Promise<unknown>;
115
+ /**
116
+ * A function validating response data. This is useful if you want to ensure
117
+ * the response conforms to the desired shape, so it can be safely passed to
118
+ * the transformers and returned to the user.
119
+ */
120
+ responseValidator?: (data: unknown) => Promise<unknown>;
121
+ }
1
122
  /**
2
- * Authorization API
3
- * Authorization API
123
+ * Arbitrary metadata passed through the `meta` request option.
124
+ */
125
+ interface ClientMeta {
126
+ }
127
+
128
+ type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
129
+ /**
130
+ * Fetch API implementation. You can use this option to provide a custom
131
+ * fetch instance.
132
+ *
133
+ * @default globalThis.fetch
134
+ */
135
+ fetch?: typeof fetch;
136
+ /**
137
+ * Implementing clients can call request interceptors inside this hook.
138
+ */
139
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
140
+ /**
141
+ * Callback invoked when a network or parsing error occurs during streaming.
142
+ *
143
+ * This option applies only if the endpoint returns a stream of events.
144
+ *
145
+ * @param error The error that occurred.
146
+ */
147
+ onSseError?: (error: unknown) => void;
148
+ /**
149
+ * Callback invoked when an event is streamed from the server.
150
+ *
151
+ * This option applies only if the endpoint returns a stream of events.
152
+ *
153
+ * @param event Event streamed from the server.
154
+ * @returns Nothing (void).
155
+ */
156
+ onSseEvent?: (event: StreamEvent<TData>) => void;
157
+ serializedBody?: RequestInit['body'];
158
+ /**
159
+ * Default retry delay in milliseconds.
160
+ *
161
+ * This option applies only if the endpoint returns a stream of events.
162
+ *
163
+ * @default 3000
164
+ */
165
+ sseDefaultRetryDelay?: number;
166
+ /**
167
+ * Maximum number of retry attempts before giving up.
168
+ */
169
+ sseMaxRetryAttempts?: number;
170
+ /**
171
+ * Maximum retry delay in milliseconds.
172
+ *
173
+ * Applies only when exponential backoff is used.
174
+ *
175
+ * This option applies only if the endpoint returns a stream of events.
176
+ *
177
+ * @default 30000
178
+ */
179
+ sseMaxRetryDelay?: number;
180
+ /**
181
+ * Optional sleep function for retry backoff.
182
+ *
183
+ * Defaults to using `setTimeout`.
184
+ */
185
+ sseSleepFn?: (ms: number) => Promise<void>;
186
+ url: string;
187
+ };
188
+ interface StreamEvent<TData = unknown> {
189
+ data: TData;
190
+ event?: string;
191
+ id?: string;
192
+ retry?: number;
193
+ }
194
+ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
195
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
196
+ };
197
+
198
+ type ErrInterceptor<Err, Res, Req, Options> = (error: Err,
199
+ /** response may be undefined due to a network error where no response object is produced */
200
+ response: Res | undefined,
201
+ /** request may be undefined, because error may be from building the request object itself */
202
+ request: Req | undefined, options: Options) => Err | Promise<Err>;
203
+ type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
204
+ type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
205
+ declare class Interceptors<Interceptor> {
206
+ fns: Array<Interceptor | null>;
207
+ clear(): void;
208
+ eject(id: number | Interceptor): void;
209
+ exists(id: number | Interceptor): boolean;
210
+ getInterceptorIndex(id: number | Interceptor): number;
211
+ update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
212
+ use(fn: Interceptor): number;
213
+ }
214
+ interface Middleware<Req, Res, Err, Options> {
215
+ error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
216
+ request: Interceptors<ReqInterceptor<Req, Options>>;
217
+ response: Interceptors<ResInterceptor<Res, Req, Options>>;
218
+ }
219
+
220
+ type ResponseStyle = 'data' | 'fields';
221
+ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
222
+ /**
223
+ * Base URL for all requests made by this client.
224
+ */
225
+ baseUrl?: T['baseUrl'];
226
+ /**
227
+ * Fetch API implementation. You can use this option to provide a custom
228
+ * fetch instance.
229
+ *
230
+ * @default globalThis.fetch
231
+ */
232
+ fetch?: typeof fetch;
233
+ /**
234
+ * Please don't use the Fetch client for Next.js applications. The `next`
235
+ * options won't have any effect.
236
+ *
237
+ * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
238
+ */
239
+ next?: never;
240
+ /**
241
+ * Return the response data parsed in a specified format. By default, `auto`
242
+ * will infer the appropriate method from the `Content-Type` response header.
243
+ * You can override this behavior with any of the {@link Body} methods.
244
+ * Select `stream` if you don't want to parse response data at all.
245
+ *
246
+ * @default 'auto'
247
+ */
248
+ parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
249
+ /**
250
+ * Should we return only data or multiple fields (data, error, response, etc.)?
251
+ *
252
+ * @default 'fields'
253
+ */
254
+ responseStyle?: ResponseStyle;
255
+ /**
256
+ * Throw an error instead of returning it in the response?
257
+ *
258
+ * @default false
259
+ */
260
+ throwOnError?: T['throwOnError'];
261
+ }
262
+ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
263
+ responseStyle: TResponseStyle;
264
+ throwOnError: ThrowOnError;
265
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
266
+ /**
267
+ * Any body that you want to add to your request.
268
+ *
269
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
270
+ */
271
+ body?: unknown;
272
+ path?: Record<string, unknown>;
273
+ query?: Record<string, unknown>;
274
+ /**
275
+ * Security mechanism(s) to use for the request.
276
+ */
277
+ security?: ReadonlyArray<Auth>;
278
+ url: Url;
279
+ }
280
+ interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
281
+ headers: Headers;
282
+ serializedBody?: string;
283
+ }
284
+ type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
285
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
286
+ request: Request;
287
+ response: Response;
288
+ }> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
289
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
290
+ error: undefined;
291
+ } | {
292
+ data: undefined;
293
+ error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
294
+ }) & {
295
+ /** request may be undefined, because error may be from building the request object itself */
296
+ request?: Request;
297
+ /** response may be undefined, because error may be from building the request object itself or from a network error */
298
+ response?: Response;
299
+ }>;
300
+ interface ClientOptions$1 {
301
+ baseUrl?: string;
302
+ responseStyle?: ResponseStyle;
303
+ throwOnError?: boolean;
304
+ }
305
+ type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
306
+ type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData>>;
307
+ type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
308
+ type BuildUrlFn = <TData extends {
309
+ body?: unknown;
310
+ path?: Record<string, unknown>;
311
+ query?: Record<string, unknown>;
312
+ url: string;
313
+ }>(options: TData & Options$1<TData>) => string;
314
+ type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
315
+ interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
316
+ };
317
+ interface TDataShape {
318
+ body?: unknown;
319
+ headers?: unknown;
320
+ path?: unknown;
321
+ query?: unknown;
322
+ url: string;
323
+ }
324
+ type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
325
+ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
326
+
327
+ type ClientOptions = {
328
+ baseUrl: 'https://undefined' | (string & {});
329
+ };
330
+ /**
331
+ * Response containing the authorization decision
332
+ */
333
+ type AuthorizationResponse = {
334
+ /**
335
+ * Whether the action is allowed
336
+ */
337
+ allowed: boolean;
338
+ /**
339
+ * The authorization decision
340
+ */
341
+ decision: string;
342
+ /**
343
+ * The policy IDs that were used to make the decision
344
+ */
345
+ policyIds: Array<string>;
346
+ };
347
+ type ValidationErrors = Array<{
348
+ path?: Array<string | number>;
349
+ message: string;
350
+ }>;
351
+ /**
352
+ * Permissions
353
+ */
354
+ declare const Permissions: {
355
+ readonly AnyAuditLogs: "AnyAuditLogs";
356
+ readonly ViewApp: "ViewApp";
357
+ readonly CreateApp: "CreateApp";
358
+ readonly UpdateApp: "UpdateApp";
359
+ readonly ViewAppName: "ViewAppName";
360
+ readonly EditAppAssets: "EditAppAssets";
361
+ readonly EditAppFeatures: "EditAppFeatures";
362
+ readonly ViewTeammates: "ViewTeammates";
363
+ readonly EditTeammates: "EditTeammates";
364
+ readonly CreateTeammateOwner: "CreateTeammateOwner";
365
+ readonly CreateTeammateManagedOwner: "CreateTeammateManagedOwner";
366
+ readonly CreateTeammateStoreOwner: "CreateTeammateStoreOwner";
367
+ readonly CreateTeammateStoreManager: "CreateTeammateStoreManager";
368
+ readonly CreateTeammateStoreStaff: "CreateTeammateStoreStaff";
369
+ readonly CreateTeammateStoreReadAccess: "CreateTeammateStoreReadAccess";
370
+ readonly CreateTeammateFinanceManager: "CreateTeammateFinanceManager";
371
+ readonly CreateTeammateIntegrator: "CreateTeammateIntegrator";
372
+ readonly CreateTeammateOnboarding: "CreateTeammateOnboarding";
373
+ readonly CreateTeammatePropertyManager: "CreateTeammatePropertyManager";
374
+ readonly CreateTeammatePropertyOwner: "CreateTeammatePropertyOwner";
375
+ readonly CreateTeammateStaffMember: "CreateTeammateStaffMember";
376
+ readonly CreateTeammateCourier: "CreateTeammateCourier";
377
+ readonly ViewApmConfigurations: "ViewApmConfigurations";
378
+ readonly EditApmConfigurations: "EditApmConfigurations";
379
+ readonly ViewCampaignsConfigurations: "ViewCampaignsConfigurations";
380
+ readonly CreateCampaignsConfigurations: "CreateCampaignsConfigurations";
381
+ readonly UpdateCampaignsConfigurations: "UpdateCampaignsConfigurations";
382
+ readonly DeleteCampaignsConfigurations: "DeleteCampaignsConfigurations";
383
+ readonly StampLoyaltyCardAgainstCampaignsConfigurations: "StampLoyaltyCardAgainstCampaignsConfigurations";
384
+ readonly ViewDevelopersSettings: "ViewDevelopersSettings";
385
+ readonly EditDevelopersSettings: "EditDevelopersSettings";
386
+ readonly ViewOrders: "ViewOrders";
387
+ readonly UpdateOrdersAccept: "UpdateOrdersAccept";
388
+ readonly UpdateOrdersReject: "UpdateOrdersReject";
389
+ readonly UpdateOrdersRefund: "UpdateOrdersRefund";
390
+ readonly UpdateOrdersDispatch: "UpdateOrdersDispatch";
391
+ readonly ViewStores: "ViewStores";
392
+ readonly CreateStores: "CreateStores";
393
+ readonly EditStores: "EditStores";
394
+ readonly ViewStoresOpeningHours: "ViewStoresOpeningHours";
395
+ readonly UpdateStoresOpenForCollectionOrDelivery: "UpdateStoresOpenForCollectionOrDelivery";
396
+ readonly UpdateStoresOpeningHours: "UpdateStoresOpeningHours";
397
+ readonly ViewStoresOpeningHoursOverride: "ViewStoresOpeningHoursOverride";
398
+ readonly EditStoresOpeningHoursOverride: "EditStoresOpeningHoursOverride";
399
+ readonly EditStoresOpeningHoursOverrideTemporary: "EditStoresOpeningHoursOverrideTemporary";
400
+ readonly UpdateStoresName: "UpdateStoresName";
401
+ readonly EditStoreKioskSettings: "EditStoreKioskSettings";
402
+ readonly EditStoreOrderCapacity: "EditStoreOrderCapacity";
403
+ readonly EditStoreNotifications: "EditStoreNotifications";
404
+ readonly ArchiveStores: "ArchiveStores";
405
+ readonly PublishStores: "PublishStores";
406
+ readonly UpdatePrinterTerminalsAssign: "UpdatePrinterTerminalsAssign";
407
+ readonly UpdatePrinterTerminalsToggle: "UpdatePrinterTerminalsToggle";
408
+ readonly ViewStoreGroups: "ViewStoreGroups";
409
+ readonly CreateStoreGroups: "CreateStoreGroups";
410
+ readonly UpdateStoreGroups: "UpdateStoreGroups";
411
+ readonly DeleteStoreGroups: "DeleteStoreGroups";
412
+ readonly ViewDeliveryZones: "ViewDeliveryZones";
413
+ readonly CreateDeliveryZones: "CreateDeliveryZones";
414
+ readonly UpdateDeliveryZones: "UpdateDeliveryZones";
415
+ readonly DeleteDeliveryZones: "DeleteDeliveryZones";
416
+ readonly ViewMenu: "ViewMenu";
417
+ readonly CreateGlobalApiKey: "CreateGlobalAPIKey";
418
+ readonly ListGlobalApiKeys: "ListGlobalAPIKeys";
419
+ readonly BlockPrincipalAccess: "BlockPrincipalAccess";
420
+ readonly ListPrincipalOrgs: "ListPrincipalOrgs";
421
+ readonly CreateMenu: "CreateMenu";
422
+ readonly UpdateMenu: "UpdateMenu";
423
+ readonly DeleteMenu: "DeleteMenu";
424
+ readonly UpdateMenuLock: "UpdateMenuLock";
425
+ readonly UpdateMenuItemsHideTemporarily: "UpdateMenuItemsHideTemporarily";
426
+ readonly EditMenuImage: "EditMenuImage";
427
+ readonly ViewVouchers: "ViewVouchers";
428
+ readonly EditVouchers: "EditVouchers";
429
+ readonly ViewWebsiteContent: "ViewWebsiteContent";
430
+ readonly EditWebsiteContent: "EditWebsiteContent";
431
+ readonly ViewWebsiteDnsVerified: "ViewWebsiteDnsVerified";
432
+ readonly ViewWebsiteCertificateCreated: "ViewWebsiteCertificateCreated";
433
+ readonly ViewWebsiteCertificateRenewed: "ViewWebsiteCertificateRenewed";
434
+ readonly ViewBankAccounts: "ViewBankAccounts";
435
+ readonly CreateBankAccounts: "CreateBankAccounts";
436
+ readonly UpdateBankAccounts: "UpdateBankAccounts";
437
+ readonly UpdateBankAccountsAssign: "UpdateBankAccountsAssign";
438
+ readonly ViewAssignedBankAccount: "ViewAssignedBankAccount";
439
+ readonly VerifyBankAccounts: "VerifyBankAccounts";
440
+ readonly ViewServiceChargeConfigurations: "ViewServiceChargeConfigurations";
441
+ readonly EditServiceChargeConfigurations: "EditServiceChargeConfigurations";
442
+ readonly EditStoreDeliveryZoneFees: "EditStoreDeliveryZoneFees";
443
+ readonly EditStoreDeliveryFeesLimited: "EditStoreDeliveryFeesLimited";
444
+ readonly ViewHydraConfig: "ViewHydraConfig";
445
+ readonly UpdateHydraConfigManage: "UpdateHydraConfigManage";
446
+ readonly InitiateBluetoothPairingMode: "InitiateBluetoothPairingMode";
447
+ readonly DeleteTerminal: "DeleteTerminal";
448
+ readonly ViewKioskTelemetry: "ViewKioskTelemetry";
449
+ readonly HydraOnly: "HydraOnly";
450
+ readonly ViewCustomers: "ViewCustomers";
451
+ readonly EditCustomers: "EditCustomers";
452
+ readonly CreateCustomers: "CreateCustomers";
453
+ readonly CreateCatalogElements: "CreateCatalogElements";
454
+ readonly UpdateCatalogElements: "UpdateCatalogElements";
455
+ readonly ViewCatalogElements: "ViewCatalogElements";
456
+ readonly DeleteCatalogElements: "DeleteCatalogElements";
457
+ readonly ViewMetafieldDefinitions: "ViewMetafieldDefinitions";
458
+ readonly CreateMetafieldDefinitions: "CreateMetafieldDefinitions";
459
+ readonly UpdateMetafieldDefinitions: "UpdateMetafieldDefinitions";
460
+ readonly DeleteMetafieldDefinitions: "DeleteMetafieldDefinitions";
461
+ readonly UpdateMetafields: "UpdateMetafields";
462
+ readonly ViewCatalogMenuChanges: "ViewCatalogMenuChanges";
463
+ readonly PublishCatalogMenuChanges: "PublishCatalogMenuChanges";
464
+ readonly ViewAppStatistics: "ViewAppStatistics";
465
+ readonly ViewApmStatistics: "ViewApmStatistics";
466
+ readonly ViewCampaignsStatistics: "ViewCampaignsStatistics";
467
+ readonly ViewCustomerStatistics: "ViewCustomerStatistics";
468
+ readonly ViewLiveStatistics: "ViewLiveStatistics";
469
+ readonly ViewOrderStatistics: "ViewOrderStatistics";
470
+ readonly ViewSalesStatistics: "ViewSalesStatistics";
471
+ readonly ViewSalesEndOfDayStatistics: "ViewSalesEndOfDayStatistics";
472
+ readonly ViewVouchersStatistics: "ViewVouchersStatistics";
473
+ readonly DownloadCustomerCsvExport: "DownloadCustomerCsvExport";
474
+ readonly ViewApmAuditLogs: "ViewApmAuditLogs";
475
+ readonly ViewStoreAuditLogs: "ViewStoreAuditLogs";
476
+ readonly ViewMenuAuditLogs: "ViewMenuAuditLogs";
477
+ readonly ViewBankAccountAuditLogs: "ViewBankAccountAuditLogs";
478
+ readonly ViewFeeConfigurationsAuditLogs: "ViewFeeConfigurationsAuditLogs";
479
+ readonly ViewOrdersAuditLogs: "ViewOrdersAuditLogs";
480
+ readonly ViewVouchersAuditLogs: "ViewVouchersAuditLogs";
481
+ readonly ViewUserEventsAuditLogs: "ViewUserEventsAuditLogs";
482
+ readonly ViewCampaignsAuditLogs: "ViewCampaignsAuditLogs";
483
+ readonly ViewTeammatesAuditLogs: "ViewTeammatesAuditLogs";
484
+ readonly ViewTimedAccessAuditLogs: "ViewTimedAccessAuditLogs";
485
+ readonly ViewAppAuditLogs: "ViewAppAuditLogs";
486
+ readonly ViewCustomerAuditLogs: "ViewCustomerAuditLogs";
487
+ readonly ViewPrinterAuditLogs: "ViewPrinterAuditLogs";
488
+ readonly ViewHydraAuditLogs: "ViewHydraAuditLogs";
489
+ readonly ViewPushNotificationAuditLogs: "ViewPushNotificationAuditLogs";
490
+ readonly ViewStripeCustomConnectedAccountAuditLogs: "ViewStripeCustomConnectedAccountAuditLogs";
491
+ readonly ViewKioskBluetoothDeviceAuditLogs: "ViewKioskBluetoothDeviceAuditLogs";
492
+ readonly ViewExternalAuditLogs: "ViewExternalAuditLogs";
493
+ readonly CreateExternalAuditLogEvents: "CreateExternalAuditLogEvents";
494
+ readonly ViewCatalogAuditLogs: "ViewCatalogAuditLogs";
495
+ readonly ViewOrderFulfillmentAuditLogs: "ViewOrderFulfillmentAuditLogs";
496
+ readonly ViewChannelAuditLogs: "ViewChannelAuditLogs";
497
+ readonly ViewAppStoreAuditLogs: "ViewAppStoreAuditLogs";
498
+ readonly SendPushNotificationToCustomer: "SendPushNotificationToCustomer";
499
+ readonly InviteDriverToApp: "InviteDriverToApp";
500
+ readonly GetDriverForApp: "GetDriverForApp";
501
+ readonly RemoveDriverFromApp: "RemoveDriverFromApp";
502
+ readonly AssignDriverToOrder: "AssignDriverToOrder";
503
+ readonly UnassignDriverFromOrder: "UnassignDriverFromOrder";
504
+ readonly UpdateOrdersDeliveryTrackingStatus: "UpdateOrdersDeliveryTrackingStatus";
505
+ readonly UpdateOrderFulfillmentStatus: "UpdateOrderFulfillmentStatus";
506
+ readonly ViewFulfillmentStatesConfiguration: "ViewFulfillmentStatesConfiguration";
507
+ readonly CreateFulfillmentStatesConfiguration: "CreateFulfillmentStatesConfiguration";
508
+ readonly UpdateFulfillmentStatesConfiguration: "UpdateFulfillmentStatesConfiguration";
509
+ readonly DeleteFulfillmentStatesConfiguration: "DeleteFulfillmentStatesConfiguration";
510
+ readonly ViewPayouts: "ViewPayouts";
511
+ readonly ViewChannels: "ViewChannels";
512
+ readonly ViewOnboarding: "ViewOnboarding";
513
+ readonly UpdateOnboarding: "UpdateOnboarding";
514
+ readonly ViewClientDevices: "ViewClientDevices";
515
+ readonly UpdateClientDevices: "UpdateClientDevices";
516
+ readonly EnrollClientDevices: "EnrollClientDevices";
517
+ readonly AssignClientDevices: "AssignClientDevices";
518
+ readonly ViewClientAuditLogs: "ViewClientAuditLogs";
519
+ readonly CreateAppStoreAppConfiguration: "CreateAppStoreAppConfiguration";
520
+ readonly ViewAppStoreAppConfiguration: "ViewAppStoreAppConfiguration";
521
+ readonly UpdateAppStoreAppConfiguration: "UpdateAppStoreAppConfiguration";
522
+ readonly DeleteAppStoreAppConfiguration: "DeleteAppStoreAppConfiguration";
523
+ readonly UpdateAppStoreAppConfigurationSettings: "UpdateAppStoreAppConfigurationSettings";
524
+ readonly CreateAppStoreSubscription: "CreateAppStoreSubscription";
525
+ readonly UpdateAppStoreSubscription: "UpdateAppStoreSubscription";
526
+ readonly DeleteAppStoreSubscription: "DeleteAppStoreSubscription";
527
+ readonly ViewSalesChannels: "ViewSalesChannels";
528
+ readonly EditSalesChannels: "EditSalesChannels";
529
+ readonly CreateSalesChannel: "CreateSalesChannel";
530
+ readonly ArchiveSalesChannel: "ArchiveSalesChannel";
531
+ readonly UnarchiveSalesChannel: "UnarchiveSalesChannel";
532
+ readonly PublishSalesChannel: "PublishSalesChannel";
533
+ readonly UnpublishSalesChannel: "UnpublishSalesChannel";
534
+ readonly CloneSalesChannel: "CloneSalesChannel";
535
+ readonly ViewPayGreenWhiteLabelConfiguration: "ViewPayGreenWhiteLabelConfiguration";
536
+ readonly CreatePayGreenWhiteLabelConfiguration: "CreatePayGreenWhiteLabelConfiguration";
537
+ readonly UpdatePayGreenWhiteLabelConfiguration: "UpdatePayGreenWhiteLabelConfiguration";
538
+ readonly UpdatePayGreenStoreConfiguration: "UpdatePayGreenStoreConfiguration";
539
+ readonly ViewSubscriptions: "ViewSubscriptions";
540
+ readonly ViewInvoices: "ViewInvoices";
541
+ readonly EditAccountsBills: "EditAccountsBills";
542
+ readonly ViewAccountsBills: "ViewAccountsBills";
543
+ readonly EditAccountsCategories: "EditAccountsCategories";
544
+ readonly ViewAccountsCategories: "ViewAccountsCategories";
545
+ readonly EditAccountsCreditAccounts: "EditAccountsCreditAccounts";
546
+ readonly ViewAccountsCreditAccounts: "ViewAccountsCreditAccounts";
547
+ readonly EditAccountsCreditBooks: "EditAccountsCreditBooks";
548
+ readonly ViewAccountsCreditBooks: "ViewAccountsCreditBooks";
549
+ readonly EditAccountsExpenses: "EditAccountsExpenses";
550
+ readonly ViewAccountsExpenses: "ViewAccountsExpenses";
551
+ readonly EditAccountsTransactionAccounts: "EditAccountsTransactionAccounts";
552
+ readonly ViewAccountsTransactionAccounts: "ViewAccountsTransactionAccounts";
553
+ readonly EditDocumentExplorer: "EditDocumentExplorer";
554
+ readonly ViewDocumentExplorer: "ViewDocumentExplorer";
555
+ readonly ViewInventoryReports: "ViewInventoryReports";
556
+ readonly EditInventoryPurchaseOrders: "EditInventoryPurchaseOrders";
557
+ readonly ViewInventoryPurchaseOrders: "ViewInventoryPurchaseOrders";
558
+ readonly EditInventoryStockItems: "EditInventoryStockItems";
559
+ readonly ViewInventoryStockItems: "ViewInventoryStockItems";
560
+ readonly EditInventorySupplier: "EditInventorySupplier";
561
+ readonly ViewInventorySupplier: "ViewInventorySupplier";
562
+ readonly EditInventoryTrackingProfiles: "EditInventoryTrackingProfiles";
563
+ readonly ViewInventoryTrackingProfiles: "ViewInventoryTrackingProfiles";
564
+ readonly ViewPayrollReports: "ViewPayrollReports";
565
+ readonly EditPayrollHoliday: "EditPayrollHoliday";
566
+ readonly ViewPayrollHoliday: "ViewPayrollHoliday";
567
+ readonly EditPayrollRota: "EditPayrollRota";
568
+ readonly ViewPayrollRota: "ViewPayrollRota";
569
+ readonly EditPayrollStaff: "EditPayrollStaff";
570
+ readonly ViewPayrollStaff: "ViewPayrollStaff";
571
+ readonly ViewSalesReports: "ViewSalesReports";
572
+ readonly ViewCostReports: "ViewCostReports";
573
+ readonly ViewMenuReports: "ViewMenuReports";
574
+ readonly ViewBrand: "ViewBrand";
575
+ readonly EditBrand: "EditBrand";
576
+ readonly CreateBrand: "CreateBrand";
577
+ readonly TransferBrand: "TransferBrand";
578
+ readonly ViewProperty: "ViewProperty";
579
+ readonly EditProperty: "EditProperty";
580
+ readonly CreateProperty: "CreateProperty";
581
+ readonly ArchiveProperty: "ArchiveProperty";
582
+ readonly ViewEntityFeatureFlags: "ViewEntityFeatureFlags";
583
+ readonly EditEntityFeatureFlags: "EditEntityFeatureFlags";
584
+ readonly CreateOrg: "CreateOrg";
585
+ readonly CreateOrgApiKey: "CreateOrgAPIKey";
586
+ readonly EditOrg: "EditOrg";
587
+ readonly ViewOrg: "ViewOrg";
588
+ readonly ViewWebhooks: "ViewWebhooks";
589
+ readonly EditWebhooks: "EditWebhooks";
590
+ readonly ViewOwnPermissions: "ViewOwnPermissions";
591
+ readonly LeaveOrg: "LeaveOrg";
592
+ readonly CreatePosSale: "CreatePosSale";
593
+ readonly ComplimentPosItems: "ComplimentPosItems";
594
+ readonly ApplyPosDiscounts: "ApplyPosDiscounts";
595
+ readonly CancelPosSales: "CancelPosSales";
596
+ readonly DeliverSale: "DeliverSale";
597
+ readonly PerformCashingUp: "PerformCashingUp";
598
+ readonly OpenCashDrawer: "OpenCashDrawer";
599
+ readonly EditPosSettings: "EditPosSettings";
600
+ readonly EditPosLayout: "EditPosLayout";
601
+ readonly ViewPosDailySummaryReport: "ViewPosDailySummaryReport";
602
+ readonly ViewPosDriverSalesReport: "ViewPosDriverSalesReport";
603
+ readonly CreatePurchaseOrder: "CreatePurchaseOrder";
604
+ readonly SubmitPurchaseOrder: "SubmitPurchaseOrder";
605
+ readonly ReceivePurchaseOrder: "ReceivePurchaseOrder";
606
+ readonly ViewBusinessInsights: "ViewBusinessInsights";
607
+ readonly SnoozePosMenu: "SnoozePosMenu";
608
+ readonly SnoozePosMenuIndefinitely: "SnoozePosMenuIndefinitely";
609
+ readonly SnoozePosItem: "SnoozePosItem";
610
+ readonly SnoozePosItemIndefinitely: "SnoozePosItemIndefinitely";
611
+ readonly SnoozePosProperty: "SnoozePosProperty";
612
+ readonly SendSmsToCustomers: "SendSmsToCustomers";
613
+ readonly RoleAdmin: "RoleAdmin";
614
+ readonly RoleFactory: "RoleFactory";
615
+ readonly RoleAuthDeveloper: "RoleAuthDeveloper";
616
+ readonly RoleFlipdishStaff: "RoleFlipdishStaff";
617
+ };
618
+ /**
619
+ * Permissions
620
+ */
621
+ type Permissions = typeof Permissions[keyof typeof Permissions];
622
+ /**
623
+ * Request to check if a user is authorized to perform an action(s). If you pass in an array of permissions, you will receive a single allow / deny response (based on the checkMode - any or all of the permissions must be allowed).
624
+ */
625
+ type AuthorizationRequest = {
626
+ principal: {
627
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
628
+ id: string;
629
+ name?: string;
630
+ givenName?: string;
631
+ familyName?: string;
632
+ email?: string;
633
+ phone?: string;
634
+ };
635
+ /**
636
+ * Permission or array of permissions - note that you still only receive a single allow / deny response (calculated based on the checkMode)
637
+ */
638
+ action: Permissions | Array<Permissions>;
639
+ resource?: {
640
+ type: 'Property';
641
+ id: string;
642
+ } | {
643
+ type: 'Org';
644
+ id: string;
645
+ } | {
646
+ type: 'Brand';
647
+ id: string;
648
+ } | {
649
+ type: 'SalesChannel';
650
+ id: string;
651
+ };
652
+ /**
653
+ * How to check authorisation - any or all of the actions must be allowed
654
+ */
655
+ checkMode?: 'any' | 'all';
656
+ };
657
+ type AuthorizationBatchResponse = {
658
+ /**
659
+ * Array of allowed resources
660
+ */
661
+ allowedResources: Array<{
662
+ /**
663
+ * The authorization decision
664
+ */
665
+ decision: string;
666
+ /**
667
+ * Whether the action is allowed
668
+ */
669
+ allowed: boolean;
670
+ /**
671
+ * The policy IDs that were used to make the decision
672
+ */
673
+ policyIds: Array<string>;
674
+ /**
675
+ * Principal that the action was checked for
676
+ */
677
+ principal: {
678
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
679
+ id: string;
680
+ name?: string;
681
+ givenName?: string;
682
+ familyName?: string;
683
+ email?: string;
684
+ phone?: string;
685
+ };
686
+ /**
687
+ * Resource that the action was checked for
688
+ */
689
+ resource: {
690
+ type: 'Property';
691
+ id: string;
692
+ } | {
693
+ type: 'Org';
694
+ id: string;
695
+ } | {
696
+ type: 'Brand';
697
+ id: string;
698
+ } | {
699
+ type: 'SalesChannel';
700
+ id: string;
701
+ };
702
+ action: Permissions;
703
+ }>;
704
+ /**
705
+ * Array of denied resources
706
+ */
707
+ deniedResources: Array<{
708
+ /**
709
+ * The authorization decision
710
+ */
711
+ decision: string;
712
+ /**
713
+ * Whether the action is allowed
714
+ */
715
+ allowed: boolean;
716
+ /**
717
+ * The policy IDs that were used to make the decision
718
+ */
719
+ policyIds: Array<string>;
720
+ /**
721
+ * Principal that the action was checked for
722
+ */
723
+ principal: {
724
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
725
+ id: string;
726
+ name?: string;
727
+ givenName?: string;
728
+ familyName?: string;
729
+ email?: string;
730
+ phone?: string;
731
+ };
732
+ /**
733
+ * Resource that the action was checked for
734
+ */
735
+ resource: {
736
+ type: 'Property';
737
+ id: string;
738
+ } | {
739
+ type: 'Org';
740
+ id: string;
741
+ } | {
742
+ type: 'Brand';
743
+ id: string;
744
+ } | {
745
+ type: 'SalesChannel';
746
+ id: string;
747
+ };
748
+ action: Permissions;
749
+ }>;
750
+ };
751
+ type AuthorizationBatchRequest = {
752
+ principal: {
753
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
754
+ id: string;
755
+ name?: string;
756
+ givenName?: string;
757
+ familyName?: string;
758
+ email?: string;
759
+ phone?: string;
760
+ };
761
+ action: Permissions;
762
+ /**
763
+ * Array of resources to check authorisation for
764
+ */
765
+ resources: Array<{
766
+ type: 'Property';
767
+ id: string;
768
+ } | {
769
+ type: 'Org';
770
+ id: string;
771
+ } | {
772
+ type: 'Brand';
773
+ id: string;
774
+ } | {
775
+ type: 'SalesChannel';
776
+ id: string;
777
+ }>;
778
+ };
779
+ type AuthorizationChecksBatchResponse = {
780
+ /**
781
+ * Allowed principal/resource checks
782
+ */
783
+ allowedResources: Array<{
784
+ /**
785
+ * The authorization decision
786
+ */
787
+ decision: string;
788
+ /**
789
+ * Whether the action is allowed
790
+ */
791
+ allowed: boolean;
792
+ /**
793
+ * The policy IDs that were used to make the decision
794
+ */
795
+ policyIds: Array<string>;
796
+ /**
797
+ * Principal that the action was checked for
798
+ */
799
+ principal: {
800
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
801
+ id: string;
802
+ name?: string;
803
+ givenName?: string;
804
+ familyName?: string;
805
+ email?: string;
806
+ phone?: string;
807
+ };
808
+ /**
809
+ * Resource that the action was checked for
810
+ */
811
+ resource: {
812
+ type: 'Property';
813
+ id: string;
814
+ } | {
815
+ type: 'Org';
816
+ id: string;
817
+ } | {
818
+ type: 'Brand';
819
+ id: string;
820
+ } | {
821
+ type: 'SalesChannel';
822
+ id: string;
823
+ };
824
+ action: Permissions;
825
+ }>;
826
+ /**
827
+ * Denied principal/resource checks
828
+ */
829
+ deniedResources: Array<{
830
+ /**
831
+ * The authorization decision
832
+ */
833
+ decision: string;
834
+ /**
835
+ * Whether the action is allowed
836
+ */
837
+ allowed: boolean;
838
+ /**
839
+ * The policy IDs that were used to make the decision
840
+ */
841
+ policyIds: Array<string>;
842
+ /**
843
+ * Principal that the action was checked for
844
+ */
845
+ principal: {
846
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
847
+ id: string;
848
+ name?: string;
849
+ givenName?: string;
850
+ familyName?: string;
851
+ email?: string;
852
+ phone?: string;
853
+ };
854
+ /**
855
+ * Resource that the action was checked for
856
+ */
857
+ resource: {
858
+ type: 'Property';
859
+ id: string;
860
+ } | {
861
+ type: 'Org';
862
+ id: string;
863
+ } | {
864
+ type: 'Brand';
865
+ id: string;
866
+ } | {
867
+ type: 'SalesChannel';
868
+ id: string;
869
+ };
870
+ action: Permissions;
871
+ }>;
872
+ };
873
+ type AuthorizationChecksBatchRequest = {
874
+ /**
875
+ * Principal/resource/action tuples to check authorisation for. Checks that share a principal or a resource are evaluated most efficiently; batches spanning too many distinct combinations are rejected with a 400.
876
+ */
877
+ checks: Array<{
878
+ principal: {
879
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
880
+ id: string;
881
+ name?: string;
882
+ givenName?: string;
883
+ familyName?: string;
884
+ email?: string;
885
+ phone?: string;
886
+ };
887
+ resource: {
888
+ type: 'Property';
889
+ id: string;
890
+ } | {
891
+ type: 'Org';
892
+ id: string;
893
+ } | {
894
+ type: 'Brand';
895
+ id: string;
896
+ } | {
897
+ type: 'SalesChannel';
898
+ id: string;
899
+ };
900
+ action: Permissions;
901
+ }>;
902
+ };
903
+ /**
904
+ * Response containing whether the principal is in any/all of the roles
905
+ */
906
+ type IsInRoleResponse = {
907
+ /**
908
+ * result of the check - whether the principal is in any/all of the roles
909
+ */
910
+ authorized: boolean;
911
+ };
912
+ /**
913
+ * Role names
914
+ */
915
+ declare const RoleNames: {
916
+ readonly Admin: "Admin";
917
+ readonly Factory: "Factory";
918
+ readonly AuthDeveloper: "AuthDeveloper";
919
+ readonly FlipdishStaff: "FlipdishStaff";
920
+ };
921
+ /**
922
+ * Role names
923
+ */
924
+ type RoleNames = typeof RoleNames[keyof typeof RoleNames];
925
+ type IsInRoleRequest = {
926
+ principal: {
927
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
928
+ id: string;
929
+ name?: string;
930
+ givenName?: string;
931
+ familyName?: string;
932
+ email?: string;
933
+ phone?: string;
934
+ };
935
+ /**
936
+ * Array of roles to check if the principal is in
937
+ */
938
+ roles: Array<RoleNames>;
939
+ /**
940
+ * How to check authorisation - any or all of the actions must be allowed
941
+ */
942
+ checkMode?: 'any' | 'all';
943
+ };
944
+ /**
945
+ * Response containing whether the principal is in any/all of the roles
946
+ */
947
+ type AuthenticateAndCheckIsInRoleResponse = {
948
+ authentication: {
949
+ principal: {
950
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
951
+ id: string;
952
+ name?: string;
953
+ givenName?: string;
954
+ familyName?: string;
955
+ email?: string;
956
+ phone?: string;
957
+ };
958
+ /**
959
+ * Whether the user is authenticated
960
+ */
961
+ authenticated: boolean;
962
+ /**
963
+ * The reason for the authentication failure
964
+ */
965
+ reason?: string;
966
+ };
967
+ /**
968
+ * result of the check - whether the principal is in any/all of the roles
969
+ */
970
+ authorized: boolean;
971
+ };
972
+ /**
973
+ * Incoming request headers to be used for authentication
974
+ */
975
+ type RequestHeaders = {
976
+ [key: string]: string;
977
+ };
978
+ type AuthenticateAndCheckIsInRoleRequest = {
979
+ headers: RequestHeaders;
980
+ /**
981
+ * Array of roles to check if the principal is in
982
+ */
983
+ roles: Array<RoleNames>;
984
+ checkMode?: 'any' | 'all';
985
+ };
986
+ /**
987
+ * Response containing the authentication and authorization decision
988
+ */
989
+ type AuthenticateAndAuthorizeResponse = {
990
+ authentication: {
991
+ principal: {
992
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
993
+ id: string;
994
+ name?: string;
995
+ givenName?: string;
996
+ familyName?: string;
997
+ email?: string;
998
+ phone?: string;
999
+ };
1000
+ /**
1001
+ * Whether the user is authenticated
1002
+ */
1003
+ authenticated: boolean;
1004
+ /**
1005
+ * The reason for the authentication failure
1006
+ */
1007
+ reason?: string;
1008
+ };
1009
+ /**
1010
+ * Opaque credential to forward to downstream services. Callers should propagate this value without inspecting it.
1011
+ */
1012
+ forwardableCredential?: string;
1013
+ authorization?: AuthorizationResponse;
1014
+ };
1015
+ type ErrorResponse = {
1016
+ message: string;
1017
+ };
1018
+ /**
1019
+ * Request to check if a user is authorized to perform an action(s). If you pass in an array of permissions, you will receive a single allow / deny response (based on an AND of the result for each permission). For a granular response to multiple permissions, call the /authorize/batch endpoint.
1020
+ */
1021
+ type AuthenticateAndAuthorizeRequest = {
1022
+ headers: RequestHeaders;
1023
+ /**
1024
+ * Permission or array of permissions - note that you still only receive a single allow / deny response (calculated based on the checkMode)
1025
+ */
1026
+ action: Permissions | Array<Permissions>;
1027
+ resource?: {
1028
+ type: 'Property';
1029
+ id: string;
1030
+ } | {
1031
+ type: 'Org';
1032
+ id: string;
1033
+ } | {
1034
+ type: 'Brand';
1035
+ id: string;
1036
+ } | {
1037
+ type: 'SalesChannel';
1038
+ id: string;
1039
+ };
1040
+ /**
1041
+ * How to check authorisation - any or all of the actions must be allowed
1042
+ */
1043
+ checkMode?: 'any' | 'all';
1044
+ };
1045
+ /**
1046
+ * Response containing the authorized orgs
1047
+ */
1048
+ type GetAuthorizedOrgsResponse = {
1049
+ /**
1050
+ * Array of allowed resources
1051
+ */
1052
+ allowedResources: Array<{
1053
+ /**
1054
+ * The authorization decision
1055
+ */
1056
+ decision: string;
1057
+ /**
1058
+ * Whether the action is allowed
1059
+ */
1060
+ allowed: boolean;
1061
+ /**
1062
+ * The policy IDs that were used to make the decision
1063
+ */
1064
+ policyIds: Array<string>;
1065
+ /**
1066
+ * Principal that the action was checked for
1067
+ */
1068
+ principal: {
1069
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1070
+ id: string;
1071
+ name?: string;
1072
+ givenName?: string;
1073
+ familyName?: string;
1074
+ email?: string;
1075
+ phone?: string;
1076
+ };
1077
+ /**
1078
+ * Resource that the action was checked for
1079
+ */
1080
+ resource: {
1081
+ type: 'Property';
1082
+ id: string;
1083
+ } | {
1084
+ type: 'Org';
1085
+ id: string;
1086
+ } | {
1087
+ type: 'Brand';
1088
+ id: string;
1089
+ } | {
1090
+ type: 'SalesChannel';
1091
+ id: string;
1092
+ };
1093
+ action: Permissions;
1094
+ }>;
1095
+ /**
1096
+ * Array of denied resources
1097
+ */
1098
+ deniedResources: Array<{
1099
+ /**
1100
+ * The authorization decision
1101
+ */
1102
+ decision: string;
1103
+ /**
1104
+ * Whether the action is allowed
1105
+ */
1106
+ allowed: boolean;
1107
+ /**
1108
+ * The policy IDs that were used to make the decision
1109
+ */
1110
+ policyIds: Array<string>;
1111
+ /**
1112
+ * Principal that the action was checked for
1113
+ */
1114
+ principal: {
1115
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1116
+ id: string;
1117
+ name?: string;
1118
+ givenName?: string;
1119
+ familyName?: string;
1120
+ email?: string;
1121
+ phone?: string;
1122
+ };
1123
+ /**
1124
+ * Resource that the action was checked for
1125
+ */
1126
+ resource: {
1127
+ type: 'Property';
1128
+ id: string;
1129
+ } | {
1130
+ type: 'Org';
1131
+ id: string;
1132
+ } | {
1133
+ type: 'Brand';
1134
+ id: string;
1135
+ } | {
1136
+ type: 'SalesChannel';
1137
+ id: string;
1138
+ };
1139
+ action: Permissions;
1140
+ }>;
1141
+ };
1142
+ /**
1143
+ * Request to get authorized orgs for a principal or the authenticated user based on the headers. Either principal or headers must be provided, but not both. If both are provided, the principal will be used.
1144
+ */
1145
+ type GetAuthorizedOrgsRequest = {
1146
+ /**
1147
+ * The principal to get authorized entities for
1148
+ */
1149
+ principal?: {
1150
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1151
+ id: string;
1152
+ name?: string;
1153
+ givenName?: string;
1154
+ familyName?: string;
1155
+ email?: string;
1156
+ phone?: string;
1157
+ };
1158
+ headers?: RequestHeaders;
1159
+ action: Permissions;
1160
+ };
1161
+ /**
1162
+ * Response containing the authorized properties
1163
+ */
1164
+ type GetAuthorizedPropertiesResponse = {
1165
+ /**
1166
+ * Array of allowed resources
1167
+ */
1168
+ allowedResources: Array<{
1169
+ /**
1170
+ * The authorization decision
1171
+ */
1172
+ decision: string;
1173
+ /**
1174
+ * Whether the action is allowed
1175
+ */
1176
+ allowed: boolean;
1177
+ /**
1178
+ * The policy IDs that were used to make the decision
1179
+ */
1180
+ policyIds: Array<string>;
1181
+ /**
1182
+ * Principal that the action was checked for
1183
+ */
1184
+ principal: {
1185
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1186
+ id: string;
1187
+ name?: string;
1188
+ givenName?: string;
1189
+ familyName?: string;
1190
+ email?: string;
1191
+ phone?: string;
1192
+ };
1193
+ /**
1194
+ * Resource that the action was checked for
1195
+ */
1196
+ resource: {
1197
+ type: 'Property';
1198
+ id: string;
1199
+ } | {
1200
+ type: 'Org';
1201
+ id: string;
1202
+ } | {
1203
+ type: 'Brand';
1204
+ id: string;
1205
+ } | {
1206
+ type: 'SalesChannel';
1207
+ id: string;
1208
+ };
1209
+ action: Permissions;
1210
+ }>;
1211
+ /**
1212
+ * Array of denied resources
1213
+ */
1214
+ deniedResources: Array<{
1215
+ /**
1216
+ * The authorization decision
1217
+ */
1218
+ decision: string;
1219
+ /**
1220
+ * Whether the action is allowed
1221
+ */
1222
+ allowed: boolean;
1223
+ /**
1224
+ * The policy IDs that were used to make the decision
1225
+ */
1226
+ policyIds: Array<string>;
1227
+ /**
1228
+ * Principal that the action was checked for
1229
+ */
1230
+ principal: {
1231
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1232
+ id: string;
1233
+ name?: string;
1234
+ givenName?: string;
1235
+ familyName?: string;
1236
+ email?: string;
1237
+ phone?: string;
1238
+ };
1239
+ /**
1240
+ * Resource that the action was checked for
1241
+ */
1242
+ resource: {
1243
+ type: 'Property';
1244
+ id: string;
1245
+ } | {
1246
+ type: 'Org';
1247
+ id: string;
1248
+ } | {
1249
+ type: 'Brand';
1250
+ id: string;
1251
+ } | {
1252
+ type: 'SalesChannel';
1253
+ id: string;
1254
+ };
1255
+ action: Permissions;
1256
+ }>;
1257
+ };
1258
+ /**
1259
+ * Request to get authorized properties for a principal or the authenticated user based on the headers. Either principal or headers must be provided, but not both. If both are provided, the principal will be used.
1260
+ */
1261
+ type GetAuthorizedPropertiesRequest = {
1262
+ /**
1263
+ * The principal to get authorized entities for
1264
+ */
1265
+ principal?: {
1266
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1267
+ id: string;
1268
+ name?: string;
1269
+ givenName?: string;
1270
+ familyName?: string;
1271
+ email?: string;
1272
+ phone?: string;
1273
+ };
1274
+ headers?: RequestHeaders;
1275
+ action: Permissions;
1276
+ };
1277
+ /**
1278
+ * Response containing the authorized brands
1279
+ */
1280
+ type GetAuthorizedBrandsResponse = {
1281
+ /**
1282
+ * Array of allowed resources
1283
+ */
1284
+ allowedResources: Array<{
1285
+ /**
1286
+ * The authorization decision
1287
+ */
1288
+ decision: string;
1289
+ /**
1290
+ * Whether the action is allowed
1291
+ */
1292
+ allowed: boolean;
1293
+ /**
1294
+ * The policy IDs that were used to make the decision
1295
+ */
1296
+ policyIds: Array<string>;
1297
+ /**
1298
+ * Principal that the action was checked for
1299
+ */
1300
+ principal: {
1301
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1302
+ id: string;
1303
+ name?: string;
1304
+ givenName?: string;
1305
+ familyName?: string;
1306
+ email?: string;
1307
+ phone?: string;
1308
+ };
1309
+ /**
1310
+ * Resource that the action was checked for
1311
+ */
1312
+ resource: {
1313
+ type: 'Property';
1314
+ id: string;
1315
+ } | {
1316
+ type: 'Org';
1317
+ id: string;
1318
+ } | {
1319
+ type: 'Brand';
1320
+ id: string;
1321
+ } | {
1322
+ type: 'SalesChannel';
1323
+ id: string;
1324
+ };
1325
+ action: Permissions;
1326
+ }>;
1327
+ /**
1328
+ * Array of denied resources
1329
+ */
1330
+ deniedResources: Array<{
1331
+ /**
1332
+ * The authorization decision
1333
+ */
1334
+ decision: string;
1335
+ /**
1336
+ * Whether the action is allowed
1337
+ */
1338
+ allowed: boolean;
1339
+ /**
1340
+ * The policy IDs that were used to make the decision
1341
+ */
1342
+ policyIds: Array<string>;
1343
+ /**
1344
+ * Principal that the action was checked for
1345
+ */
1346
+ principal: {
1347
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1348
+ id: string;
1349
+ name?: string;
1350
+ givenName?: string;
1351
+ familyName?: string;
1352
+ email?: string;
1353
+ phone?: string;
1354
+ };
1355
+ /**
1356
+ * Resource that the action was checked for
1357
+ */
1358
+ resource: {
1359
+ type: 'Property';
1360
+ id: string;
1361
+ } | {
1362
+ type: 'Org';
1363
+ id: string;
1364
+ } | {
1365
+ type: 'Brand';
1366
+ id: string;
1367
+ } | {
1368
+ type: 'SalesChannel';
1369
+ id: string;
1370
+ };
1371
+ action: Permissions;
1372
+ }>;
1373
+ };
1374
+ /**
1375
+ * Request to get authorized brands for a principal or the authenticated user based on the headers. Either principal or headers must be provided, but not both. If both are provided, the principal will be used.
1376
+ */
1377
+ type GetAuthorizedBrandsRequest = {
1378
+ /**
1379
+ * The principal to get authorized entities for
1380
+ */
1381
+ principal?: {
1382
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1383
+ id: string;
1384
+ name?: string;
1385
+ givenName?: string;
1386
+ familyName?: string;
1387
+ email?: string;
1388
+ phone?: string;
1389
+ };
1390
+ headers?: RequestHeaders;
1391
+ action: Permissions;
1392
+ };
1393
+ /**
1394
+ * Principal in an org, optionally including last active timestamp
1395
+ */
1396
+ type PrincipalInOrg = {
1397
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1398
+ id: string;
1399
+ name?: string;
1400
+ givenName?: string;
1401
+ familyName?: string;
1402
+ email?: string;
1403
+ phone?: string;
1404
+ /**
1405
+ * ISO-8601 UTC timestamp of last authorization activity in this org
1406
+ */
1407
+ lastActiveAt?: string;
1408
+ };
1409
+ /**
1410
+ * Principals
4
1411
  *
5
- * The version of the OpenAPI document: 0.0.1
6
- * Contact: support@flipdish.com
1412
+ * List of principals in org
1413
+ */
1414
+ type Principals = Array<PrincipalInOrg>;
1415
+ /**
1416
+ * Principals in org
1417
+ */
1418
+ type PrincipalsInOrgResponse = {
1419
+ orgId: string;
1420
+ principals: Principals;
1421
+ };
1422
+ /**
1423
+ * Successful user permissions retrieval response
1424
+ */
1425
+ type GetUserPermissionsSuccessResponse = {
1426
+ /**
1427
+ * Map of resource IDs to permissions
1428
+ */
1429
+ resources: {
1430
+ [key: string]: {
1431
+ /**
1432
+ * Type of resource the permissions are assigned to
1433
+ */
1434
+ resourceType: 'Property' | 'Org' | 'Brand' | 'SalesChannel';
1435
+ /**
1436
+ * ID of the resource the permissions are assigned to
1437
+ */
1438
+ resourceId: string | string | string | string;
1439
+ /**
1440
+ * List of permissions that are assigned to the user for the resource
1441
+ */
1442
+ permissions: Array<Permissions>;
1443
+ };
1444
+ };
1445
+ };
1446
+ /**
1447
+ * Successful user roles retrieval response
1448
+ */
1449
+ type GetUserRolesSuccessResponse = {
1450
+ /**
1451
+ * ID of the org the roles are assigned in
1452
+ */
1453
+ orgId: string | string | string | string;
1454
+ /**
1455
+ * List of roles that are assigned to the user in the org
1456
+ */
1457
+ roles: Array<'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal'>;
1458
+ /**
1459
+ * Optional permission set keys applied to the roles
1460
+ */
1461
+ optionalPermissionSetKeys?: Array<string>;
1462
+ /**
1463
+ * Property IDs, or * for all properties, the roles are scoped to
1464
+ */
1465
+ properties?: Array<string | '*'>;
1466
+ /**
1467
+ * Brand IDs, or * for all brands, the roles are scoped to
1468
+ */
1469
+ brands?: Array<string | '*'>;
1470
+ /**
1471
+ * Sales channel IDs, or * for all sales channels, the roles are scoped to
1472
+ */
1473
+ salesChannels?: Array<string | '*'>;
1474
+ };
1475
+ /**
1476
+ * Successful org roles retrieval response
1477
+ */
1478
+ type ListOrgRolesSuccessResponse = {
1479
+ [key: string]: {
1480
+ /**
1481
+ * ID of the org the roles are assigned in
1482
+ */
1483
+ orgId: string | string | string | string;
1484
+ /**
1485
+ * List of roles that are assigned to the user in the org
1486
+ */
1487
+ roles: Array<'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal'>;
1488
+ /**
1489
+ * Optional permission set keys applied to the roles
1490
+ */
1491
+ optionalPermissionSetKeys?: Array<string>;
1492
+ /**
1493
+ * Property IDs, or * for all properties, the roles are scoped to
1494
+ */
1495
+ properties?: Array<string | '*'>;
1496
+ /**
1497
+ * Brand IDs, or * for all brands, the roles are scoped to
1498
+ */
1499
+ brands?: Array<string | '*'>;
1500
+ /**
1501
+ * Sales channel IDs, or * for all sales channels, the roles are scoped to
1502
+ */
1503
+ salesChannels?: Array<string | '*'>;
1504
+ };
1505
+ };
1506
+ /**
1507
+ * Successful org permissions retrieval response
1508
+ */
1509
+ type ListOrgPermissionsSuccessResponse = {
1510
+ [key: string]: {
1511
+ [key: string]: {
1512
+ /**
1513
+ * Type of resource the permissions are assigned to
1514
+ */
1515
+ resourceType: 'Property' | 'Org' | 'Brand' | 'SalesChannel';
1516
+ /**
1517
+ * ID of the resource the permissions are assigned to
1518
+ */
1519
+ resourceId: string | string | string | string;
1520
+ /**
1521
+ * List of permissions that are assigned to the user for the resource
1522
+ */
1523
+ permissions: Array<Permissions>;
1524
+ };
1525
+ };
1526
+ };
1527
+ /**
1528
+ * Org ids
1529
+ *
1530
+ * Org ids the principal holds permission assignments in, ascending
1531
+ */
1532
+ type PrincipalOrgIds = Array<string>;
1533
+ /**
1534
+ * A principal and its org memberships, read straight from the principals store. These are the orgs the principal holds permission assignments in, which is a superset of the orgs any given action is allowed on. No policy evaluation is performed.
1535
+ */
1536
+ type PrincipalOrgsResponse = {
1537
+ principal: {
1538
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1539
+ id: string;
1540
+ name?: string;
1541
+ givenName?: string;
1542
+ familyName?: string;
1543
+ email?: string;
1544
+ phone?: string;
1545
+ };
1546
+ orgIds: PrincipalOrgIds;
1547
+ };
1548
+ /**
1549
+ * The timed access grant that was created or refreshed
1550
+ */
1551
+ type TimedAccessGrantResponse = {
1552
+ grantId: string;
1553
+ principalType: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1554
+ principalId: string;
1555
+ email: string;
1556
+ orgId: string;
1557
+ roleName: string;
1558
+ propertyIds: Array<string>;
1559
+ brandIds: Array<string>;
1560
+ salesChannelIds: Array<string>;
1561
+ startsAt: string;
1562
+ expiresAt: string;
1563
+ status: 'active' | 'expired';
1564
+ };
1565
+ type TimedAccessGrantRequestBody = {
1566
+ /**
1567
+ * Must match the authenticated caller
1568
+ */
1569
+ userId: string;
1570
+ /**
1571
+ * The org to grant temporary access to
1572
+ */
1573
+ orgId: string;
1574
+ /**
1575
+ * Role the pass grants
1576
+ */
1577
+ roleName: 'Owner';
1578
+ /**
1579
+ * Optional property scope
1580
+ */
1581
+ propertyIds?: Array<string>;
1582
+ /**
1583
+ * Optional brand scope
1584
+ */
1585
+ brandIds?: Array<string>;
1586
+ /**
1587
+ * Optional sales channel scope
1588
+ */
1589
+ salesChannelIds?: Array<string>;
1590
+ stepUpVerification?: {
1591
+ /**
1592
+ * The Okta factor id being used to verify
1593
+ */
1594
+ factorId: string;
1595
+ /**
1596
+ * TOTP passcode, for token:software:totp factors
1597
+ */
1598
+ passCode?: string;
1599
+ /**
1600
+ * WebAuthn clientDataJSON, base64url-encoded
1601
+ */
1602
+ clientData?: string;
1603
+ /**
1604
+ * WebAuthn authenticatorData, base64url-encoded
1605
+ */
1606
+ authenticatorData?: string;
1607
+ /**
1608
+ * WebAuthn signature, base64url-encoded
1609
+ */
1610
+ signatureData?: string;
1611
+ };
1612
+ };
1613
+ /**
1614
+ * A temporary timed access grant
1615
+ */
1616
+ type TimedAccessGrant = {
1617
+ grantId: string;
1618
+ principalType: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1619
+ principalId: string;
1620
+ email: string;
1621
+ orgId: string;
1622
+ roleName: string;
1623
+ propertyIds: Array<string>;
1624
+ brandIds: Array<string>;
1625
+ salesChannelIds: Array<string>;
1626
+ startsAt: string;
1627
+ expiresAt: string;
1628
+ status: 'active' | 'expired';
1629
+ };
1630
+ /**
1631
+ * The caller's active timed access grants
1632
+ */
1633
+ type ListTimedAccessGrantsResponse = {
1634
+ grants: Array<TimedAccessGrant>;
1635
+ };
1636
+ /**
1637
+ * The caller's timed access grants across every org
1638
+ */
1639
+ type ListMyTimedAccessGrantsAcrossOrgsResponse = {
1640
+ grants: Array<TimedAccessGrant>;
1641
+ /**
1642
+ * Pass as the cursor query param to fetch the next page. Only present for expired grants with more pages
1643
+ */
1644
+ nextCursor?: string;
1645
+ };
1646
+ /**
1647
+ * An org's expired timed access grants, most recent first
1648
+ */
1649
+ type ListExpiredTimedAccessGrantsResponse = {
1650
+ grants: Array<TimedAccessGrant>;
1651
+ /**
1652
+ * Pass as the cursor query param to fetch the next page. Absent on the last page
1653
+ */
1654
+ nextCursor?: string;
1655
+ };
1656
+ /**
1657
+ * The named role assignment
1658
+ */
1659
+ type NamedRoleAssignmentResponse = {
1660
+ userId: string;
1661
+ /**
1662
+ * Best-effort; omitted if the principal has no known email on file
1663
+ */
1664
+ email?: string;
1665
+ role: RoleNames;
1666
+ assignedAt: string;
1667
+ };
1668
+ type ApplyNamedRoleRequestBody = {
1669
+ /**
1670
+ * The user receiving the role
1671
+ */
1672
+ userId: string;
1673
+ roleName: RoleNames;
1674
+ };
1675
+ type RemoveNamedRoleRequestBody = {
1676
+ /**
1677
+ * The user losing the role
1678
+ */
1679
+ userId: string;
1680
+ roleName: RoleNames;
1681
+ };
1682
+ /**
1683
+ * The named roles held by a user
1684
+ */
1685
+ type ListNamedRolesResponse = {
1686
+ userId: string;
1687
+ /**
1688
+ * The named roles currently held by this user
1689
+ */
1690
+ roles: Array<RoleNames>;
1691
+ };
1692
+ /**
1693
+ * Successful role assignment rematerialization response (reconcile: add missing + revoke leftovers)
1694
+ */
1695
+ type RematerializeRoleAssignmentSuccessResponse = {
1696
+ roleAssignment: {
1697
+ pk: string;
1698
+ sk: string;
1699
+ assignmentId: string;
1700
+ };
1701
+ added: number;
1702
+ revoked: number;
1703
+ unchanged: number;
1704
+ };
1705
+ /**
1706
+ * Role assignment key to rematerialize
1707
+ */
1708
+ type RematerializeRoleAssignmentRequestBody = {
1709
+ pk: string;
1710
+ sk: string;
1711
+ };
1712
+ /**
1713
+ * Role assignment applied
1714
+ */
1715
+ type RoleAssignmentSuccessResponse = {
1716
+ message: string;
1717
+ };
1718
+ type RoleAssignmentRequestBody = {
1719
+ /**
1720
+ * Principal to assign the role to
1721
+ */
1722
+ principal: {
1723
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1724
+ id: string;
1725
+ name?: string;
1726
+ givenName?: string;
1727
+ familyName?: string;
1728
+ email?: string;
1729
+ phone?: string;
1730
+ };
1731
+ /**
1732
+ * Role name
1733
+ */
1734
+ roleName: 'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal';
1735
+ /**
1736
+ * Property resource ids (e.g. p123) when scoped to properties
1737
+ */
1738
+ properties?: Array<string | '*'>;
1739
+ /**
1740
+ * Brand resource ids (e.g. b123) when scoped to brands
1741
+ */
1742
+ brands?: Array<string | '*'>;
1743
+ /**
1744
+ * Sales channel resource ids (e.g. sc123) when scoped to sales channels
1745
+ */
1746
+ salesChannels?: Array<string | '*'>;
1747
+ /**
1748
+ * Optional permission set keys to apply to this role assignment
1749
+ */
1750
+ optionalPermissionSetKeys?: Array<string>;
1751
+ /**
1752
+ * Actor making the assignment
1753
+ */
1754
+ actor?: {
1755
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1756
+ id: string;
1757
+ name?: string;
1758
+ givenName?: string;
1759
+ familyName?: string;
1760
+ email?: string;
1761
+ phone?: string;
1762
+ };
1763
+ };
1764
+ /**
1765
+ * Teammate removed from org
1766
+ */
1767
+ type RemoveTeammateSuccessResponse = {
1768
+ message: string;
1769
+ };
1770
+ type RemoveTeammateRequestBody = {
1771
+ /**
1772
+ * Principal to remove from the org
1773
+ */
1774
+ principal: {
1775
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1776
+ id: string;
1777
+ name?: string;
1778
+ givenName?: string;
1779
+ familyName?: string;
1780
+ email?: string;
1781
+ phone?: string;
1782
+ };
1783
+ /**
1784
+ * Actor performing the removal
1785
+ */
1786
+ actor?: {
1787
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
1788
+ id: string;
1789
+ name?: string;
1790
+ givenName?: string;
1791
+ familyName?: string;
1792
+ email?: string;
1793
+ phone?: string;
1794
+ };
1795
+ };
1796
+ /**
1797
+ * Caller removed from org
1798
+ */
1799
+ type LeaveOrgSuccessResponse = {
1800
+ message: string;
1801
+ };
1802
+ /**
1803
+ * Teammate invited
1804
+ */
1805
+ type InviteTeammateSuccessResponse = {
1806
+ message: string;
1807
+ };
1808
+ type InviteTeammateRequestBody = {
1809
+ /**
1810
+ * Brand the invite is sent from
1811
+ */
1812
+ brandId: string;
1813
+ /**
1814
+ * Email address of the person to invite
1815
+ */
1816
+ email: string;
1817
+ /**
1818
+ * Role to grant
1819
+ */
1820
+ roleName: 'Owner' | 'ManagedOwner' | 'PropertyOwner' | 'PropertyManager' | 'Integrator' | 'FinanceManager' | 'StaffMember' | 'Courier';
1821
+ /**
1822
+ * Property resource ids (e.g. p123), or '*' for every property, when the role is property scoped
1823
+ */
1824
+ properties?: Array<string | '*'>;
1825
+ };
1826
+ type InviteTokenResponse = {
1827
+ tokenId: string;
1828
+ joinUrl: string;
1829
+ expiresAt: string;
1830
+ orgId: string;
1831
+ brandIds: Array<string>;
1832
+ propertyIds: Array<string>;
1833
+ salesChannelIds: Array<string>;
1834
+ roleName: 'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal';
1835
+ };
1836
+ type CreateInviteTokenRequest = {
1837
+ storefrontId?: string;
1838
+ propertyId: string;
1839
+ orgName: string;
1840
+ };
1841
+ type AccessRequestResponse = {
1842
+ requestId: string;
1843
+ state: 'Pending' | 'Approved' | 'Rejected' | 'Expired';
1844
+ requesterUserId: string;
1845
+ requesterEmail: string;
1846
+ requesterName?: string;
1847
+ orgId: string;
1848
+ orgName: string;
1849
+ propertyIds: Array<string | '*'>;
1850
+ brandIds: Array<string>;
1851
+ salesChannelIds: Array<string>;
1852
+ roleName: 'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal';
1853
+ createdAt: string;
1854
+ decidedAt?: string;
1855
+ decidedByUserId?: string;
1856
+ };
1857
+ type JoinAccessErrorResponse = {
1858
+ code: 'ALREADY_MEMBER';
1859
+ message: string;
1860
+ };
1861
+ type CreateJoinRequest = {
1862
+ token: string;
1863
+ };
1864
+ type ListJoinRequestsResponse = {
1865
+ items: Array<{
1866
+ requestId: string;
1867
+ state: 'Pending' | 'Approved' | 'Rejected' | 'Expired';
1868
+ requesterUserId: string;
1869
+ requesterEmail: string;
1870
+ requesterName?: string;
1871
+ orgId: string;
1872
+ orgName: string;
1873
+ propertyIds: Array<string | '*'>;
1874
+ brandIds: Array<string>;
1875
+ salesChannelIds: Array<string>;
1876
+ roleName: 'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal';
1877
+ createdAt: string;
1878
+ decidedAt?: string;
1879
+ decidedByUserId?: string;
1880
+ }>;
1881
+ };
1882
+ type AcceptJoinRequest = {
1883
+ roleName?: 'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal';
1884
+ propertyIds?: Array<string | '*'>;
1885
+ };
1886
+ type GlobalApiKeyStateResponse = {
1887
+ principalId: string;
1888
+ name?: string;
1889
+ status: 'active' | 'revoked';
1890
+ expiresAt?: string;
1891
+ orgId?: string;
1892
+ createdByEmail: string;
1893
+ permissions: Array<string>;
1894
+ resources?: Array<{
1895
+ type: 'Property';
1896
+ id: string;
1897
+ } | {
1898
+ type: 'Org';
1899
+ id: string;
1900
+ } | {
1901
+ type: 'Brand';
1902
+ id: string;
1903
+ } | {
1904
+ type: 'SalesChannel';
1905
+ id: string;
1906
+ }>;
1907
+ /**
1908
+ * When true, the key is authorized for all resources (unbound Cedar resource)
1909
+ */
1910
+ global: boolean;
1911
+ avpPolicyId: string;
1912
+ createdAt: string;
1913
+ updatedAt: string;
1914
+ /**
1915
+ * ISO-8601 timestamp of the most recent successful authentication with this key
1916
+ */
1917
+ lastUsedAt?: string;
1918
+ };
1919
+ type ListGlobalApiKeysResponse = {
1920
+ items: Array<GlobalApiKeyStateResponse>;
1921
+ };
1922
+ type CreateGlobalApiKeyResponse = {
1923
+ /**
1924
+ * Raw API key secret — returned only once at creation
1925
+ */
1926
+ apiKey: string;
1927
+ state: GlobalApiKeyStateResponse;
1928
+ };
1929
+ type CreateGlobalApiKeyRequest = {
1930
+ name: string;
1931
+ permissions: Array<string>;
1932
+ /**
1933
+ * Single resource the key is scoped to (required when global is false)
1934
+ */
1935
+ resource?: {
1936
+ type: 'Property';
1937
+ id: string;
1938
+ } | {
1939
+ type: 'Org';
1940
+ id: string;
1941
+ } | {
1942
+ type: 'Brand';
1943
+ id: string;
1944
+ } | {
1945
+ type: 'SalesChannel';
1946
+ id: string;
1947
+ };
1948
+ global?: boolean;
1949
+ expiresAt?: string;
1950
+ orgId?: string;
1951
+ };
1952
+ type GlobalApiKeyStateResponseUpdated = {
1953
+ principalId: string;
1954
+ name?: string;
1955
+ status: 'active' | 'revoked';
1956
+ expiresAt?: string;
1957
+ orgId?: string;
1958
+ createdByEmail: string;
1959
+ permissions: Array<string>;
1960
+ resources?: Array<{
1961
+ type: 'Property';
1962
+ id: string;
1963
+ } | {
1964
+ type: 'Org';
1965
+ id: string;
1966
+ } | {
1967
+ type: 'Brand';
1968
+ id: string;
1969
+ } | {
1970
+ type: 'SalesChannel';
1971
+ id: string;
1972
+ }>;
1973
+ /**
1974
+ * When true, the key is authorized for all resources (unbound Cedar resource)
1975
+ */
1976
+ global: boolean;
1977
+ avpPolicyId: string;
1978
+ createdAt: string;
1979
+ updatedAt: string;
1980
+ /**
1981
+ * ISO-8601 timestamp of the most recent successful authentication with this key
1982
+ */
1983
+ lastUsedAt?: string;
1984
+ };
1985
+ type UpdateGlobalApiKeyRequest = {
1986
+ name?: string;
1987
+ permissions?: Array<string>;
1988
+ resource?: {
1989
+ type: 'Property';
1990
+ id: string;
1991
+ } | {
1992
+ type: 'Org';
1993
+ id: string;
1994
+ } | {
1995
+ type: 'Brand';
1996
+ id: string;
1997
+ } | {
1998
+ type: 'SalesChannel';
1999
+ id: string;
2000
+ };
2001
+ global?: boolean;
2002
+ expiresAt?: string;
2003
+ };
2004
+ type GlobalApiKeyStateResponseRevoked = {
2005
+ principalId: string;
2006
+ name?: string;
2007
+ status: 'active' | 'revoked';
2008
+ expiresAt?: string;
2009
+ orgId?: string;
2010
+ createdByEmail: string;
2011
+ permissions: Array<string>;
2012
+ resources?: Array<{
2013
+ type: 'Property';
2014
+ id: string;
2015
+ } | {
2016
+ type: 'Org';
2017
+ id: string;
2018
+ } | {
2019
+ type: 'Brand';
2020
+ id: string;
2021
+ } | {
2022
+ type: 'SalesChannel';
2023
+ id: string;
2024
+ }>;
2025
+ /**
2026
+ * When true, the key is authorized for all resources (unbound Cedar resource)
2027
+ */
2028
+ global: boolean;
2029
+ avpPolicyId: string;
2030
+ createdAt: string;
2031
+ updatedAt: string;
2032
+ /**
2033
+ * ISO-8601 timestamp of the most recent successful authentication with this key
2034
+ */
2035
+ lastUsedAt?: string;
2036
+ };
2037
+ type AccessBlockStateResponseBlocked = {
2038
+ principal: {
2039
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
2040
+ id: string;
2041
+ };
2042
+ reason?: string;
2043
+ blockedAt: string;
2044
+ blockedBy: {
2045
+ principalId: string;
2046
+ email: string;
2047
+ };
2048
+ };
2049
+ type BlockPrincipalAccessRequest = {
2050
+ principal: {
2051
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
2052
+ id: string;
2053
+ };
2054
+ reason?: string;
2055
+ };
2056
+ type UnblockPrincipalAccessResponse = {
2057
+ principal: {
2058
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
2059
+ id: string;
2060
+ };
2061
+ status: 'restoration_in_progress' | 'not_blocked';
2062
+ };
2063
+ type UnblockPrincipalAccessRequest = {
2064
+ principal: {
2065
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
2066
+ id: string;
2067
+ };
2068
+ };
2069
+ type AccessBlockStateResponse = {
2070
+ principal: {
2071
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
2072
+ id: string;
2073
+ };
2074
+ reason?: string;
2075
+ blockedAt: string;
2076
+ blockedBy: {
2077
+ principalId: string;
2078
+ email: string;
2079
+ };
2080
+ };
2081
+ type ListPrincipalAccessBlocksResponse = {
2082
+ items: Array<AccessBlockStateResponse>;
2083
+ };
2084
+ /**
2085
+ * Successful permissions retrieval response
2086
+ */
2087
+ type ListPermissionsSuccessResponse = {
2088
+ permissions: Permissions & Array<Permissions>;
2089
+ };
2090
+ /**
2091
+ * Roles
7
2092
  *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
2093
+ * List of named roles
2094
+ */
2095
+ type Roles = Array<RoleNames>;
2096
+ /**
2097
+ * Successful roles retrieval response
2098
+ */
2099
+ type ListRolesSuccessResponse = {
2100
+ roles: Roles;
2101
+ };
2102
+ /**
2103
+ * Permissions granted at a single hierarchy level
2104
+ */
2105
+ type RoleLevelDefinition = {
2106
+ /**
2107
+ * input grants the permissions on the resources named in the assignment, all grants them on every resource of that level in the org
2108
+ */
2109
+ scope: 'input' | 'all';
2110
+ /**
2111
+ * Permissions granted at this hierarchy level
2112
+ */
2113
+ permissions: Array<Permissions>;
2114
+ };
2115
+ /**
2116
+ * Permissions granted, keyed by hierarchy level
2117
+ */
2118
+ type RoleLevels = {
2119
+ org?: RoleLevelDefinition;
2120
+ brand?: RoleLevelDefinition;
2121
+ property?: RoleLevelDefinition;
2122
+ salesChannel?: RoleLevelDefinition;
2123
+ global?: RoleLevelDefinition;
2124
+ self?: RoleLevelDefinition;
2125
+ };
2126
+ /**
2127
+ * Successful role definitions retrieval response
2128
+ */
2129
+ type ListRoleDefinitionsSuccessResponse = {
2130
+ /**
2131
+ * Roles and the permissions they grant at each hierarchy level
2132
+ */
2133
+ roles: Array<{
2134
+ /**
2135
+ * Name of the role
2136
+ */
2137
+ name: 'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal';
2138
+ levels: RoleLevels;
2139
+ /**
2140
+ * Permission sets that can be granted on top of the role
2141
+ */
2142
+ optionalPermissionSets: Array<{
2143
+ /**
2144
+ * Key used to add this permission set to a role assignment
2145
+ */
2146
+ key: string;
2147
+ /**
2148
+ * Human readable name of the permission set
2149
+ */
2150
+ name: string;
2151
+ levels: RoleLevels;
2152
+ }>;
2153
+ }>;
2154
+ };
2155
+ type AuthorizeData = {
2156
+ body?: AuthorizationRequest;
2157
+ path?: never;
2158
+ query?: never;
2159
+ url: '/authorize';
2160
+ };
2161
+ type AuthorizeErrors = {
2162
+ /**
2163
+ * Validation errors
2164
+ */
2165
+ 400: ValidationErrors;
2166
+ /**
2167
+ * Server errors
2168
+ */
2169
+ 500: string;
2170
+ };
2171
+ type AuthorizeError = AuthorizeErrors[keyof AuthorizeErrors];
2172
+ type AuthorizeResponses = {
2173
+ /**
2174
+ * Authorization decision
2175
+ */
2176
+ 200: AuthorizationResponse;
2177
+ };
2178
+ type AuthorizeResponse = AuthorizeResponses[keyof AuthorizeResponses];
2179
+ type AuthorizeBatchData = {
2180
+ body?: AuthorizationBatchRequest;
2181
+ path?: never;
2182
+ query?: never;
2183
+ url: '/authorize/batch';
2184
+ };
2185
+ type AuthorizeBatchErrors = {
2186
+ /**
2187
+ * Validation errors
2188
+ */
2189
+ 400: ValidationErrors;
2190
+ /**
2191
+ * Server errors
2192
+ */
2193
+ 500: string;
2194
+ };
2195
+ type AuthorizeBatchError = AuthorizeBatchErrors[keyof AuthorizeBatchErrors];
2196
+ type AuthorizeBatchResponses = {
2197
+ /**
2198
+ * Authorization batch decision
2199
+ */
2200
+ 200: AuthorizationBatchResponse;
2201
+ };
2202
+ type AuthorizeBatchResponse = AuthorizeBatchResponses[keyof AuthorizeBatchResponses];
2203
+ type AuthorizeBatchChecksData = {
2204
+ body?: AuthorizationChecksBatchRequest;
2205
+ path?: never;
2206
+ query?: never;
2207
+ url: '/authorize/batch/checks';
2208
+ };
2209
+ type AuthorizeBatchChecksErrors = {
2210
+ /**
2211
+ * Validation errors or invalid batch
2212
+ */
2213
+ 400: Array<{
2214
+ path?: Array<string | number>;
2215
+ message: string;
2216
+ }> | {
2217
+ message: string;
2218
+ };
2219
+ /**
2220
+ * Invalid resource
2221
+ */
2222
+ 404: {
2223
+ message: string;
2224
+ };
2225
+ /**
2226
+ * Internal server error
2227
+ */
2228
+ 500: {
2229
+ message: string;
2230
+ };
2231
+ };
2232
+ type AuthorizeBatchChecksError = AuthorizeBatchChecksErrors[keyof AuthorizeBatchChecksErrors];
2233
+ type AuthorizeBatchChecksResponses = {
2234
+ /**
2235
+ * Authorization batch checks decision
2236
+ */
2237
+ 200: AuthorizationChecksBatchResponse;
2238
+ };
2239
+ type AuthorizeBatchChecksResponse = AuthorizeBatchChecksResponses[keyof AuthorizeBatchChecksResponses];
2240
+ type CheckIsInRoleData = {
2241
+ body?: IsInRoleRequest;
2242
+ path?: never;
2243
+ query?: never;
2244
+ url: '/checkIsInRole';
2245
+ };
2246
+ type CheckIsInRoleErrors = {
2247
+ /**
2248
+ * Validation errors
2249
+ */
2250
+ 400: ValidationErrors;
2251
+ /**
2252
+ * Server errors
2253
+ */
2254
+ 500: string;
2255
+ };
2256
+ type CheckIsInRoleError = CheckIsInRoleErrors[keyof CheckIsInRoleErrors];
2257
+ type CheckIsInRoleResponses = {
2258
+ /**
2259
+ * Is in role decision
2260
+ */
2261
+ 200: IsInRoleResponse;
2262
+ };
2263
+ type CheckIsInRoleResponse = CheckIsInRoleResponses[keyof CheckIsInRoleResponses];
2264
+ type AuthenticateAndCheckIsInRoleData = {
2265
+ body?: AuthenticateAndCheckIsInRoleRequest;
2266
+ path?: never;
2267
+ query?: never;
2268
+ url: '/authenticateAndCheckIsInRole';
2269
+ };
2270
+ type AuthenticateAndCheckIsInRoleErrors = {
2271
+ /**
2272
+ * Validation errors
2273
+ */
2274
+ 400: ValidationErrors;
2275
+ /**
2276
+ * Server errors
2277
+ */
2278
+ 500: string;
2279
+ };
2280
+ type AuthenticateAndCheckIsInRoleError = AuthenticateAndCheckIsInRoleErrors[keyof AuthenticateAndCheckIsInRoleErrors];
2281
+ type AuthenticateAndCheckIsInRoleResponses = {
2282
+ /**
2283
+ * Authenticate and is in role decision
2284
+ */
2285
+ 200: AuthenticateAndCheckIsInRoleResponse;
2286
+ };
2287
+ type AuthenticateAndCheckIsInRoleResponse2 = AuthenticateAndCheckIsInRoleResponses[keyof AuthenticateAndCheckIsInRoleResponses];
2288
+ type AuthenticateAndAuthorizeData = {
2289
+ body: AuthenticateAndAuthorizeRequest;
2290
+ path?: never;
2291
+ query?: never;
2292
+ url: '/authenticateAndAuthorize';
2293
+ };
2294
+ type AuthenticateAndAuthorizeErrors = {
2295
+ /**
2296
+ * Unauthenticated
2297
+ */
2298
+ 401: ErrorResponse;
2299
+ /**
2300
+ * Forbidden
2301
+ */
2302
+ 403: ErrorResponse;
2303
+ /**
2304
+ * Not found
2305
+ */
2306
+ 404: ErrorResponse;
2307
+ /**
2308
+ * Internal server error
2309
+ */
2310
+ 500: ErrorResponse;
2311
+ };
2312
+ type AuthenticateAndAuthorizeError = AuthenticateAndAuthorizeErrors[keyof AuthenticateAndAuthorizeErrors];
2313
+ type AuthenticateAndAuthorizeResponses = {
2314
+ /**
2315
+ * Authentication and authorization decision
2316
+ */
2317
+ 200: AuthenticateAndAuthorizeResponse;
2318
+ };
2319
+ type AuthenticateAndAuthorizeResponse2 = AuthenticateAndAuthorizeResponses[keyof AuthenticateAndAuthorizeResponses];
2320
+ type GetAuthorizedOrgsData = {
2321
+ body?: GetAuthorizedOrgsRequest;
2322
+ path?: never;
2323
+ query?: never;
2324
+ url: '/getAuthorizedOrgs';
2325
+ };
2326
+ type GetAuthorizedOrgsErrors = {
2327
+ /**
2328
+ * Validation errors
2329
+ */
2330
+ 400: ValidationErrors;
2331
+ /**
2332
+ * Server errors
2333
+ */
2334
+ 500: string;
2335
+ };
2336
+ type GetAuthorizedOrgsError = GetAuthorizedOrgsErrors[keyof GetAuthorizedOrgsErrors];
2337
+ type GetAuthorizedOrgsResponses = {
2338
+ /**
2339
+ * Authorized orgs retrieved successfully
2340
+ */
2341
+ 200: GetAuthorizedOrgsResponse;
2342
+ };
2343
+ type GetAuthorizedOrgsResponse2 = GetAuthorizedOrgsResponses[keyof GetAuthorizedOrgsResponses];
2344
+ type GetAuthorizedPropertiesData = {
2345
+ body?: GetAuthorizedPropertiesRequest;
2346
+ path: {
2347
+ orgId: string;
2348
+ };
2349
+ query?: never;
2350
+ url: '/orgs/{orgId}/getAuthorizedProperties';
2351
+ };
2352
+ type GetAuthorizedPropertiesErrors = {
2353
+ /**
2354
+ * Validation errors
2355
+ */
2356
+ 400: ValidationErrors;
2357
+ /**
2358
+ * Server errors
2359
+ */
2360
+ 500: string;
2361
+ };
2362
+ type GetAuthorizedPropertiesError = GetAuthorizedPropertiesErrors[keyof GetAuthorizedPropertiesErrors];
2363
+ type GetAuthorizedPropertiesResponses = {
2364
+ /**
2365
+ * Authorized properties retrieved successfully
2366
+ */
2367
+ 200: GetAuthorizedPropertiesResponse;
2368
+ };
2369
+ type GetAuthorizedPropertiesResponse2 = GetAuthorizedPropertiesResponses[keyof GetAuthorizedPropertiesResponses];
2370
+ type GetAuthorizedBrandsData = {
2371
+ body?: GetAuthorizedBrandsRequest;
2372
+ path: {
2373
+ orgId: string;
2374
+ };
2375
+ query?: never;
2376
+ url: '/orgs/{orgId}/getAuthorizedBrands';
2377
+ };
2378
+ type GetAuthorizedBrandsErrors = {
2379
+ /**
2380
+ * Validation errors
2381
+ */
2382
+ 400: ValidationErrors;
2383
+ /**
2384
+ * Server errors
2385
+ */
2386
+ 500: string;
2387
+ };
2388
+ type GetAuthorizedBrandsError = GetAuthorizedBrandsErrors[keyof GetAuthorizedBrandsErrors];
2389
+ type GetAuthorizedBrandsResponses = {
2390
+ /**
2391
+ * Authorized brands retrieved successfully
2392
+ */
2393
+ 200: GetAuthorizedBrandsResponse;
2394
+ };
2395
+ type GetAuthorizedBrandsResponse2 = GetAuthorizedBrandsResponses[keyof GetAuthorizedBrandsResponses];
2396
+ type ListUsersInOrgData = {
2397
+ body?: never;
2398
+ path: {
2399
+ orgId: string;
2400
+ };
2401
+ query?: never;
2402
+ url: '/orgs/{orgId}/users';
2403
+ };
2404
+ type ListUsersInOrgErrors = {
2405
+ /**
2406
+ * Validation errors
2407
+ */
2408
+ 400: ValidationErrors;
2409
+ /**
2410
+ * Server errors
2411
+ */
2412
+ 500: string;
2413
+ };
2414
+ type ListUsersInOrgError = ListUsersInOrgErrors[keyof ListUsersInOrgErrors];
2415
+ type ListUsersInOrgResponses = {
2416
+ /**
2417
+ * Users retrieved successfully
2418
+ */
2419
+ 200: PrincipalsInOrgResponse;
2420
+ };
2421
+ type ListUsersInOrgResponse = ListUsersInOrgResponses[keyof ListUsersInOrgResponses];
2422
+ type ListUserPermissionsData = {
2423
+ body?: never;
2424
+ path: {
2425
+ orgId: string;
2426
+ userId: string;
2427
+ };
2428
+ query?: never;
2429
+ url: '/orgs/{orgId}/user/{userId}/permissions';
2430
+ };
2431
+ type ListUserPermissionsErrors = {
2432
+ /**
2433
+ * Validation errors
2434
+ */
2435
+ 400: ValidationErrors;
2436
+ /**
2437
+ * Server errors
2438
+ */
2439
+ 500: string;
2440
+ };
2441
+ type ListUserPermissionsError = ListUserPermissionsErrors[keyof ListUserPermissionsErrors];
2442
+ type ListUserPermissionsResponses = {
2443
+ /**
2444
+ * Permissions retrieved successfully
2445
+ */
2446
+ 200: GetUserPermissionsSuccessResponse;
2447
+ };
2448
+ type ListUserPermissionsResponse = ListUserPermissionsResponses[keyof ListUserPermissionsResponses];
2449
+ type ListOwnPermissionsData = {
2450
+ body?: never;
2451
+ path: {
2452
+ orgId: string;
2453
+ };
2454
+ query?: never;
2455
+ url: '/orgs/{orgId}/user/permissions';
2456
+ };
2457
+ type ListOwnPermissionsErrors = {
2458
+ /**
2459
+ * Validation errors
2460
+ */
2461
+ 400: ValidationErrors;
2462
+ /**
2463
+ * Server errors
2464
+ */
2465
+ 500: string;
2466
+ };
2467
+ type ListOwnPermissionsError = ListOwnPermissionsErrors[keyof ListOwnPermissionsErrors];
2468
+ type ListOwnPermissionsResponses = {
2469
+ /**
2470
+ * Permissions retrieved successfully
2471
+ */
2472
+ 200: GetUserPermissionsSuccessResponse;
2473
+ };
2474
+ type ListOwnPermissionsResponse = ListOwnPermissionsResponses[keyof ListOwnPermissionsResponses];
2475
+ type ListOwnRolesData = {
2476
+ body?: never;
2477
+ path: {
2478
+ orgId: string;
2479
+ };
2480
+ query?: never;
2481
+ url: '/orgs/{orgId}/user/roles';
2482
+ };
2483
+ type ListOwnRolesErrors = {
2484
+ /**
2485
+ * Validation errors
2486
+ */
2487
+ 400: ValidationErrors;
2488
+ /**
2489
+ * Server errors
2490
+ */
2491
+ 500: string;
2492
+ };
2493
+ type ListOwnRolesError = ListOwnRolesErrors[keyof ListOwnRolesErrors];
2494
+ type ListOwnRolesResponses = {
2495
+ /**
2496
+ * Roles retrieved successfully
2497
+ */
2498
+ 200: GetUserRolesSuccessResponse;
2499
+ };
2500
+ type ListOwnRolesResponse = ListOwnRolesResponses[keyof ListOwnRolesResponses];
2501
+ type ListOrgRolesData = {
2502
+ body?: never;
2503
+ path: {
2504
+ orgId: string;
2505
+ };
2506
+ query?: never;
2507
+ url: '/orgs/{orgId}/roles';
2508
+ };
2509
+ type ListOrgRolesErrors = {
2510
+ /**
2511
+ * Validation errors
2512
+ */
2513
+ 400: ValidationErrors;
2514
+ /**
2515
+ * Server errors
2516
+ */
2517
+ 500: string;
2518
+ };
2519
+ type ListOrgRolesError = ListOrgRolesErrors[keyof ListOrgRolesErrors];
2520
+ type ListOrgRolesResponses = {
2521
+ /**
2522
+ * Roles retrieved successfully
2523
+ */
2524
+ 200: ListOrgRolesSuccessResponse;
2525
+ };
2526
+ type ListOrgRolesResponse = ListOrgRolesResponses[keyof ListOrgRolesResponses];
2527
+ type ListOrgPermissionsData = {
2528
+ body?: never;
2529
+ path: {
2530
+ orgId: string;
2531
+ };
2532
+ query?: never;
2533
+ url: '/orgs/{orgId}/permissions';
2534
+ };
2535
+ type ListOrgPermissionsErrors = {
2536
+ /**
2537
+ * Validation errors
2538
+ */
2539
+ 400: ValidationErrors;
2540
+ /**
2541
+ * Server errors
2542
+ */
2543
+ 500: string;
2544
+ };
2545
+ type ListOrgPermissionsError = ListOrgPermissionsErrors[keyof ListOrgPermissionsErrors];
2546
+ type ListOrgPermissionsResponses = {
2547
+ /**
2548
+ * Permissions retrieved successfully
2549
+ */
2550
+ 200: ListOrgPermissionsSuccessResponse;
2551
+ };
2552
+ type ListOrgPermissionsResponse = ListOrgPermissionsResponses[keyof ListOrgPermissionsResponses];
2553
+ type GetPrincipalOrgsData = {
2554
+ body?: never;
2555
+ path: {
2556
+ principalId: string;
2557
+ };
2558
+ query?: never;
2559
+ url: '/principals/{principalId}/orgs';
2560
+ };
2561
+ type GetPrincipalOrgsErrors = {
2562
+ /**
2563
+ * Validation errors
2564
+ */
2565
+ 400: ValidationErrors;
2566
+ /**
2567
+ * Principal not found
2568
+ */
2569
+ 404: {
2570
+ message: string;
2571
+ };
2572
+ /**
2573
+ * Server errors
2574
+ */
2575
+ 500: string;
2576
+ };
2577
+ type GetPrincipalOrgsError = GetPrincipalOrgsErrors[keyof GetPrincipalOrgsErrors];
2578
+ type GetPrincipalOrgsResponses = {
2579
+ /**
2580
+ * Org memberships retrieved successfully
2581
+ */
2582
+ 200: PrincipalOrgsResponse;
2583
+ };
2584
+ type GetPrincipalOrgsResponse = GetPrincipalOrgsResponses[keyof GetPrincipalOrgsResponses];
2585
+ type RevokeTimedAccessGrantData = {
2586
+ body?: never;
2587
+ path: {
2588
+ orgId: string;
2589
+ };
2590
+ query?: never;
2591
+ url: '/orgs/{orgId}/timedAccess/grants';
2592
+ };
2593
+ type RevokeTimedAccessGrantErrors = {
2594
+ /**
2595
+ * Validation errors
2596
+ */
2597
+ 400: ValidationErrors;
2598
+ /**
2599
+ * The caller has no active timed access pass on this org
2600
+ */
2601
+ 404: unknown;
2602
+ /**
2603
+ * Server errors
2604
+ */
2605
+ 500: string;
2606
+ };
2607
+ type RevokeTimedAccessGrantError = RevokeTimedAccessGrantErrors[keyof RevokeTimedAccessGrantErrors];
2608
+ type RevokeTimedAccessGrantResponses = {
2609
+ /**
2610
+ * Timed access pass revoked
2611
+ */
2612
+ 200: TimedAccessGrantResponse;
2613
+ };
2614
+ type RevokeTimedAccessGrantResponse = RevokeTimedAccessGrantResponses[keyof RevokeTimedAccessGrantResponses];
2615
+ type ListMyTimedAccessGrantsData = {
2616
+ body?: never;
2617
+ path: {
2618
+ orgId: string;
2619
+ };
2620
+ query?: {
2621
+ /**
2622
+ * Only active grants are returned. The caller comes from the auth context
2623
+ */
2624
+ status?: 'active';
2625
+ };
2626
+ url: '/orgs/{orgId}/timedAccess/grants';
2627
+ };
2628
+ type ListMyTimedAccessGrantsErrors = {
2629
+ /**
2630
+ * Validation errors
2631
+ */
2632
+ 400: ValidationErrors;
2633
+ /**
2634
+ * Server errors
2635
+ */
2636
+ 500: string;
2637
+ };
2638
+ type ListMyTimedAccessGrantsError = ListMyTimedAccessGrantsErrors[keyof ListMyTimedAccessGrantsErrors];
2639
+ type ListMyTimedAccessGrantsResponses = {
2640
+ /**
2641
+ * Active timed access passes retrieved
2642
+ */
2643
+ 200: ListTimedAccessGrantsResponse;
2644
+ };
2645
+ type ListMyTimedAccessGrantsResponse = ListMyTimedAccessGrantsResponses[keyof ListMyTimedAccessGrantsResponses];
2646
+ type CreateTimedAccessGrantData = {
2647
+ body?: TimedAccessGrantRequestBody;
2648
+ path: {
2649
+ orgId: string;
2650
+ };
2651
+ query?: never;
2652
+ url: '/orgs/{orgId}/timedAccess/grants';
2653
+ };
2654
+ type CreateTimedAccessGrantErrors = {
2655
+ /**
2656
+ * Validation errors
2657
+ */
2658
+ 400: ValidationErrors;
2659
+ /**
2660
+ * The caller already holds a role assignment on this org
2661
+ */
2662
+ 409: unknown;
2663
+ /**
2664
+ * Server errors
2665
+ */
2666
+ 500: string;
2667
+ };
2668
+ type CreateTimedAccessGrantError = CreateTimedAccessGrantErrors[keyof CreateTimedAccessGrantErrors];
2669
+ type CreateTimedAccessGrantResponses = {
2670
+ /**
2671
+ * Existing timed access pass extended
2672
+ */
2673
+ 200: TimedAccessGrantResponse;
2674
+ /**
2675
+ * Timed access pass created
2676
+ */
2677
+ 201: TimedAccessGrantResponse;
2678
+ };
2679
+ type CreateTimedAccessGrantResponse = CreateTimedAccessGrantResponses[keyof CreateTimedAccessGrantResponses];
2680
+ type ListMyTimedAccessGrantsAcrossOrgsData = {
2681
+ body?: never;
2682
+ path?: never;
2683
+ query?: {
2684
+ /**
2685
+ * Which grants to return. Defaults to active. The caller comes from the auth context
2686
+ */
2687
+ status?: 'active' | 'expired';
2688
+ /**
2689
+ * Page size for expired grants, defaults to a server-chosen value
2690
+ */
2691
+ limit?: number;
2692
+ /**
2693
+ * Opaque pagination cursor returned as nextCursor on a previous expired page
2694
+ */
2695
+ cursor?: string;
2696
+ };
2697
+ url: '/timedAccess/grants';
2698
+ };
2699
+ type ListMyTimedAccessGrantsAcrossOrgsErrors = {
2700
+ /**
2701
+ * Validation errors
2702
+ */
2703
+ 400: ValidationErrors;
2704
+ /**
2705
+ * Server errors
2706
+ */
2707
+ 500: string;
2708
+ };
2709
+ type ListMyTimedAccessGrantsAcrossOrgsError = ListMyTimedAccessGrantsAcrossOrgsErrors[keyof ListMyTimedAccessGrantsAcrossOrgsErrors];
2710
+ type ListMyTimedAccessGrantsAcrossOrgsResponses = {
2711
+ /**
2712
+ * Timed access passes retrieved
2713
+ */
2714
+ 200: ListMyTimedAccessGrantsAcrossOrgsResponse;
2715
+ };
2716
+ type ListMyTimedAccessGrantsAcrossOrgsResponse2 = ListMyTimedAccessGrantsAcrossOrgsResponses[keyof ListMyTimedAccessGrantsAcrossOrgsResponses];
2717
+ type ListExpiredTimedAccessGrantsForOrgData = {
2718
+ body?: never;
2719
+ path: {
2720
+ orgId: string;
2721
+ };
2722
+ query?: {
2723
+ /**
2724
+ * Page size, defaults to a server-chosen value
2725
+ */
2726
+ limit?: number;
2727
+ /**
2728
+ * Opaque pagination cursor returned as nextCursor on a previous page
2729
+ */
2730
+ cursor?: string;
2731
+ };
2732
+ url: '/orgs/{orgId}/timedAccess/grants/expired';
2733
+ };
2734
+ type ListExpiredTimedAccessGrantsForOrgErrors = {
2735
+ /**
2736
+ * Validation errors
2737
+ */
2738
+ 400: ValidationErrors;
2739
+ /**
2740
+ * Server errors
2741
+ */
2742
+ 500: string;
2743
+ };
2744
+ type ListExpiredTimedAccessGrantsForOrgError = ListExpiredTimedAccessGrantsForOrgErrors[keyof ListExpiredTimedAccessGrantsForOrgErrors];
2745
+ type ListExpiredTimedAccessGrantsForOrgResponses = {
2746
+ /**
2747
+ * Expired timed access passes retrieved
2748
+ */
2749
+ 200: ListExpiredTimedAccessGrantsResponse;
2750
+ };
2751
+ type ListExpiredTimedAccessGrantsForOrgResponse = ListExpiredTimedAccessGrantsForOrgResponses[keyof ListExpiredTimedAccessGrantsForOrgResponses];
2752
+ type ApplyNamedRoleData = {
2753
+ body?: ApplyNamedRoleRequestBody;
2754
+ path?: never;
2755
+ query?: never;
2756
+ url: '/namedRoles/apply';
2757
+ };
2758
+ type ApplyNamedRoleErrors = {
2759
+ /**
2760
+ * AuthDeveloper cannot be assigned through this endpoint
2761
+ */
2762
+ 400: unknown;
2763
+ /**
2764
+ * Caller not permitted to assign this role
2765
+ */
2766
+ 403: unknown;
2767
+ /**
2768
+ * Unknown user
2769
+ */
2770
+ 404: unknown;
2771
+ };
2772
+ type ApplyNamedRoleResponses = {
2773
+ /**
2774
+ * Role assigned, or already held
2775
+ */
2776
+ 201: NamedRoleAssignmentResponse;
2777
+ };
2778
+ type ApplyNamedRoleResponse = ApplyNamedRoleResponses[keyof ApplyNamedRoleResponses];
2779
+ type RemoveNamedRoleData = {
2780
+ body?: RemoveNamedRoleRequestBody;
2781
+ path?: never;
2782
+ query?: never;
2783
+ url: '/namedRoles/remove';
2784
+ };
2785
+ type RemoveNamedRoleErrors = {
2786
+ /**
2787
+ * AuthDeveloper cannot be removed through this endpoint
2788
+ */
2789
+ 400: unknown;
2790
+ /**
2791
+ * Caller not permitted to unassign this role
2792
+ */
2793
+ 403: unknown;
2794
+ /**
2795
+ * User does not hold the role
2796
+ */
2797
+ 404: unknown;
2798
+ };
2799
+ type RemoveNamedRoleResponses = {
2800
+ /**
2801
+ * Role removed
2802
+ */
2803
+ 204: void;
2804
+ };
2805
+ type RemoveNamedRoleResponse = RemoveNamedRoleResponses[keyof RemoveNamedRoleResponses];
2806
+ type ListNamedRolesData = {
2807
+ body?: never;
2808
+ path: {
2809
+ principalId: string;
2810
+ };
2811
+ query?: never;
2812
+ url: '/namedRoles/{principalId}';
2813
+ };
2814
+ type ListNamedRolesErrors = {
2815
+ /**
2816
+ * Validation errors
2817
+ */
2818
+ 400: ValidationErrors;
2819
+ /**
2820
+ * Caller not permitted to view named roles for another user
2821
+ */
2822
+ 403: unknown;
2823
+ /**
2824
+ * Server errors
2825
+ */
2826
+ 500: string;
2827
+ };
2828
+ type ListNamedRolesError = ListNamedRolesErrors[keyof ListNamedRolesErrors];
2829
+ type ListNamedRolesResponses = {
2830
+ /**
2831
+ * Named roles retrieved successfully
2832
+ */
2833
+ 200: ListNamedRolesResponse;
2834
+ };
2835
+ type ListNamedRolesResponse2 = ListNamedRolesResponses[keyof ListNamedRolesResponses];
2836
+ type RematerializeRoleAssignmentV2Data = {
2837
+ body?: RematerializeRoleAssignmentRequestBody;
2838
+ path: {
2839
+ orgId: string;
2840
+ };
2841
+ query?: never;
2842
+ url: '/orgs/{orgId}/roleAssignments/rematerialize';
2843
+ };
2844
+ type RematerializeRoleAssignmentV2Errors = {
2845
+ /**
2846
+ * Validation errors
2847
+ */
2848
+ 400: ValidationErrors;
2849
+ /**
2850
+ * Server errors
2851
+ */
2852
+ 500: string;
2853
+ };
2854
+ type RematerializeRoleAssignmentV2Error = RematerializeRoleAssignmentV2Errors[keyof RematerializeRoleAssignmentV2Errors];
2855
+ type RematerializeRoleAssignmentV2Responses = {
2856
+ /**
2857
+ * Role assignment rematerialized successfully
2858
+ */
2859
+ 200: RematerializeRoleAssignmentSuccessResponse;
2860
+ };
2861
+ type RematerializeRoleAssignmentV2Response = RematerializeRoleAssignmentV2Responses[keyof RematerializeRoleAssignmentV2Responses];
2862
+ type ApplyRoleAssignmentData = {
2863
+ body?: RoleAssignmentRequestBody;
2864
+ path: {
2865
+ orgId: string;
2866
+ };
2867
+ query?: never;
2868
+ url: '/orgs/{orgId}/roleAssignments/apply';
2869
+ };
2870
+ type ApplyRoleAssignmentErrors = {
2871
+ /**
2872
+ * Validation errors
2873
+ */
2874
+ 400: ValidationErrors;
2875
+ /**
2876
+ * Server errors
2877
+ */
2878
+ 500: string;
2879
+ };
2880
+ type ApplyRoleAssignmentError = ApplyRoleAssignmentErrors[keyof ApplyRoleAssignmentErrors];
2881
+ type ApplyRoleAssignmentResponses = {
2882
+ /**
2883
+ * Role assignment applied
2884
+ */
2885
+ 200: RoleAssignmentSuccessResponse;
2886
+ };
2887
+ type ApplyRoleAssignmentResponse = ApplyRoleAssignmentResponses[keyof ApplyRoleAssignmentResponses];
2888
+ type RemoveTeammateData = {
2889
+ body?: RemoveTeammateRequestBody;
2890
+ path: {
2891
+ orgId: string;
2892
+ };
2893
+ query?: never;
2894
+ url: '/orgs/{orgId}/roleAssignments/remove';
2895
+ };
2896
+ type RemoveTeammateErrors = {
2897
+ /**
2898
+ * Validation errors
2899
+ */
2900
+ 400: ValidationErrors;
2901
+ /**
2902
+ * Server errors
2903
+ */
2904
+ 500: string;
2905
+ };
2906
+ type RemoveTeammateError = RemoveTeammateErrors[keyof RemoveTeammateErrors];
2907
+ type RemoveTeammateResponses = {
2908
+ /**
2909
+ * Teammate removed
2910
+ */
2911
+ 200: RemoveTeammateSuccessResponse;
2912
+ };
2913
+ type RemoveTeammateResponse = RemoveTeammateResponses[keyof RemoveTeammateResponses];
2914
+ type LeaveOrgData = {
2915
+ body?: never;
2916
+ path: {
2917
+ orgId: string;
2918
+ };
2919
+ query?: never;
2920
+ url: '/orgs/{orgId}/leave';
2921
+ };
2922
+ type LeaveOrgErrors = {
2923
+ /**
2924
+ * Validation errors
2925
+ */
2926
+ 400: ValidationErrors;
2927
+ /**
2928
+ * Server errors
2929
+ */
2930
+ 500: string;
2931
+ };
2932
+ type LeaveOrgError = LeaveOrgErrors[keyof LeaveOrgErrors];
2933
+ type LeaveOrgResponses = {
2934
+ /**
2935
+ * Left org
2936
+ */
2937
+ 200: LeaveOrgSuccessResponse;
2938
+ };
2939
+ type LeaveOrgResponse = LeaveOrgResponses[keyof LeaveOrgResponses];
2940
+ type InviteTeammateData = {
2941
+ body?: InviteTeammateRequestBody;
2942
+ path: {
2943
+ orgId: string;
2944
+ };
2945
+ query?: never;
2946
+ url: '/orgs/{orgId}/teammates/invite';
2947
+ };
2948
+ type InviteTeammateErrors = {
2949
+ /**
2950
+ * Validation errors
2951
+ */
2952
+ 400: ValidationErrors;
2953
+ /**
2954
+ * Server errors
2955
+ */
2956
+ 500: string;
2957
+ };
2958
+ type InviteTeammateError = InviteTeammateErrors[keyof InviteTeammateErrors];
2959
+ type InviteTeammateResponses = {
2960
+ /**
2961
+ * Teammate invited
2962
+ */
2963
+ 200: InviteTeammateSuccessResponse;
2964
+ };
2965
+ type InviteTeammateResponse = InviteTeammateResponses[keyof InviteTeammateResponses];
2966
+ type CreateInviteTokenData = {
2967
+ body?: CreateInviteTokenRequest;
2968
+ path: {
2969
+ orgId: string;
2970
+ };
2971
+ query?: never;
2972
+ url: '/orgs/{orgId}/inviteTokens';
2973
+ };
2974
+ type CreateInviteTokenErrors = {
2975
+ /**
2976
+ * Validation errors
2977
+ */
2978
+ 400: ValidationErrors;
2979
+ /**
2980
+ * Server errors
2981
+ */
2982
+ 500: string;
2983
+ };
2984
+ type CreateInviteTokenError = CreateInviteTokenErrors[keyof CreateInviteTokenErrors];
2985
+ type CreateInviteTokenResponses = {
2986
+ /**
2987
+ * Invite token created
2988
+ */
2989
+ 200: InviteTokenResponse;
2990
+ };
2991
+ type CreateInviteTokenResponse = CreateInviteTokenResponses[keyof CreateInviteTokenResponses];
2992
+ type ListJoinAccessRequestsData = {
2993
+ body?: never;
2994
+ path: {
2995
+ orgId: string;
2996
+ };
2997
+ query?: {
2998
+ propertyId?: string;
2999
+ brandId?: string;
3000
+ };
3001
+ url: '/orgs/{orgId}/joinRequests';
3002
+ };
3003
+ type ListJoinAccessRequestsErrors = {
3004
+ /**
3005
+ * Validation errors
3006
+ */
3007
+ 400: ValidationErrors;
3008
+ /**
3009
+ * Server errors
3010
+ */
3011
+ 500: string;
3012
+ };
3013
+ type ListJoinAccessRequestsError = ListJoinAccessRequestsErrors[keyof ListJoinAccessRequestsErrors];
3014
+ type ListJoinAccessRequestsResponses = {
3015
+ /**
3016
+ * Pending access requests
3017
+ */
3018
+ 200: ListJoinRequestsResponse;
3019
+ };
3020
+ type ListJoinAccessRequestsResponse = ListJoinAccessRequestsResponses[keyof ListJoinAccessRequestsResponses];
3021
+ type CreateJoinAccessRequestData = {
3022
+ body?: CreateJoinRequest;
3023
+ path: {
3024
+ orgId: string;
3025
+ };
3026
+ query?: never;
3027
+ url: '/orgs/{orgId}/joinRequests';
3028
+ };
3029
+ type CreateJoinAccessRequestErrors = {
3030
+ /**
3031
+ * Validation errors
3032
+ */
3033
+ 400: ValidationErrors;
3034
+ /**
3035
+ * Caller already has access
3036
+ */
3037
+ 409: JoinAccessErrorResponse;
3038
+ /**
3039
+ * Server errors
3040
+ */
3041
+ 500: string;
3042
+ };
3043
+ type CreateJoinAccessRequestError = CreateJoinAccessRequestErrors[keyof CreateJoinAccessRequestErrors];
3044
+ type CreateJoinAccessRequestResponses = {
3045
+ /**
3046
+ * Access request
3047
+ */
3048
+ 200: AccessRequestResponse;
3049
+ };
3050
+ type CreateJoinAccessRequestResponse = CreateJoinAccessRequestResponses[keyof CreateJoinAccessRequestResponses];
3051
+ type GetJoinAccessRequestData = {
3052
+ body?: never;
3053
+ path: {
3054
+ orgId: string;
3055
+ requestId: string;
3056
+ };
3057
+ query?: never;
3058
+ url: '/orgs/{orgId}/joinRequests/{requestId}';
3059
+ };
3060
+ type GetJoinAccessRequestErrors = {
3061
+ /**
3062
+ * Validation errors
3063
+ */
3064
+ 400: ValidationErrors;
3065
+ /**
3066
+ * Server errors
3067
+ */
3068
+ 500: string;
3069
+ };
3070
+ type GetJoinAccessRequestError = GetJoinAccessRequestErrors[keyof GetJoinAccessRequestErrors];
3071
+ type GetJoinAccessRequestResponses = {
3072
+ /**
3073
+ * Access request
3074
+ */
3075
+ 200: {
3076
+ requestId: string;
3077
+ state: 'Pending' | 'Approved' | 'Rejected' | 'Expired';
3078
+ requesterUserId: string;
3079
+ requesterEmail: string;
3080
+ requesterName?: string;
3081
+ orgId: string;
3082
+ orgName: string;
3083
+ propertyIds: Array<string | '*'>;
3084
+ brandIds: Array<string>;
3085
+ salesChannelIds: Array<string>;
3086
+ roleName: 'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal';
3087
+ createdAt: string;
3088
+ decidedAt?: string;
3089
+ decidedByUserId?: string;
3090
+ };
3091
+ };
3092
+ type GetJoinAccessRequestResponse = GetJoinAccessRequestResponses[keyof GetJoinAccessRequestResponses];
3093
+ type AcceptJoinAccessRequestData = {
3094
+ body?: AcceptJoinRequest;
3095
+ path: {
3096
+ orgId: string;
3097
+ requestId: string;
3098
+ };
3099
+ query?: never;
3100
+ url: '/orgs/{orgId}/joinRequests/{requestId}/accept';
3101
+ };
3102
+ type AcceptJoinAccessRequestErrors = {
3103
+ /**
3104
+ * Validation errors
3105
+ */
3106
+ 400: ValidationErrors;
3107
+ /**
3108
+ * Server errors
3109
+ */
3110
+ 500: string;
3111
+ };
3112
+ type AcceptJoinAccessRequestError = AcceptJoinAccessRequestErrors[keyof AcceptJoinAccessRequestErrors];
3113
+ type AcceptJoinAccessRequestResponses = {
3114
+ /**
3115
+ * Approved access request
3116
+ */
3117
+ 200: {
3118
+ requestId: string;
3119
+ state: 'Pending' | 'Approved' | 'Rejected' | 'Expired';
3120
+ requesterUserId: string;
3121
+ requesterEmail: string;
3122
+ requesterName?: string;
3123
+ orgId: string;
3124
+ orgName: string;
3125
+ propertyIds: Array<string | '*'>;
3126
+ brandIds: Array<string>;
3127
+ salesChannelIds: Array<string>;
3128
+ roleName: 'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal';
3129
+ createdAt: string;
3130
+ decidedAt?: string;
3131
+ decidedByUserId?: string;
3132
+ };
3133
+ };
3134
+ type AcceptJoinAccessRequestResponse = AcceptJoinAccessRequestResponses[keyof AcceptJoinAccessRequestResponses];
3135
+ type RejectJoinAccessRequestData = {
3136
+ body?: never;
3137
+ path: {
3138
+ orgId: string;
3139
+ requestId: string;
3140
+ };
3141
+ query?: never;
3142
+ url: '/orgs/{orgId}/joinRequests/{requestId}/reject';
3143
+ };
3144
+ type RejectJoinAccessRequestErrors = {
3145
+ /**
3146
+ * Validation errors
3147
+ */
3148
+ 400: ValidationErrors;
3149
+ /**
3150
+ * Server errors
3151
+ */
3152
+ 500: string;
3153
+ };
3154
+ type RejectJoinAccessRequestError = RejectJoinAccessRequestErrors[keyof RejectJoinAccessRequestErrors];
3155
+ type RejectJoinAccessRequestResponses = {
3156
+ /**
3157
+ * Rejected access request
3158
+ */
3159
+ 200: {
3160
+ requestId: string;
3161
+ state: 'Pending' | 'Approved' | 'Rejected' | 'Expired';
3162
+ requesterUserId: string;
3163
+ requesterEmail: string;
3164
+ requesterName?: string;
3165
+ orgId: string;
3166
+ orgName: string;
3167
+ propertyIds: Array<string | '*'>;
3168
+ brandIds: Array<string>;
3169
+ salesChannelIds: Array<string>;
3170
+ roleName: 'Owner' | 'PropertyOwner' | 'ManagedOwner' | 'Integrator' | 'PropertyManager' | 'FinanceManager' | 'StaffMember' | 'Courier' | 'Kiosk' | 'Terminal';
3171
+ createdAt: string;
3172
+ decidedAt?: string;
3173
+ decidedByUserId?: string;
3174
+ };
3175
+ };
3176
+ type RejectJoinAccessRequestResponse = RejectJoinAccessRequestResponses[keyof RejectJoinAccessRequestResponses];
3177
+ type ListGlobalApiKeysData = {
3178
+ body?: never;
3179
+ path?: never;
3180
+ query?: {
3181
+ /**
3182
+ * When set, only return keys with this status
3183
+ */
3184
+ status?: 'active' | 'revoked';
3185
+ };
3186
+ url: '/apiKeys';
3187
+ };
3188
+ type ListGlobalApiKeysErrors = {
3189
+ /**
3190
+ * Validation errors
3191
+ */
3192
+ 400: ValidationErrors;
3193
+ /**
3194
+ * Server errors
3195
+ */
3196
+ 500: string;
3197
+ };
3198
+ type ListGlobalApiKeysError = ListGlobalApiKeysErrors[keyof ListGlobalApiKeysErrors];
3199
+ type ListGlobalApiKeysResponses = {
3200
+ /**
3201
+ * API keys
3202
+ */
3203
+ 200: ListGlobalApiKeysResponse;
3204
+ };
3205
+ type ListGlobalApiKeysResponse2 = ListGlobalApiKeysResponses[keyof ListGlobalApiKeysResponses];
3206
+ type CreateGlobalApiKeyData = {
3207
+ body?: CreateGlobalApiKeyRequest;
3208
+ path?: never;
3209
+ query?: never;
3210
+ url: '/apiKeys';
3211
+ };
3212
+ type CreateGlobalApiKeyErrors = {
3213
+ /**
3214
+ * Validation errors
3215
+ */
3216
+ 400: ValidationErrors;
3217
+ /**
3218
+ * Server errors
3219
+ */
3220
+ 500: string;
3221
+ };
3222
+ type CreateGlobalApiKeyError = CreateGlobalApiKeyErrors[keyof CreateGlobalApiKeyErrors];
3223
+ type CreateGlobalApiKeyResponses = {
3224
+ /**
3225
+ * API key created
3226
+ */
3227
+ 201: CreateGlobalApiKeyResponse;
3228
+ };
3229
+ type CreateGlobalApiKeyResponse2 = CreateGlobalApiKeyResponses[keyof CreateGlobalApiKeyResponses];
3230
+ type GetGlobalApiKeyMeData = {
3231
+ body?: never;
3232
+ path?: never;
3233
+ query?: never;
3234
+ url: '/apiKeys/me';
3235
+ };
3236
+ type GetGlobalApiKeyMeErrors = {
3237
+ /**
3238
+ * Validation errors
3239
+ */
3240
+ 400: ValidationErrors;
3241
+ /**
3242
+ * Server errors
3243
+ */
3244
+ 500: string;
3245
+ };
3246
+ type GetGlobalApiKeyMeError = GetGlobalApiKeyMeErrors[keyof GetGlobalApiKeyMeErrors];
3247
+ type GetGlobalApiKeyMeResponses = {
3248
+ /**
3249
+ * API key state
3250
+ */
3251
+ 200: GlobalApiKeyStateResponse;
3252
+ };
3253
+ type GetGlobalApiKeyMeResponse = GetGlobalApiKeyMeResponses[keyof GetGlobalApiKeyMeResponses];
3254
+ type AuthenticateApiKeyData = {
3255
+ body?: never;
3256
+ path?: never;
3257
+ query?: never;
3258
+ url: '/apiKey/authenticate';
3259
+ };
3260
+ type AuthenticateApiKeyErrors = {
3261
+ /**
3262
+ * API key is missing, malformed, unknown, revoked, or expired
3263
+ */
3264
+ 401: {
3265
+ message: string;
3266
+ };
3267
+ };
3268
+ type AuthenticateApiKeyError = AuthenticateApiKeyErrors[keyof AuthenticateApiKeyErrors];
3269
+ type AuthenticateApiKeyResponses = {
3270
+ /**
3271
+ * API key is valid
3272
+ */
3273
+ 200: {
3274
+ ok: true;
3275
+ };
3276
+ };
3277
+ type AuthenticateApiKeyResponse = AuthenticateApiKeyResponses[keyof AuthenticateApiKeyResponses];
3278
+ type UpdateGlobalApiKeyData = {
3279
+ body?: UpdateGlobalApiKeyRequest;
3280
+ path: {
3281
+ apiKeyId: string;
3282
+ };
3283
+ query?: never;
3284
+ url: '/apiKeys/{apiKeyId}';
3285
+ };
3286
+ type UpdateGlobalApiKeyErrors = {
3287
+ /**
3288
+ * Validation errors
3289
+ */
3290
+ 400: ValidationErrors;
3291
+ /**
3292
+ * Server errors
3293
+ */
3294
+ 500: string;
3295
+ };
3296
+ type UpdateGlobalApiKeyError = UpdateGlobalApiKeyErrors[keyof UpdateGlobalApiKeyErrors];
3297
+ type UpdateGlobalApiKeyResponses = {
3298
+ /**
3299
+ * API key updated
3300
+ */
3301
+ 200: GlobalApiKeyStateResponseUpdated;
3302
+ };
3303
+ type UpdateGlobalApiKeyResponse = UpdateGlobalApiKeyResponses[keyof UpdateGlobalApiKeyResponses];
3304
+ type RevokeGlobalApiKeyData = {
3305
+ body?: never;
3306
+ path: {
3307
+ apiKeyId: string;
3308
+ };
3309
+ query?: never;
3310
+ url: '/apiKeys/{apiKeyId}/revoke';
3311
+ };
3312
+ type RevokeGlobalApiKeyErrors = {
3313
+ /**
3314
+ * Validation errors
3315
+ */
3316
+ 400: ValidationErrors;
3317
+ /**
3318
+ * Server errors
3319
+ */
3320
+ 500: string;
3321
+ };
3322
+ type RevokeGlobalApiKeyError = RevokeGlobalApiKeyErrors[keyof RevokeGlobalApiKeyErrors];
3323
+ type RevokeGlobalApiKeyResponses = {
3324
+ /**
3325
+ * API key revoked
3326
+ */
3327
+ 200: GlobalApiKeyStateResponseRevoked;
3328
+ };
3329
+ type RevokeGlobalApiKeyResponse = RevokeGlobalApiKeyResponses[keyof RevokeGlobalApiKeyResponses];
3330
+ type GetPrincipalAccessBlockData = {
3331
+ body?: never;
3332
+ path?: never;
3333
+ query: {
3334
+ type: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
3335
+ id: string;
3336
+ };
3337
+ url: '/principals/block';
3338
+ };
3339
+ type GetPrincipalAccessBlockErrors = {
3340
+ /**
3341
+ * Validation errors
3342
+ */
3343
+ 400: ValidationErrors;
3344
+ /**
3345
+ * Principal is not blocked
3346
+ */
3347
+ 404: {
3348
+ message: string;
3349
+ };
3350
+ /**
3351
+ * Server errors
3352
+ */
3353
+ 500: string;
3354
+ };
3355
+ type GetPrincipalAccessBlockError = GetPrincipalAccessBlockErrors[keyof GetPrincipalAccessBlockErrors];
3356
+ type GetPrincipalAccessBlockResponses = {
3357
+ /**
3358
+ * Principal access block
3359
+ */
3360
+ 200: AccessBlockStateResponse;
3361
+ };
3362
+ type GetPrincipalAccessBlockResponse = GetPrincipalAccessBlockResponses[keyof GetPrincipalAccessBlockResponses];
3363
+ type BlockPrincipalAccessData = {
3364
+ body?: BlockPrincipalAccessRequest;
3365
+ path?: never;
3366
+ query?: never;
3367
+ url: '/principals/block';
3368
+ };
3369
+ type BlockPrincipalAccessErrors = {
3370
+ /**
3371
+ * Validation errors
3372
+ */
3373
+ 400: ValidationErrors;
3374
+ /**
3375
+ * Server errors
3376
+ */
3377
+ 500: string;
3378
+ };
3379
+ type BlockPrincipalAccessError = BlockPrincipalAccessErrors[keyof BlockPrincipalAccessErrors];
3380
+ type BlockPrincipalAccessResponses = {
3381
+ /**
3382
+ * Principal access blocked
3383
+ */
3384
+ 200: AccessBlockStateResponseBlocked;
3385
+ };
3386
+ type BlockPrincipalAccessResponse = BlockPrincipalAccessResponses[keyof BlockPrincipalAccessResponses];
3387
+ type UnblockPrincipalAccessData = {
3388
+ body?: UnblockPrincipalAccessRequest;
3389
+ path?: never;
3390
+ query?: never;
3391
+ url: '/principals/unblock';
3392
+ };
3393
+ type UnblockPrincipalAccessErrors = {
3394
+ /**
3395
+ * Validation errors
3396
+ */
3397
+ 400: ValidationErrors;
3398
+ /**
3399
+ * Server errors
3400
+ */
3401
+ 500: string;
3402
+ };
3403
+ type UnblockPrincipalAccessError = UnblockPrincipalAccessErrors[keyof UnblockPrincipalAccessErrors];
3404
+ type UnblockPrincipalAccessResponses = {
3405
+ /**
3406
+ * Principal access restoration started
3407
+ */
3408
+ 200: UnblockPrincipalAccessResponse;
3409
+ };
3410
+ type UnblockPrincipalAccessResponse2 = UnblockPrincipalAccessResponses[keyof UnblockPrincipalAccessResponses];
3411
+ type ListPrincipalAccessBlocksData = {
3412
+ body?: never;
3413
+ path?: never;
3414
+ query?: {
3415
+ type?: 'User' | 'Automation' | 'Kiosk' | 'Terminal';
3416
+ };
3417
+ url: '/principals/blocks';
3418
+ };
3419
+ type ListPrincipalAccessBlocksErrors = {
3420
+ /**
3421
+ * Validation errors
3422
+ */
3423
+ 400: ValidationErrors;
3424
+ /**
3425
+ * Server errors
3426
+ */
3427
+ 500: string;
3428
+ };
3429
+ type ListPrincipalAccessBlocksError = ListPrincipalAccessBlocksErrors[keyof ListPrincipalAccessBlocksErrors];
3430
+ type ListPrincipalAccessBlocksResponses = {
3431
+ /**
3432
+ * Principal access blocks
3433
+ */
3434
+ 200: ListPrincipalAccessBlocksResponse;
3435
+ };
3436
+ type ListPrincipalAccessBlocksResponse2 = ListPrincipalAccessBlocksResponses[keyof ListPrincipalAccessBlocksResponses];
3437
+ type ListPermissionsData = {
3438
+ body?: never;
3439
+ path?: never;
3440
+ query?: never;
3441
+ url: '/config/permissions';
3442
+ };
3443
+ type ListPermissionsErrors = {
3444
+ /**
3445
+ * Validation errors
3446
+ */
3447
+ 400: ValidationErrors;
3448
+ /**
3449
+ * Server errors
3450
+ */
3451
+ 500: string;
3452
+ };
3453
+ type ListPermissionsError = ListPermissionsErrors[keyof ListPermissionsErrors];
3454
+ type ListPermissionsResponses = {
3455
+ /**
3456
+ * Permissions retrieved successfully
3457
+ */
3458
+ 200: ListPermissionsSuccessResponse;
3459
+ };
3460
+ type ListPermissionsResponse = ListPermissionsResponses[keyof ListPermissionsResponses];
3461
+ type ListRolesData = {
3462
+ body?: never;
3463
+ path?: never;
3464
+ query?: never;
3465
+ url: '/config/roles';
3466
+ };
3467
+ type ListRolesErrors = {
3468
+ /**
3469
+ * Validation errors
3470
+ */
3471
+ 400: ValidationErrors;
3472
+ /**
3473
+ * Server errors
3474
+ */
3475
+ 500: string;
3476
+ };
3477
+ type ListRolesError = ListRolesErrors[keyof ListRolesErrors];
3478
+ type ListRolesResponses = {
3479
+ /**
3480
+ * Roles retrieved successfully
3481
+ */
3482
+ 200: ListRolesSuccessResponse;
3483
+ };
3484
+ type ListRolesResponse = ListRolesResponses[keyof ListRolesResponses];
3485
+ type ListRoleDefinitionsData = {
3486
+ body?: never;
3487
+ path?: never;
3488
+ query?: never;
3489
+ url: '/config/roleDefinitions';
3490
+ };
3491
+ type ListRoleDefinitionsErrors = {
3492
+ /**
3493
+ * Validation errors
3494
+ */
3495
+ 400: ValidationErrors;
3496
+ /**
3497
+ * Server errors
3498
+ */
3499
+ 500: string;
3500
+ };
3501
+ type ListRoleDefinitionsError = ListRoleDefinitionsErrors[keyof ListRoleDefinitionsErrors];
3502
+ type ListRoleDefinitionsResponses = {
3503
+ /**
3504
+ * Role definitions retrieved successfully
3505
+ */
3506
+ 200: ListRoleDefinitionsSuccessResponse;
3507
+ };
3508
+ type ListRoleDefinitionsResponse = ListRoleDefinitionsResponses[keyof ListRoleDefinitionsResponses];
3509
+
3510
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
3511
+ /**
3512
+ * You can provide a client instance returned by `createClient()` instead of
3513
+ * individual options. This might be also useful if you want to implement a
3514
+ * custom client.
3515
+ */
3516
+ client?: Client;
3517
+ /**
3518
+ * You can pass arbitrary values through the `meta` object. This can be
3519
+ * used to access values that aren't defined as part of the SDK function.
3520
+ */
3521
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
3522
+ };
3523
+ declare class HeyApiClient {
3524
+ protected client: Client;
3525
+ constructor(args?: {
3526
+ client?: Client;
3527
+ });
3528
+ }
3529
+ declare class HeyApiRegistry<T> {
3530
+ private readonly defaultKey;
3531
+ private readonly instances;
3532
+ get(key?: string): T;
3533
+ set(value: T, key?: string): void;
3534
+ }
3535
+ declare class AuthorizationClient extends HeyApiClient {
3536
+ static readonly __registry: HeyApiRegistry<AuthorizationClient>;
3537
+ constructor(args?: {
3538
+ client?: Client;
3539
+ key?: string;
3540
+ });
3541
+ /**
3542
+ * Authorize Request
3543
+ *
3544
+ * Check if a user is authorized to perform an action
3545
+ */
3546
+ authorize<ThrowOnError extends boolean = false>(options?: Options<AuthorizeData, ThrowOnError>): RequestResult<AuthorizeResponses, AuthorizeErrors, ThrowOnError>;
3547
+ /**
3548
+ * Authorize Batch Request
3549
+ *
3550
+ * Check if a user is authorized to perform an action on multiple resources
3551
+ */
3552
+ authorizeBatch<ThrowOnError extends boolean = false>(options?: Options<AuthorizeBatchData, ThrowOnError>): RequestResult<AuthorizeBatchResponses, AuthorizeBatchErrors, ThrowOnError>;
3553
+ /**
3554
+ * Authorize Batch Checks Request
3555
+ *
3556
+ * Check whether each principal/resource/action tuple is authorized
3557
+ */
3558
+ authorizeBatchChecks<ThrowOnError extends boolean = false>(options?: Options<AuthorizeBatchChecksData, ThrowOnError>): RequestResult<AuthorizeBatchChecksResponses, AuthorizeBatchChecksErrors, ThrowOnError>;
3559
+ /**
3560
+ * Check Is In Role
3561
+ *
3562
+ * Check if a user is in any/all of the roles
3563
+ */
3564
+ checkIsInRole<ThrowOnError extends boolean = false>(options?: Options<CheckIsInRoleData, ThrowOnError>): RequestResult<CheckIsInRoleResponses, CheckIsInRoleErrors, ThrowOnError>;
3565
+ /**
3566
+ * Authenticate and Check Is In Role
3567
+ *
3568
+ * Authenticate and check if a user is in any/all of the roles
3569
+ */
3570
+ authenticateAndCheckIsInRole<ThrowOnError extends boolean = false>(options?: Options<AuthenticateAndCheckIsInRoleData, ThrowOnError>): RequestResult<AuthenticateAndCheckIsInRoleResponses, AuthenticateAndCheckIsInRoleErrors, ThrowOnError>;
3571
+ /**
3572
+ * Authenticate and authorize Request
3573
+ *
3574
+ * Authenticate and authorize a user to perform an action
3575
+ */
3576
+ authenticateAndAuthorize<ThrowOnError extends boolean = false>(options: Options<AuthenticateAndAuthorizeData, ThrowOnError>): RequestResult<AuthenticateAndAuthorizeResponses, AuthenticateAndAuthorizeErrors, ThrowOnError>;
3577
+ /**
3578
+ * Get Authorized Orgs
3579
+ *
3580
+ * Get the authorized orgs for a given principal
3581
+ */
3582
+ getAuthorizedOrgs<ThrowOnError extends boolean = false>(options?: Options<GetAuthorizedOrgsData, ThrowOnError>): RequestResult<GetAuthorizedOrgsResponses, GetAuthorizedOrgsErrors, ThrowOnError>;
3583
+ /**
3584
+ * Get Authorized Properties
3585
+ *
3586
+ * Get the authorized properties for a given org
3587
+ */
3588
+ getAuthorizedProperties<ThrowOnError extends boolean = false>(options: Options<GetAuthorizedPropertiesData, ThrowOnError>): RequestResult<GetAuthorizedPropertiesResponses, GetAuthorizedPropertiesErrors, ThrowOnError>;
3589
+ /**
3590
+ * Get Authorized Brands
3591
+ *
3592
+ * Get the authorized brands for a given org
3593
+ */
3594
+ getAuthorizedBrands<ThrowOnError extends boolean = false>(options: Options<GetAuthorizedBrandsData, ThrowOnError>): RequestResult<GetAuthorizedBrandsResponses, GetAuthorizedBrandsErrors, ThrowOnError>;
3595
+ /**
3596
+ * List Users in Org
3597
+ *
3598
+ * List the users in a given org
3599
+ */
3600
+ listUsersInOrg<ThrowOnError extends boolean = false>(options: Options<ListUsersInOrgData, ThrowOnError>): RequestResult<ListUsersInOrgResponses, ListUsersInOrgErrors, ThrowOnError>;
3601
+ /**
3602
+ * List User Permissions
3603
+ *
3604
+ * List the available permissions for a given user
3605
+ */
3606
+ listUserPermissions<ThrowOnError extends boolean = false>(options: Options<ListUserPermissionsData, ThrowOnError>): RequestResult<ListUserPermissionsResponses, ListUserPermissionsErrors, ThrowOnError>;
3607
+ /**
3608
+ * List Own Permissions
3609
+ *
3610
+ * List the available permissions for the current user
3611
+ */
3612
+ listOwnPermissions<ThrowOnError extends boolean = false>(options: Options<ListOwnPermissionsData, ThrowOnError>): RequestResult<ListOwnPermissionsResponses, ListOwnPermissionsErrors, ThrowOnError>;
3613
+ /**
3614
+ * List Own Roles
3615
+ *
3616
+ * List the role assignments for the current user in the org
3617
+ */
3618
+ listOwnRoles<ThrowOnError extends boolean = false>(options: Options<ListOwnRolesData, ThrowOnError>): RequestResult<ListOwnRolesResponses, ListOwnRolesErrors, ThrowOnError>;
3619
+ /**
3620
+ * List Org Roles
3621
+ *
3622
+ * List the current roles assignments in the org
3623
+ */
3624
+ listOrgRoles<ThrowOnError extends boolean = false>(options: Options<ListOrgRolesData, ThrowOnError>): RequestResult<ListOrgRolesResponses, ListOrgRolesErrors, ThrowOnError>;
3625
+ /**
3626
+ * List Org Permissions
3627
+ *
3628
+ * List the current permission assignments in the org
3629
+ */
3630
+ listOrgPermissions<ThrowOnError extends boolean = false>(options: Options<ListOrgPermissionsData, ThrowOnError>): RequestResult<ListOrgPermissionsResponses, ListOrgPermissionsErrors, ThrowOnError>;
3631
+ /**
3632
+ * Get principal org memberships
3633
+ *
3634
+ * Returns the principal and the orgs it holds permission assignments in, read from the principals store with no policy evaluation. This is a superset of the orgs any single action is allowed on, so it is a sound negative filter (no membership means no permission) but not an authoritative allow. Intended as a cheap prefilter ahead of /authorize/batch/checks; use /getAuthorizedOrgs when you need a per-action answer. Requires ListPrincipalOrgs.
3635
+ */
3636
+ getPrincipalOrgs<ThrowOnError extends boolean = false>(options: Options<GetPrincipalOrgsData, ThrowOnError>): RequestResult<GetPrincipalOrgsResponses, GetPrincipalOrgsErrors, ThrowOnError>;
3637
+ /**
3638
+ * Revoke the caller's active timed access pass early
3639
+ *
3640
+ * Ends the authenticated caller's own active pass on the org before its natural expiry, removing the temporary role assignment and recording the pass as revoked. Returns 404 when the caller has no active pass on the org.
3641
+ */
3642
+ revokeTimedAccessGrant<ThrowOnError extends boolean = false>(options: Options<RevokeTimedAccessGrantData, ThrowOnError>): RequestResult<RevokeTimedAccessGrantResponses, RevokeTimedAccessGrantErrors, ThrowOnError>;
3643
+ /**
3644
+ * List the caller's active timed access pass for an org
3645
+ *
3646
+ * Returns the authenticated caller's active pass for the requested org.
3647
+ */
3648
+ listMyTimedAccessGrants<ThrowOnError extends boolean = false>(options: Options<ListMyTimedAccessGrantsData, ThrowOnError>): RequestResult<ListMyTimedAccessGrantsResponses, ListMyTimedAccessGrantsErrors, ThrowOnError>;
3649
+ /**
3650
+ * Create a timed access pass
3651
+ *
3652
+ * Grants the authenticated caller temporary Owner access to a single org. Requesting again while a pass is active extends it rather than creating a second one.
3653
+ */
3654
+ createTimedAccessGrant<ThrowOnError extends boolean = false>(options: Options<CreateTimedAccessGrantData, ThrowOnError>): RequestResult<CreateTimedAccessGrantResponses, CreateTimedAccessGrantErrors, ThrowOnError>;
3655
+ /**
3656
+ * List the caller's timed access passes across every org
3657
+ *
3658
+ * Returns the authenticated caller's active passes across all orgs, or their expired passes (most recent first, paginated) when status=expired. Used to show which orgs the caller already has access to.
3659
+ */
3660
+ listMyTimedAccessGrantsAcrossOrgs<ThrowOnError extends boolean = false>(options?: Options<ListMyTimedAccessGrantsAcrossOrgsData, ThrowOnError>): RequestResult<ListMyTimedAccessGrantsAcrossOrgsResponses, ListMyTimedAccessGrantsAcrossOrgsErrors, ThrowOnError>;
3661
+ /**
3662
+ * An org's expired timed access grant history
3663
+ *
3664
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
3665
+ */
3666
+ listExpiredTimedAccessGrantsForOrg<ThrowOnError extends boolean = false>(options: Options<ListExpiredTimedAccessGrantsForOrgData, ThrowOnError>): RequestResult<ListExpiredTimedAccessGrantsForOrgResponses, ListExpiredTimedAccessGrantsForOrgErrors, ThrowOnError>;
3667
+ /**
3668
+ * Assign a named role
3669
+ *
3670
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it's IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
3671
+ */
3672
+ applyNamedRole<ThrowOnError extends boolean = false>(options?: Options<ApplyNamedRoleData, ThrowOnError>): RequestResult<ApplyNamedRoleResponses, ApplyNamedRoleErrors, ThrowOnError>;
3673
+ /**
3674
+ * Remove a named role
3675
+ *
3676
+ * Removes the named role given in the body so the user can no longer act as it. Removing FlipdishStaff also ends any timed access passes the user currently holds, revoking that access immediately rather than leaving it to run to its own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
3677
+ */
3678
+ removeNamedRole<ThrowOnError extends boolean = false>(options?: Options<RemoveNamedRoleData, ThrowOnError>): RequestResult<RemoveNamedRoleResponses, RemoveNamedRoleErrors, ThrowOnError>;
3679
+ /**
3680
+ * List named roles for a user
3681
+ *
3682
+ * Lists the named roles currently held by the given user. No org context needed, since named roles are global. Caller must hold Admin, Factory, or AuthDeveloper.
3683
+ */
3684
+ listNamedRoles<ThrowOnError extends boolean = false>(options: Options<ListNamedRolesData, ThrowOnError>): RequestResult<ListNamedRolesResponses, ListNamedRolesErrors, ThrowOnError>;
3685
+ /**
3686
+ * Rematerialize Role Assignment
3687
+ *
3688
+ * Reconciles policy assignments for the role assignment principal: creates missing policies and revokes leftovers that materialize no longer emits
3689
+ */
3690
+ rematerializeRoleAssignmentV2<ThrowOnError extends boolean = false>(options: Options<RematerializeRoleAssignmentV2Data, ThrowOnError>): RequestResult<RematerializeRoleAssignmentV2Responses, RematerializeRoleAssignmentV2Errors, ThrowOnError>;
3691
+ /**
3692
+ * Apply role assignment
3693
+ *
3694
+ * Apply a role assignment for the target user without invoking legacy teammate/Zeus role assignment flows.
3695
+ */
3696
+ applyRoleAssignment<ThrowOnError extends boolean = false>(options: Options<ApplyRoleAssignmentData, ThrowOnError>): RequestResult<ApplyRoleAssignmentResponses, ApplyRoleAssignmentErrors, ThrowOnError>;
3697
+ /**
3698
+ * Remove teammate
3699
+ *
3700
+ * Revokes all V2 role assignments for the teammate in this org, reconciles away their policies, and removes them from the org user list. Does not delete the teammate account in Zeus.
3701
+ */
3702
+ removeTeammate<ThrowOnError extends boolean = false>(options: Options<RemoveTeammateData, ThrowOnError>): RequestResult<RemoveTeammateResponses, RemoveTeammateErrors, ThrowOnError>;
3703
+ /**
3704
+ * Leave org
3705
+ *
3706
+ * Removes the caller from the org: revokes all of their V2 role assignments, reconciles away their policies, and removes them from the org user list. Does not change their Zeus teammate record.
3707
+ */
3708
+ leaveOrg<ThrowOnError extends boolean = false>(options: Options<LeaveOrgData, ThrowOnError>): RequestResult<LeaveOrgResponses, LeaveOrgErrors, ThrowOnError>;
3709
+ /**
3710
+ * Invite teammate
3711
+ *
3712
+ * Invites a teammate through Zeus after the same rank and scope checks as applying a role assignment. If the email already belongs to an org member, the caller must be able to change them, since Zeus replaces their access.
3713
+ */
3714
+ inviteTeammate<ThrowOnError extends boolean = false>(options: Options<InviteTeammateData, ThrowOnError>): RequestResult<InviteTeammateResponses, InviteTeammateErrors, ThrowOnError>;
3715
+ /**
3716
+ * Create an invite token
3717
+ *
3718
+ * Mints an opaque invite token after validating the RMS terminal passport. Call again when a previous token expires to get a new one.
3719
+ */
3720
+ createInviteToken<ThrowOnError extends boolean = false>(options: Options<CreateInviteTokenData, ThrowOnError>): RequestResult<CreateInviteTokenResponses, CreateInviteTokenErrors, ThrowOnError>;
3721
+ /**
3722
+ * List pending join requests for an organization
3723
+ *
3724
+ * Returns pending AccessRequests for an org. Optional propertyId/brandId filters. Requires ViewTeammates on orgId.
3725
+ */
3726
+ listJoinAccessRequests<ThrowOnError extends boolean = false>(options: Options<ListJoinAccessRequestsData, ThrowOnError>): RequestResult<ListJoinAccessRequestsResponses, ListJoinAccessRequestsErrors, ThrowOnError>;
3727
+ /**
3728
+ * Submit a join access request from an invite token
3729
+ *
3730
+ * Validates the opaque invite token and creates (or returns) a pending AccessRequest for the property/role encoded on the token.
3731
+ */
3732
+ createJoinAccessRequest<ThrowOnError extends boolean = false>(options: Options<CreateJoinAccessRequestData, ThrowOnError>): RequestResult<CreateJoinAccessRequestResponses, CreateJoinAccessRequestErrors, ThrowOnError>;
3733
+ /**
3734
+ * Get a join access request by id
3735
+ *
3736
+ * Returns request status for the authenticated requester only. Owners should use the list endpoint.
3737
+ */
3738
+ getJoinAccessRequest<ThrowOnError extends boolean = false>(options: Options<GetJoinAccessRequestData, ThrowOnError>): RequestResult<GetJoinAccessRequestResponses, GetJoinAccessRequestErrors, ThrowOnError>;
3739
+ /**
3740
+ * Accept a pending join access request
3741
+ *
3742
+ * Grants access via AuthZ V2 role assignment (source join). Optional body fields override the role and property scope stored on the pending request; omitted fields use the request defaults from the invite token.
3743
+ */
3744
+ acceptJoinAccessRequest<ThrowOnError extends boolean = false>(options: Options<AcceptJoinAccessRequestData, ThrowOnError>): RequestResult<AcceptJoinAccessRequestResponses, AcceptJoinAccessRequestErrors, ThrowOnError>;
3745
+ /**
3746
+ * Reject a pending join access request
3747
+ *
3748
+ * Rejects a pending AccessRequest without granting access.
3749
+ */
3750
+ rejectJoinAccessRequest<ThrowOnError extends boolean = false>(options: Options<RejectJoinAccessRequestData, ThrowOnError>): RequestResult<RejectJoinAccessRequestResponses, RejectJoinAccessRequestErrors, ThrowOnError>;
3751
+ /**
3752
+ * List global API keys
3753
+ *
3754
+ * List Automation API keys (non-secret fields). Optional status filter (active|revoked). Requires ListGlobalAPIKeys.
3755
+ */
3756
+ listGlobalApiKeys<ThrowOnError extends boolean = false>(options?: Options<ListGlobalApiKeysData, ThrowOnError>): RequestResult<ListGlobalApiKeysResponses, ListGlobalApiKeysErrors, ThrowOnError>;
3757
+ /**
3758
+ * Create global API key
3759
+ *
3760
+ * Create an Automation API key (optional org association). Requires CreateGlobalAPIKey. Raw secret is returned once.
3761
+ */
3762
+ createGlobalApiKey<ThrowOnError extends boolean = false>(options?: Options<CreateGlobalApiKeyData, ThrowOnError>): RequestResult<CreateGlobalApiKeyResponses, CreateGlobalApiKeyErrors, ThrowOnError>;
3763
+ /**
3764
+ * Get current API key state
3765
+ *
3766
+ * Self-introspection for the authenticated Automation API key (x-api-key). Returns non-secret fields only.
3767
+ */
3768
+ getGlobalApiKeyMe<ThrowOnError extends boolean = false>(options?: Options<GetGlobalApiKeyMeData, ThrowOnError>): RequestResult<GetGlobalApiKeyMeResponses, GetGlobalApiKeyMeErrors, ThrowOnError>;
3769
+ /**
3770
+ * Authenticate API key
3771
+ *
3772
+ * Authenticates the presented Automation API key (x-api-key or Authorization: ApiKey <key>) and returns status only: 200 when the key is active and not expired, 401 otherwise. Not authenticated by cookie/JWT sessions.
3773
+ */
3774
+ authenticateApiKey<ThrowOnError extends boolean = false>(options?: Options<AuthenticateApiKeyData, ThrowOnError>): RequestResult<AuthenticateApiKeyResponses, AuthenticateApiKeyErrors, ThrowOnError>;
3775
+ /**
3776
+ * Update global API key
3777
+ *
3778
+ * Update permissions, resources, and/or expiry for any Automation API key. Rotates the STATIC AVP policy.
3779
+ */
3780
+ updateGlobalApiKey<ThrowOnError extends boolean = false>(options: Options<UpdateGlobalApiKeyData, ThrowOnError>): RequestResult<UpdateGlobalApiKeyResponses, UpdateGlobalApiKeyErrors, ThrowOnError>;
3781
+ /**
3782
+ * Revoke global API key
3783
+ *
3784
+ * Delete the STATIC AVP policy and mark the API key revoked.
3785
+ */
3786
+ revokeGlobalApiKey<ThrowOnError extends boolean = false>(options: Options<RevokeGlobalApiKeyData, ThrowOnError>): RequestResult<RevokeGlobalApiKeyResponses, RevokeGlobalApiKeyErrors, ThrowOnError>;
3787
+ /**
3788
+ * Get principal access block
3789
+ *
3790
+ * Get the current access block for a principal. Requires BlockPrincipalAccess.
3791
+ */
3792
+ getPrincipalAccessBlock<ThrowOnError extends boolean = false>(options: Options<GetPrincipalAccessBlockData, ThrowOnError>): RequestResult<GetPrincipalAccessBlockResponses, GetPrincipalAccessBlockErrors, ThrowOnError>;
3793
+ /**
3794
+ * Block principal access
3795
+ *
3796
+ * Write an access_block flag and a temporary AVP forbid so authorization checks DENY. Decision-cache bust is delayed like other grant changes. Grant drain/restore runs asynchronously. Authentication still succeeds. Requires BlockPrincipalAccess.
3797
+ */
3798
+ blockPrincipalAccess<ThrowOnError extends boolean = false>(options?: Options<BlockPrincipalAccessData, ThrowOnError>): RequestResult<BlockPrincipalAccessResponses, BlockPrincipalAccessErrors, ThrowOnError>;
3799
+ /**
3800
+ * Unblock principal access
3801
+ *
3802
+ * Start restoring existing role assignments. The access_block flag is removed asynchronously after restoration completes, and authorization remains denied until then. Requires BlockPrincipalAccess.
3803
+ */
3804
+ unblockPrincipalAccess<ThrowOnError extends boolean = false>(options?: Options<UnblockPrincipalAccessData, ThrowOnError>): RequestResult<UnblockPrincipalAccessResponses, UnblockPrincipalAccessErrors, ThrowOnError>;
3805
+ /**
3806
+ * List principal access blocks
3807
+ *
3808
+ * List currently blocked principals. Optional type filter. Requires BlockPrincipalAccess.
3809
+ */
3810
+ listPrincipalAccessBlocks<ThrowOnError extends boolean = false>(options?: Options<ListPrincipalAccessBlocksData, ThrowOnError>): RequestResult<ListPrincipalAccessBlocksResponses, ListPrincipalAccessBlocksErrors, ThrowOnError>;
3811
+ /**
3812
+ * List Permissions
3813
+ *
3814
+ * List the available permissions
3815
+ */
3816
+ listPermissions<ThrowOnError extends boolean = false>(options?: Options<ListPermissionsData, ThrowOnError>): RequestResult<ListPermissionsResponses, ListPermissionsErrors, ThrowOnError>;
3817
+ /**
3818
+ * List Roles
3819
+ *
3820
+ * List the available roles
3821
+ */
3822
+ listRoles<ThrowOnError extends boolean = false>(options?: Options<ListRolesData, ThrowOnError>): RequestResult<ListRolesResponses, ListRolesErrors, ThrowOnError>;
3823
+ /**
3824
+ * List Role Definitions
3825
+ *
3826
+ * List the teammate roles with the permissions they grant at each hierarchy level, including optional permission sets
3827
+ */
3828
+ listRoleDefinitions<ThrowOnError extends boolean = false>(options?: Options<ListRoleDefinitionsData, ThrowOnError>): RequestResult<ListRoleDefinitionsResponses, ListRoleDefinitionsErrors, ThrowOnError>;
3829
+ }
3830
+
3831
+ interface SdkInfo {
3832
+ name: string;
3833
+ version: string;
3834
+ }
3835
+ interface FlipdishIdentityOptions {
3836
+ /** Name of the app using the SDK. Defaults to FLIPDISH_CLIENT_NAME, DD_SERVICE, AWS_LAMBDA_FUNCTION_NAME or npm_package_name. */
3837
+ clientName?: string;
3838
+ /** Version of the app using the SDK. Defaults to FLIPDISH_CLIENT_VERSION, DD_VERSION or npm_package_version. */
3839
+ clientVersion?: string;
3840
+ /** Environment the app runs in, for example `production`. Defaults to FLIPDISH_CLIENT_ENVIRONMENT, DD_ENV or NODE_ENV. */
3841
+ clientEnvironment?: string;
3842
+ /** Runtime and version, for example `node/22.18.0`. Defaults to FLIPDISH_CLIENT_RUNTIME, then the detected runtime. */
3843
+ runtime?: string;
3844
+ /** Extra text appended to the identity string. Defaults to FLIPDISH_CLIENT_USER_AGENT_SUFFIX. */
3845
+ userAgentSuffix?: string;
3846
+ }
3847
+ interface RuntimeInfo {
3848
+ /** True when the SDK runs outside a browser and may set User-Agent. */
3849
+ isServer: boolean;
3850
+ env: Record<string, string | undefined>;
3851
+ /** For example `node/22.18.0`. */
3852
+ runtime?: string;
3853
+ }
3854
+ declare const CLIENT_HEADER = "X-Flipdish-Client";
3855
+ /**
3856
+ * Builds a string such as
3857
+ * `Flipdish-orgmanagement-ts/1.0.0 menu-service/2.3.1 env/production node/22.18.0`.
11
3858
  */
12
- export * from "./api";
13
- export * from "./configuration";
3859
+ declare function buildIdentity(sdk: SdkInfo, options?: FlipdishIdentityOptions, runtimeInfo?: RuntimeInfo): string;
3860
+
3861
+ declare const client: Client;
3862
+
3863
+ declare const SDK_INFO: {
3864
+ name: string;
3865
+ version: string;
3866
+ };
3867
+
3868
+ type AccessToken = string | (() => string | undefined | Promise<string | undefined>);
3869
+ interface FlipdishClientOptions extends FlipdishIdentityOptions {
3870
+ /** Defaults to https://api.flipdish.co/auth. */
3871
+ baseUrl?: string;
3872
+ /** Bearer token, or a function returning one for each request. */
3873
+ accessToken?: AccessToken;
3874
+ /** Extra headers sent with every request. These override the identity headers. */
3875
+ headers?: Record<string, string>;
3876
+ fetch?: typeof fetch;
3877
+ /** Any other Hey API client config, for example `throwOnError`. */
3878
+ config?: Partial<Config>;
3879
+ }
3880
+ /** Creates an isolated AuthorizationClient with its own base URL, token and identity. */
3881
+ declare function createFlipdishClient(options?: FlipdishClientOptions): AuthorizationClient;
3882
+ /** Sets the identity sent by the default `client`. Options take priority over environment variables. */
3883
+ declare function configureClientIdentity(options: FlipdishIdentityOptions): void;
3884
+
3885
+ export { AuthorizationClient, CLIENT_HEADER, Permissions, RoleNames, SDK_INFO, buildIdentity, client, configureClientIdentity, createFlipdishClient };
3886
+ export type { AcceptJoinAccessRequestData, AcceptJoinAccessRequestError, AcceptJoinAccessRequestErrors, AcceptJoinAccessRequestResponse, AcceptJoinAccessRequestResponses, AcceptJoinRequest, AccessBlockStateResponse, AccessBlockStateResponseBlocked, AccessRequestResponse, AccessToken, ApplyNamedRoleData, ApplyNamedRoleErrors, ApplyNamedRoleRequestBody, ApplyNamedRoleResponse, ApplyNamedRoleResponses, ApplyRoleAssignmentData, ApplyRoleAssignmentError, ApplyRoleAssignmentErrors, ApplyRoleAssignmentResponse, ApplyRoleAssignmentResponses, AuthenticateAndAuthorizeData, AuthenticateAndAuthorizeError, AuthenticateAndAuthorizeErrors, AuthenticateAndAuthorizeRequest, AuthenticateAndAuthorizeResponse, AuthenticateAndAuthorizeResponse2, AuthenticateAndAuthorizeResponses, AuthenticateAndCheckIsInRoleData, AuthenticateAndCheckIsInRoleError, AuthenticateAndCheckIsInRoleErrors, AuthenticateAndCheckIsInRoleRequest, AuthenticateAndCheckIsInRoleResponse, AuthenticateAndCheckIsInRoleResponse2, AuthenticateAndCheckIsInRoleResponses, AuthenticateApiKeyData, AuthenticateApiKeyError, AuthenticateApiKeyErrors, AuthenticateApiKeyResponse, AuthenticateApiKeyResponses, AuthorizationBatchRequest, AuthorizationBatchResponse, AuthorizationChecksBatchRequest, AuthorizationChecksBatchResponse, AuthorizationRequest, AuthorizationResponse, AuthorizeBatchChecksData, AuthorizeBatchChecksError, AuthorizeBatchChecksErrors, AuthorizeBatchChecksResponse, AuthorizeBatchChecksResponses, AuthorizeBatchData, AuthorizeBatchError, AuthorizeBatchErrors, AuthorizeBatchResponse, AuthorizeBatchResponses, AuthorizeData, AuthorizeError, AuthorizeErrors, AuthorizeResponse, AuthorizeResponses, BlockPrincipalAccessData, BlockPrincipalAccessError, BlockPrincipalAccessErrors, BlockPrincipalAccessRequest, BlockPrincipalAccessResponse, BlockPrincipalAccessResponses, CheckIsInRoleData, CheckIsInRoleError, CheckIsInRoleErrors, CheckIsInRoleResponse, CheckIsInRoleResponses, Client, ClientOptions, Config, CreateGlobalApiKeyData, CreateGlobalApiKeyError, CreateGlobalApiKeyErrors, CreateGlobalApiKeyRequest, CreateGlobalApiKeyResponse, CreateGlobalApiKeyResponse2, CreateGlobalApiKeyResponses, CreateInviteTokenData, CreateInviteTokenError, CreateInviteTokenErrors, CreateInviteTokenRequest, CreateInviteTokenResponse, CreateInviteTokenResponses, CreateJoinAccessRequestData, CreateJoinAccessRequestError, CreateJoinAccessRequestErrors, CreateJoinAccessRequestResponse, CreateJoinAccessRequestResponses, CreateJoinRequest, CreateTimedAccessGrantData, CreateTimedAccessGrantError, CreateTimedAccessGrantErrors, CreateTimedAccessGrantResponse, CreateTimedAccessGrantResponses, ErrorResponse, FlipdishClientOptions, FlipdishIdentityOptions, GetAuthorizedBrandsData, GetAuthorizedBrandsError, GetAuthorizedBrandsErrors, GetAuthorizedBrandsRequest, GetAuthorizedBrandsResponse, GetAuthorizedBrandsResponse2, GetAuthorizedBrandsResponses, GetAuthorizedOrgsData, GetAuthorizedOrgsError, GetAuthorizedOrgsErrors, GetAuthorizedOrgsRequest, GetAuthorizedOrgsResponse, GetAuthorizedOrgsResponse2, GetAuthorizedOrgsResponses, GetAuthorizedPropertiesData, GetAuthorizedPropertiesError, GetAuthorizedPropertiesErrors, GetAuthorizedPropertiesRequest, GetAuthorizedPropertiesResponse, GetAuthorizedPropertiesResponse2, GetAuthorizedPropertiesResponses, GetGlobalApiKeyMeData, GetGlobalApiKeyMeError, GetGlobalApiKeyMeErrors, GetGlobalApiKeyMeResponse, GetGlobalApiKeyMeResponses, GetJoinAccessRequestData, GetJoinAccessRequestError, GetJoinAccessRequestErrors, GetJoinAccessRequestResponse, GetJoinAccessRequestResponses, GetPrincipalAccessBlockData, GetPrincipalAccessBlockError, GetPrincipalAccessBlockErrors, GetPrincipalAccessBlockResponse, GetPrincipalAccessBlockResponses, GetPrincipalOrgsData, GetPrincipalOrgsError, GetPrincipalOrgsErrors, GetPrincipalOrgsResponse, GetPrincipalOrgsResponses, GetUserPermissionsSuccessResponse, GetUserRolesSuccessResponse, GlobalApiKeyStateResponse, GlobalApiKeyStateResponseRevoked, GlobalApiKeyStateResponseUpdated, InviteTeammateData, InviteTeammateError, InviteTeammateErrors, InviteTeammateRequestBody, InviteTeammateResponse, InviteTeammateResponses, InviteTeammateSuccessResponse, InviteTokenResponse, IsInRoleRequest, IsInRoleResponse, JoinAccessErrorResponse, LeaveOrgData, LeaveOrgError, LeaveOrgErrors, LeaveOrgResponse, LeaveOrgResponses, LeaveOrgSuccessResponse, ListExpiredTimedAccessGrantsForOrgData, ListExpiredTimedAccessGrantsForOrgError, ListExpiredTimedAccessGrantsForOrgErrors, ListExpiredTimedAccessGrantsForOrgResponse, ListExpiredTimedAccessGrantsForOrgResponses, ListExpiredTimedAccessGrantsResponse, ListGlobalApiKeysData, ListGlobalApiKeysError, ListGlobalApiKeysErrors, ListGlobalApiKeysResponse, ListGlobalApiKeysResponse2, ListGlobalApiKeysResponses, ListJoinAccessRequestsData, ListJoinAccessRequestsError, ListJoinAccessRequestsErrors, ListJoinAccessRequestsResponse, ListJoinAccessRequestsResponses, ListJoinRequestsResponse, ListMyTimedAccessGrantsAcrossOrgsData, ListMyTimedAccessGrantsAcrossOrgsError, ListMyTimedAccessGrantsAcrossOrgsErrors, ListMyTimedAccessGrantsAcrossOrgsResponse, ListMyTimedAccessGrantsAcrossOrgsResponse2, ListMyTimedAccessGrantsAcrossOrgsResponses, ListMyTimedAccessGrantsData, ListMyTimedAccessGrantsError, ListMyTimedAccessGrantsErrors, ListMyTimedAccessGrantsResponse, ListMyTimedAccessGrantsResponses, ListNamedRolesData, ListNamedRolesError, ListNamedRolesErrors, ListNamedRolesResponse, ListNamedRolesResponse2, ListNamedRolesResponses, ListOrgPermissionsData, ListOrgPermissionsError, ListOrgPermissionsErrors, ListOrgPermissionsResponse, ListOrgPermissionsResponses, ListOrgPermissionsSuccessResponse, ListOrgRolesData, ListOrgRolesError, ListOrgRolesErrors, ListOrgRolesResponse, ListOrgRolesResponses, ListOrgRolesSuccessResponse, ListOwnPermissionsData, ListOwnPermissionsError, ListOwnPermissionsErrors, ListOwnPermissionsResponse, ListOwnPermissionsResponses, ListOwnRolesData, ListOwnRolesError, ListOwnRolesErrors, ListOwnRolesResponse, ListOwnRolesResponses, ListPermissionsData, ListPermissionsError, ListPermissionsErrors, ListPermissionsResponse, ListPermissionsResponses, ListPermissionsSuccessResponse, ListPrincipalAccessBlocksData, ListPrincipalAccessBlocksError, ListPrincipalAccessBlocksErrors, ListPrincipalAccessBlocksResponse, ListPrincipalAccessBlocksResponse2, ListPrincipalAccessBlocksResponses, ListRoleDefinitionsData, ListRoleDefinitionsError, ListRoleDefinitionsErrors, ListRoleDefinitionsResponse, ListRoleDefinitionsResponses, ListRoleDefinitionsSuccessResponse, ListRolesData, ListRolesError, ListRolesErrors, ListRolesResponse, ListRolesResponses, ListRolesSuccessResponse, ListTimedAccessGrantsResponse, ListUserPermissionsData, ListUserPermissionsError, ListUserPermissionsErrors, ListUserPermissionsResponse, ListUserPermissionsResponses, ListUsersInOrgData, ListUsersInOrgError, ListUsersInOrgErrors, ListUsersInOrgResponse, ListUsersInOrgResponses, NamedRoleAssignmentResponse, Options, PrincipalInOrg, PrincipalOrgIds, PrincipalOrgsResponse, Principals, PrincipalsInOrgResponse, RejectJoinAccessRequestData, RejectJoinAccessRequestError, RejectJoinAccessRequestErrors, RejectJoinAccessRequestResponse, RejectJoinAccessRequestResponses, RematerializeRoleAssignmentRequestBody, RematerializeRoleAssignmentSuccessResponse, RematerializeRoleAssignmentV2Data, RematerializeRoleAssignmentV2Error, RematerializeRoleAssignmentV2Errors, RematerializeRoleAssignmentV2Response, RematerializeRoleAssignmentV2Responses, RemoveNamedRoleData, RemoveNamedRoleErrors, RemoveNamedRoleRequestBody, RemoveNamedRoleResponse, RemoveNamedRoleResponses, RemoveTeammateData, RemoveTeammateError, RemoveTeammateErrors, RemoveTeammateRequestBody, RemoveTeammateResponse, RemoveTeammateResponses, RemoveTeammateSuccessResponse, RequestHeaders, RevokeGlobalApiKeyData, RevokeGlobalApiKeyError, RevokeGlobalApiKeyErrors, RevokeGlobalApiKeyResponse, RevokeGlobalApiKeyResponses, RevokeTimedAccessGrantData, RevokeTimedAccessGrantError, RevokeTimedAccessGrantErrors, RevokeTimedAccessGrantResponse, RevokeTimedAccessGrantResponses, RoleAssignmentRequestBody, RoleAssignmentSuccessResponse, RoleLevelDefinition, RoleLevels, Roles, TimedAccessGrant, TimedAccessGrantRequestBody, TimedAccessGrantResponse, UnblockPrincipalAccessData, UnblockPrincipalAccessError, UnblockPrincipalAccessErrors, UnblockPrincipalAccessRequest, UnblockPrincipalAccessResponse, UnblockPrincipalAccessResponse2, UnblockPrincipalAccessResponses, UpdateGlobalApiKeyData, UpdateGlobalApiKeyError, UpdateGlobalApiKeyErrors, UpdateGlobalApiKeyRequest, UpdateGlobalApiKeyResponse, UpdateGlobalApiKeyResponses, ValidationErrors };