@ptkl/sdk 1.13.0 → 1.15.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.0.10.js +911 -129
- package/dist/index.0.9.js +22 -1
- package/dist/package.json +1 -1
- package/dist/v0.10/api/component.d.ts +3 -2
- package/dist/v0.10/api/forge.d.ts +24 -2
- package/dist/v0.10/api/index.d.ts +2 -0
- package/dist/v0.10/api/integrations/dms.d.ts +93 -1
- package/dist/v0.10/api/integrations.d.ts +38 -0
- package/dist/v0.10/api/kortex.d.ts +4 -1
- package/dist/v0.10/api/platform.d.ts +44 -0
- package/dist/v0.10/api/project.d.ts +52 -11
- package/dist/v0.10/api/sandbox.d.ts +126 -2
- package/dist/v0.10/api/transactions.d.ts +75 -0
- package/dist/v0.10/api/users.d.ts +22 -3
- package/dist/v0.10/api/workflow.d.ts +25 -1
- package/dist/v0.10/index.cjs.js +911 -129
- package/dist/v0.10/index.esm.js +911 -130
- package/dist/v0.10/types/component.d.ts +9 -1
- package/dist/v0.10/types/integrations.d.ts +142 -0
- package/dist/v0.10/types/kortex.d.ts +16 -1
- package/dist/v0.10/types/sandbox.d.ts +116 -0
- package/dist/v0.10/types/transactions.d.ts +198 -0
- package/dist/v0.10/types/users.d.ts +10 -0
- package/dist/v0.10/types/workflow.d.ts +104 -1
- package/dist/v0.9/api/users.d.ts +22 -3
- package/dist/v0.9/index.cjs.js +22 -1
- package/dist/v0.9/index.esm.js +22 -1
- package/dist/v0.9/types/component.d.ts +1 -0
- package/dist/v0.9/types/users.d.ts +10 -0
- package/package.json +1 -1
package/dist/v0.9/index.cjs.js
CHANGED
|
@@ -19550,11 +19550,32 @@ class Users extends PlatformBaseClient {
|
|
|
19550
19550
|
}
|
|
19551
19551
|
// Permissions & Roles
|
|
19552
19552
|
/**
|
|
19553
|
-
* Get
|
|
19553
|
+
* Get the current token's permissions.
|
|
19554
|
+
*
|
|
19555
|
+
* Returns the resolved permission set carried by the calling token. For a
|
|
19556
|
+
* forge actor token this is the scoped intersection minted at launch time —
|
|
19557
|
+
* see `getPrincipalPermissions()` for the underlying user's full set.
|
|
19554
19558
|
*/
|
|
19555
19559
|
async getPermissions() {
|
|
19556
19560
|
return await this.client.get("/v1/user/role/permissions");
|
|
19557
19561
|
}
|
|
19562
|
+
/**
|
|
19563
|
+
* Get the FULL permissions of the user the current token is acting on behalf
|
|
19564
|
+
* of (the "principal").
|
|
19565
|
+
*
|
|
19566
|
+
* When a forge app runs under an actor token, `getPermissions()` returns only
|
|
19567
|
+
* the token's scoped permissions — the intersection of the app's declared
|
|
19568
|
+
* runtime permissions and the user's permissions. This instead returns the
|
|
19569
|
+
* complete permission set of the underlying user, so the app can check what
|
|
19570
|
+
* that user is actually allowed to do, independent of what the app itself was
|
|
19571
|
+
* granted. The token scope is unchanged: this exposes knowledge, not capability.
|
|
19572
|
+
*
|
|
19573
|
+
* For a normal user session (no actor token) it returns the caller's own
|
|
19574
|
+
* permissions, identical to `getPermissions()`'s scope.
|
|
19575
|
+
*/
|
|
19576
|
+
async getPrincipalPermissions() {
|
|
19577
|
+
return await this.client.get("/v1/user/role/principal-permissions");
|
|
19578
|
+
}
|
|
19558
19579
|
/**
|
|
19559
19580
|
* Get list of available permissions
|
|
19560
19581
|
*/
|
package/dist/v0.9/index.esm.js
CHANGED
|
@@ -581,11 +581,32 @@ class Users extends PlatformBaseClient {
|
|
|
581
581
|
}
|
|
582
582
|
// Permissions & Roles
|
|
583
583
|
/**
|
|
584
|
-
* Get
|
|
584
|
+
* Get the current token's permissions.
|
|
585
|
+
*
|
|
586
|
+
* Returns the resolved permission set carried by the calling token. For a
|
|
587
|
+
* forge actor token this is the scoped intersection minted at launch time —
|
|
588
|
+
* see `getPrincipalPermissions()` for the underlying user's full set.
|
|
585
589
|
*/
|
|
586
590
|
async getPermissions() {
|
|
587
591
|
return await this.client.get("/v1/user/role/permissions");
|
|
588
592
|
}
|
|
593
|
+
/**
|
|
594
|
+
* Get the FULL permissions of the user the current token is acting on behalf
|
|
595
|
+
* of (the "principal").
|
|
596
|
+
*
|
|
597
|
+
* When a forge app runs under an actor token, `getPermissions()` returns only
|
|
598
|
+
* the token's scoped permissions — the intersection of the app's declared
|
|
599
|
+
* runtime permissions and the user's permissions. This instead returns the
|
|
600
|
+
* complete permission set of the underlying user, so the app can check what
|
|
601
|
+
* that user is actually allowed to do, independent of what the app itself was
|
|
602
|
+
* granted. The token scope is unchanged: this exposes knowledge, not capability.
|
|
603
|
+
*
|
|
604
|
+
* For a normal user session (no actor token) it returns the caller's own
|
|
605
|
+
* permissions, identical to `getPermissions()`'s scope.
|
|
606
|
+
*/
|
|
607
|
+
async getPrincipalPermissions() {
|
|
608
|
+
return await this.client.get("/v1/user/role/principal-permissions");
|
|
609
|
+
}
|
|
589
610
|
/**
|
|
590
611
|
* Get list of available permissions
|
|
591
612
|
*/
|
|
@@ -409,6 +409,7 @@ type SetupData = {
|
|
|
409
409
|
is_public?: boolean;
|
|
410
410
|
icon?: string;
|
|
411
411
|
settings?: Settings;
|
|
412
|
+
force_override?: boolean;
|
|
412
413
|
};
|
|
413
414
|
type ComponentCreateResponse = ComponentListItem;
|
|
414
415
|
export { FindParams, FindOptions, FindResponse, FindAdvancedParams, FindAggregateParams, Model, UpdateOptions, ModifyOptions, UpdateOperators, UpdateAggregate, ModelUpdateData, ComponentOptions, ComponentListResponse, ComponentListItem, ComponentLabel, ComponentWorkspace, StreamCallback, StreamHandler, AggregateChainable, UpdateManyOptions, CreateManyOptions, Settings, SettingsField, FieldRoles, FieldConstraints, Context, Preset, PresetContext, Filters, Function, Extension, Policy, FieldAccessConfig, TemplatesDist, SetupData, ComponentCreateResponse, };
|
|
@@ -65,3 +65,13 @@ export interface Permission {
|
|
|
65
65
|
action: string;
|
|
66
66
|
role_uuid: string;
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Resolved RBAC permission set for a user on the current project.
|
|
70
|
+
* Matches the dashboard `models.Permissions` response shape returned by
|
|
71
|
+
* `GET /v1/user/role/permissions` and `GET /v1/user/role/principal-permissions`.
|
|
72
|
+
*/
|
|
73
|
+
export interface Permissions {
|
|
74
|
+
is_admin: boolean;
|
|
75
|
+
roles: string[];
|
|
76
|
+
permissions: string[];
|
|
77
|
+
}
|